diff options
Diffstat (limited to 'include/asm-avr32')
-rw-r--r-- | include/asm-avr32/arch-at32ap/at32ap7000.h | 33 | ||||
-rw-r--r-- | include/asm-avr32/arch-at32ap/at91_pdc.h (renamed from include/asm-avr32/arch-at32ap/at91rm9200_pdc.h) | 6 | ||||
-rw-r--r-- | include/asm-avr32/arch-at32ap/board.h | 3 | ||||
-rw-r--r-- | include/asm-avr32/arch-at32ap/portmux.h | 20 | ||||
-rw-r--r-- | include/asm-avr32/atomic.h | 8 | ||||
-rw-r--r-- | include/asm-avr32/checksum.h | 40 | ||||
-rw-r--r-- | include/asm-avr32/device.h | 7 | ||||
-rw-r--r-- | include/asm-avr32/dma-mapping.h | 17 | ||||
-rw-r--r-- | include/asm-avr32/io.h | 33 | ||||
-rw-r--r-- | include/asm-avr32/setup.h | 4 | ||||
-rw-r--r-- | include/asm-avr32/termbits.h | 11 | ||||
-rw-r--r-- | include/asm-avr32/types.h | 5 | ||||
-rw-r--r-- | include/asm-avr32/unistd.h | 3 |
13 files changed, 139 insertions, 51 deletions
diff --git a/include/asm-avr32/arch-at32ap/at32ap7000.h b/include/asm-avr32/arch-at32ap/at32ap7000.h new file mode 100644 index 000000000000..ba85e04553d4 --- /dev/null +++ b/include/asm-avr32/arch-at32ap/at32ap7000.h | |||
@@ -0,0 +1,33 @@ | |||
1 | /* | ||
2 | * Pin definitions for AT32AP7000. | ||
3 | * | ||
4 | * Copyright (C) 2006 Atmel Corporation | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | #ifndef __ASM_ARCH_AT32AP7000_H__ | ||
11 | #define __ASM_ARCH_AT32AP7000_H__ | ||
12 | |||
13 | #define GPIO_PERIPH_A 0 | ||
14 | #define GPIO_PERIPH_B 1 | ||
15 | |||
16 | #define NR_GPIO_CONTROLLERS 4 | ||
17 | |||
18 | /* | ||
19 | * Pin numbers identifying specific GPIO pins on the chip. They can | ||
20 | * also be converted to IRQ numbers by passing them through | ||
21 | * gpio_to_irq(). | ||
22 | */ | ||
23 | #define GPIO_PIOA_BASE (0) | ||
24 | #define GPIO_PIOB_BASE (GPIO_PIOA_BASE + 32) | ||
25 | #define GPIO_PIOC_BASE (GPIO_PIOB_BASE + 32) | ||
26 | #define GPIO_PIOD_BASE (GPIO_PIOC_BASE + 32) | ||
27 | |||
28 | #define GPIO_PIN_PA(N) (GPIO_PIOA_BASE + (N)) | ||
29 | #define GPIO_PIN_PB(N) (GPIO_PIOB_BASE + (N)) | ||
30 | #define GPIO_PIN_PC(N) (GPIO_PIOC_BASE + (N)) | ||
31 | #define GPIO_PIN_PD(N) (GPIO_PIOD_BASE + (N)) | ||
32 | |||
33 | #endif /* __ASM_ARCH_AT32AP7000_H__ */ | ||
diff --git a/include/asm-avr32/arch-at32ap/at91rm9200_pdc.h b/include/asm-avr32/arch-at32ap/at91_pdc.h index ce1150d4438d..79d6e02fa45e 100644 --- a/include/asm-avr32/arch-at32ap/at91rm9200_pdc.h +++ b/include/asm-avr32/arch-at32ap/at91_pdc.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-arm/arch-at91rm9200/at91rm9200_pdc.h | 2 | * include/asm-arm/arch-at91rm9200/at91_pdc.h |
3 | * | 3 | * |
4 | * Copyright (C) 2005 Ivan Kokshaysky | 4 | * Copyright (C) 2005 Ivan Kokshaysky |
5 | * Copyright (C) SAN People | 5 | * Copyright (C) SAN People |
@@ -13,8 +13,8 @@ | |||
13 | * (at your option) any later version. | 13 | * (at your option) any later version. |
14 | */ | 14 | */ |
15 | 15 | ||
16 | #ifndef AT91RM9200_PDC_H | 16 | #ifndef AT91_PDC_H |
17 | #define AT91RM9200_PDC_H | 17 | #define AT91_PDC_H |
18 | 18 | ||
19 | #define AT91_PDC_RPR 0x100 /* Receive Pointer Register */ | 19 | #define AT91_PDC_RPR 0x100 /* Receive Pointer Register */ |
20 | #define AT91_PDC_RCR 0x104 /* Receive Counter Register */ | 20 | #define AT91_PDC_RCR 0x104 /* Receive Counter Register */ |
diff --git a/include/asm-avr32/arch-at32ap/board.h b/include/asm-avr32/arch-at32ap/board.h index a39b3e999f18..b120ee030c86 100644 --- a/include/asm-avr32/arch-at32ap/board.h +++ b/include/asm-avr32/arch-at32ap/board.h | |||
@@ -21,10 +21,7 @@ void at32_map_usart(unsigned int hw_id, unsigned int line); | |||
21 | struct platform_device *at32_add_device_usart(unsigned int id); | 21 | struct platform_device *at32_add_device_usart(unsigned int id); |
22 | 22 | ||
23 | struct eth_platform_data { | 23 | struct eth_platform_data { |
24 | u8 valid; | ||
25 | u8 mii_phy_addr; | ||
26 | u8 is_rmii; | 24 | u8 is_rmii; |
27 | u8 hw_addr[6]; | ||
28 | }; | 25 | }; |
29 | struct platform_device * | 26 | struct platform_device * |
30 | at32_add_device_eth(unsigned int id, struct eth_platform_data *data); | 27 | at32_add_device_eth(unsigned int id, struct eth_platform_data *data); |
diff --git a/include/asm-avr32/arch-at32ap/portmux.h b/include/asm-avr32/arch-at32ap/portmux.h index 4d50421262a1..83c690571322 100644 --- a/include/asm-avr32/arch-at32ap/portmux.h +++ b/include/asm-avr32/arch-at32ap/portmux.h | |||
@@ -7,10 +7,20 @@ | |||
7 | * it under the terms of the GNU General Public License version 2 as | 7 | * it under the terms of the GNU General Public License version 2 as |
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | */ | 9 | */ |
10 | #ifndef __ASM_AVR32_AT32_PORTMUX_H__ | 10 | #ifndef __ASM_ARCH_PORTMUX_H__ |
11 | #define __ASM_AVR32_AT32_PORTMUX_H__ | 11 | #define __ASM_ARCH_PORTMUX_H__ |
12 | 12 | ||
13 | void portmux_set_func(unsigned int portmux_id, unsigned int pin_id, | 13 | /* |
14 | unsigned int function_id); | 14 | * Set up pin multiplexing, called from board init only. |
15 | * | ||
16 | * The following flags determine the initial state of the pin. | ||
17 | */ | ||
18 | #define AT32_GPIOF_PULLUP 0x00000001 /* Enable pull-up */ | ||
19 | #define AT32_GPIOF_OUTPUT 0x00000002 /* Enable output driver */ | ||
20 | #define AT32_GPIOF_HIGH 0x00000004 /* Set output high */ | ||
21 | |||
22 | void at32_select_periph(unsigned int pin, unsigned int periph, | ||
23 | unsigned long flags); | ||
24 | void at32_select_gpio(unsigned int pin, unsigned long flags); | ||
15 | 25 | ||
16 | #endif /* __ASM_AVR32_AT32_PORTMUX_H__ */ | 26 | #endif /* __ASM_ARCH_PORTMUX_H__ */ |
diff --git a/include/asm-avr32/atomic.h b/include/asm-avr32/atomic.h index e0b9c44c126c..c40b6032c480 100644 --- a/include/asm-avr32/atomic.h +++ b/include/asm-avr32/atomic.h | |||
@@ -41,7 +41,7 @@ static inline int atomic_sub_return(int i, atomic_t *v) | |||
41 | " stcond %1, %0\n" | 41 | " stcond %1, %0\n" |
42 | " brne 1b" | 42 | " brne 1b" |
43 | : "=&r"(result), "=o"(v->counter) | 43 | : "=&r"(result), "=o"(v->counter) |
44 | : "m"(v->counter), "ir"(i) | 44 | : "m"(v->counter), "rKs21"(i) |
45 | : "cc"); | 45 | : "cc"); |
46 | 46 | ||
47 | return result; | 47 | return result; |
@@ -58,7 +58,7 @@ static inline int atomic_add_return(int i, atomic_t *v) | |||
58 | { | 58 | { |
59 | int result; | 59 | int result; |
60 | 60 | ||
61 | if (__builtin_constant_p(i)) | 61 | if (__builtin_constant_p(i) && (i >= -1048575) && (i <= 1048576)) |
62 | result = atomic_sub_return(-i, v); | 62 | result = atomic_sub_return(-i, v); |
63 | else | 63 | else |
64 | asm volatile( | 64 | asm volatile( |
@@ -101,7 +101,7 @@ static inline int atomic_sub_unless(atomic_t *v, int a, int u) | |||
101 | " mov %1, 1\n" | 101 | " mov %1, 1\n" |
102 | "1:" | 102 | "1:" |
103 | : "=&r"(tmp), "=&r"(result), "=o"(v->counter) | 103 | : "=&r"(tmp), "=&r"(result), "=o"(v->counter) |
104 | : "m"(v->counter), "ir"(a), "ir"(u) | 104 | : "m"(v->counter), "rKs21"(a), "rKs21"(u) |
105 | : "cc", "memory"); | 105 | : "cc", "memory"); |
106 | 106 | ||
107 | return result; | 107 | return result; |
@@ -121,7 +121,7 @@ static inline int atomic_add_unless(atomic_t *v, int a, int u) | |||
121 | { | 121 | { |
122 | int tmp, result; | 122 | int tmp, result; |
123 | 123 | ||
124 | if (__builtin_constant_p(a)) | 124 | if (__builtin_constant_p(a) && (a >= -1048575) && (a <= 1048576)) |
125 | result = atomic_sub_unless(v, -a, u); | 125 | result = atomic_sub_unless(v, -a, u); |
126 | else { | 126 | else { |
127 | result = 0; | 127 | result = 0; |
diff --git a/include/asm-avr32/checksum.h b/include/asm-avr32/checksum.h index 41b7af09edc4..af9d53f0f5d2 100644 --- a/include/asm-avr32/checksum.h +++ b/include/asm-avr32/checksum.h | |||
@@ -20,8 +20,7 @@ | |||
20 | * | 20 | * |
21 | * it's best to have buff aligned on a 32-bit boundary | 21 | * it's best to have buff aligned on a 32-bit boundary |
22 | */ | 22 | */ |
23 | unsigned int csum_partial(const unsigned char * buff, int len, | 23 | __wsum csum_partial(const void *buff, int len, __wsum sum); |
24 | unsigned int sum); | ||
25 | 24 | ||
26 | /* | 25 | /* |
27 | * the same as csum_partial, but copies from src while it | 26 | * the same as csum_partial, but copies from src while it |
@@ -30,8 +29,8 @@ unsigned int csum_partial(const unsigned char * buff, int len, | |||
30 | * here even more important to align src and dst on a 32-bit (or even | 29 | * here even more important to align src and dst on a 32-bit (or even |
31 | * better 64-bit) boundary | 30 | * better 64-bit) boundary |
32 | */ | 31 | */ |
33 | unsigned int csum_partial_copy_generic(const char *src, char *dst, int len, | 32 | __wsum csum_partial_copy_generic(const void *src, void *dst, int len, |
34 | int sum, int *src_err_ptr, | 33 | __wsum sum, int *src_err_ptr, |
35 | int *dst_err_ptr); | 34 | int *dst_err_ptr); |
36 | 35 | ||
37 | /* | 36 | /* |
@@ -42,17 +41,17 @@ unsigned int csum_partial_copy_generic(const char *src, char *dst, int len, | |||
42 | * verify_area(). | 41 | * verify_area(). |
43 | */ | 42 | */ |
44 | static inline | 43 | static inline |
45 | unsigned int csum_partial_copy_nocheck(const char *src, char *dst, | 44 | __wsum csum_partial_copy_nocheck(const void *src, void *dst, |
46 | int len, int sum) | 45 | int len, __wsum sum) |
47 | { | 46 | { |
48 | return csum_partial_copy_generic(src, dst, len, sum, NULL, NULL); | 47 | return csum_partial_copy_generic(src, dst, len, sum, NULL, NULL); |
49 | } | 48 | } |
50 | 49 | ||
51 | static inline | 50 | static inline |
52 | unsigned int csum_partial_copy_from_user (const char __user *src, char *dst, | 51 | __wsum csum_partial_copy_from_user(const void __user *src, void *dst, |
53 | int len, int sum, int *err_ptr) | 52 | int len, __wsum sum, int *err_ptr) |
54 | { | 53 | { |
55 | return csum_partial_copy_generic((const char __force *)src, dst, len, | 54 | return csum_partial_copy_generic((const void __force *)src, dst, len, |
56 | sum, err_ptr, NULL); | 55 | sum, err_ptr, NULL); |
57 | } | 56 | } |
58 | 57 | ||
@@ -60,8 +59,7 @@ unsigned int csum_partial_copy_from_user (const char __user *src, char *dst, | |||
60 | * This is a version of ip_compute_csum() optimized for IP headers, | 59 | * This is a version of ip_compute_csum() optimized for IP headers, |
61 | * which always checksum on 4 octet boundaries. | 60 | * which always checksum on 4 octet boundaries. |
62 | */ | 61 | */ |
63 | static inline unsigned short ip_fast_csum(unsigned char *iph, | 62 | static inline __sum16 ip_fast_csum(const void *iph, unsigned int ihl) |
64 | unsigned int ihl) | ||
65 | { | 63 | { |
66 | unsigned int sum, tmp; | 64 | unsigned int sum, tmp; |
67 | 65 | ||
@@ -90,14 +88,14 @@ static inline unsigned short ip_fast_csum(unsigned char *iph, | |||
90 | : "=r"(sum), "=r"(iph), "=r"(ihl), "=r"(tmp) | 88 | : "=r"(sum), "=r"(iph), "=r"(ihl), "=r"(tmp) |
91 | : "1"(iph), "2"(ihl) | 89 | : "1"(iph), "2"(ihl) |
92 | : "memory", "cc"); | 90 | : "memory", "cc"); |
93 | return sum; | 91 | return (__force __sum16)sum; |
94 | } | 92 | } |
95 | 93 | ||
96 | /* | 94 | /* |
97 | * Fold a partial checksum | 95 | * Fold a partial checksum |
98 | */ | 96 | */ |
99 | 97 | ||
100 | static inline unsigned int csum_fold(unsigned int sum) | 98 | static inline __sum16 csum_fold(__wsum sum) |
101 | { | 99 | { |
102 | unsigned int tmp; | 100 | unsigned int tmp; |
103 | 101 | ||
@@ -109,21 +107,20 @@ static inline unsigned int csum_fold(unsigned int sum) | |||
109 | : "=&r"(sum), "=&r"(tmp) | 107 | : "=&r"(sum), "=&r"(tmp) |
110 | : "0"(sum)); | 108 | : "0"(sum)); |
111 | 109 | ||
112 | return ~sum; | 110 | return (__force __sum16)~sum; |
113 | } | 111 | } |
114 | 112 | ||
115 | static inline unsigned long csum_tcpudp_nofold(unsigned long saddr, | 113 | static inline __wsum csum_tcpudp_nofold(__be32 saddr, __be32 daddr, |
116 | unsigned long daddr, | ||
117 | unsigned short len, | 114 | unsigned short len, |
118 | unsigned short proto, | 115 | unsigned short proto, |
119 | unsigned int sum) | 116 | __wsum sum) |
120 | { | 117 | { |
121 | asm(" add %0, %1\n" | 118 | asm(" add %0, %1\n" |
122 | " adc %0, %0, %2\n" | 119 | " adc %0, %0, %2\n" |
123 | " adc %0, %0, %3\n" | 120 | " adc %0, %0, %3\n" |
124 | " acr %0" | 121 | " acr %0" |
125 | : "=r"(sum) | 122 | : "=r"(sum) |
126 | : "r"(daddr), "r"(saddr), "r"(ntohs(len) | (proto << 16)), | 123 | : "r"(daddr), "r"(saddr), "r"(len + proto), |
127 | "0"(sum) | 124 | "0"(sum) |
128 | : "cc"); | 125 | : "cc"); |
129 | 126 | ||
@@ -134,11 +131,10 @@ static inline unsigned long csum_tcpudp_nofold(unsigned long saddr, | |||
134 | * computes the checksum of the TCP/UDP pseudo-header | 131 | * computes the checksum of the TCP/UDP pseudo-header |
135 | * returns a 16-bit checksum, already complemented | 132 | * returns a 16-bit checksum, already complemented |
136 | */ | 133 | */ |
137 | static inline unsigned short int csum_tcpudp_magic(unsigned long saddr, | 134 | static inline __sum16 csum_tcpudp_magic(__be32 saddr, __be32 daddr, |
138 | unsigned long daddr, | ||
139 | unsigned short len, | 135 | unsigned short len, |
140 | unsigned short proto, | 136 | unsigned short proto, |
141 | unsigned int sum) | 137 | __wsum sum) |
142 | { | 138 | { |
143 | return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum)); | 139 | return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum)); |
144 | } | 140 | } |
@@ -148,7 +144,7 @@ static inline unsigned short int csum_tcpudp_magic(unsigned long saddr, | |||
148 | * in icmp.c | 144 | * in icmp.c |
149 | */ | 145 | */ |
150 | 146 | ||
151 | static inline unsigned short ip_compute_csum(unsigned char * buff, int len) | 147 | static inline __sum16 ip_compute_csum(const void *buff, int len) |
152 | { | 148 | { |
153 | return csum_fold(csum_partial(buff, len, 0)); | 149 | return csum_fold(csum_partial(buff, len, 0)); |
154 | } | 150 | } |
diff --git a/include/asm-avr32/device.h b/include/asm-avr32/device.h new file mode 100644 index 000000000000..d8f9872b0e2d --- /dev/null +++ b/include/asm-avr32/device.h | |||
@@ -0,0 +1,7 @@ | |||
1 | /* | ||
2 | * Arch specific extensions to struct device | ||
3 | * | ||
4 | * This file is released under the GPLv2 | ||
5 | */ | ||
6 | #include <asm-generic/device.h> | ||
7 | |||
diff --git a/include/asm-avr32/dma-mapping.h b/include/asm-avr32/dma-mapping.h index 4c40cb41cdf8..5c01e27f0b41 100644 --- a/include/asm-avr32/dma-mapping.h +++ b/include/asm-avr32/dma-mapping.h | |||
@@ -8,7 +8,8 @@ | |||
8 | #include <asm/cacheflush.h> | 8 | #include <asm/cacheflush.h> |
9 | #include <asm/io.h> | 9 | #include <asm/io.h> |
10 | 10 | ||
11 | extern void dma_cache_sync(void *vaddr, size_t size, int direction); | 11 | extern void dma_cache_sync(struct device *dev, void *vaddr, size_t size, |
12 | int direction); | ||
12 | 13 | ||
13 | /* | 14 | /* |
14 | * Return whether the given device DMA address mask can be supported | 15 | * Return whether the given device DMA address mask can be supported |
@@ -108,7 +109,7 @@ static inline dma_addr_t | |||
108 | dma_map_single(struct device *dev, void *cpu_addr, size_t size, | 109 | dma_map_single(struct device *dev, void *cpu_addr, size_t size, |
109 | enum dma_data_direction direction) | 110 | enum dma_data_direction direction) |
110 | { | 111 | { |
111 | dma_cache_sync(cpu_addr, size, direction); | 112 | dma_cache_sync(dev, cpu_addr, size, direction); |
112 | return virt_to_bus(cpu_addr); | 113 | return virt_to_bus(cpu_addr); |
113 | } | 114 | } |
114 | 115 | ||
@@ -210,7 +211,7 @@ dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, | |||
210 | 211 | ||
211 | sg[i].dma_address = page_to_bus(sg[i].page) + sg[i].offset; | 212 | sg[i].dma_address = page_to_bus(sg[i].page) + sg[i].offset; |
212 | virt = page_address(sg[i].page) + sg[i].offset; | 213 | virt = page_address(sg[i].page) + sg[i].offset; |
213 | dma_cache_sync(virt, sg[i].length, direction); | 214 | dma_cache_sync(dev, virt, sg[i].length, direction); |
214 | } | 215 | } |
215 | 216 | ||
216 | return nents; | 217 | return nents; |
@@ -255,14 +256,14 @@ static inline void | |||
255 | dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle, | 256 | dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle, |
256 | size_t size, enum dma_data_direction direction) | 257 | size_t size, enum dma_data_direction direction) |
257 | { | 258 | { |
258 | dma_cache_sync(bus_to_virt(dma_handle), size, direction); | 259 | dma_cache_sync(dev, bus_to_virt(dma_handle), size, direction); |
259 | } | 260 | } |
260 | 261 | ||
261 | static inline void | 262 | static inline void |
262 | dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle, | 263 | dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle, |
263 | size_t size, enum dma_data_direction direction) | 264 | size_t size, enum dma_data_direction direction) |
264 | { | 265 | { |
265 | dma_cache_sync(bus_to_virt(dma_handle), size, direction); | 266 | dma_cache_sync(dev, bus_to_virt(dma_handle), size, direction); |
266 | } | 267 | } |
267 | 268 | ||
268 | /** | 269 | /** |
@@ -285,7 +286,7 @@ dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, | |||
285 | int i; | 286 | int i; |
286 | 287 | ||
287 | for (i = 0; i < nents; i++) { | 288 | for (i = 0; i < nents; i++) { |
288 | dma_cache_sync(page_address(sg[i].page) + sg[i].offset, | 289 | dma_cache_sync(dev, page_address(sg[i].page) + sg[i].offset, |
289 | sg[i].length, direction); | 290 | sg[i].length, direction); |
290 | } | 291 | } |
291 | } | 292 | } |
@@ -297,7 +298,7 @@ dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, | |||
297 | int i; | 298 | int i; |
298 | 299 | ||
299 | for (i = 0; i < nents; i++) { | 300 | for (i = 0; i < nents; i++) { |
300 | dma_cache_sync(page_address(sg[i].page) + sg[i].offset, | 301 | dma_cache_sync(dev, page_address(sg[i].page) + sg[i].offset, |
301 | sg[i].length, direction); | 302 | sg[i].length, direction); |
302 | } | 303 | } |
303 | } | 304 | } |
@@ -307,7 +308,7 @@ dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, | |||
307 | #define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f) | 308 | #define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f) |
308 | #define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) | 309 | #define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) |
309 | 310 | ||
310 | static inline int dma_is_consistent(dma_addr_t dma_addr) | 311 | static inline int dma_is_consistent(struct device *dev, dma_addr_t dma_addr) |
311 | { | 312 | { |
312 | return 1; | 313 | return 1; |
313 | } | 314 | } |
diff --git a/include/asm-avr32/io.h b/include/asm-avr32/io.h index 2fc8f111dce9..eec47500fa66 100644 --- a/include/asm-avr32/io.h +++ b/include/asm-avr32/io.h | |||
@@ -76,6 +76,39 @@ static inline unsigned int readl(const volatile void __iomem *addr) | |||
76 | #define readsw(p, d, l) __raw_readsw((unsigned int)p, d, l) | 76 | #define readsw(p, d, l) __raw_readsw((unsigned int)p, d, l) |
77 | #define readsl(p, d, l) __raw_readsl((unsigned int)p, d, l) | 77 | #define readsl(p, d, l) __raw_readsl((unsigned int)p, d, l) |
78 | 78 | ||
79 | |||
80 | /* | ||
81 | * io{read,write}{8,16,32} macros in both le (for PCI style consumers) and native be | ||
82 | */ | ||
83 | #ifndef ioread8 | ||
84 | |||
85 | #define ioread8(p) ({ unsigned int __v = __raw_readb(p); __v; }) | ||
86 | |||
87 | #define ioread16(p) ({ unsigned int __v = le16_to_cpu(__raw_readw(p)); __v; }) | ||
88 | #define ioread16be(p) ({ unsigned int __v = be16_to_cpu(__raw_readw(p)); __v; }) | ||
89 | |||
90 | #define ioread32(p) ({ unsigned int __v = le32_to_cpu(__raw_readl(p)); __v; }) | ||
91 | #define ioread32be(p) ({ unsigned int __v = be32_to_cpu(__raw_readl(p)); __v; }) | ||
92 | |||
93 | #define iowrite8(v,p) __raw_writeb(v, p) | ||
94 | |||
95 | #define iowrite16(v,p) __raw_writew(cpu_to_le16(v), p) | ||
96 | #define iowrite16be(v,p) __raw_writew(cpu_to_be16(v), p) | ||
97 | |||
98 | #define iowrite32(v,p) __raw_writel(cpu_to_le32(v), p) | ||
99 | #define iowrite32be(v,p) __raw_writel(cpu_to_be32(v), p) | ||
100 | |||
101 | #define ioread8_rep(p,d,c) __raw_readsb(p,d,c) | ||
102 | #define ioread16_rep(p,d,c) __raw_readsw(p,d,c) | ||
103 | #define ioread32_rep(p,d,c) __raw_readsl(p,d,c) | ||
104 | |||
105 | #define iowrite8_rep(p,s,c) __raw_writesb(p,s,c) | ||
106 | #define iowrite16_rep(p,s,c) __raw_writesw(p,s,c) | ||
107 | #define iowrite32_rep(p,s,c) __raw_writesl(p,s,c) | ||
108 | |||
109 | #endif | ||
110 | |||
111 | |||
79 | /* | 112 | /* |
80 | * These two are only here because ALSA _thinks_ it needs them... | 113 | * These two are only here because ALSA _thinks_ it needs them... |
81 | */ | 114 | */ |
diff --git a/include/asm-avr32/setup.h b/include/asm-avr32/setup.h index 10193da4113b..0a5224245e44 100644 --- a/include/asm-avr32/setup.h +++ b/include/asm-avr32/setup.h | |||
@@ -13,6 +13,8 @@ | |||
13 | 13 | ||
14 | #define COMMAND_LINE_SIZE 256 | 14 | #define COMMAND_LINE_SIZE 256 |
15 | 15 | ||
16 | #ifdef __KERNEL__ | ||
17 | |||
16 | /* Magic number indicating that a tag table is present */ | 18 | /* Magic number indicating that a tag table is present */ |
17 | #define ATAG_MAGIC 0xa2a25441 | 19 | #define ATAG_MAGIC 0xa2a25441 |
18 | 20 | ||
@@ -138,4 +140,6 @@ void chip_enable_sdram(void); | |||
138 | 140 | ||
139 | #endif /* !__ASSEMBLY__ */ | 141 | #endif /* !__ASSEMBLY__ */ |
140 | 142 | ||
143 | #endif /* __KERNEL__ */ | ||
144 | |||
141 | #endif /* __ASM_AVR32_SETUP_H__ */ | 145 | #endif /* __ASM_AVR32_SETUP_H__ */ |
diff --git a/include/asm-avr32/termbits.h b/include/asm-avr32/termbits.h index 9dc6eacafa33..c215fafdae4d 100644 --- a/include/asm-avr32/termbits.h +++ b/include/asm-avr32/termbits.h | |||
@@ -17,6 +17,17 @@ struct termios { | |||
17 | cc_t c_cc[NCCS]; /* control characters */ | 17 | cc_t c_cc[NCCS]; /* control characters */ |
18 | }; | 18 | }; |
19 | 19 | ||
20 | struct ktermios { | ||
21 | tcflag_t c_iflag; /* input mode flags */ | ||
22 | tcflag_t c_oflag; /* output mode flags */ | ||
23 | tcflag_t c_cflag; /* control mode flags */ | ||
24 | tcflag_t c_lflag; /* local mode flags */ | ||
25 | cc_t c_line; /* line discipline */ | ||
26 | cc_t c_cc[NCCS]; /* control characters */ | ||
27 | speed_t c_ispeed; /* input speed */ | ||
28 | speed_t c_ospeed; /* output speed */ | ||
29 | }; | ||
30 | |||
20 | /* c_cc characters */ | 31 | /* c_cc characters */ |
21 | #define VINTR 0 | 32 | #define VINTR 0 |
22 | #define VQUIT 1 | 33 | #define VQUIT 1 |
diff --git a/include/asm-avr32/types.h b/include/asm-avr32/types.h index 3f47db9675af..2bff153a32ed 100644 --- a/include/asm-avr32/types.h +++ b/include/asm-avr32/types.h | |||
@@ -57,11 +57,6 @@ typedef unsigned long long u64; | |||
57 | 57 | ||
58 | typedef u32 dma_addr_t; | 58 | typedef u32 dma_addr_t; |
59 | 59 | ||
60 | #ifdef CONFIG_LBD | ||
61 | typedef u64 sector_t; | ||
62 | #define HAVE_SECTOR_T | ||
63 | #endif | ||
64 | |||
65 | #endif /* __ASSEMBLY__ */ | 60 | #endif /* __ASSEMBLY__ */ |
66 | 61 | ||
67 | #endif /* __KERNEL__ */ | 62 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-avr32/unistd.h b/include/asm-avr32/unistd.h index a50e5004550c..56ed1f9d348a 100644 --- a/include/asm-avr32/unistd.h +++ b/include/asm-avr32/unistd.h | |||
@@ -280,9 +280,10 @@ | |||
280 | #define __NR_sync_file_range 262 | 280 | #define __NR_sync_file_range 262 |
281 | #define __NR_tee 263 | 281 | #define __NR_tee 263 |
282 | #define __NR_vmsplice 264 | 282 | #define __NR_vmsplice 264 |
283 | #define __NR_epoll_pwait 265 | ||
283 | 284 | ||
284 | #ifdef __KERNEL__ | 285 | #ifdef __KERNEL__ |
285 | #define NR_syscalls 265 | 286 | #define NR_syscalls 266 |
286 | 287 | ||
287 | 288 | ||
288 | #define __ARCH_WANT_IPC_PARSE_VERSION | 289 | #define __ARCH_WANT_IPC_PARSE_VERSION |