diff options
author | Dmitry Torokhov <dtor@insightbb.com> | 2006-12-08 01:07:56 -0500 |
---|---|---|
committer | Dmitry Torokhov <dtor@insightbb.com> | 2006-12-08 01:07:56 -0500 |
commit | bef986502fa398b1785a3979b1aa17cd902d3527 (patch) | |
tree | b59c1afe7b1dfcc001b86e54863f550d7ddc8c34 /include/asm-avr32 | |
parent | 4bdbd2807deeccc0793d57fb5120d7a53f2c0b3c (diff) | |
parent | c99767974ebd2a719d849fdeaaa1674456f5283f (diff) |
Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
drivers/usb/input/hid.h
Diffstat (limited to 'include/asm-avr32')
-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/checksum.h | 40 | ||||
-rw-r--r-- | include/asm-avr32/device.h | 7 | ||||
-rw-r--r-- | include/asm-avr32/dma-mapping.h | 5 | ||||
-rw-r--r-- | include/asm-avr32/setup.h | 4 | ||||
-rw-r--r-- | include/asm-avr32/types.h | 5 | ||||
-rw-r--r-- | include/asm-avr32/unistd.h | 3 |
7 files changed, 37 insertions, 33 deletions
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/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..0580b5d62bba 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 |
@@ -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/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/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 |