diff options
Diffstat (limited to 'arch/arm')
107 files changed, 1214 insertions, 226 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 975b5ddc60e9..3bf38c84fd23 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -1272,6 +1272,32 @@ config ARM_ERRATA_754327 | |||
1272 | This workaround defines cpu_relax() as smp_mb(), preventing correctly | 1272 | This workaround defines cpu_relax() as smp_mb(), preventing correctly |
1273 | written polling loops from denying visibility of updates to memory. | 1273 | written polling loops from denying visibility of updates to memory. |
1274 | 1274 | ||
1275 | config ARM_ERRATA_364296 | ||
1276 | bool "ARM errata: Possible cache data corruption with hit-under-miss enabled" | ||
1277 | depends on CPU_V6 && !SMP | ||
1278 | help | ||
1279 | This options enables the workaround for the 364296 ARM1136 | ||
1280 | r0p2 erratum (possible cache data corruption with | ||
1281 | hit-under-miss enabled). It sets the undocumented bit 31 in | ||
1282 | the auxiliary control register and the FI bit in the control | ||
1283 | register, thus disabling hit-under-miss without putting the | ||
1284 | processor into full low interrupt latency mode. ARM11MPCore | ||
1285 | is not affected. | ||
1286 | |||
1287 | config ARM_ERRATA_764369 | ||
1288 | bool "ARM errata: Data cache line maintenance operation by MVA may not succeed" | ||
1289 | depends on CPU_V7 && SMP | ||
1290 | help | ||
1291 | This option enables the workaround for erratum 764369 | ||
1292 | affecting Cortex-A9 MPCore with two or more processors (all | ||
1293 | current revisions). Under certain timing circumstances, a data | ||
1294 | cache line maintenance operation by MVA targeting an Inner | ||
1295 | Shareable memory region may fail to proceed up to either the | ||
1296 | Point of Coherency or to the Point of Unification of the | ||
1297 | system. This workaround adds a DSB instruction before the | ||
1298 | relevant cache maintenance functions and sets a specific bit | ||
1299 | in the diagnostic control register of the SCU. | ||
1300 | |||
1275 | endmenu | 1301 | endmenu |
1276 | 1302 | ||
1277 | source "arch/arm/common/Kconfig" | 1303 | source "arch/arm/common/Kconfig" |
diff --git a/arch/arm/boot/compressed/mmcif-sh7372.c b/arch/arm/boot/compressed/mmcif-sh7372.c index b6f61d9a5a1b..672ae95db5c3 100644 --- a/arch/arm/boot/compressed/mmcif-sh7372.c +++ b/arch/arm/boot/compressed/mmcif-sh7372.c | |||
@@ -82,7 +82,7 @@ asmlinkage void mmc_loader(unsigned char *buf, unsigned long len) | |||
82 | 82 | ||
83 | 83 | ||
84 | /* Disable clock to MMC hardware block */ | 84 | /* Disable clock to MMC hardware block */ |
85 | __raw_writel(__raw_readl(SMSTPCR3) & (1 << 12), SMSTPCR3); | 85 | __raw_writel(__raw_readl(SMSTPCR3) | (1 << 12), SMSTPCR3); |
86 | 86 | ||
87 | mmc_update_progress(MMC_PROGRESS_DONE); | 87 | mmc_update_progress(MMC_PROGRESS_DONE); |
88 | } | 88 | } |
diff --git a/arch/arm/boot/compressed/sdhi-sh7372.c b/arch/arm/boot/compressed/sdhi-sh7372.c index d403a8b24d7f..d279294f2381 100644 --- a/arch/arm/boot/compressed/sdhi-sh7372.c +++ b/arch/arm/boot/compressed/sdhi-sh7372.c | |||
@@ -85,7 +85,7 @@ asmlinkage void mmc_loader(unsigned short *buf, unsigned long len) | |||
85 | goto err; | 85 | goto err; |
86 | 86 | ||
87 | /* Disable clock to SDHI1 hardware block */ | 87 | /* Disable clock to SDHI1 hardware block */ |
88 | __raw_writel(__raw_readl(SMSTPCR3) & (1 << 13), SMSTPCR3); | 88 | __raw_writel(__raw_readl(SMSTPCR3) | (1 << 13), SMSTPCR3); |
89 | 89 | ||
90 | mmc_update_progress(MMC_PROGRESS_DONE); | 90 | mmc_update_progress(MMC_PROGRESS_DONE); |
91 | 91 | ||
diff --git a/arch/arm/boot/dts/tegra-harmony.dts b/arch/arm/boot/dts/tegra-harmony.dts index 4c053340ce33..e5818668d091 100644 --- a/arch/arm/boot/dts/tegra-harmony.dts +++ b/arch/arm/boot/dts/tegra-harmony.dts | |||
@@ -57,14 +57,14 @@ | |||
57 | }; | 57 | }; |
58 | 58 | ||
59 | sdhci@c8000200 { | 59 | sdhci@c8000200 { |
60 | gpios = <&gpio 69 0>, /* cd, gpio PI5 */ | 60 | cd-gpios = <&gpio 69 0>; /* gpio PI5 */ |
61 | <&gpio 57 0>, /* wp, gpio PH1 */ | 61 | wp-gpios = <&gpio 57 0>; /* gpio PH1 */ |
62 | <&gpio 155 0>; /* power, gpio PT3 */ | 62 | power-gpios = <&gpio 155 0>; /* gpio PT3 */ |
63 | }; | 63 | }; |
64 | 64 | ||
65 | sdhci@c8000600 { | 65 | sdhci@c8000600 { |
66 | gpios = <&gpio 58 0>, /* cd, gpio PH2 */ | 66 | cd-gpios = <&gpio 58 0>; /* gpio PH2 */ |
67 | <&gpio 59 0>, /* wp, gpio PH3 */ | 67 | wp-gpios = <&gpio 59 0>; /* gpio PH3 */ |
68 | <&gpio 70 0>; /* power, gpio PI6 */ | 68 | power-gpios = <&gpio 70 0>; /* gpio PI6 */ |
69 | }; | 69 | }; |
70 | }; | 70 | }; |
diff --git a/arch/arm/boot/dts/tegra-seaboard.dts b/arch/arm/boot/dts/tegra-seaboard.dts index 1940cae00748..64cedca6fc79 100644 --- a/arch/arm/boot/dts/tegra-seaboard.dts +++ b/arch/arm/boot/dts/tegra-seaboard.dts | |||
@@ -21,8 +21,8 @@ | |||
21 | }; | 21 | }; |
22 | 22 | ||
23 | sdhci@c8000400 { | 23 | sdhci@c8000400 { |
24 | gpios = <&gpio 69 0>, /* cd, gpio PI5 */ | 24 | cd-gpios = <&gpio 69 0>; /* gpio PI5 */ |
25 | <&gpio 57 0>, /* wp, gpio PH1 */ | 25 | wp-gpios = <&gpio 57 0>; /* gpio PH1 */ |
26 | <&gpio 70 0>; /* power, gpio PI6 */ | 26 | power-gpios = <&gpio 70 0>; /* gpio PI6 */ |
27 | }; | 27 | }; |
28 | }; | 28 | }; |
diff --git a/arch/arm/configs/mxs_defconfig b/arch/arm/configs/mxs_defconfig index db2cb7d180dc..6ee781bf6bf1 100644 --- a/arch/arm/configs/mxs_defconfig +++ b/arch/arm/configs/mxs_defconfig | |||
@@ -26,6 +26,7 @@ CONFIG_MACH_MX23EVK=y | |||
26 | CONFIG_MACH_MX28EVK=y | 26 | CONFIG_MACH_MX28EVK=y |
27 | CONFIG_MACH_STMP378X_DEVB=y | 27 | CONFIG_MACH_STMP378X_DEVB=y |
28 | CONFIG_MACH_TX28=y | 28 | CONFIG_MACH_TX28=y |
29 | CONFIG_MACH_M28EVK=y | ||
29 | # CONFIG_ARM_THUMB is not set | 30 | # CONFIG_ARM_THUMB is not set |
30 | CONFIG_NO_HZ=y | 31 | CONFIG_NO_HZ=y |
31 | CONFIG_HIGH_RES_TIMERS=y | 32 | CONFIG_HIGH_RES_TIMERS=y |
diff --git a/arch/arm/include/asm/futex.h b/arch/arm/include/asm/futex.h index 8c73900da9ed..253cc86318bf 100644 --- a/arch/arm/include/asm/futex.h +++ b/arch/arm/include/asm/futex.h | |||
@@ -25,17 +25,17 @@ | |||
25 | 25 | ||
26 | #ifdef CONFIG_SMP | 26 | #ifdef CONFIG_SMP |
27 | 27 | ||
28 | #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \ | 28 | #define __futex_atomic_op(insn, ret, oldval, tmp, uaddr, oparg) \ |
29 | smp_mb(); \ | 29 | smp_mb(); \ |
30 | __asm__ __volatile__( \ | 30 | __asm__ __volatile__( \ |
31 | "1: ldrex %1, [%2]\n" \ | 31 | "1: ldrex %1, [%3]\n" \ |
32 | " " insn "\n" \ | 32 | " " insn "\n" \ |
33 | "2: strex %1, %0, [%2]\n" \ | 33 | "2: strex %2, %0, [%3]\n" \ |
34 | " teq %1, #0\n" \ | 34 | " teq %2, #0\n" \ |
35 | " bne 1b\n" \ | 35 | " bne 1b\n" \ |
36 | " mov %0, #0\n" \ | 36 | " mov %0, #0\n" \ |
37 | __futex_atomic_ex_table("%4") \ | 37 | __futex_atomic_ex_table("%5") \ |
38 | : "=&r" (ret), "=&r" (oldval) \ | 38 | : "=&r" (ret), "=&r" (oldval), "=&r" (tmp) \ |
39 | : "r" (uaddr), "r" (oparg), "Ir" (-EFAULT) \ | 39 | : "r" (uaddr), "r" (oparg), "Ir" (-EFAULT) \ |
40 | : "cc", "memory") | 40 | : "cc", "memory") |
41 | 41 | ||
@@ -73,14 +73,14 @@ futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr, | |||
73 | #include <linux/preempt.h> | 73 | #include <linux/preempt.h> |
74 | #include <asm/domain.h> | 74 | #include <asm/domain.h> |
75 | 75 | ||
76 | #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \ | 76 | #define __futex_atomic_op(insn, ret, oldval, tmp, uaddr, oparg) \ |
77 | __asm__ __volatile__( \ | 77 | __asm__ __volatile__( \ |
78 | "1: " T(ldr) " %1, [%2]\n" \ | 78 | "1: " T(ldr) " %1, [%3]\n" \ |
79 | " " insn "\n" \ | 79 | " " insn "\n" \ |
80 | "2: " T(str) " %0, [%2]\n" \ | 80 | "2: " T(str) " %0, [%3]\n" \ |
81 | " mov %0, #0\n" \ | 81 | " mov %0, #0\n" \ |
82 | __futex_atomic_ex_table("%4") \ | 82 | __futex_atomic_ex_table("%5") \ |
83 | : "=&r" (ret), "=&r" (oldval) \ | 83 | : "=&r" (ret), "=&r" (oldval), "=&r" (tmp) \ |
84 | : "r" (uaddr), "r" (oparg), "Ir" (-EFAULT) \ | 84 | : "r" (uaddr), "r" (oparg), "Ir" (-EFAULT) \ |
85 | : "cc", "memory") | 85 | : "cc", "memory") |
86 | 86 | ||
@@ -117,7 +117,7 @@ futex_atomic_op_inuser (int encoded_op, u32 __user *uaddr) | |||
117 | int cmp = (encoded_op >> 24) & 15; | 117 | int cmp = (encoded_op >> 24) & 15; |
118 | int oparg = (encoded_op << 8) >> 20; | 118 | int oparg = (encoded_op << 8) >> 20; |
119 | int cmparg = (encoded_op << 20) >> 20; | 119 | int cmparg = (encoded_op << 20) >> 20; |
120 | int oldval = 0, ret; | 120 | int oldval = 0, ret, tmp; |
121 | 121 | ||
122 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) | 122 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) |
123 | oparg = 1 << oparg; | 123 | oparg = 1 << oparg; |
@@ -129,19 +129,19 @@ futex_atomic_op_inuser (int encoded_op, u32 __user *uaddr) | |||
129 | 129 | ||
130 | switch (op) { | 130 | switch (op) { |
131 | case FUTEX_OP_SET: | 131 | case FUTEX_OP_SET: |
132 | __futex_atomic_op("mov %0, %3", ret, oldval, uaddr, oparg); | 132 | __futex_atomic_op("mov %0, %4", ret, oldval, tmp, uaddr, oparg); |
133 | break; | 133 | break; |
134 | case FUTEX_OP_ADD: | 134 | case FUTEX_OP_ADD: |
135 | __futex_atomic_op("add %0, %1, %3", ret, oldval, uaddr, oparg); | 135 | __futex_atomic_op("add %0, %1, %4", ret, oldval, tmp, uaddr, oparg); |
136 | break; | 136 | break; |
137 | case FUTEX_OP_OR: | 137 | case FUTEX_OP_OR: |
138 | __futex_atomic_op("orr %0, %1, %3", ret, oldval, uaddr, oparg); | 138 | __futex_atomic_op("orr %0, %1, %4", ret, oldval, tmp, uaddr, oparg); |
139 | break; | 139 | break; |
140 | case FUTEX_OP_ANDN: | 140 | case FUTEX_OP_ANDN: |
141 | __futex_atomic_op("and %0, %1, %3", ret, oldval, uaddr, ~oparg); | 141 | __futex_atomic_op("and %0, %1, %4", ret, oldval, tmp, uaddr, ~oparg); |
142 | break; | 142 | break; |
143 | case FUTEX_OP_XOR: | 143 | case FUTEX_OP_XOR: |
144 | __futex_atomic_op("eor %0, %1, %3", ret, oldval, uaddr, oparg); | 144 | __futex_atomic_op("eor %0, %1, %4", ret, oldval, tmp, uaddr, oparg); |
145 | break; | 145 | break; |
146 | default: | 146 | default: |
147 | ret = -ENOSYS; | 147 | ret = -ENOSYS; |
diff --git a/arch/arm/include/asm/hardware/cache-l2x0.h b/arch/arm/include/asm/hardware/cache-l2x0.h index 16bd48031583..99a6ed7e1bfd 100644 --- a/arch/arm/include/asm/hardware/cache-l2x0.h +++ b/arch/arm/include/asm/hardware/cache-l2x0.h | |||
@@ -45,8 +45,13 @@ | |||
45 | #define L2X0_CLEAN_INV_LINE_PA 0x7F0 | 45 | #define L2X0_CLEAN_INV_LINE_PA 0x7F0 |
46 | #define L2X0_CLEAN_INV_LINE_IDX 0x7F8 | 46 | #define L2X0_CLEAN_INV_LINE_IDX 0x7F8 |
47 | #define L2X0_CLEAN_INV_WAY 0x7FC | 47 | #define L2X0_CLEAN_INV_WAY 0x7FC |
48 | #define L2X0_LOCKDOWN_WAY_D 0x900 | 48 | /* |
49 | #define L2X0_LOCKDOWN_WAY_I 0x904 | 49 | * The lockdown registers repeat 8 times for L310, the L210 has only one |
50 | * D and one I lockdown register at 0x0900 and 0x0904. | ||
51 | */ | ||
52 | #define L2X0_LOCKDOWN_WAY_D_BASE 0x900 | ||
53 | #define L2X0_LOCKDOWN_WAY_I_BASE 0x904 | ||
54 | #define L2X0_LOCKDOWN_STRIDE 0x08 | ||
50 | #define L2X0_TEST_OPERATION 0xF00 | 55 | #define L2X0_TEST_OPERATION 0xF00 |
51 | #define L2X0_LINE_DATA 0xF10 | 56 | #define L2X0_LINE_DATA 0xF10 |
52 | #define L2X0_LINE_TAG 0xF30 | 57 | #define L2X0_LINE_TAG 0xF30 |
@@ -64,7 +69,7 @@ | |||
64 | #define L2X0_AUX_CTRL_MASK 0xc0000fff | 69 | #define L2X0_AUX_CTRL_MASK 0xc0000fff |
65 | #define L2X0_AUX_CTRL_ASSOCIATIVITY_SHIFT 16 | 70 | #define L2X0_AUX_CTRL_ASSOCIATIVITY_SHIFT 16 |
66 | #define L2X0_AUX_CTRL_WAY_SIZE_SHIFT 17 | 71 | #define L2X0_AUX_CTRL_WAY_SIZE_SHIFT 17 |
67 | #define L2X0_AUX_CTRL_WAY_SIZE_MASK (0x3 << 17) | 72 | #define L2X0_AUX_CTRL_WAY_SIZE_MASK (0x7 << 17) |
68 | #define L2X0_AUX_CTRL_SHARE_OVERRIDE_SHIFT 22 | 73 | #define L2X0_AUX_CTRL_SHARE_OVERRIDE_SHIFT 22 |
69 | #define L2X0_AUX_CTRL_NS_LOCKDOWN_SHIFT 26 | 74 | #define L2X0_AUX_CTRL_NS_LOCKDOWN_SHIFT 26 |
70 | #define L2X0_AUX_CTRL_NS_INT_CTRL_SHIFT 27 | 75 | #define L2X0_AUX_CTRL_NS_INT_CTRL_SHIFT 27 |
diff --git a/arch/arm/include/asm/pmu.h b/arch/arm/include/asm/pmu.h index 67c70a31a1be..b7e82c4aced6 100644 --- a/arch/arm/include/asm/pmu.h +++ b/arch/arm/include/asm/pmu.h | |||
@@ -41,7 +41,7 @@ struct arm_pmu_platdata { | |||
41 | * encoded error on failure. | 41 | * encoded error on failure. |
42 | */ | 42 | */ |
43 | extern struct platform_device * | 43 | extern struct platform_device * |
44 | reserve_pmu(enum arm_pmu_type device); | 44 | reserve_pmu(enum arm_pmu_type type); |
45 | 45 | ||
46 | /** | 46 | /** |
47 | * release_pmu() - Relinquish control of the performance counters | 47 | * release_pmu() - Relinquish control of the performance counters |
@@ -62,26 +62,26 @@ release_pmu(enum arm_pmu_type type); | |||
62 | * the actual hardware initialisation. | 62 | * the actual hardware initialisation. |
63 | */ | 63 | */ |
64 | extern int | 64 | extern int |
65 | init_pmu(enum arm_pmu_type device); | 65 | init_pmu(enum arm_pmu_type type); |
66 | 66 | ||
67 | #else /* CONFIG_CPU_HAS_PMU */ | 67 | #else /* CONFIG_CPU_HAS_PMU */ |
68 | 68 | ||
69 | #include <linux/err.h> | 69 | #include <linux/err.h> |
70 | 70 | ||
71 | static inline struct platform_device * | 71 | static inline struct platform_device * |
72 | reserve_pmu(enum arm_pmu_type device) | 72 | reserve_pmu(enum arm_pmu_type type) |
73 | { | 73 | { |
74 | return ERR_PTR(-ENODEV); | 74 | return ERR_PTR(-ENODEV); |
75 | } | 75 | } |
76 | 76 | ||
77 | static inline int | 77 | static inline int |
78 | release_pmu(struct platform_device *pdev) | 78 | release_pmu(enum arm_pmu_type type) |
79 | { | 79 | { |
80 | return -ENODEV; | 80 | return -ENODEV; |
81 | } | 81 | } |
82 | 82 | ||
83 | static inline int | 83 | static inline int |
84 | init_pmu(enum arm_pmu_type device) | 84 | init_pmu(enum arm_pmu_type type) |
85 | { | 85 | { |
86 | return -ENODEV; | 86 | return -ENODEV; |
87 | } | 87 | } |
diff --git a/arch/arm/include/asm/unistd.h b/arch/arm/include/asm/unistd.h index 2c04ed5efeb5..c60a2944f95b 100644 --- a/arch/arm/include/asm/unistd.h +++ b/arch/arm/include/asm/unistd.h | |||
@@ -478,8 +478,8 @@ | |||
478 | /* | 478 | /* |
479 | * Unimplemented (or alternatively implemented) syscalls | 479 | * Unimplemented (or alternatively implemented) syscalls |
480 | */ | 480 | */ |
481 | #define __IGNORE_fadvise64_64 1 | 481 | #define __IGNORE_fadvise64_64 |
482 | #define __IGNORE_migrate_pages 1 | 482 | #define __IGNORE_migrate_pages |
483 | 483 | ||
484 | #endif /* __KERNEL__ */ | 484 | #endif /* __KERNEL__ */ |
485 | #endif /* __ASM_ARM_UNISTD_H */ | 485 | #endif /* __ASM_ARM_UNISTD_H */ |
diff --git a/arch/arm/kernel/calls.S b/arch/arm/kernel/calls.S index 80f7896cc016..9943e9e74a1b 100644 --- a/arch/arm/kernel/calls.S +++ b/arch/arm/kernel/calls.S | |||
@@ -178,7 +178,7 @@ | |||
178 | CALL(sys_ni_syscall) /* vm86 */ | 178 | CALL(sys_ni_syscall) /* vm86 */ |
179 | CALL(sys_ni_syscall) /* was sys_query_module */ | 179 | CALL(sys_ni_syscall) /* was sys_query_module */ |
180 | CALL(sys_poll) | 180 | CALL(sys_poll) |
181 | CALL(sys_nfsservctl) | 181 | CALL(sys_ni_syscall) /* was nfsservctl */ |
182 | /* 170 */ CALL(sys_setresgid16) | 182 | /* 170 */ CALL(sys_setresgid16) |
183 | CALL(sys_getresgid16) | 183 | CALL(sys_getresgid16) |
184 | CALL(sys_prctl) | 184 | CALL(sys_prctl) |
diff --git a/arch/arm/kernel/pmu.c b/arch/arm/kernel/pmu.c index 2b70709376c3..c53474fe84df 100644 --- a/arch/arm/kernel/pmu.c +++ b/arch/arm/kernel/pmu.c | |||
@@ -31,7 +31,7 @@ static int __devinit pmu_register(struct platform_device *pdev, | |||
31 | { | 31 | { |
32 | if (type < 0 || type >= ARM_NUM_PMU_DEVICES) { | 32 | if (type < 0 || type >= ARM_NUM_PMU_DEVICES) { |
33 | pr_warning("received registration request for unknown " | 33 | pr_warning("received registration request for unknown " |
34 | "device %d\n", type); | 34 | "PMU device type %d\n", type); |
35 | return -EINVAL; | 35 | return -EINVAL; |
36 | } | 36 | } |
37 | 37 | ||
@@ -112,17 +112,17 @@ static int __init register_pmu_driver(void) | |||
112 | device_initcall(register_pmu_driver); | 112 | device_initcall(register_pmu_driver); |
113 | 113 | ||
114 | struct platform_device * | 114 | struct platform_device * |
115 | reserve_pmu(enum arm_pmu_type device) | 115 | reserve_pmu(enum arm_pmu_type type) |
116 | { | 116 | { |
117 | struct platform_device *pdev; | 117 | struct platform_device *pdev; |
118 | 118 | ||
119 | if (test_and_set_bit_lock(device, &pmu_lock)) { | 119 | if (test_and_set_bit_lock(type, &pmu_lock)) { |
120 | pdev = ERR_PTR(-EBUSY); | 120 | pdev = ERR_PTR(-EBUSY); |
121 | } else if (pmu_devices[device] == NULL) { | 121 | } else if (pmu_devices[type] == NULL) { |
122 | clear_bit_unlock(device, &pmu_lock); | 122 | clear_bit_unlock(type, &pmu_lock); |
123 | pdev = ERR_PTR(-ENODEV); | 123 | pdev = ERR_PTR(-ENODEV); |
124 | } else { | 124 | } else { |
125 | pdev = pmu_devices[device]; | 125 | pdev = pmu_devices[type]; |
126 | } | 126 | } |
127 | 127 | ||
128 | return pdev; | 128 | return pdev; |
@@ -130,11 +130,11 @@ reserve_pmu(enum arm_pmu_type device) | |||
130 | EXPORT_SYMBOL_GPL(reserve_pmu); | 130 | EXPORT_SYMBOL_GPL(reserve_pmu); |
131 | 131 | ||
132 | int | 132 | int |
133 | release_pmu(enum arm_pmu_type device) | 133 | release_pmu(enum arm_pmu_type type) |
134 | { | 134 | { |
135 | if (WARN_ON(!pmu_devices[device])) | 135 | if (WARN_ON(!pmu_devices[type])) |
136 | return -EINVAL; | 136 | return -EINVAL; |
137 | clear_bit_unlock(device, &pmu_lock); | 137 | clear_bit_unlock(type, &pmu_lock); |
138 | return 0; | 138 | return 0; |
139 | } | 139 | } |
140 | EXPORT_SYMBOL_GPL(release_pmu); | 140 | EXPORT_SYMBOL_GPL(release_pmu); |
@@ -182,17 +182,17 @@ init_cpu_pmu(void) | |||
182 | } | 182 | } |
183 | 183 | ||
184 | int | 184 | int |
185 | init_pmu(enum arm_pmu_type device) | 185 | init_pmu(enum arm_pmu_type type) |
186 | { | 186 | { |
187 | int err = 0; | 187 | int err = 0; |
188 | 188 | ||
189 | switch (device) { | 189 | switch (type) { |
190 | case ARM_PMU_DEVICE_CPU: | 190 | case ARM_PMU_DEVICE_CPU: |
191 | err = init_cpu_pmu(); | 191 | err = init_cpu_pmu(); |
192 | break; | 192 | break; |
193 | default: | 193 | default: |
194 | pr_warning("attempt to initialise unknown device %d\n", | 194 | pr_warning("attempt to initialise PMU of unknown " |
195 | device); | 195 | "type %d\n", type); |
196 | err = -EINVAL; | 196 | err = -EINVAL; |
197 | } | 197 | } |
198 | 198 | ||
diff --git a/arch/arm/kernel/relocate_kernel.S b/arch/arm/kernel/relocate_kernel.S index 9cf4cbf8f95b..d0cdedf4864d 100644 --- a/arch/arm/kernel/relocate_kernel.S +++ b/arch/arm/kernel/relocate_kernel.S | |||
@@ -57,7 +57,8 @@ relocate_new_kernel: | |||
57 | mov r0,#0 | 57 | mov r0,#0 |
58 | ldr r1,kexec_mach_type | 58 | ldr r1,kexec_mach_type |
59 | ldr r2,kexec_boot_atags | 59 | ldr r2,kexec_boot_atags |
60 | mov pc,lr | 60 | ARM( mov pc, lr ) |
61 | THUMB( bx lr ) | ||
61 | 62 | ||
62 | .align | 63 | .align |
63 | 64 | ||
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index 70bca649e925..e514c76043b4 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c | |||
@@ -280,18 +280,19 @@ static void __init cacheid_init(void) | |||
280 | if (arch >= CPU_ARCH_ARMv6) { | 280 | if (arch >= CPU_ARCH_ARMv6) { |
281 | if ((cachetype & (7 << 29)) == 4 << 29) { | 281 | if ((cachetype & (7 << 29)) == 4 << 29) { |
282 | /* ARMv7 register format */ | 282 | /* ARMv7 register format */ |
283 | arch = CPU_ARCH_ARMv7; | ||
283 | cacheid = CACHEID_VIPT_NONALIASING; | 284 | cacheid = CACHEID_VIPT_NONALIASING; |
284 | if ((cachetype & (3 << 14)) == 1 << 14) | 285 | if ((cachetype & (3 << 14)) == 1 << 14) |
285 | cacheid |= CACHEID_ASID_TAGGED; | 286 | cacheid |= CACHEID_ASID_TAGGED; |
286 | else if (cpu_has_aliasing_icache(CPU_ARCH_ARMv7)) | ||
287 | cacheid |= CACHEID_VIPT_I_ALIASING; | ||
288 | } else if (cachetype & (1 << 23)) { | ||
289 | cacheid = CACHEID_VIPT_ALIASING; | ||
290 | } else { | 287 | } else { |
291 | cacheid = CACHEID_VIPT_NONALIASING; | 288 | arch = CPU_ARCH_ARMv6; |
292 | if (cpu_has_aliasing_icache(CPU_ARCH_ARMv6)) | 289 | if (cachetype & (1 << 23)) |
293 | cacheid |= CACHEID_VIPT_I_ALIASING; | 290 | cacheid = CACHEID_VIPT_ALIASING; |
291 | else | ||
292 | cacheid = CACHEID_VIPT_NONALIASING; | ||
294 | } | 293 | } |
294 | if (cpu_has_aliasing_icache(arch)) | ||
295 | cacheid |= CACHEID_VIPT_I_ALIASING; | ||
295 | } else { | 296 | } else { |
296 | cacheid = CACHEID_VIVT; | 297 | cacheid = CACHEID_VIVT; |
297 | } | 298 | } |
diff --git a/arch/arm/kernel/smp_scu.c b/arch/arm/kernel/smp_scu.c index 79ed5e7f204a..7fcddb75c877 100644 --- a/arch/arm/kernel/smp_scu.c +++ b/arch/arm/kernel/smp_scu.c | |||
@@ -13,6 +13,7 @@ | |||
13 | 13 | ||
14 | #include <asm/smp_scu.h> | 14 | #include <asm/smp_scu.h> |
15 | #include <asm/cacheflush.h> | 15 | #include <asm/cacheflush.h> |
16 | #include <asm/cputype.h> | ||
16 | 17 | ||
17 | #define SCU_CTRL 0x00 | 18 | #define SCU_CTRL 0x00 |
18 | #define SCU_CONFIG 0x04 | 19 | #define SCU_CONFIG 0x04 |
@@ -37,6 +38,15 @@ void __init scu_enable(void __iomem *scu_base) | |||
37 | { | 38 | { |
38 | u32 scu_ctrl; | 39 | u32 scu_ctrl; |
39 | 40 | ||
41 | #ifdef CONFIG_ARM_ERRATA_764369 | ||
42 | /* Cortex-A9 only */ | ||
43 | if ((read_cpuid(CPUID_ID) & 0xff0ffff0) == 0x410fc090) { | ||
44 | scu_ctrl = __raw_readl(scu_base + 0x30); | ||
45 | if (!(scu_ctrl & 1)) | ||
46 | __raw_writel(scu_ctrl | 0x1, scu_base + 0x30); | ||
47 | } | ||
48 | #endif | ||
49 | |||
40 | scu_ctrl = __raw_readl(scu_base + SCU_CTRL); | 50 | scu_ctrl = __raw_readl(scu_base + SCU_CTRL); |
41 | /* already enabled? */ | 51 | /* already enabled? */ |
42 | if (scu_ctrl & 1) | 52 | if (scu_ctrl & 1) |
diff --git a/arch/arm/kernel/smp_twd.c b/arch/arm/kernel/smp_twd.c index 2c277d40cee6..01c186222f3b 100644 --- a/arch/arm/kernel/smp_twd.c +++ b/arch/arm/kernel/smp_twd.c | |||
@@ -137,8 +137,8 @@ void __cpuinit twd_timer_setup(struct clock_event_device *clk) | |||
137 | clk->max_delta_ns = clockevent_delta2ns(0xffffffff, clk); | 137 | clk->max_delta_ns = clockevent_delta2ns(0xffffffff, clk); |
138 | clk->min_delta_ns = clockevent_delta2ns(0xf, clk); | 138 | clk->min_delta_ns = clockevent_delta2ns(0xf, clk); |
139 | 139 | ||
140 | clockevents_register_device(clk); | ||
141 | |||
140 | /* Make sure our local interrupt controller has this enabled */ | 142 | /* Make sure our local interrupt controller has this enabled */ |
141 | gic_enable_ppi(clk->irq); | 143 | gic_enable_ppi(clk->irq); |
142 | |||
143 | clockevents_register_device(clk); | ||
144 | } | 144 | } |
diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S index bf977f8514f6..4e66f62b8d41 100644 --- a/arch/arm/kernel/vmlinux.lds.S +++ b/arch/arm/kernel/vmlinux.lds.S | |||
@@ -23,8 +23,10 @@ | |||
23 | 23 | ||
24 | #if defined(CONFIG_SMP_ON_UP) && !defined(CONFIG_DEBUG_SPINLOCK) | 24 | #if defined(CONFIG_SMP_ON_UP) && !defined(CONFIG_DEBUG_SPINLOCK) |
25 | #define ARM_EXIT_KEEP(x) x | 25 | #define ARM_EXIT_KEEP(x) x |
26 | #define ARM_EXIT_DISCARD(x) | ||
26 | #else | 27 | #else |
27 | #define ARM_EXIT_KEEP(x) | 28 | #define ARM_EXIT_KEEP(x) |
29 | #define ARM_EXIT_DISCARD(x) x | ||
28 | #endif | 30 | #endif |
29 | 31 | ||
30 | OUTPUT_ARCH(arm) | 32 | OUTPUT_ARCH(arm) |
@@ -39,6 +41,11 @@ jiffies = jiffies_64 + 4; | |||
39 | SECTIONS | 41 | SECTIONS |
40 | { | 42 | { |
41 | /* | 43 | /* |
44 | * XXX: The linker does not define how output sections are | ||
45 | * assigned to input sections when there are multiple statements | ||
46 | * matching the same input section name. There is no documented | ||
47 | * order of matching. | ||
48 | * | ||
42 | * unwind exit sections must be discarded before the rest of the | 49 | * unwind exit sections must be discarded before the rest of the |
43 | * unwind sections get included. | 50 | * unwind sections get included. |
44 | */ | 51 | */ |
@@ -47,6 +54,9 @@ SECTIONS | |||
47 | *(.ARM.extab.exit.text) | 54 | *(.ARM.extab.exit.text) |
48 | ARM_CPU_DISCARD(*(.ARM.exidx.cpuexit.text)) | 55 | ARM_CPU_DISCARD(*(.ARM.exidx.cpuexit.text)) |
49 | ARM_CPU_DISCARD(*(.ARM.extab.cpuexit.text)) | 56 | ARM_CPU_DISCARD(*(.ARM.extab.cpuexit.text)) |
57 | ARM_EXIT_DISCARD(EXIT_TEXT) | ||
58 | ARM_EXIT_DISCARD(EXIT_DATA) | ||
59 | EXIT_CALL | ||
50 | #ifndef CONFIG_HOTPLUG | 60 | #ifndef CONFIG_HOTPLUG |
51 | *(.ARM.exidx.devexit.text) | 61 | *(.ARM.exidx.devexit.text) |
52 | *(.ARM.extab.devexit.text) | 62 | *(.ARM.extab.devexit.text) |
@@ -58,6 +68,8 @@ SECTIONS | |||
58 | #ifndef CONFIG_SMP_ON_UP | 68 | #ifndef CONFIG_SMP_ON_UP |
59 | *(.alt.smp.init) | 69 | *(.alt.smp.init) |
60 | #endif | 70 | #endif |
71 | *(.discard) | ||
72 | *(.discard.*) | ||
61 | } | 73 | } |
62 | 74 | ||
63 | #ifdef CONFIG_XIP_KERNEL | 75 | #ifdef CONFIG_XIP_KERNEL |
@@ -279,9 +291,6 @@ SECTIONS | |||
279 | 291 | ||
280 | STABS_DEBUG | 292 | STABS_DEBUG |
281 | .comment 0 : { *(.comment) } | 293 | .comment 0 : { *(.comment) } |
282 | |||
283 | /* Default discards */ | ||
284 | DISCARDS | ||
285 | } | 294 | } |
286 | 295 | ||
287 | /* | 296 | /* |
diff --git a/arch/arm/mach-at91/at91sam9261.c b/arch/arm/mach-at91/at91sam9261.c index d522b47e30b5..6c8e3b5f669f 100644 --- a/arch/arm/mach-at91/at91sam9261.c +++ b/arch/arm/mach-at91/at91sam9261.c | |||
@@ -157,7 +157,7 @@ static struct clk_lookup periph_clocks_lookups[] = { | |||
157 | CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.1", &spi1_clk), | 157 | CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.1", &spi1_clk), |
158 | CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tc0_clk), | 158 | CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tc0_clk), |
159 | CLKDEV_CON_DEV_ID("t1_clk", "atmel_tcb.0", &tc1_clk), | 159 | CLKDEV_CON_DEV_ID("t1_clk", "atmel_tcb.0", &tc1_clk), |
160 | CLKDEV_CON_DEV_ID("t2_clk", "atmel_tcb.0", &tc1_clk), | 160 | CLKDEV_CON_DEV_ID("t2_clk", "atmel_tcb.0", &tc2_clk), |
161 | CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc0_clk), | 161 | CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc0_clk), |
162 | CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk), | 162 | CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk), |
163 | CLKDEV_CON_DEV_ID("pclk", "ssc.2", &ssc2_clk), | 163 | CLKDEV_CON_DEV_ID("pclk", "ssc.2", &ssc2_clk), |
diff --git a/arch/arm/mach-cns3xxx/include/mach/entry-macro.S b/arch/arm/mach-cns3xxx/include/mach/entry-macro.S index 6bd83ed90afe..d87bfc397d39 100644 --- a/arch/arm/mach-cns3xxx/include/mach/entry-macro.S +++ b/arch/arm/mach-cns3xxx/include/mach/entry-macro.S | |||
@@ -8,7 +8,6 @@ | |||
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <mach/hardware.h> | ||
12 | #include <asm/hardware/entry-macro-gic.S> | 11 | #include <asm/hardware/entry-macro-gic.S> |
13 | 12 | ||
14 | .macro disable_fiq | 13 | .macro disable_fiq |
diff --git a/arch/arm/mach-cns3xxx/include/mach/system.h b/arch/arm/mach-cns3xxx/include/mach/system.h index 58bb03ae3cf4..4f16c9b79f78 100644 --- a/arch/arm/mach-cns3xxx/include/mach/system.h +++ b/arch/arm/mach-cns3xxx/include/mach/system.h | |||
@@ -13,7 +13,6 @@ | |||
13 | 13 | ||
14 | #include <linux/io.h> | 14 | #include <linux/io.h> |
15 | #include <asm/proc-fns.h> | 15 | #include <asm/proc-fns.h> |
16 | #include <mach/hardware.h> | ||
17 | 16 | ||
18 | static inline void arch_idle(void) | 17 | static inline void arch_idle(void) |
19 | { | 18 | { |
diff --git a/arch/arm/mach-cns3xxx/include/mach/uncompress.h b/arch/arm/mach-cns3xxx/include/mach/uncompress.h index de8ead9b91f7..a91b6058ab4f 100644 --- a/arch/arm/mach-cns3xxx/include/mach/uncompress.h +++ b/arch/arm/mach-cns3xxx/include/mach/uncompress.h | |||
@@ -8,7 +8,6 @@ | |||
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <asm/mach-types.h> | 10 | #include <asm/mach-types.h> |
11 | #include <mach/hardware.h> | ||
12 | #include <mach/cns3xxx.h> | 11 | #include <mach/cns3xxx.h> |
13 | 12 | ||
14 | #define AMBA_UART_DR(base) (*(volatile unsigned char *)((base) + 0x00)) | 13 | #define AMBA_UART_DR(base) (*(volatile unsigned char *)((base) + 0x00)) |
diff --git a/arch/arm/mach-cns3xxx/pcie.c b/arch/arm/mach-cns3xxx/pcie.c index 06fd25d70aec..0f8fca48a5ed 100644 --- a/arch/arm/mach-cns3xxx/pcie.c +++ b/arch/arm/mach-cns3xxx/pcie.c | |||
@@ -49,7 +49,7 @@ static struct cns3xxx_pcie *sysdata_to_cnspci(void *sysdata) | |||
49 | return &cns3xxx_pcie[root->domain]; | 49 | return &cns3xxx_pcie[root->domain]; |
50 | } | 50 | } |
51 | 51 | ||
52 | static struct cns3xxx_pcie *pdev_to_cnspci(struct pci_dev *dev) | 52 | static struct cns3xxx_pcie *pdev_to_cnspci(const struct pci_dev *dev) |
53 | { | 53 | { |
54 | return sysdata_to_cnspci(dev->sysdata); | 54 | return sysdata_to_cnspci(dev->sysdata); |
55 | } | 55 | } |
diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c index bd5394537c88..008d51407cd7 100644 --- a/arch/arm/mach-davinci/board-da850-evm.c +++ b/arch/arm/mach-davinci/board-da850-evm.c | |||
@@ -115,6 +115,32 @@ static struct spi_board_info da850evm_spi_info[] = { | |||
115 | }, | 115 | }, |
116 | }; | 116 | }; |
117 | 117 | ||
118 | #ifdef CONFIG_MTD | ||
119 | static void da850_evm_m25p80_notify_add(struct mtd_info *mtd) | ||
120 | { | ||
121 | char *mac_addr = davinci_soc_info.emac_pdata->mac_addr; | ||
122 | size_t retlen; | ||
123 | |||
124 | if (!strcmp(mtd->name, "MAC-Address")) { | ||
125 | mtd->read(mtd, 0, ETH_ALEN, &retlen, mac_addr); | ||
126 | if (retlen == ETH_ALEN) | ||
127 | pr_info("Read MAC addr from SPI Flash: %pM\n", | ||
128 | mac_addr); | ||
129 | } | ||
130 | } | ||
131 | |||
132 | static struct mtd_notifier da850evm_spi_notifier = { | ||
133 | .add = da850_evm_m25p80_notify_add, | ||
134 | }; | ||
135 | |||
136 | static void da850_evm_setup_mac_addr(void) | ||
137 | { | ||
138 | register_mtd_user(&da850evm_spi_notifier); | ||
139 | } | ||
140 | #else | ||
141 | static void da850_evm_setup_mac_addr(void) { } | ||
142 | #endif | ||
143 | |||
118 | static struct mtd_partition da850_evm_norflash_partition[] = { | 144 | static struct mtd_partition da850_evm_norflash_partition[] = { |
119 | { | 145 | { |
120 | .name = "bootloaders + env", | 146 | .name = "bootloaders + env", |
@@ -1244,6 +1270,8 @@ static __init void da850_evm_init(void) | |||
1244 | if (ret) | 1270 | if (ret) |
1245 | pr_warning("da850_evm_init: sata registration failed: %d\n", | 1271 | pr_warning("da850_evm_init: sata registration failed: %d\n", |
1246 | ret); | 1272 | ret); |
1273 | |||
1274 | da850_evm_setup_mac_addr(); | ||
1247 | } | 1275 | } |
1248 | 1276 | ||
1249 | #ifdef CONFIG_SERIAL_8250_CONSOLE | 1277 | #ifdef CONFIG_SERIAL_8250_CONSOLE |
diff --git a/arch/arm/mach-davinci/include/mach/psc.h b/arch/arm/mach-davinci/include/mach/psc.h index 47fd0bc3d3e7..fa59c097223d 100644 --- a/arch/arm/mach-davinci/include/mach/psc.h +++ b/arch/arm/mach-davinci/include/mach/psc.h | |||
@@ -243,7 +243,7 @@ | |||
243 | #define PSC_STATE_DISABLE 2 | 243 | #define PSC_STATE_DISABLE 2 |
244 | #define PSC_STATE_ENABLE 3 | 244 | #define PSC_STATE_ENABLE 3 |
245 | 245 | ||
246 | #define MDSTAT_STATE_MASK 0x1f | 246 | #define MDSTAT_STATE_MASK 0x3f |
247 | #define MDCTL_FORCE BIT(31) | 247 | #define MDCTL_FORCE BIT(31) |
248 | 248 | ||
249 | #ifndef __ASSEMBLER__ | 249 | #ifndef __ASSEMBLER__ |
diff --git a/arch/arm/mach-davinci/sleep.S b/arch/arm/mach-davinci/sleep.S index fb5e72b532b0..5f1e045a3ad1 100644 --- a/arch/arm/mach-davinci/sleep.S +++ b/arch/arm/mach-davinci/sleep.S | |||
@@ -217,7 +217,11 @@ ddr2clk_stop_done: | |||
217 | ENDPROC(davinci_ddr_psc_config) | 217 | ENDPROC(davinci_ddr_psc_config) |
218 | 218 | ||
219 | CACHE_FLUSH: | 219 | CACHE_FLUSH: |
220 | .word arm926_flush_kern_cache_all | 220 | #ifdef CONFIG_CPU_V6 |
221 | .word v6_flush_kern_cache_all | ||
222 | #else | ||
223 | .word arm926_flush_kern_cache_all | ||
224 | #endif | ||
221 | 225 | ||
222 | ENTRY(davinci_cpu_suspend_sz) | 226 | ENTRY(davinci_cpu_suspend_sz) |
223 | .word . - davinci_cpu_suspend | 227 | .word . - davinci_cpu_suspend |
diff --git a/arch/arm/mach-dove/common.c b/arch/arm/mach-dove/common.c index 83dce859886d..a9e0dae86a26 100644 --- a/arch/arm/mach-dove/common.c +++ b/arch/arm/mach-dove/common.c | |||
@@ -158,7 +158,7 @@ void __init dove_spi0_init(void) | |||
158 | 158 | ||
159 | void __init dove_spi1_init(void) | 159 | void __init dove_spi1_init(void) |
160 | { | 160 | { |
161 | orion_spi_init(DOVE_SPI1_PHYS_BASE, get_tclk()); | 161 | orion_spi_1_init(DOVE_SPI1_PHYS_BASE, get_tclk()); |
162 | } | 162 | } |
163 | 163 | ||
164 | /***************************************************************************** | 164 | /***************************************************************************** |
diff --git a/arch/arm/mach-ep93xx/include/mach/ts72xx.h b/arch/arm/mach-ep93xx/include/mach/ts72xx.h index 0eabec62cd9d..f1397a13e76b 100644 --- a/arch/arm/mach-ep93xx/include/mach/ts72xx.h +++ b/arch/arm/mach-ep93xx/include/mach/ts72xx.h | |||
@@ -6,7 +6,7 @@ | |||
6 | * TS72xx memory map: | 6 | * TS72xx memory map: |
7 | * | 7 | * |
8 | * virt phys size | 8 | * virt phys size |
9 | * febff000 22000000 4K model number register | 9 | * febff000 22000000 4K model number register (bits 0-2) |
10 | * febfe000 22400000 4K options register | 10 | * febfe000 22400000 4K options register |
11 | * febfd000 22800000 4K options register #2 | 11 | * febfd000 22800000 4K options register #2 |
12 | * febf9000 10800000 4K TS-5620 RTC index register | 12 | * febf9000 10800000 4K TS-5620 RTC index register |
@@ -20,6 +20,9 @@ | |||
20 | #define TS72XX_MODEL_TS7200 0x00 | 20 | #define TS72XX_MODEL_TS7200 0x00 |
21 | #define TS72XX_MODEL_TS7250 0x01 | 21 | #define TS72XX_MODEL_TS7250 0x01 |
22 | #define TS72XX_MODEL_TS7260 0x02 | 22 | #define TS72XX_MODEL_TS7260 0x02 |
23 | #define TS72XX_MODEL_TS7300 0x03 | ||
24 | #define TS72XX_MODEL_TS7400 0x04 | ||
25 | #define TS72XX_MODEL_MASK 0x07 | ||
23 | 26 | ||
24 | 27 | ||
25 | #define TS72XX_OPTIONS_PHYS_BASE 0x22400000 | 28 | #define TS72XX_OPTIONS_PHYS_BASE 0x22400000 |
@@ -51,19 +54,34 @@ | |||
51 | 54 | ||
52 | #ifndef __ASSEMBLY__ | 55 | #ifndef __ASSEMBLY__ |
53 | 56 | ||
57 | static inline int ts72xx_model(void) | ||
58 | { | ||
59 | return __raw_readb(TS72XX_MODEL_VIRT_BASE) & TS72XX_MODEL_MASK; | ||
60 | } | ||
61 | |||
54 | static inline int board_is_ts7200(void) | 62 | static inline int board_is_ts7200(void) |
55 | { | 63 | { |
56 | return __raw_readb(TS72XX_MODEL_VIRT_BASE) == TS72XX_MODEL_TS7200; | 64 | return ts72xx_model() == TS72XX_MODEL_TS7200; |
57 | } | 65 | } |
58 | 66 | ||
59 | static inline int board_is_ts7250(void) | 67 | static inline int board_is_ts7250(void) |
60 | { | 68 | { |
61 | return __raw_readb(TS72XX_MODEL_VIRT_BASE) == TS72XX_MODEL_TS7250; | 69 | return ts72xx_model() == TS72XX_MODEL_TS7250; |
62 | } | 70 | } |
63 | 71 | ||
64 | static inline int board_is_ts7260(void) | 72 | static inline int board_is_ts7260(void) |
65 | { | 73 | { |
66 | return __raw_readb(TS72XX_MODEL_VIRT_BASE) == TS72XX_MODEL_TS7260; | 74 | return ts72xx_model() == TS72XX_MODEL_TS7260; |
75 | } | ||
76 | |||
77 | static inline int board_is_ts7300(void) | ||
78 | { | ||
79 | return ts72xx_model() == TS72XX_MODEL_TS7300; | ||
80 | } | ||
81 | |||
82 | static inline int board_is_ts7400(void) | ||
83 | { | ||
84 | return ts72xx_model() == TS72XX_MODEL_TS7400; | ||
67 | } | 85 | } |
68 | 86 | ||
69 | static inline int is_max197_installed(void) | 87 | static inline int is_max197_installed(void) |
diff --git a/arch/arm/mach-exynos4/clock.c b/arch/arm/mach-exynos4/clock.c index 851dea018578..86964d2e9e1b 100644 --- a/arch/arm/mach-exynos4/clock.c +++ b/arch/arm/mach-exynos4/clock.c | |||
@@ -520,7 +520,7 @@ static struct clk init_clocks_off[] = { | |||
520 | .ctrlbit = (1 << 21), | 520 | .ctrlbit = (1 << 21), |
521 | }, { | 521 | }, { |
522 | .name = "ac97", | 522 | .name = "ac97", |
523 | .id = -1, | 523 | .devname = "samsung-ac97", |
524 | .enable = exynos4_clk_ip_peril_ctrl, | 524 | .enable = exynos4_clk_ip_peril_ctrl, |
525 | .ctrlbit = (1 << 27), | 525 | .ctrlbit = (1 << 27), |
526 | }, { | 526 | }, { |
@@ -899,8 +899,7 @@ static struct clksrc_clk clksrcs[] = { | |||
899 | .reg_div = { .reg = S5P_CLKDIV_CAM, .shift = 28, .size = 4 }, | 899 | .reg_div = { .reg = S5P_CLKDIV_CAM, .shift = 28, .size = 4 }, |
900 | }, { | 900 | }, { |
901 | .clk = { | 901 | .clk = { |
902 | .name = "sclk_cam", | 902 | .name = "sclk_cam0", |
903 | .devname = "exynos4-fimc.0", | ||
904 | .enable = exynos4_clksrc_mask_cam_ctrl, | 903 | .enable = exynos4_clksrc_mask_cam_ctrl, |
905 | .ctrlbit = (1 << 16), | 904 | .ctrlbit = (1 << 16), |
906 | }, | 905 | }, |
@@ -909,8 +908,7 @@ static struct clksrc_clk clksrcs[] = { | |||
909 | .reg_div = { .reg = S5P_CLKDIV_CAM, .shift = 16, .size = 4 }, | 908 | .reg_div = { .reg = S5P_CLKDIV_CAM, .shift = 16, .size = 4 }, |
910 | }, { | 909 | }, { |
911 | .clk = { | 910 | .clk = { |
912 | .name = "sclk_cam", | 911 | .name = "sclk_cam1", |
913 | .devname = "exynos4-fimc.1", | ||
914 | .enable = exynos4_clksrc_mask_cam_ctrl, | 912 | .enable = exynos4_clksrc_mask_cam_ctrl, |
915 | .ctrlbit = (1 << 20), | 913 | .ctrlbit = (1 << 20), |
916 | }, | 914 | }, |
@@ -1160,7 +1158,7 @@ void __init_or_cpufreq exynos4_setup_clocks(void) | |||
1160 | 1158 | ||
1161 | vpllsrc = clk_get_rate(&clk_vpllsrc.clk); | 1159 | vpllsrc = clk_get_rate(&clk_vpllsrc.clk); |
1162 | vpll = s5p_get_pll46xx(vpllsrc, __raw_readl(S5P_VPLL_CON0), | 1160 | vpll = s5p_get_pll46xx(vpllsrc, __raw_readl(S5P_VPLL_CON0), |
1163 | __raw_readl(S5P_VPLL_CON1), pll_4650); | 1161 | __raw_readl(S5P_VPLL_CON1), pll_4650c); |
1164 | 1162 | ||
1165 | clk_fout_apll.ops = &exynos4_fout_apll_ops; | 1163 | clk_fout_apll.ops = &exynos4_fout_apll_ops; |
1166 | clk_fout_mpll.rate = mpll; | 1164 | clk_fout_mpll.rate = mpll; |
diff --git a/arch/arm/mach-exynos4/cpu.c b/arch/arm/mach-exynos4/cpu.c index 2d8a40c9e6e5..746d6fc6d397 100644 --- a/arch/arm/mach-exynos4/cpu.c +++ b/arch/arm/mach-exynos4/cpu.c | |||
@@ -24,12 +24,13 @@ | |||
24 | #include <plat/exynos4.h> | 24 | #include <plat/exynos4.h> |
25 | #include <plat/adc-core.h> | 25 | #include <plat/adc-core.h> |
26 | #include <plat/sdhci.h> | 26 | #include <plat/sdhci.h> |
27 | #include <plat/devs.h> | ||
28 | #include <plat/fb-core.h> | 27 | #include <plat/fb-core.h> |
29 | #include <plat/fimc-core.h> | 28 | #include <plat/fimc-core.h> |
30 | #include <plat/iic-core.h> | 29 | #include <plat/iic-core.h> |
30 | #include <plat/reset.h> | ||
31 | 31 | ||
32 | #include <mach/regs-irq.h> | 32 | #include <mach/regs-irq.h> |
33 | #include <mach/regs-pmu.h> | ||
33 | 34 | ||
34 | extern int combiner_init(unsigned int combiner_nr, void __iomem *base, | 35 | extern int combiner_init(unsigned int combiner_nr, void __iomem *base, |
35 | unsigned int irq_start); | 36 | unsigned int irq_start); |
@@ -128,6 +129,11 @@ static void exynos4_idle(void) | |||
128 | local_irq_enable(); | 129 | local_irq_enable(); |
129 | } | 130 | } |
130 | 131 | ||
132 | static void exynos4_sw_reset(void) | ||
133 | { | ||
134 | __raw_writel(0x1, S5P_SWRESET); | ||
135 | } | ||
136 | |||
131 | /* | 137 | /* |
132 | * exynos4_map_io | 138 | * exynos4_map_io |
133 | * | 139 | * |
@@ -241,5 +247,8 @@ int __init exynos4_init(void) | |||
241 | /* set idle function */ | 247 | /* set idle function */ |
242 | pm_idle = exynos4_idle; | 248 | pm_idle = exynos4_idle; |
243 | 249 | ||
250 | /* set sw_reset function */ | ||
251 | s5p_reset_hook = exynos4_sw_reset; | ||
252 | |||
244 | return sysdev_register(&exynos4_sysdev); | 253 | return sysdev_register(&exynos4_sysdev); |
245 | } | 254 | } |
diff --git a/arch/arm/mach-exynos4/include/mach/irqs.h b/arch/arm/mach-exynos4/include/mach/irqs.h index 934d2a493982..f8952f8f3757 100644 --- a/arch/arm/mach-exynos4/include/mach/irqs.h +++ b/arch/arm/mach-exynos4/include/mach/irqs.h | |||
@@ -80,9 +80,8 @@ | |||
80 | #define IRQ_HSMMC3 IRQ_SPI(76) | 80 | #define IRQ_HSMMC3 IRQ_SPI(76) |
81 | #define IRQ_DWMCI IRQ_SPI(77) | 81 | #define IRQ_DWMCI IRQ_SPI(77) |
82 | 82 | ||
83 | #define IRQ_MIPICSI0 IRQ_SPI(78) | 83 | #define IRQ_MIPI_CSIS0 IRQ_SPI(78) |
84 | 84 | #define IRQ_MIPI_CSIS1 IRQ_SPI(80) | |
85 | #define IRQ_MIPICSI1 IRQ_SPI(80) | ||
86 | 85 | ||
87 | #define IRQ_ONENAND_AUDI IRQ_SPI(82) | 86 | #define IRQ_ONENAND_AUDI IRQ_SPI(82) |
88 | #define IRQ_ROTATOR IRQ_SPI(83) | 87 | #define IRQ_ROTATOR IRQ_SPI(83) |
diff --git a/arch/arm/mach-exynos4/include/mach/regs-pmu.h b/arch/arm/mach-exynos4/include/mach/regs-pmu.h index fa49bbb8e7b0..cdf9b47c303c 100644 --- a/arch/arm/mach-exynos4/include/mach/regs-pmu.h +++ b/arch/arm/mach-exynos4/include/mach/regs-pmu.h | |||
@@ -29,6 +29,8 @@ | |||
29 | #define S5P_USE_STANDBY_WFE1 (1 << 25) | 29 | #define S5P_USE_STANDBY_WFE1 (1 << 25) |
30 | #define S5P_USE_MASK ((0x3 << 16) | (0x3 << 24)) | 30 | #define S5P_USE_MASK ((0x3 << 16) | (0x3 << 24)) |
31 | 31 | ||
32 | #define S5P_SWRESET S5P_PMUREG(0x0400) | ||
33 | |||
32 | #define S5P_WAKEUP_STAT S5P_PMUREG(0x0600) | 34 | #define S5P_WAKEUP_STAT S5P_PMUREG(0x0600) |
33 | #define S5P_EINT_WAKEUP_MASK S5P_PMUREG(0x0604) | 35 | #define S5P_EINT_WAKEUP_MASK S5P_PMUREG(0x0604) |
34 | #define S5P_WAKEUP_MASK S5P_PMUREG(0x0608) | 36 | #define S5P_WAKEUP_MASK S5P_PMUREG(0x0608) |
diff --git a/arch/arm/mach-exynos4/irq-eint.c b/arch/arm/mach-exynos4/irq-eint.c index 9d87d2ac7f68..badb8c66fc9b 100644 --- a/arch/arm/mach-exynos4/irq-eint.c +++ b/arch/arm/mach-exynos4/irq-eint.c | |||
@@ -23,6 +23,8 @@ | |||
23 | 23 | ||
24 | #include <mach/regs-gpio.h> | 24 | #include <mach/regs-gpio.h> |
25 | 25 | ||
26 | #include <asm/mach/irq.h> | ||
27 | |||
26 | static DEFINE_SPINLOCK(eint_lock); | 28 | static DEFINE_SPINLOCK(eint_lock); |
27 | 29 | ||
28 | static unsigned int eint0_15_data[16]; | 30 | static unsigned int eint0_15_data[16]; |
@@ -184,8 +186,11 @@ static inline void exynos4_irq_demux_eint(unsigned int start) | |||
184 | 186 | ||
185 | static void exynos4_irq_demux_eint16_31(unsigned int irq, struct irq_desc *desc) | 187 | static void exynos4_irq_demux_eint16_31(unsigned int irq, struct irq_desc *desc) |
186 | { | 188 | { |
189 | struct irq_chip *chip = irq_get_chip(irq); | ||
190 | chained_irq_enter(chip, desc); | ||
187 | exynos4_irq_demux_eint(IRQ_EINT(16)); | 191 | exynos4_irq_demux_eint(IRQ_EINT(16)); |
188 | exynos4_irq_demux_eint(IRQ_EINT(24)); | 192 | exynos4_irq_demux_eint(IRQ_EINT(24)); |
193 | chained_irq_exit(chip, desc); | ||
189 | } | 194 | } |
190 | 195 | ||
191 | static void exynos4_irq_eint0_15(unsigned int irq, struct irq_desc *desc) | 196 | static void exynos4_irq_eint0_15(unsigned int irq, struct irq_desc *desc) |
@@ -193,6 +198,7 @@ static void exynos4_irq_eint0_15(unsigned int irq, struct irq_desc *desc) | |||
193 | u32 *irq_data = irq_get_handler_data(irq); | 198 | u32 *irq_data = irq_get_handler_data(irq); |
194 | struct irq_chip *chip = irq_get_chip(irq); | 199 | struct irq_chip *chip = irq_get_chip(irq); |
195 | 200 | ||
201 | chained_irq_enter(chip, desc); | ||
196 | chip->irq_mask(&desc->irq_data); | 202 | chip->irq_mask(&desc->irq_data); |
197 | 203 | ||
198 | if (chip->irq_ack) | 204 | if (chip->irq_ack) |
@@ -201,6 +207,7 @@ static void exynos4_irq_eint0_15(unsigned int irq, struct irq_desc *desc) | |||
201 | generic_handle_irq(*irq_data); | 207 | generic_handle_irq(*irq_data); |
202 | 208 | ||
203 | chip->irq_unmask(&desc->irq_data); | 209 | chip->irq_unmask(&desc->irq_data); |
210 | chained_irq_exit(chip, desc); | ||
204 | } | 211 | } |
205 | 212 | ||
206 | int __init exynos4_init_irq_eint(void) | 213 | int __init exynos4_init_irq_eint(void) |
diff --git a/arch/arm/mach-exynos4/mach-universal_c210.c b/arch/arm/mach-exynos4/mach-universal_c210.c index 0e280d12301e..b3b5d8911004 100644 --- a/arch/arm/mach-exynos4/mach-universal_c210.c +++ b/arch/arm/mach-exynos4/mach-universal_c210.c | |||
@@ -79,7 +79,7 @@ static struct s3c2410_uartcfg universal_uartcfgs[] __initdata = { | |||
79 | }; | 79 | }; |
80 | 80 | ||
81 | static struct regulator_consumer_supply max8952_consumer = | 81 | static struct regulator_consumer_supply max8952_consumer = |
82 | REGULATOR_SUPPLY("vddarm", NULL); | 82 | REGULATOR_SUPPLY("vdd_arm", NULL); |
83 | 83 | ||
84 | static struct max8952_platform_data universal_max8952_pdata __initdata = { | 84 | static struct max8952_platform_data universal_max8952_pdata __initdata = { |
85 | .gpio_vid0 = EXYNOS4_GPX0(3), | 85 | .gpio_vid0 = EXYNOS4_GPX0(3), |
@@ -105,7 +105,7 @@ static struct max8952_platform_data universal_max8952_pdata __initdata = { | |||
105 | }; | 105 | }; |
106 | 106 | ||
107 | static struct regulator_consumer_supply lp3974_buck1_consumer = | 107 | static struct regulator_consumer_supply lp3974_buck1_consumer = |
108 | REGULATOR_SUPPLY("vddint", NULL); | 108 | REGULATOR_SUPPLY("vdd_int", NULL); |
109 | 109 | ||
110 | static struct regulator_consumer_supply lp3974_buck2_consumer = | 110 | static struct regulator_consumer_supply lp3974_buck2_consumer = |
111 | REGULATOR_SUPPLY("vddg3d", NULL); | 111 | REGULATOR_SUPPLY("vddg3d", NULL); |
diff --git a/arch/arm/mach-exynos4/mct.c b/arch/arm/mach-exynos4/mct.c index 1ae059b7ad7b..ddd86864fb83 100644 --- a/arch/arm/mach-exynos4/mct.c +++ b/arch/arm/mach-exynos4/mct.c | |||
@@ -132,12 +132,18 @@ static cycle_t exynos4_frc_read(struct clocksource *cs) | |||
132 | return ((cycle_t)hi << 32) | lo; | 132 | return ((cycle_t)hi << 32) | lo; |
133 | } | 133 | } |
134 | 134 | ||
135 | static void exynos4_frc_resume(struct clocksource *cs) | ||
136 | { | ||
137 | exynos4_mct_frc_start(0, 0); | ||
138 | } | ||
139 | |||
135 | struct clocksource mct_frc = { | 140 | struct clocksource mct_frc = { |
136 | .name = "mct-frc", | 141 | .name = "mct-frc", |
137 | .rating = 400, | 142 | .rating = 400, |
138 | .read = exynos4_frc_read, | 143 | .read = exynos4_frc_read, |
139 | .mask = CLOCKSOURCE_MASK(64), | 144 | .mask = CLOCKSOURCE_MASK(64), |
140 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | 145 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, |
146 | .resume = exynos4_frc_resume, | ||
141 | }; | 147 | }; |
142 | 148 | ||
143 | static void __init exynos4_clocksource_init(void) | 149 | static void __init exynos4_clocksource_init(void) |
@@ -389,9 +395,11 @@ static void exynos4_mct_tick_init(struct clock_event_device *evt) | |||
389 | } | 395 | } |
390 | 396 | ||
391 | /* Setup the local clock events for a CPU */ | 397 | /* Setup the local clock events for a CPU */ |
392 | void __cpuinit local_timer_setup(struct clock_event_device *evt) | 398 | int __cpuinit local_timer_setup(struct clock_event_device *evt) |
393 | { | 399 | { |
394 | exynos4_mct_tick_init(evt); | 400 | exynos4_mct_tick_init(evt); |
401 | |||
402 | return 0; | ||
395 | } | 403 | } |
396 | 404 | ||
397 | int local_timer_ack(void) | 405 | int local_timer_ack(void) |
diff --git a/arch/arm/mach-exynos4/platsmp.c b/arch/arm/mach-exynos4/platsmp.c index 7c2282c6ba81..df6ef1b2f98b 100644 --- a/arch/arm/mach-exynos4/platsmp.c +++ b/arch/arm/mach-exynos4/platsmp.c | |||
@@ -106,6 +106,8 @@ void __cpuinit platform_secondary_init(unsigned int cpu) | |||
106 | */ | 106 | */ |
107 | spin_lock(&boot_lock); | 107 | spin_lock(&boot_lock); |
108 | spin_unlock(&boot_lock); | 108 | spin_unlock(&boot_lock); |
109 | |||
110 | set_cpu_online(cpu, true); | ||
109 | } | 111 | } |
110 | 112 | ||
111 | int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle) | 113 | int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle) |
diff --git a/arch/arm/mach-exynos4/setup-keypad.c b/arch/arm/mach-exynos4/setup-keypad.c index 1ee0ebff111f..7862bfb5933d 100644 --- a/arch/arm/mach-exynos4/setup-keypad.c +++ b/arch/arm/mach-exynos4/setup-keypad.c | |||
@@ -19,15 +19,16 @@ void samsung_keypad_cfg_gpio(unsigned int rows, unsigned int cols) | |||
19 | 19 | ||
20 | if (rows > 8) { | 20 | if (rows > 8) { |
21 | /* Set all the necessary GPX2 pins: KP_ROW[0~7] */ | 21 | /* Set all the necessary GPX2 pins: KP_ROW[0~7] */ |
22 | s3c_gpio_cfgrange_nopull(EXYNOS4_GPX2(0), 8, S3C_GPIO_SFN(3)); | 22 | s3c_gpio_cfgall_range(EXYNOS4_GPX2(0), 8, S3C_GPIO_SFN(3), |
23 | S3C_GPIO_PULL_UP); | ||
23 | 24 | ||
24 | /* Set all the necessary GPX3 pins: KP_ROW[8~] */ | 25 | /* Set all the necessary GPX3 pins: KP_ROW[8~] */ |
25 | s3c_gpio_cfgrange_nopull(EXYNOS4_GPX3(0), (rows - 8), | 26 | s3c_gpio_cfgall_range(EXYNOS4_GPX3(0), (rows - 8), |
26 | S3C_GPIO_SFN(3)); | 27 | S3C_GPIO_SFN(3), S3C_GPIO_PULL_UP); |
27 | } else { | 28 | } else { |
28 | /* Set all the necessary GPX2 pins: KP_ROW[x] */ | 29 | /* Set all the necessary GPX2 pins: KP_ROW[x] */ |
29 | s3c_gpio_cfgrange_nopull(EXYNOS4_GPX2(0), rows, | 30 | s3c_gpio_cfgall_range(EXYNOS4_GPX2(0), rows, S3C_GPIO_SFN(3), |
30 | S3C_GPIO_SFN(3)); | 31 | S3C_GPIO_PULL_UP); |
31 | } | 32 | } |
32 | 33 | ||
33 | /* Set all the necessary GPX1 pins to special-function 3: KP_COL[x] */ | 34 | /* Set all the necessary GPX1 pins to special-function 3: KP_COL[x] */ |
diff --git a/arch/arm/mach-exynos4/setup-usb-phy.c b/arch/arm/mach-exynos4/setup-usb-phy.c index 0883c1b824b9..39aca045f660 100644 --- a/arch/arm/mach-exynos4/setup-usb-phy.c +++ b/arch/arm/mach-exynos4/setup-usb-phy.c | |||
@@ -82,7 +82,7 @@ static int exynos4_usb_phy1_init(struct platform_device *pdev) | |||
82 | 82 | ||
83 | rstcon &= ~(HOST_LINK_PORT_SWRST_MASK | PHY1_SWRST_MASK); | 83 | rstcon &= ~(HOST_LINK_PORT_SWRST_MASK | PHY1_SWRST_MASK); |
84 | writel(rstcon, EXYNOS4_RSTCON); | 84 | writel(rstcon, EXYNOS4_RSTCON); |
85 | udelay(50); | 85 | udelay(80); |
86 | 86 | ||
87 | clk_disable(otg_clk); | 87 | clk_disable(otg_clk); |
88 | clk_put(otg_clk); | 88 | clk_put(otg_clk); |
diff --git a/arch/arm/mach-footbridge/Kconfig b/arch/arm/mach-footbridge/Kconfig index dc26fff22cf0..c8e7afcf14ec 100644 --- a/arch/arm/mach-footbridge/Kconfig +++ b/arch/arm/mach-footbridge/Kconfig | |||
@@ -62,6 +62,7 @@ config ARCH_EBSA285_HOST | |||
62 | config ARCH_NETWINDER | 62 | config ARCH_NETWINDER |
63 | bool "NetWinder" | 63 | bool "NetWinder" |
64 | select CLKSRC_I8253 | 64 | select CLKSRC_I8253 |
65 | select CLKEVT_I8253 | ||
65 | select FOOTBRIDGE_HOST | 66 | select FOOTBRIDGE_HOST |
66 | select ISA | 67 | select ISA |
67 | select ISA_DMA | 68 | select ISA_DMA |
diff --git a/arch/arm/mach-footbridge/dc21285.c b/arch/arm/mach-footbridge/dc21285.c index 1331fff51ae2..18c32a5541d9 100644 --- a/arch/arm/mach-footbridge/dc21285.c +++ b/arch/arm/mach-footbridge/dc21285.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/irq.h> | 18 | #include <linux/irq.h> |
19 | #include <linux/io.h> | 19 | #include <linux/io.h> |
20 | #include <linux/spinlock.h> | 20 | #include <linux/spinlock.h> |
21 | #include <video/vga.h> | ||
21 | 22 | ||
22 | #include <asm/irq.h> | 23 | #include <asm/irq.h> |
23 | #include <asm/system.h> | 24 | #include <asm/system.h> |
diff --git a/arch/arm/mach-imx/mach-cpuimx27.c b/arch/arm/mach-imx/mach-cpuimx27.c index b0cd62d6a3cd..a8364cc52b4d 100644 --- a/arch/arm/mach-imx/mach-cpuimx27.c +++ b/arch/arm/mach-imx/mach-cpuimx27.c | |||
@@ -310,7 +310,7 @@ static struct sys_timer eukrea_cpuimx27_timer = { | |||
310 | .init = eukrea_cpuimx27_timer_init, | 310 | .init = eukrea_cpuimx27_timer_init, |
311 | }; | 311 | }; |
312 | 312 | ||
313 | MACHINE_START(CPUIMX27, "EUKREA CPUIMX27") | 313 | MACHINE_START(EUKREA_CPUIMX27, "EUKREA CPUIMX27") |
314 | .boot_params = MX27_PHYS_OFFSET + 0x100, | 314 | .boot_params = MX27_PHYS_OFFSET + 0x100, |
315 | .map_io = mx27_map_io, | 315 | .map_io = mx27_map_io, |
316 | .init_early = imx27_init_early, | 316 | .init_early = imx27_init_early, |
diff --git a/arch/arm/mach-imx/mach-cpuimx35.c b/arch/arm/mach-imx/mach-cpuimx35.c index bd4dbeaeabe9..fc4fea1d3fc7 100644 --- a/arch/arm/mach-imx/mach-cpuimx35.c +++ b/arch/arm/mach-imx/mach-cpuimx35.c | |||
@@ -192,7 +192,7 @@ struct sys_timer eukrea_cpuimx35_timer = { | |||
192 | .init = eukrea_cpuimx35_timer_init, | 192 | .init = eukrea_cpuimx35_timer_init, |
193 | }; | 193 | }; |
194 | 194 | ||
195 | MACHINE_START(EUKREA_CPUIMX35, "Eukrea CPUIMX35") | 195 | MACHINE_START(EUKREA_CPUIMX35SD, "Eukrea CPUIMX35") |
196 | /* Maintainer: Eukrea Electromatique */ | 196 | /* Maintainer: Eukrea Electromatique */ |
197 | .boot_params = MX3x_PHYS_OFFSET + 0x100, | 197 | .boot_params = MX3x_PHYS_OFFSET + 0x100, |
198 | .map_io = mx35_map_io, | 198 | .map_io = mx35_map_io, |
diff --git a/arch/arm/mach-imx/mach-eukrea_cpuimx25.c b/arch/arm/mach-imx/mach-eukrea_cpuimx25.c index e2343c8594fc..b05de09b1a6e 100644 --- a/arch/arm/mach-imx/mach-eukrea_cpuimx25.c +++ b/arch/arm/mach-imx/mach-eukrea_cpuimx25.c | |||
@@ -161,7 +161,7 @@ static struct sys_timer eukrea_cpuimx25_timer = { | |||
161 | .init = eukrea_cpuimx25_timer_init, | 161 | .init = eukrea_cpuimx25_timer_init, |
162 | }; | 162 | }; |
163 | 163 | ||
164 | MACHINE_START(EUKREA_CPUIMX25, "Eukrea CPUIMX25") | 164 | MACHINE_START(EUKREA_CPUIMX25SD, "Eukrea CPUIMX25") |
165 | /* Maintainer: Eukrea Electromatique */ | 165 | /* Maintainer: Eukrea Electromatique */ |
166 | .boot_params = MX25_PHYS_OFFSET + 0x100, | 166 | .boot_params = MX25_PHYS_OFFSET + 0x100, |
167 | .map_io = mx25_map_io, | 167 | .map_io = mx25_map_io, |
diff --git a/arch/arm/mach-integrator/integrator_ap.c b/arch/arm/mach-integrator/integrator_ap.c index 2fbbdd5eac35..8cdc730dcb3a 100644 --- a/arch/arm/mach-integrator/integrator_ap.c +++ b/arch/arm/mach-integrator/integrator_ap.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/interrupt.h> | 32 | #include <linux/interrupt.h> |
33 | #include <linux/io.h> | 33 | #include <linux/io.h> |
34 | #include <linux/mtd/physmap.h> | 34 | #include <linux/mtd/physmap.h> |
35 | #include <video/vga.h> | ||
35 | 36 | ||
36 | #include <mach/hardware.h> | 37 | #include <mach/hardware.h> |
37 | #include <mach/platform.h> | 38 | #include <mach/platform.h> |
@@ -154,6 +155,7 @@ static struct map_desc ap_io_desc[] __initdata = { | |||
154 | static void __init ap_map_io(void) | 155 | static void __init ap_map_io(void) |
155 | { | 156 | { |
156 | iotable_init(ap_io_desc, ARRAY_SIZE(ap_io_desc)); | 157 | iotable_init(ap_io_desc, ARRAY_SIZE(ap_io_desc)); |
158 | vga_base = PCI_MEMORY_VADDR; | ||
157 | } | 159 | } |
158 | 160 | ||
159 | #define INTEGRATOR_SC_VALID_INT 0x003fffff | 161 | #define INTEGRATOR_SC_VALID_INT 0x003fffff |
@@ -337,15 +339,15 @@ static unsigned long timer_reload; | |||
337 | static void integrator_clocksource_init(u32 khz) | 339 | static void integrator_clocksource_init(u32 khz) |
338 | { | 340 | { |
339 | void __iomem *base = (void __iomem *)TIMER2_VA_BASE; | 341 | void __iomem *base = (void __iomem *)TIMER2_VA_BASE; |
340 | u32 ctrl = TIMER_CTRL_ENABLE; | 342 | u32 ctrl = TIMER_CTRL_ENABLE | TIMER_CTRL_PERIODIC; |
341 | 343 | ||
342 | if (khz >= 1500) { | 344 | if (khz >= 1500) { |
343 | khz /= 16; | 345 | khz /= 16; |
344 | ctrl = TIMER_CTRL_DIV16; | 346 | ctrl |= TIMER_CTRL_DIV16; |
345 | } | 347 | } |
346 | 348 | ||
347 | writel(ctrl, base + TIMER_CTRL); | ||
348 | writel(0xffff, base + TIMER_LOAD); | 349 | writel(0xffff, base + TIMER_LOAD); |
350 | writel(ctrl, base + TIMER_CTRL); | ||
349 | 351 | ||
350 | clocksource_mmio_init(base + TIMER_VALUE, "timer2", | 352 | clocksource_mmio_init(base + TIMER_VALUE, "timer2", |
351 | khz * 1000, 200, 16, clocksource_mmio_readl_down); | 353 | khz * 1000, 200, 16, clocksource_mmio_readl_down); |
diff --git a/arch/arm/mach-integrator/pci_v3.c b/arch/arm/mach-integrator/pci_v3.c index dd56bfb351e3..11b86e5b71c2 100644 --- a/arch/arm/mach-integrator/pci_v3.c +++ b/arch/arm/mach-integrator/pci_v3.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include <linux/spinlock.h> | 27 | #include <linux/spinlock.h> |
28 | #include <linux/init.h> | 28 | #include <linux/init.h> |
29 | #include <linux/io.h> | 29 | #include <linux/io.h> |
30 | #include <video/vga.h> | ||
31 | 30 | ||
32 | #include <mach/hardware.h> | 31 | #include <mach/hardware.h> |
33 | #include <mach/platform.h> | 32 | #include <mach/platform.h> |
@@ -505,7 +504,6 @@ void __init pci_v3_preinit(void) | |||
505 | 504 | ||
506 | pcibios_min_io = 0x6000; | 505 | pcibios_min_io = 0x6000; |
507 | pcibios_min_mem = 0x00100000; | 506 | pcibios_min_mem = 0x00100000; |
508 | vga_base = PCI_MEMORY_VADDR; | ||
509 | 507 | ||
510 | /* | 508 | /* |
511 | * Hook in our fault handler for PCI errors | 509 | * Hook in our fault handler for PCI errors |
diff --git a/arch/arm/mach-mx5/board-mx53_ard.c b/arch/arm/mach-mx5/board-mx53_ard.c index cb4d753c6c95..614edcb0aa7e 100644 --- a/arch/arm/mach-mx5/board-mx53_ard.c +++ b/arch/arm/mach-mx5/board-mx53_ard.c | |||
@@ -234,6 +234,7 @@ static void __init mx53_ard_board_init(void) | |||
234 | imx53_add_imx_i2c(1, &mx53_ard_i2c2_data); | 234 | imx53_add_imx_i2c(1, &mx53_ard_i2c2_data); |
235 | imx53_add_imx_i2c(2, &mx53_ard_i2c3_data); | 235 | imx53_add_imx_i2c(2, &mx53_ard_i2c3_data); |
236 | imx_add_gpio_keys(&ard_button_data); | 236 | imx_add_gpio_keys(&ard_button_data); |
237 | imx53_add_ahci_imx(); | ||
237 | } | 238 | } |
238 | 239 | ||
239 | static void __init mx53_ard_timer_init(void) | 240 | static void __init mx53_ard_timer_init(void) |
diff --git a/arch/arm/mach-mx5/board-mx53_loco.c b/arch/arm/mach-mx5/board-mx53_loco.c index 7149416d1519..0af2766f8610 100644 --- a/arch/arm/mach-mx5/board-mx53_loco.c +++ b/arch/arm/mach-mx5/board-mx53_loco.c | |||
@@ -293,6 +293,7 @@ static void __init mx53_loco_board_init(void) | |||
293 | imx53_add_sdhci_esdhc_imx(2, &mx53_loco_sd3_data); | 293 | imx53_add_sdhci_esdhc_imx(2, &mx53_loco_sd3_data); |
294 | imx_add_gpio_keys(&loco_button_data); | 294 | imx_add_gpio_keys(&loco_button_data); |
295 | gpio_led_register_device(-1, &mx53loco_leds_data); | 295 | gpio_led_register_device(-1, &mx53loco_leds_data); |
296 | imx53_add_ahci_imx(); | ||
296 | } | 297 | } |
297 | 298 | ||
298 | static void __init mx53_loco_timer_init(void) | 299 | static void __init mx53_loco_timer_init(void) |
diff --git a/arch/arm/mach-mx5/board-mx53_smd.c b/arch/arm/mach-mx5/board-mx53_smd.c index e64fd2c088eb..d12fd3043ba6 100644 --- a/arch/arm/mach-mx5/board-mx53_smd.c +++ b/arch/arm/mach-mx5/board-mx53_smd.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include "devices-imx53.h" | 35 | #include "devices-imx53.h" |
36 | 36 | ||
37 | #define SMD_FEC_PHY_RST IMX_GPIO_NR(7, 6) | 37 | #define SMD_FEC_PHY_RST IMX_GPIO_NR(7, 6) |
38 | #define MX53_SMD_SATA_PWR_EN IMX_GPIO_NR(3, 3) | ||
38 | 39 | ||
39 | static iomux_v3_cfg_t mx53_smd_pads[] = { | 40 | static iomux_v3_cfg_t mx53_smd_pads[] = { |
40 | MX53_PAD_CSI0_DAT10__UART1_TXD_MUX, | 41 | MX53_PAD_CSI0_DAT10__UART1_TXD_MUX, |
@@ -111,6 +112,19 @@ static const struct imxi2c_platform_data mx53_smd_i2c_data __initconst = { | |||
111 | .bitrate = 100000, | 112 | .bitrate = 100000, |
112 | }; | 113 | }; |
113 | 114 | ||
115 | static inline void mx53_smd_ahci_pwr_on(void) | ||
116 | { | ||
117 | int ret; | ||
118 | |||
119 | /* Enable SATA PWR */ | ||
120 | ret = gpio_request_one(MX53_SMD_SATA_PWR_EN, | ||
121 | GPIOF_DIR_OUT | GPIOF_INIT_HIGH, "ahci-sata-pwr"); | ||
122 | if (ret) { | ||
123 | pr_err("failed to enable SATA_PWR_EN: %d\n", ret); | ||
124 | return; | ||
125 | } | ||
126 | } | ||
127 | |||
114 | static void __init mx53_smd_board_init(void) | 128 | static void __init mx53_smd_board_init(void) |
115 | { | 129 | { |
116 | imx53_soc_init(); | 130 | imx53_soc_init(); |
@@ -125,6 +139,8 @@ static void __init mx53_smd_board_init(void) | |||
125 | imx53_add_sdhci_esdhc_imx(0, NULL); | 139 | imx53_add_sdhci_esdhc_imx(0, NULL); |
126 | imx53_add_sdhci_esdhc_imx(1, NULL); | 140 | imx53_add_sdhci_esdhc_imx(1, NULL); |
127 | imx53_add_sdhci_esdhc_imx(2, NULL); | 141 | imx53_add_sdhci_esdhc_imx(2, NULL); |
142 | mx53_smd_ahci_pwr_on(); | ||
143 | imx53_add_ahci_imx(); | ||
128 | } | 144 | } |
129 | 145 | ||
130 | static void __init mx53_smd_timer_init(void) | 146 | static void __init mx53_smd_timer_init(void) |
diff --git a/arch/arm/mach-mx5/clock-mx51-mx53.c b/arch/arm/mach-mx5/clock-mx51-mx53.c index 2b9bd1fabaf9..b94879e8679f 100644 --- a/arch/arm/mach-mx5/clock-mx51-mx53.c +++ b/arch/arm/mach-mx5/clock-mx51-mx53.c | |||
@@ -1401,6 +1401,22 @@ static struct clk esdhc4_mx53_clk = { | |||
1401 | .secondary = &esdhc4_ipg_clk, | 1401 | .secondary = &esdhc4_ipg_clk, |
1402 | }; | 1402 | }; |
1403 | 1403 | ||
1404 | static struct clk sata_clk = { | ||
1405 | .parent = &ipg_clk, | ||
1406 | .enable = _clk_max_enable, | ||
1407 | .enable_reg = MXC_CCM_CCGR4, | ||
1408 | .enable_shift = MXC_CCM_CCGRx_CG1_OFFSET, | ||
1409 | .disable = _clk_max_disable, | ||
1410 | }; | ||
1411 | |||
1412 | static struct clk ahci_phy_clk = { | ||
1413 | .parent = &usb_phy1_clk, | ||
1414 | }; | ||
1415 | |||
1416 | static struct clk ahci_dma_clk = { | ||
1417 | .parent = &ahb_clk, | ||
1418 | }; | ||
1419 | |||
1404 | DEFINE_CLOCK(mipi_esc_clk, 0, MXC_CCM_CCGR4, MXC_CCM_CCGRx_CG5_OFFSET, NULL, NULL, NULL, &pll2_sw_clk); | 1420 | DEFINE_CLOCK(mipi_esc_clk, 0, MXC_CCM_CCGR4, MXC_CCM_CCGRx_CG5_OFFSET, NULL, NULL, NULL, &pll2_sw_clk); |
1405 | DEFINE_CLOCK(mipi_hsc2_clk, 0, MXC_CCM_CCGR4, MXC_CCM_CCGRx_CG4_OFFSET, NULL, NULL, &mipi_esc_clk, &pll2_sw_clk); | 1421 | DEFINE_CLOCK(mipi_hsc2_clk, 0, MXC_CCM_CCGR4, MXC_CCM_CCGRx_CG4_OFFSET, NULL, NULL, &mipi_esc_clk, &pll2_sw_clk); |
1406 | DEFINE_CLOCK(mipi_hsc1_clk, 0, MXC_CCM_CCGR4, MXC_CCM_CCGRx_CG3_OFFSET, NULL, NULL, &mipi_hsc2_clk, &pll2_sw_clk); | 1422 | DEFINE_CLOCK(mipi_hsc1_clk, 0, MXC_CCM_CCGR4, MXC_CCM_CCGRx_CG3_OFFSET, NULL, NULL, &mipi_hsc2_clk, &pll2_sw_clk); |
@@ -1513,6 +1529,9 @@ static struct clk_lookup mx53_lookups[] = { | |||
1513 | _REGISTER_CLOCK("imx-ssi.2", NULL, ssi3_clk) | 1529 | _REGISTER_CLOCK("imx-ssi.2", NULL, ssi3_clk) |
1514 | _REGISTER_CLOCK("imx-keypad", NULL, dummy_clk) | 1530 | _REGISTER_CLOCK("imx-keypad", NULL, dummy_clk) |
1515 | _REGISTER_CLOCK("pata_imx", NULL, pata_clk) | 1531 | _REGISTER_CLOCK("pata_imx", NULL, pata_clk) |
1532 | _REGISTER_CLOCK("imx53-ahci.0", "ahci", sata_clk) | ||
1533 | _REGISTER_CLOCK("imx53-ahci.0", "ahci_phy", ahci_phy_clk) | ||
1534 | _REGISTER_CLOCK("imx53-ahci.0", "ahci_dma", ahci_dma_clk) | ||
1516 | }; | 1535 | }; |
1517 | 1536 | ||
1518 | static void clk_tree_init(void) | 1537 | static void clk_tree_init(void) |
diff --git a/arch/arm/mach-mx5/devices-imx53.h b/arch/arm/mach-mx5/devices-imx53.h index 7ca5d0c76f8b..6e1e5d1f8c3a 100644 --- a/arch/arm/mach-mx5/devices-imx53.h +++ b/arch/arm/mach-mx5/devices-imx53.h | |||
@@ -44,3 +44,5 @@ extern const struct imx_imx_keypad_data imx53_imx_keypad_data; | |||
44 | extern const struct imx_pata_imx_data imx53_pata_imx_data; | 44 | extern const struct imx_pata_imx_data imx53_pata_imx_data; |
45 | #define imx53_add_pata_imx() \ | 45 | #define imx53_add_pata_imx() \ |
46 | imx_add_pata_imx(&imx53_pata_imx_data) | 46 | imx_add_pata_imx(&imx53_pata_imx_data) |
47 | |||
48 | extern struct platform_device *__init imx53_add_ahci_imx(void); | ||
diff --git a/arch/arm/mach-mxs/Kconfig b/arch/arm/mach-mxs/Kconfig index fdf104f083b7..cf00b3e3be85 100644 --- a/arch/arm/mach-mxs/Kconfig +++ b/arch/arm/mach-mxs/Kconfig | |||
@@ -70,8 +70,25 @@ config MODULE_TX28 | |||
70 | select MXS_HAVE_PLATFORM_MXS_PWM | 70 | select MXS_HAVE_PLATFORM_MXS_PWM |
71 | select MXS_HAVE_PLATFORM_RTC_STMP3XXX | 71 | select MXS_HAVE_PLATFORM_RTC_STMP3XXX |
72 | 72 | ||
73 | config MODULE_M28 | ||
74 | bool | ||
75 | select SOC_IMX28 | ||
76 | select LEDS_GPIO_REGISTER | ||
77 | select MXS_HAVE_AMBA_DUART | ||
78 | select MXS_HAVE_PLATFORM_AUART | ||
79 | select MXS_HAVE_PLATFORM_FEC | ||
80 | select MXS_HAVE_PLATFORM_FLEXCAN | ||
81 | select MXS_HAVE_PLATFORM_MXS_I2C | ||
82 | select MXS_HAVE_PLATFORM_MXS_MMC | ||
83 | select MXS_HAVE_PLATFORM_MXSFB | ||
84 | select MXS_OCOTP | ||
85 | |||
73 | config MACH_TX28 | 86 | config MACH_TX28 |
74 | bool "Ka-Ro TX28 module" | 87 | bool "Ka-Ro TX28 module" |
75 | select MODULE_TX28 | 88 | select MODULE_TX28 |
76 | 89 | ||
90 | config MACH_M28EVK | ||
91 | bool "Support DENX M28EVK Platform" | ||
92 | select MODULE_M28 | ||
93 | |||
77 | endif | 94 | endif |
diff --git a/arch/arm/mach-mxs/Makefile b/arch/arm/mach-mxs/Makefile index ea8dcb7742bc..8c93b24896bf 100644 --- a/arch/arm/mach-mxs/Makefile +++ b/arch/arm/mach-mxs/Makefile | |||
@@ -10,6 +10,7 @@ obj-$(CONFIG_SOC_IMX28) += clock-mx28.o | |||
10 | obj-$(CONFIG_MACH_STMP378X_DEVB) += mach-stmp378x_devb.o | 10 | obj-$(CONFIG_MACH_STMP378X_DEVB) += mach-stmp378x_devb.o |
11 | obj-$(CONFIG_MACH_MX23EVK) += mach-mx23evk.o | 11 | obj-$(CONFIG_MACH_MX23EVK) += mach-mx23evk.o |
12 | obj-$(CONFIG_MACH_MX28EVK) += mach-mx28evk.o | 12 | obj-$(CONFIG_MACH_MX28EVK) += mach-mx28evk.o |
13 | obj-$(CONFIG_MACH_M28EVK) += mach-m28evk.o | ||
13 | obj-$(CONFIG_MODULE_TX28) += module-tx28.o | 14 | obj-$(CONFIG_MODULE_TX28) += module-tx28.o |
14 | obj-$(CONFIG_MACH_TX28) += mach-tx28.o | 15 | obj-$(CONFIG_MACH_TX28) += mach-tx28.o |
15 | 16 | ||
diff --git a/arch/arm/mach-mxs/clock-mx28.c b/arch/arm/mach-mxs/clock-mx28.c index 7954013bd32f..e2fb70c6a745 100644 --- a/arch/arm/mach-mxs/clock-mx28.c +++ b/arch/arm/mach-mxs/clock-mx28.c | |||
@@ -740,11 +740,17 @@ static int clk_misc_init(void) | |||
740 | __raw_writel(BM_CLKCTRL_CPU_INTERRUPT_WAIT, | 740 | __raw_writel(BM_CLKCTRL_CPU_INTERRUPT_WAIT, |
741 | CLKCTRL_BASE_ADDR + HW_CLKCTRL_CPU_SET); | 741 | CLKCTRL_BASE_ADDR + HW_CLKCTRL_CPU_SET); |
742 | 742 | ||
743 | /* Extra fec clock setting */ | 743 | /* |
744 | reg = __raw_readl(CLKCTRL_BASE_ADDR + HW_CLKCTRL_ENET); | 744 | * Extra fec clock setting |
745 | reg &= ~BM_CLKCTRL_ENET_SLEEP; | 745 | * The DENX M28 uses an external clock source |
746 | reg |= BM_CLKCTRL_ENET_CLK_OUT_EN; | 746 | * and the clock output must not be enabled |
747 | __raw_writel(reg, CLKCTRL_BASE_ADDR + HW_CLKCTRL_ENET); | 747 | */ |
748 | if (!machine_is_m28evk()) { | ||
749 | reg = __raw_readl(CLKCTRL_BASE_ADDR + HW_CLKCTRL_ENET); | ||
750 | reg &= ~BM_CLKCTRL_ENET_SLEEP; | ||
751 | reg |= BM_CLKCTRL_ENET_CLK_OUT_EN; | ||
752 | __raw_writel(reg, CLKCTRL_BASE_ADDR + HW_CLKCTRL_ENET); | ||
753 | } | ||
748 | 754 | ||
749 | /* | 755 | /* |
750 | * 480 MHz seems too high to be ssp clock source directly, | 756 | * 480 MHz seems too high to be ssp clock source directly, |
diff --git a/arch/arm/mach-mxs/include/mach/mxs.h b/arch/arm/mach-mxs/include/mach/mxs.h index 5aa5f754c846..0d2d2b470998 100644 --- a/arch/arm/mach-mxs/include/mach/mxs.h +++ b/arch/arm/mach-mxs/include/mach/mxs.h | |||
@@ -33,6 +33,7 @@ | |||
33 | 0) | 33 | 0) |
34 | #define cpu_is_mx28() ( \ | 34 | #define cpu_is_mx28() ( \ |
35 | machine_is_mx28evk() || \ | 35 | machine_is_mx28evk() || \ |
36 | machine_is_m28evk() || \ | ||
36 | machine_is_tx28() || \ | 37 | machine_is_tx28() || \ |
37 | 0) | 38 | 0) |
38 | 39 | ||
diff --git a/arch/arm/mach-mxs/include/mach/uncompress.h b/arch/arm/mach-mxs/include/mach/uncompress.h index 7f8bf6539646..67776746f143 100644 --- a/arch/arm/mach-mxs/include/mach/uncompress.h +++ b/arch/arm/mach-mxs/include/mach/uncompress.h | |||
@@ -63,6 +63,7 @@ static inline void __arch_decomp_setup(unsigned long arch_id) | |||
63 | mxs_duart_base = MX23_DUART_BASE_ADDR; | 63 | mxs_duart_base = MX23_DUART_BASE_ADDR; |
64 | break; | 64 | break; |
65 | case MACH_TYPE_MX28EVK: | 65 | case MACH_TYPE_MX28EVK: |
66 | case MACH_TYPE_M28EVK: | ||
66 | case MACH_TYPE_TX28: | 67 | case MACH_TYPE_TX28: |
67 | mxs_duart_base = MX28_DUART_BASE_ADDR; | 68 | mxs_duart_base = MX28_DUART_BASE_ADDR; |
68 | break; | 69 | break; |
diff --git a/arch/arm/mach-mxs/mach-m28evk.c b/arch/arm/mach-mxs/mach-m28evk.c new file mode 100644 index 000000000000..3b1681e4f49a --- /dev/null +++ b/arch/arm/mach-mxs/mach-m28evk.c | |||
@@ -0,0 +1,366 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2011 | ||
3 | * Stefano Babic, DENX Software Engineering, <sbabic@denx.de> | ||
4 | * | ||
5 | * based on: mach-mx28_evk.c | ||
6 | * Copyright 2010 Freescale Semiconductor, Inc. All Rights Reserved. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | */ | ||
18 | |||
19 | #include <linux/delay.h> | ||
20 | #include <linux/platform_device.h> | ||
21 | #include <linux/gpio.h> | ||
22 | #include <linux/leds.h> | ||
23 | #include <linux/irq.h> | ||
24 | #include <linux/clk.h> | ||
25 | #include <linux/i2c.h> | ||
26 | #include <linux/i2c/at24.h> | ||
27 | |||
28 | #include <asm/mach-types.h> | ||
29 | #include <asm/mach/arch.h> | ||
30 | #include <asm/mach/time.h> | ||
31 | |||
32 | #include <mach/common.h> | ||
33 | #include <mach/iomux-mx28.h> | ||
34 | |||
35 | #include "devices-mx28.h" | ||
36 | |||
37 | #define M28EVK_GPIO_USERLED1 MXS_GPIO_NR(3, 16) | ||
38 | #define M28EVK_GPIO_USERLED2 MXS_GPIO_NR(3, 17) | ||
39 | |||
40 | #define MX28EVK_BL_ENABLE MXS_GPIO_NR(3, 18) | ||
41 | #define M28EVK_LCD_ENABLE MXS_GPIO_NR(3, 28) | ||
42 | |||
43 | #define MX28EVK_MMC0_WRITE_PROTECT MXS_GPIO_NR(2, 12) | ||
44 | #define MX28EVK_MMC1_WRITE_PROTECT MXS_GPIO_NR(0, 28) | ||
45 | |||
46 | static const iomux_cfg_t m28evk_pads[] __initconst = { | ||
47 | /* duart */ | ||
48 | MX28_PAD_AUART0_CTS__DUART_RX | MXS_PAD_CTRL, | ||
49 | MX28_PAD_AUART0_RTS__DUART_TX | MXS_PAD_CTRL, | ||
50 | |||
51 | /* auart0 */ | ||
52 | MX28_PAD_AUART0_RX__AUART0_RX | MXS_PAD_CTRL, | ||
53 | MX28_PAD_AUART0_TX__AUART0_TX | MXS_PAD_CTRL, | ||
54 | |||
55 | /* auart3 */ | ||
56 | MX28_PAD_AUART3_RX__AUART3_RX | MXS_PAD_CTRL, | ||
57 | MX28_PAD_AUART3_TX__AUART3_TX | MXS_PAD_CTRL, | ||
58 | MX28_PAD_AUART3_CTS__AUART3_CTS | MXS_PAD_CTRL, | ||
59 | MX28_PAD_AUART3_RTS__AUART3_RTS | MXS_PAD_CTRL, | ||
60 | |||
61 | #define MXS_PAD_FEC (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP) | ||
62 | /* fec0 */ | ||
63 | MX28_PAD_ENET0_MDC__ENET0_MDC | MXS_PAD_FEC, | ||
64 | MX28_PAD_ENET0_MDIO__ENET0_MDIO | MXS_PAD_FEC, | ||
65 | MX28_PAD_ENET0_RX_EN__ENET0_RX_EN | MXS_PAD_FEC, | ||
66 | MX28_PAD_ENET0_RXD0__ENET0_RXD0 | MXS_PAD_FEC, | ||
67 | MX28_PAD_ENET0_RXD1__ENET0_RXD1 | MXS_PAD_FEC, | ||
68 | MX28_PAD_ENET0_TX_EN__ENET0_TX_EN | MXS_PAD_FEC, | ||
69 | MX28_PAD_ENET0_TXD0__ENET0_TXD0 | MXS_PAD_FEC, | ||
70 | MX28_PAD_ENET0_TXD1__ENET0_TXD1 | MXS_PAD_FEC, | ||
71 | MX28_PAD_ENET_CLK__CLKCTRL_ENET | MXS_PAD_FEC, | ||
72 | /* fec1 */ | ||
73 | MX28_PAD_ENET0_CRS__ENET1_RX_EN | MXS_PAD_FEC, | ||
74 | MX28_PAD_ENET0_RXD2__ENET1_RXD0 | MXS_PAD_FEC, | ||
75 | MX28_PAD_ENET0_RXD3__ENET1_RXD1 | MXS_PAD_FEC, | ||
76 | MX28_PAD_ENET0_COL__ENET1_TX_EN | MXS_PAD_FEC, | ||
77 | MX28_PAD_ENET0_TXD2__ENET1_TXD0 | MXS_PAD_FEC, | ||
78 | MX28_PAD_ENET0_TXD3__ENET1_TXD1 | MXS_PAD_FEC, | ||
79 | |||
80 | /* flexcan0 */ | ||
81 | MX28_PAD_GPMI_RDY2__CAN0_TX, | ||
82 | MX28_PAD_GPMI_RDY3__CAN0_RX, | ||
83 | |||
84 | /* flexcan1 */ | ||
85 | MX28_PAD_GPMI_CE2N__CAN1_TX, | ||
86 | MX28_PAD_GPMI_CE3N__CAN1_RX, | ||
87 | |||
88 | /* I2C */ | ||
89 | MX28_PAD_I2C0_SCL__I2C0_SCL, | ||
90 | MX28_PAD_I2C0_SDA__I2C0_SDA, | ||
91 | |||
92 | /* mxsfb (lcdif) */ | ||
93 | MX28_PAD_LCD_D00__LCD_D0 | MXS_PAD_CTRL, | ||
94 | MX28_PAD_LCD_D01__LCD_D1 | MXS_PAD_CTRL, | ||
95 | MX28_PAD_LCD_D02__LCD_D2 | MXS_PAD_CTRL, | ||
96 | MX28_PAD_LCD_D03__LCD_D3 | MXS_PAD_CTRL, | ||
97 | MX28_PAD_LCD_D04__LCD_D4 | MXS_PAD_CTRL, | ||
98 | MX28_PAD_LCD_D05__LCD_D5 | MXS_PAD_CTRL, | ||
99 | MX28_PAD_LCD_D06__LCD_D6 | MXS_PAD_CTRL, | ||
100 | MX28_PAD_LCD_D07__LCD_D7 | MXS_PAD_CTRL, | ||
101 | MX28_PAD_LCD_D08__LCD_D8 | MXS_PAD_CTRL, | ||
102 | MX28_PAD_LCD_D09__LCD_D9 | MXS_PAD_CTRL, | ||
103 | MX28_PAD_LCD_D10__LCD_D10 | MXS_PAD_CTRL, | ||
104 | MX28_PAD_LCD_D11__LCD_D11 | MXS_PAD_CTRL, | ||
105 | MX28_PAD_LCD_D12__LCD_D12 | MXS_PAD_CTRL, | ||
106 | MX28_PAD_LCD_D13__LCD_D13 | MXS_PAD_CTRL, | ||
107 | MX28_PAD_LCD_D14__LCD_D14 | MXS_PAD_CTRL, | ||
108 | MX28_PAD_LCD_D15__LCD_D15 | MXS_PAD_CTRL, | ||
109 | MX28_PAD_LCD_D16__LCD_D16 | MXS_PAD_CTRL, | ||
110 | MX28_PAD_LCD_D17__LCD_D17 | MXS_PAD_CTRL, | ||
111 | MX28_PAD_LCD_D18__LCD_D18 | MXS_PAD_CTRL, | ||
112 | MX28_PAD_LCD_D19__LCD_D19 | MXS_PAD_CTRL, | ||
113 | MX28_PAD_LCD_D20__LCD_D20 | MXS_PAD_CTRL, | ||
114 | MX28_PAD_LCD_D21__LCD_D21 | MXS_PAD_CTRL, | ||
115 | MX28_PAD_LCD_D22__LCD_D22 | MXS_PAD_CTRL, | ||
116 | MX28_PAD_LCD_D23__LCD_D23 | MXS_PAD_CTRL, | ||
117 | |||
118 | MX28_PAD_LCD_ENABLE__LCD_ENABLE | MXS_PAD_CTRL, | ||
119 | MX28_PAD_LCD_DOTCLK__LCD_DOTCLK | MXS_PAD_CTRL, | ||
120 | |||
121 | /* mmc0 */ | ||
122 | MX28_PAD_SSP0_DATA0__SSP0_D0 | | ||
123 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
124 | MX28_PAD_SSP0_DATA1__SSP0_D1 | | ||
125 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
126 | MX28_PAD_SSP0_DATA2__SSP0_D2 | | ||
127 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
128 | MX28_PAD_SSP0_DATA3__SSP0_D3 | | ||
129 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
130 | MX28_PAD_SSP0_DATA4__SSP0_D4 | | ||
131 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
132 | MX28_PAD_SSP0_DATA5__SSP0_D5 | | ||
133 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
134 | MX28_PAD_SSP0_DATA6__SSP0_D6 | | ||
135 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
136 | MX28_PAD_SSP0_DATA7__SSP0_D7 | | ||
137 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
138 | MX28_PAD_SSP0_CMD__SSP0_CMD | | ||
139 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
140 | MX28_PAD_SSP0_DETECT__SSP0_CARD_DETECT | | ||
141 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), | ||
142 | MX28_PAD_SSP0_SCK__SSP0_SCK | | ||
143 | (MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), | ||
144 | |||
145 | /* mmc1 */ | ||
146 | MX28_PAD_GPMI_D00__SSP1_D0 | | ||
147 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
148 | MX28_PAD_GPMI_D01__SSP1_D1 | | ||
149 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
150 | MX28_PAD_GPMI_D02__SSP1_D2 | | ||
151 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
152 | MX28_PAD_GPMI_D03__SSP1_D3 | | ||
153 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
154 | MX28_PAD_GPMI_D04__SSP1_D4 | | ||
155 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
156 | MX28_PAD_GPMI_D05__SSP1_D5 | | ||
157 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
158 | MX28_PAD_GPMI_D06__SSP1_D6 | | ||
159 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
160 | MX28_PAD_GPMI_D07__SSP1_D7 | | ||
161 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
162 | MX28_PAD_GPMI_RDY1__SSP1_CMD | | ||
163 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
164 | MX28_PAD_GPMI_RDY0__SSP1_CARD_DETECT | | ||
165 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), | ||
166 | MX28_PAD_GPMI_WRN__SSP1_SCK | | ||
167 | (MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), | ||
168 | /* write protect */ | ||
169 | MX28_PAD_GPMI_RESETN__GPIO_0_28 | | ||
170 | (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), | ||
171 | /* slot power enable */ | ||
172 | MX28_PAD_PWM4__GPIO_3_29 | | ||
173 | (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), | ||
174 | |||
175 | /* led */ | ||
176 | MX28_PAD_PWM0__GPIO_3_16 | MXS_PAD_CTRL, | ||
177 | MX28_PAD_PWM1__GPIO_3_17 | MXS_PAD_CTRL, | ||
178 | |||
179 | /* nand */ | ||
180 | MX28_PAD_GPMI_D00__GPMI_D0 | | ||
181 | (MXS_PAD_4MA | MXS_PAD_1V8 | MXS_PAD_NOPULL), | ||
182 | MX28_PAD_GPMI_D01__GPMI_D1 | | ||
183 | (MXS_PAD_4MA | MXS_PAD_1V8 | MXS_PAD_NOPULL), | ||
184 | MX28_PAD_GPMI_D02__GPMI_D2 | | ||
185 | (MXS_PAD_4MA | MXS_PAD_1V8 | MXS_PAD_NOPULL), | ||
186 | MX28_PAD_GPMI_D03__GPMI_D3 | | ||
187 | (MXS_PAD_4MA | MXS_PAD_1V8 | MXS_PAD_NOPULL), | ||
188 | MX28_PAD_GPMI_D04__GPMI_D4 | | ||
189 | (MXS_PAD_4MA | MXS_PAD_1V8 | MXS_PAD_NOPULL), | ||
190 | MX28_PAD_GPMI_D05__GPMI_D5 | | ||
191 | (MXS_PAD_4MA | MXS_PAD_1V8 | MXS_PAD_NOPULL), | ||
192 | MX28_PAD_GPMI_D06__GPMI_D6 | | ||
193 | (MXS_PAD_4MA | MXS_PAD_1V8 | MXS_PAD_NOPULL), | ||
194 | MX28_PAD_GPMI_D07__GPMI_D7 | | ||
195 | (MXS_PAD_4MA | MXS_PAD_1V8 | MXS_PAD_NOPULL), | ||
196 | MX28_PAD_GPMI_CE0N__GPMI_CE0N | | ||
197 | (MXS_PAD_4MA | MXS_PAD_1V8 | MXS_PAD_NOPULL), | ||
198 | MX28_PAD_GPMI_RDY0__GPMI_READY0 | | ||
199 | (MXS_PAD_4MA | MXS_PAD_1V8 | MXS_PAD_NOPULL), | ||
200 | MX28_PAD_GPMI_RDN__GPMI_RDN | | ||
201 | (MXS_PAD_12MA | MXS_PAD_1V8 | MXS_PAD_PULLUP), | ||
202 | MX28_PAD_GPMI_WRN__GPMI_WRN | | ||
203 | (MXS_PAD_12MA | MXS_PAD_1V8 | MXS_PAD_PULLUP), | ||
204 | MX28_PAD_GPMI_ALE__GPMI_ALE | | ||
205 | (MXS_PAD_4MA | MXS_PAD_1V8 | MXS_PAD_PULLUP), | ||
206 | MX28_PAD_GPMI_CLE__GPMI_CLE | | ||
207 | (MXS_PAD_4MA | MXS_PAD_1V8 | MXS_PAD_PULLUP), | ||
208 | MX28_PAD_GPMI_RESETN__GPMI_RESETN | | ||
209 | (MXS_PAD_12MA | MXS_PAD_1V8 | MXS_PAD_PULLUP), | ||
210 | |||
211 | /* Backlight */ | ||
212 | MX28_PAD_PWM3__GPIO_3_28 | MXS_PAD_CTRL, | ||
213 | }; | ||
214 | |||
215 | /* led */ | ||
216 | static const struct gpio_led m28evk_leds[] __initconst = { | ||
217 | { | ||
218 | .name = "user-led1", | ||
219 | .default_trigger = "heartbeat", | ||
220 | .gpio = M28EVK_GPIO_USERLED1, | ||
221 | }, | ||
222 | { | ||
223 | .name = "user-led2", | ||
224 | .default_trigger = "heartbeat", | ||
225 | .gpio = M28EVK_GPIO_USERLED2, | ||
226 | }, | ||
227 | }; | ||
228 | |||
229 | static const struct gpio_led_platform_data m28evk_led_data __initconst = { | ||
230 | .leds = m28evk_leds, | ||
231 | .num_leds = ARRAY_SIZE(m28evk_leds), | ||
232 | }; | ||
233 | |||
234 | static struct fec_platform_data mx28_fec_pdata[] __initdata = { | ||
235 | { | ||
236 | /* fec0 */ | ||
237 | .phy = PHY_INTERFACE_MODE_RMII, | ||
238 | }, { | ||
239 | /* fec1 */ | ||
240 | .phy = PHY_INTERFACE_MODE_RMII, | ||
241 | }, | ||
242 | }; | ||
243 | |||
244 | static int __init m28evk_fec_get_mac(void) | ||
245 | { | ||
246 | int i; | ||
247 | u32 val; | ||
248 | const u32 *ocotp = mxs_get_ocotp(); | ||
249 | |||
250 | if (!ocotp) { | ||
251 | pr_err("%s: timeout when reading fec mac from OCOTP\n", | ||
252 | __func__); | ||
253 | return -ETIMEDOUT; | ||
254 | } | ||
255 | |||
256 | /* | ||
257 | * OCOTP only stores the last 4 octets for each mac address, | ||
258 | * so hard-code DENX OUI (C0:E5:4E) here. | ||
259 | */ | ||
260 | for (i = 0; i < 2; i++) { | ||
261 | val = ocotp[i * 4]; | ||
262 | mx28_fec_pdata[i].mac[0] = 0xC0; | ||
263 | mx28_fec_pdata[i].mac[1] = 0xE5; | ||
264 | mx28_fec_pdata[i].mac[2] = 0x4E; | ||
265 | mx28_fec_pdata[i].mac[3] = (val >> 16) & 0xff; | ||
266 | mx28_fec_pdata[i].mac[4] = (val >> 8) & 0xff; | ||
267 | mx28_fec_pdata[i].mac[5] = (val >> 0) & 0xff; | ||
268 | } | ||
269 | |||
270 | return 0; | ||
271 | } | ||
272 | |||
273 | /* mxsfb (lcdif) */ | ||
274 | static struct fb_videomode m28evk_video_modes[] = { | ||
275 | { | ||
276 | .name = "Ampire AM-800480R2TMQW-T01H", | ||
277 | .refresh = 60, | ||
278 | .xres = 800, | ||
279 | .yres = 480, | ||
280 | .pixclock = 30066, /* picosecond (33.26 MHz) */ | ||
281 | .left_margin = 0, | ||
282 | .right_margin = 256, | ||
283 | .upper_margin = 0, | ||
284 | .lower_margin = 45, | ||
285 | .hsync_len = 1, | ||
286 | .vsync_len = 1, | ||
287 | .sync = FB_SYNC_DATA_ENABLE_HIGH_ACT, | ||
288 | }, | ||
289 | }; | ||
290 | |||
291 | static const struct mxsfb_platform_data m28evk_mxsfb_pdata __initconst = { | ||
292 | .mode_list = m28evk_video_modes, | ||
293 | .mode_count = ARRAY_SIZE(m28evk_video_modes), | ||
294 | .default_bpp = 16, | ||
295 | .ld_intf_width = STMLCDIF_18BIT, | ||
296 | }; | ||
297 | |||
298 | static struct at24_platform_data m28evk_eeprom = { | ||
299 | .byte_len = 16384, | ||
300 | .page_size = 32, | ||
301 | .flags = AT24_FLAG_ADDR16, | ||
302 | }; | ||
303 | |||
304 | static struct i2c_board_info m28_stk5v3_i2c_boardinfo[] __initdata = { | ||
305 | { | ||
306 | I2C_BOARD_INFO("at24", 0x51), /* E0=1, E1=0, E2=0 */ | ||
307 | .platform_data = &m28evk_eeprom, | ||
308 | }, | ||
309 | }; | ||
310 | |||
311 | static struct mxs_mmc_platform_data m28evk_mmc_pdata[] __initdata = { | ||
312 | { | ||
313 | /* mmc0 */ | ||
314 | .wp_gpio = MX28EVK_MMC0_WRITE_PROTECT, | ||
315 | .flags = SLOTF_8_BIT_CAPABLE, | ||
316 | }, { | ||
317 | /* mmc1 */ | ||
318 | .wp_gpio = MX28EVK_MMC1_WRITE_PROTECT, | ||
319 | .flags = SLOTF_8_BIT_CAPABLE, | ||
320 | }, | ||
321 | }; | ||
322 | |||
323 | static void __init m28evk_init(void) | ||
324 | { | ||
325 | mxs_iomux_setup_multiple_pads(m28evk_pads, ARRAY_SIZE(m28evk_pads)); | ||
326 | |||
327 | mx28_add_duart(); | ||
328 | mx28_add_auart0(); | ||
329 | mx28_add_auart3(); | ||
330 | |||
331 | if (!m28evk_fec_get_mac()) { | ||
332 | mx28_add_fec(0, &mx28_fec_pdata[0]); | ||
333 | mx28_add_fec(1, &mx28_fec_pdata[1]); | ||
334 | } | ||
335 | |||
336 | mx28_add_flexcan(0, NULL); | ||
337 | mx28_add_flexcan(1, NULL); | ||
338 | |||
339 | mx28_add_mxsfb(&m28evk_mxsfb_pdata); | ||
340 | |||
341 | mx28_add_mxs_mmc(0, &m28evk_mmc_pdata[0]); | ||
342 | mx28_add_mxs_mmc(1, &m28evk_mmc_pdata[1]); | ||
343 | |||
344 | gpio_led_register_device(0, &m28evk_led_data); | ||
345 | |||
346 | /* I2C */ | ||
347 | mx28_add_mxs_i2c(0); | ||
348 | i2c_register_board_info(0, m28_stk5v3_i2c_boardinfo, | ||
349 | ARRAY_SIZE(m28_stk5v3_i2c_boardinfo)); | ||
350 | } | ||
351 | |||
352 | static void __init m28evk_timer_init(void) | ||
353 | { | ||
354 | mx28_clocks_init(); | ||
355 | } | ||
356 | |||
357 | static struct sys_timer m28evk_timer = { | ||
358 | .init = m28evk_timer_init, | ||
359 | }; | ||
360 | |||
361 | MACHINE_START(M28EVK, "DENX M28 EVK") | ||
362 | .map_io = mx28_map_io, | ||
363 | .init_irq = mx28_init_irq, | ||
364 | .init_machine = m28evk_init, | ||
365 | .timer = &m28evk_timer, | ||
366 | MACHINE_END | ||
diff --git a/arch/arm/mach-omap2/clock3xxx_data.c b/arch/arm/mach-omap2/clock3xxx_data.c index ffd55b1c4396..b9b844683147 100644 --- a/arch/arm/mach-omap2/clock3xxx_data.c +++ b/arch/arm/mach-omap2/clock3xxx_data.c | |||
@@ -3078,6 +3078,7 @@ static struct clk gpt12_fck = { | |||
3078 | .name = "gpt12_fck", | 3078 | .name = "gpt12_fck", |
3079 | .ops = &clkops_null, | 3079 | .ops = &clkops_null, |
3080 | .parent = &secure_32k_fck, | 3080 | .parent = &secure_32k_fck, |
3081 | .clkdm_name = "wkup_clkdm", | ||
3081 | .recalc = &followparent_recalc, | 3082 | .recalc = &followparent_recalc, |
3082 | }; | 3083 | }; |
3083 | 3084 | ||
@@ -3085,6 +3086,7 @@ static struct clk wdt1_fck = { | |||
3085 | .name = "wdt1_fck", | 3086 | .name = "wdt1_fck", |
3086 | .ops = &clkops_null, | 3087 | .ops = &clkops_null, |
3087 | .parent = &secure_32k_fck, | 3088 | .parent = &secure_32k_fck, |
3089 | .clkdm_name = "wkup_clkdm", | ||
3088 | .recalc = &followparent_recalc, | 3090 | .recalc = &followparent_recalc, |
3089 | }; | 3091 | }; |
3090 | 3092 | ||
diff --git a/arch/arm/mach-omap2/clock44xx_data.c b/arch/arm/mach-omap2/clock44xx_data.c index 2af0e3f00ce1..c0b6fbda3408 100644 --- a/arch/arm/mach-omap2/clock44xx_data.c +++ b/arch/arm/mach-omap2/clock44xx_data.c | |||
@@ -3376,10 +3376,18 @@ int __init omap4xxx_clk_init(void) | |||
3376 | } else if (cpu_is_omap446x()) { | 3376 | } else if (cpu_is_omap446x()) { |
3377 | cpu_mask = RATE_IN_4460; | 3377 | cpu_mask = RATE_IN_4460; |
3378 | cpu_clkflg = CK_446X; | 3378 | cpu_clkflg = CK_446X; |
3379 | } else { | ||
3380 | return 0; | ||
3379 | } | 3381 | } |
3380 | 3382 | ||
3381 | clk_init(&omap2_clk_functions); | 3383 | clk_init(&omap2_clk_functions); |
3382 | omap2_clk_disable_clkdm_control(); | 3384 | |
3385 | /* | ||
3386 | * Must stay commented until all OMAP SoC drivers are | ||
3387 | * converted to runtime PM, or drivers may start crashing | ||
3388 | * | ||
3389 | * omap2_clk_disable_clkdm_control(); | ||
3390 | */ | ||
3383 | 3391 | ||
3384 | for (c = omap44xx_clks; c < omap44xx_clks + ARRAY_SIZE(omap44xx_clks); | 3392 | for (c = omap44xx_clks; c < omap44xx_clks + ARRAY_SIZE(omap44xx_clks); |
3385 | c++) | 3393 | c++) |
diff --git a/arch/arm/mach-omap2/clockdomain.c b/arch/arm/mach-omap2/clockdomain.c index ab7db083f97f..8f0890685d7b 100644 --- a/arch/arm/mach-omap2/clockdomain.c +++ b/arch/arm/mach-omap2/clockdomain.c | |||
@@ -747,6 +747,7 @@ int clkdm_wakeup(struct clockdomain *clkdm) | |||
747 | spin_lock_irqsave(&clkdm->lock, flags); | 747 | spin_lock_irqsave(&clkdm->lock, flags); |
748 | clkdm->_flags &= ~_CLKDM_FLAG_HWSUP_ENABLED; | 748 | clkdm->_flags &= ~_CLKDM_FLAG_HWSUP_ENABLED; |
749 | ret = arch_clkdm->clkdm_wakeup(clkdm); | 749 | ret = arch_clkdm->clkdm_wakeup(clkdm); |
750 | ret |= pwrdm_state_switch(clkdm->pwrdm.ptr); | ||
750 | spin_unlock_irqrestore(&clkdm->lock, flags); | 751 | spin_unlock_irqrestore(&clkdm->lock, flags); |
751 | return ret; | 752 | return ret; |
752 | } | 753 | } |
@@ -818,6 +819,7 @@ void clkdm_deny_idle(struct clockdomain *clkdm) | |||
818 | spin_lock_irqsave(&clkdm->lock, flags); | 819 | spin_lock_irqsave(&clkdm->lock, flags); |
819 | clkdm->_flags &= ~_CLKDM_FLAG_HWSUP_ENABLED; | 820 | clkdm->_flags &= ~_CLKDM_FLAG_HWSUP_ENABLED; |
820 | arch_clkdm->clkdm_deny_idle(clkdm); | 821 | arch_clkdm->clkdm_deny_idle(clkdm); |
822 | pwrdm_state_switch(clkdm->pwrdm.ptr); | ||
821 | spin_unlock_irqrestore(&clkdm->lock, flags); | 823 | spin_unlock_irqrestore(&clkdm->lock, flags); |
822 | } | 824 | } |
823 | 825 | ||
diff --git a/arch/arm/mach-omap2/omap_hwmod_2430_data.c b/arch/arm/mach-omap2/omap_hwmod_2430_data.c index 16743c7d6e8e..408193d8e044 100644 --- a/arch/arm/mach-omap2/omap_hwmod_2430_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_2430_data.c | |||
@@ -192,6 +192,7 @@ static struct omap_hwmod_addr_space omap2430_usbhsotg_addrs[] = { | |||
192 | .pa_end = OMAP243X_HS_BASE + SZ_4K - 1, | 192 | .pa_end = OMAP243X_HS_BASE + SZ_4K - 1, |
193 | .flags = ADDR_TYPE_RT | 193 | .flags = ADDR_TYPE_RT |
194 | }, | 194 | }, |
195 | { } | ||
195 | }; | 196 | }; |
196 | 197 | ||
197 | /* l4_core ->usbhsotg interface */ | 198 | /* l4_core ->usbhsotg interface */ |
diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c index 3feb35911a32..472bf22d5e84 100644 --- a/arch/arm/mach-omap2/pm.c +++ b/arch/arm/mach-omap2/pm.c | |||
@@ -130,7 +130,6 @@ int omap_set_pwrdm_state(struct powerdomain *pwrdm, u32 state) | |||
130 | } else { | 130 | } else { |
131 | hwsup = clkdm_in_hwsup(pwrdm->pwrdm_clkdms[0]); | 131 | hwsup = clkdm_in_hwsup(pwrdm->pwrdm_clkdms[0]); |
132 | clkdm_wakeup(pwrdm->pwrdm_clkdms[0]); | 132 | clkdm_wakeup(pwrdm->pwrdm_clkdms[0]); |
133 | pwrdm_wait_transition(pwrdm); | ||
134 | sleep_switch = FORCEWAKEUP_SWITCH; | 133 | sleep_switch = FORCEWAKEUP_SWITCH; |
135 | } | 134 | } |
136 | } | 135 | } |
@@ -156,7 +155,6 @@ int omap_set_pwrdm_state(struct powerdomain *pwrdm, u32 state) | |||
156 | return ret; | 155 | return ret; |
157 | } | 156 | } |
158 | 157 | ||
159 | pwrdm_wait_transition(pwrdm); | ||
160 | pwrdm_state_switch(pwrdm); | 158 | pwrdm_state_switch(pwrdm); |
161 | err: | 159 | err: |
162 | return ret; | 160 | return ret; |
diff --git a/arch/arm/mach-omap2/powerdomain.c b/arch/arm/mach-omap2/powerdomain.c index 9af08473bf10..ef71fdd40fc4 100644 --- a/arch/arm/mach-omap2/powerdomain.c +++ b/arch/arm/mach-omap2/powerdomain.c | |||
@@ -195,28 +195,35 @@ static int _pwrdm_post_transition_cb(struct powerdomain *pwrdm, void *unused) | |||
195 | 195 | ||
196 | /** | 196 | /** |
197 | * pwrdm_init - set up the powerdomain layer | 197 | * pwrdm_init - set up the powerdomain layer |
198 | * @pwrdm_list: array of struct powerdomain pointers to register | 198 | * @pwrdms: array of struct powerdomain pointers to register |
199 | * @custom_funcs: func pointers for arch specific implementations | 199 | * @custom_funcs: func pointers for arch specific implementations |
200 | * | 200 | * |
201 | * Loop through the array of powerdomains @pwrdm_list, registering all | 201 | * Loop through the array of powerdomains @pwrdms, registering all |
202 | * that are available on the current CPU. If pwrdm_list is supplied | 202 | * that are available on the current CPU. Also, program all |
203 | * and not null, all of the referenced powerdomains will be | 203 | * powerdomain target state as ON; this is to prevent domains from |
204 | * registered. No return value. XXX pwrdm_list is not really a | 204 | * hitting low power states (if bootloader has target states set to |
205 | * "list"; it is an array. Rename appropriately. | 205 | * something other than ON) and potentially even losing context while |
206 | * PM is not fully initialized. The PM late init code can then program | ||
207 | * the desired target state for all the power domains. No return | ||
208 | * value. | ||
206 | */ | 209 | */ |
207 | void pwrdm_init(struct powerdomain **pwrdm_list, struct pwrdm_ops *custom_funcs) | 210 | void pwrdm_init(struct powerdomain **pwrdms, struct pwrdm_ops *custom_funcs) |
208 | { | 211 | { |
209 | struct powerdomain **p = NULL; | 212 | struct powerdomain **p = NULL; |
213 | struct powerdomain *temp_p; | ||
210 | 214 | ||
211 | if (!custom_funcs) | 215 | if (!custom_funcs) |
212 | WARN(1, "powerdomain: No custom pwrdm functions registered\n"); | 216 | WARN(1, "powerdomain: No custom pwrdm functions registered\n"); |
213 | else | 217 | else |
214 | arch_pwrdm = custom_funcs; | 218 | arch_pwrdm = custom_funcs; |
215 | 219 | ||
216 | if (pwrdm_list) { | 220 | if (pwrdms) { |
217 | for (p = pwrdm_list; *p; p++) | 221 | for (p = pwrdms; *p; p++) |
218 | _pwrdm_register(*p); | 222 | _pwrdm_register(*p); |
219 | } | 223 | } |
224 | |||
225 | list_for_each_entry(temp_p, &pwrdm_list, node) | ||
226 | pwrdm_set_next_pwrst(temp_p, PWRDM_POWER_ON); | ||
220 | } | 227 | } |
221 | 228 | ||
222 | /** | 229 | /** |
diff --git a/arch/arm/mach-orion5x/dns323-setup.c b/arch/arm/mach-orion5x/dns323-setup.c index a6eddae82a0b..c105556a0ee1 100644 --- a/arch/arm/mach-orion5x/dns323-setup.c +++ b/arch/arm/mach-orion5x/dns323-setup.c | |||
@@ -77,7 +77,7 @@ static int __init dns323_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
77 | /* | 77 | /* |
78 | * Check for devices with hard-wired IRQs. | 78 | * Check for devices with hard-wired IRQs. |
79 | */ | 79 | */ |
80 | irq = orion5x_pci_map_irq(const dev, slot, pin); | 80 | irq = orion5x_pci_map_irq(dev, slot, pin); |
81 | if (irq != -1) | 81 | if (irq != -1) |
82 | return irq; | 82 | return irq; |
83 | 83 | ||
diff --git a/arch/arm/mach-orion5x/pci.c b/arch/arm/mach-orion5x/pci.c index 28b8760ab9fa..bc4a920e26ee 100644 --- a/arch/arm/mach-orion5x/pci.c +++ b/arch/arm/mach-orion5x/pci.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/pci.h> | 14 | #include <linux/pci.h> |
15 | #include <linux/slab.h> | 15 | #include <linux/slab.h> |
16 | #include <linux/mbus.h> | 16 | #include <linux/mbus.h> |
17 | #include <video/vga.h> | ||
17 | #include <asm/irq.h> | 18 | #include <asm/irq.h> |
18 | #include <asm/mach/pci.h> | 19 | #include <asm/mach/pci.h> |
19 | #include <plat/pcie.h> | 20 | #include <plat/pcie.h> |
diff --git a/arch/arm/mach-prima2/clock.c b/arch/arm/mach-prima2/clock.c index f9a2aaf63f71..615a4e75ceab 100644 --- a/arch/arm/mach-prima2/clock.c +++ b/arch/arm/mach-prima2/clock.c | |||
@@ -481,6 +481,7 @@ static void __init sirfsoc_clk_init(void) | |||
481 | 481 | ||
482 | static struct of_device_id clkc_ids[] = { | 482 | static struct of_device_id clkc_ids[] = { |
483 | { .compatible = "sirf,prima2-clkc" }, | 483 | { .compatible = "sirf,prima2-clkc" }, |
484 | {}, | ||
484 | }; | 485 | }; |
485 | 486 | ||
486 | void __init sirfsoc_of_clk_init(void) | 487 | void __init sirfsoc_of_clk_init(void) |
diff --git a/arch/arm/mach-prima2/irq.c b/arch/arm/mach-prima2/irq.c index c3404cbb6ff7..7af254d046ba 100644 --- a/arch/arm/mach-prima2/irq.c +++ b/arch/arm/mach-prima2/irq.c | |||
@@ -51,6 +51,7 @@ static __init void sirfsoc_irq_init(void) | |||
51 | 51 | ||
52 | static struct of_device_id intc_ids[] = { | 52 | static struct of_device_id intc_ids[] = { |
53 | { .compatible = "sirf,prima2-intc" }, | 53 | { .compatible = "sirf,prima2-intc" }, |
54 | {}, | ||
54 | }; | 55 | }; |
55 | 56 | ||
56 | void __init sirfsoc_of_irq_init(void) | 57 | void __init sirfsoc_of_irq_init(void) |
diff --git a/arch/arm/mach-prima2/rstc.c b/arch/arm/mach-prima2/rstc.c index d074786e83d4..492cfa8d2610 100644 --- a/arch/arm/mach-prima2/rstc.c +++ b/arch/arm/mach-prima2/rstc.c | |||
@@ -19,6 +19,7 @@ static DEFINE_MUTEX(rstc_lock); | |||
19 | 19 | ||
20 | static struct of_device_id rstc_ids[] = { | 20 | static struct of_device_id rstc_ids[] = { |
21 | { .compatible = "sirf,prima2-rstc" }, | 21 | { .compatible = "sirf,prima2-rstc" }, |
22 | {}, | ||
22 | }; | 23 | }; |
23 | 24 | ||
24 | static int __init sirfsoc_of_rstc_init(void) | 25 | static int __init sirfsoc_of_rstc_init(void) |
diff --git a/arch/arm/mach-prima2/timer.c b/arch/arm/mach-prima2/timer.c index 44027f34a88a..ed7ec48d11da 100644 --- a/arch/arm/mach-prima2/timer.c +++ b/arch/arm/mach-prima2/timer.c | |||
@@ -190,6 +190,7 @@ static void __init sirfsoc_timer_init(void) | |||
190 | 190 | ||
191 | static struct of_device_id timer_ids[] = { | 191 | static struct of_device_id timer_ids[] = { |
192 | { .compatible = "sirf,prima2-tick" }, | 192 | { .compatible = "sirf,prima2-tick" }, |
193 | {}, | ||
193 | }; | 194 | }; |
194 | 195 | ||
195 | static void __init sirfsoc_of_timer_map(void) | 196 | static void __init sirfsoc_of_timer_map(void) |
diff --git a/arch/arm/mach-realview/include/mach/system.h b/arch/arm/mach-realview/include/mach/system.h index a30f2e3ec178..6657ff231161 100644 --- a/arch/arm/mach-realview/include/mach/system.h +++ b/arch/arm/mach-realview/include/mach/system.h | |||
@@ -44,6 +44,7 @@ static inline void arch_reset(char mode, const char *cmd) | |||
44 | */ | 44 | */ |
45 | if (realview_reset) | 45 | if (realview_reset) |
46 | realview_reset(mode); | 46 | realview_reset(mode); |
47 | dsb(); | ||
47 | } | 48 | } |
48 | 49 | ||
49 | #endif | 50 | #endif |
diff --git a/arch/arm/mach-s3c2443/clock.c b/arch/arm/mach-s3c2443/clock.c index a1a7176675b9..38058af48972 100644 --- a/arch/arm/mach-s3c2443/clock.c +++ b/arch/arm/mach-s3c2443/clock.c | |||
@@ -128,7 +128,7 @@ static int s3c2443_armclk_setrate(struct clk *clk, unsigned long rate) | |||
128 | unsigned long clkcon0; | 128 | unsigned long clkcon0; |
129 | 129 | ||
130 | clkcon0 = __raw_readl(S3C2443_CLKDIV0); | 130 | clkcon0 = __raw_readl(S3C2443_CLKDIV0); |
131 | clkcon0 &= S3C2443_CLKDIV0_ARMDIV_MASK; | 131 | clkcon0 &= ~S3C2443_CLKDIV0_ARMDIV_MASK; |
132 | clkcon0 |= val << S3C2443_CLKDIV0_ARMDIV_SHIFT; | 132 | clkcon0 |= val << S3C2443_CLKDIV0_ARMDIV_SHIFT; |
133 | __raw_writel(clkcon0, S3C2443_CLKDIV0); | 133 | __raw_writel(clkcon0, S3C2443_CLKDIV0); |
134 | } | 134 | } |
diff --git a/arch/arm/mach-s3c64xx/mach-smdk6410.c b/arch/arm/mach-s3c64xx/mach-smdk6410.c index ecbea92bf83b..a9f3183e0290 100644 --- a/arch/arm/mach-s3c64xx/mach-smdk6410.c +++ b/arch/arm/mach-s3c64xx/mach-smdk6410.c | |||
@@ -262,45 +262,6 @@ static struct samsung_keypad_platdata smdk6410_keypad_data __initdata = { | |||
262 | .cols = 8, | 262 | .cols = 8, |
263 | }; | 263 | }; |
264 | 264 | ||
265 | static int smdk6410_backlight_init(struct device *dev) | ||
266 | { | ||
267 | int ret; | ||
268 | |||
269 | ret = gpio_request(S3C64XX_GPF(15), "Backlight"); | ||
270 | if (ret) { | ||
271 | printk(KERN_ERR "failed to request GPF for PWM-OUT1\n"); | ||
272 | return ret; | ||
273 | } | ||
274 | |||
275 | /* Configure GPIO pin with S3C64XX_GPF15_PWM_TOUT1 */ | ||
276 | s3c_gpio_cfgpin(S3C64XX_GPF(15), S3C_GPIO_SFN(2)); | ||
277 | |||
278 | return 0; | ||
279 | } | ||
280 | |||
281 | static void smdk6410_backlight_exit(struct device *dev) | ||
282 | { | ||
283 | s3c_gpio_cfgpin(S3C64XX_GPF(15), S3C_GPIO_OUTPUT); | ||
284 | gpio_free(S3C64XX_GPF(15)); | ||
285 | } | ||
286 | |||
287 | static struct platform_pwm_backlight_data smdk6410_backlight_data = { | ||
288 | .pwm_id = 1, | ||
289 | .max_brightness = 255, | ||
290 | .dft_brightness = 255, | ||
291 | .pwm_period_ns = 78770, | ||
292 | .init = smdk6410_backlight_init, | ||
293 | .exit = smdk6410_backlight_exit, | ||
294 | }; | ||
295 | |||
296 | static struct platform_device smdk6410_backlight_device = { | ||
297 | .name = "pwm-backlight", | ||
298 | .dev = { | ||
299 | .parent = &s3c_device_timer[1].dev, | ||
300 | .platform_data = &smdk6410_backlight_data, | ||
301 | }, | ||
302 | }; | ||
303 | |||
304 | static struct map_desc smdk6410_iodesc[] = {}; | 265 | static struct map_desc smdk6410_iodesc[] = {}; |
305 | 266 | ||
306 | static struct platform_device *smdk6410_devices[] __initdata = { | 267 | static struct platform_device *smdk6410_devices[] __initdata = { |
diff --git a/arch/arm/mach-s3c64xx/pm.c b/arch/arm/mach-s3c64xx/pm.c index 8bad64370689..055e2858b0dd 100644 --- a/arch/arm/mach-s3c64xx/pm.c +++ b/arch/arm/mach-s3c64xx/pm.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/suspend.h> | 16 | #include <linux/suspend.h> |
17 | #include <linux/serial_core.h> | 17 | #include <linux/serial_core.h> |
18 | #include <linux/io.h> | 18 | #include <linux/io.h> |
19 | #include <linux/gpio.h> | ||
19 | 20 | ||
20 | #include <mach/map.h> | 21 | #include <mach/map.h> |
21 | #include <mach/irqs.h> | 22 | #include <mach/irqs.h> |
diff --git a/arch/arm/mach-s5p64x0/irq-eint.c b/arch/arm/mach-s5p64x0/irq-eint.c index 69ed4545112b..fe7380f5c3cd 100644 --- a/arch/arm/mach-s5p64x0/irq-eint.c +++ b/arch/arm/mach-s5p64x0/irq-eint.c | |||
@@ -129,7 +129,7 @@ static int s5p64x0_alloc_gc(void) | |||
129 | } | 129 | } |
130 | 130 | ||
131 | ct = gc->chip_types; | 131 | ct = gc->chip_types; |
132 | ct->chip.irq_ack = irq_gc_ack; | 132 | ct->chip.irq_ack = irq_gc_ack_set_bit; |
133 | ct->chip.irq_mask = irq_gc_mask_set_bit; | 133 | ct->chip.irq_mask = irq_gc_mask_set_bit; |
134 | ct->chip.irq_unmask = irq_gc_mask_clr_bit; | 134 | ct->chip.irq_unmask = irq_gc_mask_clr_bit; |
135 | ct->chip.irq_set_type = s5p64x0_irq_eint_set_type; | 135 | ct->chip.irq_set_type = s5p64x0_irq_eint_set_type; |
diff --git a/arch/arm/mach-s5pv210/clock.c b/arch/arm/mach-s5pv210/clock.c index 52a8e607bcc2..f5f8fa89679c 100644 --- a/arch/arm/mach-s5pv210/clock.c +++ b/arch/arm/mach-s5pv210/clock.c | |||
@@ -815,8 +815,7 @@ static struct clksrc_clk clksrcs[] = { | |||
815 | .reg_div = { .reg = S5P_CLK_DIV3, .shift = 20, .size = 4 }, | 815 | .reg_div = { .reg = S5P_CLK_DIV3, .shift = 20, .size = 4 }, |
816 | }, { | 816 | }, { |
817 | .clk = { | 817 | .clk = { |
818 | .name = "sclk_cam", | 818 | .name = "sclk_cam0", |
819 | .devname = "s5pv210-fimc.0", | ||
820 | .enable = s5pv210_clk_mask0_ctrl, | 819 | .enable = s5pv210_clk_mask0_ctrl, |
821 | .ctrlbit = (1 << 3), | 820 | .ctrlbit = (1 << 3), |
822 | }, | 821 | }, |
@@ -825,8 +824,7 @@ static struct clksrc_clk clksrcs[] = { | |||
825 | .reg_div = { .reg = S5P_CLK_DIV1, .shift = 12, .size = 4 }, | 824 | .reg_div = { .reg = S5P_CLK_DIV1, .shift = 12, .size = 4 }, |
826 | }, { | 825 | }, { |
827 | .clk = { | 826 | .clk = { |
828 | .name = "sclk_cam", | 827 | .name = "sclk_cam1", |
829 | .devname = "s5pv210-fimc.1", | ||
830 | .enable = s5pv210_clk_mask0_ctrl, | 828 | .enable = s5pv210_clk_mask0_ctrl, |
831 | .ctrlbit = (1 << 4), | 829 | .ctrlbit = (1 << 4), |
832 | }, | 830 | }, |
diff --git a/arch/arm/mach-s5pv210/pm.c b/arch/arm/mach-s5pv210/pm.c index 309e388a8a83..f149d278377b 100644 --- a/arch/arm/mach-s5pv210/pm.c +++ b/arch/arm/mach-s5pv210/pm.c | |||
@@ -88,7 +88,7 @@ static struct sleep_save s5pv210_core_save[] = { | |||
88 | SAVE_ITEM(S3C2410_TCNTO(0)), | 88 | SAVE_ITEM(S3C2410_TCNTO(0)), |
89 | }; | 89 | }; |
90 | 90 | ||
91 | void s5pv210_cpu_suspend(unsigned long arg) | 91 | static int s5pv210_cpu_suspend(unsigned long arg) |
92 | { | 92 | { |
93 | unsigned long tmp; | 93 | unsigned long tmp; |
94 | 94 | ||
diff --git a/arch/arm/mach-shmobile/board-ag5evm.c b/arch/arm/mach-shmobile/board-ag5evm.c index ce5c2513c6ce..cdfdd624d21d 100644 --- a/arch/arm/mach-shmobile/board-ag5evm.c +++ b/arch/arm/mach-shmobile/board-ag5evm.c | |||
@@ -341,6 +341,7 @@ static struct platform_device mipidsi0_device = { | |||
341 | static struct sh_mobile_sdhi_info sdhi0_info = { | 341 | static struct sh_mobile_sdhi_info sdhi0_info = { |
342 | .dma_slave_tx = SHDMA_SLAVE_SDHI0_TX, | 342 | .dma_slave_tx = SHDMA_SLAVE_SDHI0_TX, |
343 | .dma_slave_rx = SHDMA_SLAVE_SDHI0_RX, | 343 | .dma_slave_rx = SHDMA_SLAVE_SDHI0_RX, |
344 | .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT, | ||
344 | .tmio_caps = MMC_CAP_SD_HIGHSPEED, | 345 | .tmio_caps = MMC_CAP_SD_HIGHSPEED, |
345 | .tmio_ocr_mask = MMC_VDD_27_28 | MMC_VDD_28_29, | 346 | .tmio_ocr_mask = MMC_VDD_27_28 | MMC_VDD_28_29, |
346 | }; | 347 | }; |
@@ -382,7 +383,7 @@ void ag5evm_sdhi1_set_pwr(struct platform_device *pdev, int state) | |||
382 | } | 383 | } |
383 | 384 | ||
384 | static struct sh_mobile_sdhi_info sh_sdhi1_info = { | 385 | static struct sh_mobile_sdhi_info sh_sdhi1_info = { |
385 | .tmio_flags = TMIO_MMC_WRPROTECT_DISABLE, | 386 | .tmio_flags = TMIO_MMC_WRPROTECT_DISABLE | TMIO_MMC_HAS_IDLE_WAIT, |
386 | .tmio_caps = MMC_CAP_NONREMOVABLE | MMC_CAP_SDIO_IRQ, | 387 | .tmio_caps = MMC_CAP_NONREMOVABLE | MMC_CAP_SDIO_IRQ, |
387 | .tmio_ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, | 388 | .tmio_ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, |
388 | .set_pwr = ag5evm_sdhi1_set_pwr, | 389 | .set_pwr = ag5evm_sdhi1_set_pwr, |
diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c index 9e0856b2f9e9..523f608eb8cf 100644 --- a/arch/arm/mach-shmobile/board-ap4evb.c +++ b/arch/arm/mach-shmobile/board-ap4evb.c | |||
@@ -1412,6 +1412,7 @@ static void __init ap4evb_init(void) | |||
1412 | fsi_init_pm_clock(); | 1412 | fsi_init_pm_clock(); |
1413 | sh7372_pm_init(); | 1413 | sh7372_pm_init(); |
1414 | pm_clk_add(&fsi_device.dev, "spu2"); | 1414 | pm_clk_add(&fsi_device.dev, "spu2"); |
1415 | pm_clk_add(&lcdc1_device.dev, "hdmi"); | ||
1415 | } | 1416 | } |
1416 | 1417 | ||
1417 | static void __init ap4evb_timer_init(void) | 1418 | static void __init ap4evb_timer_init(void) |
diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c index d41c01f83f15..17c19dc25604 100644 --- a/arch/arm/mach-shmobile/board-mackerel.c +++ b/arch/arm/mach-shmobile/board-mackerel.c | |||
@@ -641,6 +641,8 @@ static struct usbhs_private usbhs0_private = { | |||
641 | }, | 641 | }, |
642 | .driver_param = { | 642 | .driver_param = { |
643 | .buswait_bwait = 4, | 643 | .buswait_bwait = 4, |
644 | .d0_tx_id = SHDMA_SLAVE_USB0_TX, | ||
645 | .d1_rx_id = SHDMA_SLAVE_USB0_RX, | ||
644 | }, | 646 | }, |
645 | }, | 647 | }, |
646 | }; | 648 | }; |
@@ -810,6 +812,8 @@ static struct usbhs_private usbhs1_private = { | |||
810 | .buswait_bwait = 4, | 812 | .buswait_bwait = 4, |
811 | .pipe_type = usbhs1_pipe_cfg, | 813 | .pipe_type = usbhs1_pipe_cfg, |
812 | .pipe_size = ARRAY_SIZE(usbhs1_pipe_cfg), | 814 | .pipe_size = ARRAY_SIZE(usbhs1_pipe_cfg), |
815 | .d0_tx_id = SHDMA_SLAVE_USB1_TX, | ||
816 | .d1_rx_id = SHDMA_SLAVE_USB1_RX, | ||
813 | }, | 817 | }, |
814 | }, | 818 | }, |
815 | }; | 819 | }; |
@@ -1588,6 +1592,7 @@ static void __init mackerel_init(void) | |||
1588 | hdmi_init_pm_clock(); | 1592 | hdmi_init_pm_clock(); |
1589 | sh7372_pm_init(); | 1593 | sh7372_pm_init(); |
1590 | pm_clk_add(&fsi_device.dev, "spu2"); | 1594 | pm_clk_add(&fsi_device.dev, "spu2"); |
1595 | pm_clk_add(&hdmi_lcdc_device.dev, "hdmi"); | ||
1591 | } | 1596 | } |
1592 | 1597 | ||
1593 | static void __init mackerel_timer_init(void) | 1598 | static void __init mackerel_timer_init(void) |
diff --git a/arch/arm/mach-shmobile/clock-sh7372.c b/arch/arm/mach-shmobile/clock-sh7372.c index 6b1619a65dba..66975921e646 100644 --- a/arch/arm/mach-shmobile/clock-sh7372.c +++ b/arch/arm/mach-shmobile/clock-sh7372.c | |||
@@ -503,16 +503,17 @@ static struct clk *late_main_clks[] = { | |||
503 | &sh7372_fsidivb_clk, | 503 | &sh7372_fsidivb_clk, |
504 | }; | 504 | }; |
505 | 505 | ||
506 | enum { MSTP001, | 506 | enum { MSTP001, MSTP000, |
507 | MSTP131, MSTP130, | 507 | MSTP131, MSTP130, |
508 | MSTP129, MSTP128, MSTP127, MSTP126, MSTP125, | 508 | MSTP129, MSTP128, MSTP127, MSTP126, MSTP125, |
509 | MSTP118, MSTP117, MSTP116, MSTP113, | 509 | MSTP118, MSTP117, MSTP116, MSTP113, |
510 | MSTP106, MSTP101, MSTP100, | 510 | MSTP106, MSTP101, MSTP100, |
511 | MSTP223, | 511 | MSTP223, |
512 | MSTP218, MSTP217, MSTP216, | 512 | MSTP218, MSTP217, MSTP216, MSTP214, MSTP208, MSTP207, |
513 | MSTP207, MSTP206, MSTP204, MSTP203, MSTP202, MSTP201, MSTP200, | 513 | MSTP206, MSTP205, MSTP204, MSTP203, MSTP202, MSTP201, MSTP200, |
514 | MSTP329, MSTP328, MSTP323, MSTP322, MSTP314, MSTP313, MSTP312, | 514 | MSTP328, MSTP323, MSTP322, MSTP314, MSTP313, MSTP312, |
515 | MSTP423, MSTP415, MSTP413, MSTP411, MSTP410, MSTP406, MSTP403, | 515 | MSTP423, MSTP415, MSTP413, MSTP411, MSTP410, MSTP407, MSTP406, |
516 | MSTP405, MSTP404, MSTP403, MSTP400, | ||
516 | MSTP_NR }; | 517 | MSTP_NR }; |
517 | 518 | ||
518 | #define MSTP(_parent, _reg, _bit, _flags) \ | 519 | #define MSTP(_parent, _reg, _bit, _flags) \ |
@@ -520,6 +521,7 @@ enum { MSTP001, | |||
520 | 521 | ||
521 | static struct clk mstp_clks[MSTP_NR] = { | 522 | static struct clk mstp_clks[MSTP_NR] = { |
522 | [MSTP001] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR0, 1, 0), /* IIC2 */ | 523 | [MSTP001] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR0, 1, 0), /* IIC2 */ |
524 | [MSTP000] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR0, 0, 0), /* MSIOF0 */ | ||
523 | [MSTP131] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 31, 0), /* VEU3 */ | 525 | [MSTP131] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 31, 0), /* VEU3 */ |
524 | [MSTP130] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 30, 0), /* VEU2 */ | 526 | [MSTP130] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 30, 0), /* VEU2 */ |
525 | [MSTP129] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 29, 0), /* VEU1 */ | 527 | [MSTP129] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 29, 0), /* VEU1 */ |
@@ -538,14 +540,16 @@ static struct clk mstp_clks[MSTP_NR] = { | |||
538 | [MSTP218] = MSTP(&div4_clks[DIV4_HP], SMSTPCR2, 18, 0), /* DMAC1 */ | 540 | [MSTP218] = MSTP(&div4_clks[DIV4_HP], SMSTPCR2, 18, 0), /* DMAC1 */ |
539 | [MSTP217] = MSTP(&div4_clks[DIV4_HP], SMSTPCR2, 17, 0), /* DMAC2 */ | 541 | [MSTP217] = MSTP(&div4_clks[DIV4_HP], SMSTPCR2, 17, 0), /* DMAC2 */ |
540 | [MSTP216] = MSTP(&div4_clks[DIV4_HP], SMSTPCR2, 16, 0), /* DMAC3 */ | 542 | [MSTP216] = MSTP(&div4_clks[DIV4_HP], SMSTPCR2, 16, 0), /* DMAC3 */ |
543 | [MSTP214] = MSTP(&div4_clks[DIV4_HP], SMSTPCR2, 14, 0), /* USBDMAC */ | ||
544 | [MSTP208] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 8, 0), /* MSIOF1 */ | ||
541 | [MSTP207] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 7, 0), /* SCIFA5 */ | 545 | [MSTP207] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 7, 0), /* SCIFA5 */ |
542 | [MSTP206] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 6, 0), /* SCIFB */ | 546 | [MSTP206] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 6, 0), /* SCIFB */ |
547 | [MSTP205] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 5, 0), /* MSIOF2 */ | ||
543 | [MSTP204] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 4, 0), /* SCIFA0 */ | 548 | [MSTP204] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 4, 0), /* SCIFA0 */ |
544 | [MSTP203] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 3, 0), /* SCIFA1 */ | 549 | [MSTP203] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 3, 0), /* SCIFA1 */ |
545 | [MSTP202] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 2, 0), /* SCIFA2 */ | 550 | [MSTP202] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 2, 0), /* SCIFA2 */ |
546 | [MSTP201] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 1, 0), /* SCIFA3 */ | 551 | [MSTP201] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 1, 0), /* SCIFA3 */ |
547 | [MSTP200] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 0, 0), /* SCIFA4 */ | 552 | [MSTP200] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 0, 0), /* SCIFA4 */ |
548 | [MSTP329] = MSTP(&r_clk, SMSTPCR3, 29, 0), /* CMT10 */ | ||
549 | [MSTP328] = MSTP(&div6_clks[DIV6_SPU], SMSTPCR3, 28, 0), /* FSI2 */ | 553 | [MSTP328] = MSTP(&div6_clks[DIV6_SPU], SMSTPCR3, 28, 0), /* FSI2 */ |
550 | [MSTP323] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR3, 23, 0), /* IIC1 */ | 554 | [MSTP323] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR3, 23, 0), /* IIC1 */ |
551 | [MSTP322] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR3, 22, 0), /* USB0 */ | 555 | [MSTP322] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR3, 22, 0), /* USB0 */ |
@@ -557,8 +561,12 @@ static struct clk mstp_clks[MSTP_NR] = { | |||
557 | [MSTP413] = MSTP(&pllc1_div2_clk, SMSTPCR4, 13, 0), /* HDMI */ | 561 | [MSTP413] = MSTP(&pllc1_div2_clk, SMSTPCR4, 13, 0), /* HDMI */ |
558 | [MSTP411] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR4, 11, 0), /* IIC3 */ | 562 | [MSTP411] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR4, 11, 0), /* IIC3 */ |
559 | [MSTP410] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR4, 10, 0), /* IIC4 */ | 563 | [MSTP410] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR4, 10, 0), /* IIC4 */ |
564 | [MSTP407] = MSTP(&div4_clks[DIV4_HP], SMSTPCR4, 7, 0), /* USB-DMAC1 */ | ||
560 | [MSTP406] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR4, 6, 0), /* USB1 */ | 565 | [MSTP406] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR4, 6, 0), /* USB1 */ |
566 | [MSTP405] = MSTP(&r_clk, SMSTPCR4, 5, 0), /* CMT4 */ | ||
567 | [MSTP404] = MSTP(&r_clk, SMSTPCR4, 4, 0), /* CMT3 */ | ||
561 | [MSTP403] = MSTP(&r_clk, SMSTPCR4, 3, 0), /* KEYSC */ | 568 | [MSTP403] = MSTP(&r_clk, SMSTPCR4, 3, 0), /* KEYSC */ |
569 | [MSTP400] = MSTP(&r_clk, SMSTPCR4, 0, 0), /* CMT2 */ | ||
562 | }; | 570 | }; |
563 | 571 | ||
564 | static struct clk_lookup lookups[] = { | 572 | static struct clk_lookup lookups[] = { |
@@ -609,6 +617,7 @@ static struct clk_lookup lookups[] = { | |||
609 | 617 | ||
610 | /* MSTP32 clocks */ | 618 | /* MSTP32 clocks */ |
611 | CLKDEV_DEV_ID("i2c-sh_mobile.2", &mstp_clks[MSTP001]), /* IIC2 */ | 619 | CLKDEV_DEV_ID("i2c-sh_mobile.2", &mstp_clks[MSTP001]), /* IIC2 */ |
620 | CLKDEV_DEV_ID("spi_sh_msiof.0", &mstp_clks[MSTP000]), /* MSIOF0 */ | ||
612 | CLKDEV_DEV_ID("uio_pdrv_genirq.4", &mstp_clks[MSTP131]), /* VEU3 */ | 621 | CLKDEV_DEV_ID("uio_pdrv_genirq.4", &mstp_clks[MSTP131]), /* VEU3 */ |
613 | CLKDEV_DEV_ID("uio_pdrv_genirq.3", &mstp_clks[MSTP130]), /* VEU2 */ | 622 | CLKDEV_DEV_ID("uio_pdrv_genirq.3", &mstp_clks[MSTP130]), /* VEU2 */ |
614 | CLKDEV_DEV_ID("uio_pdrv_genirq.2", &mstp_clks[MSTP129]), /* VEU1 */ | 623 | CLKDEV_DEV_ID("uio_pdrv_genirq.2", &mstp_clks[MSTP129]), /* VEU1 */ |
@@ -629,14 +638,16 @@ static struct clk_lookup lookups[] = { | |||
629 | CLKDEV_DEV_ID("sh-dma-engine.0", &mstp_clks[MSTP218]), /* DMAC1 */ | 638 | CLKDEV_DEV_ID("sh-dma-engine.0", &mstp_clks[MSTP218]), /* DMAC1 */ |
630 | CLKDEV_DEV_ID("sh-dma-engine.1", &mstp_clks[MSTP217]), /* DMAC2 */ | 639 | CLKDEV_DEV_ID("sh-dma-engine.1", &mstp_clks[MSTP217]), /* DMAC2 */ |
631 | CLKDEV_DEV_ID("sh-dma-engine.2", &mstp_clks[MSTP216]), /* DMAC3 */ | 640 | CLKDEV_DEV_ID("sh-dma-engine.2", &mstp_clks[MSTP216]), /* DMAC3 */ |
641 | CLKDEV_DEV_ID("sh-dma-engine.3", &mstp_clks[MSTP214]), /* USB-DMAC0 */ | ||
642 | CLKDEV_DEV_ID("spi_sh_msiof.1", &mstp_clks[MSTP208]), /* MSIOF1 */ | ||
632 | CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP207]), /* SCIFA5 */ | 643 | CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP207]), /* SCIFA5 */ |
633 | CLKDEV_DEV_ID("sh-sci.6", &mstp_clks[MSTP206]), /* SCIFB */ | 644 | CLKDEV_DEV_ID("sh-sci.6", &mstp_clks[MSTP206]), /* SCIFB */ |
645 | CLKDEV_DEV_ID("spi_sh_msiof.2", &mstp_clks[MSTP205]), /* MSIOF2 */ | ||
634 | CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP204]), /* SCIFA0 */ | 646 | CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP204]), /* SCIFA0 */ |
635 | CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP203]), /* SCIFA1 */ | 647 | CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP203]), /* SCIFA1 */ |
636 | CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP202]), /* SCIFA2 */ | 648 | CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP202]), /* SCIFA2 */ |
637 | CLKDEV_DEV_ID("sh-sci.3", &mstp_clks[MSTP201]), /* SCIFA3 */ | 649 | CLKDEV_DEV_ID("sh-sci.3", &mstp_clks[MSTP201]), /* SCIFA3 */ |
638 | CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP200]), /* SCIFA4 */ | 650 | CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP200]), /* SCIFA4 */ |
639 | CLKDEV_DEV_ID("sh_cmt.10", &mstp_clks[MSTP329]), /* CMT10 */ | ||
640 | CLKDEV_DEV_ID("sh_fsi2", &mstp_clks[MSTP328]), /* FSI2 */ | 651 | CLKDEV_DEV_ID("sh_fsi2", &mstp_clks[MSTP328]), /* FSI2 */ |
641 | CLKDEV_DEV_ID("i2c-sh_mobile.1", &mstp_clks[MSTP323]), /* IIC1 */ | 652 | CLKDEV_DEV_ID("i2c-sh_mobile.1", &mstp_clks[MSTP323]), /* IIC1 */ |
642 | CLKDEV_DEV_ID("r8a66597_hcd.0", &mstp_clks[MSTP322]), /* USB0 */ | 653 | CLKDEV_DEV_ID("r8a66597_hcd.0", &mstp_clks[MSTP322]), /* USB0 */ |
@@ -650,11 +661,17 @@ static struct clk_lookup lookups[] = { | |||
650 | CLKDEV_DEV_ID("sh-mobile-hdmi", &mstp_clks[MSTP413]), /* HDMI */ | 661 | CLKDEV_DEV_ID("sh-mobile-hdmi", &mstp_clks[MSTP413]), /* HDMI */ |
651 | CLKDEV_DEV_ID("i2c-sh_mobile.3", &mstp_clks[MSTP411]), /* IIC3 */ | 662 | CLKDEV_DEV_ID("i2c-sh_mobile.3", &mstp_clks[MSTP411]), /* IIC3 */ |
652 | CLKDEV_DEV_ID("i2c-sh_mobile.4", &mstp_clks[MSTP410]), /* IIC4 */ | 663 | CLKDEV_DEV_ID("i2c-sh_mobile.4", &mstp_clks[MSTP410]), /* IIC4 */ |
664 | CLKDEV_DEV_ID("sh-dma-engine.4", &mstp_clks[MSTP407]), /* USB-DMAC1 */ | ||
653 | CLKDEV_DEV_ID("r8a66597_hcd.1", &mstp_clks[MSTP406]), /* USB1 */ | 665 | CLKDEV_DEV_ID("r8a66597_hcd.1", &mstp_clks[MSTP406]), /* USB1 */ |
654 | CLKDEV_DEV_ID("r8a66597_udc.1", &mstp_clks[MSTP406]), /* USB1 */ | 666 | CLKDEV_DEV_ID("r8a66597_udc.1", &mstp_clks[MSTP406]), /* USB1 */ |
655 | CLKDEV_DEV_ID("renesas_usbhs.1", &mstp_clks[MSTP406]), /* USB1 */ | 667 | CLKDEV_DEV_ID("renesas_usbhs.1", &mstp_clks[MSTP406]), /* USB1 */ |
668 | CLKDEV_DEV_ID("sh_cmt.4", &mstp_clks[MSTP405]), /* CMT4 */ | ||
669 | CLKDEV_DEV_ID("sh_cmt.3", &mstp_clks[MSTP404]), /* CMT3 */ | ||
656 | CLKDEV_DEV_ID("sh_keysc.0", &mstp_clks[MSTP403]), /* KEYSC */ | 670 | CLKDEV_DEV_ID("sh_keysc.0", &mstp_clks[MSTP403]), /* KEYSC */ |
671 | CLKDEV_DEV_ID("sh_cmt.2", &mstp_clks[MSTP400]), /* CMT2 */ | ||
657 | 672 | ||
673 | CLKDEV_ICK_ID("hdmi", "sh_mobile_lcdc_fb.1", | ||
674 | &div6_reparent_clks[DIV6_HDMI]), | ||
658 | CLKDEV_ICK_ID("ick", "sh-mobile-hdmi", &div6_reparent_clks[DIV6_HDMI]), | 675 | CLKDEV_ICK_ID("ick", "sh-mobile-hdmi", &div6_reparent_clks[DIV6_HDMI]), |
659 | CLKDEV_ICK_ID("icka", "sh_fsi2", &div6_reparent_clks[DIV6_FSIA]), | 676 | CLKDEV_ICK_ID("icka", "sh_fsi2", &div6_reparent_clks[DIV6_FSIA]), |
660 | CLKDEV_ICK_ID("ickb", "sh_fsi2", &div6_reparent_clks[DIV6_FSIB]), | 677 | CLKDEV_ICK_ID("ickb", "sh_fsi2", &div6_reparent_clks[DIV6_FSIB]), |
diff --git a/arch/arm/mach-shmobile/clock-sh73a0.c b/arch/arm/mach-shmobile/clock-sh73a0.c index 6db2ccabc2bf..61a846bb30f2 100644 --- a/arch/arm/mach-shmobile/clock-sh73a0.c +++ b/arch/arm/mach-shmobile/clock-sh73a0.c | |||
@@ -365,7 +365,7 @@ void __init sh73a0_clock_init(void) | |||
365 | __raw_writel(0x108, SD2CKCR); | 365 | __raw_writel(0x108, SD2CKCR); |
366 | 366 | ||
367 | /* detect main clock parent */ | 367 | /* detect main clock parent */ |
368 | switch ((__raw_readl(CKSCR) >> 24) & 0x03) { | 368 | switch ((__raw_readl(CKSCR) >> 28) & 0x03) { |
369 | case 0: | 369 | case 0: |
370 | main_clk.parent = &sh73a0_extal1_clk; | 370 | main_clk.parent = &sh73a0_extal1_clk; |
371 | break; | 371 | break; |
diff --git a/arch/arm/mach-shmobile/include/mach/sh7372.h b/arch/arm/mach-shmobile/include/mach/sh7372.h index ce595cee86cd..24e63a85e669 100644 --- a/arch/arm/mach-shmobile/include/mach/sh7372.h +++ b/arch/arm/mach-shmobile/include/mach/sh7372.h | |||
@@ -459,6 +459,10 @@ enum { | |||
459 | SHDMA_SLAVE_SDHI2_TX, | 459 | SHDMA_SLAVE_SDHI2_TX, |
460 | SHDMA_SLAVE_MMCIF_RX, | 460 | SHDMA_SLAVE_MMCIF_RX, |
461 | SHDMA_SLAVE_MMCIF_TX, | 461 | SHDMA_SLAVE_MMCIF_TX, |
462 | SHDMA_SLAVE_USB0_TX, | ||
463 | SHDMA_SLAVE_USB0_RX, | ||
464 | SHDMA_SLAVE_USB1_TX, | ||
465 | SHDMA_SLAVE_USB1_RX, | ||
462 | }; | 466 | }; |
463 | 467 | ||
464 | extern struct clk sh7372_extal1_clk; | 468 | extern struct clk sh7372_extal1_clk; |
diff --git a/arch/arm/mach-shmobile/intc-sh7372.c b/arch/arm/mach-shmobile/intc-sh7372.c index 3b28743c77eb..739315e30eb9 100644 --- a/arch/arm/mach-shmobile/intc-sh7372.c +++ b/arch/arm/mach-shmobile/intc-sh7372.c | |||
@@ -379,7 +379,7 @@ enum { | |||
379 | /* BBIF2 */ | 379 | /* BBIF2 */ |
380 | VPU, | 380 | VPU, |
381 | TSIF1, | 381 | TSIF1, |
382 | _3DG_SGX530, | 382 | /* 3DG */ |
383 | _2DDMAC, | 383 | _2DDMAC, |
384 | IIC2_ALI2, IIC2_TACKI2, IIC2_WAITI2, IIC2_DTEI2, | 384 | IIC2_ALI2, IIC2_TACKI2, IIC2_WAITI2, IIC2_DTEI2, |
385 | IPMMU_IPMMUR, IPMMU_IPMMUR2, | 385 | IPMMU_IPMMUR, IPMMU_IPMMUR2, |
@@ -436,7 +436,7 @@ static struct intc_vect intcs_vectors[] = { | |||
436 | /* BBIF2 */ | 436 | /* BBIF2 */ |
437 | INTCS_VECT(VPU, 0x980), | 437 | INTCS_VECT(VPU, 0x980), |
438 | INTCS_VECT(TSIF1, 0x9a0), | 438 | INTCS_VECT(TSIF1, 0x9a0), |
439 | INTCS_VECT(_3DG_SGX530, 0x9e0), | 439 | /* 3DG */ |
440 | INTCS_VECT(_2DDMAC, 0xa00), | 440 | INTCS_VECT(_2DDMAC, 0xa00), |
441 | INTCS_VECT(IIC2_ALI2, 0xa80), INTCS_VECT(IIC2_TACKI2, 0xaa0), | 441 | INTCS_VECT(IIC2_ALI2, 0xa80), INTCS_VECT(IIC2_TACKI2, 0xaa0), |
442 | INTCS_VECT(IIC2_WAITI2, 0xac0), INTCS_VECT(IIC2_DTEI2, 0xae0), | 442 | INTCS_VECT(IIC2_WAITI2, 0xac0), INTCS_VECT(IIC2_DTEI2, 0xae0), |
@@ -521,7 +521,7 @@ static struct intc_mask_reg intcs_mask_registers[] = { | |||
521 | RTDMAC_1_DEI3, RTDMAC_1_DEI2, RTDMAC_1_DEI1, RTDMAC_1_DEI0 } }, | 521 | RTDMAC_1_DEI3, RTDMAC_1_DEI2, RTDMAC_1_DEI1, RTDMAC_1_DEI0 } }, |
522 | { 0xffd20198, 0xffd201d8, 8, /* IMR6SA / IMCR6SA */ | 522 | { 0xffd20198, 0xffd201d8, 8, /* IMR6SA / IMCR6SA */ |
523 | { 0, 0, MSIOF, 0, | 523 | { 0, 0, MSIOF, 0, |
524 | _3DG_SGX530, 0, 0, 0 } }, | 524 | 0, 0, 0, 0 } }, |
525 | { 0xffd2019c, 0xffd201dc, 8, /* IMR7SA / IMCR7SA */ | 525 | { 0xffd2019c, 0xffd201dc, 8, /* IMR7SA / IMCR7SA */ |
526 | { 0, TMU_TUNI2, TMU_TUNI1, TMU_TUNI0, | 526 | { 0, TMU_TUNI2, TMU_TUNI1, TMU_TUNI0, |
527 | 0, 0, 0, 0 } }, | 527 | 0, 0, 0, 0 } }, |
@@ -561,7 +561,6 @@ static struct intc_prio_reg intcs_prio_registers[] = { | |||
561 | TMU_TUNI2, TSIF1 } }, | 561 | TMU_TUNI2, TSIF1 } }, |
562 | { 0xffd2001c, 0, 16, 4, /* IPRHS */ { 0, 0, VEU, BEU } }, | 562 | { 0xffd2001c, 0, 16, 4, /* IPRHS */ { 0, 0, VEU, BEU } }, |
563 | { 0xffd20020, 0, 16, 4, /* IPRIS */ { 0, MSIOF, TSIF0, IIC0 } }, | 563 | { 0xffd20020, 0, 16, 4, /* IPRIS */ { 0, MSIOF, TSIF0, IIC0 } }, |
564 | { 0xffd20024, 0, 16, 4, /* IPRJS */ { 0, _3DG_SGX530, 0, 0 } }, | ||
565 | { 0xffd20028, 0, 16, 4, /* IPRKS */ { 0, 0, LMB, 0 } }, | 564 | { 0xffd20028, 0, 16, 4, /* IPRKS */ { 0, 0, LMB, 0 } }, |
566 | { 0xffd2002c, 0, 16, 4, /* IPRLS */ { IPMMU, 0, 0, 0 } }, | 565 | { 0xffd2002c, 0, 16, 4, /* IPRLS */ { IPMMU, 0, 0, 0 } }, |
567 | { 0xffd20030, 0, 16, 4, /* IPRMS */ { IIC2, 0, 0, 0 } }, | 566 | { 0xffd20030, 0, 16, 4, /* IPRMS */ { IIC2, 0, 0, 0 } }, |
diff --git a/arch/arm/mach-shmobile/setup-sh7372.c b/arch/arm/mach-shmobile/setup-sh7372.c index 79f0413d8725..2d9b1b1a2538 100644 --- a/arch/arm/mach-shmobile/setup-sh7372.c +++ b/arch/arm/mach-shmobile/setup-sh7372.c | |||
@@ -169,35 +169,35 @@ static struct platform_device scif6_device = { | |||
169 | }; | 169 | }; |
170 | 170 | ||
171 | /* CMT */ | 171 | /* CMT */ |
172 | static struct sh_timer_config cmt10_platform_data = { | 172 | static struct sh_timer_config cmt2_platform_data = { |
173 | .name = "CMT10", | 173 | .name = "CMT2", |
174 | .channel_offset = 0x10, | 174 | .channel_offset = 0x40, |
175 | .timer_bit = 0, | 175 | .timer_bit = 5, |
176 | .clockevent_rating = 125, | 176 | .clockevent_rating = 125, |
177 | .clocksource_rating = 125, | 177 | .clocksource_rating = 125, |
178 | }; | 178 | }; |
179 | 179 | ||
180 | static struct resource cmt10_resources[] = { | 180 | static struct resource cmt2_resources[] = { |
181 | [0] = { | 181 | [0] = { |
182 | .name = "CMT10", | 182 | .name = "CMT2", |
183 | .start = 0xe6138010, | 183 | .start = 0xe6130040, |
184 | .end = 0xe613801b, | 184 | .end = 0xe613004b, |
185 | .flags = IORESOURCE_MEM, | 185 | .flags = IORESOURCE_MEM, |
186 | }, | 186 | }, |
187 | [1] = { | 187 | [1] = { |
188 | .start = evt2irq(0x0b00), /* CMT1_CMT10 */ | 188 | .start = evt2irq(0x0b80), /* CMT2 */ |
189 | .flags = IORESOURCE_IRQ, | 189 | .flags = IORESOURCE_IRQ, |
190 | }, | 190 | }, |
191 | }; | 191 | }; |
192 | 192 | ||
193 | static struct platform_device cmt10_device = { | 193 | static struct platform_device cmt2_device = { |
194 | .name = "sh_cmt", | 194 | .name = "sh_cmt", |
195 | .id = 10, | 195 | .id = 2, |
196 | .dev = { | 196 | .dev = { |
197 | .platform_data = &cmt10_platform_data, | 197 | .platform_data = &cmt2_platform_data, |
198 | }, | 198 | }, |
199 | .resource = cmt10_resources, | 199 | .resource = cmt2_resources, |
200 | .num_resources = ARRAY_SIZE(cmt10_resources), | 200 | .num_resources = ARRAY_SIZE(cmt2_resources), |
201 | }; | 201 | }; |
202 | 202 | ||
203 | /* TMU */ | 203 | /* TMU */ |
@@ -602,6 +602,150 @@ static struct platform_device dma2_device = { | |||
602 | }, | 602 | }, |
603 | }; | 603 | }; |
604 | 604 | ||
605 | /* | ||
606 | * USB-DMAC | ||
607 | */ | ||
608 | |||
609 | unsigned int usbts_shift[] = {3, 4, 5}; | ||
610 | |||
611 | enum { | ||
612 | XMIT_SZ_8BYTE = 0, | ||
613 | XMIT_SZ_16BYTE = 1, | ||
614 | XMIT_SZ_32BYTE = 2, | ||
615 | }; | ||
616 | |||
617 | #define USBTS_INDEX2VAL(i) (((i) & 3) << 6) | ||
618 | |||
619 | static const struct sh_dmae_channel sh7372_usb_dmae_channels[] = { | ||
620 | { | ||
621 | .offset = 0, | ||
622 | }, { | ||
623 | .offset = 0x20, | ||
624 | }, | ||
625 | }; | ||
626 | |||
627 | /* USB DMAC0 */ | ||
628 | static const struct sh_dmae_slave_config sh7372_usb_dmae0_slaves[] = { | ||
629 | { | ||
630 | .slave_id = SHDMA_SLAVE_USB0_TX, | ||
631 | .chcr = USBTS_INDEX2VAL(XMIT_SZ_8BYTE), | ||
632 | }, { | ||
633 | .slave_id = SHDMA_SLAVE_USB0_RX, | ||
634 | .chcr = USBTS_INDEX2VAL(XMIT_SZ_8BYTE), | ||
635 | }, | ||
636 | }; | ||
637 | |||
638 | static struct sh_dmae_pdata usb_dma0_platform_data = { | ||
639 | .slave = sh7372_usb_dmae0_slaves, | ||
640 | .slave_num = ARRAY_SIZE(sh7372_usb_dmae0_slaves), | ||
641 | .channel = sh7372_usb_dmae_channels, | ||
642 | .channel_num = ARRAY_SIZE(sh7372_usb_dmae_channels), | ||
643 | .ts_low_shift = 6, | ||
644 | .ts_low_mask = 0xc0, | ||
645 | .ts_high_shift = 0, | ||
646 | .ts_high_mask = 0, | ||
647 | .ts_shift = usbts_shift, | ||
648 | .ts_shift_num = ARRAY_SIZE(usbts_shift), | ||
649 | .dmaor_init = DMAOR_DME, | ||
650 | .chcr_offset = 0x14, | ||
651 | .chcr_ie_bit = 1 << 5, | ||
652 | .dmaor_is_32bit = 1, | ||
653 | .needs_tend_set = 1, | ||
654 | .no_dmars = 1, | ||
655 | }; | ||
656 | |||
657 | static struct resource sh7372_usb_dmae0_resources[] = { | ||
658 | { | ||
659 | /* Channel registers and DMAOR */ | ||
660 | .start = 0xe68a0020, | ||
661 | .end = 0xe68a0064 - 1, | ||
662 | .flags = IORESOURCE_MEM, | ||
663 | }, | ||
664 | { | ||
665 | /* VCR/SWR/DMICR */ | ||
666 | .start = 0xe68a0000, | ||
667 | .end = 0xe68a0014 - 1, | ||
668 | .flags = IORESOURCE_MEM, | ||
669 | }, | ||
670 | { | ||
671 | /* IRQ for channels */ | ||
672 | .start = evt2irq(0x0a00), | ||
673 | .end = evt2irq(0x0a00), | ||
674 | .flags = IORESOURCE_IRQ, | ||
675 | }, | ||
676 | }; | ||
677 | |||
678 | static struct platform_device usb_dma0_device = { | ||
679 | .name = "sh-dma-engine", | ||
680 | .id = 3, | ||
681 | .resource = sh7372_usb_dmae0_resources, | ||
682 | .num_resources = ARRAY_SIZE(sh7372_usb_dmae0_resources), | ||
683 | .dev = { | ||
684 | .platform_data = &usb_dma0_platform_data, | ||
685 | }, | ||
686 | }; | ||
687 | |||
688 | /* USB DMAC1 */ | ||
689 | static const struct sh_dmae_slave_config sh7372_usb_dmae1_slaves[] = { | ||
690 | { | ||
691 | .slave_id = SHDMA_SLAVE_USB1_TX, | ||
692 | .chcr = USBTS_INDEX2VAL(XMIT_SZ_8BYTE), | ||
693 | }, { | ||
694 | .slave_id = SHDMA_SLAVE_USB1_RX, | ||
695 | .chcr = USBTS_INDEX2VAL(XMIT_SZ_8BYTE), | ||
696 | }, | ||
697 | }; | ||
698 | |||
699 | static struct sh_dmae_pdata usb_dma1_platform_data = { | ||
700 | .slave = sh7372_usb_dmae1_slaves, | ||
701 | .slave_num = ARRAY_SIZE(sh7372_usb_dmae1_slaves), | ||
702 | .channel = sh7372_usb_dmae_channels, | ||
703 | .channel_num = ARRAY_SIZE(sh7372_usb_dmae_channels), | ||
704 | .ts_low_shift = 6, | ||
705 | .ts_low_mask = 0xc0, | ||
706 | .ts_high_shift = 0, | ||
707 | .ts_high_mask = 0, | ||
708 | .ts_shift = usbts_shift, | ||
709 | .ts_shift_num = ARRAY_SIZE(usbts_shift), | ||
710 | .dmaor_init = DMAOR_DME, | ||
711 | .chcr_offset = 0x14, | ||
712 | .chcr_ie_bit = 1 << 5, | ||
713 | .dmaor_is_32bit = 1, | ||
714 | .needs_tend_set = 1, | ||
715 | .no_dmars = 1, | ||
716 | }; | ||
717 | |||
718 | static struct resource sh7372_usb_dmae1_resources[] = { | ||
719 | { | ||
720 | /* Channel registers and DMAOR */ | ||
721 | .start = 0xe68c0020, | ||
722 | .end = 0xe68c0064 - 1, | ||
723 | .flags = IORESOURCE_MEM, | ||
724 | }, | ||
725 | { | ||
726 | /* VCR/SWR/DMICR */ | ||
727 | .start = 0xe68c0000, | ||
728 | .end = 0xe68c0014 - 1, | ||
729 | .flags = IORESOURCE_MEM, | ||
730 | }, | ||
731 | { | ||
732 | /* IRQ for channels */ | ||
733 | .start = evt2irq(0x1d00), | ||
734 | .end = evt2irq(0x1d00), | ||
735 | .flags = IORESOURCE_IRQ, | ||
736 | }, | ||
737 | }; | ||
738 | |||
739 | static struct platform_device usb_dma1_device = { | ||
740 | .name = "sh-dma-engine", | ||
741 | .id = 4, | ||
742 | .resource = sh7372_usb_dmae1_resources, | ||
743 | .num_resources = ARRAY_SIZE(sh7372_usb_dmae1_resources), | ||
744 | .dev = { | ||
745 | .platform_data = &usb_dma1_platform_data, | ||
746 | }, | ||
747 | }; | ||
748 | |||
605 | /* VPU */ | 749 | /* VPU */ |
606 | static struct uio_info vpu_platform_data = { | 750 | static struct uio_info vpu_platform_data = { |
607 | .name = "VPU5HG", | 751 | .name = "VPU5HG", |
@@ -818,7 +962,7 @@ static struct platform_device *sh7372_early_devices[] __initdata = { | |||
818 | &scif4_device, | 962 | &scif4_device, |
819 | &scif5_device, | 963 | &scif5_device, |
820 | &scif6_device, | 964 | &scif6_device, |
821 | &cmt10_device, | 965 | &cmt2_device, |
822 | &tmu00_device, | 966 | &tmu00_device, |
823 | &tmu01_device, | 967 | &tmu01_device, |
824 | }; | 968 | }; |
@@ -829,6 +973,8 @@ static struct platform_device *sh7372_late_devices[] __initdata = { | |||
829 | &dma0_device, | 973 | &dma0_device, |
830 | &dma1_device, | 974 | &dma1_device, |
831 | &dma2_device, | 975 | &dma2_device, |
976 | &usb_dma0_device, | ||
977 | &usb_dma1_device, | ||
832 | &vpu_device, | 978 | &vpu_device, |
833 | &veu0_device, | 979 | &veu0_device, |
834 | &veu1_device, | 980 | &veu1_device, |
diff --git a/arch/arm/mach-vexpress/v2m.c b/arch/arm/mach-vexpress/v2m.c index 9e6b93b1a043..d0d267a8d3f9 100644 --- a/arch/arm/mach-vexpress/v2m.c +++ b/arch/arm/mach-vexpress/v2m.c | |||
@@ -318,6 +318,10 @@ static struct clk v2m_sp804_clk = { | |||
318 | .rate = 1000000, | 318 | .rate = 1000000, |
319 | }; | 319 | }; |
320 | 320 | ||
321 | static struct clk v2m_ref_clk = { | ||
322 | .rate = 32768, | ||
323 | }; | ||
324 | |||
321 | static struct clk dummy_apb_pclk; | 325 | static struct clk dummy_apb_pclk; |
322 | 326 | ||
323 | static struct clk_lookup v2m_lookups[] = { | 327 | static struct clk_lookup v2m_lookups[] = { |
@@ -348,6 +352,9 @@ static struct clk_lookup v2m_lookups[] = { | |||
348 | }, { /* CLCD */ | 352 | }, { /* CLCD */ |
349 | .dev_id = "mb:clcd", | 353 | .dev_id = "mb:clcd", |
350 | .clk = &osc1_clk, | 354 | .clk = &osc1_clk, |
355 | }, { /* SP805 WDT */ | ||
356 | .dev_id = "mb:wdt", | ||
357 | .clk = &v2m_ref_clk, | ||
351 | }, { /* SP804 timers */ | 358 | }, { /* SP804 timers */ |
352 | .dev_id = "sp804", | 359 | .dev_id = "sp804", |
353 | .con_id = "v2m-timer0", | 360 | .con_id = "v2m-timer0", |
diff --git a/arch/arm/mm/abort-macro.S b/arch/arm/mm/abort-macro.S index 52162d59407a..2cbf68ef0e83 100644 --- a/arch/arm/mm/abort-macro.S +++ b/arch/arm/mm/abort-macro.S | |||
@@ -17,7 +17,7 @@ | |||
17 | cmp \tmp, # 0x5600 @ Is it ldrsb? | 17 | cmp \tmp, # 0x5600 @ Is it ldrsb? |
18 | orreq \tmp, \tmp, #1 << 11 @ Set L-bit if yes | 18 | orreq \tmp, \tmp, #1 << 11 @ Set L-bit if yes |
19 | tst \tmp, #1 << 11 @ L = 0 -> write | 19 | tst \tmp, #1 << 11 @ L = 0 -> write |
20 | orreq \psr, \psr, #1 << 11 @ yes. | 20 | orreq \fsr, \fsr, #1 << 11 @ yes. |
21 | b do_DataAbort | 21 | b do_DataAbort |
22 | not_thumb: | 22 | not_thumb: |
23 | .endm | 23 | .endm |
diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c index 44c086710d2b..9ecfdb511951 100644 --- a/arch/arm/mm/cache-l2x0.c +++ b/arch/arm/mm/cache-l2x0.c | |||
@@ -277,6 +277,25 @@ static void l2x0_disable(void) | |||
277 | spin_unlock_irqrestore(&l2x0_lock, flags); | 277 | spin_unlock_irqrestore(&l2x0_lock, flags); |
278 | } | 278 | } |
279 | 279 | ||
280 | static void __init l2x0_unlock(__u32 cache_id) | ||
281 | { | ||
282 | int lockregs; | ||
283 | int i; | ||
284 | |||
285 | if (cache_id == L2X0_CACHE_ID_PART_L310) | ||
286 | lockregs = 8; | ||
287 | else | ||
288 | /* L210 and unknown types */ | ||
289 | lockregs = 1; | ||
290 | |||
291 | for (i = 0; i < lockregs; i++) { | ||
292 | writel_relaxed(0x0, l2x0_base + L2X0_LOCKDOWN_WAY_D_BASE + | ||
293 | i * L2X0_LOCKDOWN_STRIDE); | ||
294 | writel_relaxed(0x0, l2x0_base + L2X0_LOCKDOWN_WAY_I_BASE + | ||
295 | i * L2X0_LOCKDOWN_STRIDE); | ||
296 | } | ||
297 | } | ||
298 | |||
280 | void __init l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask) | 299 | void __init l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask) |
281 | { | 300 | { |
282 | __u32 aux; | 301 | __u32 aux; |
@@ -328,6 +347,8 @@ void __init l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask) | |||
328 | * accessing the below registers will fault. | 347 | * accessing the below registers will fault. |
329 | */ | 348 | */ |
330 | if (!(readl_relaxed(l2x0_base + L2X0_CTRL) & 1)) { | 349 | if (!(readl_relaxed(l2x0_base + L2X0_CTRL) & 1)) { |
350 | /* Make sure that I&D is not locked down when starting */ | ||
351 | l2x0_unlock(cache_id); | ||
331 | 352 | ||
332 | /* l2x0 controller is disabled */ | 353 | /* l2x0 controller is disabled */ |
333 | writel_relaxed(aux, l2x0_base + L2X0_AUX_CTRL); | 354 | writel_relaxed(aux, l2x0_base + L2X0_AUX_CTRL); |
diff --git a/arch/arm/mm/cache-v7.S b/arch/arm/mm/cache-v7.S index 3b24bfa3b828..07c4bc8ea0a4 100644 --- a/arch/arm/mm/cache-v7.S +++ b/arch/arm/mm/cache-v7.S | |||
@@ -174,6 +174,10 @@ ENTRY(v7_coherent_user_range) | |||
174 | dcache_line_size r2, r3 | 174 | dcache_line_size r2, r3 |
175 | sub r3, r2, #1 | 175 | sub r3, r2, #1 |
176 | bic r12, r0, r3 | 176 | bic r12, r0, r3 |
177 | #ifdef CONFIG_ARM_ERRATA_764369 | ||
178 | ALT_SMP(W(dsb)) | ||
179 | ALT_UP(W(nop)) | ||
180 | #endif | ||
177 | 1: | 181 | 1: |
178 | USER( mcr p15, 0, r12, c7, c11, 1 ) @ clean D line to the point of unification | 182 | USER( mcr p15, 0, r12, c7, c11, 1 ) @ clean D line to the point of unification |
179 | add r12, r12, r2 | 183 | add r12, r12, r2 |
@@ -223,6 +227,10 @@ ENTRY(v7_flush_kern_dcache_area) | |||
223 | add r1, r0, r1 | 227 | add r1, r0, r1 |
224 | sub r3, r2, #1 | 228 | sub r3, r2, #1 |
225 | bic r0, r0, r3 | 229 | bic r0, r0, r3 |
230 | #ifdef CONFIG_ARM_ERRATA_764369 | ||
231 | ALT_SMP(W(dsb)) | ||
232 | ALT_UP(W(nop)) | ||
233 | #endif | ||
226 | 1: | 234 | 1: |
227 | mcr p15, 0, r0, c7, c14, 1 @ clean & invalidate D line / unified line | 235 | mcr p15, 0, r0, c7, c14, 1 @ clean & invalidate D line / unified line |
228 | add r0, r0, r2 | 236 | add r0, r0, r2 |
@@ -247,6 +255,10 @@ v7_dma_inv_range: | |||
247 | sub r3, r2, #1 | 255 | sub r3, r2, #1 |
248 | tst r0, r3 | 256 | tst r0, r3 |
249 | bic r0, r0, r3 | 257 | bic r0, r0, r3 |
258 | #ifdef CONFIG_ARM_ERRATA_764369 | ||
259 | ALT_SMP(W(dsb)) | ||
260 | ALT_UP(W(nop)) | ||
261 | #endif | ||
250 | mcrne p15, 0, r0, c7, c14, 1 @ clean & invalidate D / U line | 262 | mcrne p15, 0, r0, c7, c14, 1 @ clean & invalidate D / U line |
251 | 263 | ||
252 | tst r1, r3 | 264 | tst r1, r3 |
@@ -270,6 +282,10 @@ v7_dma_clean_range: | |||
270 | dcache_line_size r2, r3 | 282 | dcache_line_size r2, r3 |
271 | sub r3, r2, #1 | 283 | sub r3, r2, #1 |
272 | bic r0, r0, r3 | 284 | bic r0, r0, r3 |
285 | #ifdef CONFIG_ARM_ERRATA_764369 | ||
286 | ALT_SMP(W(dsb)) | ||
287 | ALT_UP(W(nop)) | ||
288 | #endif | ||
273 | 1: | 289 | 1: |
274 | mcr p15, 0, r0, c7, c10, 1 @ clean D / U line | 290 | mcr p15, 0, r0, c7, c10, 1 @ clean D / U line |
275 | add r0, r0, r2 | 291 | add r0, r0, r2 |
@@ -288,6 +304,10 @@ ENTRY(v7_dma_flush_range) | |||
288 | dcache_line_size r2, r3 | 304 | dcache_line_size r2, r3 |
289 | sub r3, r2, #1 | 305 | sub r3, r2, #1 |
290 | bic r0, r0, r3 | 306 | bic r0, r0, r3 |
307 | #ifdef CONFIG_ARM_ERRATA_764369 | ||
308 | ALT_SMP(W(dsb)) | ||
309 | ALT_UP(W(nop)) | ||
310 | #endif | ||
291 | 1: | 311 | 1: |
292 | mcr p15, 0, r0, c7, c14, 1 @ clean & invalidate D / U line | 312 | mcr p15, 0, r0, c7, c14, 1 @ clean & invalidate D / U line |
293 | add r0, r0, r2 | 313 | add r0, r0, r2 |
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index 0a0a1e7c20d2..c3ff82f92d9c 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c | |||
@@ -324,6 +324,8 @@ __dma_alloc(struct device *dev, size_t size, dma_addr_t *handle, gfp_t gfp, | |||
324 | 324 | ||
325 | if (addr) | 325 | if (addr) |
326 | *handle = pfn_to_dma(dev, page_to_pfn(page)); | 326 | *handle = pfn_to_dma(dev, page_to_pfn(page)); |
327 | else | ||
328 | __dma_free_buffer(page, size); | ||
327 | 329 | ||
328 | return addr; | 330 | return addr; |
329 | } | 331 | } |
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index 91bca355cd31..cc7e2d8be9aa 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c | |||
@@ -298,7 +298,7 @@ static void __init arm_bootmem_free(unsigned long min, unsigned long max_low, | |||
298 | #ifdef CONFIG_HAVE_ARCH_PFN_VALID | 298 | #ifdef CONFIG_HAVE_ARCH_PFN_VALID |
299 | int pfn_valid(unsigned long pfn) | 299 | int pfn_valid(unsigned long pfn) |
300 | { | 300 | { |
301 | return memblock_is_memory(pfn << PAGE_SHIFT); | 301 | return memblock_is_memory(__pfn_to_phys(pfn)); |
302 | } | 302 | } |
303 | EXPORT_SYMBOL(pfn_valid); | 303 | EXPORT_SYMBOL(pfn_valid); |
304 | #endif | 304 | #endif |
diff --git a/arch/arm/mm/proc-arm920.S b/arch/arm/mm/proc-arm920.S index 92bd102e3982..2e6849b41f66 100644 --- a/arch/arm/mm/proc-arm920.S +++ b/arch/arm/mm/proc-arm920.S | |||
@@ -379,7 +379,7 @@ ENTRY(cpu_arm920_set_pte_ext) | |||
379 | 379 | ||
380 | /* Suspend/resume support: taken from arch/arm/plat-s3c24xx/sleep.S */ | 380 | /* Suspend/resume support: taken from arch/arm/plat-s3c24xx/sleep.S */ |
381 | .globl cpu_arm920_suspend_size | 381 | .globl cpu_arm920_suspend_size |
382 | .equ cpu_arm920_suspend_size, 4 * 3 | 382 | .equ cpu_arm920_suspend_size, 4 * 4 |
383 | #ifdef CONFIG_PM_SLEEP | 383 | #ifdef CONFIG_PM_SLEEP |
384 | ENTRY(cpu_arm920_do_suspend) | 384 | ENTRY(cpu_arm920_do_suspend) |
385 | stmfd sp!, {r4 - r7, lr} | 385 | stmfd sp!, {r4 - r7, lr} |
diff --git a/arch/arm/mm/proc-arm926.S b/arch/arm/mm/proc-arm926.S index 2bbcf053dffd..cd8f79c3a282 100644 --- a/arch/arm/mm/proc-arm926.S +++ b/arch/arm/mm/proc-arm926.S | |||
@@ -394,7 +394,7 @@ ENTRY(cpu_arm926_set_pte_ext) | |||
394 | 394 | ||
395 | /* Suspend/resume support: taken from arch/arm/plat-s3c24xx/sleep.S */ | 395 | /* Suspend/resume support: taken from arch/arm/plat-s3c24xx/sleep.S */ |
396 | .globl cpu_arm926_suspend_size | 396 | .globl cpu_arm926_suspend_size |
397 | .equ cpu_arm926_suspend_size, 4 * 3 | 397 | .equ cpu_arm926_suspend_size, 4 * 4 |
398 | #ifdef CONFIG_PM_SLEEP | 398 | #ifdef CONFIG_PM_SLEEP |
399 | ENTRY(cpu_arm926_do_suspend) | 399 | ENTRY(cpu_arm926_do_suspend) |
400 | stmfd sp!, {r4 - r7, lr} | 400 | stmfd sp!, {r4 - r7, lr} |
diff --git a/arch/arm/mm/proc-sa1100.S b/arch/arm/mm/proc-sa1100.S index 07219c2ae114..69e7f2ef7384 100644 --- a/arch/arm/mm/proc-sa1100.S +++ b/arch/arm/mm/proc-sa1100.S | |||
@@ -182,11 +182,11 @@ ENDPROC(cpu_sa1100_do_suspend) | |||
182 | 182 | ||
183 | ENTRY(cpu_sa1100_do_resume) | 183 | ENTRY(cpu_sa1100_do_resume) |
184 | ldmia r0, {r4 - r7} @ load cp regs | 184 | ldmia r0, {r4 - r7} @ load cp regs |
185 | mov r1, #0 | 185 | mov ip, #0 |
186 | mcr p15, 0, r1, c8, c7, 0 @ flush I+D TLBs | 186 | mcr p15, 0, ip, c8, c7, 0 @ flush I+D TLBs |
187 | mcr p15, 0, r1, c7, c7, 0 @ flush I&D cache | 187 | mcr p15, 0, ip, c7, c7, 0 @ flush I&D cache |
188 | mcr p15, 0, r1, c9, c0, 0 @ invalidate RB | 188 | mcr p15, 0, ip, c9, c0, 0 @ invalidate RB |
189 | mcr p15, 0, r1, c9, c0, 5 @ allow user space to use RB | 189 | mcr p15, 0, ip, c9, c0, 5 @ allow user space to use RB |
190 | 190 | ||
191 | mcr p15, 0, r4, c3, c0, 0 @ domain ID | 191 | mcr p15, 0, r4, c3, c0, 0 @ domain ID |
192 | mcr p15, 0, r5, c2, c0, 0 @ translation table base addr | 192 | mcr p15, 0, r5, c2, c0, 0 @ translation table base addr |
diff --git a/arch/arm/mm/proc-v6.S b/arch/arm/mm/proc-v6.S index 219138d2f158..a923aa0fd00d 100644 --- a/arch/arm/mm/proc-v6.S +++ b/arch/arm/mm/proc-v6.S | |||
@@ -223,6 +223,22 @@ __v6_setup: | |||
223 | mrc p15, 0, r0, c1, c0, 0 @ read control register | 223 | mrc p15, 0, r0, c1, c0, 0 @ read control register |
224 | bic r0, r0, r5 @ clear bits them | 224 | bic r0, r0, r5 @ clear bits them |
225 | orr r0, r0, r6 @ set them | 225 | orr r0, r0, r6 @ set them |
226 | #ifdef CONFIG_ARM_ERRATA_364296 | ||
227 | /* | ||
228 | * Workaround for the 364296 ARM1136 r0p2 erratum (possible cache data | ||
229 | * corruption with hit-under-miss enabled). The conditional code below | ||
230 | * (setting the undocumented bit 31 in the auxiliary control register | ||
231 | * and the FI bit in the control register) disables hit-under-miss | ||
232 | * without putting the processor into full low interrupt latency mode. | ||
233 | */ | ||
234 | ldr r6, =0x4107b362 @ id for ARM1136 r0p2 | ||
235 | mrc p15, 0, r5, c0, c0, 0 @ get processor id | ||
236 | teq r5, r6 @ check for the faulty core | ||
237 | mrceq p15, 0, r5, c1, c0, 1 @ load aux control reg | ||
238 | orreq r5, r5, #(1 << 31) @ set the undocumented bit 31 | ||
239 | mcreq p15, 0, r5, c1, c0, 1 @ write aux control reg | ||
240 | orreq r0, r0, #(1 << 21) @ low interrupt latency configuration | ||
241 | #endif | ||
226 | mov pc, lr @ return to head.S:__ret | 242 | mov pc, lr @ return to head.S:__ret |
227 | 243 | ||
228 | /* | 244 | /* |
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S index a30e78542ccf..9049c0764db2 100644 --- a/arch/arm/mm/proc-v7.S +++ b/arch/arm/mm/proc-v7.S | |||
@@ -66,6 +66,7 @@ ENDPROC(cpu_v7_proc_fin) | |||
66 | ENTRY(cpu_v7_reset) | 66 | ENTRY(cpu_v7_reset) |
67 | mrc p15, 0, r1, c1, c0, 0 @ ctrl register | 67 | mrc p15, 0, r1, c1, c0, 0 @ ctrl register |
68 | bic r1, r1, #0x1 @ ...............m | 68 | bic r1, r1, #0x1 @ ...............m |
69 | THUMB( bic r1, r1, #1 << 30 ) @ SCTLR.TE (Thumb exceptions) | ||
69 | mcr p15, 0, r1, c1, c0, 0 @ disable MMU | 70 | mcr p15, 0, r1, c1, c0, 0 @ disable MMU |
70 | isb | 71 | isb |
71 | mov pc, r0 | 72 | mov pc, r0 |
@@ -247,13 +248,16 @@ ENTRY(cpu_v7_do_resume) | |||
247 | mcr p15, 0, r7, c2, c0, 0 @ TTB 0 | 248 | mcr p15, 0, r7, c2, c0, 0 @ TTB 0 |
248 | mcr p15, 0, r8, c2, c0, 1 @ TTB 1 | 249 | mcr p15, 0, r8, c2, c0, 1 @ TTB 1 |
249 | mcr p15, 0, ip, c2, c0, 2 @ TTB control register | 250 | mcr p15, 0, ip, c2, c0, 2 @ TTB control register |
250 | mcr p15, 0, r10, c1, c0, 1 @ Auxiliary control register | 251 | mrc p15, 0, r4, c1, c0, 1 @ Read Auxiliary control register |
252 | teq r4, r10 @ Is it already set? | ||
253 | mcrne p15, 0, r10, c1, c0, 1 @ No, so write it | ||
251 | mcr p15, 0, r11, c1, c0, 2 @ Co-processor access control | 254 | mcr p15, 0, r11, c1, c0, 2 @ Co-processor access control |
252 | ldr r4, =PRRR @ PRRR | 255 | ldr r4, =PRRR @ PRRR |
253 | ldr r5, =NMRR @ NMRR | 256 | ldr r5, =NMRR @ NMRR |
254 | mcr p15, 0, r4, c10, c2, 0 @ write PRRR | 257 | mcr p15, 0, r4, c10, c2, 0 @ write PRRR |
255 | mcr p15, 0, r5, c10, c2, 1 @ write NMRR | 258 | mcr p15, 0, r5, c10, c2, 1 @ write NMRR |
256 | isb | 259 | isb |
260 | dsb | ||
257 | mov r0, r9 @ control register | 261 | mov r0, r9 @ control register |
258 | mov r2, r7, lsr #14 @ get TTB0 base | 262 | mov r2, r7, lsr #14 @ get TTB0 base |
259 | mov r2, r2, lsl #14 | 263 | mov r2, r2, lsl #14 |
diff --git a/arch/arm/mm/proc-xsc3.S b/arch/arm/mm/proc-xsc3.S index 28c72a2006a1..755e1bf22681 100644 --- a/arch/arm/mm/proc-xsc3.S +++ b/arch/arm/mm/proc-xsc3.S | |||
@@ -406,7 +406,7 @@ ENTRY(cpu_xsc3_set_pte_ext) | |||
406 | .align | 406 | .align |
407 | 407 | ||
408 | .globl cpu_xsc3_suspend_size | 408 | .globl cpu_xsc3_suspend_size |
409 | .equ cpu_xsc3_suspend_size, 4 * 8 | 409 | .equ cpu_xsc3_suspend_size, 4 * 7 |
410 | #ifdef CONFIG_PM_SLEEP | 410 | #ifdef CONFIG_PM_SLEEP |
411 | ENTRY(cpu_xsc3_do_suspend) | 411 | ENTRY(cpu_xsc3_do_suspend) |
412 | stmfd sp!, {r4 - r10, lr} | 412 | stmfd sp!, {r4 - r10, lr} |
@@ -418,12 +418,12 @@ ENTRY(cpu_xsc3_do_suspend) | |||
418 | mrc p15, 0, r9, c1, c0, 1 @ auxiliary control reg | 418 | mrc p15, 0, r9, c1, c0, 1 @ auxiliary control reg |
419 | mrc p15, 0, r10, c1, c0, 0 @ control reg | 419 | mrc p15, 0, r10, c1, c0, 0 @ control reg |
420 | bic r4, r4, #2 @ clear frequency change bit | 420 | bic r4, r4, #2 @ clear frequency change bit |
421 | stmia r0, {r1, r4 - r10} @ store v:p offset + cp regs | 421 | stmia r0, {r4 - r10} @ store cp regs |
422 | ldmia sp!, {r4 - r10, pc} | 422 | ldmia sp!, {r4 - r10, pc} |
423 | ENDPROC(cpu_xsc3_do_suspend) | 423 | ENDPROC(cpu_xsc3_do_suspend) |
424 | 424 | ||
425 | ENTRY(cpu_xsc3_do_resume) | 425 | ENTRY(cpu_xsc3_do_resume) |
426 | ldmia r0, {r1, r4 - r10} @ load v:p offset + cp regs | 426 | ldmia r0, {r4 - r10} @ load cp regs |
427 | mov ip, #0 | 427 | mov ip, #0 |
428 | mcr p15, 0, ip, c7, c7, 0 @ invalidate I & D caches, BTB | 428 | mcr p15, 0, ip, c7, c7, 0 @ invalidate I & D caches, BTB |
429 | mcr p15, 0, ip, c7, c10, 4 @ drain write (&fill) buffer | 429 | mcr p15, 0, ip, c7, c10, 4 @ drain write (&fill) buffer |
diff --git a/arch/arm/plat-mxc/devices/Kconfig b/arch/arm/plat-mxc/devices/Kconfig index b0f74f70b25c..cb3e3eef55c0 100644 --- a/arch/arm/plat-mxc/devices/Kconfig +++ b/arch/arm/plat-mxc/devices/Kconfig | |||
@@ -79,3 +79,7 @@ config IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX | |||
79 | 79 | ||
80 | config IMX_HAVE_PLATFORM_SPI_IMX | 80 | config IMX_HAVE_PLATFORM_SPI_IMX |
81 | bool | 81 | bool |
82 | |||
83 | config IMX_HAVE_PLATFORM_AHCI | ||
84 | bool | ||
85 | default y if ARCH_MX53 | ||
diff --git a/arch/arm/plat-mxc/devices/Makefile b/arch/arm/plat-mxc/devices/Makefile index a093b454541d..c11ac8472beb 100644 --- a/arch/arm/plat-mxc/devices/Makefile +++ b/arch/arm/plat-mxc/devices/Makefile | |||
@@ -26,3 +26,4 @@ obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_RTC) += platform-mxc_rtc.o | |||
26 | obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_W1) += platform-mxc_w1.o | 26 | obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_W1) += platform-mxc_w1.o |
27 | obj-$(CONFIG_IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX) += platform-sdhci-esdhc-imx.o | 27 | obj-$(CONFIG_IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX) += platform-sdhci-esdhc-imx.o |
28 | obj-$(CONFIG_IMX_HAVE_PLATFORM_SPI_IMX) += platform-spi_imx.o | 28 | obj-$(CONFIG_IMX_HAVE_PLATFORM_SPI_IMX) += platform-spi_imx.o |
29 | obj-$(CONFIG_IMX_HAVE_PLATFORM_AHCI) += platform-ahci-imx.o | ||
diff --git a/arch/arm/plat-mxc/devices/platform-ahci-imx.c b/arch/arm/plat-mxc/devices/platform-ahci-imx.c new file mode 100644 index 000000000000..d8a56aee521b --- /dev/null +++ b/arch/arm/plat-mxc/devices/platform-ahci-imx.c | |||
@@ -0,0 +1,156 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2011 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | */ | ||
4 | |||
5 | /* | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | |||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | |||
16 | * You should have received a copy of the GNU General Public License along | ||
17 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
18 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
19 | */ | ||
20 | |||
21 | #include <linux/io.h> | ||
22 | #include <linux/clk.h> | ||
23 | #include <linux/err.h> | ||
24 | #include <linux/device.h> | ||
25 | #include <linux/dma-mapping.h> | ||
26 | #include <asm/sizes.h> | ||
27 | #include <mach/hardware.h> | ||
28 | #include <mach/devices-common.h> | ||
29 | |||
30 | #define imx_ahci_imx_data_entry_single(soc, _devid) \ | ||
31 | { \ | ||
32 | .devid = _devid, \ | ||
33 | .iobase = soc ## _SATA_BASE_ADDR, \ | ||
34 | .irq = soc ## _INT_SATA, \ | ||
35 | } | ||
36 | |||
37 | #ifdef CONFIG_SOC_IMX53 | ||
38 | const struct imx_ahci_imx_data imx53_ahci_imx_data __initconst = | ||
39 | imx_ahci_imx_data_entry_single(MX53, "imx53-ahci"); | ||
40 | #endif | ||
41 | |||
42 | enum { | ||
43 | HOST_CAP = 0x00, | ||
44 | HOST_CAP_SSS = (1 << 27), /* Staggered Spin-up */ | ||
45 | HOST_PORTS_IMPL = 0x0c, | ||
46 | HOST_TIMER1MS = 0xe0, /* Timer 1-ms */ | ||
47 | }; | ||
48 | |||
49 | static struct clk *sata_clk, *sata_ref_clk; | ||
50 | |||
51 | /* AHCI module Initialization, if return 0, initialization is successful. */ | ||
52 | static int imx_sata_init(struct device *dev, void __iomem *addr) | ||
53 | { | ||
54 | u32 tmpdata; | ||
55 | int ret = 0; | ||
56 | struct clk *clk; | ||
57 | |||
58 | sata_clk = clk_get(dev, "ahci"); | ||
59 | if (IS_ERR(sata_clk)) { | ||
60 | dev_err(dev, "no sata clock.\n"); | ||
61 | return PTR_ERR(sata_clk); | ||
62 | } | ||
63 | ret = clk_enable(sata_clk); | ||
64 | if (ret) { | ||
65 | dev_err(dev, "can't enable sata clock.\n"); | ||
66 | goto put_sata_clk; | ||
67 | } | ||
68 | |||
69 | /* Get the AHCI SATA PHY CLK */ | ||
70 | sata_ref_clk = clk_get(dev, "ahci_phy"); | ||
71 | if (IS_ERR(sata_ref_clk)) { | ||
72 | dev_err(dev, "no sata ref clock.\n"); | ||
73 | ret = PTR_ERR(sata_ref_clk); | ||
74 | goto release_sata_clk; | ||
75 | } | ||
76 | ret = clk_enable(sata_ref_clk); | ||
77 | if (ret) { | ||
78 | dev_err(dev, "can't enable sata ref clock.\n"); | ||
79 | goto put_sata_ref_clk; | ||
80 | } | ||
81 | |||
82 | /* Get the AHB clock rate, and configure the TIMER1MS reg later */ | ||
83 | clk = clk_get(dev, "ahci_dma"); | ||
84 | if (IS_ERR(clk)) { | ||
85 | dev_err(dev, "no dma clock.\n"); | ||
86 | ret = PTR_ERR(clk); | ||
87 | goto release_sata_ref_clk; | ||
88 | } | ||
89 | tmpdata = clk_get_rate(clk) / 1000; | ||
90 | clk_put(clk); | ||
91 | |||
92 | writel(tmpdata, addr + HOST_TIMER1MS); | ||
93 | |||
94 | tmpdata = readl(addr + HOST_CAP); | ||
95 | if (!(tmpdata & HOST_CAP_SSS)) { | ||
96 | tmpdata |= HOST_CAP_SSS; | ||
97 | writel(tmpdata, addr + HOST_CAP); | ||
98 | } | ||
99 | |||
100 | if (!(readl(addr + HOST_PORTS_IMPL) & 0x1)) | ||
101 | writel((readl(addr + HOST_PORTS_IMPL) | 0x1), | ||
102 | addr + HOST_PORTS_IMPL); | ||
103 | |||
104 | return 0; | ||
105 | |||
106 | release_sata_ref_clk: | ||
107 | clk_disable(sata_ref_clk); | ||
108 | put_sata_ref_clk: | ||
109 | clk_put(sata_ref_clk); | ||
110 | release_sata_clk: | ||
111 | clk_disable(sata_clk); | ||
112 | put_sata_clk: | ||
113 | clk_put(sata_clk); | ||
114 | |||
115 | return ret; | ||
116 | } | ||
117 | |||
118 | static void imx_sata_exit(struct device *dev) | ||
119 | { | ||
120 | clk_disable(sata_ref_clk); | ||
121 | clk_put(sata_ref_clk); | ||
122 | |||
123 | clk_disable(sata_clk); | ||
124 | clk_put(sata_clk); | ||
125 | |||
126 | } | ||
127 | struct platform_device *__init imx_add_ahci_imx( | ||
128 | const struct imx_ahci_imx_data *data, | ||
129 | const struct ahci_platform_data *pdata) | ||
130 | { | ||
131 | struct resource res[] = { | ||
132 | { | ||
133 | .start = data->iobase, | ||
134 | .end = data->iobase + SZ_4K - 1, | ||
135 | .flags = IORESOURCE_MEM, | ||
136 | }, { | ||
137 | .start = data->irq, | ||
138 | .end = data->irq, | ||
139 | .flags = IORESOURCE_IRQ, | ||
140 | }, | ||
141 | }; | ||
142 | |||
143 | return imx_add_platform_device_dmamask(data->devid, 0, | ||
144 | res, ARRAY_SIZE(res), | ||
145 | pdata, sizeof(*pdata), DMA_BIT_MASK(32)); | ||
146 | } | ||
147 | |||
148 | struct platform_device *__init imx53_add_ahci_imx(void) | ||
149 | { | ||
150 | struct ahci_platform_data pdata = { | ||
151 | .init = imx_sata_init, | ||
152 | .exit = imx_sata_exit, | ||
153 | }; | ||
154 | |||
155 | return imx_add_ahci_imx(&imx53_ahci_imx_data, &pdata); | ||
156 | } | ||
diff --git a/arch/arm/plat-mxc/include/mach/devices-common.h b/arch/arm/plat-mxc/include/mach/devices-common.h index 4cbad45edc15..117a381fe3d5 100644 --- a/arch/arm/plat-mxc/include/mach/devices-common.h +++ b/arch/arm/plat-mxc/include/mach/devices-common.h | |||
@@ -309,3 +309,13 @@ struct platform_device *__init imx_add_spi_imx( | |||
309 | struct platform_device *imx_add_imx_dma(void); | 309 | struct platform_device *imx_add_imx_dma(void); |
310 | struct platform_device *imx_add_imx_sdma(char *name, | 310 | struct platform_device *imx_add_imx_sdma(char *name, |
311 | resource_size_t iobase, int irq, struct sdma_platform_data *pdata); | 311 | resource_size_t iobase, int irq, struct sdma_platform_data *pdata); |
312 | |||
313 | #include <linux/ahci_platform.h> | ||
314 | struct imx_ahci_imx_data { | ||
315 | const char *devid; | ||
316 | resource_size_t iobase; | ||
317 | resource_size_t irq; | ||
318 | }; | ||
319 | struct platform_device *__init imx_add_ahci_imx( | ||
320 | const struct imx_ahci_imx_data *data, | ||
321 | const struct ahci_platform_data *pdata); | ||
diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c index b6b409744954..02609eee0562 100644 --- a/arch/arm/plat-omap/omap_device.c +++ b/arch/arm/plat-omap/omap_device.c | |||
@@ -615,6 +615,9 @@ static int _od_resume_noirq(struct device *dev) | |||
615 | 615 | ||
616 | return pm_generic_resume_noirq(dev); | 616 | return pm_generic_resume_noirq(dev); |
617 | } | 617 | } |
618 | #else | ||
619 | #define _od_suspend_noirq NULL | ||
620 | #define _od_resume_noirq NULL | ||
618 | #endif | 621 | #endif |
619 | 622 | ||
620 | static struct dev_pm_domain omap_device_pm_domain = { | 623 | static struct dev_pm_domain omap_device_pm_domain = { |
@@ -622,7 +625,8 @@ static struct dev_pm_domain omap_device_pm_domain = { | |||
622 | SET_RUNTIME_PM_OPS(_od_runtime_suspend, _od_runtime_resume, | 625 | SET_RUNTIME_PM_OPS(_od_runtime_suspend, _od_runtime_resume, |
623 | _od_runtime_idle) | 626 | _od_runtime_idle) |
624 | USE_PLATFORM_PM_SLEEP_OPS | 627 | USE_PLATFORM_PM_SLEEP_OPS |
625 | SET_SYSTEM_SLEEP_PM_OPS(_od_suspend_noirq, _od_resume_noirq) | 628 | .suspend_noirq = _od_suspend_noirq, |
629 | .resume_noirq = _od_resume_noirq, | ||
626 | } | 630 | } |
627 | }; | 631 | }; |
628 | 632 | ||
diff --git a/arch/arm/plat-s5p/clock.c b/arch/arm/plat-s5p/clock.c index 02af235298e2..5f84a3f13ef9 100644 --- a/arch/arm/plat-s5p/clock.c +++ b/arch/arm/plat-s5p/clock.c | |||
@@ -192,7 +192,7 @@ unsigned long s5p_spdif_get_rate(struct clk *clk) | |||
192 | if (IS_ERR(pclk)) | 192 | if (IS_ERR(pclk)) |
193 | return -EINVAL; | 193 | return -EINVAL; |
194 | 194 | ||
195 | rate = pclk->ops->get_rate(clk); | 195 | rate = pclk->ops->get_rate(pclk); |
196 | clk_put(pclk); | 196 | clk_put(pclk); |
197 | 197 | ||
198 | return rate; | 198 | return rate; |
diff --git a/arch/arm/plat-s5p/irq-gpioint.c b/arch/arm/plat-s5p/irq-gpioint.c index 327ab9f662e8..f88216d23991 100644 --- a/arch/arm/plat-s5p/irq-gpioint.c +++ b/arch/arm/plat-s5p/irq-gpioint.c | |||
@@ -23,6 +23,8 @@ | |||
23 | #include <plat/gpio-core.h> | 23 | #include <plat/gpio-core.h> |
24 | #include <plat/gpio-cfg.h> | 24 | #include <plat/gpio-cfg.h> |
25 | 25 | ||
26 | #include <asm/mach/irq.h> | ||
27 | |||
26 | #define GPIO_BASE(chip) (((unsigned long)(chip)->base) & 0xFFFFF000u) | 28 | #define GPIO_BASE(chip) (((unsigned long)(chip)->base) & 0xFFFFF000u) |
27 | 29 | ||
28 | #define CON_OFFSET 0x700 | 30 | #define CON_OFFSET 0x700 |
@@ -81,6 +83,9 @@ static void s5p_gpioint_handler(unsigned int irq, struct irq_desc *desc) | |||
81 | int group, pend_offset, mask_offset; | 83 | int group, pend_offset, mask_offset; |
82 | unsigned int pend, mask; | 84 | unsigned int pend, mask; |
83 | 85 | ||
86 | struct irq_chip *chip = irq_get_chip(irq); | ||
87 | chained_irq_enter(chip, desc); | ||
88 | |||
84 | for (group = 0; group < bank->nr_groups; group++) { | 89 | for (group = 0; group < bank->nr_groups; group++) { |
85 | struct s3c_gpio_chip *chip = bank->chips[group]; | 90 | struct s3c_gpio_chip *chip = bank->chips[group]; |
86 | if (!chip) | 91 | if (!chip) |
@@ -102,23 +107,25 @@ static void s5p_gpioint_handler(unsigned int irq, struct irq_desc *desc) | |||
102 | pend &= ~BIT(offset); | 107 | pend &= ~BIT(offset); |
103 | } | 108 | } |
104 | } | 109 | } |
110 | chained_irq_exit(chip, desc); | ||
105 | } | 111 | } |
106 | 112 | ||
107 | static __init int s5p_gpioint_add(struct s3c_gpio_chip *chip) | 113 | static __init int s5p_gpioint_add(struct s3c_gpio_chip *chip) |
108 | { | 114 | { |
109 | static int used_gpioint_groups = 0; | 115 | static int used_gpioint_groups = 0; |
110 | int group = chip->group; | 116 | int group = chip->group; |
111 | struct s5p_gpioint_bank *bank = NULL; | 117 | struct s5p_gpioint_bank *b, *bank = NULL; |
112 | struct irq_chip_generic *gc; | 118 | struct irq_chip_generic *gc; |
113 | struct irq_chip_type *ct; | 119 | struct irq_chip_type *ct; |
114 | 120 | ||
115 | if (used_gpioint_groups >= S5P_GPIOINT_GROUP_COUNT) | 121 | if (used_gpioint_groups >= S5P_GPIOINT_GROUP_COUNT) |
116 | return -ENOMEM; | 122 | return -ENOMEM; |
117 | 123 | ||
118 | list_for_each_entry(bank, &banks, list) { | 124 | list_for_each_entry(b, &banks, list) { |
119 | if (group >= bank->start && | 125 | if (group >= b->start && group < b->start + b->nr_groups) { |
120 | group < bank->start + bank->nr_groups) | 126 | bank = b; |
121 | break; | 127 | break; |
128 | } | ||
122 | } | 129 | } |
123 | if (!bank) | 130 | if (!bank) |
124 | return -EINVAL; | 131 | return -EINVAL; |
diff --git a/arch/arm/plat-samsung/clock.c b/arch/arm/plat-samsung/clock.c index 302c42670bd1..3b4451979d1b 100644 --- a/arch/arm/plat-samsung/clock.c +++ b/arch/arm/plat-samsung/clock.c | |||
@@ -64,6 +64,17 @@ static LIST_HEAD(clocks); | |||
64 | */ | 64 | */ |
65 | DEFINE_SPINLOCK(clocks_lock); | 65 | DEFINE_SPINLOCK(clocks_lock); |
66 | 66 | ||
67 | /* Global watchdog clock used by arch_wtd_reset() callback */ | ||
68 | struct clk *s3c2410_wdtclk; | ||
69 | static int __init s3c_wdt_reset_init(void) | ||
70 | { | ||
71 | s3c2410_wdtclk = clk_get(NULL, "watchdog"); | ||
72 | if (IS_ERR(s3c2410_wdtclk)) | ||
73 | printk(KERN_WARNING "%s: warning: cannot get watchdog clock\n", __func__); | ||
74 | return 0; | ||
75 | } | ||
76 | arch_initcall(s3c_wdt_reset_init); | ||
77 | |||
67 | /* enable and disable calls for use with the clk struct */ | 78 | /* enable and disable calls for use with the clk struct */ |
68 | 79 | ||
69 | static int clk_null_enable(struct clk *clk, int enable) | 80 | static int clk_null_enable(struct clk *clk, int enable) |
diff --git a/arch/arm/plat-samsung/include/plat/backlight.h b/arch/arm/plat-samsung/include/plat/backlight.h index 51d8da846a62..ad530c78fe8c 100644 --- a/arch/arm/plat-samsung/include/plat/backlight.h +++ b/arch/arm/plat-samsung/include/plat/backlight.h | |||
@@ -20,7 +20,7 @@ struct samsung_bl_gpio_info { | |||
20 | int func; | 20 | int func; |
21 | }; | 21 | }; |
22 | 22 | ||
23 | extern void samsung_bl_set(struct samsung_bl_gpio_info *gpio_info, | 23 | extern void __init samsung_bl_set(struct samsung_bl_gpio_info *gpio_info, |
24 | struct platform_pwm_backlight_data *bl_data); | 24 | struct platform_pwm_backlight_data *bl_data); |
25 | 25 | ||
26 | #endif /* __ASM_PLAT_BACKLIGHT_H */ | 26 | #endif /* __ASM_PLAT_BACKLIGHT_H */ |
diff --git a/arch/arm/plat-samsung/include/plat/clock.h b/arch/arm/plat-samsung/include/plat/clock.h index 87d5b38a86fb..73c66d4d10fa 100644 --- a/arch/arm/plat-samsung/include/plat/clock.h +++ b/arch/arm/plat-samsung/include/plat/clock.h | |||
@@ -9,6 +9,9 @@ | |||
9 | * published by the Free Software Foundation. | 9 | * published by the Free Software Foundation. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #ifndef __ASM_PLAT_CLOCK_H | ||
13 | #define __ASM_PLAT_CLOCK_H __FILE__ | ||
14 | |||
12 | #include <linux/spinlock.h> | 15 | #include <linux/spinlock.h> |
13 | #include <linux/clkdev.h> | 16 | #include <linux/clkdev.h> |
14 | 17 | ||
@@ -121,3 +124,8 @@ extern int s3c64xx_sclk_ctrl(struct clk *clk, int enable); | |||
121 | 124 | ||
122 | extern void s3c_pwmclk_init(void); | 125 | extern void s3c_pwmclk_init(void); |
123 | 126 | ||
127 | /* Global watchdog clock used by arch_wtd_reset() callback */ | ||
128 | |||
129 | extern struct clk *s3c2410_wdtclk; | ||
130 | |||
131 | #endif /* __ASM_PLAT_CLOCK_H */ | ||
diff --git a/arch/arm/plat-samsung/include/plat/watchdog-reset.h b/arch/arm/plat-samsung/include/plat/watchdog-reset.h index 54b762acb5a0..40dbb2b0ae22 100644 --- a/arch/arm/plat-samsung/include/plat/watchdog-reset.h +++ b/arch/arm/plat-samsung/include/plat/watchdog-reset.h | |||
@@ -10,6 +10,7 @@ | |||
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <plat/clock.h> | ||
13 | #include <plat/regs-watchdog.h> | 14 | #include <plat/regs-watchdog.h> |
14 | #include <mach/map.h> | 15 | #include <mach/map.h> |
15 | 16 | ||
@@ -19,17 +20,12 @@ | |||
19 | 20 | ||
20 | static inline void arch_wdt_reset(void) | 21 | static inline void arch_wdt_reset(void) |
21 | { | 22 | { |
22 | struct clk *wdtclk; | ||
23 | |||
24 | printk("arch_reset: attempting watchdog reset\n"); | 23 | printk("arch_reset: attempting watchdog reset\n"); |
25 | 24 | ||
26 | __raw_writel(0, S3C2410_WTCON); /* disable watchdog, to be safe */ | 25 | __raw_writel(0, S3C2410_WTCON); /* disable watchdog, to be safe */ |
27 | 26 | ||
28 | wdtclk = clk_get(NULL, "watchdog"); | 27 | if (s3c2410_wdtclk) |
29 | if (!IS_ERR(wdtclk)) { | 28 | clk_enable(s3c2410_wdtclk); |
30 | clk_enable(wdtclk); | ||
31 | } else | ||
32 | printk(KERN_WARNING "%s: warning: cannot get watchdog clock\n", __func__); | ||
33 | 29 | ||
34 | /* put initial values into count and data */ | 30 | /* put initial values into count and data */ |
35 | __raw_writel(0x80, S3C2410_WTCNT); | 31 | __raw_writel(0x80, S3C2410_WTCNT); |
diff --git a/arch/arm/plat-samsung/irq-vic-timer.c b/arch/arm/plat-samsung/irq-vic-timer.c index f714d060370d..51583cd30164 100644 --- a/arch/arm/plat-samsung/irq-vic-timer.c +++ b/arch/arm/plat-samsung/irq-vic-timer.c | |||
@@ -22,9 +22,14 @@ | |||
22 | #include <plat/irq-vic-timer.h> | 22 | #include <plat/irq-vic-timer.h> |
23 | #include <plat/regs-timer.h> | 23 | #include <plat/regs-timer.h> |
24 | 24 | ||
25 | #include <asm/mach/irq.h> | ||
26 | |||
25 | static void s3c_irq_demux_vic_timer(unsigned int irq, struct irq_desc *desc) | 27 | static void s3c_irq_demux_vic_timer(unsigned int irq, struct irq_desc *desc) |
26 | { | 28 | { |
29 | struct irq_chip *chip = irq_get_chip(irq); | ||
30 | chained_irq_enter(chip, desc); | ||
27 | generic_handle_irq((int)desc->irq_data.handler_data); | 31 | generic_handle_irq((int)desc->irq_data.handler_data); |
32 | chained_irq_exit(chip, desc); | ||
28 | } | 33 | } |
29 | 34 | ||
30 | /* We assume the IRQ_TIMER0..IRQ_TIMER4 range is continuous. */ | 35 | /* We assume the IRQ_TIMER0..IRQ_TIMER4 range is continuous. */ |
diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types index fff68d0d521b..62cc8f981171 100644 --- a/arch/arm/tools/mach-types +++ b/arch/arm/tools/mach-types | |||
@@ -351,7 +351,7 @@ centro MACH_CENTRO CENTRO 1944 | |||
351 | nokia_rx51 MACH_NOKIA_RX51 NOKIA_RX51 1955 | 351 | nokia_rx51 MACH_NOKIA_RX51 NOKIA_RX51 1955 |
352 | omap_zoom2 MACH_OMAP_ZOOM2 OMAP_ZOOM2 1967 | 352 | omap_zoom2 MACH_OMAP_ZOOM2 OMAP_ZOOM2 1967 |
353 | cpuat9260 MACH_CPUAT9260 CPUAT9260 1973 | 353 | cpuat9260 MACH_CPUAT9260 CPUAT9260 1973 |
354 | eukrea_cpuimx27 MACH_CPUIMX27 CPUIMX27 1975 | 354 | eukrea_cpuimx27 MACH_EUKREA_CPUIMX27 EUKREA_CPUIMX27 1975 |
355 | acs5k MACH_ACS5K ACS5K 1982 | 355 | acs5k MACH_ACS5K ACS5K 1982 |
356 | snapper_9260 MACH_SNAPPER_9260 SNAPPER_9260 1987 | 356 | snapper_9260 MACH_SNAPPER_9260 SNAPPER_9260 1987 |
357 | dsm320 MACH_DSM320 DSM320 1988 | 357 | dsm320 MACH_DSM320 DSM320 1988 |
@@ -476,8 +476,8 @@ cns3420vb MACH_CNS3420VB CNS3420VB 2776 | |||
476 | omap4_panda MACH_OMAP4_PANDA OMAP4_PANDA 2791 | 476 | omap4_panda MACH_OMAP4_PANDA OMAP4_PANDA 2791 |
477 | ti8168evm MACH_TI8168EVM TI8168EVM 2800 | 477 | ti8168evm MACH_TI8168EVM TI8168EVM 2800 |
478 | teton_bga MACH_TETON_BGA TETON_BGA 2816 | 478 | teton_bga MACH_TETON_BGA TETON_BGA 2816 |
479 | eukrea_cpuimx25sd MACH_EUKREA_CPUIMX25 EUKREA_CPUIMX25 2820 | 479 | eukrea_cpuimx25sd MACH_EUKREA_CPUIMX25SD EUKREA_CPUIMX25SD 2820 |
480 | eukrea_cpuimx35sd MACH_EUKREA_CPUIMX35 EUKREA_CPUIMX35 2821 | 480 | eukrea_cpuimx35sd MACH_EUKREA_CPUIMX35SD EUKREA_CPUIMX35SD 2821 |
481 | eukrea_cpuimx51sd MACH_EUKREA_CPUIMX51SD EUKREA_CPUIMX51SD 2822 | 481 | eukrea_cpuimx51sd MACH_EUKREA_CPUIMX51SD EUKREA_CPUIMX51SD 2822 |
482 | eukrea_cpuimx51 MACH_EUKREA_CPUIMX51 EUKREA_CPUIMX51 2823 | 482 | eukrea_cpuimx51 MACH_EUKREA_CPUIMX51 EUKREA_CPUIMX51 2823 |
483 | smdkc210 MACH_SMDKC210 SMDKC210 2838 | 483 | smdkc210 MACH_SMDKC210 SMDKC210 2838 |