aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-05-29 19:07:39 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-05-29 19:07:39 -0400
commit78b170f45b1a0da2625aa33f85d46a78475b268c (patch)
treeb681d4ee8e7e6a77cc4ff08044b25323bce55d7e /arch
parent5606b7f925b36f25a6646bb93a0cf74981de3d28 (diff)
parenta35197a8be891072b3654dc7a2285573150dedee (diff)
Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm: [ARM] update mach-types [ARM] Add cmpxchg support for ARMv6+ systems (v5) [ARM] barriers: improve xchg, bitops and atomic SMP barriers Gemini: Fix SRAM/ROM location after memory swap MAINTAINER: Add F: entries for Gemini and FA526 [ARM] disable NX support for OABI-supporting kernels [ARM] add coherent DMA mask for mv643xx_eth [ARM] pxa/palm: fix PalmLD/T5/TX AC97 MFP [ARM] pxa: add parameter to clksrc_read() for pxa168/910 [ARM] pxa: fix the incorrectly defined drive strength macros for pxa{168,910} [ARM] Orion: Remove explicit name for platform device resources [ARM] Kirkwood: Correct MPP for SATA activity/presence LEDs of QNAP TS-119/TS-219. [ARM] pxa/ezx: fix pin configuration for low power mode [ARM] pxa/spitz: provide spitz_ohci_exit() that unregisters USB_HOST GPIO [ARM] pxa: enable GPIO receivers after configuring pins [ARM] pxa: allow gpio_reset drive high during normal work [ARM] pxa: save/restore PGSR on suspend/resume.
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/include/asm/assembler.h13
-rw-r--r--arch/arm/include/asm/atomic.h61
-rw-r--r--arch/arm/include/asm/system.h176
-rw-r--r--arch/arm/kernel/elf.c9
-rw-r--r--arch/arm/kernel/entry-armv.S5
-rw-r--r--arch/arm/lib/bitops.h2
-rw-r--r--arch/arm/mach-gemini/include/mach/hardware.h3
-rw-r--r--arch/arm/mach-kirkwood/common.c8
-rw-r--r--arch/arm/mach-kirkwood/ts219-setup.c6
-rw-r--r--arch/arm/mach-loki/common.c6
-rw-r--r--arch/arm/mach-mmp/include/mach/mfp-pxa168.h5
-rw-r--r--arch/arm/mach-mmp/include/mach/mfp-pxa910.h5
-rw-r--r--arch/arm/mach-mmp/include/mach/mfp.h9
-rw-r--r--arch/arm/mach-mmp/time.c2
-rw-r--r--arch/arm/mach-mv78xx0/common.c16
-rw-r--r--arch/arm/mach-orion5x/common.c5
-rw-r--r--arch/arm/mach-pxa/ezx.c36
-rw-r--r--arch/arm/mach-pxa/include/mach/reset.h5
-rw-r--r--arch/arm/mach-pxa/mfp-pxa2xx.c6
-rw-r--r--arch/arm/mach-pxa/palmld.c2
-rw-r--r--arch/arm/mach-pxa/palmt5.c1
-rw-r--r--arch/arm/mach-pxa/palmtx.c1
-rw-r--r--arch/arm/mach-pxa/reset.c4
-rw-r--r--arch/arm/mach-pxa/spitz.c8
-rw-r--r--arch/arm/mach-pxa/tosa.c2
-rw-r--r--arch/arm/tools/mach-types131
26 files changed, 460 insertions, 67 deletions
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
47static 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
47static inline int atomic_add_return(int i, atomic_t *v) 63static 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
85static 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
65static inline int atomic_sub_return(int i, atomic_t *v) 101static 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
139static inline int atomic_sub_return(int i, atomic_t *v) 184static 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
152static inline int atomic_cmpxchg(atomic_t *v, int old, int new) 198static 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/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
343extern void __bad_cmpxchg(volatile void *ptr, int size);
344
345/*
346 * cmpxchg only support 32-bits operands on ARMv6.
347 */
348
349static 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
401static 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
419static 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 */
452static 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
477static 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}
83EXPORT_SYMBOL(arm_elf_read_implies_exec); 92EXPORT_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
211: ldrexb r2, [r1] 221: 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
292: mov pc, lr 312: 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/common.c b/arch/arm/mach-kirkwood/common.c
index eeb00240d784..be1ca28fed3f 100644
--- a/arch/arm/mach-kirkwood/common.c
+++ b/arch/arm/mach-kirkwood/common.c
@@ -144,6 +144,9 @@ static struct platform_device kirkwood_ge00 = {
144 .id = 0, 144 .id = 0,
145 .num_resources = 1, 145 .num_resources = 1,
146 .resource = kirkwood_ge00_resources, 146 .resource = kirkwood_ge00_resources,
147 .dev = {
148 .coherent_dma_mask = 0xffffffff,
149 },
147}; 150};
148 151
149void __init kirkwood_ge00_init(struct mv643xx_eth_platform_data *eth_data) 152void __init kirkwood_ge00_init(struct mv643xx_eth_platform_data *eth_data)
@@ -202,6 +205,9 @@ static struct platform_device kirkwood_ge01 = {
202 .id = 1, 205 .id = 1,
203 .num_resources = 1, 206 .num_resources = 1,
204 .resource = kirkwood_ge01_resources, 207 .resource = kirkwood_ge01_resources,
208 .dev = {
209 .coherent_dma_mask = 0xffffffff,
210 },
205}; 211};
206 212
207void __init kirkwood_ge01_init(struct mv643xx_eth_platform_data *eth_data) 213void __init kirkwood_ge01_init(struct mv643xx_eth_platform_data *eth_data)
@@ -386,12 +392,10 @@ static struct mv64xxx_i2c_pdata kirkwood_i2c_pdata = {
386 392
387static struct resource kirkwood_i2c_resources[] = { 393static struct resource kirkwood_i2c_resources[] = {
388 { 394 {
389 .name = "i2c",
390 .start = I2C_PHYS_BASE, 395 .start = I2C_PHYS_BASE,
391 .end = I2C_PHYS_BASE + 0x1f, 396 .end = I2C_PHYS_BASE + 0x1f,
392 .flags = IORESOURCE_MEM, 397 .flags = IORESOURCE_MEM,
393 }, { 398 }, {
394 .name = "i2c",
395 .start = IRQ_KIRKWOOD_TWSI, 399 .start = IRQ_KIRKWOOD_TWSI,
396 .end = IRQ_KIRKWOOD_TWSI, 400 .end = IRQ_KIRKWOOD_TWSI,
397 .flags = IORESOURCE_IRQ, 401 .flags = IORESOURCE_IRQ,
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
87void __init loki_ge0_init(struct mv643xx_eth_platform_data *eth_data) 90void __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
141void __init loki_ge1_init(struct mv643xx_eth_platform_data *eth_data) 147void __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
139static cycle_t clksrc_read(void) 139static 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
326void __init mv78xx0_ge00_init(struct mv643xx_eth_platform_data *eth_data) 329void __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
380void __init mv78xx0_ge01_init(struct mv643xx_eth_platform_data *eth_data) 386void __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
434void __init mv78xx0_ge10_init(struct mv643xx_eth_platform_data *eth_data) 443void __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
501void __init mv78xx0_ge11_init(struct mv643xx_eth_platform_data *eth_data) 513void __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
533static struct resource mv78xx0_i2c_0_resources[] = { 545static 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
568static struct resource mv78xx0_i2c_1_resources[] = { 578static 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-orion5x/common.c b/arch/arm/mach-orion5x/common.c
index 6af99ddabdfb..b1c7778d9f96 100644
--- a/arch/arm/mach-orion5x/common.c
+++ b/arch/arm/mach-orion5x/common.c
@@ -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
193void __init orion5x_eth_init(struct mv643xx_eth_platform_data *eth_data) 196void __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
249static struct resource orion5x_i2c_resources[] = { 252static 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,
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)
145static unsigned long gen1_pin_config[] __initdata = { 145static 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)
200static unsigned long gen2_pin_config[] __initdata = { 200static 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 */
18extern int init_gpio_reset(int gpio, int output); 19extern 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
323static unsigned long saved_gafr[2][4]; 323static unsigned long saved_gafr[2][4];
324static unsigned long saved_gpdr[4]; 324static unsigned long saved_gpdr[4];
325static unsigned long saved_pgsr[4];
325 326
326static int pxa2xx_mfp_suspend(struct sys_device *d, pm_message_t state) 327static 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 1cec1806f002..471a853e548b 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
21static int reset_gpio = -1; 21static int reset_gpio = -1;
22 22
23int init_gpio_reset(int gpio, int output) 23int 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
534static void spitz_ohci_exit(struct device *dev)
535{
536 gpio_free(SPITZ_GPIO_USB_HOST);
537}
538
534static struct pxaohci_platform_data spitz_ohci_platform_data = { 539static 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
732static void __init common_init(void) 738static 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/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
916apf9328 MACH_APF9328 APF9328 906 916apf9328 MACH_APF9328 APF9328 906
917omap_wipoq MACH_OMAP_WIPOQ OMAP_WIPOQ 907 917omap_wipoq MACH_OMAP_WIPOQ OMAP_WIPOQ 907
918omap_twip MACH_OMAP_TWIP OMAP_TWIP 908 918omap_twip MACH_OMAP_TWIP OMAP_TWIP 908
919palmt650 MACH_PALMT650 PALMT650 909 919treo650 MACH_TREO650 TREO650 909
920acumen MACH_ACUMEN ACUMEN 910 920acumen MACH_ACUMEN ACUMEN 910
921xp100 MACH_XP100 XP100 911 921xp100 MACH_XP100 XP100 911
922fs2410 MACH_FS2410 FS2410 912 922fs2410 MACH_FS2410 FS2410 912
@@ -1232,7 +1232,7 @@ ql202b MACH_QL202B QL202B 1226
1232vpac270 MACH_VPAC270 VPAC270 1227 1232vpac270 MACH_VPAC270 VPAC270 1227
1233rd129 MACH_RD129 RD129 1228 1233rd129 MACH_RD129 RD129 1228
1234htcwizard MACH_HTCWIZARD HTCWIZARD 1229 1234htcwizard MACH_HTCWIZARD HTCWIZARD 1229
1235xscale_treo680 MACH_XSCALE_TREO680 XSCALE_TREO680 1230 1235treo680 MACH_TREO680 TREO680 1230
1236tecon_tmezon MACH_TECON_TMEZON TECON_TMEZON 1231 1236tecon_tmezon MACH_TECON_TMEZON TECON_TMEZON 1231
1237zylonite MACH_ZYLONITE ZYLONITE 1233 1237zylonite MACH_ZYLONITE ZYLONITE 1233
1238gene1270 MACH_GENE1270 GENE1270 1234 1238gene1270 MACH_GENE1270 GENE1270 1234
@@ -1418,10 +1418,10 @@ looxc550 MACH_LOOXC550 LOOXC550 1417
1418cnty_titan MACH_CNTY_TITAN CNTY_TITAN 1418 1418cnty_titan MACH_CNTY_TITAN CNTY_TITAN 1418
1419app3xx MACH_APP3XX APP3XX 1419 1419app3xx MACH_APP3XX APP3XX 1419
1420sideoatsgrama MACH_SIDEOATSGRAMA SIDEOATSGRAMA 1420 1420sideoatsgrama MACH_SIDEOATSGRAMA SIDEOATSGRAMA 1420
1421palmtreo700p MACH_PALMTREO700P PALMTREO700P 1421 1421treo700p MACH_TREO700P TREO700P 1421
1422palmtreo700w MACH_PALMTREO700W PALMTREO700W 1422 1422treo700w MACH_TREO700W TREO700W 1422
1423palmtreo750 MACH_PALMTREO750 PALMTREO750 1423 1423treo750 MACH_TREO750 TREO750 1423
1424palmtreo755p MACH_PALMTREO755P PALMTREO755P 1424 1424treo755p MACH_TREO755P TREO755P 1424
1425ezreganut9200 MACH_EZREGANUT9200 EZREGANUT9200 1425 1425ezreganut9200 MACH_EZREGANUT9200 EZREGANUT9200 1425
1426sarge MACH_SARGE SARGE 1426 1426sarge MACH_SARGE SARGE 1426
1427a696 MACH_A696 A696 1427 1427a696 MACH_A696 A696 1427
@@ -1721,7 +1721,7 @@ sapphire MACH_SAPPHIRE SAPPHIRE 1729
1721csb637xo MACH_CSB637XO CSB637XO 1730 1721csb637xo MACH_CSB637XO CSB637XO 1730
1722evisiong MACH_EVISIONG EVISIONG 1731 1722evisiong MACH_EVISIONG EVISIONG 1731
1723stmp37xx MACH_STMP37XX STMP37XX 1732 1723stmp37xx MACH_STMP37XX STMP37XX 1732
1724stmp378x MACH_STMP38XX STMP38XX 1733 1724stmp378x MACH_STMP378X STMP378X 1733
1725tnt MACH_TNT TNT 1734 1725tnt MACH_TNT TNT 1734
1726tbxt MACH_TBXT TBXT 1735 1726tbxt MACH_TBXT TBXT 1735
1727playmate MACH_PLAYMATE PLAYMATE 1736 1727playmate MACH_PLAYMATE PLAYMATE 1736
@@ -1817,7 +1817,7 @@ smdkc100 MACH_SMDKC100 SMDKC100 1826
1817tavorevb MACH_TAVOREVB TAVOREVB 1827 1817tavorevb MACH_TAVOREVB TAVOREVB 1827
1818saar MACH_SAAR SAAR 1828 1818saar MACH_SAAR SAAR 1828
1819deister_eyecam MACH_DEISTER_EYECAM DEISTER_EYECAM 1829 1819deister_eyecam MACH_DEISTER_EYECAM DEISTER_EYECAM 1829
1820at91sam9m10ek MACH_AT91SAM9M10EK AT91SAM9M10EK 1830 1820at91sam9m10g45ek MACH_AT91SAM9M10G45EK AT91SAM9M10G45EK 1830
1821linkstation_produo MACH_LINKSTATION_PRODUO LINKSTATION_PRODUO 1831 1821linkstation_produo MACH_LINKSTATION_PRODUO LINKSTATION_PRODUO 1831
1822hit_b0 MACH_HIT_B0 HIT_B0 1832 1822hit_b0 MACH_HIT_B0 HIT_B0 1832
1823adx_rmu MACH_ADX_RMU ADX_RMU 1833 1823adx_rmu MACH_ADX_RMU ADX_RMU 1833
@@ -2132,3 +2132,116 @@ apollo MACH_APOLLO APOLLO 2141
2132at91cap9stk MACH_AT91CAP9STK AT91CAP9STK 2142 2132at91cap9stk MACH_AT91CAP9STK AT91CAP9STK 2142
2133spc300 MACH_SPC300 SPC300 2143 2133spc300 MACH_SPC300 SPC300 2143
2134eko MACH_EKO EKO 2144 2134eko MACH_EKO EKO 2144
2135ccw9m2443 MACH_CCW9M2443 CCW9M2443 2145
2136ccw9m2443js MACH_CCW9M2443JS CCW9M2443JS 2146
2137m2m_router_device MACH_M2M_ROUTER_DEVICE M2M_ROUTER_DEVICE 2147
2138str9104nas MACH_STAR9104NAS STAR9104NAS 2148
2139pca100 MACH_PCA100 PCA100 2149
2140z3_dm365_mod_01 MACH_Z3_DM365_MOD_01 Z3_DM365_MOD_01 2150
2141hipox MACH_HIPOX HIPOX 2151
2142omap3_piteds MACH_OMAP3_PITEDS OMAP3_PITEDS 2152
2143bm150r MACH_BM150R BM150R 2153
2144tbone MACH_TBONE TBONE 2154
2145merlin MACH_MERLIN MERLIN 2155
2146falcon MACH_FALCON FALCON 2156
2147davinci_da850_evm MACH_DAVINCI_DA850_EVM DAVINCI_DA850_EVM 2157
2148s5p6440 MACH_S5P6440 S5P6440 2158
2149at91sam9g10ek MACH_AT91SAM9G10EK AT91SAM9G10EK 2159
2150omap_4430sdp MACH_OMAP_4430SDP OMAP_4430SDP 2160
2151lpc313x MACH_LPC313X LPC313X 2161
2152magx_zn5 MACH_MAGX_ZN5 MAGX_ZN5 2162
2153magx_em30 MACH_MAGX_EM30 MAGX_EM30 2163
2154magx_ve66 MACH_MAGX_VE66 MAGX_VE66 2164
2155meesc MACH_MEESC MEESC 2165
2156otc570 MACH_OTC570 OTC570 2166
2157bcu2412 MACH_BCU2412 BCU2412 2167
2158beacon MACH_BEACON BEACON 2168
2159actia_tgw MACH_ACTIA_TGW ACTIA_TGW 2169
2160e4430 MACH_E4430 E4430 2170
2161ql300 MACH_QL300 QL300 2171
2162btmavb101 MACH_BTMAVB101 BTMAVB101 2172
2163btmawb101 MACH_BTMAWB101 BTMAWB101 2173
2164sq201 MACH_SQ201 SQ201 2174
2165quatro45xx MACH_QUATRO45XX QUATRO45XX 2175
2166openpad MACH_OPENPAD OPENPAD 2176
2167tx25 MACH_TX25 TX25 2177
2168omap3_torpedo MACH_OMAP3_TORPEDO OMAP3_TORPEDO 2178
2169htcraphael_k MACH_HTCRAPHAEL_K HTCRAPHAEL_K 2179
2170lal43 MACH_LAL43 LAL43 2181
2171htcraphael_cdma500 MACH_HTCRAPHAEL_CDMA500 HTCRAPHAEL_CDMA500 2182
2172anw6410 MACH_ANW6410 ANW6410 2183
2173htcprophet MACH_HTCPROPHET HTCPROPHET 2185
2174cfa_10022 MACH_CFA_10022 CFA_10022 2186
2175imx27_visstrim_m10 MACH_IMX27_VISSTRIM_M10 IMX27_VISSTRIM_M10 2187
2176px2imx27 MACH_PX2IMX27 PX2IMX27 2188
2177stm3210e_eval MACH_STM3210E_EVAL STM3210E_EVAL 2189
2178dvs10 MACH_DVS10 DVS10 2190
2179portuxg20 MACH_PORTUXG20 PORTUXG20 2191
2180arm_spv MACH_ARM_SPV ARM_SPV 2192
2181smdkc110 MACH_SMDKC110 SMDKC110 2193
2182cabespresso MACH_CABESPRESSO CABESPRESSO 2194
2183hmc800 MACH_HMC800 HMC800 2195
2184sholes MACH_SHOLES SHOLES 2196
2185btmxc31 MACH_BTMXC31 BTMXC31 2197
2186dt501 MACH_DT501 DT501 2198
2187ktx MACH_KTX KTX 2199
2188omap3517evm MACH_OMAP3517EVM OMAP3517EVM 2200
2189netspace_v2 MACH_NETSPACE_V2 NETSPACE_V2 2201
2190netspace_max_v2 MACH_NETSPACE_MAX_V2 NETSPACE_MAX_V2 2202
2191d2net_v2 MACH_D2NET_V2 D2NET_V2 2203
2192net2big_v2 MACH_NET2BIG_V2 NET2BIG_V2 2204
2193net4big_v2 MACH_NET4BIG_V2 NET4BIG_V2 2205
2194net5big_v2 MACH_NET5BIG_V2 NET5BIG_V2 2206
2195endb2443 MACH_ENDB2443 ENDB2443 2207
2196inetspace_v2 MACH_INETSPACE_V2 INETSPACE_V2 2208
2197tros MACH_TROS TROS 2209
2198pelco_homer MACH_PELCO_HOMER PELCO_HOMER 2210
2199ofsp8 MACH_OFSP8 OFSP8 2211
2200at91sam9g45ekes MACH_AT91SAM9G45EKES AT91SAM9G45EKES 2212
2201guf_cupid MACH_GUF_CUPID GUF_CUPID 2213
2202eab1r MACH_EAB1R EAB1R 2214
2203desirec MACH_DESIREC DESIREC 2215
2204cordoba MACH_CORDOBA CORDOBA 2216
2205irvine MACH_IRVINE IRVINE 2217
2206sff772 MACH_SFF772 SFF772 2218
2207pelco_milano MACH_PELCO_MILANO PELCO_MILANO 2219
2208pc7302 MACH_PC7302 PC7302 2220
2209bip6000 MACH_BIP6000 BIP6000 2221
2210silvermoon MACH_SILVERMOON SILVERMOON 2222
2211vc0830 MACH_VC0830 VC0830 2223
2212dt430 MACH_DT430 DT430 2224
2213ji42pf MACH_JI42PF JI42PF 2225
2214gnet_ksm MACH_GNET_KSM GNET_KSM 2226
2215gnet_sgm MACH_GNET_SGM GNET_SGM 2227
2216gnet_sgr MACH_GNET_SGR GNET_SGR 2228
2217omap3_icetekevm MACH_OMAP3_ICETEKEVM OMAP3_ICETEKEVM 2229
2218pnp MACH_PNP PNP 2230
2219ctera_2bay_k MACH_CTERA_2BAY_K CTERA_2BAY_K 2231
2220ctera_2bay_u MACH_CTERA_2BAY_U CTERA_2BAY_U 2232
2221sas_c MACH_SAS_C SAS_C 2233
2222vma2315 MACH_VMA2315 VMA2315 2234
2223vcs MACH_VCS VCS 2235
2224spear600 MACH_SPEAR600 SPEAR600 2236
2225spear300 MACH_SPEAR300 SPEAR300 2237
2226spear1300 MACH_SPEAR1300 SPEAR1300 2238
2227lilly1131 MACH_LILLY1131 LILLY1131 2239
2228arvoo_ax301 MACH_ARVOO_AX301 ARVOO_AX301 2240
2229mapphone MACH_MAPPHONE MAPPHONE 2241
2230legend MACH_LEGEND LEGEND 2242
2231salsa MACH_SALSA SALSA 2243
2232lounge MACH_LOUNGE LOUNGE 2244
2233vision MACH_VISION VISION 2245
2234vmb20 MACH_VMB20 VMB20 2246
2235hy2410 MACH_HY2410 HY2410 2247
2236hy9315 MACH_HY9315 HY9315 2248
2237bullwinkle MACH_BULLWINKLE BULLWINKLE 2249
2238arm_ultimator2 MACH_ARM_ULTIMATOR2 ARM_ULTIMATOR2 2250
2239vs_v210 MACH_VS_V210 VS_V210 2252
2240vs_v212 MACH_VS_V212 VS_V212 2253
2241hmt MACH_HMT HMT 2254
2242suen3 MACH_SUEN3 SUEN3 2255
2243vesper MACH_VESPER VESPER 2256
2244str9 MACH_STR9 STR9 2257
2245omap3_wl_ff MACH_OMAP3_WL_FF OMAP3_WL_FF 2258
2246simcom MACH_SIMCOM SIMCOM 2259
2247mcwebio MACH_MCWEBIO MCWEBIO 2260