diff options
38 files changed, 331 insertions, 154 deletions
diff --git a/arch/arm/mach-highbank/Makefile b/arch/arm/mach-highbank/Makefile index f8437dd238c2..ded4652ada80 100644 --- a/arch/arm/mach-highbank/Makefile +++ b/arch/arm/mach-highbank/Makefile | |||
@@ -1,4 +1,8 @@ | |||
1 | obj-y := clock.o highbank.o system.o | 1 | obj-y := clock.o highbank.o system.o smc.o |
2 | |||
3 | plus_sec := $(call as-instr,.arch_extension sec,+sec) | ||
4 | AFLAGS_smc.o :=-Wa,-march=armv7-a$(plus_sec) | ||
5 | |||
2 | obj-$(CONFIG_DEBUG_HIGHBANK_UART) += lluart.o | 6 | obj-$(CONFIG_DEBUG_HIGHBANK_UART) += lluart.o |
3 | obj-$(CONFIG_SMP) += platsmp.o | 7 | obj-$(CONFIG_SMP) += platsmp.o |
4 | obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o | 8 | obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o |
diff --git a/arch/arm/mach-highbank/core.h b/arch/arm/mach-highbank/core.h index d8e2d0be64ac..141ed5171826 100644 --- a/arch/arm/mach-highbank/core.h +++ b/arch/arm/mach-highbank/core.h | |||
@@ -8,3 +8,4 @@ extern void highbank_lluart_map_io(void); | |||
8 | static inline void highbank_lluart_map_io(void) {} | 8 | static inline void highbank_lluart_map_io(void) {} |
9 | #endif | 9 | #endif |
10 | 10 | ||
11 | extern void highbank_smc1(int fn, int arg); | ||
diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c index 410a112bb52e..8777612b1a42 100644 --- a/arch/arm/mach-highbank/highbank.c +++ b/arch/arm/mach-highbank/highbank.c | |||
@@ -85,10 +85,24 @@ const static struct of_device_id irq_match[] = { | |||
85 | {} | 85 | {} |
86 | }; | 86 | }; |
87 | 87 | ||
88 | #ifdef CONFIG_CACHE_L2X0 | ||
89 | static void highbank_l2x0_disable(void) | ||
90 | { | ||
91 | /* Disable PL310 L2 Cache controller */ | ||
92 | highbank_smc1(0x102, 0x0); | ||
93 | } | ||
94 | #endif | ||
95 | |||
88 | static void __init highbank_init_irq(void) | 96 | static void __init highbank_init_irq(void) |
89 | { | 97 | { |
90 | of_irq_init(irq_match); | 98 | of_irq_init(irq_match); |
99 | |||
100 | #ifdef CONFIG_CACHE_L2X0 | ||
101 | /* Enable PL310 L2 Cache controller */ | ||
102 | highbank_smc1(0x102, 0x1); | ||
91 | l2x0_of_init(0, ~0UL); | 103 | l2x0_of_init(0, ~0UL); |
104 | outer_cache.disable = highbank_l2x0_disable; | ||
105 | #endif | ||
92 | } | 106 | } |
93 | 107 | ||
94 | static void __init highbank_timer_init(void) | 108 | static void __init highbank_timer_init(void) |
diff --git a/arch/arm/mach-highbank/smc.S b/arch/arm/mach-highbank/smc.S new file mode 100644 index 000000000000..407d17baaaa9 --- /dev/null +++ b/arch/arm/mach-highbank/smc.S | |||
@@ -0,0 +1,27 @@ | |||
1 | /* | ||
2 | * Copied from omap44xx-smc.S Copyright (C) 2010 Texas Instruments, Inc. | ||
3 | * Copyright 2012 Calxeda, Inc. | ||
4 | * | ||
5 | * This program is free software,you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License version 2 as | ||
7 | * published by the Free Software Foundation. | ||
8 | */ | ||
9 | |||
10 | #include <linux/linkage.h> | ||
11 | |||
12 | /* | ||
13 | * This is common routine to manage secure monitor API | ||
14 | * used to modify the PL310 secure registers. | ||
15 | * 'r0' contains the value to be modified and 'r12' contains | ||
16 | * the monitor API number. | ||
17 | * Function signature : void highbank_smc1(u32 fn, u32 arg) | ||
18 | */ | ||
19 | |||
20 | ENTRY(highbank_smc1) | ||
21 | stmfd sp!, {r4-r11, lr} | ||
22 | mov r12, r0 | ||
23 | mov r0, r1 | ||
24 | dsb | ||
25 | smc #0 | ||
26 | ldmfd sp!, {r4-r11, pc} | ||
27 | ENDPROC(highbank_smc1) | ||
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index 0021f726b153..eff4db5de0dd 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig | |||
@@ -477,6 +477,7 @@ config MACH_MX31_3DS | |||
477 | select IMX_HAVE_PLATFORM_IMX2_WDT | 477 | select IMX_HAVE_PLATFORM_IMX2_WDT |
478 | select IMX_HAVE_PLATFORM_IMX_I2C | 478 | select IMX_HAVE_PLATFORM_IMX_I2C |
479 | select IMX_HAVE_PLATFORM_IMX_KEYPAD | 479 | select IMX_HAVE_PLATFORM_IMX_KEYPAD |
480 | select IMX_HAVE_PLATFORM_IMX_SSI | ||
480 | select IMX_HAVE_PLATFORM_IMX_UART | 481 | select IMX_HAVE_PLATFORM_IMX_UART |
481 | select IMX_HAVE_PLATFORM_IPU_CORE | 482 | select IMX_HAVE_PLATFORM_IPU_CORE |
482 | select IMX_HAVE_PLATFORM_MXC_EHCI | 483 | select IMX_HAVE_PLATFORM_MXC_EHCI |
diff --git a/arch/arm/mach-imx/clk-imx1.c b/arch/arm/mach-imx/clk-imx1.c index 0f0beb580b73..516ddee1948e 100644 --- a/arch/arm/mach-imx/clk-imx1.c +++ b/arch/arm/mach-imx/clk-imx1.c | |||
@@ -108,8 +108,7 @@ int __init mx1_clocks_init(unsigned long fref) | |||
108 | clk_register_clkdev(clk[clk32], NULL, "mxc_rtc.0"); | 108 | clk_register_clkdev(clk[clk32], NULL, "mxc_rtc.0"); |
109 | clk_register_clkdev(clk[clko], "clko", NULL); | 109 | clk_register_clkdev(clk[clko], "clko", NULL); |
110 | 110 | ||
111 | mxc_timer_init(NULL, MX1_IO_ADDRESS(MX1_TIM1_BASE_ADDR), | 111 | mxc_timer_init(MX1_IO_ADDRESS(MX1_TIM1_BASE_ADDR), MX1_TIM1_INT); |
112 | MX1_TIM1_INT); | ||
113 | 112 | ||
114 | return 0; | 113 | return 0; |
115 | } | 114 | } |
diff --git a/arch/arm/mach-imx/clk-imx21.c b/arch/arm/mach-imx/clk-imx21.c index 4e4f384ee8dd..ea13e61bd5f3 100644 --- a/arch/arm/mach-imx/clk-imx21.c +++ b/arch/arm/mach-imx/clk-imx21.c | |||
@@ -180,7 +180,7 @@ int __init mx21_clocks_init(unsigned long lref, unsigned long href) | |||
180 | clk_register_clkdev(clk[sdhc1_ipg_gate], "sdhc1", NULL); | 180 | clk_register_clkdev(clk[sdhc1_ipg_gate], "sdhc1", NULL); |
181 | clk_register_clkdev(clk[sdhc2_ipg_gate], "sdhc2", NULL); | 181 | clk_register_clkdev(clk[sdhc2_ipg_gate], "sdhc2", NULL); |
182 | 182 | ||
183 | mxc_timer_init(NULL, MX21_IO_ADDRESS(MX21_GPT1_BASE_ADDR), | 183 | mxc_timer_init(MX21_IO_ADDRESS(MX21_GPT1_BASE_ADDR), MX21_INT_GPT1); |
184 | MX21_INT_GPT1); | 184 | |
185 | return 0; | 185 | return 0; |
186 | } | 186 | } |
diff --git a/arch/arm/mach-imx/clk-imx25.c b/arch/arm/mach-imx/clk-imx25.c index d9833bb5fd61..fdd8cc87c9fe 100644 --- a/arch/arm/mach-imx/clk-imx25.c +++ b/arch/arm/mach-imx/clk-imx25.c | |||
@@ -243,6 +243,6 @@ int __init mx25_clocks_init(void) | |||
243 | clk_register_clkdev(clk[sdma_ahb], "ahb", "imx35-sdma"); | 243 | clk_register_clkdev(clk[sdma_ahb], "ahb", "imx35-sdma"); |
244 | clk_register_clkdev(clk[iim_ipg], "iim", NULL); | 244 | clk_register_clkdev(clk[iim_ipg], "iim", NULL); |
245 | 245 | ||
246 | mxc_timer_init(NULL, MX25_IO_ADDRESS(MX25_GPT1_BASE_ADDR), 54); | 246 | mxc_timer_init(MX25_IO_ADDRESS(MX25_GPT1_BASE_ADDR), 54); |
247 | return 0; | 247 | return 0; |
248 | } | 248 | } |
diff --git a/arch/arm/mach-imx/clk-imx27.c b/arch/arm/mach-imx/clk-imx27.c index 50a7ebd8d1b2..295cbd7c08dc 100644 --- a/arch/arm/mach-imx/clk-imx27.c +++ b/arch/arm/mach-imx/clk-imx27.c | |||
@@ -263,8 +263,7 @@ int __init mx27_clocks_init(unsigned long fref) | |||
263 | clk_register_clkdev(clk[ssi1_baud_gate], "bitrate" , "imx-ssi.0"); | 263 | clk_register_clkdev(clk[ssi1_baud_gate], "bitrate" , "imx-ssi.0"); |
264 | clk_register_clkdev(clk[ssi2_baud_gate], "bitrate" , "imx-ssi.1"); | 264 | clk_register_clkdev(clk[ssi2_baud_gate], "bitrate" , "imx-ssi.1"); |
265 | 265 | ||
266 | mxc_timer_init(NULL, MX27_IO_ADDRESS(MX27_GPT1_BASE_ADDR), | 266 | mxc_timer_init(MX27_IO_ADDRESS(MX27_GPT1_BASE_ADDR), MX27_INT_GPT1); |
267 | MX27_INT_GPT1); | ||
268 | 267 | ||
269 | clk_prepare_enable(clk[emi_ahb_gate]); | 268 | clk_prepare_enable(clk[emi_ahb_gate]); |
270 | 269 | ||
diff --git a/arch/arm/mach-imx/clk-imx31.c b/arch/arm/mach-imx/clk-imx31.c index a854b9cae5ea..c9a06d800f8e 100644 --- a/arch/arm/mach-imx/clk-imx31.c +++ b/arch/arm/mach-imx/clk-imx31.c | |||
@@ -175,8 +175,7 @@ int __init mx31_clocks_init(unsigned long fref) | |||
175 | mx31_revision(); | 175 | mx31_revision(); |
176 | clk_disable_unprepare(clk[iim_gate]); | 176 | clk_disable_unprepare(clk[iim_gate]); |
177 | 177 | ||
178 | mxc_timer_init(NULL, MX31_IO_ADDRESS(MX31_GPT1_BASE_ADDR), | 178 | mxc_timer_init(MX31_IO_ADDRESS(MX31_GPT1_BASE_ADDR), MX31_INT_GPT); |
179 | MX31_INT_GPT); | ||
180 | 179 | ||
181 | return 0; | 180 | return 0; |
182 | } | 181 | } |
diff --git a/arch/arm/mach-imx/clk-imx35.c b/arch/arm/mach-imx/clk-imx35.c index a9e60bf7dd75..920a8cc42726 100644 --- a/arch/arm/mach-imx/clk-imx35.c +++ b/arch/arm/mach-imx/clk-imx35.c | |||
@@ -267,11 +267,9 @@ int __init mx35_clocks_init() | |||
267 | imx_print_silicon_rev("i.MX35", mx35_revision()); | 267 | imx_print_silicon_rev("i.MX35", mx35_revision()); |
268 | 268 | ||
269 | #ifdef CONFIG_MXC_USE_EPIT | 269 | #ifdef CONFIG_MXC_USE_EPIT |
270 | epit_timer_init(&epit1_clk, | 270 | epit_timer_init(MX35_IO_ADDRESS(MX35_EPIT1_BASE_ADDR), MX35_INT_EPIT1); |
271 | MX35_IO_ADDRESS(MX35_EPIT1_BASE_ADDR), MX35_INT_EPIT1); | ||
272 | #else | 271 | #else |
273 | mxc_timer_init(NULL, MX35_IO_ADDRESS(MX35_GPT1_BASE_ADDR), | 272 | mxc_timer_init(MX35_IO_ADDRESS(MX35_GPT1_BASE_ADDR), MX35_INT_GPT); |
274 | MX35_INT_GPT); | ||
275 | #endif | 273 | #endif |
276 | 274 | ||
277 | return 0; | 275 | return 0; |
diff --git a/arch/arm/mach-imx/clk-imx51-imx53.c b/arch/arm/mach-imx/clk-imx51-imx53.c index fcd94f3b0f0e..a2200c77bf70 100644 --- a/arch/arm/mach-imx/clk-imx51-imx53.c +++ b/arch/arm/mach-imx/clk-imx51-imx53.c | |||
@@ -104,12 +104,12 @@ static void __init mx5_clocks_common_init(unsigned long rate_ckil, | |||
104 | periph_apm_sel, ARRAY_SIZE(periph_apm_sel)); | 104 | periph_apm_sel, ARRAY_SIZE(periph_apm_sel)); |
105 | clk[main_bus] = imx_clk_mux("main_bus", MXC_CCM_CBCDR, 25, 1, | 105 | clk[main_bus] = imx_clk_mux("main_bus", MXC_CCM_CBCDR, 25, 1, |
106 | main_bus_sel, ARRAY_SIZE(main_bus_sel)); | 106 | main_bus_sel, ARRAY_SIZE(main_bus_sel)); |
107 | clk[per_lp_apm] = imx_clk_mux("per_lp_apm", MXC_CCM_CBCDR, 1, 1, | 107 | clk[per_lp_apm] = imx_clk_mux("per_lp_apm", MXC_CCM_CBCMR, 1, 1, |
108 | per_lp_apm_sel, ARRAY_SIZE(per_lp_apm_sel)); | 108 | per_lp_apm_sel, ARRAY_SIZE(per_lp_apm_sel)); |
109 | clk[per_pred1] = imx_clk_divider("per_pred1", "per_lp_apm", MXC_CCM_CBCDR, 6, 2); | 109 | clk[per_pred1] = imx_clk_divider("per_pred1", "per_lp_apm", MXC_CCM_CBCDR, 6, 2); |
110 | clk[per_pred2] = imx_clk_divider("per_pred2", "per_pred1", MXC_CCM_CBCDR, 3, 3); | 110 | clk[per_pred2] = imx_clk_divider("per_pred2", "per_pred1", MXC_CCM_CBCDR, 3, 3); |
111 | clk[per_podf] = imx_clk_divider("per_podf", "per_pred2", MXC_CCM_CBCDR, 0, 3); | 111 | clk[per_podf] = imx_clk_divider("per_podf", "per_pred2", MXC_CCM_CBCDR, 0, 3); |
112 | clk[per_root] = imx_clk_mux("per_root", MXC_CCM_CBCDR, 1, 0, | 112 | clk[per_root] = imx_clk_mux("per_root", MXC_CCM_CBCMR, 0, 1, |
113 | per_root_sel, ARRAY_SIZE(per_root_sel)); | 113 | per_root_sel, ARRAY_SIZE(per_root_sel)); |
114 | clk[ahb] = imx_clk_divider("ahb", "main_bus", MXC_CCM_CBCDR, 10, 3); | 114 | clk[ahb] = imx_clk_divider("ahb", "main_bus", MXC_CCM_CBCDR, 10, 3); |
115 | clk[ahb_max] = imx_clk_gate2("ahb_max", "ahb", MXC_CCM_CCGR0, 28); | 115 | clk[ahb_max] = imx_clk_gate2("ahb_max", "ahb", MXC_CCM_CCGR0, 28); |
@@ -172,7 +172,7 @@ static void __init mx5_clocks_common_init(unsigned long rate_ckil, | |||
172 | clk[pwm1_hf_gate] = imx_clk_gate2("pwm1_hf_gate", "ipg", MXC_CCM_CCGR2, 12); | 172 | clk[pwm1_hf_gate] = imx_clk_gate2("pwm1_hf_gate", "ipg", MXC_CCM_CCGR2, 12); |
173 | clk[pwm2_ipg_gate] = imx_clk_gate2("pwm2_ipg_gate", "ipg", MXC_CCM_CCGR2, 14); | 173 | clk[pwm2_ipg_gate] = imx_clk_gate2("pwm2_ipg_gate", "ipg", MXC_CCM_CCGR2, 14); |
174 | clk[pwm2_hf_gate] = imx_clk_gate2("pwm2_hf_gate", "ipg", MXC_CCM_CCGR2, 16); | 174 | clk[pwm2_hf_gate] = imx_clk_gate2("pwm2_hf_gate", "ipg", MXC_CCM_CCGR2, 16); |
175 | clk[gpt_gate] = imx_clk_gate2("gpt_gate", "ipg", MXC_CCM_CCGR2, 18); | 175 | clk[gpt_gate] = imx_clk_gate2("gpt_gate", "per_root", MXC_CCM_CCGR2, 18); |
176 | clk[fec_gate] = imx_clk_gate2("fec_gate", "ipg", MXC_CCM_CCGR2, 24); | 176 | clk[fec_gate] = imx_clk_gate2("fec_gate", "ipg", MXC_CCM_CCGR2, 24); |
177 | clk[usboh3_gate] = imx_clk_gate2("usboh3_gate", "ipg", MXC_CCM_CCGR2, 26); | 177 | clk[usboh3_gate] = imx_clk_gate2("usboh3_gate", "ipg", MXC_CCM_CCGR2, 26); |
178 | clk[usboh3_per_gate] = imx_clk_gate2("usboh3_per_gate", "usboh3_podf", MXC_CCM_CCGR2, 28); | 178 | clk[usboh3_per_gate] = imx_clk_gate2("usboh3_per_gate", "usboh3_podf", MXC_CCM_CCGR2, 28); |
@@ -366,8 +366,7 @@ int __init mx51_clocks_init(unsigned long rate_ckil, unsigned long rate_osc, | |||
366 | clk_set_rate(clk[esdhc_b_podf], 166250000); | 366 | clk_set_rate(clk[esdhc_b_podf], 166250000); |
367 | 367 | ||
368 | /* System timer */ | 368 | /* System timer */ |
369 | mxc_timer_init(NULL, MX51_IO_ADDRESS(MX51_GPT1_BASE_ADDR), | 369 | mxc_timer_init(MX51_IO_ADDRESS(MX51_GPT1_BASE_ADDR), MX51_INT_GPT); |
370 | MX51_INT_GPT); | ||
371 | 370 | ||
372 | clk_prepare_enable(clk[iim_gate]); | 371 | clk_prepare_enable(clk[iim_gate]); |
373 | imx_print_silicon_rev("i.MX51", mx51_revision()); | 372 | imx_print_silicon_rev("i.MX51", mx51_revision()); |
@@ -452,8 +451,7 @@ int __init mx53_clocks_init(unsigned long rate_ckil, unsigned long rate_osc, | |||
452 | clk_set_rate(clk[esdhc_b_podf], 200000000); | 451 | clk_set_rate(clk[esdhc_b_podf], 200000000); |
453 | 452 | ||
454 | /* System timer */ | 453 | /* System timer */ |
455 | mxc_timer_init(NULL, MX53_IO_ADDRESS(MX53_GPT1_BASE_ADDR), | 454 | mxc_timer_init(MX53_IO_ADDRESS(MX53_GPT1_BASE_ADDR), MX53_INT_GPT); |
456 | MX53_INT_GPT); | ||
457 | 455 | ||
458 | clk_prepare_enable(clk[iim_gate]); | 456 | clk_prepare_enable(clk[iim_gate]); |
459 | imx_print_silicon_rev("i.MX53", mx53_revision()); | 457 | imx_print_silicon_rev("i.MX53", mx53_revision()); |
diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c index cab02d0a15d6..17dc66a085a5 100644 --- a/arch/arm/mach-imx/clk-imx6q.c +++ b/arch/arm/mach-imx/clk-imx6q.c | |||
@@ -122,10 +122,6 @@ static const char *cko1_sels[] = { "pll3_usb_otg", "pll2_bus", "pll1_sys", "pll5 | |||
122 | "dummy", "axi", "enfc", "ipu1_di0", "ipu1_di1", "ipu2_di0", | 122 | "dummy", "axi", "enfc", "ipu1_di0", "ipu1_di1", "ipu2_di0", |
123 | "ipu2_di1", "ahb", "ipg", "ipg_per", "ckil", "pll4_audio", }; | 123 | "ipu2_di1", "ahb", "ipg", "ipg_per", "ckil", "pll4_audio", }; |
124 | 124 | ||
125 | static const char * const clks_init_on[] __initconst = { | ||
126 | "mmdc_ch0_axi", "mmdc_ch1_axi", "usboh3", | ||
127 | }; | ||
128 | |||
129 | enum mx6q_clks { | 125 | enum mx6q_clks { |
130 | dummy, ckil, ckih, osc, pll2_pfd0_352m, pll2_pfd1_594m, pll2_pfd2_396m, | 126 | dummy, ckil, ckih, osc, pll2_pfd0_352m, pll2_pfd1_594m, pll2_pfd2_396m, |
131 | pll3_pfd0_720m, pll3_pfd1_540m, pll3_pfd2_508m, pll3_pfd3_454m, | 127 | pll3_pfd0_720m, pll3_pfd1_540m, pll3_pfd2_508m, pll3_pfd3_454m, |
@@ -161,11 +157,14 @@ enum mx6q_clks { | |||
161 | 157 | ||
162 | static struct clk *clk[clk_max]; | 158 | static struct clk *clk[clk_max]; |
163 | 159 | ||
160 | static enum mx6q_clks const clks_init_on[] __initconst = { | ||
161 | mmdc_ch0_axi, mmdc_ch1_axi, | ||
162 | }; | ||
163 | |||
164 | int __init mx6q_clocks_init(void) | 164 | int __init mx6q_clocks_init(void) |
165 | { | 165 | { |
166 | struct device_node *np; | 166 | struct device_node *np; |
167 | void __iomem *base; | 167 | void __iomem *base; |
168 | struct clk *c; | ||
169 | int i, irq; | 168 | int i, irq; |
170 | 169 | ||
171 | clk[dummy] = imx_clk_fixed("dummy", 0); | 170 | clk[dummy] = imx_clk_fixed("dummy", 0); |
@@ -424,21 +423,14 @@ int __init mx6q_clocks_init(void) | |||
424 | clk_register_clkdev(clk[ahb], "ahb", NULL); | 423 | clk_register_clkdev(clk[ahb], "ahb", NULL); |
425 | clk_register_clkdev(clk[cko1], "cko1", NULL); | 424 | clk_register_clkdev(clk[cko1], "cko1", NULL); |
426 | 425 | ||
427 | for (i = 0; i < ARRAY_SIZE(clks_init_on); i++) { | 426 | for (i = 0; i < ARRAY_SIZE(clks_init_on); i++) |
428 | c = clk_get_sys(clks_init_on[i], NULL); | 427 | clk_prepare_enable(clk[clks_init_on[i]]); |
429 | if (IS_ERR(c)) { | ||
430 | pr_err("%s: failed to get clk %s", __func__, | ||
431 | clks_init_on[i]); | ||
432 | return PTR_ERR(c); | ||
433 | } | ||
434 | clk_prepare_enable(c); | ||
435 | } | ||
436 | 428 | ||
437 | np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-gpt"); | 429 | np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-gpt"); |
438 | base = of_iomap(np, 0); | 430 | base = of_iomap(np, 0); |
439 | WARN_ON(!base); | 431 | WARN_ON(!base); |
440 | irq = irq_of_parse_and_map(np, 0); | 432 | irq = irq_of_parse_and_map(np, 0); |
441 | mxc_timer_init(NULL, base, irq); | 433 | mxc_timer_init(base, irq); |
442 | 434 | ||
443 | return 0; | 435 | return 0; |
444 | } | 436 | } |
diff --git a/arch/arm/mach-imx/clk-pllv2.c b/arch/arm/mach-imx/clk-pllv2.c index 4685919deb63..0440379e3628 100644 --- a/arch/arm/mach-imx/clk-pllv2.c +++ b/arch/arm/mach-imx/clk-pllv2.c | |||
@@ -74,30 +74,15 @@ struct clk_pllv2 { | |||
74 | void __iomem *base; | 74 | void __iomem *base; |
75 | }; | 75 | }; |
76 | 76 | ||
77 | static unsigned long clk_pllv2_recalc_rate(struct clk_hw *hw, | 77 | static unsigned long __clk_pllv2_recalc_rate(unsigned long parent_rate, |
78 | unsigned long parent_rate) | 78 | u32 dp_ctl, u32 dp_op, u32 dp_mfd, u32 dp_mfn) |
79 | { | 79 | { |
80 | long mfi, mfn, mfd, pdf, ref_clk, mfn_abs; | 80 | long mfi, mfn, mfd, pdf, ref_clk, mfn_abs; |
81 | unsigned long dp_op, dp_mfd, dp_mfn, dp_ctl, pll_hfsm, dbl; | 81 | unsigned long dbl; |
82 | void __iomem *pllbase; | ||
83 | s64 temp; | 82 | s64 temp; |
84 | struct clk_pllv2 *pll = to_clk_pllv2(hw); | ||
85 | |||
86 | pllbase = pll->base; | ||
87 | 83 | ||
88 | dp_ctl = __raw_readl(pllbase + MXC_PLL_DP_CTL); | ||
89 | pll_hfsm = dp_ctl & MXC_PLL_DP_CTL_HFSM; | ||
90 | dbl = dp_ctl & MXC_PLL_DP_CTL_DPDCK0_2_EN; | 84 | dbl = dp_ctl & MXC_PLL_DP_CTL_DPDCK0_2_EN; |
91 | 85 | ||
92 | if (pll_hfsm == 0) { | ||
93 | dp_op = __raw_readl(pllbase + MXC_PLL_DP_OP); | ||
94 | dp_mfd = __raw_readl(pllbase + MXC_PLL_DP_MFD); | ||
95 | dp_mfn = __raw_readl(pllbase + MXC_PLL_DP_MFN); | ||
96 | } else { | ||
97 | dp_op = __raw_readl(pllbase + MXC_PLL_DP_HFS_OP); | ||
98 | dp_mfd = __raw_readl(pllbase + MXC_PLL_DP_HFS_MFD); | ||
99 | dp_mfn = __raw_readl(pllbase + MXC_PLL_DP_HFS_MFN); | ||
100 | } | ||
101 | pdf = dp_op & MXC_PLL_DP_OP_PDF_MASK; | 86 | pdf = dp_op & MXC_PLL_DP_OP_PDF_MASK; |
102 | mfi = (dp_op & MXC_PLL_DP_OP_MFI_MASK) >> MXC_PLL_DP_OP_MFI_OFFSET; | 87 | mfi = (dp_op & MXC_PLL_DP_OP_MFI_MASK) >> MXC_PLL_DP_OP_MFI_OFFSET; |
103 | mfi = (mfi <= 5) ? 5 : mfi; | 88 | mfi = (mfi <= 5) ? 5 : mfi; |
@@ -123,18 +108,30 @@ static unsigned long clk_pllv2_recalc_rate(struct clk_hw *hw, | |||
123 | return temp; | 108 | return temp; |
124 | } | 109 | } |
125 | 110 | ||
126 | static int clk_pllv2_set_rate(struct clk_hw *hw, unsigned long rate, | 111 | static unsigned long clk_pllv2_recalc_rate(struct clk_hw *hw, |
127 | unsigned long parent_rate) | 112 | unsigned long parent_rate) |
128 | { | 113 | { |
114 | u32 dp_op, dp_mfd, dp_mfn, dp_ctl; | ||
115 | void __iomem *pllbase; | ||
129 | struct clk_pllv2 *pll = to_clk_pllv2(hw); | 116 | struct clk_pllv2 *pll = to_clk_pllv2(hw); |
117 | |||
118 | pllbase = pll->base; | ||
119 | |||
120 | dp_ctl = __raw_readl(pllbase + MXC_PLL_DP_CTL); | ||
121 | dp_op = __raw_readl(pllbase + MXC_PLL_DP_OP); | ||
122 | dp_mfd = __raw_readl(pllbase + MXC_PLL_DP_MFD); | ||
123 | dp_mfn = __raw_readl(pllbase + MXC_PLL_DP_MFN); | ||
124 | |||
125 | return __clk_pllv2_recalc_rate(parent_rate, dp_ctl, dp_op, dp_mfd, dp_mfn); | ||
126 | } | ||
127 | |||
128 | static int __clk_pllv2_set_rate(unsigned long rate, unsigned long parent_rate, | ||
129 | u32 *dp_op, u32 *dp_mfd, u32 *dp_mfn) | ||
130 | { | ||
130 | u32 reg; | 131 | u32 reg; |
131 | void __iomem *pllbase; | ||
132 | long mfi, pdf, mfn, mfd = 999999; | 132 | long mfi, pdf, mfn, mfd = 999999; |
133 | s64 temp64; | 133 | s64 temp64; |
134 | unsigned long quad_parent_rate; | 134 | unsigned long quad_parent_rate; |
135 | unsigned long pll_hfsm, dp_ctl; | ||
136 | |||
137 | pllbase = pll->base; | ||
138 | 135 | ||
139 | quad_parent_rate = 4 * parent_rate; | 136 | quad_parent_rate = 4 * parent_rate; |
140 | pdf = mfi = -1; | 137 | pdf = mfi = -1; |
@@ -144,25 +141,41 @@ static int clk_pllv2_set_rate(struct clk_hw *hw, unsigned long rate, | |||
144 | return -EINVAL; | 141 | return -EINVAL; |
145 | pdf--; | 142 | pdf--; |
146 | 143 | ||
147 | temp64 = rate * (pdf+1) - quad_parent_rate * mfi; | 144 | temp64 = rate * (pdf + 1) - quad_parent_rate * mfi; |
148 | do_div(temp64, quad_parent_rate/1000000); | 145 | do_div(temp64, quad_parent_rate / 1000000); |
149 | mfn = (long)temp64; | 146 | mfn = (long)temp64; |
150 | 147 | ||
148 | reg = mfi << 4 | pdf; | ||
149 | |||
150 | *dp_op = reg; | ||
151 | *dp_mfd = mfd; | ||
152 | *dp_mfn = mfn; | ||
153 | |||
154 | return 0; | ||
155 | } | ||
156 | |||
157 | static int clk_pllv2_set_rate(struct clk_hw *hw, unsigned long rate, | ||
158 | unsigned long parent_rate) | ||
159 | { | ||
160 | struct clk_pllv2 *pll = to_clk_pllv2(hw); | ||
161 | void __iomem *pllbase; | ||
162 | u32 dp_ctl, dp_op, dp_mfd, dp_mfn; | ||
163 | int ret; | ||
164 | |||
165 | pllbase = pll->base; | ||
166 | |||
167 | |||
168 | ret = __clk_pllv2_set_rate(rate, parent_rate, &dp_op, &dp_mfd, &dp_mfn); | ||
169 | if (ret) | ||
170 | return ret; | ||
171 | |||
151 | dp_ctl = __raw_readl(pllbase + MXC_PLL_DP_CTL); | 172 | dp_ctl = __raw_readl(pllbase + MXC_PLL_DP_CTL); |
152 | /* use dpdck0_2 */ | 173 | /* use dpdck0_2 */ |
153 | __raw_writel(dp_ctl | 0x1000L, pllbase + MXC_PLL_DP_CTL); | 174 | __raw_writel(dp_ctl | 0x1000L, pllbase + MXC_PLL_DP_CTL); |
154 | pll_hfsm = dp_ctl & MXC_PLL_DP_CTL_HFSM; | 175 | |
155 | if (pll_hfsm == 0) { | 176 | __raw_writel(dp_op, pllbase + MXC_PLL_DP_OP); |
156 | reg = mfi << 4 | pdf; | 177 | __raw_writel(dp_mfd, pllbase + MXC_PLL_DP_MFD); |
157 | __raw_writel(reg, pllbase + MXC_PLL_DP_OP); | 178 | __raw_writel(dp_mfn, pllbase + MXC_PLL_DP_MFN); |
158 | __raw_writel(mfd, pllbase + MXC_PLL_DP_MFD); | ||
159 | __raw_writel(mfn, pllbase + MXC_PLL_DP_MFN); | ||
160 | } else { | ||
161 | reg = mfi << 4 | pdf; | ||
162 | __raw_writel(reg, pllbase + MXC_PLL_DP_HFS_OP); | ||
163 | __raw_writel(mfd, pllbase + MXC_PLL_DP_HFS_MFD); | ||
164 | __raw_writel(mfn, pllbase + MXC_PLL_DP_HFS_MFN); | ||
165 | } | ||
166 | 179 | ||
167 | return 0; | 180 | return 0; |
168 | } | 181 | } |
@@ -170,7 +183,11 @@ static int clk_pllv2_set_rate(struct clk_hw *hw, unsigned long rate, | |||
170 | static long clk_pllv2_round_rate(struct clk_hw *hw, unsigned long rate, | 183 | static long clk_pllv2_round_rate(struct clk_hw *hw, unsigned long rate, |
171 | unsigned long *prate) | 184 | unsigned long *prate) |
172 | { | 185 | { |
173 | return rate; | 186 | u32 dp_op, dp_mfd, dp_mfn; |
187 | |||
188 | __clk_pllv2_set_rate(rate, *prate, &dp_op, &dp_mfd, &dp_mfn); | ||
189 | return __clk_pllv2_recalc_rate(*prate, MXC_PLL_DP_CTL_DPDCK0_2_EN, | ||
190 | dp_op, dp_mfd, dp_mfn); | ||
174 | } | 191 | } |
175 | 192 | ||
176 | static int clk_pllv2_prepare(struct clk_hw *hw) | 193 | static int clk_pllv2_prepare(struct clk_hw *hw) |
diff --git a/arch/arm/mach-imx/crm-regs-imx5.h b/arch/arm/mach-imx/crm-regs-imx5.h index 5e11ba7daee2..5e3f1f0f4cab 100644 --- a/arch/arm/mach-imx/crm-regs-imx5.h +++ b/arch/arm/mach-imx/crm-regs-imx5.h | |||
@@ -23,7 +23,7 @@ | |||
23 | #define MX53_DPLL1_BASE MX53_IO_ADDRESS(MX53_PLL1_BASE_ADDR) | 23 | #define MX53_DPLL1_BASE MX53_IO_ADDRESS(MX53_PLL1_BASE_ADDR) |
24 | #define MX53_DPLL2_BASE MX53_IO_ADDRESS(MX53_PLL2_BASE_ADDR) | 24 | #define MX53_DPLL2_BASE MX53_IO_ADDRESS(MX53_PLL2_BASE_ADDR) |
25 | #define MX53_DPLL3_BASE MX53_IO_ADDRESS(MX53_PLL3_BASE_ADDR) | 25 | #define MX53_DPLL3_BASE MX53_IO_ADDRESS(MX53_PLL3_BASE_ADDR) |
26 | #define MX53_DPLL4_BASE MX53_IO_ADDRESS(MX53_PLL3_BASE_ADDR) | 26 | #define MX53_DPLL4_BASE MX53_IO_ADDRESS(MX53_PLL4_BASE_ADDR) |
27 | 27 | ||
28 | /* PLL Register Offsets */ | 28 | /* PLL Register Offsets */ |
29 | #define MXC_PLL_DP_CTL 0x00 | 29 | #define MXC_PLL_DP_CTL 0x00 |
diff --git a/arch/arm/mach-imx/hotplug.c b/arch/arm/mach-imx/hotplug.c index 89493abd497c..20ed2d56c1af 100644 --- a/arch/arm/mach-imx/hotplug.c +++ b/arch/arm/mach-imx/hotplug.c | |||
@@ -12,6 +12,7 @@ | |||
12 | 12 | ||
13 | #include <linux/errno.h> | 13 | #include <linux/errno.h> |
14 | #include <asm/cacheflush.h> | 14 | #include <asm/cacheflush.h> |
15 | #include <asm/cp15.h> | ||
15 | #include <mach/common.h> | 16 | #include <mach/common.h> |
16 | 17 | ||
17 | int platform_cpu_kill(unsigned int cpu) | 18 | int platform_cpu_kill(unsigned int cpu) |
@@ -19,6 +20,44 @@ int platform_cpu_kill(unsigned int cpu) | |||
19 | return 1; | 20 | return 1; |
20 | } | 21 | } |
21 | 22 | ||
23 | static inline void cpu_enter_lowpower(void) | ||
24 | { | ||
25 | unsigned int v; | ||
26 | |||
27 | flush_cache_all(); | ||
28 | asm volatile( | ||
29 | "mcr p15, 0, %1, c7, c5, 0\n" | ||
30 | " mcr p15, 0, %1, c7, c10, 4\n" | ||
31 | /* | ||
32 | * Turn off coherency | ||
33 | */ | ||
34 | " mrc p15, 0, %0, c1, c0, 1\n" | ||
35 | " bic %0, %0, %3\n" | ||
36 | " mcr p15, 0, %0, c1, c0, 1\n" | ||
37 | " mrc p15, 0, %0, c1, c0, 0\n" | ||
38 | " bic %0, %0, %2\n" | ||
39 | " mcr p15, 0, %0, c1, c0, 0\n" | ||
40 | : "=&r" (v) | ||
41 | : "r" (0), "Ir" (CR_C), "Ir" (0x40) | ||
42 | : "cc"); | ||
43 | } | ||
44 | |||
45 | static inline void cpu_leave_lowpower(void) | ||
46 | { | ||
47 | unsigned int v; | ||
48 | |||
49 | asm volatile( | ||
50 | "mrc p15, 0, %0, c1, c0, 0\n" | ||
51 | " orr %0, %0, %1\n" | ||
52 | " mcr p15, 0, %0, c1, c0, 0\n" | ||
53 | " mrc p15, 0, %0, c1, c0, 1\n" | ||
54 | " orr %0, %0, %2\n" | ||
55 | " mcr p15, 0, %0, c1, c0, 1\n" | ||
56 | : "=&r" (v) | ||
57 | : "Ir" (CR_C), "Ir" (0x40) | ||
58 | : "cc"); | ||
59 | } | ||
60 | |||
22 | /* | 61 | /* |
23 | * platform-specific code to shutdown a CPU | 62 | * platform-specific code to shutdown a CPU |
24 | * | 63 | * |
@@ -26,9 +65,10 @@ int platform_cpu_kill(unsigned int cpu) | |||
26 | */ | 65 | */ |
27 | void platform_cpu_die(unsigned int cpu) | 66 | void platform_cpu_die(unsigned int cpu) |
28 | { | 67 | { |
29 | flush_cache_all(); | 68 | cpu_enter_lowpower(); |
30 | imx_enable_cpu(cpu, false); | 69 | imx_enable_cpu(cpu, false); |
31 | cpu_do_idle(); | 70 | cpu_do_idle(); |
71 | cpu_leave_lowpower(); | ||
32 | 72 | ||
33 | /* We should never return from idle */ | 73 | /* We should never return from idle */ |
34 | panic("cpu %d unexpectedly exit from shutdown\n", cpu); | 74 | panic("cpu %d unexpectedly exit from shutdown\n", cpu); |
diff --git a/arch/arm/mach-imx/mach-cpuimx35.c b/arch/arm/mach-imx/mach-cpuimx35.c index c515f8ede1a1..6450303f1a7a 100644 --- a/arch/arm/mach-imx/mach-cpuimx35.c +++ b/arch/arm/mach-imx/mach-cpuimx35.c | |||
@@ -70,7 +70,6 @@ static struct i2c_board_info eukrea_cpuimx35_i2c_devices[] = { | |||
70 | I2C_BOARD_INFO("pcf8563", 0x51), | 70 | I2C_BOARD_INFO("pcf8563", 0x51), |
71 | }, { | 71 | }, { |
72 | I2C_BOARD_INFO("tsc2007", 0x48), | 72 | I2C_BOARD_INFO("tsc2007", 0x48), |
73 | .type = "tsc2007", | ||
74 | .platform_data = &tsc2007_info, | 73 | .platform_data = &tsc2007_info, |
75 | .irq = IMX_GPIO_TO_IRQ(TSC2007_IRQGPIO), | 74 | .irq = IMX_GPIO_TO_IRQ(TSC2007_IRQGPIO), |
76 | }, | 75 | }, |
diff --git a/arch/arm/mach-imx/mach-cpuimx51sd.c b/arch/arm/mach-imx/mach-cpuimx51sd.c index ac50f1671e38..1e09de50cbcd 100644 --- a/arch/arm/mach-imx/mach-cpuimx51sd.c +++ b/arch/arm/mach-imx/mach-cpuimx51sd.c | |||
@@ -142,7 +142,6 @@ static struct i2c_board_info eukrea_cpuimx51sd_i2c_devices[] = { | |||
142 | I2C_BOARD_INFO("pcf8563", 0x51), | 142 | I2C_BOARD_INFO("pcf8563", 0x51), |
143 | }, { | 143 | }, { |
144 | I2C_BOARD_INFO("tsc2007", 0x49), | 144 | I2C_BOARD_INFO("tsc2007", 0x49), |
145 | .type = "tsc2007", | ||
146 | .platform_data = &tsc2007_info, | 145 | .platform_data = &tsc2007_info, |
147 | }, | 146 | }, |
148 | }; | 147 | }; |
diff --git a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c index dff82eb57cd9..f76edb96a48a 100644 --- a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c +++ b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c | |||
@@ -116,6 +116,8 @@ static const int visstrim_m10_pins[] __initconst = { | |||
116 | PB23_PF_USB_PWR, | 116 | PB23_PF_USB_PWR, |
117 | PB24_PF_USB_OC, | 117 | PB24_PF_USB_OC, |
118 | /* CSI */ | 118 | /* CSI */ |
119 | TVP5150_RSTN | GPIO_GPIO | GPIO_OUT, | ||
120 | TVP5150_PWDN | GPIO_GPIO | GPIO_OUT, | ||
119 | PB10_PF_CSI_D0, | 121 | PB10_PF_CSI_D0, |
120 | PB11_PF_CSI_D1, | 122 | PB11_PF_CSI_D1, |
121 | PB12_PF_CSI_D2, | 123 | PB12_PF_CSI_D2, |
@@ -147,6 +149,24 @@ static struct gpio visstrim_m10_version_gpios[] = { | |||
147 | { MOTHERBOARD_BIT2, GPIOF_IN, "mother-version-2" }, | 149 | { MOTHERBOARD_BIT2, GPIOF_IN, "mother-version-2" }, |
148 | }; | 150 | }; |
149 | 151 | ||
152 | static const struct gpio visstrim_m10_gpios[] __initconst = { | ||
153 | { | ||
154 | .gpio = TVP5150_RSTN, | ||
155 | .flags = GPIOF_DIR_OUT | GPIOF_INIT_HIGH, | ||
156 | .label = "tvp5150_rstn", | ||
157 | }, | ||
158 | { | ||
159 | .gpio = TVP5150_PWDN, | ||
160 | .flags = GPIOF_DIR_OUT | GPIOF_INIT_LOW, | ||
161 | .label = "tvp5150_pwdn", | ||
162 | }, | ||
163 | { | ||
164 | .gpio = OTG_PHY_CS_GPIO, | ||
165 | .flags = GPIOF_DIR_OUT | GPIOF_INIT_LOW, | ||
166 | .label = "usbotg_cs", | ||
167 | }, | ||
168 | }; | ||
169 | |||
150 | /* Camera */ | 170 | /* Camera */ |
151 | static int visstrim_camera_power(struct device *dev, int on) | 171 | static int visstrim_camera_power(struct device *dev, int on) |
152 | { | 172 | { |
@@ -190,13 +210,6 @@ static void __init visstrim_camera_init(void) | |||
190 | struct platform_device *pdev; | 210 | struct platform_device *pdev; |
191 | int dma; | 211 | int dma; |
192 | 212 | ||
193 | /* Initialize tvp5150 gpios */ | ||
194 | mxc_gpio_mode(TVP5150_RSTN | GPIO_GPIO | GPIO_OUT); | ||
195 | mxc_gpio_mode(TVP5150_PWDN | GPIO_GPIO | GPIO_OUT); | ||
196 | gpio_set_value(TVP5150_RSTN, 1); | ||
197 | gpio_set_value(TVP5150_PWDN, 0); | ||
198 | ndelay(1); | ||
199 | |||
200 | gpio_set_value(TVP5150_PWDN, 1); | 213 | gpio_set_value(TVP5150_PWDN, 1); |
201 | ndelay(1); | 214 | ndelay(1); |
202 | gpio_set_value(TVP5150_RSTN, 0); | 215 | gpio_set_value(TVP5150_RSTN, 0); |
@@ -377,10 +390,6 @@ static struct i2c_board_info visstrim_m10_i2c_devices[] = { | |||
377 | /* USB OTG */ | 390 | /* USB OTG */ |
378 | static int otg_phy_init(struct platform_device *pdev) | 391 | static int otg_phy_init(struct platform_device *pdev) |
379 | { | 392 | { |
380 | gpio_set_value(OTG_PHY_CS_GPIO, 0); | ||
381 | |||
382 | mdelay(10); | ||
383 | |||
384 | return mx27_initialize_usb_hw(pdev->id, MXC_EHCI_POWER_PINS_ENABLED); | 393 | return mx27_initialize_usb_hw(pdev->id, MXC_EHCI_POWER_PINS_ENABLED); |
385 | } | 394 | } |
386 | 395 | ||
@@ -435,6 +444,11 @@ static void __init visstrim_m10_board_init(void) | |||
435 | if (ret) | 444 | if (ret) |
436 | pr_err("Failed to setup pins (%d)\n", ret); | 445 | pr_err("Failed to setup pins (%d)\n", ret); |
437 | 446 | ||
447 | ret = gpio_request_array(visstrim_m10_gpios, | ||
448 | ARRAY_SIZE(visstrim_m10_gpios)); | ||
449 | if (ret) | ||
450 | pr_err("Failed to request gpios (%d)\n", ret); | ||
451 | |||
438 | imx27_add_imx_ssi(0, &visstrim_m10_ssi_pdata); | 452 | imx27_add_imx_ssi(0, &visstrim_m10_ssi_pdata); |
439 | imx27_add_imx_uart0(&uart_pdata); | 453 | imx27_add_imx_uart0(&uart_pdata); |
440 | 454 | ||
diff --git a/arch/arm/mach-imx/mach-mx21ads.c b/arch/arm/mach-imx/mach-mx21ads.c index d14bbe949a4f..3e7401fca76c 100644 --- a/arch/arm/mach-imx/mach-mx21ads.c +++ b/arch/arm/mach-imx/mach-mx21ads.c | |||
@@ -32,7 +32,7 @@ | |||
32 | * Memory-mapped I/O on MX21ADS base board | 32 | * Memory-mapped I/O on MX21ADS base board |
33 | */ | 33 | */ |
34 | #define MX21ADS_MMIO_BASE_ADDR 0xf5000000 | 34 | #define MX21ADS_MMIO_BASE_ADDR 0xf5000000 |
35 | #define MX21ADS_MMIO_SIZE SZ_16M | 35 | #define MX21ADS_MMIO_SIZE 0xc00000 |
36 | 36 | ||
37 | #define MX21ADS_REG_ADDR(offset) (void __force __iomem *) \ | 37 | #define MX21ADS_REG_ADDR(offset) (void __force __iomem *) \ |
38 | (MX21ADS_MMIO_BASE_ADDR + (offset)) | 38 | (MX21ADS_MMIO_BASE_ADDR + (offset)) |
diff --git a/arch/arm/mach-imx/mm-imx3.c b/arch/arm/mach-imx/mm-imx3.c index 967ed5b35a45..a8983b9778d1 100644 --- a/arch/arm/mach-imx/mm-imx3.c +++ b/arch/arm/mach-imx/mm-imx3.c | |||
@@ -86,6 +86,7 @@ static void __iomem *imx3_ioremap_caller(unsigned long phys_addr, size_t size, | |||
86 | 86 | ||
87 | void __init imx3_init_l2x0(void) | 87 | void __init imx3_init_l2x0(void) |
88 | { | 88 | { |
89 | #ifdef CONFIG_CACHE_L2X0 | ||
89 | void __iomem *l2x0_base; | 90 | void __iomem *l2x0_base; |
90 | void __iomem *clkctl_base; | 91 | void __iomem *clkctl_base; |
91 | 92 | ||
@@ -115,6 +116,7 @@ void __init imx3_init_l2x0(void) | |||
115 | } | 116 | } |
116 | 117 | ||
117 | l2x0_init(l2x0_base, 0x00030024, 0x00000000); | 118 | l2x0_init(l2x0_base, 0x00030024, 0x00000000); |
119 | #endif | ||
118 | } | 120 | } |
119 | 121 | ||
120 | #ifdef CONFIG_SOC_IMX31 | 122 | #ifdef CONFIG_SOC_IMX31 |
@@ -179,6 +181,8 @@ void __init imx31_soc_init(void) | |||
179 | mxc_register_gpio("imx31-gpio", 1, MX31_GPIO2_BASE_ADDR, SZ_16K, MX31_INT_GPIO2, 0); | 181 | mxc_register_gpio("imx31-gpio", 1, MX31_GPIO2_BASE_ADDR, SZ_16K, MX31_INT_GPIO2, 0); |
180 | mxc_register_gpio("imx31-gpio", 2, MX31_GPIO3_BASE_ADDR, SZ_16K, MX31_INT_GPIO3, 0); | 182 | mxc_register_gpio("imx31-gpio", 2, MX31_GPIO3_BASE_ADDR, SZ_16K, MX31_INT_GPIO3, 0); |
181 | 183 | ||
184 | pinctrl_provide_dummies(); | ||
185 | |||
182 | if (to_version == 1) { | 186 | if (to_version == 1) { |
183 | strncpy(imx31_sdma_pdata.fw_name, "sdma-imx31-to1.bin", | 187 | strncpy(imx31_sdma_pdata.fw_name, "sdma-imx31-to1.bin", |
184 | strlen(imx31_sdma_pdata.fw_name)); | 188 | strlen(imx31_sdma_pdata.fw_name)); |
diff --git a/arch/arm/mach-imx/mm-imx5.c b/arch/arm/mach-imx/mm-imx5.c index feeee17da96b..1d003053d562 100644 --- a/arch/arm/mach-imx/mm-imx5.c +++ b/arch/arm/mach-imx/mm-imx5.c | |||
@@ -202,6 +202,8 @@ void __init imx51_soc_init(void) | |||
202 | mxc_register_gpio("imx31-gpio", 2, MX51_GPIO3_BASE_ADDR, SZ_16K, MX51_INT_GPIO3_LOW, MX51_INT_GPIO3_HIGH); | 202 | mxc_register_gpio("imx31-gpio", 2, MX51_GPIO3_BASE_ADDR, SZ_16K, MX51_INT_GPIO3_LOW, MX51_INT_GPIO3_HIGH); |
203 | mxc_register_gpio("imx31-gpio", 3, MX51_GPIO4_BASE_ADDR, SZ_16K, MX51_INT_GPIO4_LOW, MX51_INT_GPIO4_HIGH); | 203 | mxc_register_gpio("imx31-gpio", 3, MX51_GPIO4_BASE_ADDR, SZ_16K, MX51_INT_GPIO4_LOW, MX51_INT_GPIO4_HIGH); |
204 | 204 | ||
205 | pinctrl_provide_dummies(); | ||
206 | |||
205 | /* i.mx51 has the i.mx35 type sdma */ | 207 | /* i.mx51 has the i.mx35 type sdma */ |
206 | imx_add_imx_sdma("imx35-sdma", MX51_SDMA_BASE_ADDR, MX51_INT_SDMA, &imx51_sdma_pdata); | 208 | imx_add_imx_sdma("imx35-sdma", MX51_SDMA_BASE_ADDR, MX51_INT_SDMA, &imx51_sdma_pdata); |
207 | 209 | ||
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c index ff53deccecab..df2534de3361 100644 --- a/arch/arm/mach-omap2/board-rx51-peripherals.c +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c | |||
@@ -144,7 +144,6 @@ static struct lis3lv02d_platform_data rx51_lis3lv02d_data = { | |||
144 | .release_resources = lis302_release, | 144 | .release_resources = lis302_release, |
145 | .st_min_limits = {-32, 3, 3}, | 145 | .st_min_limits = {-32, 3, 3}, |
146 | .st_max_limits = {-3, 32, 32}, | 146 | .st_max_limits = {-3, 32, 32}, |
147 | .irq2 = OMAP_GPIO_IRQ(LIS302_IRQ2_GPIO), | ||
148 | }; | 147 | }; |
149 | #endif | 148 | #endif |
150 | 149 | ||
@@ -1030,7 +1029,6 @@ static struct i2c_board_info __initdata rx51_peripherals_i2c_board_info_3[] = { | |||
1030 | { | 1029 | { |
1031 | I2C_BOARD_INFO("lis3lv02d", 0x1d), | 1030 | I2C_BOARD_INFO("lis3lv02d", 0x1d), |
1032 | .platform_data = &rx51_lis3lv02d_data, | 1031 | .platform_data = &rx51_lis3lv02d_data, |
1033 | .irq = OMAP_GPIO_IRQ(LIS302_IRQ1_GPIO), | ||
1034 | }, | 1032 | }, |
1035 | #endif | 1033 | #endif |
1036 | }; | 1034 | }; |
@@ -1056,6 +1054,10 @@ static int __init rx51_i2c_init(void) | |||
1056 | omap_pmic_init(1, 2200, "twl5030", INT_34XX_SYS_NIRQ, &rx51_twldata); | 1054 | omap_pmic_init(1, 2200, "twl5030", INT_34XX_SYS_NIRQ, &rx51_twldata); |
1057 | omap_register_i2c_bus(2, 100, rx51_peripherals_i2c_board_info_2, | 1055 | omap_register_i2c_bus(2, 100, rx51_peripherals_i2c_board_info_2, |
1058 | ARRAY_SIZE(rx51_peripherals_i2c_board_info_2)); | 1056 | ARRAY_SIZE(rx51_peripherals_i2c_board_info_2)); |
1057 | #if defined(CONFIG_SENSORS_LIS3_I2C) || defined(CONFIG_SENSORS_LIS3_I2C_MODULE) | ||
1058 | rx51_lis3lv02d_data.irq2 = gpio_to_irq(LIS302_IRQ2_GPIO); | ||
1059 | rx51_peripherals_i2c_board_info_3[0].irq = gpio_to_irq(LIS302_IRQ1_GPIO); | ||
1060 | #endif | ||
1059 | omap_register_i2c_bus(3, 400, rx51_peripherals_i2c_board_info_3, | 1061 | omap_register_i2c_bus(3, 400, rx51_peripherals_i2c_board_info_3, |
1060 | ARRAY_SIZE(rx51_peripherals_i2c_board_info_3)); | 1062 | ARRAY_SIZE(rx51_peripherals_i2c_board_info_3)); |
1061 | return 0; | 1063 | return 0; |
diff --git a/arch/arm/mach-omap2/clock3xxx_data.c b/arch/arm/mach-omap2/clock3xxx_data.c index 4e1a3b0e8cc8..1efdec236ae8 100644 --- a/arch/arm/mach-omap2/clock3xxx_data.c +++ b/arch/arm/mach-omap2/clock3xxx_data.c | |||
@@ -3514,7 +3514,7 @@ int __init omap3xxx_clk_init(void) | |||
3514 | struct omap_clk *c; | 3514 | struct omap_clk *c; |
3515 | u32 cpu_clkflg = 0; | 3515 | u32 cpu_clkflg = 0; |
3516 | 3516 | ||
3517 | if (cpu_is_omap3517()) { | 3517 | if (soc_is_am35xx()) { |
3518 | cpu_mask = RATE_IN_34XX; | 3518 | cpu_mask = RATE_IN_34XX; |
3519 | cpu_clkflg = CK_AM35XX; | 3519 | cpu_clkflg = CK_AM35XX; |
3520 | } else if (cpu_is_omap3630()) { | 3520 | } else if (cpu_is_omap3630()) { |
diff --git a/arch/arm/mach-omap2/dsp.c b/arch/arm/mach-omap2/dsp.c index 845309f146fe..88ffa1e645cd 100644 --- a/arch/arm/mach-omap2/dsp.c +++ b/arch/arm/mach-omap2/dsp.c | |||
@@ -20,6 +20,9 @@ | |||
20 | 20 | ||
21 | #include <linux/module.h> | 21 | #include <linux/module.h> |
22 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
23 | |||
24 | #include <asm/memblock.h> | ||
25 | |||
23 | #include "cm2xxx_3xxx.h" | 26 | #include "cm2xxx_3xxx.h" |
24 | #include "prm2xxx_3xxx.h" | 27 | #include "prm2xxx_3xxx.h" |
25 | #ifdef CONFIG_BRIDGE_DVFS | 28 | #ifdef CONFIG_BRIDGE_DVFS |
diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c index 0389b3264abe..00486a8564fd 100644 --- a/arch/arm/mach-omap2/id.c +++ b/arch/arm/mach-omap2/id.c | |||
@@ -247,6 +247,17 @@ void __init omap3xxx_check_features(void) | |||
247 | omap_features |= OMAP3_HAS_SDRC; | 247 | omap_features |= OMAP3_HAS_SDRC; |
248 | 248 | ||
249 | /* | 249 | /* |
250 | * am35x fixups: | ||
251 | * - The am35x Chip ID register has bits 12, 7:5, and 3:2 marked as | ||
252 | * reserved and therefore return 0 when read. Unfortunately, | ||
253 | * OMAP3_CHECK_FEATURE() will interpret some of those zeroes to | ||
254 | * mean that a feature is present even though it isn't so clear | ||
255 | * the incorrectly set feature bits. | ||
256 | */ | ||
257 | if (soc_is_am35xx()) | ||
258 | omap_features &= ~(OMAP3_HAS_IVA | OMAP3_HAS_ISP); | ||
259 | |||
260 | /* | ||
250 | * TODO: Get additional info (where applicable) | 261 | * TODO: Get additional info (where applicable) |
251 | * e.g. Size of L2 cache. | 262 | * e.g. Size of L2 cache. |
252 | */ | 263 | */ |
diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c index fdc4303be563..6038a8c84b74 100644 --- a/arch/arm/mach-omap2/irq.c +++ b/arch/arm/mach-omap2/irq.c | |||
@@ -149,6 +149,7 @@ omap_alloc_gc(void __iomem *base, unsigned int irq_start, unsigned int num) | |||
149 | ct->chip.irq_ack = omap_mask_ack_irq; | 149 | ct->chip.irq_ack = omap_mask_ack_irq; |
150 | ct->chip.irq_mask = irq_gc_mask_disable_reg; | 150 | ct->chip.irq_mask = irq_gc_mask_disable_reg; |
151 | ct->chip.irq_unmask = irq_gc_unmask_enable_reg; | 151 | ct->chip.irq_unmask = irq_gc_unmask_enable_reg; |
152 | ct->chip.flags |= IRQCHIP_SKIP_SET_WAKE; | ||
152 | 153 | ||
153 | ct->regs.enable = INTC_MIR_CLEAR0; | 154 | ct->regs.enable = INTC_MIR_CLEAR0; |
154 | ct->regs.disable = INTC_MIR_SET0; | 155 | ct->regs.disable = INTC_MIR_SET0; |
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c index 80e55c5c9998..4b46b91cca5c 100644 --- a/arch/arm/mach-omap2/mux.c +++ b/arch/arm/mach-omap2/mux.c | |||
@@ -217,8 +217,7 @@ static int __init _omap_mux_get_by_name(struct omap_mux_partition *partition, | |||
217 | return -ENODEV; | 217 | return -ENODEV; |
218 | } | 218 | } |
219 | 219 | ||
220 | static int __init | 220 | int __init omap_mux_get_by_name(const char *muxname, |
221 | omap_mux_get_by_name(const char *muxname, | ||
222 | struct omap_mux_partition **found_partition, | 221 | struct omap_mux_partition **found_partition, |
223 | struct omap_mux **found_mux) | 222 | struct omap_mux **found_mux) |
224 | { | 223 | { |
diff --git a/arch/arm/mach-omap2/mux.h b/arch/arm/mach-omap2/mux.h index 69fe060a0b75..471e62a74a16 100644 --- a/arch/arm/mach-omap2/mux.h +++ b/arch/arm/mach-omap2/mux.h | |||
@@ -59,6 +59,7 @@ | |||
59 | #define OMAP_PIN_OFF_WAKEUPENABLE OMAP_WAKEUP_EN | 59 | #define OMAP_PIN_OFF_WAKEUPENABLE OMAP_WAKEUP_EN |
60 | 60 | ||
61 | #define OMAP_MODE_GPIO(x) (((x) & OMAP_MUX_MODE7) == OMAP_MUX_MODE4) | 61 | #define OMAP_MODE_GPIO(x) (((x) & OMAP_MUX_MODE7) == OMAP_MUX_MODE4) |
62 | #define OMAP_MODE_UART(x) (((x) & OMAP_MUX_MODE7) == OMAP_MUX_MODE0) | ||
62 | 63 | ||
63 | /* Flags for omapX_mux_init */ | 64 | /* Flags for omapX_mux_init */ |
64 | #define OMAP_PACKAGE_MASK 0xffff | 65 | #define OMAP_PACKAGE_MASK 0xffff |
@@ -225,8 +226,18 @@ omap_hwmod_mux_init(struct omap_device_pad *bpads, int nr_pads); | |||
225 | */ | 226 | */ |
226 | void omap_hwmod_mux(struct omap_hwmod_mux_info *hmux, u8 state); | 227 | void omap_hwmod_mux(struct omap_hwmod_mux_info *hmux, u8 state); |
227 | 228 | ||
229 | int omap_mux_get_by_name(const char *muxname, | ||
230 | struct omap_mux_partition **found_partition, | ||
231 | struct omap_mux **found_mux); | ||
228 | #else | 232 | #else |
229 | 233 | ||
234 | static inline int omap_mux_get_by_name(const char *muxname, | ||
235 | struct omap_mux_partition **found_partition, | ||
236 | struct omap_mux **found_mux) | ||
237 | { | ||
238 | return 0; | ||
239 | } | ||
240 | |||
230 | static inline int omap_mux_init_gpio(int gpio, int val) | 241 | static inline int omap_mux_init_gpio(int gpio, int val) |
231 | { | 242 | { |
232 | return 0; | 243 | return 0; |
diff --git a/arch/arm/mach-omap2/omap_l3_smx.c b/arch/arm/mach-omap2/omap_l3_smx.c index a05a62f9ee5b..acc216491b8a 100644 --- a/arch/arm/mach-omap2/omap_l3_smx.c +++ b/arch/arm/mach-omap2/omap_l3_smx.c | |||
@@ -155,10 +155,11 @@ static irqreturn_t omap3_l3_block_irq(struct omap3_l3 *l3, | |||
155 | u8 multi = error & L3_ERROR_LOG_MULTI; | 155 | u8 multi = error & L3_ERROR_LOG_MULTI; |
156 | u32 address = omap3_l3_decode_addr(error_addr); | 156 | u32 address = omap3_l3_decode_addr(error_addr); |
157 | 157 | ||
158 | WARN(true, "%s seen by %s %s at address %x\n", | 158 | pr_err("%s seen by %s %s at address %x\n", |
159 | omap3_l3_code_string(code), | 159 | omap3_l3_code_string(code), |
160 | omap3_l3_initiator_string(initid), | 160 | omap3_l3_initiator_string(initid), |
161 | multi ? "Multiple Errors" : "", address); | 161 | multi ? "Multiple Errors" : "", address); |
162 | WARN_ON(1); | ||
162 | 163 | ||
163 | return IRQ_HANDLED; | 164 | return IRQ_HANDLED; |
164 | } | 165 | } |
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index a34023d0ca7c..3a595e899724 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c | |||
@@ -724,6 +724,7 @@ int __init omap3_pm_init(void) | |||
724 | ret = request_irq(omap_prcm_event_to_irq("io"), | 724 | ret = request_irq(omap_prcm_event_to_irq("io"), |
725 | _prcm_int_handle_io, IRQF_SHARED | IRQF_NO_SUSPEND, "pm_io", | 725 | _prcm_int_handle_io, IRQF_SHARED | IRQF_NO_SUSPEND, "pm_io", |
726 | omap3_pm_init); | 726 | omap3_pm_init); |
727 | enable_irq(omap_prcm_event_to_irq("io")); | ||
727 | 728 | ||
728 | if (ret) { | 729 | if (ret) { |
729 | pr_err("pm: Failed to request pm_io irq\n"); | 730 | pr_err("pm: Failed to request pm_io irq\n"); |
diff --git a/arch/arm/mach-omap2/prm2xxx_3xxx.c b/arch/arm/mach-omap2/prm2xxx_3xxx.c index 9ce765407ad5..21cb74003a56 100644 --- a/arch/arm/mach-omap2/prm2xxx_3xxx.c +++ b/arch/arm/mach-omap2/prm2xxx_3xxx.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/errno.h> | 15 | #include <linux/errno.h> |
16 | #include <linux/err.h> | 16 | #include <linux/err.h> |
17 | #include <linux/io.h> | 17 | #include <linux/io.h> |
18 | #include <linux/irq.h> | ||
18 | 19 | ||
19 | #include "common.h" | 20 | #include "common.h" |
20 | #include <plat/cpu.h> | 21 | #include <plat/cpu.h> |
@@ -303,8 +304,15 @@ void omap3xxx_prm_restore_irqen(u32 *saved_mask) | |||
303 | 304 | ||
304 | static int __init omap3xxx_prcm_init(void) | 305 | static int __init omap3xxx_prcm_init(void) |
305 | { | 306 | { |
306 | if (cpu_is_omap34xx()) | 307 | int ret = 0; |
307 | return omap_prcm_register_chain_handler(&omap3_prcm_irq_setup); | 308 | |
308 | return 0; | 309 | if (cpu_is_omap34xx()) { |
310 | ret = omap_prcm_register_chain_handler(&omap3_prcm_irq_setup); | ||
311 | if (!ret) | ||
312 | irq_set_status_flags(omap_prcm_event_to_irq("io"), | ||
313 | IRQ_NOAUTOEN); | ||
314 | } | ||
315 | |||
316 | return ret; | ||
309 | } | 317 | } |
310 | subsys_initcall(omap3xxx_prcm_init); | 318 | subsys_initcall(omap3xxx_prcm_init); |
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c index 292d4aaca068..c1b93c752d70 100644 --- a/arch/arm/mach-omap2/serial.c +++ b/arch/arm/mach-omap2/serial.c | |||
@@ -57,6 +57,7 @@ struct omap_uart_state { | |||
57 | 57 | ||
58 | struct list_head node; | 58 | struct list_head node; |
59 | struct omap_hwmod *oh; | 59 | struct omap_hwmod *oh; |
60 | struct omap_device_pad default_omap_uart_pads[2]; | ||
60 | }; | 61 | }; |
61 | 62 | ||
62 | static LIST_HEAD(uart_list); | 63 | static LIST_HEAD(uart_list); |
@@ -126,11 +127,70 @@ static void omap_uart_set_smartidle(struct platform_device *pdev) {} | |||
126 | #endif /* CONFIG_PM */ | 127 | #endif /* CONFIG_PM */ |
127 | 128 | ||
128 | #ifdef CONFIG_OMAP_MUX | 129 | #ifdef CONFIG_OMAP_MUX |
129 | static void omap_serial_fill_default_pads(struct omap_board_data *bdata) | 130 | |
131 | #define OMAP_UART_DEFAULT_PAD_NAME_LEN 28 | ||
132 | static char rx_pad_name[OMAP_UART_DEFAULT_PAD_NAME_LEN], | ||
133 | tx_pad_name[OMAP_UART_DEFAULT_PAD_NAME_LEN] __initdata; | ||
134 | |||
135 | static void __init | ||
136 | omap_serial_fill_uart_tx_rx_pads(struct omap_board_data *bdata, | ||
137 | struct omap_uart_state *uart) | ||
138 | { | ||
139 | uart->default_omap_uart_pads[0].name = rx_pad_name; | ||
140 | uart->default_omap_uart_pads[0].flags = OMAP_DEVICE_PAD_REMUX | | ||
141 | OMAP_DEVICE_PAD_WAKEUP; | ||
142 | uart->default_omap_uart_pads[0].enable = OMAP_PIN_INPUT | | ||
143 | OMAP_MUX_MODE0; | ||
144 | uart->default_omap_uart_pads[0].idle = OMAP_PIN_INPUT | OMAP_MUX_MODE0; | ||
145 | uart->default_omap_uart_pads[1].name = tx_pad_name; | ||
146 | uart->default_omap_uart_pads[1].enable = OMAP_PIN_OUTPUT | | ||
147 | OMAP_MUX_MODE0; | ||
148 | bdata->pads = uart->default_omap_uart_pads; | ||
149 | bdata->pads_cnt = ARRAY_SIZE(uart->default_omap_uart_pads); | ||
150 | } | ||
151 | |||
152 | static void __init omap_serial_check_wakeup(struct omap_board_data *bdata, | ||
153 | struct omap_uart_state *uart) | ||
130 | { | 154 | { |
155 | struct omap_mux_partition *tx_partition = NULL, *rx_partition = NULL; | ||
156 | struct omap_mux *rx_mux = NULL, *tx_mux = NULL; | ||
157 | char *rx_fmt, *tx_fmt; | ||
158 | int uart_nr = bdata->id + 1; | ||
159 | |||
160 | if (bdata->id != 2) { | ||
161 | rx_fmt = "uart%d_rx.uart%d_rx"; | ||
162 | tx_fmt = "uart%d_tx.uart%d_tx"; | ||
163 | } else { | ||
164 | rx_fmt = "uart%d_rx_irrx.uart%d_rx_irrx"; | ||
165 | tx_fmt = "uart%d_tx_irtx.uart%d_tx_irtx"; | ||
166 | } | ||
167 | |||
168 | snprintf(rx_pad_name, OMAP_UART_DEFAULT_PAD_NAME_LEN, rx_fmt, | ||
169 | uart_nr, uart_nr); | ||
170 | snprintf(tx_pad_name, OMAP_UART_DEFAULT_PAD_NAME_LEN, tx_fmt, | ||
171 | uart_nr, uart_nr); | ||
172 | |||
173 | if (omap_mux_get_by_name(rx_pad_name, &rx_partition, &rx_mux) >= 0 && | ||
174 | omap_mux_get_by_name | ||
175 | (tx_pad_name, &tx_partition, &tx_mux) >= 0) { | ||
176 | u16 tx_mode, rx_mode; | ||
177 | |||
178 | tx_mode = omap_mux_read(tx_partition, tx_mux->reg_offset); | ||
179 | rx_mode = omap_mux_read(rx_partition, rx_mux->reg_offset); | ||
180 | |||
181 | /* | ||
182 | * Check if uart is used in default tx/rx mode i.e. in mux mode0 | ||
183 | * if yes then configure rx pin for wake up capability | ||
184 | */ | ||
185 | if (OMAP_MODE_UART(rx_mode) && OMAP_MODE_UART(tx_mode)) | ||
186 | omap_serial_fill_uart_tx_rx_pads(bdata, uart); | ||
187 | } | ||
131 | } | 188 | } |
132 | #else | 189 | #else |
133 | static void omap_serial_fill_default_pads(struct omap_board_data *bdata) {} | 190 | static void __init omap_serial_check_wakeup(struct omap_board_data *bdata, |
191 | struct omap_uart_state *uart) | ||
192 | { | ||
193 | } | ||
134 | #endif | 194 | #endif |
135 | 195 | ||
136 | static char *cmdline_find_option(char *str) | 196 | static char *cmdline_find_option(char *str) |
@@ -287,8 +347,7 @@ void __init omap_serial_board_init(struct omap_uart_port_info *info) | |||
287 | bdata.pads = NULL; | 347 | bdata.pads = NULL; |
288 | bdata.pads_cnt = 0; | 348 | bdata.pads_cnt = 0; |
289 | 349 | ||
290 | if (cpu_is_omap44xx() || cpu_is_omap34xx()) | 350 | omap_serial_check_wakeup(&bdata, uart); |
291 | omap_serial_fill_default_pads(&bdata); | ||
292 | 351 | ||
293 | if (!info) | 352 | if (!info) |
294 | omap_serial_init_port(&bdata, NULL); | 353 | omap_serial_init_port(&bdata, NULL); |
diff --git a/arch/arm/plat-mxc/epit.c b/arch/arm/plat-mxc/epit.c index 9129c9e7d532..88726f4dbbfa 100644 --- a/arch/arm/plat-mxc/epit.c +++ b/arch/arm/plat-mxc/epit.c | |||
@@ -50,6 +50,7 @@ | |||
50 | #include <linux/irq.h> | 50 | #include <linux/irq.h> |
51 | #include <linux/clockchips.h> | 51 | #include <linux/clockchips.h> |
52 | #include <linux/clk.h> | 52 | #include <linux/clk.h> |
53 | #include <linux/err.h> | ||
53 | 54 | ||
54 | #include <mach/hardware.h> | 55 | #include <mach/hardware.h> |
55 | #include <asm/mach/time.h> | 56 | #include <asm/mach/time.h> |
@@ -201,8 +202,16 @@ static int __init epit_clockevent_init(struct clk *timer_clk) | |||
201 | return 0; | 202 | return 0; |
202 | } | 203 | } |
203 | 204 | ||
204 | void __init epit_timer_init(struct clk *timer_clk, void __iomem *base, int irq) | 205 | void __init epit_timer_init(void __iomem *base, int irq) |
205 | { | 206 | { |
207 | struct clk *timer_clk; | ||
208 | |||
209 | timer_clk = clk_get_sys("imx-epit.0", NULL); | ||
210 | if (IS_ERR(timer_clk)) { | ||
211 | pr_err("i.MX epit: unable to get clk\n"); | ||
212 | return; | ||
213 | } | ||
214 | |||
206 | clk_prepare_enable(timer_clk); | 215 | clk_prepare_enable(timer_clk); |
207 | 216 | ||
208 | timer_base = base; | 217 | timer_base = base; |
diff --git a/arch/arm/plat-mxc/include/mach/common.h b/arch/arm/plat-mxc/include/mach/common.h index cf663d84e7c1..e429ca1b814a 100644 --- a/arch/arm/plat-mxc/include/mach/common.h +++ b/arch/arm/plat-mxc/include/mach/common.h | |||
@@ -54,8 +54,8 @@ extern void imx50_soc_init(void); | |||
54 | extern void imx51_soc_init(void); | 54 | extern void imx51_soc_init(void); |
55 | extern void imx53_soc_init(void); | 55 | extern void imx53_soc_init(void); |
56 | extern void imx51_init_late(void); | 56 | extern void imx51_init_late(void); |
57 | extern void epit_timer_init(struct clk *timer_clk, void __iomem *base, int irq); | 57 | extern void epit_timer_init(void __iomem *base, int irq); |
58 | extern void mxc_timer_init(struct clk *timer_clk, void __iomem *, int); | 58 | extern void mxc_timer_init(void __iomem *, int); |
59 | extern int mx1_clocks_init(unsigned long fref); | 59 | extern int mx1_clocks_init(unsigned long fref); |
60 | extern int mx21_clocks_init(unsigned long lref, unsigned long fref); | 60 | extern int mx21_clocks_init(unsigned long lref, unsigned long fref); |
61 | extern int mx25_clocks_init(void); | 61 | extern int mx25_clocks_init(void); |
diff --git a/arch/arm/plat-mxc/time.c b/arch/arm/plat-mxc/time.c index 99f958ca6cb8..00e8e659e667 100644 --- a/arch/arm/plat-mxc/time.c +++ b/arch/arm/plat-mxc/time.c | |||
@@ -58,6 +58,7 @@ | |||
58 | /* MX31, MX35, MX25, MX5 */ | 58 | /* MX31, MX35, MX25, MX5 */ |
59 | #define V2_TCTL_WAITEN (1 << 3) /* Wait enable mode */ | 59 | #define V2_TCTL_WAITEN (1 << 3) /* Wait enable mode */ |
60 | #define V2_TCTL_CLK_IPG (1 << 6) | 60 | #define V2_TCTL_CLK_IPG (1 << 6) |
61 | #define V2_TCTL_CLK_PER (2 << 6) | ||
61 | #define V2_TCTL_FRR (1 << 9) | 62 | #define V2_TCTL_FRR (1 << 9) |
62 | #define V2_IR 0x0c | 63 | #define V2_IR 0x0c |
63 | #define V2_TSTAT 0x08 | 64 | #define V2_TSTAT 0x08 |
@@ -280,23 +281,22 @@ static int __init mxc_clockevent_init(struct clk *timer_clk) | |||
280 | return 0; | 281 | return 0; |
281 | } | 282 | } |
282 | 283 | ||
283 | void __init mxc_timer_init(struct clk *timer_clk, void __iomem *base, int irq) | 284 | void __init mxc_timer_init(void __iomem *base, int irq) |
284 | { | 285 | { |
285 | uint32_t tctl_val; | 286 | uint32_t tctl_val; |
287 | struct clk *timer_clk; | ||
286 | struct clk *timer_ipg_clk; | 288 | struct clk *timer_ipg_clk; |
287 | 289 | ||
288 | if (!timer_clk) { | 290 | timer_clk = clk_get_sys("imx-gpt.0", "per"); |
289 | timer_clk = clk_get_sys("imx-gpt.0", "per"); | 291 | if (IS_ERR(timer_clk)) { |
290 | if (IS_ERR(timer_clk)) { | 292 | pr_err("i.MX timer: unable to get clk\n"); |
291 | pr_err("i.MX timer: unable to get clk\n"); | 293 | return; |
292 | return; | ||
293 | } | ||
294 | |||
295 | timer_ipg_clk = clk_get_sys("imx-gpt.0", "ipg"); | ||
296 | if (!IS_ERR(timer_ipg_clk)) | ||
297 | clk_prepare_enable(timer_ipg_clk); | ||
298 | } | 294 | } |
299 | 295 | ||
296 | timer_ipg_clk = clk_get_sys("imx-gpt.0", "ipg"); | ||
297 | if (!IS_ERR(timer_ipg_clk)) | ||
298 | clk_prepare_enable(timer_ipg_clk); | ||
299 | |||
300 | clk_prepare_enable(timer_clk); | 300 | clk_prepare_enable(timer_clk); |
301 | 301 | ||
302 | timer_base = base; | 302 | timer_base = base; |
@@ -309,7 +309,7 @@ void __init mxc_timer_init(struct clk *timer_clk, void __iomem *base, int irq) | |||
309 | __raw_writel(0, timer_base + MXC_TPRER); /* see datasheet note */ | 309 | __raw_writel(0, timer_base + MXC_TPRER); /* see datasheet note */ |
310 | 310 | ||
311 | if (timer_is_v2()) | 311 | if (timer_is_v2()) |
312 | tctl_val = V2_TCTL_CLK_IPG | V2_TCTL_FRR | V2_TCTL_WAITEN | MXC_TCTL_TEN; | 312 | tctl_val = V2_TCTL_CLK_PER | V2_TCTL_FRR | V2_TCTL_WAITEN | MXC_TCTL_TEN; |
313 | else | 313 | else |
314 | tctl_val = MX1_2_TCTL_FRR | MX1_2_TCTL_CLK_PCLK1 | MXC_TCTL_TEN; | 314 | tctl_val = MX1_2_TCTL_FRR | MX1_2_TCTL_CLK_PCLK1 | MXC_TCTL_TEN; |
315 | 315 | ||
diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h index 297245dba66e..de6c0a08f461 100644 --- a/arch/arm/plat-omap/include/plat/cpu.h +++ b/arch/arm/plat-omap/include/plat/cpu.h | |||
@@ -252,8 +252,6 @@ IS_AM_SUBCLASS(335x, 0x335) | |||
252 | * cpu_is_omap2423(): True for OMAP2423 | 252 | * cpu_is_omap2423(): True for OMAP2423 |
253 | * cpu_is_omap2430(): True for OMAP2430 | 253 | * cpu_is_omap2430(): True for OMAP2430 |
254 | * cpu_is_omap3430(): True for OMAP3430 | 254 | * cpu_is_omap3430(): True for OMAP3430 |
255 | * cpu_is_omap3505(): True for OMAP3505 | ||
256 | * cpu_is_omap3517(): True for OMAP3517 | ||
257 | */ | 255 | */ |
258 | #define GET_OMAP_TYPE ((omap_rev() >> 16) & 0xffff) | 256 | #define GET_OMAP_TYPE ((omap_rev() >> 16) & 0xffff) |
259 | 257 | ||
@@ -277,8 +275,6 @@ IS_OMAP_TYPE(2422, 0x2422) | |||
277 | IS_OMAP_TYPE(2423, 0x2423) | 275 | IS_OMAP_TYPE(2423, 0x2423) |
278 | IS_OMAP_TYPE(2430, 0x2430) | 276 | IS_OMAP_TYPE(2430, 0x2430) |
279 | IS_OMAP_TYPE(3430, 0x3430) | 277 | IS_OMAP_TYPE(3430, 0x3430) |
280 | IS_OMAP_TYPE(3505, 0x3517) | ||
281 | IS_OMAP_TYPE(3517, 0x3517) | ||
282 | 278 | ||
283 | #define cpu_is_omap310() 0 | 279 | #define cpu_is_omap310() 0 |
284 | #define cpu_is_omap730() 0 | 280 | #define cpu_is_omap730() 0 |
@@ -293,12 +289,6 @@ IS_OMAP_TYPE(3517, 0x3517) | |||
293 | #define cpu_is_omap2422() 0 | 289 | #define cpu_is_omap2422() 0 |
294 | #define cpu_is_omap2423() 0 | 290 | #define cpu_is_omap2423() 0 |
295 | #define cpu_is_omap2430() 0 | 291 | #define cpu_is_omap2430() 0 |
296 | #define cpu_is_omap3503() 0 | ||
297 | #define cpu_is_omap3515() 0 | ||
298 | #define cpu_is_omap3525() 0 | ||
299 | #define cpu_is_omap3530() 0 | ||
300 | #define cpu_is_omap3505() 0 | ||
301 | #define cpu_is_omap3517() 0 | ||
302 | #define cpu_is_omap3430() 0 | 292 | #define cpu_is_omap3430() 0 |
303 | #define cpu_is_omap3630() 0 | 293 | #define cpu_is_omap3630() 0 |
304 | 294 | ||
@@ -350,12 +340,6 @@ IS_OMAP_TYPE(3517, 0x3517) | |||
350 | 340 | ||
351 | #if defined(CONFIG_ARCH_OMAP3) | 341 | #if defined(CONFIG_ARCH_OMAP3) |
352 | # undef cpu_is_omap3430 | 342 | # undef cpu_is_omap3430 |
353 | # undef cpu_is_omap3503 | ||
354 | # undef cpu_is_omap3515 | ||
355 | # undef cpu_is_omap3525 | ||
356 | # undef cpu_is_omap3530 | ||
357 | # undef cpu_is_omap3505 | ||
358 | # undef cpu_is_omap3517 | ||
359 | # undef cpu_is_ti81xx | 343 | # undef cpu_is_ti81xx |
360 | # undef cpu_is_ti816x | 344 | # undef cpu_is_ti816x |
361 | # undef cpu_is_ti814x | 345 | # undef cpu_is_ti814x |
@@ -363,19 +347,6 @@ IS_OMAP_TYPE(3517, 0x3517) | |||
363 | # undef cpu_is_am33xx | 347 | # undef cpu_is_am33xx |
364 | # undef cpu_is_am335x | 348 | # undef cpu_is_am335x |
365 | # define cpu_is_omap3430() is_omap3430() | 349 | # define cpu_is_omap3430() is_omap3430() |
366 | # define cpu_is_omap3503() (cpu_is_omap3430() && \ | ||
367 | (!omap3_has_iva()) && \ | ||
368 | (!omap3_has_sgx())) | ||
369 | # define cpu_is_omap3515() (cpu_is_omap3430() && \ | ||
370 | (!omap3_has_iva()) && \ | ||
371 | (omap3_has_sgx())) | ||
372 | # define cpu_is_omap3525() (cpu_is_omap3430() && \ | ||
373 | (!omap3_has_sgx()) && \ | ||
374 | (omap3_has_iva())) | ||
375 | # define cpu_is_omap3530() (cpu_is_omap3430()) | ||
376 | # define cpu_is_omap3517() is_omap3517() | ||
377 | # define cpu_is_omap3505() (cpu_is_omap3517() && \ | ||
378 | !omap3_has_sgx()) | ||
379 | # undef cpu_is_omap3630 | 350 | # undef cpu_is_omap3630 |
380 | # define cpu_is_omap3630() is_omap363x() | 351 | # define cpu_is_omap3630() is_omap363x() |
381 | # define cpu_is_ti81xx() is_ti81xx() | 352 | # define cpu_is_ti81xx() is_ti81xx() |
@@ -424,10 +395,6 @@ IS_OMAP_TYPE(3517, 0x3517) | |||
424 | #define OMAP3630_REV_ES1_1 (OMAP363X_CLASS | (0x1 << 8)) | 395 | #define OMAP3630_REV_ES1_1 (OMAP363X_CLASS | (0x1 << 8)) |
425 | #define OMAP3630_REV_ES1_2 (OMAP363X_CLASS | (0x2 << 8)) | 396 | #define OMAP3630_REV_ES1_2 (OMAP363X_CLASS | (0x2 << 8)) |
426 | 397 | ||
427 | #define OMAP3517_CLASS 0x35170034 | ||
428 | #define OMAP3517_REV_ES1_0 OMAP3517_CLASS | ||
429 | #define OMAP3517_REV_ES1_1 (OMAP3517_CLASS | (0x1 << 8)) | ||
430 | |||
431 | #define TI816X_CLASS 0x81600034 | 398 | #define TI816X_CLASS 0x81600034 |
432 | #define TI8168_REV_ES1_0 TI816X_CLASS | 399 | #define TI8168_REV_ES1_0 TI816X_CLASS |
433 | #define TI8168_REV_ES1_1 (TI816X_CLASS | (0x1 << 8)) | 400 | #define TI8168_REV_ES1_1 (TI816X_CLASS | (0x1 << 8)) |
diff --git a/arch/arm/plat-omap/include/plat/mmc.h b/arch/arm/plat-omap/include/plat/mmc.h index a7754a886d42..5493bd95da5e 100644 --- a/arch/arm/plat-omap/include/plat/mmc.h +++ b/arch/arm/plat-omap/include/plat/mmc.h | |||
@@ -172,8 +172,7 @@ struct omap_mmc_platform_data { | |||
172 | extern void omap_mmc_notify_cover_event(struct device *dev, int slot, | 172 | extern void omap_mmc_notify_cover_event(struct device *dev, int slot, |
173 | int is_closed); | 173 | int is_closed); |
174 | 174 | ||
175 | #if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE) || \ | 175 | #if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE) |
176 | defined(CONFIG_MMC_OMAP_HS) || defined(CONFIG_MMC_OMAP_HS_MODULE) | ||
177 | void omap1_init_mmc(struct omap_mmc_platform_data **mmc_data, | 176 | void omap1_init_mmc(struct omap_mmc_platform_data **mmc_data, |
178 | int nr_controllers); | 177 | int nr_controllers); |
179 | void omap242x_init_mmc(struct omap_mmc_platform_data **mmc_data); | 178 | void omap242x_init_mmc(struct omap_mmc_platform_data **mmc_data); |
@@ -185,7 +184,6 @@ static inline void omap1_init_mmc(struct omap_mmc_platform_data **mmc_data, | |||
185 | static inline void omap242x_init_mmc(struct omap_mmc_platform_data **mmc_data) | 184 | static inline void omap242x_init_mmc(struct omap_mmc_platform_data **mmc_data) |
186 | { | 185 | { |
187 | } | 186 | } |
188 | |||
189 | #endif | 187 | #endif |
190 | 188 | ||
191 | extern int omap_msdi_reset(struct omap_hwmod *oh); | 189 | extern int omap_msdi_reset(struct omap_hwmod *oh); |