diff options
Diffstat (limited to 'include/asm-avr32')
-rw-r--r-- | include/asm-avr32/arch-at32ap/board.h | 8 | ||||
-rw-r--r-- | include/asm-avr32/arch-at32ap/portmux.h | 1 | ||||
-rw-r--r-- | include/asm-avr32/arch-at32ap/smc.h | 51 | ||||
-rw-r--r-- | include/asm-avr32/dma-mapping.h | 17 | ||||
-rw-r--r-- | include/asm-avr32/system.h | 13 | ||||
-rw-r--r-- | include/asm-avr32/unistd.h | 13 |
6 files changed, 82 insertions, 21 deletions
diff --git a/include/asm-avr32/arch-at32ap/board.h b/include/asm-avr32/arch-at32ap/board.h index 0215965dc586..7dbd603c38cc 100644 --- a/include/asm-avr32/arch-at32ap/board.h +++ b/include/asm-avr32/arch-at32ap/board.h | |||
@@ -6,6 +6,8 @@ | |||
6 | 6 | ||
7 | #include <linux/types.h> | 7 | #include <linux/types.h> |
8 | 8 | ||
9 | #define GPIO_PIN_NONE (-1) | ||
10 | |||
9 | /* Add basic devices: system manager, interrupt controller, portmuxes, etc. */ | 11 | /* Add basic devices: system manager, interrupt controller, portmuxes, etc. */ |
10 | void at32_add_system_devices(void); | 12 | void at32_add_system_devices(void); |
11 | 13 | ||
@@ -36,6 +38,12 @@ struct platform_device * | |||
36 | at32_add_device_lcdc(unsigned int id, struct atmel_lcdfb_info *data, | 38 | at32_add_device_lcdc(unsigned int id, struct atmel_lcdfb_info *data, |
37 | unsigned long fbmem_start, unsigned long fbmem_len); | 39 | unsigned long fbmem_start, unsigned long fbmem_len); |
38 | 40 | ||
41 | struct usba_platform_data { | ||
42 | int vbus_pin; | ||
43 | }; | ||
44 | struct platform_device * | ||
45 | at32_add_device_usba(unsigned int id, struct usba_platform_data *data); | ||
46 | |||
39 | /* depending on what's hooked up, not all SSC pins will be used */ | 47 | /* depending on what's hooked up, not all SSC pins will be used */ |
40 | #define ATMEL_SSC_TK 0x01 | 48 | #define ATMEL_SSC_TK 0x01 |
41 | #define ATMEL_SSC_TF 0x02 | 49 | #define ATMEL_SSC_TF 0x02 |
diff --git a/include/asm-avr32/arch-at32ap/portmux.h b/include/asm-avr32/arch-at32ap/portmux.h index 9930871decde..b1abe6b4e4ef 100644 --- a/include/asm-avr32/arch-at32ap/portmux.h +++ b/include/asm-avr32/arch-at32ap/portmux.h | |||
@@ -19,6 +19,7 @@ | |||
19 | #define AT32_GPIOF_OUTPUT 0x00000002 /* (OUT) Enable output driver */ | 19 | #define AT32_GPIOF_OUTPUT 0x00000002 /* (OUT) Enable output driver */ |
20 | #define AT32_GPIOF_HIGH 0x00000004 /* (OUT) Set output high */ | 20 | #define AT32_GPIOF_HIGH 0x00000004 /* (OUT) Set output high */ |
21 | #define AT32_GPIOF_DEGLITCH 0x00000008 /* (IN) Filter glitches */ | 21 | #define AT32_GPIOF_DEGLITCH 0x00000008 /* (IN) Filter glitches */ |
22 | #define AT32_GPIOF_MULTIDRV 0x00000010 /* Enable multidriver option */ | ||
22 | 23 | ||
23 | void at32_select_periph(unsigned int pin, unsigned int periph, | 24 | void at32_select_periph(unsigned int pin, unsigned int periph, |
24 | unsigned long flags); | 25 | unsigned long flags); |
diff --git a/include/asm-avr32/arch-at32ap/smc.h b/include/asm-avr32/arch-at32ap/smc.h index 07152b7fd9c9..c98eea44a70a 100644 --- a/include/asm-avr32/arch-at32ap/smc.h +++ b/include/asm-avr32/arch-at32ap/smc.h | |||
@@ -15,22 +15,50 @@ | |||
15 | /* | 15 | /* |
16 | * All timing parameters are in nanoseconds. | 16 | * All timing parameters are in nanoseconds. |
17 | */ | 17 | */ |
18 | struct smc_timing { | ||
19 | /* Delay from address valid to assertion of given strobe */ | ||
20 | int ncs_read_setup; | ||
21 | int nrd_setup; | ||
22 | int ncs_write_setup; | ||
23 | int nwe_setup; | ||
24 | |||
25 | /* Pulse length of given strobe */ | ||
26 | int ncs_read_pulse; | ||
27 | int nrd_pulse; | ||
28 | int ncs_write_pulse; | ||
29 | int nwe_pulse; | ||
30 | |||
31 | /* Total cycle length of given operation */ | ||
32 | int read_cycle; | ||
33 | int write_cycle; | ||
34 | |||
35 | /* Minimal recovery times, will extend cycle if needed */ | ||
36 | int ncs_read_recover; | ||
37 | int nrd_recover; | ||
38 | int ncs_write_recover; | ||
39 | int nwe_recover; | ||
40 | }; | ||
41 | |||
42 | /* | ||
43 | * All timing parameters are in clock cycles. | ||
44 | */ | ||
18 | struct smc_config { | 45 | struct smc_config { |
46 | |||
19 | /* Delay from address valid to assertion of given strobe */ | 47 | /* Delay from address valid to assertion of given strobe */ |
20 | u16 ncs_read_setup; | 48 | u8 ncs_read_setup; |
21 | u16 nrd_setup; | 49 | u8 nrd_setup; |
22 | u16 ncs_write_setup; | 50 | u8 ncs_write_setup; |
23 | u16 nwe_setup; | 51 | u8 nwe_setup; |
24 | 52 | ||
25 | /* Pulse length of given strobe */ | 53 | /* Pulse length of given strobe */ |
26 | u16 ncs_read_pulse; | 54 | u8 ncs_read_pulse; |
27 | u16 nrd_pulse; | 55 | u8 nrd_pulse; |
28 | u16 ncs_write_pulse; | 56 | u8 ncs_write_pulse; |
29 | u16 nwe_pulse; | 57 | u8 nwe_pulse; |
30 | 58 | ||
31 | /* Total cycle length of given operation */ | 59 | /* Total cycle length of given operation */ |
32 | u16 read_cycle; | 60 | u8 read_cycle; |
33 | u16 write_cycle; | 61 | u8 write_cycle; |
34 | 62 | ||
35 | /* Bus width in bytes */ | 63 | /* Bus width in bytes */ |
36 | u8 bus_width; | 64 | u8 bus_width; |
@@ -76,6 +104,9 @@ struct smc_config { | |||
76 | unsigned int tdf_mode:1; | 104 | unsigned int tdf_mode:1; |
77 | }; | 105 | }; |
78 | 106 | ||
107 | extern void smc_set_timing(struct smc_config *config, | ||
108 | const struct smc_timing *timing); | ||
109 | |||
79 | extern int smc_set_configuration(int cs, const struct smc_config *config); | 110 | extern int smc_set_configuration(int cs, const struct smc_config *config); |
80 | extern struct smc_config *smc_get_configuration(int cs); | 111 | extern struct smc_config *smc_get_configuration(int cs); |
81 | 112 | ||
diff --git a/include/asm-avr32/dma-mapping.h b/include/asm-avr32/dma-mapping.h index 21bb60bbb9a1..81e342636ac4 100644 --- a/include/asm-avr32/dma-mapping.h +++ b/include/asm-avr32/dma-mapping.h | |||
@@ -264,7 +264,11 @@ static inline void | |||
264 | dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle, | 264 | dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle, |
265 | size_t size, enum dma_data_direction direction) | 265 | size_t size, enum dma_data_direction direction) |
266 | { | 266 | { |
267 | dma_cache_sync(dev, bus_to_virt(dma_handle), size, direction); | 267 | /* |
268 | * No need to do anything since the CPU isn't supposed to | ||
269 | * touch this memory after we flushed it at mapping- or | ||
270 | * sync-for-device time. | ||
271 | */ | ||
268 | } | 272 | } |
269 | 273 | ||
270 | static inline void | 274 | static inline void |
@@ -309,12 +313,11 @@ static inline void | |||
309 | dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, | 313 | dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, |
310 | int nents, enum dma_data_direction direction) | 314 | int nents, enum dma_data_direction direction) |
311 | { | 315 | { |
312 | int i; | 316 | /* |
313 | 317 | * No need to do anything since the CPU isn't supposed to | |
314 | for (i = 0; i < nents; i++) { | 318 | * touch this memory after we flushed it at mapping- or |
315 | dma_cache_sync(dev, page_address(sg[i].page) + sg[i].offset, | 319 | * sync-for-device time. |
316 | sg[i].length, direction); | 320 | */ |
317 | } | ||
318 | } | 321 | } |
319 | 322 | ||
320 | static inline void | 323 | static inline void |
diff --git a/include/asm-avr32/system.h b/include/asm-avr32/system.h index a8236bacc878..dc2d527cef41 100644 --- a/include/asm-avr32/system.h +++ b/include/asm-avr32/system.h | |||
@@ -73,11 +73,16 @@ extern struct task_struct *__switch_to(struct task_struct *, | |||
73 | 73 | ||
74 | extern void __xchg_called_with_bad_pointer(void); | 74 | extern void __xchg_called_with_bad_pointer(void); |
75 | 75 | ||
76 | #ifdef __CHECKER__ | 76 | static inline unsigned long xchg_u32(u32 val, volatile u32 *m) |
77 | extern unsigned long __builtin_xchg(void *ptr, unsigned long x); | 77 | { |
78 | #endif | 78 | u32 ret; |
79 | 79 | ||
80 | #define xchg_u32(val, m) __builtin_xchg((void *)m, val) | 80 | asm volatile("xchg %[ret], %[m], %[val]" |
81 | : [ret] "=&r"(ret), "=m"(*m) | ||
82 | : "m"(*m), [m] "r"(m), [val] "r"(val) | ||
83 | : "memory"); | ||
84 | return ret; | ||
85 | } | ||
81 | 86 | ||
82 | static inline unsigned long __xchg(unsigned long x, | 87 | static inline unsigned long __xchg(unsigned long x, |
83 | volatile void *ptr, | 88 | volatile void *ptr, |
diff --git a/include/asm-avr32/unistd.h b/include/asm-avr32/unistd.h index 3b4e35b55c82..de09009593f8 100644 --- a/include/asm-avr32/unistd.h +++ b/include/asm-avr32/unistd.h | |||
@@ -303,6 +303,19 @@ | |||
303 | #ifdef __KERNEL__ | 303 | #ifdef __KERNEL__ |
304 | #define NR_syscalls 282 | 304 | #define NR_syscalls 282 |
305 | 305 | ||
306 | /* Old stuff */ | ||
307 | #define __IGNORE_uselib | ||
308 | #define __IGNORE_mmap | ||
309 | |||
310 | /* NUMA stuff */ | ||
311 | #define __IGNORE_mbind | ||
312 | #define __IGNORE_get_mempolicy | ||
313 | #define __IGNORE_set_mempolicy | ||
314 | #define __IGNORE_migrate_pages | ||
315 | #define __IGNORE_move_pages | ||
316 | |||
317 | /* SMP stuff */ | ||
318 | #define __IGNORE_getcpu | ||
306 | 319 | ||
307 | #define __ARCH_WANT_IPC_PARSE_VERSION | 320 | #define __ARCH_WANT_IPC_PARSE_VERSION |
308 | #define __ARCH_WANT_STAT64 | 321 | #define __ARCH_WANT_STAT64 |