From b60f16eb56ff872a86c55c11bcfd430ce8cec340 Mon Sep 17 00:00:00 2001 From: Haavard Skinnemoen Date: Fri, 16 Feb 2007 12:47:40 +0100 Subject: [AVR32] Fix prototypes for __raw_writesb and friends The first parameter to __raw_writes[bwl] and __raw_reads[bwl] should be a void __iomem *, not unsigned long. Signed-off-by: Haavard Skinnemoen --- include/asm-avr32/io.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/asm-avr32/io.h b/include/asm-avr32/io.h index eec47500fa66..b4ac11ce13bd 100644 --- a/include/asm-avr32/io.h +++ b/include/asm-avr32/io.h @@ -28,13 +28,13 @@ static __inline__ void * phys_to_virt(unsigned long address) * Generic IO read/write. These perform native-endian accesses. Note * that some architectures will want to re-define __raw_{read,write}w. */ -extern void __raw_writesb(unsigned int addr, const void *data, int bytelen); -extern void __raw_writesw(unsigned int addr, const void *data, int wordlen); -extern void __raw_writesl(unsigned int addr, const void *data, int longlen); +extern void __raw_writesb(void __iomem *addr, const void *data, int bytelen); +extern void __raw_writesw(void __iomem *addr, const void *data, int wordlen); +extern void __raw_writesl(void __iomem *addr, const void *data, int longlen); -extern void __raw_readsb(unsigned int addr, void *data, int bytelen); -extern void __raw_readsw(unsigned int addr, void *data, int wordlen); -extern void __raw_readsl(unsigned int addr, void *data, int longlen); +extern void __raw_readsb(const void __iomem *addr, void *data, int bytelen); +extern void __raw_readsw(const void __iomem *addr, void *data, int wordlen); +extern void __raw_readsl(const void __iomem *addr, void *data, int longlen); static inline void writeb(unsigned char b, volatile void __iomem *addr) { -- cgit v1.2.3 From 2201ec2b10910c869befb012ae75696a02091e7d Mon Sep 17 00:00:00 2001 From: Haavard Skinnemoen Date: Fri, 16 Feb 2007 12:53:57 +0100 Subject: [AVR32] Define ioremap_nocache, ioport_map and ioport_unmap These are all defined in terms of ioremap/iounmap since port I/O isn't really different from memory-mapped I/O on AVR32. Signed-off-by: Haavard Skinnemoen --- include/asm-avr32/io.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include') diff --git a/include/asm-avr32/io.h b/include/asm-avr32/io.h index b4ac11ce13bd..c08e81048393 100644 --- a/include/asm-avr32/io.h +++ b/include/asm-avr32/io.h @@ -252,6 +252,9 @@ extern void __iounmap(void __iomem *addr); #define ioremap(offset, size) \ __ioremap((offset), (size), 0) +#define ioremap_nocache(offset, size) \ + __ioremap((offset), (size), 0) + #define iounmap(addr) \ __iounmap(addr) @@ -263,6 +266,14 @@ extern void __iounmap(void __iomem *addr); #define page_to_bus page_to_phys #define bus_to_page phys_to_page +/* + * Create a virtual mapping cookie for an IO port range. There exists + * no such thing as port-based I/O on AVR32, so a regular ioremap() + * should do what we need. + */ +#define ioport_map(port, nr) ioremap(port, nr) +#define ioport_unmap(port) iounmap(port) + #define dma_cache_wback_inv(_start, _size) \ flush_dcache_region(_start, _size) #define dma_cache_inv(_start, _size) \ -- cgit v1.2.3 From 1a6f1436d5fdecd4b395815c130df3c834892ab6 Mon Sep 17 00:00:00 2001 From: Haavard Skinnemoen Date: Thu, 15 Feb 2007 10:01:11 +0100 Subject: [AVR32] Wire up the SysV IPC calls properly Wire up the individual sysvipc system calls and remove sys_ipc. Strictly speaking, this breaks the ABI, but since sys_ipc never worked anyway due to a silly bug, it isn't actually a regression. Signed-off-by: Haavard Skinnemoen --- include/asm-avr32/unistd.h | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/asm-avr32/unistd.h b/include/asm-avr32/unistd.h index 56ed1f9d348a..8f5120471819 100644 --- a/include/asm-avr32/unistd.h +++ b/include/asm-avr32/unistd.h @@ -120,7 +120,7 @@ #define __NR_getitimer 105 #define __NR_swapoff 106 #define __NR_sysinfo 107 -#define __NR_ipc 108 +/* 108 was __NR_ipc for a little while */ #define __NR_sendfile 109 #define __NR_setdomainname 110 #define __NR_uname 111 @@ -282,8 +282,21 @@ #define __NR_vmsplice 264 #define __NR_epoll_pwait 265 +#define __NR_msgget 266 +#define __NR_msgsnd 267 +#define __NR_msgrcv 268 +#define __NR_msgctl 269 +#define __NR_semget 270 +#define __NR_semop 271 +#define __NR_semctl 272 +#define __NR_semtimedop 273 +#define __NR_shmat 274 +#define __NR_shmget 275 +#define __NR_shmdt 276 +#define __NR_shmctl 277 + #ifdef __KERNEL__ -#define NR_syscalls 266 +#define NR_syscalls 278 #define __ARCH_WANT_IPC_PARSE_VERSION -- cgit v1.2.3 From 41d8ca452f523b9245704c7dd8ef290fa7b78e6b Mon Sep 17 00:00:00 2001 From: Haavard Skinnemoen Date: Fri, 16 Feb 2007 13:56:11 +0100 Subject: [AVR32] Use per-controller spi_board_info structures Set up one spi_board_info array per controller and pass this to at32_add_device_spi so that it can set up any GPIO pins for chip selects based on this information. Extracted from a patch by David Brownell and adapted slightly. Signed-off-by: Haavard Skinnemoen --- include/asm-avr32/arch-at32ap/board.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/asm-avr32/arch-at32ap/board.h b/include/asm-avr32/arch-at32ap/board.h index b120ee030c86..1a7b07d436ff 100644 --- a/include/asm-avr32/arch-at32ap/board.h +++ b/include/asm-avr32/arch-at32ap/board.h @@ -26,7 +26,9 @@ struct eth_platform_data { struct platform_device * at32_add_device_eth(unsigned int id, struct eth_platform_data *data); -struct platform_device *at32_add_device_spi(unsigned int id); +struct spi_board_info; +struct platform_device * +at32_add_device_spi(unsigned int id, struct spi_board_info *b, unsigned int n); struct lcdc_platform_data { unsigned long fbmem_start; -- cgit v1.2.3