diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2009-06-08 14:27:13 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-06-08 14:27:13 -0400 |
commit | 7698fdedcfa3cab3dd40c9b685590b23be02e267 (patch) | |
tree | 207ddae0f963174356b1a9de7fff8e48a9c1e9c1 /arch/arm | |
parent | 2d8d24935d372175786ebefa8a2de8680831b67f (diff) | |
parent | ae5c8c83735f5fcb09b380944e4854a383006998 (diff) |
Merge branch 'for-rmk' of git://git.marvell.com/orion into devel
Diffstat (limited to 'arch/arm')
61 files changed, 1279 insertions, 318 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 28248b5d6a70..646a5d5eb8c1 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -394,6 +394,7 @@ config ARCH_KIRKWOOD | |||
394 | select CPU_FEROCEON | 394 | select CPU_FEROCEON |
395 | select PCI | 395 | select PCI |
396 | select GENERIC_GPIO | 396 | select GENERIC_GPIO |
397 | select ARCH_REQUIRE_GPIOLIB | ||
397 | select GENERIC_TIME | 398 | select GENERIC_TIME |
398 | select GENERIC_CLOCKEVENTS | 399 | select GENERIC_CLOCKEVENTS |
399 | select PLAT_ORION | 400 | select PLAT_ORION |
@@ -415,6 +416,7 @@ config ARCH_MV78XX0 | |||
415 | select CPU_FEROCEON | 416 | select CPU_FEROCEON |
416 | select PCI | 417 | select PCI |
417 | select GENERIC_GPIO | 418 | select GENERIC_GPIO |
419 | select ARCH_REQUIRE_GPIOLIB | ||
418 | select GENERIC_TIME | 420 | select GENERIC_TIME |
419 | select GENERIC_CLOCKEVENTS | 421 | select GENERIC_CLOCKEVENTS |
420 | select PLAT_ORION | 422 | select PLAT_ORION |
@@ -428,6 +430,7 @@ config ARCH_ORION5X | |||
428 | select CPU_FEROCEON | 430 | select CPU_FEROCEON |
429 | select PCI | 431 | select PCI |
430 | select GENERIC_GPIO | 432 | select GENERIC_GPIO |
433 | select ARCH_REQUIRE_GPIOLIB | ||
431 | select GENERIC_TIME | 434 | select GENERIC_TIME |
432 | select GENERIC_CLOCKEVENTS | 435 | select GENERIC_CLOCKEVENTS |
433 | select PLAT_ORION | 436 | select PLAT_ORION |
diff --git a/arch/arm/configs/kirkwood_defconfig b/arch/arm/configs/kirkwood_defconfig index dcf8153a947d..0a1abb978d7e 100644 --- a/arch/arm/configs/kirkwood_defconfig +++ b/arch/arm/configs/kirkwood_defconfig | |||
@@ -182,6 +182,7 @@ CONFIG_ARCH_KIRKWOOD=y | |||
182 | CONFIG_MACH_DB88F6281_BP=y | 182 | CONFIG_MACH_DB88F6281_BP=y |
183 | CONFIG_MACH_RD88F6192_NAS=y | 183 | CONFIG_MACH_RD88F6192_NAS=y |
184 | CONFIG_MACH_RD88F6281=y | 184 | CONFIG_MACH_RD88F6281=y |
185 | CONFIG_MACH_MV88F6281GTW_GE=y | ||
185 | CONFIG_MACH_SHEEVAPLUG=y | 186 | CONFIG_MACH_SHEEVAPLUG=y |
186 | CONFIG_MACH_TS219=y | 187 | CONFIG_MACH_TS219=y |
187 | CONFIG_PLAT_ORION=y | 188 | CONFIG_PLAT_ORION=y |
@@ -270,7 +271,9 @@ CONFIG_CMDLINE="" | |||
270 | # | 271 | # |
271 | # CPU Power Management | 272 | # CPU Power Management |
272 | # | 273 | # |
273 | # CONFIG_CPU_IDLE is not set | 274 | CONFIG_CPU_IDLE=y |
275 | CONFIG_CPU_IDLE_GOV_LADDER=y | ||
276 | CONFIG_CPU_IDLE_GOV_MENU=y | ||
274 | 277 | ||
275 | # | 278 | # |
276 | # Floating point emulation | 279 | # Floating point emulation |
diff --git a/arch/arm/configs/orion5x_defconfig b/arch/arm/configs/orion5x_defconfig index 5b98f7645119..9e2385293ecb 100644 --- a/arch/arm/configs/orion5x_defconfig +++ b/arch/arm/configs/orion5x_defconfig | |||
@@ -903,7 +903,8 @@ CONFIG_UNIX98_PTYS=y | |||
903 | CONFIG_LEGACY_PTYS=y | 903 | CONFIG_LEGACY_PTYS=y |
904 | CONFIG_LEGACY_PTY_COUNT=16 | 904 | CONFIG_LEGACY_PTY_COUNT=16 |
905 | # CONFIG_IPMI_HANDLER is not set | 905 | # CONFIG_IPMI_HANDLER is not set |
906 | # CONFIG_HW_RANDOM is not set | 906 | CONFIG_HW_RANDOM=m |
907 | CONFIG_HW_RANDOM_TIMERIOMEM=m | ||
907 | # CONFIG_R3964 is not set | 908 | # CONFIG_R3964 is not set |
908 | # CONFIG_APPLICOM is not set | 909 | # CONFIG_APPLICOM is not set |
909 | # CONFIG_RAW_DRIVER is not set | 910 | # CONFIG_RAW_DRIVER is not set |
diff --git a/arch/arm/include/asm/assembler.h b/arch/arm/include/asm/assembler.h index 6116e4893c0a..15f8a092b700 100644 --- a/arch/arm/include/asm/assembler.h +++ b/arch/arm/include/asm/assembler.h | |||
@@ -114,3 +114,16 @@ | |||
114 | .align 3; \ | 114 | .align 3; \ |
115 | .long 9999b,9001f; \ | 115 | .long 9999b,9001f; \ |
116 | .previous | 116 | .previous |
117 | |||
118 | /* | ||
119 | * SMP data memory barrier | ||
120 | */ | ||
121 | .macro smp_dmb | ||
122 | #ifdef CONFIG_SMP | ||
123 | #if __LINUX_ARM_ARCH__ >= 7 | ||
124 | dmb | ||
125 | #elif __LINUX_ARM_ARCH__ == 6 | ||
126 | mcr p15, 0, r0, c7, c10, 5 @ dmb | ||
127 | #endif | ||
128 | #endif | ||
129 | .endm | ||
diff --git a/arch/arm/include/asm/atomic.h b/arch/arm/include/asm/atomic.h index ee99723b3a6c..16b52f397983 100644 --- a/arch/arm/include/asm/atomic.h +++ b/arch/arm/include/asm/atomic.h | |||
@@ -44,11 +44,29 @@ static inline void atomic_set(atomic_t *v, int i) | |||
44 | : "cc"); | 44 | : "cc"); |
45 | } | 45 | } |
46 | 46 | ||
47 | static inline void atomic_add(int i, atomic_t *v) | ||
48 | { | ||
49 | unsigned long tmp; | ||
50 | int result; | ||
51 | |||
52 | __asm__ __volatile__("@ atomic_add\n" | ||
53 | "1: ldrex %0, [%2]\n" | ||
54 | " add %0, %0, %3\n" | ||
55 | " strex %1, %0, [%2]\n" | ||
56 | " teq %1, #0\n" | ||
57 | " bne 1b" | ||
58 | : "=&r" (result), "=&r" (tmp) | ||
59 | : "r" (&v->counter), "Ir" (i) | ||
60 | : "cc"); | ||
61 | } | ||
62 | |||
47 | static inline int atomic_add_return(int i, atomic_t *v) | 63 | static inline int atomic_add_return(int i, atomic_t *v) |
48 | { | 64 | { |
49 | unsigned long tmp; | 65 | unsigned long tmp; |
50 | int result; | 66 | int result; |
51 | 67 | ||
68 | smp_mb(); | ||
69 | |||
52 | __asm__ __volatile__("@ atomic_add_return\n" | 70 | __asm__ __volatile__("@ atomic_add_return\n" |
53 | "1: ldrex %0, [%2]\n" | 71 | "1: ldrex %0, [%2]\n" |
54 | " add %0, %0, %3\n" | 72 | " add %0, %0, %3\n" |
@@ -59,14 +77,34 @@ static inline int atomic_add_return(int i, atomic_t *v) | |||
59 | : "r" (&v->counter), "Ir" (i) | 77 | : "r" (&v->counter), "Ir" (i) |
60 | : "cc"); | 78 | : "cc"); |
61 | 79 | ||
80 | smp_mb(); | ||
81 | |||
62 | return result; | 82 | return result; |
63 | } | 83 | } |
64 | 84 | ||
85 | static inline void atomic_sub(int i, atomic_t *v) | ||
86 | { | ||
87 | unsigned long tmp; | ||
88 | int result; | ||
89 | |||
90 | __asm__ __volatile__("@ atomic_sub\n" | ||
91 | "1: ldrex %0, [%2]\n" | ||
92 | " sub %0, %0, %3\n" | ||
93 | " strex %1, %0, [%2]\n" | ||
94 | " teq %1, #0\n" | ||
95 | " bne 1b" | ||
96 | : "=&r" (result), "=&r" (tmp) | ||
97 | : "r" (&v->counter), "Ir" (i) | ||
98 | : "cc"); | ||
99 | } | ||
100 | |||
65 | static inline int atomic_sub_return(int i, atomic_t *v) | 101 | static inline int atomic_sub_return(int i, atomic_t *v) |
66 | { | 102 | { |
67 | unsigned long tmp; | 103 | unsigned long tmp; |
68 | int result; | 104 | int result; |
69 | 105 | ||
106 | smp_mb(); | ||
107 | |||
70 | __asm__ __volatile__("@ atomic_sub_return\n" | 108 | __asm__ __volatile__("@ atomic_sub_return\n" |
71 | "1: ldrex %0, [%2]\n" | 109 | "1: ldrex %0, [%2]\n" |
72 | " sub %0, %0, %3\n" | 110 | " sub %0, %0, %3\n" |
@@ -77,6 +115,8 @@ static inline int atomic_sub_return(int i, atomic_t *v) | |||
77 | : "r" (&v->counter), "Ir" (i) | 115 | : "r" (&v->counter), "Ir" (i) |
78 | : "cc"); | 116 | : "cc"); |
79 | 117 | ||
118 | smp_mb(); | ||
119 | |||
80 | return result; | 120 | return result; |
81 | } | 121 | } |
82 | 122 | ||
@@ -84,6 +124,8 @@ static inline int atomic_cmpxchg(atomic_t *ptr, int old, int new) | |||
84 | { | 124 | { |
85 | unsigned long oldval, res; | 125 | unsigned long oldval, res; |
86 | 126 | ||
127 | smp_mb(); | ||
128 | |||
87 | do { | 129 | do { |
88 | __asm__ __volatile__("@ atomic_cmpxchg\n" | 130 | __asm__ __volatile__("@ atomic_cmpxchg\n" |
89 | "ldrex %1, [%2]\n" | 131 | "ldrex %1, [%2]\n" |
@@ -95,6 +137,8 @@ static inline int atomic_cmpxchg(atomic_t *ptr, int old, int new) | |||
95 | : "cc"); | 137 | : "cc"); |
96 | } while (res); | 138 | } while (res); |
97 | 139 | ||
140 | smp_mb(); | ||
141 | |||
98 | return oldval; | 142 | return oldval; |
99 | } | 143 | } |
100 | 144 | ||
@@ -135,6 +179,7 @@ static inline int atomic_add_return(int i, atomic_t *v) | |||
135 | 179 | ||
136 | return val; | 180 | return val; |
137 | } | 181 | } |
182 | #define atomic_add(i, v) (void) atomic_add_return(i, v) | ||
138 | 183 | ||
139 | static inline int atomic_sub_return(int i, atomic_t *v) | 184 | static inline int atomic_sub_return(int i, atomic_t *v) |
140 | { | 185 | { |
@@ -148,6 +193,7 @@ static inline int atomic_sub_return(int i, atomic_t *v) | |||
148 | 193 | ||
149 | return val; | 194 | return val; |
150 | } | 195 | } |
196 | #define atomic_sub(i, v) (void) atomic_sub_return(i, v) | ||
151 | 197 | ||
152 | static inline int atomic_cmpxchg(atomic_t *v, int old, int new) | 198 | static inline int atomic_cmpxchg(atomic_t *v, int old, int new) |
153 | { | 199 | { |
@@ -187,10 +233,8 @@ static inline int atomic_add_unless(atomic_t *v, int a, int u) | |||
187 | } | 233 | } |
188 | #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) | 234 | #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) |
189 | 235 | ||
190 | #define atomic_add(i, v) (void) atomic_add_return(i, v) | 236 | #define atomic_inc(v) atomic_add(1, v) |
191 | #define atomic_inc(v) (void) atomic_add_return(1, v) | 237 | #define atomic_dec(v) atomic_sub(1, v) |
192 | #define atomic_sub(i, v) (void) atomic_sub_return(i, v) | ||
193 | #define atomic_dec(v) (void) atomic_sub_return(1, v) | ||
194 | 238 | ||
195 | #define atomic_inc_and_test(v) (atomic_add_return(1, v) == 0) | 239 | #define atomic_inc_and_test(v) (atomic_add_return(1, v) == 0) |
196 | #define atomic_dec_and_test(v) (atomic_sub_return(1, v) == 0) | 240 | #define atomic_dec_and_test(v) (atomic_sub_return(1, v) == 0) |
@@ -200,11 +244,10 @@ static inline int atomic_add_unless(atomic_t *v, int a, int u) | |||
200 | 244 | ||
201 | #define atomic_add_negative(i,v) (atomic_add_return(i, v) < 0) | 245 | #define atomic_add_negative(i,v) (atomic_add_return(i, v) < 0) |
202 | 246 | ||
203 | /* Atomic operations are already serializing on ARM */ | 247 | #define smp_mb__before_atomic_dec() smp_mb() |
204 | #define smp_mb__before_atomic_dec() barrier() | 248 | #define smp_mb__after_atomic_dec() smp_mb() |
205 | #define smp_mb__after_atomic_dec() barrier() | 249 | #define smp_mb__before_atomic_inc() smp_mb() |
206 | #define smp_mb__before_atomic_inc() barrier() | 250 | #define smp_mb__after_atomic_inc() smp_mb() |
207 | #define smp_mb__after_atomic_inc() barrier() | ||
208 | 251 | ||
209 | #include <asm-generic/atomic.h> | 252 | #include <asm-generic/atomic.h> |
210 | #endif | 253 | #endif |
diff --git a/arch/arm/include/asm/flat.h b/arch/arm/include/asm/flat.h index 1d77e51907f6..59426a4595c9 100644 --- a/arch/arm/include/asm/flat.h +++ b/arch/arm/include/asm/flat.h | |||
@@ -5,9 +5,6 @@ | |||
5 | #ifndef __ARM_FLAT_H__ | 5 | #ifndef __ARM_FLAT_H__ |
6 | #define __ARM_FLAT_H__ | 6 | #define __ARM_FLAT_H__ |
7 | 7 | ||
8 | /* An odd number of words will be pushed after this alignment, so | ||
9 | deliberately misalign the value. */ | ||
10 | #define flat_stack_align(sp) sp = (void *)(((unsigned long)(sp) - 4) | 4) | ||
11 | #define flat_argvp_envp_on_stack() 1 | 8 | #define flat_argvp_envp_on_stack() 1 |
12 | #define flat_old_ram_flag(flags) (flags) | 9 | #define flat_old_ram_flag(flags) (flags) |
13 | #define flat_reloc_valid(reloc, size) ((reloc) <= (size)) | 10 | #define flat_reloc_valid(reloc, size) ((reloc) <= (size)) |
diff --git a/arch/arm/include/asm/sizes.h b/arch/arm/include/asm/sizes.h index ada93a8fc2ef..4fc1565e4f93 100644 --- a/arch/arm/include/asm/sizes.h +++ b/arch/arm/include/asm/sizes.h | |||
@@ -29,6 +29,7 @@ | |||
29 | #define SZ_512 0x00000200 | 29 | #define SZ_512 0x00000200 |
30 | 30 | ||
31 | #define SZ_1K 0x00000400 | 31 | #define SZ_1K 0x00000400 |
32 | #define SZ_2K 0x00000800 | ||
32 | #define SZ_4K 0x00001000 | 33 | #define SZ_4K 0x00001000 |
33 | #define SZ_8K 0x00002000 | 34 | #define SZ_8K 0x00002000 |
34 | #define SZ_16K 0x00004000 | 35 | #define SZ_16K 0x00004000 |
diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h index bd4dc8ed53d5..d65b2f5bf41f 100644 --- a/arch/arm/include/asm/system.h +++ b/arch/arm/include/asm/system.h | |||
@@ -248,6 +248,8 @@ static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size | |||
248 | unsigned int tmp; | 248 | unsigned int tmp; |
249 | #endif | 249 | #endif |
250 | 250 | ||
251 | smp_mb(); | ||
252 | |||
251 | switch (size) { | 253 | switch (size) { |
252 | #if __LINUX_ARM_ARCH__ >= 6 | 254 | #if __LINUX_ARM_ARCH__ >= 6 |
253 | case 1: | 255 | case 1: |
@@ -307,6 +309,7 @@ static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size | |||
307 | __bad_xchg(ptr, size), ret = 0; | 309 | __bad_xchg(ptr, size), ret = 0; |
308 | break; | 310 | break; |
309 | } | 311 | } |
312 | smp_mb(); | ||
310 | 313 | ||
311 | return ret; | 314 | return ret; |
312 | } | 315 | } |
@@ -316,6 +319,12 @@ extern void enable_hlt(void); | |||
316 | 319 | ||
317 | #include <asm-generic/cmpxchg-local.h> | 320 | #include <asm-generic/cmpxchg-local.h> |
318 | 321 | ||
322 | #if __LINUX_ARM_ARCH__ < 6 | ||
323 | |||
324 | #ifdef CONFIG_SMP | ||
325 | #error "SMP is not supported on this platform" | ||
326 | #endif | ||
327 | |||
319 | /* | 328 | /* |
320 | * cmpxchg_local and cmpxchg64_local are atomic wrt current CPU. Always make | 329 | * cmpxchg_local and cmpxchg64_local are atomic wrt current CPU. Always make |
321 | * them available. | 330 | * them available. |
@@ -329,6 +338,173 @@ extern void enable_hlt(void); | |||
329 | #include <asm-generic/cmpxchg.h> | 338 | #include <asm-generic/cmpxchg.h> |
330 | #endif | 339 | #endif |
331 | 340 | ||
341 | #else /* __LINUX_ARM_ARCH__ >= 6 */ | ||
342 | |||
343 | extern void __bad_cmpxchg(volatile void *ptr, int size); | ||
344 | |||
345 | /* | ||
346 | * cmpxchg only support 32-bits operands on ARMv6. | ||
347 | */ | ||
348 | |||
349 | static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old, | ||
350 | unsigned long new, int size) | ||
351 | { | ||
352 | unsigned long oldval, res; | ||
353 | |||
354 | switch (size) { | ||
355 | #ifdef CONFIG_CPU_32v6K | ||
356 | case 1: | ||
357 | do { | ||
358 | asm volatile("@ __cmpxchg1\n" | ||
359 | " ldrexb %1, [%2]\n" | ||
360 | " mov %0, #0\n" | ||
361 | " teq %1, %3\n" | ||
362 | " strexbeq %0, %4, [%2]\n" | ||
363 | : "=&r" (res), "=&r" (oldval) | ||
364 | : "r" (ptr), "Ir" (old), "r" (new) | ||
365 | : "memory", "cc"); | ||
366 | } while (res); | ||
367 | break; | ||
368 | case 2: | ||
369 | do { | ||
370 | asm volatile("@ __cmpxchg1\n" | ||
371 | " ldrexh %1, [%2]\n" | ||
372 | " mov %0, #0\n" | ||
373 | " teq %1, %3\n" | ||
374 | " strexheq %0, %4, [%2]\n" | ||
375 | : "=&r" (res), "=&r" (oldval) | ||
376 | : "r" (ptr), "Ir" (old), "r" (new) | ||
377 | : "memory", "cc"); | ||
378 | } while (res); | ||
379 | break; | ||
380 | #endif /* CONFIG_CPU_32v6K */ | ||
381 | case 4: | ||
382 | do { | ||
383 | asm volatile("@ __cmpxchg4\n" | ||
384 | " ldrex %1, [%2]\n" | ||
385 | " mov %0, #0\n" | ||
386 | " teq %1, %3\n" | ||
387 | " strexeq %0, %4, [%2]\n" | ||
388 | : "=&r" (res), "=&r" (oldval) | ||
389 | : "r" (ptr), "Ir" (old), "r" (new) | ||
390 | : "memory", "cc"); | ||
391 | } while (res); | ||
392 | break; | ||
393 | default: | ||
394 | __bad_cmpxchg(ptr, size); | ||
395 | oldval = 0; | ||
396 | } | ||
397 | |||
398 | return oldval; | ||
399 | } | ||
400 | |||
401 | static inline unsigned long __cmpxchg_mb(volatile void *ptr, unsigned long old, | ||
402 | unsigned long new, int size) | ||
403 | { | ||
404 | unsigned long ret; | ||
405 | |||
406 | smp_mb(); | ||
407 | ret = __cmpxchg(ptr, old, new, size); | ||
408 | smp_mb(); | ||
409 | |||
410 | return ret; | ||
411 | } | ||
412 | |||
413 | #define cmpxchg(ptr,o,n) \ | ||
414 | ((__typeof__(*(ptr)))__cmpxchg_mb((ptr), \ | ||
415 | (unsigned long)(o), \ | ||
416 | (unsigned long)(n), \ | ||
417 | sizeof(*(ptr)))) | ||
418 | |||
419 | static inline unsigned long __cmpxchg_local(volatile void *ptr, | ||
420 | unsigned long old, | ||
421 | unsigned long new, int size) | ||
422 | { | ||
423 | unsigned long ret; | ||
424 | |||
425 | switch (size) { | ||
426 | #ifndef CONFIG_CPU_32v6K | ||
427 | case 1: | ||
428 | case 2: | ||
429 | ret = __cmpxchg_local_generic(ptr, old, new, size); | ||
430 | break; | ||
431 | #endif /* !CONFIG_CPU_32v6K */ | ||
432 | default: | ||
433 | ret = __cmpxchg(ptr, old, new, size); | ||
434 | } | ||
435 | |||
436 | return ret; | ||
437 | } | ||
438 | |||
439 | #define cmpxchg_local(ptr,o,n) \ | ||
440 | ((__typeof__(*(ptr)))__cmpxchg_local((ptr), \ | ||
441 | (unsigned long)(o), \ | ||
442 | (unsigned long)(n), \ | ||
443 | sizeof(*(ptr)))) | ||
444 | |||
445 | #ifdef CONFIG_CPU_32v6K | ||
446 | |||
447 | /* | ||
448 | * Note : ARMv7-M (currently unsupported by Linux) does not support | ||
449 | * ldrexd/strexd. If ARMv7-M is ever supported by the Linux kernel, it should | ||
450 | * not be allowed to use __cmpxchg64. | ||
451 | */ | ||
452 | static inline unsigned long long __cmpxchg64(volatile void *ptr, | ||
453 | unsigned long long old, | ||
454 | unsigned long long new) | ||
455 | { | ||
456 | register unsigned long long oldval asm("r0"); | ||
457 | register unsigned long long __old asm("r2") = old; | ||
458 | register unsigned long long __new asm("r4") = new; | ||
459 | unsigned long res; | ||
460 | |||
461 | do { | ||
462 | asm volatile( | ||
463 | " @ __cmpxchg8\n" | ||
464 | " ldrexd %1, %H1, [%2]\n" | ||
465 | " mov %0, #0\n" | ||
466 | " teq %1, %3\n" | ||
467 | " teqeq %H1, %H3\n" | ||
468 | " strexdeq %0, %4, %H4, [%2]\n" | ||
469 | : "=&r" (res), "=&r" (oldval) | ||
470 | : "r" (ptr), "Ir" (__old), "r" (__new) | ||
471 | : "memory", "cc"); | ||
472 | } while (res); | ||
473 | |||
474 | return oldval; | ||
475 | } | ||
476 | |||
477 | static inline unsigned long long __cmpxchg64_mb(volatile void *ptr, | ||
478 | unsigned long long old, | ||
479 | unsigned long long new) | ||
480 | { | ||
481 | unsigned long long ret; | ||
482 | |||
483 | smp_mb(); | ||
484 | ret = __cmpxchg64(ptr, old, new); | ||
485 | smp_mb(); | ||
486 | |||
487 | return ret; | ||
488 | } | ||
489 | |||
490 | #define cmpxchg64(ptr,o,n) \ | ||
491 | ((__typeof__(*(ptr)))__cmpxchg64_mb((ptr), \ | ||
492 | (unsigned long long)(o), \ | ||
493 | (unsigned long long)(n))) | ||
494 | |||
495 | #define cmpxchg64_local(ptr,o,n) \ | ||
496 | ((__typeof__(*(ptr)))__cmpxchg64((ptr), \ | ||
497 | (unsigned long long)(o), \ | ||
498 | (unsigned long long)(n))) | ||
499 | |||
500 | #else /* !CONFIG_CPU_32v6K */ | ||
501 | |||
502 | #define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n)) | ||
503 | |||
504 | #endif /* CONFIG_CPU_32v6K */ | ||
505 | |||
506 | #endif /* __LINUX_ARM_ARCH__ >= 6 */ | ||
507 | |||
332 | #endif /* __ASSEMBLY__ */ | 508 | #endif /* __ASSEMBLY__ */ |
333 | 509 | ||
334 | #define arch_align_stack(x) (x) | 510 | #define arch_align_stack(x) (x) |
diff --git a/arch/arm/kernel/elf.c b/arch/arm/kernel/elf.c index d4a0da1e48f4..950391f194c4 100644 --- a/arch/arm/kernel/elf.c +++ b/arch/arm/kernel/elf.c | |||
@@ -78,6 +78,15 @@ int arm_elf_read_implies_exec(const struct elf32_hdr *x, int executable_stack) | |||
78 | return 1; | 78 | return 1; |
79 | if (cpu_architecture() < CPU_ARCH_ARMv6) | 79 | if (cpu_architecture() < CPU_ARCH_ARMv6) |
80 | return 1; | 80 | return 1; |
81 | #if !defined(CONFIG_AEABI) || defined(CONFIG_OABI_COMPAT) | ||
82 | /* | ||
83 | * If we have support for OABI programs, we can never allow NX | ||
84 | * support - our signal syscall restart mechanism relies upon | ||
85 | * being able to execute code placed on the user stack. | ||
86 | */ | ||
87 | return 1; | ||
88 | #else | ||
81 | return 0; | 89 | return 0; |
90 | #endif | ||
82 | } | 91 | } |
83 | EXPORT_SYMBOL(arm_elf_read_implies_exec); | 92 | EXPORT_SYMBOL(arm_elf_read_implies_exec); |
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S index d662a2f1fd85..83b1da6b7baa 100644 --- a/arch/arm/kernel/entry-armv.S +++ b/arch/arm/kernel/entry-armv.S | |||
@@ -815,10 +815,7 @@ __kuser_helper_start: | |||
815 | */ | 815 | */ |
816 | 816 | ||
817 | __kuser_memory_barrier: @ 0xffff0fa0 | 817 | __kuser_memory_barrier: @ 0xffff0fa0 |
818 | 818 | smp_dmb | |
819 | #if __LINUX_ARM_ARCH__ >= 6 && defined(CONFIG_SMP) | ||
820 | mcr p15, 0, r0, c7, c10, 5 @ dmb | ||
821 | #endif | ||
822 | usr_ret lr | 819 | usr_ret lr |
823 | 820 | ||
824 | .align 5 | 821 | .align 5 |
diff --git a/arch/arm/lib/bitops.h b/arch/arm/lib/bitops.h index 2e787d40d599..c7f2627385e7 100644 --- a/arch/arm/lib/bitops.h +++ b/arch/arm/lib/bitops.h | |||
@@ -18,12 +18,14 @@ | |||
18 | mov r2, #1 | 18 | mov r2, #1 |
19 | add r1, r1, r0, lsr #3 @ Get byte offset | 19 | add r1, r1, r0, lsr #3 @ Get byte offset |
20 | mov r3, r2, lsl r3 @ create mask | 20 | mov r3, r2, lsl r3 @ create mask |
21 | smp_dmb | ||
21 | 1: ldrexb r2, [r1] | 22 | 1: ldrexb r2, [r1] |
22 | ands r0, r2, r3 @ save old value of bit | 23 | ands r0, r2, r3 @ save old value of bit |
23 | \instr r2, r2, r3 @ toggle bit | 24 | \instr r2, r2, r3 @ toggle bit |
24 | strexb ip, r2, [r1] | 25 | strexb ip, r2, [r1] |
25 | cmp ip, #0 | 26 | cmp ip, #0 |
26 | bne 1b | 27 | bne 1b |
28 | smp_dmb | ||
27 | cmp r0, #0 | 29 | cmp r0, #0 |
28 | movne r0, #1 | 30 | movne r0, #1 |
29 | 2: mov pc, lr | 31 | 2: mov pc, lr |
diff --git a/arch/arm/mach-gemini/include/mach/hardware.h b/arch/arm/mach-gemini/include/mach/hardware.h index de6752674c05..213a4fcfeb1c 100644 --- a/arch/arm/mach-gemini/include/mach/hardware.h +++ b/arch/arm/mach-gemini/include/mach/hardware.h | |||
@@ -15,10 +15,9 @@ | |||
15 | /* | 15 | /* |
16 | * Memory Map definitions | 16 | * Memory Map definitions |
17 | */ | 17 | */ |
18 | /* FIXME: Does it really swap SRAM like this? */ | ||
19 | #ifdef CONFIG_GEMINI_MEM_SWAP | 18 | #ifdef CONFIG_GEMINI_MEM_SWAP |
20 | # define GEMINI_DRAM_BASE 0x00000000 | 19 | # define GEMINI_DRAM_BASE 0x00000000 |
21 | # define GEMINI_SRAM_BASE 0x20000000 | 20 | # define GEMINI_SRAM_BASE 0x70000000 |
22 | #else | 21 | #else |
23 | # define GEMINI_SRAM_BASE 0x00000000 | 22 | # define GEMINI_SRAM_BASE 0x00000000 |
24 | # define GEMINI_DRAM_BASE 0x10000000 | 23 | # define GEMINI_DRAM_BASE 0x10000000 |
diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig index b5421cccd7e1..25100f7acf4c 100644 --- a/arch/arm/mach-kirkwood/Kconfig +++ b/arch/arm/mach-kirkwood/Kconfig | |||
@@ -20,6 +20,12 @@ config MACH_RD88F6281 | |||
20 | Say 'Y' here if you want your kernel to support the | 20 | Say 'Y' here if you want your kernel to support the |
21 | Marvell RD-88F6281 Reference Board. | 21 | Marvell RD-88F6281 Reference Board. |
22 | 22 | ||
23 | config MACH_MV88F6281GTW_GE | ||
24 | bool "Marvell 88F6281 GTW GE Board" | ||
25 | help | ||
26 | Say 'Y' here if you want your kernel to support the | ||
27 | Marvell 88F6281 GTW GE Board. | ||
28 | |||
23 | config MACH_SHEEVAPLUG | 29 | config MACH_SHEEVAPLUG |
24 | bool "Marvell SheevaPlug Reference Board" | 30 | bool "Marvell SheevaPlug Reference Board" |
25 | help | 31 | help |
diff --git a/arch/arm/mach-kirkwood/Makefile b/arch/arm/mach-kirkwood/Makefile index 8f03c9b9bdd9..9dd680e964d6 100644 --- a/arch/arm/mach-kirkwood/Makefile +++ b/arch/arm/mach-kirkwood/Makefile | |||
@@ -3,5 +3,8 @@ obj-y += common.o addr-map.o irq.o pcie.o mpp.o | |||
3 | obj-$(CONFIG_MACH_DB88F6281_BP) += db88f6281-bp-setup.o | 3 | obj-$(CONFIG_MACH_DB88F6281_BP) += db88f6281-bp-setup.o |
4 | obj-$(CONFIG_MACH_RD88F6192_NAS) += rd88f6192-nas-setup.o | 4 | obj-$(CONFIG_MACH_RD88F6192_NAS) += rd88f6192-nas-setup.o |
5 | obj-$(CONFIG_MACH_RD88F6281) += rd88f6281-setup.o | 5 | obj-$(CONFIG_MACH_RD88F6281) += rd88f6281-setup.o |
6 | obj-$(CONFIG_MACH_MV88F6281GTW_GE) += mv88f6281gtw_ge-setup.o | ||
6 | obj-$(CONFIG_MACH_SHEEVAPLUG) += sheevaplug-setup.o | 7 | obj-$(CONFIG_MACH_SHEEVAPLUG) += sheevaplug-setup.o |
7 | obj-$(CONFIG_MACH_TS219) += ts219-setup.o | 8 | obj-$(CONFIG_MACH_TS219) += ts219-setup.o |
9 | |||
10 | obj-$(CONFIG_CPU_IDLE) += cpuidle.o | ||
diff --git a/arch/arm/mach-kirkwood/addr-map.c b/arch/arm/mach-kirkwood/addr-map.c index 5db4f0bbe5ee..1da5d1c18ecb 100644 --- a/arch/arm/mach-kirkwood/addr-map.c +++ b/arch/arm/mach-kirkwood/addr-map.c | |||
@@ -20,6 +20,7 @@ | |||
20 | */ | 20 | */ |
21 | #define TARGET_DDR 0 | 21 | #define TARGET_DDR 0 |
22 | #define TARGET_DEV_BUS 1 | 22 | #define TARGET_DEV_BUS 1 |
23 | #define TARGET_SRAM 3 | ||
23 | #define TARGET_PCIE 4 | 24 | #define TARGET_PCIE 4 |
24 | #define ATTR_DEV_SPI_ROM 0x1e | 25 | #define ATTR_DEV_SPI_ROM 0x1e |
25 | #define ATTR_DEV_BOOT 0x1d | 26 | #define ATTR_DEV_BOOT 0x1d |
@@ -30,6 +31,7 @@ | |||
30 | #define ATTR_DEV_CS0 0x3e | 31 | #define ATTR_DEV_CS0 0x3e |
31 | #define ATTR_PCIE_IO 0xe0 | 32 | #define ATTR_PCIE_IO 0xe0 |
32 | #define ATTR_PCIE_MEM 0xe8 | 33 | #define ATTR_PCIE_MEM 0xe8 |
34 | #define ATTR_SRAM 0x01 | ||
33 | 35 | ||
34 | /* | 36 | /* |
35 | * Helpers to get DDR bank info | 37 | * Helpers to get DDR bank info |
@@ -48,7 +50,6 @@ | |||
48 | 50 | ||
49 | 51 | ||
50 | struct mbus_dram_target_info kirkwood_mbus_dram_info; | 52 | struct mbus_dram_target_info kirkwood_mbus_dram_info; |
51 | static int __initdata win_alloc_count; | ||
52 | 53 | ||
53 | static int __init cpu_win_can_remap(int win) | 54 | static int __init cpu_win_can_remap(int win) |
54 | { | 55 | { |
@@ -112,7 +113,11 @@ void __init kirkwood_setup_cpu_mbus(void) | |||
112 | setup_cpu_win(2, KIRKWOOD_NAND_MEM_PHYS_BASE, KIRKWOOD_NAND_MEM_SIZE, | 113 | setup_cpu_win(2, KIRKWOOD_NAND_MEM_PHYS_BASE, KIRKWOOD_NAND_MEM_SIZE, |
113 | TARGET_DEV_BUS, ATTR_DEV_NAND, -1); | 114 | TARGET_DEV_BUS, ATTR_DEV_NAND, -1); |
114 | 115 | ||
115 | win_alloc_count = 3; | 116 | /* |
117 | * Setup window for SRAM. | ||
118 | */ | ||
119 | setup_cpu_win(3, KIRKWOOD_SRAM_PHYS_BASE, KIRKWOOD_SRAM_SIZE, | ||
120 | TARGET_SRAM, ATTR_SRAM, -1); | ||
116 | 121 | ||
117 | /* | 122 | /* |
118 | * Setup MBUS dram target info. | 123 | * Setup MBUS dram target info. |
@@ -140,8 +145,3 @@ void __init kirkwood_setup_cpu_mbus(void) | |||
140 | } | 145 | } |
141 | kirkwood_mbus_dram_info.num_cs = cs; | 146 | kirkwood_mbus_dram_info.num_cs = cs; |
142 | } | 147 | } |
143 | |||
144 | void __init kirkwood_setup_sram_win(u32 base, u32 size) | ||
145 | { | ||
146 | setup_cpu_win(win_alloc_count++, base, size, 0x03, 0x00, -1); | ||
147 | } | ||
diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c index eeb00240d784..0f6919838011 100644 --- a/arch/arm/mach-kirkwood/common.c +++ b/arch/arm/mach-kirkwood/common.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/mv643xx_eth.h> | 16 | #include <linux/mv643xx_eth.h> |
17 | #include <linux/mv643xx_i2c.h> | 17 | #include <linux/mv643xx_i2c.h> |
18 | #include <linux/ata_platform.h> | 18 | #include <linux/ata_platform.h> |
19 | #include <linux/mtd/nand.h> | ||
19 | #include <linux/spi/orion_spi.h> | 20 | #include <linux/spi/orion_spi.h> |
20 | #include <net/dsa.h> | 21 | #include <net/dsa.h> |
21 | #include <asm/page.h> | 22 | #include <asm/page.h> |
@@ -29,6 +30,7 @@ | |||
29 | #include <plat/mvsdio.h> | 30 | #include <plat/mvsdio.h> |
30 | #include <plat/mv_xor.h> | 31 | #include <plat/mv_xor.h> |
31 | #include <plat/orion_nand.h> | 32 | #include <plat/orion_nand.h> |
33 | #include <plat/orion_wdt.h> | ||
32 | #include <plat/time.h> | 34 | #include <plat/time.h> |
33 | #include "common.h" | 35 | #include "common.h" |
34 | 36 | ||
@@ -54,6 +56,13 @@ void __init kirkwood_map_io(void) | |||
54 | iotable_init(kirkwood_io_desc, ARRAY_SIZE(kirkwood_io_desc)); | 56 | iotable_init(kirkwood_io_desc, ARRAY_SIZE(kirkwood_io_desc)); |
55 | } | 57 | } |
56 | 58 | ||
59 | /* | ||
60 | * Default clock control bits. Any bit _not_ set in this variable | ||
61 | * will be cleared from the hardware after platform devices have been | ||
62 | * registered. Some reserved bits must be set to 1. | ||
63 | */ | ||
64 | unsigned int kirkwood_clk_ctrl = CGC_DUNIT | CGC_RESERVED; | ||
65 | |||
57 | 66 | ||
58 | /***************************************************************************** | 67 | /***************************************************************************** |
59 | * EHCI | 68 | * EHCI |
@@ -95,6 +104,7 @@ static struct platform_device kirkwood_ehci = { | |||
95 | 104 | ||
96 | void __init kirkwood_ehci_init(void) | 105 | void __init kirkwood_ehci_init(void) |
97 | { | 106 | { |
107 | kirkwood_clk_ctrl |= CGC_USB0; | ||
98 | platform_device_register(&kirkwood_ehci); | 108 | platform_device_register(&kirkwood_ehci); |
99 | } | 109 | } |
100 | 110 | ||
@@ -144,10 +154,14 @@ static struct platform_device kirkwood_ge00 = { | |||
144 | .id = 0, | 154 | .id = 0, |
145 | .num_resources = 1, | 155 | .num_resources = 1, |
146 | .resource = kirkwood_ge00_resources, | 156 | .resource = kirkwood_ge00_resources, |
157 | .dev = { | ||
158 | .coherent_dma_mask = 0xffffffff, | ||
159 | }, | ||
147 | }; | 160 | }; |
148 | 161 | ||
149 | void __init kirkwood_ge00_init(struct mv643xx_eth_platform_data *eth_data) | 162 | void __init kirkwood_ge00_init(struct mv643xx_eth_platform_data *eth_data) |
150 | { | 163 | { |
164 | kirkwood_clk_ctrl |= CGC_GE0; | ||
151 | eth_data->shared = &kirkwood_ge00_shared; | 165 | eth_data->shared = &kirkwood_ge00_shared; |
152 | kirkwood_ge00.dev.platform_data = eth_data; | 166 | kirkwood_ge00.dev.platform_data = eth_data; |
153 | 167 | ||
@@ -202,10 +216,14 @@ static struct platform_device kirkwood_ge01 = { | |||
202 | .id = 1, | 216 | .id = 1, |
203 | .num_resources = 1, | 217 | .num_resources = 1, |
204 | .resource = kirkwood_ge01_resources, | 218 | .resource = kirkwood_ge01_resources, |
219 | .dev = { | ||
220 | .coherent_dma_mask = 0xffffffff, | ||
221 | }, | ||
205 | }; | 222 | }; |
206 | 223 | ||
207 | void __init kirkwood_ge01_init(struct mv643xx_eth_platform_data *eth_data) | 224 | void __init kirkwood_ge01_init(struct mv643xx_eth_platform_data *eth_data) |
208 | { | 225 | { |
226 | kirkwood_clk_ctrl |= CGC_GE1; | ||
209 | eth_data->shared = &kirkwood_ge01_shared; | 227 | eth_data->shared = &kirkwood_ge01_shared; |
210 | kirkwood_ge01.dev.platform_data = eth_data; | 228 | kirkwood_ge01.dev.platform_data = eth_data; |
211 | 229 | ||
@@ -252,6 +270,43 @@ void __init kirkwood_ge00_switch_init(struct dsa_platform_data *d, int irq) | |||
252 | 270 | ||
253 | 271 | ||
254 | /***************************************************************************** | 272 | /***************************************************************************** |
273 | * NAND flash | ||
274 | ****************************************************************************/ | ||
275 | static struct resource kirkwood_nand_resource = { | ||
276 | .flags = IORESOURCE_MEM, | ||
277 | .start = KIRKWOOD_NAND_MEM_PHYS_BASE, | ||
278 | .end = KIRKWOOD_NAND_MEM_PHYS_BASE + | ||
279 | KIRKWOOD_NAND_MEM_SIZE - 1, | ||
280 | }; | ||
281 | |||
282 | static struct orion_nand_data kirkwood_nand_data = { | ||
283 | .cle = 0, | ||
284 | .ale = 1, | ||
285 | .width = 8, | ||
286 | }; | ||
287 | |||
288 | static struct platform_device kirkwood_nand_flash = { | ||
289 | .name = "orion_nand", | ||
290 | .id = -1, | ||
291 | .dev = { | ||
292 | .platform_data = &kirkwood_nand_data, | ||
293 | }, | ||
294 | .resource = &kirkwood_nand_resource, | ||
295 | .num_resources = 1, | ||
296 | }; | ||
297 | |||
298 | void __init kirkwood_nand_init(struct mtd_partition *parts, int nr_parts, | ||
299 | int chip_delay) | ||
300 | { | ||
301 | kirkwood_clk_ctrl |= CGC_RUNIT; | ||
302 | kirkwood_nand_data.parts = parts; | ||
303 | kirkwood_nand_data.nr_parts = nr_parts; | ||
304 | kirkwood_nand_data.chip_delay = chip_delay; | ||
305 | platform_device_register(&kirkwood_nand_flash); | ||
306 | } | ||
307 | |||
308 | |||
309 | /***************************************************************************** | ||
255 | * SoC RTC | 310 | * SoC RTC |
256 | ****************************************************************************/ | 311 | ****************************************************************************/ |
257 | static struct resource kirkwood_rtc_resource = { | 312 | static struct resource kirkwood_rtc_resource = { |
@@ -295,6 +350,9 @@ static struct platform_device kirkwood_sata = { | |||
295 | 350 | ||
296 | void __init kirkwood_sata_init(struct mv_sata_platform_data *sata_data) | 351 | void __init kirkwood_sata_init(struct mv_sata_platform_data *sata_data) |
297 | { | 352 | { |
353 | kirkwood_clk_ctrl |= CGC_SATA0; | ||
354 | if (sata_data->n_ports > 1) | ||
355 | kirkwood_clk_ctrl |= CGC_SATA1; | ||
298 | sata_data->dram = &kirkwood_mbus_dram_info; | 356 | sata_data->dram = &kirkwood_mbus_dram_info; |
299 | kirkwood_sata.dev.platform_data = sata_data; | 357 | kirkwood_sata.dev.platform_data = sata_data; |
300 | platform_device_register(&kirkwood_sata); | 358 | platform_device_register(&kirkwood_sata); |
@@ -340,6 +398,7 @@ void __init kirkwood_sdio_init(struct mvsdio_platform_data *mvsdio_data) | |||
340 | else | 398 | else |
341 | mvsdio_data->clock = 200000000; | 399 | mvsdio_data->clock = 200000000; |
342 | mvsdio_data->dram = &kirkwood_mbus_dram_info; | 400 | mvsdio_data->dram = &kirkwood_mbus_dram_info; |
401 | kirkwood_clk_ctrl |= CGC_SDIO; | ||
343 | kirkwood_sdio.dev.platform_data = mvsdio_data; | 402 | kirkwood_sdio.dev.platform_data = mvsdio_data; |
344 | platform_device_register(&kirkwood_sdio); | 403 | platform_device_register(&kirkwood_sdio); |
345 | } | 404 | } |
@@ -371,6 +430,7 @@ static struct platform_device kirkwood_spi = { | |||
371 | 430 | ||
372 | void __init kirkwood_spi_init() | 431 | void __init kirkwood_spi_init() |
373 | { | 432 | { |
433 | kirkwood_clk_ctrl |= CGC_RUNIT; | ||
374 | platform_device_register(&kirkwood_spi); | 434 | platform_device_register(&kirkwood_spi); |
375 | } | 435 | } |
376 | 436 | ||
@@ -386,12 +446,10 @@ static struct mv64xxx_i2c_pdata kirkwood_i2c_pdata = { | |||
386 | 446 | ||
387 | static struct resource kirkwood_i2c_resources[] = { | 447 | static struct resource kirkwood_i2c_resources[] = { |
388 | { | 448 | { |
389 | .name = "i2c", | ||
390 | .start = I2C_PHYS_BASE, | 449 | .start = I2C_PHYS_BASE, |
391 | .end = I2C_PHYS_BASE + 0x1f, | 450 | .end = I2C_PHYS_BASE + 0x1f, |
392 | .flags = IORESOURCE_MEM, | 451 | .flags = IORESOURCE_MEM, |
393 | }, { | 452 | }, { |
394 | .name = "i2c", | ||
395 | .start = IRQ_KIRKWOOD_TWSI, | 453 | .start = IRQ_KIRKWOOD_TWSI, |
396 | .end = IRQ_KIRKWOOD_TWSI, | 454 | .end = IRQ_KIRKWOOD_TWSI, |
397 | .flags = IORESOURCE_IRQ, | 455 | .flags = IORESOURCE_IRQ, |
@@ -503,6 +561,43 @@ void __init kirkwood_uart1_init(void) | |||
503 | 561 | ||
504 | 562 | ||
505 | /***************************************************************************** | 563 | /***************************************************************************** |
564 | * Cryptographic Engines and Security Accelerator (CESA) | ||
565 | ****************************************************************************/ | ||
566 | |||
567 | static struct resource kirkwood_crypto_res[] = { | ||
568 | { | ||
569 | .name = "regs", | ||
570 | .start = CRYPTO_PHYS_BASE, | ||
571 | .end = CRYPTO_PHYS_BASE + 0xffff, | ||
572 | .flags = IORESOURCE_MEM, | ||
573 | }, { | ||
574 | .name = "sram", | ||
575 | .start = KIRKWOOD_SRAM_PHYS_BASE, | ||
576 | .end = KIRKWOOD_SRAM_PHYS_BASE + KIRKWOOD_SRAM_SIZE - 1, | ||
577 | .flags = IORESOURCE_MEM, | ||
578 | }, { | ||
579 | .name = "crypto interrupt", | ||
580 | .start = IRQ_KIRKWOOD_CRYPTO, | ||
581 | .end = IRQ_KIRKWOOD_CRYPTO, | ||
582 | .flags = IORESOURCE_IRQ, | ||
583 | }, | ||
584 | }; | ||
585 | |||
586 | static struct platform_device kirkwood_crypto_device = { | ||
587 | .name = "mv_crypto", | ||
588 | .id = -1, | ||
589 | .num_resources = ARRAY_SIZE(kirkwood_crypto_res), | ||
590 | .resource = kirkwood_crypto_res, | ||
591 | }; | ||
592 | |||
593 | void __init kirkwood_crypto_init(void) | ||
594 | { | ||
595 | kirkwood_clk_ctrl |= CGC_CRYPTO; | ||
596 | platform_device_register(&kirkwood_crypto_device); | ||
597 | } | ||
598 | |||
599 | |||
600 | /***************************************************************************** | ||
506 | * XOR | 601 | * XOR |
507 | ****************************************************************************/ | 602 | ****************************************************************************/ |
508 | static struct mv_xor_platform_shared_data kirkwood_xor_shared_data = { | 603 | static struct mv_xor_platform_shared_data kirkwood_xor_shared_data = { |
@@ -593,6 +688,7 @@ static struct platform_device kirkwood_xor01_channel = { | |||
593 | 688 | ||
594 | static void __init kirkwood_xor0_init(void) | 689 | static void __init kirkwood_xor0_init(void) |
595 | { | 690 | { |
691 | kirkwood_clk_ctrl |= CGC_XOR0; | ||
596 | platform_device_register(&kirkwood_xor0_shared); | 692 | platform_device_register(&kirkwood_xor0_shared); |
597 | 693 | ||
598 | /* | 694 | /* |
@@ -691,6 +787,7 @@ static struct platform_device kirkwood_xor11_channel = { | |||
691 | 787 | ||
692 | static void __init kirkwood_xor1_init(void) | 788 | static void __init kirkwood_xor1_init(void) |
693 | { | 789 | { |
790 | kirkwood_clk_ctrl |= CGC_XOR1; | ||
694 | platform_device_register(&kirkwood_xor1_shared); | 791 | platform_device_register(&kirkwood_xor1_shared); |
695 | 792 | ||
696 | /* | 793 | /* |
@@ -709,6 +806,29 @@ static void __init kirkwood_xor1_init(void) | |||
709 | 806 | ||
710 | 807 | ||
711 | /***************************************************************************** | 808 | /***************************************************************************** |
809 | * Watchdog | ||
810 | ****************************************************************************/ | ||
811 | static struct orion_wdt_platform_data kirkwood_wdt_data = { | ||
812 | .tclk = 0, | ||
813 | }; | ||
814 | |||
815 | static struct platform_device kirkwood_wdt_device = { | ||
816 | .name = "orion_wdt", | ||
817 | .id = -1, | ||
818 | .dev = { | ||
819 | .platform_data = &kirkwood_wdt_data, | ||
820 | }, | ||
821 | .num_resources = 0, | ||
822 | }; | ||
823 | |||
824 | static void __init kirkwood_wdt_init(void) | ||
825 | { | ||
826 | kirkwood_wdt_data.tclk = kirkwood_tclk; | ||
827 | platform_device_register(&kirkwood_wdt_device); | ||
828 | } | ||
829 | |||
830 | |||
831 | /***************************************************************************** | ||
712 | * Time handling | 832 | * Time handling |
713 | ****************************************************************************/ | 833 | ****************************************************************************/ |
714 | int kirkwood_tclk; | 834 | int kirkwood_tclk; |
@@ -800,6 +920,49 @@ void __init kirkwood_init(void) | |||
800 | 920 | ||
801 | /* internal devices that every board has */ | 921 | /* internal devices that every board has */ |
802 | kirkwood_rtc_init(); | 922 | kirkwood_rtc_init(); |
923 | kirkwood_wdt_init(); | ||
803 | kirkwood_xor0_init(); | 924 | kirkwood_xor0_init(); |
804 | kirkwood_xor1_init(); | 925 | kirkwood_xor1_init(); |
926 | kirkwood_crypto_init(); | ||
927 | } | ||
928 | |||
929 | static int __init kirkwood_clock_gate(void) | ||
930 | { | ||
931 | unsigned int curr = readl(CLOCK_GATING_CTRL); | ||
932 | |||
933 | printk(KERN_DEBUG "Gating clock of unused units\n"); | ||
934 | printk(KERN_DEBUG "before: 0x%08x\n", curr); | ||
935 | |||
936 | /* Make sure those units are accessible */ | ||
937 | writel(curr | CGC_SATA0 | CGC_SATA1 | CGC_PEX0, CLOCK_GATING_CTRL); | ||
938 | |||
939 | /* For SATA: first shutdown the phy */ | ||
940 | if (!(kirkwood_clk_ctrl & CGC_SATA0)) { | ||
941 | /* Disable PLL and IVREF */ | ||
942 | writel(readl(SATA0_PHY_MODE_2) & ~0xf, SATA0_PHY_MODE_2); | ||
943 | /* Disable PHY */ | ||
944 | writel(readl(SATA0_IF_CTRL) | 0x200, SATA0_IF_CTRL); | ||
945 | } | ||
946 | if (!(kirkwood_clk_ctrl & CGC_SATA1)) { | ||
947 | /* Disable PLL and IVREF */ | ||
948 | writel(readl(SATA1_PHY_MODE_2) & ~0xf, SATA1_PHY_MODE_2); | ||
949 | /* Disable PHY */ | ||
950 | writel(readl(SATA1_IF_CTRL) | 0x200, SATA1_IF_CTRL); | ||
951 | } | ||
952 | |||
953 | /* For PCIe: first shutdown the phy */ | ||
954 | if (!(kirkwood_clk_ctrl & CGC_PEX0)) { | ||
955 | writel(readl(PCIE_LINK_CTRL) | 0x10, PCIE_LINK_CTRL); | ||
956 | while (1) | ||
957 | if (readl(PCIE_STATUS) & 0x1) | ||
958 | break; | ||
959 | writel(readl(PCIE_LINK_CTRL) & ~0x10, PCIE_LINK_CTRL); | ||
960 | } | ||
961 | |||
962 | /* Now gate clock the required units */ | ||
963 | writel(kirkwood_clk_ctrl, CLOCK_GATING_CTRL); | ||
964 | printk(KERN_DEBUG " after: 0x%08x\n", readl(CLOCK_GATING_CTRL)); | ||
965 | |||
966 | return 0; | ||
805 | } | 967 | } |
968 | late_initcall(kirkwood_clock_gate); | ||
diff --git a/arch/arm/mach-kirkwood/common.h b/arch/arm/mach-kirkwood/common.h index 6ee88406f381..d7de43464358 100644 --- a/arch/arm/mach-kirkwood/common.h +++ b/arch/arm/mach-kirkwood/common.h | |||
@@ -15,6 +15,7 @@ struct dsa_platform_data; | |||
15 | struct mv643xx_eth_platform_data; | 15 | struct mv643xx_eth_platform_data; |
16 | struct mv_sata_platform_data; | 16 | struct mv_sata_platform_data; |
17 | struct mvsdio_platform_data; | 17 | struct mvsdio_platform_data; |
18 | struct mtd_partition; | ||
18 | 19 | ||
19 | /* | 20 | /* |
20 | * Basic Kirkwood init functions used early by machine-setup. | 21 | * Basic Kirkwood init functions used early by machine-setup. |
@@ -25,7 +26,6 @@ void kirkwood_init_irq(void); | |||
25 | 26 | ||
26 | extern struct mbus_dram_target_info kirkwood_mbus_dram_info; | 27 | extern struct mbus_dram_target_info kirkwood_mbus_dram_info; |
27 | void kirkwood_setup_cpu_mbus(void); | 28 | void kirkwood_setup_cpu_mbus(void); |
28 | void kirkwood_setup_sram_win(u32 base, u32 size); | ||
29 | 29 | ||
30 | void kirkwood_pcie_id(u32 *dev, u32 *rev); | 30 | void kirkwood_pcie_id(u32 *dev, u32 *rev); |
31 | 31 | ||
@@ -40,9 +40,11 @@ void kirkwood_spi_init(void); | |||
40 | void kirkwood_i2c_init(void); | 40 | void kirkwood_i2c_init(void); |
41 | void kirkwood_uart0_init(void); | 41 | void kirkwood_uart0_init(void); |
42 | void kirkwood_uart1_init(void); | 42 | void kirkwood_uart1_init(void); |
43 | void kirkwood_nand_init(struct mtd_partition *parts, int nr_parts, int delay); | ||
43 | 44 | ||
44 | extern int kirkwood_tclk; | 45 | extern int kirkwood_tclk; |
45 | extern struct sys_timer kirkwood_timer; | 46 | extern struct sys_timer kirkwood_timer; |
46 | 47 | ||
48 | #define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x) | ||
47 | 49 | ||
48 | #endif | 50 | #endif |
diff --git a/arch/arm/mach-kirkwood/cpuidle.c b/arch/arm/mach-kirkwood/cpuidle.c new file mode 100644 index 000000000000..f68d33f1f396 --- /dev/null +++ b/arch/arm/mach-kirkwood/cpuidle.c | |||
@@ -0,0 +1,96 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-kirkwood/cpuidle.c | ||
3 | * | ||
4 | * CPU idle Marvell Kirkwood SoCs | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public | ||
7 | * License version 2. This program is licensed "as is" without any | ||
8 | * warranty of any kind, whether express or implied. | ||
9 | * | ||
10 | * The cpu idle uses wait-for-interrupt and DDR self refresh in order | ||
11 | * to implement two idle states - | ||
12 | * #1 wait-for-interrupt | ||
13 | * #2 wait-for-interrupt and DDR self refresh | ||
14 | */ | ||
15 | |||
16 | #include <linux/kernel.h> | ||
17 | #include <linux/init.h> | ||
18 | #include <linux/platform_device.h> | ||
19 | #include <linux/cpuidle.h> | ||
20 | #include <linux/io.h> | ||
21 | #include <asm/proc-fns.h> | ||
22 | #include <mach/kirkwood.h> | ||
23 | |||
24 | #define KIRKWOOD_MAX_STATES 2 | ||
25 | |||
26 | static struct cpuidle_driver kirkwood_idle_driver = { | ||
27 | .name = "kirkwood_idle", | ||
28 | .owner = THIS_MODULE, | ||
29 | }; | ||
30 | |||
31 | static DEFINE_PER_CPU(struct cpuidle_device, kirkwood_cpuidle_device); | ||
32 | |||
33 | /* Actual code that puts the SoC in different idle states */ | ||
34 | static int kirkwood_enter_idle(struct cpuidle_device *dev, | ||
35 | struct cpuidle_state *state) | ||
36 | { | ||
37 | struct timeval before, after; | ||
38 | int idle_time; | ||
39 | |||
40 | local_irq_disable(); | ||
41 | do_gettimeofday(&before); | ||
42 | if (state == &dev->states[0]) | ||
43 | /* Wait for interrupt state */ | ||
44 | cpu_do_idle(); | ||
45 | else if (state == &dev->states[1]) { | ||
46 | /* | ||
47 | * Following write will put DDR in self refresh. | ||
48 | * Note that we have 256 cycles before DDR puts it | ||
49 | * self in self-refresh, so the wait-for-interrupt | ||
50 | * call afterwards won't get the DDR from self refresh | ||
51 | * mode. | ||
52 | */ | ||
53 | writel(0x7, DDR_OPERATION_BASE); | ||
54 | cpu_do_idle(); | ||
55 | } | ||
56 | do_gettimeofday(&after); | ||
57 | local_irq_enable(); | ||
58 | idle_time = (after.tv_sec - before.tv_sec) * USEC_PER_SEC + | ||
59 | (after.tv_usec - before.tv_usec); | ||
60 | return idle_time; | ||
61 | } | ||
62 | |||
63 | /* Initialize CPU idle by registering the idle states */ | ||
64 | static int kirkwood_init_cpuidle(void) | ||
65 | { | ||
66 | struct cpuidle_device *device; | ||
67 | |||
68 | cpuidle_register_driver(&kirkwood_idle_driver); | ||
69 | |||
70 | device = &per_cpu(kirkwood_cpuidle_device, smp_processor_id()); | ||
71 | device->state_count = KIRKWOOD_MAX_STATES; | ||
72 | |||
73 | /* Wait for interrupt state */ | ||
74 | device->states[0].enter = kirkwood_enter_idle; | ||
75 | device->states[0].exit_latency = 1; | ||
76 | device->states[0].target_residency = 10000; | ||
77 | device->states[0].flags = CPUIDLE_FLAG_TIME_VALID; | ||
78 | strcpy(device->states[0].name, "WFI"); | ||
79 | strcpy(device->states[0].desc, "Wait for interrupt"); | ||
80 | |||
81 | /* Wait for interrupt and DDR self refresh state */ | ||
82 | device->states[1].enter = kirkwood_enter_idle; | ||
83 | device->states[1].exit_latency = 10; | ||
84 | device->states[1].target_residency = 10000; | ||
85 | device->states[1].flags = CPUIDLE_FLAG_TIME_VALID; | ||
86 | strcpy(device->states[1].name, "DDR SR"); | ||
87 | strcpy(device->states[1].desc, "WFI and DDR Self Refresh"); | ||
88 | |||
89 | if (cpuidle_register_device(device)) { | ||
90 | printk(KERN_ERR "kirkwood_init_cpuidle: Failed registering\n"); | ||
91 | return -EIO; | ||
92 | } | ||
93 | return 0; | ||
94 | } | ||
95 | |||
96 | device_initcall(kirkwood_init_cpuidle); | ||
diff --git a/arch/arm/mach-kirkwood/db88f6281-bp-setup.c b/arch/arm/mach-kirkwood/db88f6281-bp-setup.c index 5505d5837752..39bdf4bcace9 100644 --- a/arch/arm/mach-kirkwood/db88f6281-bp-setup.c +++ b/arch/arm/mach-kirkwood/db88f6281-bp-setup.c | |||
@@ -11,14 +11,12 @@ | |||
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
14 | #include <linux/mtd/nand.h> | ||
15 | #include <linux/mtd/partitions.h> | 14 | #include <linux/mtd/partitions.h> |
16 | #include <linux/ata_platform.h> | 15 | #include <linux/ata_platform.h> |
17 | #include <linux/mv643xx_eth.h> | 16 | #include <linux/mv643xx_eth.h> |
18 | #include <asm/mach-types.h> | 17 | #include <asm/mach-types.h> |
19 | #include <asm/mach/arch.h> | 18 | #include <asm/mach/arch.h> |
20 | #include <mach/kirkwood.h> | 19 | #include <mach/kirkwood.h> |
21 | #include <plat/orion_nand.h> | ||
22 | #include <plat/mvsdio.h> | 20 | #include <plat/mvsdio.h> |
23 | #include "common.h" | 21 | #include "common.h" |
24 | #include "mpp.h" | 22 | #include "mpp.h" |
@@ -39,32 +37,6 @@ static struct mtd_partition db88f6281_nand_parts[] = { | |||
39 | }, | 37 | }, |
40 | }; | 38 | }; |
41 | 39 | ||
42 | static struct resource db88f6281_nand_resource = { | ||
43 | .flags = IORESOURCE_MEM, | ||
44 | .start = KIRKWOOD_NAND_MEM_PHYS_BASE, | ||
45 | .end = KIRKWOOD_NAND_MEM_PHYS_BASE + | ||
46 | KIRKWOOD_NAND_MEM_SIZE - 1, | ||
47 | }; | ||
48 | |||
49 | static struct orion_nand_data db88f6281_nand_data = { | ||
50 | .parts = db88f6281_nand_parts, | ||
51 | .nr_parts = ARRAY_SIZE(db88f6281_nand_parts), | ||
52 | .cle = 0, | ||
53 | .ale = 1, | ||
54 | .width = 8, | ||
55 | .chip_delay = 25, | ||
56 | }; | ||
57 | |||
58 | static struct platform_device db88f6281_nand_flash = { | ||
59 | .name = "orion_nand", | ||
60 | .id = -1, | ||
61 | .dev = { | ||
62 | .platform_data = &db88f6281_nand_data, | ||
63 | }, | ||
64 | .resource = &db88f6281_nand_resource, | ||
65 | .num_resources = 1, | ||
66 | }; | ||
67 | |||
68 | static struct mv643xx_eth_platform_data db88f6281_ge00_data = { | 40 | static struct mv643xx_eth_platform_data db88f6281_ge00_data = { |
69 | .phy_addr = MV643XX_ETH_PHY_ADDR(8), | 41 | .phy_addr = MV643XX_ETH_PHY_ADDR(8), |
70 | }; | 42 | }; |
@@ -92,13 +64,12 @@ static void __init db88f6281_init(void) | |||
92 | kirkwood_init(); | 64 | kirkwood_init(); |
93 | kirkwood_mpp_conf(db88f6281_mpp_config); | 65 | kirkwood_mpp_conf(db88f6281_mpp_config); |
94 | 66 | ||
67 | kirkwood_nand_init(ARRAY_AND_SIZE(db88f6281_nand_parts), 25); | ||
95 | kirkwood_ehci_init(); | 68 | kirkwood_ehci_init(); |
96 | kirkwood_ge00_init(&db88f6281_ge00_data); | 69 | kirkwood_ge00_init(&db88f6281_ge00_data); |
97 | kirkwood_sata_init(&db88f6281_sata_data); | 70 | kirkwood_sata_init(&db88f6281_sata_data); |
98 | kirkwood_uart0_init(); | 71 | kirkwood_uart0_init(); |
99 | kirkwood_sdio_init(&db88f6281_mvsdio_data); | 72 | kirkwood_sdio_init(&db88f6281_mvsdio_data); |
100 | |||
101 | platform_device_register(&db88f6281_nand_flash); | ||
102 | } | 73 | } |
103 | 74 | ||
104 | static int __init db88f6281_pci_init(void) | 75 | static int __init db88f6281_pci_init(void) |
diff --git a/arch/arm/mach-kirkwood/include/mach/bridge-regs.h b/arch/arm/mach-kirkwood/include/mach/bridge-regs.h index 4f7029f521cc..9e80d9232c83 100644 --- a/arch/arm/mach-kirkwood/include/mach/bridge-regs.h +++ b/arch/arm/mach-kirkwood/include/mach/bridge-regs.h | |||
@@ -17,12 +17,15 @@ | |||
17 | #define CPU_RESET 0x00000002 | 17 | #define CPU_RESET 0x00000002 |
18 | 18 | ||
19 | #define RSTOUTn_MASK (BRIDGE_VIRT_BASE | 0x0108) | 19 | #define RSTOUTn_MASK (BRIDGE_VIRT_BASE | 0x0108) |
20 | #define WDT_RESET_OUT_EN 0x00000002 | ||
20 | #define SOFT_RESET_OUT_EN 0x00000004 | 21 | #define SOFT_RESET_OUT_EN 0x00000004 |
21 | 22 | ||
22 | #define SYSTEM_SOFT_RESET (BRIDGE_VIRT_BASE | 0x010c) | 23 | #define SYSTEM_SOFT_RESET (BRIDGE_VIRT_BASE | 0x010c) |
23 | #define SOFT_RESET 0x00000001 | 24 | #define SOFT_RESET 0x00000001 |
24 | 25 | ||
25 | #define BRIDGE_CAUSE (BRIDGE_VIRT_BASE | 0x0110) | 26 | #define BRIDGE_CAUSE (BRIDGE_VIRT_BASE | 0x0110) |
27 | #define WDT_INT_REQ 0x0008 | ||
28 | |||
26 | #define BRIDGE_MASK (BRIDGE_VIRT_BASE | 0x0114) | 29 | #define BRIDGE_MASK (BRIDGE_VIRT_BASE | 0x0114) |
27 | #define BRIDGE_INT_TIMER0 0x0002 | 30 | #define BRIDGE_INT_TIMER0 0x0002 |
28 | #define BRIDGE_INT_TIMER1 0x0004 | 31 | #define BRIDGE_INT_TIMER1 0x0004 |
@@ -39,4 +42,22 @@ | |||
39 | #define L2_CONFIG_REG (BRIDGE_VIRT_BASE | 0x0128) | 42 | #define L2_CONFIG_REG (BRIDGE_VIRT_BASE | 0x0128) |
40 | #define L2_WRITETHROUGH 0x00000010 | 43 | #define L2_WRITETHROUGH 0x00000010 |
41 | 44 | ||
45 | #define CLOCK_GATING_CTRL (BRIDGE_VIRT_BASE | 0x11c) | ||
46 | #define CGC_GE0 (1 << 0) | ||
47 | #define CGC_PEX0 (1 << 2) | ||
48 | #define CGC_USB0 (1 << 3) | ||
49 | #define CGC_SDIO (1 << 4) | ||
50 | #define CGC_TSU (1 << 5) | ||
51 | #define CGC_DUNIT (1 << 6) | ||
52 | #define CGC_RUNIT (1 << 7) | ||
53 | #define CGC_XOR0 (1 << 8) | ||
54 | #define CGC_AUDIO (1 << 9) | ||
55 | #define CGC_SATA0 (1 << 14) | ||
56 | #define CGC_SATA1 (1 << 15) | ||
57 | #define CGC_XOR1 (1 << 16) | ||
58 | #define CGC_CRYPTO (1 << 17) | ||
59 | #define CGC_GE1 (1 << 19) | ||
60 | #define CGC_TDM (1 << 20) | ||
61 | #define CGC_RESERVED ((1 << 18) | (0x6 << 21)) | ||
62 | |||
42 | #endif | 63 | #endif |
diff --git a/arch/arm/mach-kirkwood/include/mach/io.h b/arch/arm/mach-kirkwood/include/mach/io.h index be07be0ef522..a643a846d5fb 100644 --- a/arch/arm/mach-kirkwood/include/mach/io.h +++ b/arch/arm/mach-kirkwood/include/mach/io.h | |||
@@ -19,6 +19,31 @@ static inline void __iomem *__io(unsigned long addr) | |||
19 | + KIRKWOOD_PCIE_IO_VIRT_BASE); | 19 | + KIRKWOOD_PCIE_IO_VIRT_BASE); |
20 | } | 20 | } |
21 | 21 | ||
22 | static inline void __iomem * | ||
23 | __arch_ioremap(unsigned long paddr, size_t size, unsigned int mtype) | ||
24 | { | ||
25 | void __iomem *retval; | ||
26 | unsigned long offs = paddr - KIRKWOOD_REGS_PHYS_BASE; | ||
27 | if (mtype == MT_DEVICE && size && offs < KIRKWOOD_REGS_SIZE && | ||
28 | size <= KIRKWOOD_REGS_SIZE && offs + size <= KIRKWOOD_REGS_SIZE) { | ||
29 | retval = (void __iomem *)KIRKWOOD_REGS_VIRT_BASE + offs; | ||
30 | } else { | ||
31 | retval = __arm_ioremap(paddr, size, mtype); | ||
32 | } | ||
33 | |||
34 | return retval; | ||
35 | } | ||
36 | |||
37 | static inline void | ||
38 | __arch_iounmap(void __iomem *addr) | ||
39 | { | ||
40 | if (addr < (void __iomem *)KIRKWOOD_REGS_VIRT_BASE || | ||
41 | addr >= (void __iomem *)(KIRKWOOD_REGS_VIRT_BASE + KIRKWOOD_REGS_SIZE)) | ||
42 | __iounmap(addr); | ||
43 | } | ||
44 | |||
45 | #define __arch_ioremap(p, s, m) __arch_ioremap(p, s, m) | ||
46 | #define __arch_iounmap(a) __arch_iounmap(a) | ||
22 | #define __io(a) __io(a) | 47 | #define __io(a) __io(a) |
23 | #define __mem_pci(a) (a) | 48 | #define __mem_pci(a) (a) |
24 | 49 | ||
diff --git a/arch/arm/mach-kirkwood/include/mach/kirkwood.h b/arch/arm/mach-kirkwood/include/mach/kirkwood.h index b3e13958821d..07af858814a0 100644 --- a/arch/arm/mach-kirkwood/include/mach/kirkwood.h +++ b/arch/arm/mach-kirkwood/include/mach/kirkwood.h | |||
@@ -20,16 +20,18 @@ | |||
20 | * f1000000 on-chip peripheral registers | 20 | * f1000000 on-chip peripheral registers |
21 | * f2000000 PCIe I/O space | 21 | * f2000000 PCIe I/O space |
22 | * f3000000 NAND controller address window | 22 | * f3000000 NAND controller address window |
23 | * f4000000 Security Accelerator SRAM | ||
23 | * | 24 | * |
24 | * virt phys size | 25 | * virt phys size |
25 | * fee00000 f1000000 1M on-chip peripheral registers | 26 | * fee00000 f1000000 1M on-chip peripheral registers |
26 | * fef00000 f2000000 1M PCIe I/O space | 27 | * fef00000 f2000000 1M PCIe I/O space |
27 | */ | 28 | */ |
28 | 29 | ||
30 | #define KIRKWOOD_SRAM_PHYS_BASE 0xf4000000 | ||
31 | #define KIRKWOOD_SRAM_SIZE SZ_2K | ||
32 | |||
29 | #define KIRKWOOD_NAND_MEM_PHYS_BASE 0xf3000000 | 33 | #define KIRKWOOD_NAND_MEM_PHYS_BASE 0xf3000000 |
30 | #define KIRKWOOD_NAND_MEM_SIZE SZ_64K /* 1K is sufficient, but 64K | 34 | #define KIRKWOOD_NAND_MEM_SIZE SZ_1K |
31 | * is the minimal window size | ||
32 | */ | ||
33 | 35 | ||
34 | #define KIRKWOOD_PCIE_IO_PHYS_BASE 0xf2000000 | 36 | #define KIRKWOOD_PCIE_IO_PHYS_BASE 0xf2000000 |
35 | #define KIRKWOOD_PCIE_IO_VIRT_BASE 0xfef00000 | 37 | #define KIRKWOOD_PCIE_IO_VIRT_BASE 0xfef00000 |
@@ -48,6 +50,7 @@ | |||
48 | */ | 50 | */ |
49 | #define DDR_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE | 0x00000) | 51 | #define DDR_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE | 0x00000) |
50 | #define DDR_WINDOW_CPU_BASE (DDR_VIRT_BASE | 0x1500) | 52 | #define DDR_WINDOW_CPU_BASE (DDR_VIRT_BASE | 0x1500) |
53 | #define DDR_OPERATION_BASE (DDR_VIRT_BASE | 0x1418) | ||
51 | 54 | ||
52 | #define DEV_BUS_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x10000) | 55 | #define DEV_BUS_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x10000) |
53 | #define DEV_BUS_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE | 0x10000) | 56 | #define DEV_BUS_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE | 0x10000) |
@@ -63,7 +66,11 @@ | |||
63 | 66 | ||
64 | #define BRIDGE_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE | 0x20000) | 67 | #define BRIDGE_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE | 0x20000) |
65 | 68 | ||
69 | #define CRYPTO_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x30000) | ||
70 | |||
66 | #define PCIE_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE | 0x40000) | 71 | #define PCIE_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE | 0x40000) |
72 | #define PCIE_LINK_CTRL (PCIE_VIRT_BASE | 0x70) | ||
73 | #define PCIE_STATUS (PCIE_VIRT_BASE | 0x1a04) | ||
67 | 74 | ||
68 | #define USB_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x50000) | 75 | #define USB_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x50000) |
69 | 76 | ||
@@ -80,6 +87,11 @@ | |||
80 | #define GE01_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x74000) | 87 | #define GE01_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x74000) |
81 | 88 | ||
82 | #define SATA_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x80000) | 89 | #define SATA_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x80000) |
90 | #define SATA_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE | 0x80000) | ||
91 | #define SATA0_IF_CTRL (SATA_VIRT_BASE | 0x2050) | ||
92 | #define SATA0_PHY_MODE_2 (SATA_VIRT_BASE | 0x2330) | ||
93 | #define SATA1_IF_CTRL (SATA_VIRT_BASE | 0x4050) | ||
94 | #define SATA1_PHY_MODE_2 (SATA_VIRT_BASE | 0x4330) | ||
83 | 95 | ||
84 | #define SDIO_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x90000) | 96 | #define SDIO_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x90000) |
85 | 97 | ||
diff --git a/arch/arm/mach-kirkwood/mpp.c b/arch/arm/mach-kirkwood/mpp.c index 63c44934391a..a5900f64e38c 100644 --- a/arch/arm/mach-kirkwood/mpp.c +++ b/arch/arm/mach-kirkwood/mpp.c | |||
@@ -48,6 +48,9 @@ void __init kirkwood_mpp_conf(unsigned int *mpp_list) | |||
48 | if (!variant_mask) | 48 | if (!variant_mask) |
49 | return; | 49 | return; |
50 | 50 | ||
51 | /* Initialize gpiolib. */ | ||
52 | orion_gpio_init(); | ||
53 | |||
51 | printk(KERN_DEBUG "initial MPP regs:"); | 54 | printk(KERN_DEBUG "initial MPP regs:"); |
52 | for (i = 0; i < MPP_NR_REGS; i++) { | 55 | for (i = 0; i < MPP_NR_REGS; i++) { |
53 | mpp_ctrl[i] = readl(MPP_CTRL(i)); | 56 | mpp_ctrl[i] = readl(MPP_CTRL(i)); |
diff --git a/arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c b/arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c new file mode 100644 index 000000000000..0358f45766cb --- /dev/null +++ b/arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c | |||
@@ -0,0 +1,173 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c | ||
3 | * | ||
4 | * Marvell 88F6281 GTW GE Board Setup | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public | ||
7 | * License version 2. This program is licensed "as is" without any | ||
8 | * warranty of any kind, whether express or implied. | ||
9 | */ | ||
10 | |||
11 | #include <linux/kernel.h> | ||
12 | #include <linux/init.h> | ||
13 | #include <linux/platform_device.h> | ||
14 | #include <linux/pci.h> | ||
15 | #include <linux/irq.h> | ||
16 | #include <linux/mtd/physmap.h> | ||
17 | #include <linux/timer.h> | ||
18 | #include <linux/mv643xx_eth.h> | ||
19 | #include <linux/ethtool.h> | ||
20 | #include <linux/gpio.h> | ||
21 | #include <linux/leds.h> | ||
22 | #include <linux/input.h> | ||
23 | #include <linux/gpio_keys.h> | ||
24 | #include <linux/spi/flash.h> | ||
25 | #include <linux/spi/spi.h> | ||
26 | #include <linux/spi/orion_spi.h> | ||
27 | #include <net/dsa.h> | ||
28 | #include <asm/mach-types.h> | ||
29 | #include <asm/mach/arch.h> | ||
30 | #include <asm/mach/pci.h> | ||
31 | #include <mach/kirkwood.h> | ||
32 | #include "common.h" | ||
33 | #include "mpp.h" | ||
34 | |||
35 | static struct mv643xx_eth_platform_data mv88f6281gtw_ge_ge00_data = { | ||
36 | .phy_addr = MV643XX_ETH_PHY_NONE, | ||
37 | .speed = SPEED_1000, | ||
38 | .duplex = DUPLEX_FULL, | ||
39 | }; | ||
40 | |||
41 | static struct dsa_chip_data mv88f6281gtw_ge_switch_chip_data = { | ||
42 | .port_names[0] = "lan1", | ||
43 | .port_names[1] = "lan2", | ||
44 | .port_names[2] = "lan3", | ||
45 | .port_names[3] = "lan4", | ||
46 | .port_names[4] = "wan", | ||
47 | .port_names[5] = "cpu", | ||
48 | }; | ||
49 | |||
50 | static struct dsa_platform_data mv88f6281gtw_ge_switch_plat_data = { | ||
51 | .nr_chips = 1, | ||
52 | .chip = &mv88f6281gtw_ge_switch_chip_data, | ||
53 | }; | ||
54 | |||
55 | static const struct flash_platform_data mv88f6281gtw_ge_spi_slave_data = { | ||
56 | .type = "mx25l12805d", | ||
57 | }; | ||
58 | |||
59 | static struct spi_board_info __initdata mv88f6281gtw_ge_spi_slave_info[] = { | ||
60 | { | ||
61 | .modalias = "m25p80", | ||
62 | .platform_data = &mv88f6281gtw_ge_spi_slave_data, | ||
63 | .irq = -1, | ||
64 | .max_speed_hz = 50000000, | ||
65 | .bus_num = 0, | ||
66 | .chip_select = 0, | ||
67 | }, | ||
68 | }; | ||
69 | |||
70 | static struct gpio_keys_button mv88f6281gtw_ge_button_pins[] = { | ||
71 | { | ||
72 | .code = KEY_RESTART, | ||
73 | .gpio = 47, | ||
74 | .desc = "SWR Button", | ||
75 | .active_low = 1, | ||
76 | }, { | ||
77 | .code = KEY_F1, | ||
78 | .gpio = 46, | ||
79 | .desc = "WPS Button(F1)", | ||
80 | .active_low = 1, | ||
81 | }, | ||
82 | }; | ||
83 | |||
84 | static struct gpio_keys_platform_data mv88f6281gtw_ge_button_data = { | ||
85 | .buttons = mv88f6281gtw_ge_button_pins, | ||
86 | .nbuttons = ARRAY_SIZE(mv88f6281gtw_ge_button_pins), | ||
87 | }; | ||
88 | |||
89 | static struct platform_device mv88f6281gtw_ge_buttons = { | ||
90 | .name = "gpio-keys", | ||
91 | .id = -1, | ||
92 | .num_resources = 0, | ||
93 | .dev = { | ||
94 | .platform_data = &mv88f6281gtw_ge_button_data, | ||
95 | }, | ||
96 | }; | ||
97 | |||
98 | static struct gpio_led mv88f6281gtw_ge_led_pins[] = { | ||
99 | { | ||
100 | .name = "gtw:green:Status", | ||
101 | .gpio = 20, | ||
102 | .active_low = 0, | ||
103 | }, { | ||
104 | .name = "gtw:red:Status", | ||
105 | .gpio = 21, | ||
106 | .active_low = 0, | ||
107 | }, { | ||
108 | .name = "gtw:green:USB", | ||
109 | .gpio = 12, | ||
110 | .active_low = 0, | ||
111 | }, | ||
112 | }; | ||
113 | |||
114 | static struct gpio_led_platform_data mv88f6281gtw_ge_led_data = { | ||
115 | .leds = mv88f6281gtw_ge_led_pins, | ||
116 | .num_leds = ARRAY_SIZE(mv88f6281gtw_ge_led_pins), | ||
117 | }; | ||
118 | |||
119 | static struct platform_device mv88f6281gtw_ge_leds = { | ||
120 | .name = "leds-gpio", | ||
121 | .id = -1, | ||
122 | .dev = { | ||
123 | .platform_data = &mv88f6281gtw_ge_led_data, | ||
124 | }, | ||
125 | }; | ||
126 | |||
127 | static unsigned int mv88f6281gtw_ge_mpp_config[] __initdata = { | ||
128 | MPP12_GPO, /* Status#_USB pin */ | ||
129 | MPP20_GPIO, /* Status#_GLED pin */ | ||
130 | MPP21_GPIO, /* Status#_RLED pin */ | ||
131 | MPP46_GPIO, /* WPS_Switch pin */ | ||
132 | MPP47_GPIO, /* SW_Init pin */ | ||
133 | 0 | ||
134 | }; | ||
135 | |||
136 | static void __init mv88f6281gtw_ge_init(void) | ||
137 | { | ||
138 | /* | ||
139 | * Basic setup. Needs to be called early. | ||
140 | */ | ||
141 | kirkwood_init(); | ||
142 | kirkwood_mpp_conf(mv88f6281gtw_ge_mpp_config); | ||
143 | |||
144 | kirkwood_ehci_init(); | ||
145 | kirkwood_ge00_init(&mv88f6281gtw_ge_ge00_data); | ||
146 | kirkwood_ge00_switch_init(&mv88f6281gtw_ge_switch_plat_data, NO_IRQ); | ||
147 | spi_register_board_info(mv88f6281gtw_ge_spi_slave_info, | ||
148 | ARRAY_SIZE(mv88f6281gtw_ge_spi_slave_info)); | ||
149 | kirkwood_spi_init(); | ||
150 | kirkwood_uart0_init(); | ||
151 | platform_device_register(&mv88f6281gtw_ge_leds); | ||
152 | platform_device_register(&mv88f6281gtw_ge_buttons); | ||
153 | } | ||
154 | |||
155 | static int __init mv88f6281gtw_ge_pci_init(void) | ||
156 | { | ||
157 | if (machine_is_mv88f6281gtw_ge()) | ||
158 | kirkwood_pcie_init(); | ||
159 | |||
160 | return 0; | ||
161 | } | ||
162 | subsys_initcall(mv88f6281gtw_ge_pci_init); | ||
163 | |||
164 | MACHINE_START(MV88F6281GTW_GE, "Marvell 88F6281 GTW GE Board") | ||
165 | /* Maintainer: Lennert Buytenhek <buytenh@marvell.com> */ | ||
166 | .phys_io = KIRKWOOD_REGS_PHYS_BASE, | ||
167 | .io_pg_offst = ((KIRKWOOD_REGS_VIRT_BASE) >> 18) & 0xfffc, | ||
168 | .boot_params = 0x00000100, | ||
169 | .init_machine = mv88f6281gtw_ge_init, | ||
170 | .map_io = kirkwood_map_io, | ||
171 | .init_irq = kirkwood_init_irq, | ||
172 | .timer = &kirkwood_timer, | ||
173 | MACHINE_END | ||
diff --git a/arch/arm/mach-kirkwood/pcie.c b/arch/arm/mach-kirkwood/pcie.c index 73fccacd1a73..d90b9aae308d 100644 --- a/arch/arm/mach-kirkwood/pcie.c +++ b/arch/arm/mach-kirkwood/pcie.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <asm/irq.h> | 14 | #include <asm/irq.h> |
15 | #include <asm/mach/pci.h> | 15 | #include <asm/mach/pci.h> |
16 | #include <plat/pcie.h> | 16 | #include <plat/pcie.h> |
17 | #include <mach/bridge-regs.h> | ||
17 | #include "common.h" | 18 | #include "common.h" |
18 | 19 | ||
19 | 20 | ||
@@ -95,6 +96,7 @@ static struct pci_ops pcie_ops = { | |||
95 | static int kirkwood_pcie_setup(int nr, struct pci_sys_data *sys) | 96 | static int kirkwood_pcie_setup(int nr, struct pci_sys_data *sys) |
96 | { | 97 | { |
97 | struct resource *res; | 98 | struct resource *res; |
99 | extern unsigned int kirkwood_clk_ctrl; | ||
98 | 100 | ||
99 | /* | 101 | /* |
100 | * Generic PCIe unit setup. | 102 | * Generic PCIe unit setup. |
@@ -133,6 +135,8 @@ static int kirkwood_pcie_setup(int nr, struct pci_sys_data *sys) | |||
133 | sys->resource[2] = NULL; | 135 | sys->resource[2] = NULL; |
134 | sys->io_offset = 0; | 136 | sys->io_offset = 0; |
135 | 137 | ||
138 | kirkwood_clk_ctrl |= CGC_PEX0; | ||
139 | |||
136 | return 1; | 140 | return 1; |
137 | } | 141 | } |
138 | 142 | ||
diff --git a/arch/arm/mach-kirkwood/rd88f6192-nas-setup.c b/arch/arm/mach-kirkwood/rd88f6192-nas-setup.c index 2f0e4ef3db0f..8bf4153d0840 100644 --- a/arch/arm/mach-kirkwood/rd88f6192-nas-setup.c +++ b/arch/arm/mach-kirkwood/rd88f6192-nas-setup.c | |||
@@ -11,8 +11,6 @@ | |||
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
14 | #include <linux/mtd/nand.h> | ||
15 | #include <linux/mtd/partitions.h> | ||
16 | #include <linux/ata_platform.h> | 14 | #include <linux/ata_platform.h> |
17 | #include <linux/mv643xx_eth.h> | 15 | #include <linux/mv643xx_eth.h> |
18 | #include <linux/spi/flash.h> | 16 | #include <linux/spi/flash.h> |
diff --git a/arch/arm/mach-kirkwood/rd88f6281-setup.c b/arch/arm/mach-kirkwood/rd88f6281-setup.c index 31e996d65fc4..31708ddbc83e 100644 --- a/arch/arm/mach-kirkwood/rd88f6281-setup.c +++ b/arch/arm/mach-kirkwood/rd88f6281-setup.c | |||
@@ -12,7 +12,6 @@ | |||
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
14 | #include <linux/irq.h> | 14 | #include <linux/irq.h> |
15 | #include <linux/mtd/nand.h> | ||
16 | #include <linux/mtd/partitions.h> | 15 | #include <linux/mtd/partitions.h> |
17 | #include <linux/ata_platform.h> | 16 | #include <linux/ata_platform.h> |
18 | #include <linux/mv643xx_eth.h> | 17 | #include <linux/mv643xx_eth.h> |
@@ -22,7 +21,6 @@ | |||
22 | #include <asm/mach/arch.h> | 21 | #include <asm/mach/arch.h> |
23 | #include <mach/kirkwood.h> | 22 | #include <mach/kirkwood.h> |
24 | #include <plat/mvsdio.h> | 23 | #include <plat/mvsdio.h> |
25 | #include <plat/orion_nand.h> | ||
26 | #include "common.h" | 24 | #include "common.h" |
27 | #include "mpp.h" | 25 | #include "mpp.h" |
28 | 26 | ||
@@ -42,32 +40,6 @@ static struct mtd_partition rd88f6281_nand_parts[] = { | |||
42 | }, | 40 | }, |
43 | }; | 41 | }; |
44 | 42 | ||
45 | static struct resource rd88f6281_nand_resource = { | ||
46 | .flags = IORESOURCE_MEM, | ||
47 | .start = KIRKWOOD_NAND_MEM_PHYS_BASE, | ||
48 | .end = KIRKWOOD_NAND_MEM_PHYS_BASE + | ||
49 | KIRKWOOD_NAND_MEM_SIZE - 1, | ||
50 | }; | ||
51 | |||
52 | static struct orion_nand_data rd88f6281_nand_data = { | ||
53 | .parts = rd88f6281_nand_parts, | ||
54 | .nr_parts = ARRAY_SIZE(rd88f6281_nand_parts), | ||
55 | .cle = 0, | ||
56 | .ale = 1, | ||
57 | .width = 8, | ||
58 | .chip_delay = 25, | ||
59 | }; | ||
60 | |||
61 | static struct platform_device rd88f6281_nand_flash = { | ||
62 | .name = "orion_nand", | ||
63 | .id = -1, | ||
64 | .dev = { | ||
65 | .platform_data = &rd88f6281_nand_data, | ||
66 | }, | ||
67 | .resource = &rd88f6281_nand_resource, | ||
68 | .num_resources = 1, | ||
69 | }; | ||
70 | |||
71 | static struct mv643xx_eth_platform_data rd88f6281_ge00_data = { | 43 | static struct mv643xx_eth_platform_data rd88f6281_ge00_data = { |
72 | .phy_addr = MV643XX_ETH_PHY_NONE, | 44 | .phy_addr = MV643XX_ETH_PHY_NONE, |
73 | .speed = SPEED_1000, | 45 | .speed = SPEED_1000, |
@@ -114,6 +86,7 @@ static void __init rd88f6281_init(void) | |||
114 | kirkwood_init(); | 86 | kirkwood_init(); |
115 | kirkwood_mpp_conf(rd88f6281_mpp_config); | 87 | kirkwood_mpp_conf(rd88f6281_mpp_config); |
116 | 88 | ||
89 | kirkwood_nand_init(ARRAY_AND_SIZE(rd88f6281_nand_parts), 25); | ||
117 | kirkwood_ehci_init(); | 90 | kirkwood_ehci_init(); |
118 | 91 | ||
119 | kirkwood_ge00_init(&rd88f6281_ge00_data); | 92 | kirkwood_ge00_init(&rd88f6281_ge00_data); |
@@ -129,8 +102,6 @@ static void __init rd88f6281_init(void) | |||
129 | kirkwood_sata_init(&rd88f6281_sata_data); | 102 | kirkwood_sata_init(&rd88f6281_sata_data); |
130 | kirkwood_sdio_init(&rd88f6281_mvsdio_data); | 103 | kirkwood_sdio_init(&rd88f6281_mvsdio_data); |
131 | kirkwood_uart0_init(); | 104 | kirkwood_uart0_init(); |
132 | |||
133 | platform_device_register(&rd88f6281_nand_flash); | ||
134 | } | 105 | } |
135 | 106 | ||
136 | static int __init rd88f6281_pci_init(void) | 107 | static int __init rd88f6281_pci_init(void) |
diff --git a/arch/arm/mach-kirkwood/sheevaplug-setup.c b/arch/arm/mach-kirkwood/sheevaplug-setup.c index 831e4a56cae1..c7319eeac8bb 100644 --- a/arch/arm/mach-kirkwood/sheevaplug-setup.c +++ b/arch/arm/mach-kirkwood/sheevaplug-setup.c | |||
@@ -11,7 +11,6 @@ | |||
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
14 | #include <linux/mtd/nand.h> | ||
15 | #include <linux/mtd/partitions.h> | 14 | #include <linux/mtd/partitions.h> |
16 | #include <linux/mv643xx_eth.h> | 15 | #include <linux/mv643xx_eth.h> |
17 | #include <linux/gpio.h> | 16 | #include <linux/gpio.h> |
@@ -20,7 +19,6 @@ | |||
20 | #include <asm/mach/arch.h> | 19 | #include <asm/mach/arch.h> |
21 | #include <mach/kirkwood.h> | 20 | #include <mach/kirkwood.h> |
22 | #include <plat/mvsdio.h> | 21 | #include <plat/mvsdio.h> |
23 | #include <plat/orion_nand.h> | ||
24 | #include "common.h" | 22 | #include "common.h" |
25 | #include "mpp.h" | 23 | #include "mpp.h" |
26 | 24 | ||
@@ -40,38 +38,12 @@ static struct mtd_partition sheevaplug_nand_parts[] = { | |||
40 | }, | 38 | }, |
41 | }; | 39 | }; |
42 | 40 | ||
43 | static struct resource sheevaplug_nand_resource = { | ||
44 | .flags = IORESOURCE_MEM, | ||
45 | .start = KIRKWOOD_NAND_MEM_PHYS_BASE, | ||
46 | .end = KIRKWOOD_NAND_MEM_PHYS_BASE + | ||
47 | KIRKWOOD_NAND_MEM_SIZE - 1, | ||
48 | }; | ||
49 | |||
50 | static struct orion_nand_data sheevaplug_nand_data = { | ||
51 | .parts = sheevaplug_nand_parts, | ||
52 | .nr_parts = ARRAY_SIZE(sheevaplug_nand_parts), | ||
53 | .cle = 0, | ||
54 | .ale = 1, | ||
55 | .width = 8, | ||
56 | .chip_delay = 25, | ||
57 | }; | ||
58 | |||
59 | static struct platform_device sheevaplug_nand_flash = { | ||
60 | .name = "orion_nand", | ||
61 | .id = -1, | ||
62 | .dev = { | ||
63 | .platform_data = &sheevaplug_nand_data, | ||
64 | }, | ||
65 | .resource = &sheevaplug_nand_resource, | ||
66 | .num_resources = 1, | ||
67 | }; | ||
68 | |||
69 | static struct mv643xx_eth_platform_data sheevaplug_ge00_data = { | 41 | static struct mv643xx_eth_platform_data sheevaplug_ge00_data = { |
70 | .phy_addr = MV643XX_ETH_PHY_ADDR(0), | 42 | .phy_addr = MV643XX_ETH_PHY_ADDR(0), |
71 | }; | 43 | }; |
72 | 44 | ||
73 | static struct mvsdio_platform_data sheevaplug_mvsdio_data = { | 45 | static struct mvsdio_platform_data sheevaplug_mvsdio_data = { |
74 | // unfortunately the CD signal has not been connected */ | 46 | /* unfortunately the CD signal has not been connected */ |
75 | }; | 47 | }; |
76 | 48 | ||
77 | static struct gpio_led sheevaplug_led_pins[] = { | 49 | static struct gpio_led sheevaplug_led_pins[] = { |
@@ -111,6 +83,7 @@ static void __init sheevaplug_init(void) | |||
111 | kirkwood_mpp_conf(sheevaplug_mpp_config); | 83 | kirkwood_mpp_conf(sheevaplug_mpp_config); |
112 | 84 | ||
113 | kirkwood_uart0_init(); | 85 | kirkwood_uart0_init(); |
86 | kirkwood_nand_init(ARRAY_AND_SIZE(sheevaplug_nand_parts), 25); | ||
114 | 87 | ||
115 | if (gpio_request(29, "USB Power Enable") != 0 || | 88 | if (gpio_request(29, "USB Power Enable") != 0 || |
116 | gpio_direction_output(29, 1) != 0) | 89 | gpio_direction_output(29, 1) != 0) |
@@ -120,7 +93,6 @@ static void __init sheevaplug_init(void) | |||
120 | kirkwood_ge00_init(&sheevaplug_ge00_data); | 93 | kirkwood_ge00_init(&sheevaplug_ge00_data); |
121 | kirkwood_sdio_init(&sheevaplug_mvsdio_data); | 94 | kirkwood_sdio_init(&sheevaplug_mvsdio_data); |
122 | 95 | ||
123 | platform_device_register(&sheevaplug_nand_flash); | ||
124 | platform_device_register(&sheevaplug_leds); | 96 | platform_device_register(&sheevaplug_leds); |
125 | } | 97 | } |
126 | 98 | ||
diff --git a/arch/arm/mach-kirkwood/ts219-setup.c b/arch/arm/mach-kirkwood/ts219-setup.c index dda5743cf3e0..01aa213c0a6f 100644 --- a/arch/arm/mach-kirkwood/ts219-setup.c +++ b/arch/arm/mach-kirkwood/ts219-setup.c | |||
@@ -142,6 +142,8 @@ static unsigned int qnap_ts219_mpp_config[] __initdata = { | |||
142 | MPP1_SPI_MOSI, | 142 | MPP1_SPI_MOSI, |
143 | MPP2_SPI_SCK, | 143 | MPP2_SPI_SCK, |
144 | MPP3_SPI_MISO, | 144 | MPP3_SPI_MISO, |
145 | MPP4_SATA1_ACTn, | ||
146 | MPP5_SATA0_ACTn, | ||
145 | MPP8_TW_SDA, | 147 | MPP8_TW_SDA, |
146 | MPP9_TW_SCK, | 148 | MPP9_TW_SCK, |
147 | MPP10_UART0_TXD, | 149 | MPP10_UART0_TXD, |
@@ -150,10 +152,6 @@ static unsigned int qnap_ts219_mpp_config[] __initdata = { | |||
150 | MPP14_UART1_RXD, /* PIC controller */ | 152 | MPP14_UART1_RXD, /* PIC controller */ |
151 | MPP15_GPIO, /* USB Copy button */ | 153 | MPP15_GPIO, /* USB Copy button */ |
152 | MPP16_GPIO, /* Reset button */ | 154 | MPP16_GPIO, /* Reset button */ |
153 | MPP20_SATA1_ACTn, | ||
154 | MPP21_SATA0_ACTn, | ||
155 | MPP22_SATA1_PRESENTn, | ||
156 | MPP23_SATA0_PRESENTn, | ||
157 | 0 | 155 | 0 |
158 | }; | 156 | }; |
159 | 157 | ||
diff --git a/arch/arm/mach-loki/common.c b/arch/arm/mach-loki/common.c index c0d2d9d12e74..818f19d7ab1f 100644 --- a/arch/arm/mach-loki/common.c +++ b/arch/arm/mach-loki/common.c | |||
@@ -82,6 +82,9 @@ static struct platform_device loki_ge0 = { | |||
82 | .id = 0, | 82 | .id = 0, |
83 | .num_resources = 1, | 83 | .num_resources = 1, |
84 | .resource = loki_ge0_resources, | 84 | .resource = loki_ge0_resources, |
85 | .dev = { | ||
86 | .coherent_dma_mask = 0xffffffff, | ||
87 | }, | ||
85 | }; | 88 | }; |
86 | 89 | ||
87 | void __init loki_ge0_init(struct mv643xx_eth_platform_data *eth_data) | 90 | void __init loki_ge0_init(struct mv643xx_eth_platform_data *eth_data) |
@@ -136,6 +139,9 @@ static struct platform_device loki_ge1 = { | |||
136 | .id = 1, | 139 | .id = 1, |
137 | .num_resources = 1, | 140 | .num_resources = 1, |
138 | .resource = loki_ge1_resources, | 141 | .resource = loki_ge1_resources, |
142 | .dev = { | ||
143 | .coherent_dma_mask = 0xffffffff, | ||
144 | }, | ||
139 | }; | 145 | }; |
140 | 146 | ||
141 | void __init loki_ge1_init(struct mv643xx_eth_platform_data *eth_data) | 147 | void __init loki_ge1_init(struct mv643xx_eth_platform_data *eth_data) |
diff --git a/arch/arm/mach-mmp/include/mach/mfp-pxa168.h b/arch/arm/mach-mmp/include/mach/mfp-pxa168.h index d0bdb6e3682b..2e914649b9e4 100644 --- a/arch/arm/mach-mmp/include/mach/mfp-pxa168.h +++ b/arch/arm/mach-mmp/include/mach/mfp-pxa168.h | |||
@@ -3,6 +3,11 @@ | |||
3 | 3 | ||
4 | #include <mach/mfp.h> | 4 | #include <mach/mfp.h> |
5 | 5 | ||
6 | #define MFP_DRIVE_VERY_SLOW (0x0 << 13) | ||
7 | #define MFP_DRIVE_SLOW (0x1 << 13) | ||
8 | #define MFP_DRIVE_MEDIUM (0x2 << 13) | ||
9 | #define MFP_DRIVE_FAST (0x3 << 13) | ||
10 | |||
6 | /* GPIO */ | 11 | /* GPIO */ |
7 | #define GPIO0_GPIO MFP_CFG(GPIO0, AF5) | 12 | #define GPIO0_GPIO MFP_CFG(GPIO0, AF5) |
8 | #define GPIO1_GPIO MFP_CFG(GPIO1, AF5) | 13 | #define GPIO1_GPIO MFP_CFG(GPIO1, AF5) |
diff --git a/arch/arm/mach-mmp/include/mach/mfp-pxa910.h b/arch/arm/mach-mmp/include/mach/mfp-pxa910.h index 48a1cbc7c56b..d97de36c50ad 100644 --- a/arch/arm/mach-mmp/include/mach/mfp-pxa910.h +++ b/arch/arm/mach-mmp/include/mach/mfp-pxa910.h | |||
@@ -3,6 +3,11 @@ | |||
3 | 3 | ||
4 | #include <mach/mfp.h> | 4 | #include <mach/mfp.h> |
5 | 5 | ||
6 | #define MFP_DRIVE_VERY_SLOW (0x0 << 13) | ||
7 | #define MFP_DRIVE_SLOW (0x2 << 13) | ||
8 | #define MFP_DRIVE_MEDIUM (0x4 << 13) | ||
9 | #define MFP_DRIVE_FAST (0x8 << 13) | ||
10 | |||
6 | /* UART2 */ | 11 | /* UART2 */ |
7 | #define GPIO47_UART2_RXD MFP_CFG(GPIO47, AF6) | 12 | #define GPIO47_UART2_RXD MFP_CFG(GPIO47, AF6) |
8 | #define GPIO48_UART2_TXD MFP_CFG(GPIO48, AF6) | 13 | #define GPIO48_UART2_TXD MFP_CFG(GPIO48, AF6) |
diff --git a/arch/arm/mach-mmp/include/mach/mfp.h b/arch/arm/mach-mmp/include/mach/mfp.h index 277ea4cd0f9f..62e510e80a58 100644 --- a/arch/arm/mach-mmp/include/mach/mfp.h +++ b/arch/arm/mach-mmp/include/mach/mfp.h | |||
@@ -12,16 +12,13 @@ | |||
12 | * possible, we make the following compromise: | 12 | * possible, we make the following compromise: |
13 | * | 13 | * |
14 | * 1. SLEEP_OE_N will always be programmed to '1' (by MFP_LPM_FLOAT) | 14 | * 1. SLEEP_OE_N will always be programmed to '1' (by MFP_LPM_FLOAT) |
15 | * 2. DRIVE strength definitions redefined to include the reserved bit10 | 15 | * 2. DRIVE strength definitions redefined to include the reserved bit |
16 | * - the reserved bit differs between pxa168 and pxa910, and the | ||
17 | * MFP_DRIVE_* macros are individually defined in mfp-pxa{168,910}.h | ||
16 | * 3. Override MFP_CFG() and MFP_CFG_DRV() | 18 | * 3. Override MFP_CFG() and MFP_CFG_DRV() |
17 | * 4. Drop the use of MFP_CFG_LPM() and MFP_CFG_X() | 19 | * 4. Drop the use of MFP_CFG_LPM() and MFP_CFG_X() |
18 | */ | 20 | */ |
19 | 21 | ||
20 | #define MFP_DRIVE_VERY_SLOW (0x0 << 13) | ||
21 | #define MFP_DRIVE_SLOW (0x2 << 13) | ||
22 | #define MFP_DRIVE_MEDIUM (0x4 << 13) | ||
23 | #define MFP_DRIVE_FAST (0x8 << 13) | ||
24 | |||
25 | #undef MFP_CFG | 22 | #undef MFP_CFG |
26 | #undef MFP_CFG_DRV | 23 | #undef MFP_CFG_DRV |
27 | #undef MFP_CFG_LPM | 24 | #undef MFP_CFG_LPM |
diff --git a/arch/arm/mach-mmp/time.c b/arch/arm/mach-mmp/time.c index b03a6eda7419..a8400bb891e7 100644 --- a/arch/arm/mach-mmp/time.c +++ b/arch/arm/mach-mmp/time.c | |||
@@ -136,7 +136,7 @@ static struct clock_event_device ckevt = { | |||
136 | .set_mode = timer_set_mode, | 136 | .set_mode = timer_set_mode, |
137 | }; | 137 | }; |
138 | 138 | ||
139 | static cycle_t clksrc_read(void) | 139 | static cycle_t clksrc_read(struct clocksource *cs) |
140 | { | 140 | { |
141 | return timer_read(); | 141 | return timer_read(); |
142 | } | 142 | } |
diff --git a/arch/arm/mach-mv78xx0/common.c b/arch/arm/mach-mv78xx0/common.c index 9ba595083dab..1b22e4af8791 100644 --- a/arch/arm/mach-mv78xx0/common.c +++ b/arch/arm/mach-mv78xx0/common.c | |||
@@ -321,6 +321,9 @@ static struct platform_device mv78xx0_ge00 = { | |||
321 | .id = 0, | 321 | .id = 0, |
322 | .num_resources = 1, | 322 | .num_resources = 1, |
323 | .resource = mv78xx0_ge00_resources, | 323 | .resource = mv78xx0_ge00_resources, |
324 | .dev = { | ||
325 | .coherent_dma_mask = 0xffffffff, | ||
326 | }, | ||
324 | }; | 327 | }; |
325 | 328 | ||
326 | void __init mv78xx0_ge00_init(struct mv643xx_eth_platform_data *eth_data) | 329 | void __init mv78xx0_ge00_init(struct mv643xx_eth_platform_data *eth_data) |
@@ -375,6 +378,9 @@ static struct platform_device mv78xx0_ge01 = { | |||
375 | .id = 1, | 378 | .id = 1, |
376 | .num_resources = 1, | 379 | .num_resources = 1, |
377 | .resource = mv78xx0_ge01_resources, | 380 | .resource = mv78xx0_ge01_resources, |
381 | .dev = { | ||
382 | .coherent_dma_mask = 0xffffffff, | ||
383 | }, | ||
378 | }; | 384 | }; |
379 | 385 | ||
380 | void __init mv78xx0_ge01_init(struct mv643xx_eth_platform_data *eth_data) | 386 | void __init mv78xx0_ge01_init(struct mv643xx_eth_platform_data *eth_data) |
@@ -429,6 +435,9 @@ static struct platform_device mv78xx0_ge10 = { | |||
429 | .id = 2, | 435 | .id = 2, |
430 | .num_resources = 1, | 436 | .num_resources = 1, |
431 | .resource = mv78xx0_ge10_resources, | 437 | .resource = mv78xx0_ge10_resources, |
438 | .dev = { | ||
439 | .coherent_dma_mask = 0xffffffff, | ||
440 | }, | ||
432 | }; | 441 | }; |
433 | 442 | ||
434 | void __init mv78xx0_ge10_init(struct mv643xx_eth_platform_data *eth_data) | 443 | void __init mv78xx0_ge10_init(struct mv643xx_eth_platform_data *eth_data) |
@@ -496,6 +505,9 @@ static struct platform_device mv78xx0_ge11 = { | |||
496 | .id = 3, | 505 | .id = 3, |
497 | .num_resources = 1, | 506 | .num_resources = 1, |
498 | .resource = mv78xx0_ge11_resources, | 507 | .resource = mv78xx0_ge11_resources, |
508 | .dev = { | ||
509 | .coherent_dma_mask = 0xffffffff, | ||
510 | }, | ||
499 | }; | 511 | }; |
500 | 512 | ||
501 | void __init mv78xx0_ge11_init(struct mv643xx_eth_platform_data *eth_data) | 513 | void __init mv78xx0_ge11_init(struct mv643xx_eth_platform_data *eth_data) |
@@ -532,12 +544,10 @@ static struct mv64xxx_i2c_pdata mv78xx0_i2c_0_pdata = { | |||
532 | 544 | ||
533 | static struct resource mv78xx0_i2c_0_resources[] = { | 545 | static struct resource mv78xx0_i2c_0_resources[] = { |
534 | { | 546 | { |
535 | .name = "i2c 0 base", | ||
536 | .start = I2C_0_PHYS_BASE, | 547 | .start = I2C_0_PHYS_BASE, |
537 | .end = I2C_0_PHYS_BASE + 0x1f, | 548 | .end = I2C_0_PHYS_BASE + 0x1f, |
538 | .flags = IORESOURCE_MEM, | 549 | .flags = IORESOURCE_MEM, |
539 | }, { | 550 | }, { |
540 | .name = "i2c 0 irq", | ||
541 | .start = IRQ_MV78XX0_I2C_0, | 551 | .start = IRQ_MV78XX0_I2C_0, |
542 | .end = IRQ_MV78XX0_I2C_0, | 552 | .end = IRQ_MV78XX0_I2C_0, |
543 | .flags = IORESOURCE_IRQ, | 553 | .flags = IORESOURCE_IRQ, |
@@ -567,12 +577,10 @@ static struct mv64xxx_i2c_pdata mv78xx0_i2c_1_pdata = { | |||
567 | 577 | ||
568 | static struct resource mv78xx0_i2c_1_resources[] = { | 578 | static struct resource mv78xx0_i2c_1_resources[] = { |
569 | { | 579 | { |
570 | .name = "i2c 1 base", | ||
571 | .start = I2C_1_PHYS_BASE, | 580 | .start = I2C_1_PHYS_BASE, |
572 | .end = I2C_1_PHYS_BASE + 0x1f, | 581 | .end = I2C_1_PHYS_BASE + 0x1f, |
573 | .flags = IORESOURCE_MEM, | 582 | .flags = IORESOURCE_MEM, |
574 | }, { | 583 | }, { |
575 | .name = "i2c 1 irq", | ||
576 | .start = IRQ_MV78XX0_I2C_1, | 584 | .start = IRQ_MV78XX0_I2C_1, |
577 | .end = IRQ_MV78XX0_I2C_1, | 585 | .end = IRQ_MV78XX0_I2C_1, |
578 | .flags = IORESOURCE_IRQ, | 586 | .flags = IORESOURCE_IRQ, |
diff --git a/arch/arm/mach-mv78xx0/irq.c b/arch/arm/mach-mv78xx0/irq.c index f289b0ea7dcf..22b4ff893b3c 100644 --- a/arch/arm/mach-mv78xx0/irq.c +++ b/arch/arm/mach-mv78xx0/irq.c | |||
@@ -28,6 +28,9 @@ void __init mv78xx0_init_irq(void) | |||
28 | { | 28 | { |
29 | int i; | 29 | int i; |
30 | 30 | ||
31 | /* Initialize gpiolib. */ | ||
32 | orion_gpio_init(); | ||
33 | |||
31 | orion_irq_init(0, (void __iomem *)(IRQ_VIRT_BASE + IRQ_MASK_LOW_OFF)); | 34 | orion_irq_init(0, (void __iomem *)(IRQ_VIRT_BASE + IRQ_MASK_LOW_OFF)); |
32 | orion_irq_init(32, (void __iomem *)(IRQ_VIRT_BASE + IRQ_MASK_HIGH_OFF)); | 35 | orion_irq_init(32, (void __iomem *)(IRQ_VIRT_BASE + IRQ_MASK_HIGH_OFF)); |
33 | orion_irq_init(64, (void __iomem *)(IRQ_VIRT_BASE + IRQ_MASK_ERR_OFF)); | 36 | orion_irq_init(64, (void __iomem *)(IRQ_VIRT_BASE + IRQ_MASK_ERR_OFF)); |
diff --git a/arch/arm/mach-orion5x/addr-map.c b/arch/arm/mach-orion5x/addr-map.c index c14d12137276..6f3f77d031d0 100644 --- a/arch/arm/mach-orion5x/addr-map.c +++ b/arch/arm/mach-orion5x/addr-map.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/mbus.h> | 15 | #include <linux/mbus.h> |
16 | #include <linux/io.h> | 16 | #include <linux/io.h> |
17 | #include <linux/errno.h> | ||
17 | #include <mach/hardware.h> | 18 | #include <mach/hardware.h> |
18 | #include "common.h" | 19 | #include "common.h" |
19 | 20 | ||
@@ -44,6 +45,7 @@ | |||
44 | #define TARGET_DEV_BUS 1 | 45 | #define TARGET_DEV_BUS 1 |
45 | #define TARGET_PCI 3 | 46 | #define TARGET_PCI 3 |
46 | #define TARGET_PCIE 4 | 47 | #define TARGET_PCIE 4 |
48 | #define TARGET_SRAM 9 | ||
47 | #define ATTR_PCIE_MEM 0x59 | 49 | #define ATTR_PCIE_MEM 0x59 |
48 | #define ATTR_PCIE_IO 0x51 | 50 | #define ATTR_PCIE_IO 0x51 |
49 | #define ATTR_PCIE_WA 0x79 | 51 | #define ATTR_PCIE_WA 0x79 |
@@ -53,6 +55,7 @@ | |||
53 | #define ATTR_DEV_CS1 0x1d | 55 | #define ATTR_DEV_CS1 0x1d |
54 | #define ATTR_DEV_CS2 0x1b | 56 | #define ATTR_DEV_CS2 0x1b |
55 | #define ATTR_DEV_BOOT 0xf | 57 | #define ATTR_DEV_BOOT 0xf |
58 | #define ATTR_SRAM 0x0 | ||
56 | 59 | ||
57 | /* | 60 | /* |
58 | * Helpers to get DDR bank info | 61 | * Helpers to get DDR bank info |
@@ -87,13 +90,13 @@ static int __init orion5x_cpu_win_can_remap(int win) | |||
87 | return 0; | 90 | return 0; |
88 | } | 91 | } |
89 | 92 | ||
90 | static void __init setup_cpu_win(int win, u32 base, u32 size, | 93 | static int __init setup_cpu_win(int win, u32 base, u32 size, |
91 | u8 target, u8 attr, int remap) | 94 | u8 target, u8 attr, int remap) |
92 | { | 95 | { |
93 | if (win >= 8) { | 96 | if (win >= 8) { |
94 | printk(KERN_ERR "setup_cpu_win: trying to allocate " | 97 | printk(KERN_ERR "setup_cpu_win: trying to allocate " |
95 | "window %d\n", win); | 98 | "window %d\n", win); |
96 | return; | 99 | return -ENOSPC; |
97 | } | 100 | } |
98 | 101 | ||
99 | writel(base & 0xffff0000, CPU_WIN_BASE(win)); | 102 | writel(base & 0xffff0000, CPU_WIN_BASE(win)); |
@@ -107,6 +110,7 @@ static void __init setup_cpu_win(int win, u32 base, u32 size, | |||
107 | writel(remap & 0xffff0000, CPU_WIN_REMAP_LO(win)); | 110 | writel(remap & 0xffff0000, CPU_WIN_REMAP_LO(win)); |
108 | writel(0, CPU_WIN_REMAP_HI(win)); | 111 | writel(0, CPU_WIN_REMAP_HI(win)); |
109 | } | 112 | } |
113 | return 0; | ||
110 | } | 114 | } |
111 | 115 | ||
112 | void __init orion5x_setup_cpu_mbus_bridge(void) | 116 | void __init orion5x_setup_cpu_mbus_bridge(void) |
@@ -193,3 +197,9 @@ void __init orion5x_setup_pcie_wa_win(u32 base, u32 size) | |||
193 | setup_cpu_win(win_alloc_count++, base, size, | 197 | setup_cpu_win(win_alloc_count++, base, size, |
194 | TARGET_PCIE, ATTR_PCIE_WA, -1); | 198 | TARGET_PCIE, ATTR_PCIE_WA, -1); |
195 | } | 199 | } |
200 | |||
201 | int __init orion5x_setup_sram_win(void) | ||
202 | { | ||
203 | return setup_cpu_win(win_alloc_count, ORION5X_SRAM_PHYS_BASE, | ||
204 | ORION5X_SRAM_SIZE, TARGET_SRAM, ATTR_SRAM, -1); | ||
205 | } | ||
diff --git a/arch/arm/mach-orion5x/common.c b/arch/arm/mach-orion5x/common.c index 6af99ddabdfb..eafcc49009ea 100644 --- a/arch/arm/mach-orion5x/common.c +++ b/arch/arm/mach-orion5x/common.c | |||
@@ -31,7 +31,7 @@ | |||
31 | #include <plat/ehci-orion.h> | 31 | #include <plat/ehci-orion.h> |
32 | #include <plat/mv_xor.h> | 32 | #include <plat/mv_xor.h> |
33 | #include <plat/orion_nand.h> | 33 | #include <plat/orion_nand.h> |
34 | #include <plat/orion5x_wdt.h> | 34 | #include <plat/orion_wdt.h> |
35 | #include <plat/time.h> | 35 | #include <plat/time.h> |
36 | #include "common.h" | 36 | #include "common.h" |
37 | 37 | ||
@@ -188,6 +188,9 @@ static struct platform_device orion5x_eth = { | |||
188 | .id = 0, | 188 | .id = 0, |
189 | .num_resources = 1, | 189 | .num_resources = 1, |
190 | .resource = orion5x_eth_resources, | 190 | .resource = orion5x_eth_resources, |
191 | .dev = { | ||
192 | .coherent_dma_mask = 0xffffffff, | ||
193 | }, | ||
191 | }; | 194 | }; |
192 | 195 | ||
193 | void __init orion5x_eth_init(struct mv643xx_eth_platform_data *eth_data) | 196 | void __init orion5x_eth_init(struct mv643xx_eth_platform_data *eth_data) |
@@ -248,12 +251,10 @@ static struct mv64xxx_i2c_pdata orion5x_i2c_pdata = { | |||
248 | 251 | ||
249 | static struct resource orion5x_i2c_resources[] = { | 252 | static struct resource orion5x_i2c_resources[] = { |
250 | { | 253 | { |
251 | .name = "i2c base", | ||
252 | .start = I2C_PHYS_BASE, | 254 | .start = I2C_PHYS_BASE, |
253 | .end = I2C_PHYS_BASE + 0x1f, | 255 | .end = I2C_PHYS_BASE + 0x1f, |
254 | .flags = IORESOURCE_MEM, | 256 | .flags = IORESOURCE_MEM, |
255 | }, { | 257 | }, { |
256 | .name = "i2c irq", | ||
257 | .start = IRQ_ORION5X_I2C, | 258 | .start = IRQ_ORION5X_I2C, |
258 | .end = IRQ_ORION5X_I2C, | 259 | .end = IRQ_ORION5X_I2C, |
259 | .flags = IORESOURCE_IRQ, | 260 | .flags = IORESOURCE_IRQ, |
@@ -535,16 +536,52 @@ void __init orion5x_xor_init(void) | |||
535 | platform_device_register(&orion5x_xor1_channel); | 536 | platform_device_register(&orion5x_xor1_channel); |
536 | } | 537 | } |
537 | 538 | ||
539 | static struct resource orion5x_crypto_res[] = { | ||
540 | { | ||
541 | .name = "regs", | ||
542 | .start = ORION5X_CRYPTO_PHYS_BASE, | ||
543 | .end = ORION5X_CRYPTO_PHYS_BASE + 0xffff, | ||
544 | .flags = IORESOURCE_MEM, | ||
545 | }, { | ||
546 | .name = "sram", | ||
547 | .start = ORION5X_SRAM_PHYS_BASE, | ||
548 | .end = ORION5X_SRAM_PHYS_BASE + SZ_8K - 1, | ||
549 | .flags = IORESOURCE_MEM, | ||
550 | }, { | ||
551 | .name = "crypto interrupt", | ||
552 | .start = IRQ_ORION5X_CESA, | ||
553 | .end = IRQ_ORION5X_CESA, | ||
554 | .flags = IORESOURCE_IRQ, | ||
555 | }, | ||
556 | }; | ||
557 | |||
558 | static struct platform_device orion5x_crypto_device = { | ||
559 | .name = "mv_crypto", | ||
560 | .id = -1, | ||
561 | .num_resources = ARRAY_SIZE(orion5x_crypto_res), | ||
562 | .resource = orion5x_crypto_res, | ||
563 | }; | ||
564 | |||
565 | int __init orion5x_crypto_init(void) | ||
566 | { | ||
567 | int ret; | ||
568 | |||
569 | ret = orion5x_setup_sram_win(); | ||
570 | if (ret) | ||
571 | return ret; | ||
572 | |||
573 | return platform_device_register(&orion5x_crypto_device); | ||
574 | } | ||
538 | 575 | ||
539 | /***************************************************************************** | 576 | /***************************************************************************** |
540 | * Watchdog | 577 | * Watchdog |
541 | ****************************************************************************/ | 578 | ****************************************************************************/ |
542 | static struct orion5x_wdt_platform_data orion5x_wdt_data = { | 579 | static struct orion_wdt_platform_data orion5x_wdt_data = { |
543 | .tclk = 0, | 580 | .tclk = 0, |
544 | }; | 581 | }; |
545 | 582 | ||
546 | static struct platform_device orion5x_wdt_device = { | 583 | static struct platform_device orion5x_wdt_device = { |
547 | .name = "orion5x_wdt", | 584 | .name = "orion_wdt", |
548 | .id = -1, | 585 | .id = -1, |
549 | .dev = { | 586 | .dev = { |
550 | .platform_data = &orion5x_wdt_data, | 587 | .platform_data = &orion5x_wdt_data, |
diff --git a/arch/arm/mach-orion5x/common.h b/arch/arm/mach-orion5x/common.h index 798b9a5e3da9..de483e83edd7 100644 --- a/arch/arm/mach-orion5x/common.h +++ b/arch/arm/mach-orion5x/common.h | |||
@@ -26,6 +26,7 @@ void orion5x_setup_dev0_win(u32 base, u32 size); | |||
26 | void orion5x_setup_dev1_win(u32 base, u32 size); | 26 | void orion5x_setup_dev1_win(u32 base, u32 size); |
27 | void orion5x_setup_dev2_win(u32 base, u32 size); | 27 | void orion5x_setup_dev2_win(u32 base, u32 size); |
28 | void orion5x_setup_pcie_wa_win(u32 base, u32 size); | 28 | void orion5x_setup_pcie_wa_win(u32 base, u32 size); |
29 | int orion5x_setup_sram_win(void); | ||
29 | 30 | ||
30 | void orion5x_ehci0_init(void); | 31 | void orion5x_ehci0_init(void); |
31 | void orion5x_ehci1_init(void); | 32 | void orion5x_ehci1_init(void); |
@@ -37,6 +38,7 @@ void orion5x_spi_init(void); | |||
37 | void orion5x_uart0_init(void); | 38 | void orion5x_uart0_init(void); |
38 | void orion5x_uart1_init(void); | 39 | void orion5x_uart1_init(void); |
39 | void orion5x_xor_init(void); | 40 | void orion5x_xor_init(void); |
41 | int orion5x_crypto_init(void); | ||
40 | 42 | ||
41 | /* | 43 | /* |
42 | * PCIe/PCI functions. | 44 | * PCIe/PCI functions. |
diff --git a/arch/arm/mach-orion5x/include/mach/bridge-regs.h b/arch/arm/mach-orion5x/include/mach/bridge-regs.h index be896e59d3e7..5c9744cd8ef6 100644 --- a/arch/arm/mach-orion5x/include/mach/bridge-regs.h +++ b/arch/arm/mach-orion5x/include/mach/bridge-regs.h | |||
@@ -17,8 +17,8 @@ | |||
17 | 17 | ||
18 | #define CPU_CTRL (ORION5X_BRIDGE_VIRT_BASE | 0x104) | 18 | #define CPU_CTRL (ORION5X_BRIDGE_VIRT_BASE | 0x104) |
19 | 19 | ||
20 | #define CPU_RESET_MASK (ORION5X_BRIDGE_VIRT_BASE | 0x108) | 20 | #define RSTOUTn_MASK (ORION5X_BRIDGE_VIRT_BASE | 0x108) |
21 | #define WDT_RESET 0x0002 | 21 | #define WDT_RESET_OUT_EN 0x0002 |
22 | 22 | ||
23 | #define CPU_SOFT_RESET (ORION5X_BRIDGE_VIRT_BASE | 0x10c) | 23 | #define CPU_SOFT_RESET (ORION5X_BRIDGE_VIRT_BASE | 0x10c) |
24 | 24 | ||
diff --git a/arch/arm/mach-orion5x/include/mach/orion5x.h b/arch/arm/mach-orion5x/include/mach/orion5x.h index 377a773ae53f..2d8766570531 100644 --- a/arch/arm/mach-orion5x/include/mach/orion5x.h +++ b/arch/arm/mach-orion5x/include/mach/orion5x.h | |||
@@ -24,6 +24,7 @@ | |||
24 | * f1000000 on-chip peripheral registers | 24 | * f1000000 on-chip peripheral registers |
25 | * f2000000 PCIe I/O space | 25 | * f2000000 PCIe I/O space |
26 | * f2100000 PCI I/O space | 26 | * f2100000 PCI I/O space |
27 | * f2200000 SRAM dedicated for the crypto unit | ||
27 | * f4000000 device bus mappings (boot) | 28 | * f4000000 device bus mappings (boot) |
28 | * fa000000 device bus mappings (cs0) | 29 | * fa000000 device bus mappings (cs0) |
29 | * fa800000 device bus mappings (cs2) | 30 | * fa800000 device bus mappings (cs2) |
@@ -49,6 +50,9 @@ | |||
49 | #define ORION5X_PCI_IO_BUS_BASE 0x00100000 | 50 | #define ORION5X_PCI_IO_BUS_BASE 0x00100000 |
50 | #define ORION5X_PCI_IO_SIZE SZ_1M | 51 | #define ORION5X_PCI_IO_SIZE SZ_1M |
51 | 52 | ||
53 | #define ORION5X_SRAM_PHYS_BASE (0xf2200000) | ||
54 | #define ORION5X_SRAM_SIZE SZ_8K | ||
55 | |||
52 | /* Relevant only for Orion-1/Orion-NAS */ | 56 | /* Relevant only for Orion-1/Orion-NAS */ |
53 | #define ORION5X_PCIE_WA_PHYS_BASE 0xf0000000 | 57 | #define ORION5X_PCIE_WA_PHYS_BASE 0xf0000000 |
54 | #define ORION5X_PCIE_WA_VIRT_BASE 0xfe000000 | 58 | #define ORION5X_PCIE_WA_VIRT_BASE 0xfe000000 |
@@ -94,6 +98,8 @@ | |||
94 | #define ORION5X_SATA_PHYS_BASE (ORION5X_REGS_PHYS_BASE | 0x80000) | 98 | #define ORION5X_SATA_PHYS_BASE (ORION5X_REGS_PHYS_BASE | 0x80000) |
95 | #define ORION5X_SATA_VIRT_BASE (ORION5X_REGS_VIRT_BASE | 0x80000) | 99 | #define ORION5X_SATA_VIRT_BASE (ORION5X_REGS_VIRT_BASE | 0x80000) |
96 | 100 | ||
101 | #define ORION5X_CRYPTO_PHYS_BASE (ORION5X_REGS_PHYS_BASE | 0x90000) | ||
102 | |||
97 | #define ORION5X_USB1_PHYS_BASE (ORION5X_REGS_PHYS_BASE | 0xa0000) | 103 | #define ORION5X_USB1_PHYS_BASE (ORION5X_REGS_PHYS_BASE | 0xa0000) |
98 | #define ORION5X_USB1_VIRT_BASE (ORION5X_REGS_VIRT_BASE | 0xa0000) | 104 | #define ORION5X_USB1_VIRT_BASE (ORION5X_REGS_VIRT_BASE | 0xa0000) |
99 | 105 | ||
diff --git a/arch/arm/mach-orion5x/include/mach/system.h b/arch/arm/mach-orion5x/include/mach/system.h index e912490fff23..60e734c10458 100644 --- a/arch/arm/mach-orion5x/include/mach/system.h +++ b/arch/arm/mach-orion5x/include/mach/system.h | |||
@@ -23,7 +23,7 @@ static inline void arch_reset(char mode, const char *cmd) | |||
23 | /* | 23 | /* |
24 | * Enable and issue soft reset | 24 | * Enable and issue soft reset |
25 | */ | 25 | */ |
26 | orion5x_setbits(CPU_RESET_MASK, (1 << 2)); | 26 | orion5x_setbits(RSTOUTn_MASK, (1 << 2)); |
27 | orion5x_setbits(CPU_SOFT_RESET, 1); | 27 | orion5x_setbits(CPU_SOFT_RESET, 1); |
28 | } | 28 | } |
29 | 29 | ||
diff --git a/arch/arm/mach-orion5x/mpp.c b/arch/arm/mach-orion5x/mpp.c index e23a3f91d6c6..bc4c3b9aaf83 100644 --- a/arch/arm/mach-orion5x/mpp.c +++ b/arch/arm/mach-orion5x/mpp.c | |||
@@ -124,6 +124,9 @@ void __init orion5x_mpp_conf(struct orion5x_mpp_mode *mode) | |||
124 | u32 mpp_8_15_ctrl = readl(MPP_8_15_CTRL); | 124 | u32 mpp_8_15_ctrl = readl(MPP_8_15_CTRL); |
125 | u32 mpp_16_19_ctrl = readl(MPP_16_19_CTRL); | 125 | u32 mpp_16_19_ctrl = readl(MPP_16_19_CTRL); |
126 | 126 | ||
127 | /* Initialize gpiolib. */ | ||
128 | orion_gpio_init(); | ||
129 | |||
127 | while (mode->mpp >= 0) { | 130 | while (mode->mpp >= 0) { |
128 | u32 *reg; | 131 | u32 *reg; |
129 | int num_type; | 132 | int num_type; |
diff --git a/arch/arm/mach-orion5x/mss2-setup.c b/arch/arm/mach-orion5x/mss2-setup.c index 41e6d5033d54..61c086b66723 100644 --- a/arch/arm/mach-orion5x/mss2-setup.c +++ b/arch/arm/mach-orion5x/mss2-setup.c | |||
@@ -181,9 +181,9 @@ static void mss2_power_off(void) | |||
181 | /* | 181 | /* |
182 | * Enable and issue soft reset | 182 | * Enable and issue soft reset |
183 | */ | 183 | */ |
184 | reg = readl(CPU_RESET_MASK); | 184 | reg = readl(RSTOUTn_MASK); |
185 | reg |= 1 << 2; | 185 | reg |= 1 << 2; |
186 | writel(reg, CPU_RESET_MASK); | 186 | writel(reg, RSTOUTn_MASK); |
187 | 187 | ||
188 | reg = readl(CPU_SOFT_RESET); | 188 | reg = readl(CPU_SOFT_RESET); |
189 | reg |= 1; | 189 | reg |= 1; |
diff --git a/arch/arm/mach-orion5x/ts78xx-fpga.h b/arch/arm/mach-orion5x/ts78xx-fpga.h index 0f9cdf458952..37b3d4875291 100644 --- a/arch/arm/mach-orion5x/ts78xx-fpga.h +++ b/arch/arm/mach-orion5x/ts78xx-fpga.h | |||
@@ -25,6 +25,7 @@ struct fpga_devices { | |||
25 | /* Technologic Systems */ | 25 | /* Technologic Systems */ |
26 | struct fpga_device ts_rtc; | 26 | struct fpga_device ts_rtc; |
27 | struct fpga_device ts_nand; | 27 | struct fpga_device ts_nand; |
28 | struct fpga_device ts_rng; | ||
28 | }; | 29 | }; |
29 | 30 | ||
30 | struct ts78xx_fpga_data { | 31 | struct ts78xx_fpga_data { |
diff --git a/arch/arm/mach-orion5x/ts78xx-setup.c b/arch/arm/mach-orion5x/ts78xx-setup.c index 9a6b397f972d..5041d1bc26b1 100644 --- a/arch/arm/mach-orion5x/ts78xx-setup.c +++ b/arch/arm/mach-orion5x/ts78xx-setup.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/m48t86.h> | 17 | #include <linux/m48t86.h> |
18 | #include <linux/mtd/nand.h> | 18 | #include <linux/mtd/nand.h> |
19 | #include <linux/mtd/partitions.h> | 19 | #include <linux/mtd/partitions.h> |
20 | #include <linux/timeriomem-rng.h> | ||
20 | #include <asm/mach-types.h> | 21 | #include <asm/mach-types.h> |
21 | #include <asm/mach/arch.h> | 22 | #include <asm/mach/arch.h> |
22 | #include <asm/mach/map.h> | 23 | #include <asm/mach/map.h> |
@@ -270,12 +271,57 @@ static void ts78xx_ts_nand_unload(void) | |||
270 | } | 271 | } |
271 | 272 | ||
272 | /***************************************************************************** | 273 | /***************************************************************************** |
274 | * HW RNG | ||
275 | ****************************************************************************/ | ||
276 | #define TS_RNG_DATA (TS78XX_FPGA_REGS_PHYS_BASE | 0x044) | ||
277 | |||
278 | static struct resource ts78xx_ts_rng_resource = { | ||
279 | .flags = IORESOURCE_MEM, | ||
280 | .start = TS_RNG_DATA, | ||
281 | .end = TS_RNG_DATA + 4 - 1, | ||
282 | }; | ||
283 | |||
284 | static struct timeriomem_rng_data ts78xx_ts_rng_data = { | ||
285 | .period = 1000000, /* one second */ | ||
286 | }; | ||
287 | |||
288 | static struct platform_device ts78xx_ts_rng_device = { | ||
289 | .name = "timeriomem_rng", | ||
290 | .id = -1, | ||
291 | .dev = { | ||
292 | .platform_data = &ts78xx_ts_rng_data, | ||
293 | }, | ||
294 | .resource = &ts78xx_ts_rng_resource, | ||
295 | .num_resources = 1, | ||
296 | }; | ||
297 | |||
298 | static int ts78xx_ts_rng_load(void) | ||
299 | { | ||
300 | int rc; | ||
301 | |||
302 | if (ts78xx_fpga.supports.ts_rng.init == 0) { | ||
303 | rc = platform_device_register(&ts78xx_ts_rng_device); | ||
304 | if (!rc) | ||
305 | ts78xx_fpga.supports.ts_rng.init = 1; | ||
306 | } else | ||
307 | rc = platform_device_add(&ts78xx_ts_rng_device); | ||
308 | |||
309 | return rc; | ||
310 | }; | ||
311 | |||
312 | static void ts78xx_ts_rng_unload(void) | ||
313 | { | ||
314 | platform_device_del(&ts78xx_ts_rng_device); | ||
315 | } | ||
316 | |||
317 | /***************************************************************************** | ||
273 | * FPGA 'hotplug' support code | 318 | * FPGA 'hotplug' support code |
274 | ****************************************************************************/ | 319 | ****************************************************************************/ |
275 | static void ts78xx_fpga_devices_zero_init(void) | 320 | static void ts78xx_fpga_devices_zero_init(void) |
276 | { | 321 | { |
277 | ts78xx_fpga.supports.ts_rtc.init = 0; | 322 | ts78xx_fpga.supports.ts_rtc.init = 0; |
278 | ts78xx_fpga.supports.ts_nand.init = 0; | 323 | ts78xx_fpga.supports.ts_nand.init = 0; |
324 | ts78xx_fpga.supports.ts_rng.init = 0; | ||
279 | } | 325 | } |
280 | 326 | ||
281 | static void ts78xx_fpga_supports(void) | 327 | static void ts78xx_fpga_supports(void) |
@@ -289,10 +335,12 @@ static void ts78xx_fpga_supports(void) | |||
289 | case TS7800_REV_5: | 335 | case TS7800_REV_5: |
290 | ts78xx_fpga.supports.ts_rtc.present = 1; | 336 | ts78xx_fpga.supports.ts_rtc.present = 1; |
291 | ts78xx_fpga.supports.ts_nand.present = 1; | 337 | ts78xx_fpga.supports.ts_nand.present = 1; |
338 | ts78xx_fpga.supports.ts_rng.present = 1; | ||
292 | break; | 339 | break; |
293 | default: | 340 | default: |
294 | ts78xx_fpga.supports.ts_rtc.present = 0; | 341 | ts78xx_fpga.supports.ts_rtc.present = 0; |
295 | ts78xx_fpga.supports.ts_nand.present = 0; | 342 | ts78xx_fpga.supports.ts_nand.present = 0; |
343 | ts78xx_fpga.supports.ts_rng.present = 0; | ||
296 | } | 344 | } |
297 | } | 345 | } |
298 | 346 | ||
@@ -316,6 +364,14 @@ static int ts78xx_fpga_load_devices(void) | |||
316 | } | 364 | } |
317 | ret |= tmp; | 365 | ret |= tmp; |
318 | } | 366 | } |
367 | if (ts78xx_fpga.supports.ts_rng.present == 1) { | ||
368 | tmp = ts78xx_ts_rng_load(); | ||
369 | if (tmp) { | ||
370 | printk(KERN_INFO "TS-78xx: RNG not registered\n"); | ||
371 | ts78xx_fpga.supports.ts_rng.present = 0; | ||
372 | } | ||
373 | ret |= tmp; | ||
374 | } | ||
319 | 375 | ||
320 | return ret; | 376 | return ret; |
321 | } | 377 | } |
@@ -328,6 +384,8 @@ static int ts78xx_fpga_unload_devices(void) | |||
328 | ts78xx_ts_rtc_unload(); | 384 | ts78xx_ts_rtc_unload(); |
329 | if (ts78xx_fpga.supports.ts_nand.present == 1) | 385 | if (ts78xx_fpga.supports.ts_nand.present == 1) |
330 | ts78xx_ts_nand_unload(); | 386 | ts78xx_ts_nand_unload(); |
387 | if (ts78xx_fpga.supports.ts_rng.present == 1) | ||
388 | ts78xx_ts_rng_unload(); | ||
331 | 389 | ||
332 | return ret; | 390 | return ret; |
333 | } | 391 | } |
diff --git a/arch/arm/mach-orion5x/wnr854t-setup.c b/arch/arm/mach-orion5x/wnr854t-setup.c index 7ddc22c2bb54..69208217b220 100644 --- a/arch/arm/mach-orion5x/wnr854t-setup.c +++ b/arch/arm/mach-orion5x/wnr854t-setup.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/mtd/physmap.h> | 15 | #include <linux/mtd/physmap.h> |
16 | #include <linux/mv643xx_eth.h> | 16 | #include <linux/mv643xx_eth.h> |
17 | #include <linux/ethtool.h> | 17 | #include <linux/ethtool.h> |
18 | #include <net/dsa.h> | ||
18 | #include <asm/mach-types.h> | 19 | #include <asm/mach-types.h> |
19 | #include <asm/gpio.h> | 20 | #include <asm/gpio.h> |
20 | #include <asm/mach/arch.h> | 21 | #include <asm/mach/arch.h> |
@@ -97,6 +98,20 @@ static struct mv643xx_eth_platform_data wnr854t_eth_data = { | |||
97 | .duplex = DUPLEX_FULL, | 98 | .duplex = DUPLEX_FULL, |
98 | }; | 99 | }; |
99 | 100 | ||
101 | static struct dsa_chip_data wnr854t_switch_chip_data = { | ||
102 | .port_names[0] = "lan3", | ||
103 | .port_names[1] = "lan4", | ||
104 | .port_names[2] = "wan", | ||
105 | .port_names[3] = "cpu", | ||
106 | .port_names[5] = "lan1", | ||
107 | .port_names[7] = "lan2", | ||
108 | }; | ||
109 | |||
110 | static struct dsa_platform_data wnr854t_switch_plat_data = { | ||
111 | .nr_chips = 1, | ||
112 | .chip = &wnr854t_switch_chip_data, | ||
113 | }; | ||
114 | |||
100 | static void __init wnr854t_init(void) | 115 | static void __init wnr854t_init(void) |
101 | { | 116 | { |
102 | /* | 117 | /* |
@@ -110,6 +125,7 @@ static void __init wnr854t_init(void) | |||
110 | * Configure peripherals. | 125 | * Configure peripherals. |
111 | */ | 126 | */ |
112 | orion5x_eth_init(&wnr854t_eth_data); | 127 | orion5x_eth_init(&wnr854t_eth_data); |
128 | orion5x_eth_switch_init(&wnr854t_switch_plat_data, NO_IRQ); | ||
113 | orion5x_uart0_init(); | 129 | orion5x_uart0_init(); |
114 | 130 | ||
115 | orion5x_setup_dev_boot_win(WNR854T_NOR_BOOT_BASE, | 131 | orion5x_setup_dev_boot_win(WNR854T_NOR_BOOT_BASE, |
diff --git a/arch/arm/mach-pxa/ezx.c b/arch/arm/mach-pxa/ezx.c index 92ba16e1b6fc..7db966dc29ce 100644 --- a/arch/arm/mach-pxa/ezx.c +++ b/arch/arm/mach-pxa/ezx.c | |||
@@ -111,9 +111,9 @@ static unsigned long ezx_pin_config[] __initdata = { | |||
111 | GPIO25_SSP1_TXD, | 111 | GPIO25_SSP1_TXD, |
112 | GPIO26_SSP1_RXD, | 112 | GPIO26_SSP1_RXD, |
113 | GPIO24_GPIO, /* pcap chip select */ | 113 | GPIO24_GPIO, /* pcap chip select */ |
114 | GPIO1_GPIO, /* pcap interrupt */ | 114 | GPIO1_GPIO | WAKEUP_ON_EDGE_RISE, /* pcap interrupt */ |
115 | GPIO4_GPIO, /* WDI_AP */ | 115 | GPIO4_GPIO | MFP_LPM_DRIVE_HIGH, /* WDI_AP */ |
116 | GPIO55_GPIO, /* SYS_RESTART */ | 116 | GPIO55_GPIO | MFP_LPM_DRIVE_HIGH, /* SYS_RESTART */ |
117 | 117 | ||
118 | /* MMC */ | 118 | /* MMC */ |
119 | GPIO32_MMC_CLK, | 119 | GPIO32_MMC_CLK, |
@@ -144,20 +144,20 @@ static unsigned long ezx_pin_config[] __initdata = { | |||
144 | #if defined(CONFIG_MACH_EZX_A780) || defined(CONFIG_MACH_EZX_E680) | 144 | #if defined(CONFIG_MACH_EZX_A780) || defined(CONFIG_MACH_EZX_E680) |
145 | static unsigned long gen1_pin_config[] __initdata = { | 145 | static unsigned long gen1_pin_config[] __initdata = { |
146 | /* flip / lockswitch */ | 146 | /* flip / lockswitch */ |
147 | GPIO12_GPIO, | 147 | GPIO12_GPIO | WAKEUP_ON_EDGE_BOTH, |
148 | 148 | ||
149 | /* bluetooth (bcm2035) */ | 149 | /* bluetooth (bcm2035) */ |
150 | GPIO14_GPIO | WAKEUP_ON_LEVEL_HIGH, /* HOSTWAKE */ | 150 | GPIO14_GPIO | WAKEUP_ON_EDGE_RISE, /* HOSTWAKE */ |
151 | GPIO48_GPIO, /* RESET */ | 151 | GPIO48_GPIO, /* RESET */ |
152 | GPIO28_GPIO, /* WAKEUP */ | 152 | GPIO28_GPIO, /* WAKEUP */ |
153 | 153 | ||
154 | /* Neptune handshake */ | 154 | /* Neptune handshake */ |
155 | GPIO0_GPIO | WAKEUP_ON_LEVEL_HIGH, /* BP_RDY */ | 155 | GPIO0_GPIO | WAKEUP_ON_EDGE_FALL, /* BP_RDY */ |
156 | GPIO57_GPIO, /* AP_RDY */ | 156 | GPIO57_GPIO | MFP_LPM_DRIVE_HIGH, /* AP_RDY */ |
157 | GPIO13_GPIO | WAKEUP_ON_LEVEL_HIGH, /* WDI */ | 157 | GPIO13_GPIO | WAKEUP_ON_EDGE_BOTH, /* WDI */ |
158 | GPIO3_GPIO | WAKEUP_ON_LEVEL_HIGH, /* WDI2 */ | 158 | GPIO3_GPIO | WAKEUP_ON_EDGE_BOTH, /* WDI2 */ |
159 | GPIO82_GPIO, /* RESET */ | 159 | GPIO82_GPIO | MFP_LPM_DRIVE_HIGH, /* RESET */ |
160 | GPIO99_GPIO, /* TC_MM_EN */ | 160 | GPIO99_GPIO | MFP_LPM_DRIVE_HIGH, /* TC_MM_EN */ |
161 | 161 | ||
162 | /* sound */ | 162 | /* sound */ |
163 | GPIO52_SSP3_SCLK, | 163 | GPIO52_SSP3_SCLK, |
@@ -199,21 +199,21 @@ static unsigned long gen1_pin_config[] __initdata = { | |||
199 | defined(CONFIG_MACH_EZX_E2) || defined(CONFIG_MACH_EZX_E6) | 199 | defined(CONFIG_MACH_EZX_E2) || defined(CONFIG_MACH_EZX_E6) |
200 | static unsigned long gen2_pin_config[] __initdata = { | 200 | static unsigned long gen2_pin_config[] __initdata = { |
201 | /* flip / lockswitch */ | 201 | /* flip / lockswitch */ |
202 | GPIO15_GPIO, | 202 | GPIO15_GPIO | WAKEUP_ON_EDGE_BOTH, |
203 | 203 | ||
204 | /* EOC */ | 204 | /* EOC */ |
205 | GPIO10_GPIO, | 205 | GPIO10_GPIO | WAKEUP_ON_EDGE_RISE, |
206 | 206 | ||
207 | /* bluetooth (bcm2045) */ | 207 | /* bluetooth (bcm2045) */ |
208 | GPIO13_GPIO | WAKEUP_ON_LEVEL_HIGH, /* HOSTWAKE */ | 208 | GPIO13_GPIO | WAKEUP_ON_EDGE_RISE, /* HOSTWAKE */ |
209 | GPIO37_GPIO, /* RESET */ | 209 | GPIO37_GPIO, /* RESET */ |
210 | GPIO57_GPIO, /* WAKEUP */ | 210 | GPIO57_GPIO, /* WAKEUP */ |
211 | 211 | ||
212 | /* Neptune handshake */ | 212 | /* Neptune handshake */ |
213 | GPIO0_GPIO | WAKEUP_ON_LEVEL_HIGH, /* BP_RDY */ | 213 | GPIO0_GPIO | WAKEUP_ON_EDGE_FALL, /* BP_RDY */ |
214 | GPIO96_GPIO, /* AP_RDY */ | 214 | GPIO96_GPIO | MFP_LPM_DRIVE_HIGH, /* AP_RDY */ |
215 | GPIO3_GPIO | WAKEUP_ON_LEVEL_HIGH, /* WDI */ | 215 | GPIO3_GPIO | WAKEUP_ON_EDGE_FALL, /* WDI */ |
216 | GPIO116_GPIO, /* RESET */ | 216 | GPIO116_GPIO | MFP_LPM_DRIVE_HIGH, /* RESET */ |
217 | GPIO41_GPIO, /* BP_FLASH */ | 217 | GPIO41_GPIO, /* BP_FLASH */ |
218 | 218 | ||
219 | /* sound */ | 219 | /* sound */ |
diff --git a/arch/arm/mach-pxa/include/mach/reset.h b/arch/arm/mach-pxa/include/mach/reset.h index 31e6a7b6ad80..b6c10556fbc7 100644 --- a/arch/arm/mach-pxa/include/mach/reset.h +++ b/arch/arm/mach-pxa/include/mach/reset.h | |||
@@ -13,8 +13,9 @@ extern void clear_reset_status(unsigned int mask); | |||
13 | /** | 13 | /** |
14 | * init_gpio_reset() - register GPIO as reset generator | 14 | * init_gpio_reset() - register GPIO as reset generator |
15 | * @gpio: gpio nr | 15 | * @gpio: gpio nr |
16 | * @output: set gpio as out/low instead of input during normal work | 16 | * @output: set gpio as output instead of input during normal work |
17 | * @level: output level | ||
17 | */ | 18 | */ |
18 | extern int init_gpio_reset(int gpio, int output); | 19 | extern int init_gpio_reset(int gpio, int output, int level); |
19 | 20 | ||
20 | #endif /* __ASM_ARCH_RESET_H */ | 21 | #endif /* __ASM_ARCH_RESET_H */ |
diff --git a/arch/arm/mach-pxa/mfp-pxa2xx.c b/arch/arm/mach-pxa/mfp-pxa2xx.c index 7ffb91d64c39..cf6b720c055f 100644 --- a/arch/arm/mach-pxa/mfp-pxa2xx.c +++ b/arch/arm/mach-pxa/mfp-pxa2xx.c | |||
@@ -322,6 +322,7 @@ static inline void pxa27x_mfp_init(void) {} | |||
322 | #ifdef CONFIG_PM | 322 | #ifdef CONFIG_PM |
323 | static unsigned long saved_gafr[2][4]; | 323 | static unsigned long saved_gafr[2][4]; |
324 | static unsigned long saved_gpdr[4]; | 324 | static unsigned long saved_gpdr[4]; |
325 | static unsigned long saved_pgsr[4]; | ||
325 | 326 | ||
326 | static int pxa2xx_mfp_suspend(struct sys_device *d, pm_message_t state) | 327 | static int pxa2xx_mfp_suspend(struct sys_device *d, pm_message_t state) |
327 | { | 328 | { |
@@ -332,6 +333,7 @@ static int pxa2xx_mfp_suspend(struct sys_device *d, pm_message_t state) | |||
332 | saved_gafr[0][i] = GAFR_L(i); | 333 | saved_gafr[0][i] = GAFR_L(i); |
333 | saved_gafr[1][i] = GAFR_U(i); | 334 | saved_gafr[1][i] = GAFR_U(i); |
334 | saved_gpdr[i] = GPDR(i * 32); | 335 | saved_gpdr[i] = GPDR(i * 32); |
336 | saved_pgsr[i] = PGSR(i); | ||
335 | 337 | ||
336 | GPDR(i * 32) = gpdr_lpm[i]; | 338 | GPDR(i * 32) = gpdr_lpm[i]; |
337 | } | 339 | } |
@@ -346,6 +348,7 @@ static int pxa2xx_mfp_resume(struct sys_device *d) | |||
346 | GAFR_L(i) = saved_gafr[0][i]; | 348 | GAFR_L(i) = saved_gafr[0][i]; |
347 | GAFR_U(i) = saved_gafr[1][i]; | 349 | GAFR_U(i) = saved_gafr[1][i]; |
348 | GPDR(i * 32) = saved_gpdr[i]; | 350 | GPDR(i * 32) = saved_gpdr[i]; |
351 | PGSR(i) = saved_pgsr[i]; | ||
349 | } | 352 | } |
350 | PSSR = PSSR_RDH | PSSR_PH; | 353 | PSSR = PSSR_RDH | PSSR_PH; |
351 | return 0; | 354 | return 0; |
@@ -374,6 +377,9 @@ static int __init pxa2xx_mfp_init(void) | |||
374 | if (cpu_is_pxa27x()) | 377 | if (cpu_is_pxa27x()) |
375 | pxa27x_mfp_init(); | 378 | pxa27x_mfp_init(); |
376 | 379 | ||
380 | /* clear RDH bit to enable GPIO receivers after reset/sleep exit */ | ||
381 | PSSR = PSSR_RDH; | ||
382 | |||
377 | /* initialize gafr_run[], pgsr_lpm[] from existing values */ | 383 | /* initialize gafr_run[], pgsr_lpm[] from existing values */ |
378 | for (i = 0; i <= gpio_to_bank(pxa_last_gpio); i++) | 384 | for (i = 0; i <= gpio_to_bank(pxa_last_gpio); i++) |
379 | gpdr_lpm[i] = GPDR(i * 32); | 385 | gpdr_lpm[i] = GPDR(i * 32); |
diff --git a/arch/arm/mach-pxa/palmld.c b/arch/arm/mach-pxa/palmld.c index 24a967e1e148..2e65f05d366c 100644 --- a/arch/arm/mach-pxa/palmld.c +++ b/arch/arm/mach-pxa/palmld.c | |||
@@ -62,6 +62,8 @@ static unsigned long palmld_pin_config[] __initdata = { | |||
62 | GPIO29_AC97_SDATA_IN_0, | 62 | GPIO29_AC97_SDATA_IN_0, |
63 | GPIO30_AC97_SDATA_OUT, | 63 | GPIO30_AC97_SDATA_OUT, |
64 | GPIO31_AC97_SYNC, | 64 | GPIO31_AC97_SYNC, |
65 | GPIO89_AC97_SYSCLK, | ||
66 | GPIO95_AC97_nRESET, | ||
65 | 67 | ||
66 | /* IrDA */ | 68 | /* IrDA */ |
67 | GPIO108_GPIO, /* ir disable */ | 69 | GPIO108_GPIO, /* ir disable */ |
diff --git a/arch/arm/mach-pxa/palmt5.c b/arch/arm/mach-pxa/palmt5.c index 30662363907b..05bf979b78a6 100644 --- a/arch/arm/mach-pxa/palmt5.c +++ b/arch/arm/mach-pxa/palmt5.c | |||
@@ -64,6 +64,7 @@ static unsigned long palmt5_pin_config[] __initdata = { | |||
64 | GPIO29_AC97_SDATA_IN_0, | 64 | GPIO29_AC97_SDATA_IN_0, |
65 | GPIO30_AC97_SDATA_OUT, | 65 | GPIO30_AC97_SDATA_OUT, |
66 | GPIO31_AC97_SYNC, | 66 | GPIO31_AC97_SYNC, |
67 | GPIO89_AC97_SYSCLK, | ||
67 | GPIO95_AC97_nRESET, | 68 | GPIO95_AC97_nRESET, |
68 | 69 | ||
69 | /* IrDA */ | 70 | /* IrDA */ |
diff --git a/arch/arm/mach-pxa/palmtx.c b/arch/arm/mach-pxa/palmtx.c index e2d44b1a8a9b..e99a893c58a7 100644 --- a/arch/arm/mach-pxa/palmtx.c +++ b/arch/arm/mach-pxa/palmtx.c | |||
@@ -65,6 +65,7 @@ static unsigned long palmtx_pin_config[] __initdata = { | |||
65 | GPIO29_AC97_SDATA_IN_0, | 65 | GPIO29_AC97_SDATA_IN_0, |
66 | GPIO30_AC97_SDATA_OUT, | 66 | GPIO30_AC97_SDATA_OUT, |
67 | GPIO31_AC97_SYNC, | 67 | GPIO31_AC97_SYNC, |
68 | GPIO89_AC97_SYSCLK, | ||
68 | GPIO95_AC97_nRESET, | 69 | GPIO95_AC97_nRESET, |
69 | 70 | ||
70 | /* IrDA */ | 71 | /* IrDA */ |
diff --git a/arch/arm/mach-pxa/reset.c b/arch/arm/mach-pxa/reset.c index df29d45fb4e7..01e9d643394a 100644 --- a/arch/arm/mach-pxa/reset.c +++ b/arch/arm/mach-pxa/reset.c | |||
@@ -20,7 +20,7 @@ static void do_hw_reset(void); | |||
20 | 20 | ||
21 | static int reset_gpio = -1; | 21 | static int reset_gpio = -1; |
22 | 22 | ||
23 | int init_gpio_reset(int gpio, int output) | 23 | int init_gpio_reset(int gpio, int output, int level) |
24 | { | 24 | { |
25 | int rc; | 25 | int rc; |
26 | 26 | ||
@@ -31,7 +31,7 @@ int init_gpio_reset(int gpio, int output) | |||
31 | } | 31 | } |
32 | 32 | ||
33 | if (output) | 33 | if (output) |
34 | rc = gpio_direction_output(gpio, 0); | 34 | rc = gpio_direction_output(gpio, level); |
35 | else | 35 | else |
36 | rc = gpio_direction_input(gpio); | 36 | rc = gpio_direction_input(gpio); |
37 | if (rc) { | 37 | if (rc) { |
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c index c18e34acafcb..5a45fe340a10 100644 --- a/arch/arm/mach-pxa/spitz.c +++ b/arch/arm/mach-pxa/spitz.c | |||
@@ -531,9 +531,15 @@ static int spitz_ohci_init(struct device *dev) | |||
531 | return gpio_direction_output(SPITZ_GPIO_USB_HOST, 1); | 531 | return gpio_direction_output(SPITZ_GPIO_USB_HOST, 1); |
532 | } | 532 | } |
533 | 533 | ||
534 | static void spitz_ohci_exit(struct device *dev) | ||
535 | { | ||
536 | gpio_free(SPITZ_GPIO_USB_HOST); | ||
537 | } | ||
538 | |||
534 | static struct pxaohci_platform_data spitz_ohci_platform_data = { | 539 | static struct pxaohci_platform_data spitz_ohci_platform_data = { |
535 | .port_mode = PMM_NPS_MODE, | 540 | .port_mode = PMM_NPS_MODE, |
536 | .init = spitz_ohci_init, | 541 | .init = spitz_ohci_init, |
542 | .exit = spitz_ohci_exit, | ||
537 | .flags = ENABLE_PORT_ALL | NO_OC_PROTECTION, | 543 | .flags = ENABLE_PORT_ALL | NO_OC_PROTECTION, |
538 | .power_budget = 150, | 544 | .power_budget = 150, |
539 | }; | 545 | }; |
@@ -731,7 +737,7 @@ static void spitz_restart(char mode, const char *cmd) | |||
731 | 737 | ||
732 | static void __init common_init(void) | 738 | static void __init common_init(void) |
733 | { | 739 | { |
734 | init_gpio_reset(SPITZ_GPIO_ON_RESET, 1); | 740 | init_gpio_reset(SPITZ_GPIO_ON_RESET, 1, 0); |
735 | pm_power_off = spitz_poweroff; | 741 | pm_power_off = spitz_poweroff; |
736 | arm_pm_restart = spitz_restart; | 742 | arm_pm_restart = spitz_restart; |
737 | 743 | ||
diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c index afac5b6d3d78..a0bd46ef5d30 100644 --- a/arch/arm/mach-pxa/tosa.c +++ b/arch/arm/mach-pxa/tosa.c | |||
@@ -897,7 +897,7 @@ static void __init tosa_init(void) | |||
897 | gpio_set_wake(MFP_PIN_GPIO1, 1); | 897 | gpio_set_wake(MFP_PIN_GPIO1, 1); |
898 | /* We can't pass to gpio-keys since it will drop the Reset altfunc */ | 898 | /* We can't pass to gpio-keys since it will drop the Reset altfunc */ |
899 | 899 | ||
900 | init_gpio_reset(TOSA_GPIO_ON_RESET, 0); | 900 | init_gpio_reset(TOSA_GPIO_ON_RESET, 0, 0); |
901 | 901 | ||
902 | pm_power_off = tosa_poweroff; | 902 | pm_power_off = tosa_poweroff; |
903 | arm_pm_restart = tosa_restart; | 903 | arm_pm_restart = tosa_restart; |
diff --git a/arch/arm/plat-orion/gpio.c b/arch/arm/plat-orion/gpio.c index 32eb9e33bebb..e814803d4741 100644 --- a/arch/arm/plat-orion/gpio.c +++ b/arch/arm/plat-orion/gpio.c | |||
@@ -15,10 +15,9 @@ | |||
15 | #include <linux/spinlock.h> | 15 | #include <linux/spinlock.h> |
16 | #include <linux/bitops.h> | 16 | #include <linux/bitops.h> |
17 | #include <linux/io.h> | 17 | #include <linux/io.h> |
18 | #include <asm/gpio.h> | 18 | #include <linux/gpio.h> |
19 | 19 | ||
20 | static DEFINE_SPINLOCK(gpio_lock); | 20 | static DEFINE_SPINLOCK(gpio_lock); |
21 | static const char *gpio_label[GPIO_MAX]; /* non null for allocated GPIOs */ | ||
22 | static unsigned long gpio_valid_input[BITS_TO_LONGS(GPIO_MAX)]; | 21 | static unsigned long gpio_valid_input[BITS_TO_LONGS(GPIO_MAX)]; |
23 | static unsigned long gpio_valid_output[BITS_TO_LONGS(GPIO_MAX)]; | 22 | static unsigned long gpio_valid_output[BITS_TO_LONGS(GPIO_MAX)]; |
24 | 23 | ||
@@ -46,82 +45,54 @@ static void __set_level(unsigned pin, int high) | |||
46 | writel(u, GPIO_OUT(pin)); | 45 | writel(u, GPIO_OUT(pin)); |
47 | } | 46 | } |
48 | 47 | ||
49 | 48 | static inline void __set_blinking(unsigned pin, int blink) | |
50 | /* | ||
51 | * GENERIC_GPIO primitives. | ||
52 | */ | ||
53 | int gpio_direction_input(unsigned pin) | ||
54 | { | 49 | { |
55 | unsigned long flags; | 50 | u32 u; |
56 | |||
57 | if (pin >= GPIO_MAX || !test_bit(pin, gpio_valid_input)) { | ||
58 | pr_debug("%s: invalid GPIO %d\n", __func__, pin); | ||
59 | return -EINVAL; | ||
60 | } | ||
61 | |||
62 | spin_lock_irqsave(&gpio_lock, flags); | ||
63 | |||
64 | /* | ||
65 | * Some callers might not have used gpio_request(), | ||
66 | * so flag this pin as requested now. | ||
67 | */ | ||
68 | if (gpio_label[pin] == NULL) | ||
69 | gpio_label[pin] = "?"; | ||
70 | 51 | ||
71 | /* | 52 | u = readl(GPIO_BLINK_EN(pin)); |
72 | * Configure GPIO direction. | 53 | if (blink) |
73 | */ | 54 | u |= 1 << (pin & 31); |
74 | __set_direction(pin, 1); | 55 | else |
56 | u &= ~(1 << (pin & 31)); | ||
57 | writel(u, GPIO_BLINK_EN(pin)); | ||
58 | } | ||
75 | 59 | ||
76 | spin_unlock_irqrestore(&gpio_lock, flags); | 60 | static inline int orion_gpio_is_valid(unsigned pin, int mode) |
61 | { | ||
62 | if (pin < GPIO_MAX) { | ||
63 | if ((mode & GPIO_INPUT_OK) && !test_bit(pin, gpio_valid_input)) | ||
64 | goto err_out; | ||
65 | if ((mode & GPIO_OUTPUT_OK) && !test_bit(pin, gpio_valid_output)) | ||
66 | goto err_out; | ||
67 | return true; | ||
68 | } | ||
77 | 69 | ||
78 | return 0; | 70 | err_out: |
71 | pr_debug("%s: invalid GPIO %d\n", __func__, pin); | ||
72 | return false; | ||
79 | } | 73 | } |
80 | EXPORT_SYMBOL(gpio_direction_input); | ||
81 | 74 | ||
82 | int gpio_direction_output(unsigned pin, int value) | 75 | /* |
76 | * GENERIC_GPIO primitives. | ||
77 | */ | ||
78 | static int orion_gpio_direction_input(struct gpio_chip *chip, unsigned pin) | ||
83 | { | 79 | { |
84 | unsigned long flags; | 80 | unsigned long flags; |
85 | u32 u; | ||
86 | 81 | ||
87 | if (pin >= GPIO_MAX || !test_bit(pin, gpio_valid_output)) { | 82 | if (!orion_gpio_is_valid(pin, GPIO_INPUT_OK)) |
88 | pr_debug("%s: invalid GPIO %d\n", __func__, pin); | ||
89 | return -EINVAL; | 83 | return -EINVAL; |
90 | } | ||
91 | 84 | ||
92 | spin_lock_irqsave(&gpio_lock, flags); | 85 | spin_lock_irqsave(&gpio_lock, flags); |
93 | 86 | ||
94 | /* | 87 | /* Configure GPIO direction. */ |
95 | * Some callers might not have used gpio_request(), | 88 | __set_direction(pin, 1); |
96 | * so flag this pin as requested now. | ||
97 | */ | ||
98 | if (gpio_label[pin] == NULL) | ||
99 | gpio_label[pin] = "?"; | ||
100 | |||
101 | /* | ||
102 | * Disable blinking. | ||
103 | */ | ||
104 | u = readl(GPIO_BLINK_EN(pin)); | ||
105 | u &= ~(1 << (pin & 31)); | ||
106 | writel(u, GPIO_BLINK_EN(pin)); | ||
107 | |||
108 | /* | ||
109 | * Configure GPIO output value. | ||
110 | */ | ||
111 | __set_level(pin, value); | ||
112 | |||
113 | /* | ||
114 | * Configure GPIO direction. | ||
115 | */ | ||
116 | __set_direction(pin, 0); | ||
117 | 89 | ||
118 | spin_unlock_irqrestore(&gpio_lock, flags); | 90 | spin_unlock_irqrestore(&gpio_lock, flags); |
119 | 91 | ||
120 | return 0; | 92 | return 0; |
121 | } | 93 | } |
122 | EXPORT_SYMBOL(gpio_direction_output); | ||
123 | 94 | ||
124 | int gpio_get_value(unsigned pin) | 95 | static int orion_gpio_get_value(struct gpio_chip *chip, unsigned pin) |
125 | { | 96 | { |
126 | int val; | 97 | int val; |
127 | 98 | ||
@@ -132,83 +103,75 @@ int gpio_get_value(unsigned pin) | |||
132 | 103 | ||
133 | return (val >> (pin & 31)) & 1; | 104 | return (val >> (pin & 31)) & 1; |
134 | } | 105 | } |
135 | EXPORT_SYMBOL(gpio_get_value); | ||
136 | 106 | ||
137 | void gpio_set_value(unsigned pin, int value) | 107 | static int orion_gpio_direction_output(struct gpio_chip *chip, unsigned pin, |
108 | int value) | ||
138 | { | 109 | { |
139 | unsigned long flags; | 110 | unsigned long flags; |
140 | u32 u; | 111 | |
112 | if (!orion_gpio_is_valid(pin, GPIO_OUTPUT_OK)) | ||
113 | return -EINVAL; | ||
141 | 114 | ||
142 | spin_lock_irqsave(&gpio_lock, flags); | 115 | spin_lock_irqsave(&gpio_lock, flags); |
143 | 116 | ||
144 | /* | 117 | /* Disable blinking. */ |
145 | * Disable blinking. | 118 | __set_blinking(pin, 0); |
146 | */ | ||
147 | u = readl(GPIO_BLINK_EN(pin)); | ||
148 | u &= ~(1 << (pin & 31)); | ||
149 | writel(u, GPIO_BLINK_EN(pin)); | ||
150 | 119 | ||
151 | /* | 120 | /* Configure GPIO output value. */ |
152 | * Configure GPIO output value. | ||
153 | */ | ||
154 | __set_level(pin, value); | 121 | __set_level(pin, value); |
155 | 122 | ||
123 | /* Configure GPIO direction. */ | ||
124 | __set_direction(pin, 0); | ||
125 | |||
156 | spin_unlock_irqrestore(&gpio_lock, flags); | 126 | spin_unlock_irqrestore(&gpio_lock, flags); |
127 | |||
128 | return 0; | ||
157 | } | 129 | } |
158 | EXPORT_SYMBOL(gpio_set_value); | ||
159 | 130 | ||
160 | int gpio_request(unsigned pin, const char *label) | 131 | static void orion_gpio_set_value(struct gpio_chip *chip, unsigned pin, |
132 | int value) | ||
161 | { | 133 | { |
162 | unsigned long flags; | 134 | unsigned long flags; |
163 | int ret; | ||
164 | |||
165 | if (pin >= GPIO_MAX || | ||
166 | !(test_bit(pin, gpio_valid_input) || | ||
167 | test_bit(pin, gpio_valid_output))) { | ||
168 | pr_debug("%s: invalid GPIO %d\n", __func__, pin); | ||
169 | return -EINVAL; | ||
170 | } | ||
171 | 135 | ||
172 | spin_lock_irqsave(&gpio_lock, flags); | 136 | spin_lock_irqsave(&gpio_lock, flags); |
173 | if (gpio_label[pin] == NULL) { | ||
174 | gpio_label[pin] = label ? label : "?"; | ||
175 | ret = 0; | ||
176 | } else { | ||
177 | pr_debug("%s: GPIO %d already used as %s\n", | ||
178 | __func__, pin, gpio_label[pin]); | ||
179 | ret = -EBUSY; | ||
180 | } | ||
181 | spin_unlock_irqrestore(&gpio_lock, flags); | ||
182 | 137 | ||
183 | return ret; | 138 | /* Configure GPIO output value. */ |
139 | __set_level(pin, value); | ||
140 | |||
141 | spin_unlock_irqrestore(&gpio_lock, flags); | ||
184 | } | 142 | } |
185 | EXPORT_SYMBOL(gpio_request); | ||
186 | 143 | ||
187 | void gpio_free(unsigned pin) | 144 | static int orion_gpio_request(struct gpio_chip *chip, unsigned pin) |
188 | { | 145 | { |
189 | if (pin >= GPIO_MAX || | 146 | if (orion_gpio_is_valid(pin, GPIO_INPUT_OK) || |
190 | !(test_bit(pin, gpio_valid_input) || | 147 | orion_gpio_is_valid(pin, GPIO_OUTPUT_OK)) |
191 | test_bit(pin, gpio_valid_output))) { | 148 | return 0; |
192 | pr_debug("%s: invalid GPIO %d\n", __func__, pin); | 149 | return -EINVAL; |
193 | return; | ||
194 | } | ||
195 | |||
196 | if (gpio_label[pin] == NULL) | ||
197 | pr_warning("%s: GPIO %d already freed\n", __func__, pin); | ||
198 | else | ||
199 | gpio_label[pin] = NULL; | ||
200 | } | 150 | } |
201 | EXPORT_SYMBOL(gpio_free); | ||
202 | 151 | ||
152 | static struct gpio_chip orion_gpiochip = { | ||
153 | .label = "orion_gpio", | ||
154 | .direction_input = orion_gpio_direction_input, | ||
155 | .get = orion_gpio_get_value, | ||
156 | .direction_output = orion_gpio_direction_output, | ||
157 | .set = orion_gpio_set_value, | ||
158 | .request = orion_gpio_request, | ||
159 | .base = 0, | ||
160 | .ngpio = GPIO_MAX, | ||
161 | .can_sleep = 0, | ||
162 | }; | ||
163 | |||
164 | void __init orion_gpio_init(void) | ||
165 | { | ||
166 | gpiochip_add(&orion_gpiochip); | ||
167 | } | ||
203 | 168 | ||
204 | /* | 169 | /* |
205 | * Orion-specific GPIO API extensions. | 170 | * Orion-specific GPIO API extensions. |
206 | */ | 171 | */ |
207 | void __init orion_gpio_set_unused(unsigned pin) | 172 | void __init orion_gpio_set_unused(unsigned pin) |
208 | { | 173 | { |
209 | /* | 174 | /* Configure as output, drive low. */ |
210 | * Configure as output, drive low. | ||
211 | */ | ||
212 | __set_level(pin, 0); | 175 | __set_level(pin, 0); |
213 | __set_direction(pin, 0); | 176 | __set_direction(pin, 0); |
214 | } | 177 | } |
@@ -230,21 +193,14 @@ void __init orion_gpio_set_valid(unsigned pin, int mode) | |||
230 | void orion_gpio_set_blink(unsigned pin, int blink) | 193 | void orion_gpio_set_blink(unsigned pin, int blink) |
231 | { | 194 | { |
232 | unsigned long flags; | 195 | unsigned long flags; |
233 | u32 u; | ||
234 | 196 | ||
235 | spin_lock_irqsave(&gpio_lock, flags); | 197 | spin_lock_irqsave(&gpio_lock, flags); |
236 | 198 | ||
237 | /* | 199 | /* Set output value to zero. */ |
238 | * Set output value to zero. | ||
239 | */ | ||
240 | __set_level(pin, 0); | 200 | __set_level(pin, 0); |
241 | 201 | ||
242 | u = readl(GPIO_BLINK_EN(pin)); | 202 | /* Set blinking. */ |
243 | if (blink) | 203 | __set_blinking(pin, blink); |
244 | u |= 1 << (pin & 31); | ||
245 | else | ||
246 | u &= ~(1 << (pin & 31)); | ||
247 | writel(u, GPIO_BLINK_EN(pin)); | ||
248 | 204 | ||
249 | spin_unlock_irqrestore(&gpio_lock, flags); | 205 | spin_unlock_irqrestore(&gpio_lock, flags); |
250 | } | 206 | } |
@@ -368,7 +324,7 @@ static int gpio_irq_set_type(u32 irq, u32 type) | |||
368 | } | 324 | } |
369 | 325 | ||
370 | struct irq_chip orion_gpio_irq_chip = { | 326 | struct irq_chip orion_gpio_irq_chip = { |
371 | .name = "orion_gpio", | 327 | .name = "orion_gpio_irq", |
372 | .ack = gpio_irq_ack, | 328 | .ack = gpio_irq_ack, |
373 | .mask = gpio_irq_mask, | 329 | .mask = gpio_irq_mask, |
374 | .unmask = gpio_irq_unmask, | 330 | .unmask = gpio_irq_unmask, |
diff --git a/arch/arm/plat-orion/include/plat/gpio.h b/arch/arm/plat-orion/include/plat/gpio.h index 33f6c6aec185..9646a94ed3d0 100644 --- a/arch/arm/plat-orion/include/plat/gpio.h +++ b/arch/arm/plat-orion/include/plat/gpio.h | |||
@@ -14,12 +14,9 @@ | |||
14 | /* | 14 | /* |
15 | * GENERIC_GPIO primitives. | 15 | * GENERIC_GPIO primitives. |
16 | */ | 16 | */ |
17 | int gpio_request(unsigned pin, const char *label); | 17 | #define gpio_get_value __gpio_get_value |
18 | void gpio_free(unsigned pin); | 18 | #define gpio_set_value __gpio_set_value |
19 | int gpio_direction_input(unsigned pin); | 19 | #define gpio_cansleep __gpio_cansleep |
20 | int gpio_direction_output(unsigned pin, int value); | ||
21 | int gpio_get_value(unsigned pin); | ||
22 | void gpio_set_value(unsigned pin, int value); | ||
23 | 20 | ||
24 | /* | 21 | /* |
25 | * Orion-specific GPIO API extensions. | 22 | * Orion-specific GPIO API extensions. |
@@ -27,11 +24,13 @@ void gpio_set_value(unsigned pin, int value); | |||
27 | void orion_gpio_set_unused(unsigned pin); | 24 | void orion_gpio_set_unused(unsigned pin); |
28 | void orion_gpio_set_blink(unsigned pin, int blink); | 25 | void orion_gpio_set_blink(unsigned pin, int blink); |
29 | 26 | ||
30 | #define GPIO_BIDI_OK (1 << 0) | 27 | #define GPIO_INPUT_OK (1 << 0) |
31 | #define GPIO_INPUT_OK (1 << 1) | 28 | #define GPIO_OUTPUT_OK (1 << 1) |
32 | #define GPIO_OUTPUT_OK (1 << 2) | ||
33 | void orion_gpio_set_valid(unsigned pin, int mode); | 29 | void orion_gpio_set_valid(unsigned pin, int mode); |
34 | 30 | ||
31 | /* Initialize gpiolib. */ | ||
32 | void __init orion_gpio_init(void); | ||
33 | |||
35 | /* | 34 | /* |
36 | * GPIO interrupt handling. | 35 | * GPIO interrupt handling. |
37 | */ | 36 | */ |
diff --git a/arch/arm/plat-orion/include/plat/orion5x_wdt.h b/arch/arm/plat-orion/include/plat/orion_wdt.h index 3c9cf6a305ef..665c362a2fba 100644 --- a/arch/arm/plat-orion/include/plat/orion5x_wdt.h +++ b/arch/arm/plat-orion/include/plat/orion_wdt.h | |||
@@ -1,15 +1,15 @@ | |||
1 | /* | 1 | /* |
2 | * arch/arm/plat-orion/include/plat/orion5x_wdt.h | 2 | * arch/arm/plat-orion/include/plat/orion_wdt.h |
3 | * | 3 | * |
4 | * This file is licensed under the terms of the GNU General Public | 4 | * This file is licensed under the terms of the GNU General Public |
5 | * License version 2. This program is licensed "as is" without any | 5 | * License version 2. This program is licensed "as is" without any |
6 | * warranty of any kind, whether express or implied. | 6 | * warranty of any kind, whether express or implied. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #ifndef __PLAT_ORION5X_WDT_H | 9 | #ifndef __PLAT_ORION_WDT_H |
10 | #define __PLAT_ORION5X_WDT_H | 10 | #define __PLAT_ORION_WDT_H |
11 | 11 | ||
12 | struct orion5x_wdt_platform_data { | 12 | struct orion_wdt_platform_data { |
13 | u32 tclk; /* no <linux/clk.h> support yet */ | 13 | u32 tclk; /* no <linux/clk.h> support yet */ |
14 | }; | 14 | }; |
15 | 15 | ||
diff --git a/arch/arm/plat-orion/time.c b/arch/arm/plat-orion/time.c index de8a001fc3a9..715a30177f28 100644 --- a/arch/arm/plat-orion/time.c +++ b/arch/arm/plat-orion/time.c | |||
@@ -12,11 +12,15 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/sched.h> | ||
16 | #include <linux/cnt32_to_63.h> | ||
17 | #include <linux/timer.h> | ||
15 | #include <linux/clockchips.h> | 18 | #include <linux/clockchips.h> |
16 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
17 | #include <linux/irq.h> | 20 | #include <linux/irq.h> |
18 | #include <asm/mach/time.h> | 21 | #include <asm/mach/time.h> |
19 | #include <mach/bridge-regs.h> | 22 | #include <mach/bridge-regs.h> |
23 | #include <mach/hardware.h> | ||
20 | 24 | ||
21 | /* | 25 | /* |
22 | * Number of timer ticks per jiffy. | 26 | * Number of timer ticks per jiffy. |
@@ -39,6 +43,56 @@ static u32 ticks_per_jiffy; | |||
39 | 43 | ||
40 | 44 | ||
41 | /* | 45 | /* |
46 | * Orion's sched_clock implementation. It has a resolution of | ||
47 | * at least 7.5ns (133MHz TCLK) and a maximum value of 834 days. | ||
48 | * | ||
49 | * Because the hardware timer period is quite short (21 secs if | ||
50 | * 200MHz TCLK) and because cnt32_to_63() needs to be called at | ||
51 | * least once per half period to work properly, a kernel timer is | ||
52 | * set up to ensure this requirement is always met. | ||
53 | */ | ||
54 | #define TCLK2NS_SCALE_FACTOR 8 | ||
55 | |||
56 | static unsigned long tclk2ns_scale; | ||
57 | |||
58 | unsigned long long sched_clock(void) | ||
59 | { | ||
60 | unsigned long long v = cnt32_to_63(0xffffffff - readl(TIMER0_VAL)); | ||
61 | return (v * tclk2ns_scale) >> TCLK2NS_SCALE_FACTOR; | ||
62 | } | ||
63 | |||
64 | static struct timer_list cnt32_to_63_keepwarm_timer; | ||
65 | |||
66 | static void cnt32_to_63_keepwarm(unsigned long data) | ||
67 | { | ||
68 | mod_timer(&cnt32_to_63_keepwarm_timer, round_jiffies(jiffies + data)); | ||
69 | (void) sched_clock(); | ||
70 | } | ||
71 | |||
72 | static void __init setup_sched_clock(unsigned long tclk) | ||
73 | { | ||
74 | unsigned long long v; | ||
75 | unsigned long data; | ||
76 | |||
77 | v = NSEC_PER_SEC; | ||
78 | v <<= TCLK2NS_SCALE_FACTOR; | ||
79 | v += tclk/2; | ||
80 | do_div(v, tclk); | ||
81 | /* | ||
82 | * We want an even value to automatically clear the top bit | ||
83 | * returned by cnt32_to_63() without an additional run time | ||
84 | * instruction. So if the LSB is 1 then round it up. | ||
85 | */ | ||
86 | if (v & 1) | ||
87 | v++; | ||
88 | tclk2ns_scale = v; | ||
89 | |||
90 | data = (0xffffffffUL / tclk / 2 - 2) * HZ; | ||
91 | setup_timer(&cnt32_to_63_keepwarm_timer, cnt32_to_63_keepwarm, data); | ||
92 | mod_timer(&cnt32_to_63_keepwarm_timer, round_jiffies(jiffies + data)); | ||
93 | } | ||
94 | |||
95 | /* | ||
42 | * Clocksource handling. | 96 | * Clocksource handling. |
43 | */ | 97 | */ |
44 | static cycle_t orion_clksrc_read(struct clocksource *cs) | 98 | static cycle_t orion_clksrc_read(struct clocksource *cs) |
@@ -176,6 +230,10 @@ void __init orion_time_init(unsigned int irq, unsigned int tclk) | |||
176 | 230 | ||
177 | ticks_per_jiffy = (tclk + HZ/2) / HZ; | 231 | ticks_per_jiffy = (tclk + HZ/2) / HZ; |
178 | 232 | ||
233 | /* | ||
234 | * Set scale and timer for sched_clock | ||
235 | */ | ||
236 | setup_sched_clock(tclk); | ||
179 | 237 | ||
180 | /* | 238 | /* |
181 | * Setup free-running clocksource timer (interrupts | 239 | * Setup free-running clocksource timer (interrupts |
@@ -190,7 +248,6 @@ void __init orion_time_init(unsigned int irq, unsigned int tclk) | |||
190 | orion_clksrc.mult = clocksource_hz2mult(tclk, orion_clksrc.shift); | 248 | orion_clksrc.mult = clocksource_hz2mult(tclk, orion_clksrc.shift); |
191 | clocksource_register(&orion_clksrc); | 249 | clocksource_register(&orion_clksrc); |
192 | 250 | ||
193 | |||
194 | /* | 251 | /* |
195 | * Setup clockevent timer (interrupt-driven.) | 252 | * Setup clockevent timer (interrupt-driven.) |
196 | */ | 253 | */ |
diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types index 945e0d237a1d..fec64678a63a 100644 --- a/arch/arm/tools/mach-types +++ b/arch/arm/tools/mach-types | |||
@@ -12,7 +12,7 @@ | |||
12 | # | 12 | # |
13 | # http://www.arm.linux.org.uk/developer/machines/?action=new | 13 | # http://www.arm.linux.org.uk/developer/machines/?action=new |
14 | # | 14 | # |
15 | # Last update: Mon Mar 23 20:09:01 2009 | 15 | # Last update: Fri May 29 10:14:20 2009 |
16 | # | 16 | # |
17 | # machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number | 17 | # machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number |
18 | # | 18 | # |
@@ -916,7 +916,7 @@ nxdb500 MACH_NXDB500 NXDB500 905 | |||
916 | apf9328 MACH_APF9328 APF9328 906 | 916 | apf9328 MACH_APF9328 APF9328 906 |
917 | omap_wipoq MACH_OMAP_WIPOQ OMAP_WIPOQ 907 | 917 | omap_wipoq MACH_OMAP_WIPOQ OMAP_WIPOQ 907 |
918 | omap_twip MACH_OMAP_TWIP OMAP_TWIP 908 | 918 | omap_twip MACH_OMAP_TWIP OMAP_TWIP 908 |
919 | palmt650 MACH_PALMT650 PALMT650 909 | 919 | treo650 MACH_TREO650 TREO650 909 |
920 | acumen MACH_ACUMEN ACUMEN 910 | 920 | acumen MACH_ACUMEN ACUMEN 910 |
921 | xp100 MACH_XP100 XP100 911 | 921 | xp100 MACH_XP100 XP100 911 |
922 | fs2410 MACH_FS2410 FS2410 912 | 922 | fs2410 MACH_FS2410 FS2410 912 |
@@ -1232,7 +1232,7 @@ ql202b MACH_QL202B QL202B 1226 | |||
1232 | vpac270 MACH_VPAC270 VPAC270 1227 | 1232 | vpac270 MACH_VPAC270 VPAC270 1227 |
1233 | rd129 MACH_RD129 RD129 1228 | 1233 | rd129 MACH_RD129 RD129 1228 |
1234 | htcwizard MACH_HTCWIZARD HTCWIZARD 1229 | 1234 | htcwizard MACH_HTCWIZARD HTCWIZARD 1229 |
1235 | xscale_treo680 MACH_XSCALE_TREO680 XSCALE_TREO680 1230 | 1235 | treo680 MACH_TREO680 TREO680 1230 |
1236 | tecon_tmezon MACH_TECON_TMEZON TECON_TMEZON 1231 | 1236 | tecon_tmezon MACH_TECON_TMEZON TECON_TMEZON 1231 |
1237 | zylonite MACH_ZYLONITE ZYLONITE 1233 | 1237 | zylonite MACH_ZYLONITE ZYLONITE 1233 |
1238 | gene1270 MACH_GENE1270 GENE1270 1234 | 1238 | gene1270 MACH_GENE1270 GENE1270 1234 |
@@ -1418,10 +1418,10 @@ looxc550 MACH_LOOXC550 LOOXC550 1417 | |||
1418 | cnty_titan MACH_CNTY_TITAN CNTY_TITAN 1418 | 1418 | cnty_titan MACH_CNTY_TITAN CNTY_TITAN 1418 |
1419 | app3xx MACH_APP3XX APP3XX 1419 | 1419 | app3xx MACH_APP3XX APP3XX 1419 |
1420 | sideoatsgrama MACH_SIDEOATSGRAMA SIDEOATSGRAMA 1420 | 1420 | sideoatsgrama MACH_SIDEOATSGRAMA SIDEOATSGRAMA 1420 |
1421 | palmtreo700p MACH_PALMTREO700P PALMTREO700P 1421 | 1421 | treo700p MACH_TREO700P TREO700P 1421 |
1422 | palmtreo700w MACH_PALMTREO700W PALMTREO700W 1422 | 1422 | treo700w MACH_TREO700W TREO700W 1422 |
1423 | palmtreo750 MACH_PALMTREO750 PALMTREO750 1423 | 1423 | treo750 MACH_TREO750 TREO750 1423 |
1424 | palmtreo755p MACH_PALMTREO755P PALMTREO755P 1424 | 1424 | treo755p MACH_TREO755P TREO755P 1424 |
1425 | ezreganut9200 MACH_EZREGANUT9200 EZREGANUT9200 1425 | 1425 | ezreganut9200 MACH_EZREGANUT9200 EZREGANUT9200 1425 |
1426 | sarge MACH_SARGE SARGE 1426 | 1426 | sarge MACH_SARGE SARGE 1426 |
1427 | a696 MACH_A696 A696 1427 | 1427 | a696 MACH_A696 A696 1427 |
@@ -1721,7 +1721,7 @@ sapphire MACH_SAPPHIRE SAPPHIRE 1729 | |||
1721 | csb637xo MACH_CSB637XO CSB637XO 1730 | 1721 | csb637xo MACH_CSB637XO CSB637XO 1730 |
1722 | evisiong MACH_EVISIONG EVISIONG 1731 | 1722 | evisiong MACH_EVISIONG EVISIONG 1731 |
1723 | stmp37xx MACH_STMP37XX STMP37XX 1732 | 1723 | stmp37xx MACH_STMP37XX STMP37XX 1732 |
1724 | stmp378x MACH_STMP38XX STMP38XX 1733 | 1724 | stmp378x MACH_STMP378X STMP378X 1733 |
1725 | tnt MACH_TNT TNT 1734 | 1725 | tnt MACH_TNT TNT 1734 |
1726 | tbxt MACH_TBXT TBXT 1735 | 1726 | tbxt MACH_TBXT TBXT 1735 |
1727 | playmate MACH_PLAYMATE PLAYMATE 1736 | 1727 | playmate MACH_PLAYMATE PLAYMATE 1736 |
@@ -1817,7 +1817,7 @@ smdkc100 MACH_SMDKC100 SMDKC100 1826 | |||
1817 | tavorevb MACH_TAVOREVB TAVOREVB 1827 | 1817 | tavorevb MACH_TAVOREVB TAVOREVB 1827 |
1818 | saar MACH_SAAR SAAR 1828 | 1818 | saar MACH_SAAR SAAR 1828 |
1819 | deister_eyecam MACH_DEISTER_EYECAM DEISTER_EYECAM 1829 | 1819 | deister_eyecam MACH_DEISTER_EYECAM DEISTER_EYECAM 1829 |
1820 | at91sam9m10ek MACH_AT91SAM9M10EK AT91SAM9M10EK 1830 | 1820 | at91sam9m10g45ek MACH_AT91SAM9M10G45EK AT91SAM9M10G45EK 1830 |
1821 | linkstation_produo MACH_LINKSTATION_PRODUO LINKSTATION_PRODUO 1831 | 1821 | linkstation_produo MACH_LINKSTATION_PRODUO LINKSTATION_PRODUO 1831 |
1822 | hit_b0 MACH_HIT_B0 HIT_B0 1832 | 1822 | hit_b0 MACH_HIT_B0 HIT_B0 1832 |
1823 | adx_rmu MACH_ADX_RMU ADX_RMU 1833 | 1823 | adx_rmu MACH_ADX_RMU ADX_RMU 1833 |
@@ -2132,3 +2132,116 @@ apollo MACH_APOLLO APOLLO 2141 | |||
2132 | at91cap9stk MACH_AT91CAP9STK AT91CAP9STK 2142 | 2132 | at91cap9stk MACH_AT91CAP9STK AT91CAP9STK 2142 |
2133 | spc300 MACH_SPC300 SPC300 2143 | 2133 | spc300 MACH_SPC300 SPC300 2143 |
2134 | eko MACH_EKO EKO 2144 | 2134 | eko MACH_EKO EKO 2144 |
2135 | ccw9m2443 MACH_CCW9M2443 CCW9M2443 2145 | ||
2136 | ccw9m2443js MACH_CCW9M2443JS CCW9M2443JS 2146 | ||
2137 | m2m_router_device MACH_M2M_ROUTER_DEVICE M2M_ROUTER_DEVICE 2147 | ||
2138 | str9104nas MACH_STAR9104NAS STAR9104NAS 2148 | ||
2139 | pca100 MACH_PCA100 PCA100 2149 | ||
2140 | z3_dm365_mod_01 MACH_Z3_DM365_MOD_01 Z3_DM365_MOD_01 2150 | ||
2141 | hipox MACH_HIPOX HIPOX 2151 | ||
2142 | omap3_piteds MACH_OMAP3_PITEDS OMAP3_PITEDS 2152 | ||
2143 | bm150r MACH_BM150R BM150R 2153 | ||
2144 | tbone MACH_TBONE TBONE 2154 | ||
2145 | merlin MACH_MERLIN MERLIN 2155 | ||
2146 | falcon MACH_FALCON FALCON 2156 | ||
2147 | davinci_da850_evm MACH_DAVINCI_DA850_EVM DAVINCI_DA850_EVM 2157 | ||
2148 | s5p6440 MACH_S5P6440 S5P6440 2158 | ||
2149 | at91sam9g10ek MACH_AT91SAM9G10EK AT91SAM9G10EK 2159 | ||
2150 | omap_4430sdp MACH_OMAP_4430SDP OMAP_4430SDP 2160 | ||
2151 | lpc313x MACH_LPC313X LPC313X 2161 | ||
2152 | magx_zn5 MACH_MAGX_ZN5 MAGX_ZN5 2162 | ||
2153 | magx_em30 MACH_MAGX_EM30 MAGX_EM30 2163 | ||
2154 | magx_ve66 MACH_MAGX_VE66 MAGX_VE66 2164 | ||
2155 | meesc MACH_MEESC MEESC 2165 | ||
2156 | otc570 MACH_OTC570 OTC570 2166 | ||
2157 | bcu2412 MACH_BCU2412 BCU2412 2167 | ||
2158 | beacon MACH_BEACON BEACON 2168 | ||
2159 | actia_tgw MACH_ACTIA_TGW ACTIA_TGW 2169 | ||
2160 | e4430 MACH_E4430 E4430 2170 | ||
2161 | ql300 MACH_QL300 QL300 2171 | ||
2162 | btmavb101 MACH_BTMAVB101 BTMAVB101 2172 | ||
2163 | btmawb101 MACH_BTMAWB101 BTMAWB101 2173 | ||
2164 | sq201 MACH_SQ201 SQ201 2174 | ||
2165 | quatro45xx MACH_QUATRO45XX QUATRO45XX 2175 | ||
2166 | openpad MACH_OPENPAD OPENPAD 2176 | ||
2167 | tx25 MACH_TX25 TX25 2177 | ||
2168 | omap3_torpedo MACH_OMAP3_TORPEDO OMAP3_TORPEDO 2178 | ||
2169 | htcraphael_k MACH_HTCRAPHAEL_K HTCRAPHAEL_K 2179 | ||
2170 | lal43 MACH_LAL43 LAL43 2181 | ||
2171 | htcraphael_cdma500 MACH_HTCRAPHAEL_CDMA500 HTCRAPHAEL_CDMA500 2182 | ||
2172 | anw6410 MACH_ANW6410 ANW6410 2183 | ||
2173 | htcprophet MACH_HTCPROPHET HTCPROPHET 2185 | ||
2174 | cfa_10022 MACH_CFA_10022 CFA_10022 2186 | ||
2175 | imx27_visstrim_m10 MACH_IMX27_VISSTRIM_M10 IMX27_VISSTRIM_M10 2187 | ||
2176 | px2imx27 MACH_PX2IMX27 PX2IMX27 2188 | ||
2177 | stm3210e_eval MACH_STM3210E_EVAL STM3210E_EVAL 2189 | ||
2178 | dvs10 MACH_DVS10 DVS10 2190 | ||
2179 | portuxg20 MACH_PORTUXG20 PORTUXG20 2191 | ||
2180 | arm_spv MACH_ARM_SPV ARM_SPV 2192 | ||
2181 | smdkc110 MACH_SMDKC110 SMDKC110 2193 | ||
2182 | cabespresso MACH_CABESPRESSO CABESPRESSO 2194 | ||
2183 | hmc800 MACH_HMC800 HMC800 2195 | ||
2184 | sholes MACH_SHOLES SHOLES 2196 | ||
2185 | btmxc31 MACH_BTMXC31 BTMXC31 2197 | ||
2186 | dt501 MACH_DT501 DT501 2198 | ||
2187 | ktx MACH_KTX KTX 2199 | ||
2188 | omap3517evm MACH_OMAP3517EVM OMAP3517EVM 2200 | ||
2189 | netspace_v2 MACH_NETSPACE_V2 NETSPACE_V2 2201 | ||
2190 | netspace_max_v2 MACH_NETSPACE_MAX_V2 NETSPACE_MAX_V2 2202 | ||
2191 | d2net_v2 MACH_D2NET_V2 D2NET_V2 2203 | ||
2192 | net2big_v2 MACH_NET2BIG_V2 NET2BIG_V2 2204 | ||
2193 | net4big_v2 MACH_NET4BIG_V2 NET4BIG_V2 2205 | ||
2194 | net5big_v2 MACH_NET5BIG_V2 NET5BIG_V2 2206 | ||
2195 | endb2443 MACH_ENDB2443 ENDB2443 2207 | ||
2196 | inetspace_v2 MACH_INETSPACE_V2 INETSPACE_V2 2208 | ||
2197 | tros MACH_TROS TROS 2209 | ||
2198 | pelco_homer MACH_PELCO_HOMER PELCO_HOMER 2210 | ||
2199 | ofsp8 MACH_OFSP8 OFSP8 2211 | ||
2200 | at91sam9g45ekes MACH_AT91SAM9G45EKES AT91SAM9G45EKES 2212 | ||
2201 | guf_cupid MACH_GUF_CUPID GUF_CUPID 2213 | ||
2202 | eab1r MACH_EAB1R EAB1R 2214 | ||
2203 | desirec MACH_DESIREC DESIREC 2215 | ||
2204 | cordoba MACH_CORDOBA CORDOBA 2216 | ||
2205 | irvine MACH_IRVINE IRVINE 2217 | ||
2206 | sff772 MACH_SFF772 SFF772 2218 | ||
2207 | pelco_milano MACH_PELCO_MILANO PELCO_MILANO 2219 | ||
2208 | pc7302 MACH_PC7302 PC7302 2220 | ||
2209 | bip6000 MACH_BIP6000 BIP6000 2221 | ||
2210 | silvermoon MACH_SILVERMOON SILVERMOON 2222 | ||
2211 | vc0830 MACH_VC0830 VC0830 2223 | ||
2212 | dt430 MACH_DT430 DT430 2224 | ||
2213 | ji42pf MACH_JI42PF JI42PF 2225 | ||
2214 | gnet_ksm MACH_GNET_KSM GNET_KSM 2226 | ||
2215 | gnet_sgm MACH_GNET_SGM GNET_SGM 2227 | ||
2216 | gnet_sgr MACH_GNET_SGR GNET_SGR 2228 | ||
2217 | omap3_icetekevm MACH_OMAP3_ICETEKEVM OMAP3_ICETEKEVM 2229 | ||
2218 | pnp MACH_PNP PNP 2230 | ||
2219 | ctera_2bay_k MACH_CTERA_2BAY_K CTERA_2BAY_K 2231 | ||
2220 | ctera_2bay_u MACH_CTERA_2BAY_U CTERA_2BAY_U 2232 | ||
2221 | sas_c MACH_SAS_C SAS_C 2233 | ||
2222 | vma2315 MACH_VMA2315 VMA2315 2234 | ||
2223 | vcs MACH_VCS VCS 2235 | ||
2224 | spear600 MACH_SPEAR600 SPEAR600 2236 | ||
2225 | spear300 MACH_SPEAR300 SPEAR300 2237 | ||
2226 | spear1300 MACH_SPEAR1300 SPEAR1300 2238 | ||
2227 | lilly1131 MACH_LILLY1131 LILLY1131 2239 | ||
2228 | arvoo_ax301 MACH_ARVOO_AX301 ARVOO_AX301 2240 | ||
2229 | mapphone MACH_MAPPHONE MAPPHONE 2241 | ||
2230 | legend MACH_LEGEND LEGEND 2242 | ||
2231 | salsa MACH_SALSA SALSA 2243 | ||
2232 | lounge MACH_LOUNGE LOUNGE 2244 | ||
2233 | vision MACH_VISION VISION 2245 | ||
2234 | vmb20 MACH_VMB20 VMB20 2246 | ||
2235 | hy2410 MACH_HY2410 HY2410 2247 | ||
2236 | hy9315 MACH_HY9315 HY9315 2248 | ||
2237 | bullwinkle MACH_BULLWINKLE BULLWINKLE 2249 | ||
2238 | arm_ultimator2 MACH_ARM_ULTIMATOR2 ARM_ULTIMATOR2 2250 | ||
2239 | vs_v210 MACH_VS_V210 VS_V210 2252 | ||
2240 | vs_v212 MACH_VS_V212 VS_V212 2253 | ||
2241 | hmt MACH_HMT HMT 2254 | ||
2242 | suen3 MACH_SUEN3 SUEN3 2255 | ||
2243 | vesper MACH_VESPER VESPER 2256 | ||
2244 | str9 MACH_STR9 STR9 2257 | ||
2245 | omap3_wl_ff MACH_OMAP3_WL_FF OMAP3_WL_FF 2258 | ||
2246 | simcom MACH_SIMCOM SIMCOM 2259 | ||
2247 | mcwebio MACH_MCWEBIO MCWEBIO 2260 | ||