diff options
75 files changed, 572 insertions, 240 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 84449dd8f031..b1b27525b24d 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -293,6 +293,7 @@ config ARCH_VERSATILE | |||
293 | select ICST | 293 | select ICST |
294 | select GENERIC_CLOCKEVENTS | 294 | select GENERIC_CLOCKEVENTS |
295 | select ARCH_WANT_OPTIONAL_GPIOLIB | 295 | select ARCH_WANT_OPTIONAL_GPIOLIB |
296 | select NEED_MACH_IO_H if PCI | ||
296 | select PLAT_VERSATILE | 297 | select PLAT_VERSATILE |
297 | select PLAT_VERSATILE_CLCD | 298 | select PLAT_VERSATILE_CLCD |
298 | select PLAT_VERSATILE_FPGA_IRQ | 299 | select PLAT_VERSATILE_FPGA_IRQ |
diff --git a/arch/arm/boot/dts/mmp2-brownstone.dts b/arch/arm/boot/dts/mmp2-brownstone.dts index 153a4b2d12b5..c9b4f27d191e 100644 --- a/arch/arm/boot/dts/mmp2-brownstone.dts +++ b/arch/arm/boot/dts/mmp2-brownstone.dts | |||
@@ -11,7 +11,7 @@ | |||
11 | /include/ "mmp2.dtsi" | 11 | /include/ "mmp2.dtsi" |
12 | 12 | ||
13 | / { | 13 | / { |
14 | model = "Marvell MMP2 Aspenite Development Board"; | 14 | model = "Marvell MMP2 Brownstone Development Board"; |
15 | compatible = "mrvl,mmp2-brownstone", "mrvl,mmp2"; | 15 | compatible = "mrvl,mmp2-brownstone", "mrvl,mmp2"; |
16 | 16 | ||
17 | chosen { | 17 | chosen { |
@@ -19,7 +19,7 @@ | |||
19 | }; | 19 | }; |
20 | 20 | ||
21 | memory { | 21 | memory { |
22 | reg = <0x00000000 0x04000000>; | 22 | reg = <0x00000000 0x08000000>; |
23 | }; | 23 | }; |
24 | 24 | ||
25 | soc { | 25 | soc { |
diff --git a/arch/arm/boot/dts/omap2.dtsi b/arch/arm/boot/dts/omap2.dtsi index f2ab4ea7cc0e..581cb081cb0f 100644 --- a/arch/arm/boot/dts/omap2.dtsi +++ b/arch/arm/boot/dts/omap2.dtsi | |||
@@ -44,6 +44,8 @@ | |||
44 | compatible = "ti,omap2-intc"; | 44 | compatible = "ti,omap2-intc"; |
45 | interrupt-controller; | 45 | interrupt-controller; |
46 | #interrupt-cells = <1>; | 46 | #interrupt-cells = <1>; |
47 | ti,intc-size = <96>; | ||
48 | reg = <0x480FE000 0x1000>; | ||
47 | }; | 49 | }; |
48 | 50 | ||
49 | uart1: serial@4806a000 { | 51 | uart1: serial@4806a000 { |
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-kirkwood/board-iconnect.c b/arch/arm/mach-kirkwood/board-iconnect.c index 2222c5739519..b0d3cc49269d 100644 --- a/arch/arm/mach-kirkwood/board-iconnect.c +++ b/arch/arm/mach-kirkwood/board-iconnect.c | |||
@@ -20,9 +20,6 @@ | |||
20 | #include <linux/mv643xx_eth.h> | 20 | #include <linux/mv643xx_eth.h> |
21 | #include <linux/gpio.h> | 21 | #include <linux/gpio.h> |
22 | #include <linux/leds.h> | 22 | #include <linux/leds.h> |
23 | #include <linux/spi/flash.h> | ||
24 | #include <linux/spi/spi.h> | ||
25 | #include <linux/spi/orion_spi.h> | ||
26 | #include <linux/i2c.h> | 23 | #include <linux/i2c.h> |
27 | #include <linux/input.h> | 24 | #include <linux/input.h> |
28 | #include <linux/gpio_keys.h> | 25 | #include <linux/gpio_keys.h> |
diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c index 25fb3fd418ef..e1d2c6def5e6 100644 --- a/arch/arm/mach-kirkwood/common.c +++ b/arch/arm/mach-kirkwood/common.c | |||
@@ -193,9 +193,11 @@ static struct clk __init *kirkwood_register_gate_fn(const char *name, | |||
193 | bit_idx, 0, &gating_lock, fn); | 193 | bit_idx, 0, &gating_lock, fn); |
194 | } | 194 | } |
195 | 195 | ||
196 | static struct clk *ge0, *ge1; | ||
197 | |||
196 | void __init kirkwood_clk_init(void) | 198 | void __init kirkwood_clk_init(void) |
197 | { | 199 | { |
198 | struct clk *runit, *ge0, *ge1, *sata0, *sata1, *usb0, *sdio; | 200 | struct clk *runit, *sata0, *sata1, *usb0, *sdio; |
199 | struct clk *crypto, *xor0, *xor1, *pex0, *pex1, *audio; | 201 | struct clk *crypto, *xor0, *xor1, *pex0, *pex1, *audio; |
200 | 202 | ||
201 | tclk = clk_register_fixed_rate(NULL, "tclk", NULL, | 203 | tclk = clk_register_fixed_rate(NULL, "tclk", NULL, |
@@ -257,6 +259,9 @@ void __init kirkwood_ge00_init(struct mv643xx_eth_platform_data *eth_data) | |||
257 | orion_ge00_init(eth_data, | 259 | orion_ge00_init(eth_data, |
258 | GE00_PHYS_BASE, IRQ_KIRKWOOD_GE00_SUM, | 260 | GE00_PHYS_BASE, IRQ_KIRKWOOD_GE00_SUM, |
259 | IRQ_KIRKWOOD_GE00_ERR); | 261 | IRQ_KIRKWOOD_GE00_ERR); |
262 | /* The interface forgets the MAC address assigned by u-boot if | ||
263 | the clock is turned off, so claim the clk now. */ | ||
264 | clk_prepare_enable(ge0); | ||
260 | } | 265 | } |
261 | 266 | ||
262 | 267 | ||
@@ -268,6 +273,7 @@ void __init kirkwood_ge01_init(struct mv643xx_eth_platform_data *eth_data) | |||
268 | orion_ge01_init(eth_data, | 273 | orion_ge01_init(eth_data, |
269 | GE01_PHYS_BASE, IRQ_KIRKWOOD_GE01_SUM, | 274 | GE01_PHYS_BASE, IRQ_KIRKWOOD_GE01_SUM, |
270 | IRQ_KIRKWOOD_GE01_ERR); | 275 | IRQ_KIRKWOOD_GE01_ERR); |
276 | clk_prepare_enable(ge1); | ||
271 | } | 277 | } |
272 | 278 | ||
273 | 279 | ||
diff --git a/arch/arm/mach-mmp/irq.c b/arch/arm/mach-mmp/irq.c index fcfe0e3bd701..e60c7d98922b 100644 --- a/arch/arm/mach-mmp/irq.c +++ b/arch/arm/mach-mmp/irq.c | |||
@@ -241,6 +241,7 @@ void __init mmp2_init_icu(void) | |||
241 | icu_data[1].clr_mfp_irq_base = IRQ_MMP2_PMIC_BASE; | 241 | icu_data[1].clr_mfp_irq_base = IRQ_MMP2_PMIC_BASE; |
242 | icu_data[1].clr_mfp_hwirq = IRQ_MMP2_PMIC - IRQ_MMP2_PMIC_BASE; | 242 | icu_data[1].clr_mfp_hwirq = IRQ_MMP2_PMIC - IRQ_MMP2_PMIC_BASE; |
243 | icu_data[1].nr_irqs = 2; | 243 | icu_data[1].nr_irqs = 2; |
244 | icu_data[1].cascade_irq = 4; | ||
244 | icu_data[1].virq_base = IRQ_MMP2_PMIC_BASE; | 245 | icu_data[1].virq_base = IRQ_MMP2_PMIC_BASE; |
245 | icu_data[1].domain = irq_domain_add_legacy(NULL, icu_data[1].nr_irqs, | 246 | icu_data[1].domain = irq_domain_add_legacy(NULL, icu_data[1].nr_irqs, |
246 | icu_data[1].virq_base, 0, | 247 | icu_data[1].virq_base, 0, |
@@ -249,6 +250,7 @@ void __init mmp2_init_icu(void) | |||
249 | icu_data[2].reg_status = mmp_icu_base + 0x154; | 250 | icu_data[2].reg_status = mmp_icu_base + 0x154; |
250 | icu_data[2].reg_mask = mmp_icu_base + 0x16c; | 251 | icu_data[2].reg_mask = mmp_icu_base + 0x16c; |
251 | icu_data[2].nr_irqs = 2; | 252 | icu_data[2].nr_irqs = 2; |
253 | icu_data[2].cascade_irq = 5; | ||
252 | icu_data[2].virq_base = IRQ_MMP2_RTC_BASE; | 254 | icu_data[2].virq_base = IRQ_MMP2_RTC_BASE; |
253 | icu_data[2].domain = irq_domain_add_legacy(NULL, icu_data[2].nr_irqs, | 255 | icu_data[2].domain = irq_domain_add_legacy(NULL, icu_data[2].nr_irqs, |
254 | icu_data[2].virq_base, 0, | 256 | icu_data[2].virq_base, 0, |
@@ -257,6 +259,7 @@ void __init mmp2_init_icu(void) | |||
257 | icu_data[3].reg_status = mmp_icu_base + 0x180; | 259 | icu_data[3].reg_status = mmp_icu_base + 0x180; |
258 | icu_data[3].reg_mask = mmp_icu_base + 0x17c; | 260 | icu_data[3].reg_mask = mmp_icu_base + 0x17c; |
259 | icu_data[3].nr_irqs = 3; | 261 | icu_data[3].nr_irqs = 3; |
262 | icu_data[3].cascade_irq = 9; | ||
260 | icu_data[3].virq_base = IRQ_MMP2_KEYPAD_BASE; | 263 | icu_data[3].virq_base = IRQ_MMP2_KEYPAD_BASE; |
261 | icu_data[3].domain = irq_domain_add_legacy(NULL, icu_data[3].nr_irqs, | 264 | icu_data[3].domain = irq_domain_add_legacy(NULL, icu_data[3].nr_irqs, |
262 | icu_data[3].virq_base, 0, | 265 | icu_data[3].virq_base, 0, |
@@ -265,6 +268,7 @@ void __init mmp2_init_icu(void) | |||
265 | icu_data[4].reg_status = mmp_icu_base + 0x158; | 268 | icu_data[4].reg_status = mmp_icu_base + 0x158; |
266 | icu_data[4].reg_mask = mmp_icu_base + 0x170; | 269 | icu_data[4].reg_mask = mmp_icu_base + 0x170; |
267 | icu_data[4].nr_irqs = 5; | 270 | icu_data[4].nr_irqs = 5; |
271 | icu_data[4].cascade_irq = 17; | ||
268 | icu_data[4].virq_base = IRQ_MMP2_TWSI_BASE; | 272 | icu_data[4].virq_base = IRQ_MMP2_TWSI_BASE; |
269 | icu_data[4].domain = irq_domain_add_legacy(NULL, icu_data[4].nr_irqs, | 273 | icu_data[4].domain = irq_domain_add_legacy(NULL, icu_data[4].nr_irqs, |
270 | icu_data[4].virq_base, 0, | 274 | icu_data[4].virq_base, 0, |
@@ -273,6 +277,7 @@ void __init mmp2_init_icu(void) | |||
273 | icu_data[5].reg_status = mmp_icu_base + 0x15c; | 277 | icu_data[5].reg_status = mmp_icu_base + 0x15c; |
274 | icu_data[5].reg_mask = mmp_icu_base + 0x174; | 278 | icu_data[5].reg_mask = mmp_icu_base + 0x174; |
275 | icu_data[5].nr_irqs = 15; | 279 | icu_data[5].nr_irqs = 15; |
280 | icu_data[5].cascade_irq = 35; | ||
276 | icu_data[5].virq_base = IRQ_MMP2_MISC_BASE; | 281 | icu_data[5].virq_base = IRQ_MMP2_MISC_BASE; |
277 | icu_data[5].domain = irq_domain_add_legacy(NULL, icu_data[5].nr_irqs, | 282 | icu_data[5].domain = irq_domain_add_legacy(NULL, icu_data[5].nr_irqs, |
278 | icu_data[5].virq_base, 0, | 283 | icu_data[5].virq_base, 0, |
@@ -281,6 +286,7 @@ void __init mmp2_init_icu(void) | |||
281 | icu_data[6].reg_status = mmp_icu_base + 0x160; | 286 | icu_data[6].reg_status = mmp_icu_base + 0x160; |
282 | icu_data[6].reg_mask = mmp_icu_base + 0x178; | 287 | icu_data[6].reg_mask = mmp_icu_base + 0x178; |
283 | icu_data[6].nr_irqs = 2; | 288 | icu_data[6].nr_irqs = 2; |
289 | icu_data[6].cascade_irq = 51; | ||
284 | icu_data[6].virq_base = IRQ_MMP2_MIPI_HSI1_BASE; | 290 | icu_data[6].virq_base = IRQ_MMP2_MIPI_HSI1_BASE; |
285 | icu_data[6].domain = irq_domain_add_legacy(NULL, icu_data[6].nr_irqs, | 291 | icu_data[6].domain = irq_domain_add_legacy(NULL, icu_data[6].nr_irqs, |
286 | icu_data[6].virq_base, 0, | 292 | icu_data[6].virq_base, 0, |
@@ -289,6 +295,7 @@ void __init mmp2_init_icu(void) | |||
289 | icu_data[7].reg_status = mmp_icu_base + 0x188; | 295 | icu_data[7].reg_status = mmp_icu_base + 0x188; |
290 | icu_data[7].reg_mask = mmp_icu_base + 0x184; | 296 | icu_data[7].reg_mask = mmp_icu_base + 0x184; |
291 | icu_data[7].nr_irqs = 2; | 297 | icu_data[7].nr_irqs = 2; |
298 | icu_data[7].cascade_irq = 55; | ||
292 | icu_data[7].virq_base = IRQ_MMP2_MIPI_HSI0_BASE; | 299 | icu_data[7].virq_base = IRQ_MMP2_MIPI_HSI0_BASE; |
293 | icu_data[7].domain = irq_domain_add_legacy(NULL, icu_data[7].nr_irqs, | 300 | icu_data[7].domain = irq_domain_add_legacy(NULL, icu_data[7].nr_irqs, |
294 | icu_data[7].virq_base, 0, | 301 | icu_data[7].virq_base, 0, |
diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c index 8ca14e88a31a..2c5d0ed75285 100644 --- a/arch/arm/mach-omap2/board-n8x0.c +++ b/arch/arm/mach-omap2/board-n8x0.c | |||
@@ -83,11 +83,9 @@ static struct musb_hdrc_config musb_config = { | |||
83 | }; | 83 | }; |
84 | 84 | ||
85 | static struct musb_hdrc_platform_data tusb_data = { | 85 | static struct musb_hdrc_platform_data tusb_data = { |
86 | #if defined(CONFIG_USB_MUSB_OTG) | 86 | #ifdef CONFIG_USB_GADGET_MUSB_HDRC |
87 | .mode = MUSB_OTG, | 87 | .mode = MUSB_OTG, |
88 | #elif defined(CONFIG_USB_MUSB_PERIPHERAL) | 88 | #else |
89 | .mode = MUSB_PERIPHERAL, | ||
90 | #else /* defined(CONFIG_USB_MUSB_HOST) */ | ||
91 | .mode = MUSB_HOST, | 89 | .mode = MUSB_HOST, |
92 | #endif | 90 | #endif |
93 | .set_power = tusb_set_power, | 91 | .set_power = tusb_set_power, |
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c index 79c6909eeb78..580fd17208da 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c | |||
@@ -81,13 +81,13 @@ static u8 omap3_beagle_version; | |||
81 | static struct { | 81 | static struct { |
82 | int mmc1_gpio_wp; | 82 | int mmc1_gpio_wp; |
83 | int usb_pwr_level; | 83 | int usb_pwr_level; |
84 | int reset_gpio; | 84 | int dvi_pd_gpio; |
85 | int usr_button_gpio; | 85 | int usr_button_gpio; |
86 | int mmc_caps; | 86 | int mmc_caps; |
87 | } beagle_config = { | 87 | } beagle_config = { |
88 | .mmc1_gpio_wp = -EINVAL, | 88 | .mmc1_gpio_wp = -EINVAL, |
89 | .usb_pwr_level = GPIOF_OUT_INIT_LOW, | 89 | .usb_pwr_level = GPIOF_OUT_INIT_LOW, |
90 | .reset_gpio = 129, | 90 | .dvi_pd_gpio = -EINVAL, |
91 | .usr_button_gpio = 4, | 91 | .usr_button_gpio = 4, |
92 | .mmc_caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA, | 92 | .mmc_caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA, |
93 | }; | 93 | }; |
@@ -126,21 +126,21 @@ static void __init omap3_beagle_init_rev(void) | |||
126 | printk(KERN_INFO "OMAP3 Beagle Rev: Ax/Bx\n"); | 126 | printk(KERN_INFO "OMAP3 Beagle Rev: Ax/Bx\n"); |
127 | omap3_beagle_version = OMAP3BEAGLE_BOARD_AXBX; | 127 | omap3_beagle_version = OMAP3BEAGLE_BOARD_AXBX; |
128 | beagle_config.mmc1_gpio_wp = 29; | 128 | beagle_config.mmc1_gpio_wp = 29; |
129 | beagle_config.reset_gpio = 170; | 129 | beagle_config.dvi_pd_gpio = 170; |
130 | beagle_config.usr_button_gpio = 7; | 130 | beagle_config.usr_button_gpio = 7; |
131 | break; | 131 | break; |
132 | case 6: | 132 | case 6: |
133 | printk(KERN_INFO "OMAP3 Beagle Rev: C1/C2/C3\n"); | 133 | printk(KERN_INFO "OMAP3 Beagle Rev: C1/C2/C3\n"); |
134 | omap3_beagle_version = OMAP3BEAGLE_BOARD_C1_3; | 134 | omap3_beagle_version = OMAP3BEAGLE_BOARD_C1_3; |
135 | beagle_config.mmc1_gpio_wp = 23; | 135 | beagle_config.mmc1_gpio_wp = 23; |
136 | beagle_config.reset_gpio = 170; | 136 | beagle_config.dvi_pd_gpio = 170; |
137 | beagle_config.usr_button_gpio = 7; | 137 | beagle_config.usr_button_gpio = 7; |
138 | break; | 138 | break; |
139 | case 5: | 139 | case 5: |
140 | printk(KERN_INFO "OMAP3 Beagle Rev: C4\n"); | 140 | printk(KERN_INFO "OMAP3 Beagle Rev: C4\n"); |
141 | omap3_beagle_version = OMAP3BEAGLE_BOARD_C4; | 141 | omap3_beagle_version = OMAP3BEAGLE_BOARD_C4; |
142 | beagle_config.mmc1_gpio_wp = 23; | 142 | beagle_config.mmc1_gpio_wp = 23; |
143 | beagle_config.reset_gpio = 170; | 143 | beagle_config.dvi_pd_gpio = 170; |
144 | beagle_config.usr_button_gpio = 7; | 144 | beagle_config.usr_button_gpio = 7; |
145 | break; | 145 | break; |
146 | case 0: | 146 | case 0: |
@@ -274,11 +274,9 @@ static int beagle_twl_gpio_setup(struct device *dev, | |||
274 | if (r) | 274 | if (r) |
275 | pr_err("%s: unable to configure nDVI_PWR_EN\n", | 275 | pr_err("%s: unable to configure nDVI_PWR_EN\n", |
276 | __func__); | 276 | __func__); |
277 | r = gpio_request_one(gpio + 2, GPIOF_OUT_INIT_HIGH, | 277 | |
278 | "DVI_LDO_EN"); | 278 | beagle_config.dvi_pd_gpio = gpio + 2; |
279 | if (r) | 279 | |
280 | pr_err("%s: unable to configure DVI_LDO_EN\n", | ||
281 | __func__); | ||
282 | } else { | 280 | } else { |
283 | /* | 281 | /* |
284 | * REVISIT: need ehci-omap hooks for external VBUS | 282 | * REVISIT: need ehci-omap hooks for external VBUS |
@@ -287,7 +285,7 @@ static int beagle_twl_gpio_setup(struct device *dev, | |||
287 | if (gpio_request_one(gpio + 1, GPIOF_IN, "EHCI_nOC")) | 285 | if (gpio_request_one(gpio + 1, GPIOF_IN, "EHCI_nOC")) |
288 | pr_err("%s: unable to configure EHCI_nOC\n", __func__); | 286 | pr_err("%s: unable to configure EHCI_nOC\n", __func__); |
289 | } | 287 | } |
290 | dvi_panel.power_down_gpio = beagle_config.reset_gpio; | 288 | dvi_panel.power_down_gpio = beagle_config.dvi_pd_gpio; |
291 | 289 | ||
292 | gpio_request_one(gpio + TWL4030_GPIO_MAX, beagle_config.usb_pwr_level, | 290 | gpio_request_one(gpio + TWL4030_GPIO_MAX, beagle_config.usb_pwr_level, |
293 | "nEN_USB_PWR"); | 291 | "nEN_USB_PWR"); |
@@ -499,7 +497,7 @@ static void __init omap3_beagle_init(void) | |||
499 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); | 497 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); |
500 | omap3_beagle_init_rev(); | 498 | omap3_beagle_init_rev(); |
501 | 499 | ||
502 | if (beagle_config.mmc1_gpio_wp != -EINVAL) | 500 | if (gpio_is_valid(beagle_config.mmc1_gpio_wp)) |
503 | omap_mux_init_gpio(beagle_config.mmc1_gpio_wp, OMAP_PIN_INPUT); | 501 | omap_mux_init_gpio(beagle_config.mmc1_gpio_wp, OMAP_PIN_INPUT); |
504 | mmc[0].caps = beagle_config.mmc_caps; | 502 | mmc[0].caps = beagle_config.mmc_caps; |
505 | omap_hsmmc_init(mmc); | 503 | omap_hsmmc_init(mmc); |
@@ -510,15 +508,13 @@ static void __init omap3_beagle_init(void) | |||
510 | 508 | ||
511 | platform_add_devices(omap3_beagle_devices, | 509 | platform_add_devices(omap3_beagle_devices, |
512 | ARRAY_SIZE(omap3_beagle_devices)); | 510 | ARRAY_SIZE(omap3_beagle_devices)); |
511 | if (gpio_is_valid(beagle_config.dvi_pd_gpio)) | ||
512 | omap_mux_init_gpio(beagle_config.dvi_pd_gpio, OMAP_PIN_OUTPUT); | ||
513 | omap_display_init(&beagle_dss_data); | 513 | omap_display_init(&beagle_dss_data); |
514 | omap_serial_init(); | 514 | omap_serial_init(); |
515 | omap_sdrc_init(mt46h32m32lf6_sdrc_params, | 515 | omap_sdrc_init(mt46h32m32lf6_sdrc_params, |
516 | mt46h32m32lf6_sdrc_params); | 516 | mt46h32m32lf6_sdrc_params); |
517 | 517 | ||
518 | omap_mux_init_gpio(170, OMAP_PIN_INPUT); | ||
519 | /* REVISIT leave DVI powered down until it's needed ... */ | ||
520 | gpio_request_one(170, GPIOF_OUT_INIT_HIGH, "DVI_nPD"); | ||
521 | |||
522 | usb_musb_init(NULL); | 518 | usb_musb_init(NULL); |
523 | usbhs_init(&usbhs_bdata); | 519 | usbhs_init(&usbhs_bdata); |
524 | omap_nand_flash_init(NAND_BUSWIDTH_16, omap3beagle_nand_partitions, | 520 | omap_nand_flash_init(NAND_BUSWIDTH_16, omap3beagle_nand_partitions, |
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 d3ef99c5cad8..9fe6829f4c16 100644 --- a/arch/arm/mach-omap2/mux.c +++ b/arch/arm/mach-omap2/mux.c | |||
@@ -218,8 +218,7 @@ static int __init _omap_mux_get_by_name(struct omap_mux_partition *partition, | |||
218 | return -ENODEV; | 218 | return -ENODEV; |
219 | } | 219 | } |
220 | 220 | ||
221 | static int __init | 221 | int __init omap_mux_get_by_name(const char *muxname, |
222 | omap_mux_get_by_name(const char *muxname, | ||
223 | struct omap_mux_partition **found_partition, | 222 | struct omap_mux_partition **found_partition, |
224 | struct omap_mux **found_mux) | 223 | struct omap_mux **found_mux) |
225 | { | 224 | { |
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/omap_phy_internal.c b/arch/arm/mach-omap2/omap_phy_internal.c index 4c90477e6f82..d52651a05daa 100644 --- a/arch/arm/mach-omap2/omap_phy_internal.c +++ b/arch/arm/mach-omap2/omap_phy_internal.c | |||
@@ -239,21 +239,15 @@ void am35x_set_mode(u8 musb_mode) | |||
239 | 239 | ||
240 | devconf2 &= ~CONF2_OTGMODE; | 240 | devconf2 &= ~CONF2_OTGMODE; |
241 | switch (musb_mode) { | 241 | switch (musb_mode) { |
242 | #ifdef CONFIG_USB_MUSB_HDRC_HCD | ||
243 | case MUSB_HOST: /* Force VBUS valid, ID = 0 */ | 242 | case MUSB_HOST: /* Force VBUS valid, ID = 0 */ |
244 | devconf2 |= CONF2_FORCE_HOST; | 243 | devconf2 |= CONF2_FORCE_HOST; |
245 | break; | 244 | break; |
246 | #endif | ||
247 | #ifdef CONFIG_USB_GADGET_MUSB_HDRC | ||
248 | case MUSB_PERIPHERAL: /* Force VBUS valid, ID = 1 */ | 245 | case MUSB_PERIPHERAL: /* Force VBUS valid, ID = 1 */ |
249 | devconf2 |= CONF2_FORCE_DEVICE; | 246 | devconf2 |= CONF2_FORCE_DEVICE; |
250 | break; | 247 | break; |
251 | #endif | ||
252 | #ifdef CONFIG_USB_MUSB_OTG | ||
253 | case MUSB_OTG: /* Don't override the VBUS/ID comparators */ | 248 | case MUSB_OTG: /* Don't override the VBUS/ID comparators */ |
254 | devconf2 |= CONF2_NO_OVERRIDE; | 249 | devconf2 |= CONF2_NO_OVERRIDE; |
255 | break; | 250 | break; |
256 | #endif | ||
257 | default: | 251 | default: |
258 | pr_info(KERN_INFO "Unsupported mode %u\n", musb_mode); | 252 | pr_info(KERN_INFO "Unsupported mode %u\n", musb_mode); |
259 | } | 253 | } |
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/mach-omap2/usb-musb.c b/arch/arm/mach-omap2/usb-musb.c index b19d1b43c12e..c4a576856661 100644 --- a/arch/arm/mach-omap2/usb-musb.c +++ b/arch/arm/mach-omap2/usb-musb.c | |||
@@ -41,12 +41,10 @@ static struct musb_hdrc_config musb_config = { | |||
41 | }; | 41 | }; |
42 | 42 | ||
43 | static struct musb_hdrc_platform_data musb_plat = { | 43 | static struct musb_hdrc_platform_data musb_plat = { |
44 | #ifdef CONFIG_USB_MUSB_OTG | 44 | #ifdef CONFIG_USB_GADGET_MUSB_HDRC |
45 | .mode = MUSB_OTG, | 45 | .mode = MUSB_OTG, |
46 | #elif defined(CONFIG_USB_MUSB_HDRC_HCD) | 46 | #else |
47 | .mode = MUSB_HOST, | 47 | .mode = MUSB_HOST, |
48 | #elif defined(CONFIG_USB_GADGET_MUSB_HDRC) | ||
49 | .mode = MUSB_PERIPHERAL, | ||
50 | #endif | 48 | #endif |
51 | /* .clock is set dynamically */ | 49 | /* .clock is set dynamically */ |
52 | .config = &musb_config, | 50 | .config = &musb_config, |
diff --git a/arch/arm/mach-omap2/usb-tusb6010.c b/arch/arm/mach-omap2/usb-tusb6010.c index db84a46ce7fd..805bea6edf17 100644 --- a/arch/arm/mach-omap2/usb-tusb6010.c +++ b/arch/arm/mach-omap2/usb-tusb6010.c | |||
@@ -300,7 +300,7 @@ tusb6010_setup_interface(struct musb_hdrc_platform_data *data, | |||
300 | printk(error, 3, status); | 300 | printk(error, 3, status); |
301 | return status; | 301 | return status; |
302 | } | 302 | } |
303 | tusb_resources[2].start = irq + IH_GPIO_BASE; | 303 | tusb_resources[2].start = gpio_to_irq(irq); |
304 | 304 | ||
305 | /* set up memory timings ... can speed them up later */ | 305 | /* set up memory timings ... can speed them up later */ |
306 | if (!ps_refclk) { | 306 | if (!ps_refclk) { |
diff --git a/arch/arm/mach-tegra/reset.c b/arch/arm/mach-tegra/reset.c index 4d6a2ee99c3b..5beb7ebe2948 100644 --- a/arch/arm/mach-tegra/reset.c +++ b/arch/arm/mach-tegra/reset.c | |||
@@ -33,7 +33,7 @@ | |||
33 | 33 | ||
34 | static bool is_enabled; | 34 | static bool is_enabled; |
35 | 35 | ||
36 | static void tegra_cpu_reset_handler_enable(void) | 36 | static void __init tegra_cpu_reset_handler_enable(void) |
37 | { | 37 | { |
38 | void __iomem *iram_base = IO_ADDRESS(TEGRA_IRAM_RESET_BASE); | 38 | void __iomem *iram_base = IO_ADDRESS(TEGRA_IRAM_RESET_BASE); |
39 | void __iomem *evp_cpu_reset = | 39 | void __iomem *evp_cpu_reset = |
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c index cf4687ee2a7b..cd8ea3588f93 100644 --- a/arch/arm/mach-versatile/core.c +++ b/arch/arm/mach-versatile/core.c | |||
@@ -169,26 +169,13 @@ static struct map_desc versatile_io_desc[] __initdata = { | |||
169 | .pfn = __phys_to_pfn(VERSATILE_PCI_CFG_BASE), | 169 | .pfn = __phys_to_pfn(VERSATILE_PCI_CFG_BASE), |
170 | .length = VERSATILE_PCI_CFG_BASE_SIZE, | 170 | .length = VERSATILE_PCI_CFG_BASE_SIZE, |
171 | .type = MT_DEVICE | 171 | .type = MT_DEVICE |
172 | }, | ||
173 | #if 0 | ||
174 | { | ||
175 | .virtual = VERSATILE_PCI_VIRT_MEM_BASE0, | ||
176 | .pfn = __phys_to_pfn(VERSATILE_PCI_MEM_BASE0), | ||
177 | .length = SZ_16M, | ||
178 | .type = MT_DEVICE | ||
179 | }, { | 172 | }, { |
180 | .virtual = VERSATILE_PCI_VIRT_MEM_BASE1, | 173 | .virtual = (unsigned long)VERSATILE_PCI_VIRT_MEM_BASE0, |
181 | .pfn = __phys_to_pfn(VERSATILE_PCI_MEM_BASE1), | 174 | .pfn = __phys_to_pfn(VERSATILE_PCI_MEM_BASE0), |
182 | .length = SZ_16M, | 175 | .length = IO_SPACE_LIMIT, |
183 | .type = MT_DEVICE | ||
184 | }, { | ||
185 | .virtual = VERSATILE_PCI_VIRT_MEM_BASE2, | ||
186 | .pfn = __phys_to_pfn(VERSATILE_PCI_MEM_BASE2), | ||
187 | .length = SZ_16M, | ||
188 | .type = MT_DEVICE | 176 | .type = MT_DEVICE |
189 | }, | 177 | }, |
190 | #endif | 178 | #endif |
191 | #endif | ||
192 | }; | 179 | }; |
193 | 180 | ||
194 | void __init versatile_map_io(void) | 181 | void __init versatile_map_io(void) |
diff --git a/arch/arm/mach-versatile/include/mach/hardware.h b/arch/arm/mach-versatile/include/mach/hardware.h index 4d4973dd8fba..408e58da46c6 100644 --- a/arch/arm/mach-versatile/include/mach/hardware.h +++ b/arch/arm/mach-versatile/include/mach/hardware.h | |||
@@ -29,8 +29,9 @@ | |||
29 | */ | 29 | */ |
30 | #define VERSATILE_PCI_VIRT_BASE (void __iomem *)0xe8000000ul | 30 | #define VERSATILE_PCI_VIRT_BASE (void __iomem *)0xe8000000ul |
31 | #define VERSATILE_PCI_CFG_VIRT_BASE (void __iomem *)0xe9000000ul | 31 | #define VERSATILE_PCI_CFG_VIRT_BASE (void __iomem *)0xe9000000ul |
32 | #define VERSATILE_PCI_VIRT_MEM_BASE0 (void __iomem *)PCIO_BASE | ||
32 | 33 | ||
33 | /* macro to get at IO space when running virtually */ | 34 | /* macro to get at MMIO space when running virtually */ |
34 | #define IO_ADDRESS(x) (((x) & 0x0fffffff) + (((x) >> 4) & 0x0f000000) + 0xf0000000) | 35 | #define IO_ADDRESS(x) (((x) & 0x0fffffff) + (((x) >> 4) & 0x0f000000) + 0xf0000000) |
35 | 36 | ||
36 | #define __io_address(n) ((void __iomem __force *)IO_ADDRESS(n)) | 37 | #define __io_address(n) ((void __iomem __force *)IO_ADDRESS(n)) |
diff --git a/arch/arm/mach-versatile/include/mach/io.h b/arch/arm/mach-versatile/include/mach/io.h new file mode 100644 index 000000000000..0406513be7d8 --- /dev/null +++ b/arch/arm/mach-versatile/include/mach/io.h | |||
@@ -0,0 +1,27 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-versatile/include/mach/io.h | ||
3 | * | ||
4 | * Copyright (C) 2003 ARM Limited | ||
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 | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | #ifndef __ASM_ARM_ARCH_IO_H | ||
21 | #define __ASM_ARM_ARCH_IO_H | ||
22 | |||
23 | #define PCIO_BASE 0xeb000000ul | ||
24 | |||
25 | #define __io(a) ((a) + PCIO_BASE) | ||
26 | |||
27 | #endif | ||
diff --git a/arch/arm/mach-versatile/pci.c b/arch/arm/mach-versatile/pci.c index 15c6a00000ec..bec933b04ef0 100644 --- a/arch/arm/mach-versatile/pci.c +++ b/arch/arm/mach-versatile/pci.c | |||
@@ -169,11 +169,18 @@ static struct pci_ops pci_versatile_ops = { | |||
169 | .write = versatile_write_config, | 169 | .write = versatile_write_config, |
170 | }; | 170 | }; |
171 | 171 | ||
172 | static struct resource io_port = { | ||
173 | .name = "PCI", | ||
174 | .start = 0, | ||
175 | .end = IO_SPACE_LIMIT, | ||
176 | .flags = IORESOURCE_IO, | ||
177 | }; | ||
178 | |||
172 | static struct resource io_mem = { | 179 | static struct resource io_mem = { |
173 | .name = "PCI I/O space", | 180 | .name = "PCI I/O space", |
174 | .start = VERSATILE_PCI_MEM_BASE0, | 181 | .start = VERSATILE_PCI_MEM_BASE0, |
175 | .end = VERSATILE_PCI_MEM_BASE0+VERSATILE_PCI_MEM_BASE0_SIZE-1, | 182 | .end = VERSATILE_PCI_MEM_BASE0+VERSATILE_PCI_MEM_BASE0_SIZE-1, |
176 | .flags = IORESOURCE_IO, | 183 | .flags = IORESOURCE_MEM, |
177 | }; | 184 | }; |
178 | 185 | ||
179 | static struct resource non_mem = { | 186 | static struct resource non_mem = { |
@@ -200,6 +207,12 @@ static int __init pci_versatile_setup_resources(struct pci_sys_data *sys) | |||
200 | "memory region (%d)\n", ret); | 207 | "memory region (%d)\n", ret); |
201 | goto out; | 208 | goto out; |
202 | } | 209 | } |
210 | ret = request_resource(&ioport_resource, &io_port); | ||
211 | if (ret) { | ||
212 | printk(KERN_ERR "PCI: unable to allocate I/O " | ||
213 | "port region (%d)\n", ret); | ||
214 | goto out; | ||
215 | } | ||
203 | ret = request_resource(&iomem_resource, &non_mem); | 216 | ret = request_resource(&iomem_resource, &non_mem); |
204 | if (ret) { | 217 | if (ret) { |
205 | printk(KERN_ERR "PCI: unable to allocate non-prefetchable " | 218 | printk(KERN_ERR "PCI: unable to allocate non-prefetchable " |
@@ -218,7 +231,7 @@ static int __init pci_versatile_setup_resources(struct pci_sys_data *sys) | |||
218 | * the mem resource for this bus | 231 | * the mem resource for this bus |
219 | * the prefetch mem resource for this bus | 232 | * the prefetch mem resource for this bus |
220 | */ | 233 | */ |
221 | pci_add_resource_offset(&sys->resources, &io_mem, sys->io_offset); | 234 | pci_add_resource_offset(&sys->resources, &io_port, sys->io_offset); |
222 | pci_add_resource_offset(&sys->resources, &non_mem, sys->mem_offset); | 235 | pci_add_resource_offset(&sys->resources, &non_mem, sys->mem_offset); |
223 | pci_add_resource_offset(&sys->resources, &pre_mem, sys->mem_offset); | 236 | pci_add_resource_offset(&sys->resources, &pre_mem, sys->mem_offset); |
224 | 237 | ||
@@ -249,6 +262,7 @@ int __init pci_versatile_setup(int nr, struct pci_sys_data *sys) | |||
249 | 262 | ||
250 | if (nr == 0) { | 263 | if (nr == 0) { |
251 | sys->mem_offset = 0; | 264 | sys->mem_offset = 0; |
265 | sys->io_offset = 0; | ||
252 | ret = pci_versatile_setup_resources(sys); | 266 | ret = pci_versatile_setup_resources(sys); |
253 | if (ret < 0) { | 267 | if (ret < 0) { |
254 | printk("pci_versatile_setup: resources... oops?\n"); | 268 | printk("pci_versatile_setup: resources... oops?\n"); |
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); |
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index e0aa064def31..a7c727d0c105 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -6558,7 +6558,7 @@ static void intel_setup_outputs(struct drm_device *dev) | |||
6558 | if (I915_READ(HDMIC) & PORT_DETECTED) | 6558 | if (I915_READ(HDMIC) & PORT_DETECTED) |
6559 | intel_hdmi_init(dev, HDMIC); | 6559 | intel_hdmi_init(dev, HDMIC); |
6560 | 6560 | ||
6561 | if (I915_READ(HDMID) & PORT_DETECTED) | 6561 | if (!dpd_is_edp && I915_READ(HDMID) & PORT_DETECTED) |
6562 | intel_hdmi_init(dev, HDMID); | 6562 | intel_hdmi_init(dev, HDMID); |
6563 | 6563 | ||
6564 | if (I915_READ(PCH_DP_C) & DP_DETECTED) | 6564 | if (I915_READ(PCH_DP_C) & DP_DETECTED) |
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 296cfc201a81..c0449324143c 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include "drm.h" | 32 | #include "drm.h" |
33 | #include "drm_crtc.h" | 33 | #include "drm_crtc.h" |
34 | #include "drm_crtc_helper.h" | 34 | #include "drm_crtc_helper.h" |
35 | #include "drm_edid.h" | ||
35 | #include "intel_drv.h" | 36 | #include "intel_drv.h" |
36 | #include "i915_drm.h" | 37 | #include "i915_drm.h" |
37 | #include "i915_drv.h" | 38 | #include "i915_drv.h" |
@@ -67,6 +68,8 @@ struct intel_dp { | |||
67 | struct drm_display_mode *panel_fixed_mode; /* for eDP */ | 68 | struct drm_display_mode *panel_fixed_mode; /* for eDP */ |
68 | struct delayed_work panel_vdd_work; | 69 | struct delayed_work panel_vdd_work; |
69 | bool want_panel_vdd; | 70 | bool want_panel_vdd; |
71 | struct edid *edid; /* cached EDID for eDP */ | ||
72 | int edid_mode_count; | ||
70 | }; | 73 | }; |
71 | 74 | ||
72 | /** | 75 | /** |
@@ -371,7 +374,7 @@ intel_dp_aux_ch(struct intel_dp *intel_dp, | |||
371 | int recv_bytes; | 374 | int recv_bytes; |
372 | uint32_t status; | 375 | uint32_t status; |
373 | uint32_t aux_clock_divider; | 376 | uint32_t aux_clock_divider; |
374 | int try, precharge = 5; | 377 | int try, precharge; |
375 | 378 | ||
376 | intel_dp_check_edp(intel_dp); | 379 | intel_dp_check_edp(intel_dp); |
377 | /* The clock divider is based off the hrawclk, | 380 | /* The clock divider is based off the hrawclk, |
@@ -391,6 +394,11 @@ intel_dp_aux_ch(struct intel_dp *intel_dp, | |||
391 | else | 394 | else |
392 | aux_clock_divider = intel_hrawclk(dev) / 2; | 395 | aux_clock_divider = intel_hrawclk(dev) / 2; |
393 | 396 | ||
397 | if (IS_GEN6(dev)) | ||
398 | precharge = 3; | ||
399 | else | ||
400 | precharge = 5; | ||
401 | |||
394 | /* Try to wait for any previous AUX channel activity */ | 402 | /* Try to wait for any previous AUX channel activity */ |
395 | for (try = 0; try < 3; try++) { | 403 | for (try = 0; try < 3; try++) { |
396 | status = I915_READ(ch_ctl); | 404 | status = I915_READ(ch_ctl); |
@@ -1973,6 +1981,8 @@ intel_dp_probe_oui(struct intel_dp *intel_dp) | |||
1973 | if (!(intel_dp->dpcd[DP_DOWN_STREAM_PORT_COUNT] & DP_OUI_SUPPORT)) | 1981 | if (!(intel_dp->dpcd[DP_DOWN_STREAM_PORT_COUNT] & DP_OUI_SUPPORT)) |
1974 | return; | 1982 | return; |
1975 | 1983 | ||
1984 | ironlake_edp_panel_vdd_on(intel_dp); | ||
1985 | |||
1976 | if (intel_dp_aux_native_read_retry(intel_dp, DP_SINK_OUI, buf, 3)) | 1986 | if (intel_dp_aux_native_read_retry(intel_dp, DP_SINK_OUI, buf, 3)) |
1977 | DRM_DEBUG_KMS("Sink OUI: %02hx%02hx%02hx\n", | 1987 | DRM_DEBUG_KMS("Sink OUI: %02hx%02hx%02hx\n", |
1978 | buf[0], buf[1], buf[2]); | 1988 | buf[0], buf[1], buf[2]); |
@@ -1980,6 +1990,8 @@ intel_dp_probe_oui(struct intel_dp *intel_dp) | |||
1980 | if (intel_dp_aux_native_read_retry(intel_dp, DP_BRANCH_OUI, buf, 3)) | 1990 | if (intel_dp_aux_native_read_retry(intel_dp, DP_BRANCH_OUI, buf, 3)) |
1981 | DRM_DEBUG_KMS("Branch OUI: %02hx%02hx%02hx\n", | 1991 | DRM_DEBUG_KMS("Branch OUI: %02hx%02hx%02hx\n", |
1982 | buf[0], buf[1], buf[2]); | 1992 | buf[0], buf[1], buf[2]); |
1993 | |||
1994 | ironlake_edp_panel_vdd_off(intel_dp, false); | ||
1983 | } | 1995 | } |
1984 | 1996 | ||
1985 | static bool | 1997 | static bool |
@@ -2116,10 +2128,22 @@ intel_dp_get_edid(struct drm_connector *connector, struct i2c_adapter *adapter) | |||
2116 | { | 2128 | { |
2117 | struct intel_dp *intel_dp = intel_attached_dp(connector); | 2129 | struct intel_dp *intel_dp = intel_attached_dp(connector); |
2118 | struct edid *edid; | 2130 | struct edid *edid; |
2131 | int size; | ||
2132 | |||
2133 | if (is_edp(intel_dp)) { | ||
2134 | if (!intel_dp->edid) | ||
2135 | return NULL; | ||
2136 | |||
2137 | size = (intel_dp->edid->extensions + 1) * EDID_LENGTH; | ||
2138 | edid = kmalloc(size, GFP_KERNEL); | ||
2139 | if (!edid) | ||
2140 | return NULL; | ||
2141 | |||
2142 | memcpy(edid, intel_dp->edid, size); | ||
2143 | return edid; | ||
2144 | } | ||
2119 | 2145 | ||
2120 | ironlake_edp_panel_vdd_on(intel_dp); | ||
2121 | edid = drm_get_edid(connector, adapter); | 2146 | edid = drm_get_edid(connector, adapter); |
2122 | ironlake_edp_panel_vdd_off(intel_dp, false); | ||
2123 | return edid; | 2147 | return edid; |
2124 | } | 2148 | } |
2125 | 2149 | ||
@@ -2129,9 +2153,17 @@ intel_dp_get_edid_modes(struct drm_connector *connector, struct i2c_adapter *ada | |||
2129 | struct intel_dp *intel_dp = intel_attached_dp(connector); | 2153 | struct intel_dp *intel_dp = intel_attached_dp(connector); |
2130 | int ret; | 2154 | int ret; |
2131 | 2155 | ||
2132 | ironlake_edp_panel_vdd_on(intel_dp); | 2156 | if (is_edp(intel_dp)) { |
2157 | drm_mode_connector_update_edid_property(connector, | ||
2158 | intel_dp->edid); | ||
2159 | ret = drm_add_edid_modes(connector, intel_dp->edid); | ||
2160 | drm_edid_to_eld(connector, | ||
2161 | intel_dp->edid); | ||
2162 | connector->display_info.raw_edid = NULL; | ||
2163 | return intel_dp->edid_mode_count; | ||
2164 | } | ||
2165 | |||
2133 | ret = intel_ddc_get_modes(connector, adapter); | 2166 | ret = intel_ddc_get_modes(connector, adapter); |
2134 | ironlake_edp_panel_vdd_off(intel_dp, false); | ||
2135 | return ret; | 2167 | return ret; |
2136 | } | 2168 | } |
2137 | 2169 | ||
@@ -2321,6 +2353,7 @@ static void intel_dp_encoder_destroy(struct drm_encoder *encoder) | |||
2321 | i2c_del_adapter(&intel_dp->adapter); | 2353 | i2c_del_adapter(&intel_dp->adapter); |
2322 | drm_encoder_cleanup(encoder); | 2354 | drm_encoder_cleanup(encoder); |
2323 | if (is_edp(intel_dp)) { | 2355 | if (is_edp(intel_dp)) { |
2356 | kfree(intel_dp->edid); | ||
2324 | cancel_delayed_work_sync(&intel_dp->panel_vdd_work); | 2357 | cancel_delayed_work_sync(&intel_dp->panel_vdd_work); |
2325 | ironlake_panel_vdd_off_sync(intel_dp); | 2358 | ironlake_panel_vdd_off_sync(intel_dp); |
2326 | } | 2359 | } |
@@ -2504,11 +2537,14 @@ intel_dp_init(struct drm_device *dev, int output_reg) | |||
2504 | break; | 2537 | break; |
2505 | } | 2538 | } |
2506 | 2539 | ||
2540 | intel_dp_i2c_init(intel_dp, intel_connector, name); | ||
2541 | |||
2507 | /* Cache some DPCD data in the eDP case */ | 2542 | /* Cache some DPCD data in the eDP case */ |
2508 | if (is_edp(intel_dp)) { | 2543 | if (is_edp(intel_dp)) { |
2509 | bool ret; | 2544 | bool ret; |
2510 | struct edp_power_seq cur, vbt; | 2545 | struct edp_power_seq cur, vbt; |
2511 | u32 pp_on, pp_off, pp_div; | 2546 | u32 pp_on, pp_off, pp_div; |
2547 | struct edid *edid; | ||
2512 | 2548 | ||
2513 | pp_on = I915_READ(PCH_PP_ON_DELAYS); | 2549 | pp_on = I915_READ(PCH_PP_ON_DELAYS); |
2514 | pp_off = I915_READ(PCH_PP_OFF_DELAYS); | 2550 | pp_off = I915_READ(PCH_PP_OFF_DELAYS); |
@@ -2576,9 +2612,19 @@ intel_dp_init(struct drm_device *dev, int output_reg) | |||
2576 | intel_dp_destroy(&intel_connector->base); | 2612 | intel_dp_destroy(&intel_connector->base); |
2577 | return; | 2613 | return; |
2578 | } | 2614 | } |
2579 | } | ||
2580 | 2615 | ||
2581 | intel_dp_i2c_init(intel_dp, intel_connector, name); | 2616 | ironlake_edp_panel_vdd_on(intel_dp); |
2617 | edid = drm_get_edid(connector, &intel_dp->adapter); | ||
2618 | if (edid) { | ||
2619 | drm_mode_connector_update_edid_property(connector, | ||
2620 | edid); | ||
2621 | intel_dp->edid_mode_count = | ||
2622 | drm_add_edid_modes(connector, edid); | ||
2623 | drm_edid_to_eld(connector, edid); | ||
2624 | intel_dp->edid = edid; | ||
2625 | } | ||
2626 | ironlake_edp_panel_vdd_off(intel_dp, false); | ||
2627 | } | ||
2582 | 2628 | ||
2583 | intel_encoder->hot_plug = intel_dp_hot_plug; | 2629 | intel_encoder->hot_plug = intel_dp_hot_plug; |
2584 | 2630 | ||
diff --git a/drivers/gpu/drm/radeon/atombios_encoders.c b/drivers/gpu/drm/radeon/atombios_encoders.c index e7b1ec5ae8c6..486ccdf4aacd 100644 --- a/drivers/gpu/drm/radeon/atombios_encoders.c +++ b/drivers/gpu/drm/radeon/atombios_encoders.c | |||
@@ -1926,7 +1926,9 @@ radeon_atom_encoder_mode_set(struct drm_encoder *encoder, | |||
1926 | 1926 | ||
1927 | if (atombios_get_encoder_mode(encoder) == ATOM_ENCODER_MODE_HDMI) { | 1927 | if (atombios_get_encoder_mode(encoder) == ATOM_ENCODER_MODE_HDMI) { |
1928 | r600_hdmi_enable(encoder); | 1928 | r600_hdmi_enable(encoder); |
1929 | if (ASIC_IS_DCE4(rdev)) | 1929 | if (ASIC_IS_DCE6(rdev)) |
1930 | ; /* TODO (use pointers instead of if-s?) */ | ||
1931 | else if (ASIC_IS_DCE4(rdev)) | ||
1930 | evergreen_hdmi_setmode(encoder, adjusted_mode); | 1932 | evergreen_hdmi_setmode(encoder, adjusted_mode); |
1931 | else | 1933 | else |
1932 | r600_hdmi_setmode(encoder, adjusted_mode); | 1934 | r600_hdmi_setmode(encoder, adjusted_mode); |
diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c index 01550d05e273..7fb3d2e0434c 100644 --- a/drivers/gpu/drm/radeon/evergreen.c +++ b/drivers/gpu/drm/radeon/evergreen.c | |||
@@ -1932,6 +1932,9 @@ static void evergreen_gpu_init(struct radeon_device *rdev) | |||
1932 | smx_dc_ctl0 |= NUMBER_OF_SETS(rdev->config.evergreen.sx_num_of_sets); | 1932 | smx_dc_ctl0 |= NUMBER_OF_SETS(rdev->config.evergreen.sx_num_of_sets); |
1933 | WREG32(SMX_DC_CTL0, smx_dc_ctl0); | 1933 | WREG32(SMX_DC_CTL0, smx_dc_ctl0); |
1934 | 1934 | ||
1935 | if (rdev->family <= CHIP_SUMO2) | ||
1936 | WREG32(SMX_SAR_CTL0, 0x00010000); | ||
1937 | |||
1935 | WREG32(SX_EXPORT_BUFFER_SIZES, (COLOR_BUFFER_SIZE((rdev->config.evergreen.sx_max_export_size / 4) - 1) | | 1938 | WREG32(SX_EXPORT_BUFFER_SIZES, (COLOR_BUFFER_SIZE((rdev->config.evergreen.sx_max_export_size / 4) - 1) | |
1936 | POSITION_BUFFER_SIZE((rdev->config.evergreen.sx_max_export_pos_size / 4) - 1) | | 1939 | POSITION_BUFFER_SIZE((rdev->config.evergreen.sx_max_export_pos_size / 4) - 1) | |
1937 | SMX_BUFFER_SIZE((rdev->config.evergreen.sx_max_export_smx_size / 4) - 1))); | 1940 | SMX_BUFFER_SIZE((rdev->config.evergreen.sx_max_export_smx_size / 4) - 1))); |
diff --git a/drivers/gpu/drm/radeon/evergreen_hdmi.c b/drivers/gpu/drm/radeon/evergreen_hdmi.c index a51f880985f8..65c54160028b 100644 --- a/drivers/gpu/drm/radeon/evergreen_hdmi.c +++ b/drivers/gpu/drm/radeon/evergreen_hdmi.c | |||
@@ -156,9 +156,6 @@ void evergreen_hdmi_setmode(struct drm_encoder *encoder, struct drm_display_mode | |||
156 | struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; | 156 | struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; |
157 | uint32_t offset; | 157 | uint32_t offset; |
158 | 158 | ||
159 | if (ASIC_IS_DCE5(rdev)) | ||
160 | return; | ||
161 | |||
162 | /* Silent, r600_hdmi_enable will raise WARN for us */ | 159 | /* Silent, r600_hdmi_enable will raise WARN for us */ |
163 | if (!dig->afmt->enabled) | 160 | if (!dig->afmt->enabled) |
164 | return; | 161 | return; |
diff --git a/drivers/gpu/drm/radeon/evergreend.h b/drivers/gpu/drm/radeon/evergreend.h index 2773039b4902..b50b15c70498 100644 --- a/drivers/gpu/drm/radeon/evergreend.h +++ b/drivers/gpu/drm/radeon/evergreend.h | |||
@@ -503,6 +503,7 @@ | |||
503 | #define SCRATCH_UMSK 0x8540 | 503 | #define SCRATCH_UMSK 0x8540 |
504 | #define SCRATCH_ADDR 0x8544 | 504 | #define SCRATCH_ADDR 0x8544 |
505 | 505 | ||
506 | #define SMX_SAR_CTL0 0xA008 | ||
506 | #define SMX_DC_CTL0 0xA020 | 507 | #define SMX_DC_CTL0 0xA020 |
507 | #define USE_HASH_FUNCTION (1 << 0) | 508 | #define USE_HASH_FUNCTION (1 << 0) |
508 | #define NUMBER_OF_SETS(x) ((x) << 1) | 509 | #define NUMBER_OF_SETS(x) ((x) << 1) |
diff --git a/drivers/gpu/drm/radeon/ni.c b/drivers/gpu/drm/radeon/ni.c index 3186522a4458..b7bf18e40215 100644 --- a/drivers/gpu/drm/radeon/ni.c +++ b/drivers/gpu/drm/radeon/ni.c | |||
@@ -1303,6 +1303,10 @@ static int cayman_startup(struct radeon_device *rdev) | |||
1303 | if (r) | 1303 | if (r) |
1304 | return r; | 1304 | return r; |
1305 | 1305 | ||
1306 | r = r600_audio_init(rdev); | ||
1307 | if (r) | ||
1308 | return r; | ||
1309 | |||
1306 | return 0; | 1310 | return 0; |
1307 | } | 1311 | } |
1308 | 1312 | ||
@@ -1329,6 +1333,7 @@ int cayman_resume(struct radeon_device *rdev) | |||
1329 | 1333 | ||
1330 | int cayman_suspend(struct radeon_device *rdev) | 1334 | int cayman_suspend(struct radeon_device *rdev) |
1331 | { | 1335 | { |
1336 | r600_audio_fini(rdev); | ||
1332 | /* FIXME: we should wait for ring to be empty */ | 1337 | /* FIXME: we should wait for ring to be empty */ |
1333 | radeon_ib_pool_suspend(rdev); | 1338 | radeon_ib_pool_suspend(rdev); |
1334 | radeon_vm_manager_suspend(rdev); | 1339 | radeon_vm_manager_suspend(rdev); |
diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c index f30dc95f83b1..bff627293812 100644 --- a/drivers/gpu/drm/radeon/r600.c +++ b/drivers/gpu/drm/radeon/r600.c | |||
@@ -1839,6 +1839,7 @@ void r600_gpu_init(struct radeon_device *rdev) | |||
1839 | WREG32(PA_CL_ENHANCE, (CLIP_VTX_REORDER_ENA | | 1839 | WREG32(PA_CL_ENHANCE, (CLIP_VTX_REORDER_ENA | |
1840 | NUM_CLIP_SEQ(3))); | 1840 | NUM_CLIP_SEQ(3))); |
1841 | WREG32(PA_SC_ENHANCE, FORCE_EOV_MAX_CLK_CNT(4095)); | 1841 | WREG32(PA_SC_ENHANCE, FORCE_EOV_MAX_CLK_CNT(4095)); |
1842 | WREG32(VC_ENHANCE, 0); | ||
1842 | } | 1843 | } |
1843 | 1844 | ||
1844 | 1845 | ||
diff --git a/drivers/gpu/drm/radeon/r600_audio.c b/drivers/gpu/drm/radeon/r600_audio.c index 7479a5c503e4..79b55916cf90 100644 --- a/drivers/gpu/drm/radeon/r600_audio.c +++ b/drivers/gpu/drm/radeon/r600_audio.c | |||
@@ -57,7 +57,7 @@ static bool radeon_dig_encoder(struct drm_encoder *encoder) | |||
57 | */ | 57 | */ |
58 | static int r600_audio_chipset_supported(struct radeon_device *rdev) | 58 | static int r600_audio_chipset_supported(struct radeon_device *rdev) |
59 | { | 59 | { |
60 | return (rdev->family >= CHIP_R600 && !ASIC_IS_DCE5(rdev)) | 60 | return (rdev->family >= CHIP_R600 && !ASIC_IS_DCE6(rdev)) |
61 | || rdev->family == CHIP_RS600 | 61 | || rdev->family == CHIP_RS600 |
62 | || rdev->family == CHIP_RS690 | 62 | || rdev->family == CHIP_RS690 |
63 | || rdev->family == CHIP_RS740; | 63 | || rdev->family == CHIP_RS740; |
diff --git a/drivers/gpu/drm/radeon/r600_cs.c b/drivers/gpu/drm/radeon/r600_cs.c index 0133f5f09bd6..ca87f7afaf23 100644 --- a/drivers/gpu/drm/radeon/r600_cs.c +++ b/drivers/gpu/drm/radeon/r600_cs.c | |||
@@ -2079,6 +2079,48 @@ static int r600_packet3_check(struct radeon_cs_parser *p, | |||
2079 | return -EINVAL; | 2079 | return -EINVAL; |
2080 | } | 2080 | } |
2081 | break; | 2081 | break; |
2082 | case PACKET3_STRMOUT_BASE_UPDATE: | ||
2083 | if (p->family < CHIP_RV770) { | ||
2084 | DRM_ERROR("STRMOUT_BASE_UPDATE only supported on 7xx\n"); | ||
2085 | return -EINVAL; | ||
2086 | } | ||
2087 | if (pkt->count != 1) { | ||
2088 | DRM_ERROR("bad STRMOUT_BASE_UPDATE packet count\n"); | ||
2089 | return -EINVAL; | ||
2090 | } | ||
2091 | if (idx_value > 3) { | ||
2092 | DRM_ERROR("bad STRMOUT_BASE_UPDATE index\n"); | ||
2093 | return -EINVAL; | ||
2094 | } | ||
2095 | { | ||
2096 | u64 offset; | ||
2097 | |||
2098 | r = r600_cs_packet_next_reloc(p, &reloc); | ||
2099 | if (r) { | ||
2100 | DRM_ERROR("bad STRMOUT_BASE_UPDATE reloc\n"); | ||
2101 | return -EINVAL; | ||
2102 | } | ||
2103 | |||
2104 | if (reloc->robj != track->vgt_strmout_bo[idx_value]) { | ||
2105 | DRM_ERROR("bad STRMOUT_BASE_UPDATE, bo does not match\n"); | ||
2106 | return -EINVAL; | ||
2107 | } | ||
2108 | |||
2109 | offset = radeon_get_ib_value(p, idx+1) << 8; | ||
2110 | if (offset != track->vgt_strmout_bo_offset[idx_value]) { | ||
2111 | DRM_ERROR("bad STRMOUT_BASE_UPDATE, bo offset does not match: 0x%llx, 0x%x\n", | ||
2112 | offset, track->vgt_strmout_bo_offset[idx_value]); | ||
2113 | return -EINVAL; | ||
2114 | } | ||
2115 | |||
2116 | if ((offset + 4) > radeon_bo_size(reloc->robj)) { | ||
2117 | DRM_ERROR("bad STRMOUT_BASE_UPDATE bo too small: 0x%llx, 0x%lx\n", | ||
2118 | offset + 4, radeon_bo_size(reloc->robj)); | ||
2119 | return -EINVAL; | ||
2120 | } | ||
2121 | ib[idx+1] += (u32)((reloc->lobj.gpu_offset >> 8) & 0xffffffff); | ||
2122 | } | ||
2123 | break; | ||
2082 | case PACKET3_SURFACE_BASE_UPDATE: | 2124 | case PACKET3_SURFACE_BASE_UPDATE: |
2083 | if (p->family >= CHIP_RV770 || p->family == CHIP_R600) { | 2125 | if (p->family >= CHIP_RV770 || p->family == CHIP_R600) { |
2084 | DRM_ERROR("bad SURFACE_BASE_UPDATE\n"); | 2126 | DRM_ERROR("bad SURFACE_BASE_UPDATE\n"); |
diff --git a/drivers/gpu/drm/radeon/r600_hdmi.c b/drivers/gpu/drm/radeon/r600_hdmi.c index 969c27529dfe..82a0a4c919c0 100644 --- a/drivers/gpu/drm/radeon/r600_hdmi.c +++ b/drivers/gpu/drm/radeon/r600_hdmi.c | |||
@@ -322,9 +322,6 @@ void r600_hdmi_setmode(struct drm_encoder *encoder, struct drm_display_mode *mod | |||
322 | struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; | 322 | struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; |
323 | uint32_t offset; | 323 | uint32_t offset; |
324 | 324 | ||
325 | if (ASIC_IS_DCE5(rdev)) | ||
326 | return; | ||
327 | |||
328 | /* Silent, r600_hdmi_enable will raise WARN for us */ | 325 | /* Silent, r600_hdmi_enable will raise WARN for us */ |
329 | if (!dig->afmt->enabled) | 326 | if (!dig->afmt->enabled) |
330 | return; | 327 | return; |
@@ -483,7 +480,7 @@ void r600_hdmi_enable(struct drm_encoder *encoder) | |||
483 | uint32_t offset; | 480 | uint32_t offset; |
484 | u32 hdmi; | 481 | u32 hdmi; |
485 | 482 | ||
486 | if (ASIC_IS_DCE5(rdev)) | 483 | if (ASIC_IS_DCE6(rdev)) |
487 | return; | 484 | return; |
488 | 485 | ||
489 | /* Silent, r600_hdmi_enable will raise WARN for us */ | 486 | /* Silent, r600_hdmi_enable will raise WARN for us */ |
@@ -543,7 +540,7 @@ void r600_hdmi_disable(struct drm_encoder *encoder) | |||
543 | struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; | 540 | struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; |
544 | uint32_t offset; | 541 | uint32_t offset; |
545 | 542 | ||
546 | if (ASIC_IS_DCE5(rdev)) | 543 | if (ASIC_IS_DCE6(rdev)) |
547 | return; | 544 | return; |
548 | 545 | ||
549 | /* Called for ATOM_ENCODER_MODE_HDMI only */ | 546 | /* Called for ATOM_ENCODER_MODE_HDMI only */ |
diff --git a/drivers/gpu/drm/radeon/r600d.h b/drivers/gpu/drm/radeon/r600d.h index a0dbf1fe6a40..025fd5b6c08c 100644 --- a/drivers/gpu/drm/radeon/r600d.h +++ b/drivers/gpu/drm/radeon/r600d.h | |||
@@ -485,6 +485,7 @@ | |||
485 | #define TC_L2_SIZE(x) ((x)<<5) | 485 | #define TC_L2_SIZE(x) ((x)<<5) |
486 | #define L2_DISABLE_LATE_HIT (1<<9) | 486 | #define L2_DISABLE_LATE_HIT (1<<9) |
487 | 487 | ||
488 | #define VC_ENHANCE 0x9714 | ||
488 | 489 | ||
489 | #define VGT_CACHE_INVALIDATION 0x88C4 | 490 | #define VGT_CACHE_INVALIDATION 0x88C4 |
490 | #define CACHE_INVALIDATION(x) ((x)<<0) | 491 | #define CACHE_INVALIDATION(x) ((x)<<0) |
@@ -1163,6 +1164,7 @@ | |||
1163 | #define PACKET3_SET_CTL_CONST 0x6F | 1164 | #define PACKET3_SET_CTL_CONST 0x6F |
1164 | #define PACKET3_SET_CTL_CONST_OFFSET 0x0003cff0 | 1165 | #define PACKET3_SET_CTL_CONST_OFFSET 0x0003cff0 |
1165 | #define PACKET3_SET_CTL_CONST_END 0x0003e200 | 1166 | #define PACKET3_SET_CTL_CONST_END 0x0003e200 |
1167 | #define PACKET3_STRMOUT_BASE_UPDATE 0x72 /* r7xx */ | ||
1166 | #define PACKET3_SURFACE_BASE_UPDATE 0x73 | 1168 | #define PACKET3_SURFACE_BASE_UPDATE 0x73 |
1167 | 1169 | ||
1168 | 1170 | ||
diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c index 03e5f5df40f1..2c4d53fd20c5 100644 --- a/drivers/gpu/drm/radeon/radeon_drv.c +++ b/drivers/gpu/drm/radeon/radeon_drv.c | |||
@@ -58,9 +58,10 @@ | |||
58 | * 2.14.0 - add evergreen tiling informations | 58 | * 2.14.0 - add evergreen tiling informations |
59 | * 2.15.0 - add max_pipes query | 59 | * 2.15.0 - add max_pipes query |
60 | * 2.16.0 - fix evergreen 2D tiled surface calculation | 60 | * 2.16.0 - fix evergreen 2D tiled surface calculation |
61 | * 2.17.0 - add STRMOUT_BASE_UPDATE for r7xx | ||
61 | */ | 62 | */ |
62 | #define KMS_DRIVER_MAJOR 2 | 63 | #define KMS_DRIVER_MAJOR 2 |
63 | #define KMS_DRIVER_MINOR 16 | 64 | #define KMS_DRIVER_MINOR 17 |
64 | #define KMS_DRIVER_PATCHLEVEL 0 | 65 | #define KMS_DRIVER_PATCHLEVEL 0 |
65 | int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags); | 66 | int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags); |
66 | int radeon_driver_unload_kms(struct drm_device *dev); | 67 | int radeon_driver_unload_kms(struct drm_device *dev); |
diff --git a/drivers/gpu/drm/radeon/radeon_pm.c b/drivers/gpu/drm/radeon/radeon_pm.c index 08825548ee69..5b37e283ec38 100644 --- a/drivers/gpu/drm/radeon/radeon_pm.c +++ b/drivers/gpu/drm/radeon/radeon_pm.c | |||
@@ -801,9 +801,13 @@ static void radeon_dynpm_idle_work_handler(struct work_struct *work) | |||
801 | int i; | 801 | int i; |
802 | 802 | ||
803 | for (i = 0; i < RADEON_NUM_RINGS; ++i) { | 803 | for (i = 0; i < RADEON_NUM_RINGS; ++i) { |
804 | not_processed += radeon_fence_count_emitted(rdev, i); | 804 | struct radeon_ring *ring = &rdev->ring[i]; |
805 | if (not_processed >= 3) | 805 | |
806 | break; | 806 | if (ring->ready) { |
807 | not_processed += radeon_fence_count_emitted(rdev, i); | ||
808 | if (not_processed >= 3) | ||
809 | break; | ||
810 | } | ||
807 | } | 811 | } |
808 | 812 | ||
809 | if (not_processed >= 3) { /* should upclock */ | 813 | if (not_processed >= 3) { /* should upclock */ |
diff --git a/drivers/gpu/drm/radeon/radeon_prime.c b/drivers/gpu/drm/radeon/radeon_prime.c index 8ddab4c76710..6bef46ace831 100644 --- a/drivers/gpu/drm/radeon/radeon_prime.c +++ b/drivers/gpu/drm/radeon/radeon_prime.c | |||
@@ -169,11 +169,17 @@ struct dma_buf *radeon_gem_prime_export(struct drm_device *dev, | |||
169 | struct radeon_bo *bo = gem_to_radeon_bo(obj); | 169 | struct radeon_bo *bo = gem_to_radeon_bo(obj); |
170 | int ret = 0; | 170 | int ret = 0; |
171 | 171 | ||
172 | ret = radeon_bo_reserve(bo, false); | ||
173 | if (unlikely(ret != 0)) | ||
174 | return ERR_PTR(ret); | ||
175 | |||
172 | /* pin buffer into GTT */ | 176 | /* pin buffer into GTT */ |
173 | ret = radeon_bo_pin(bo, RADEON_GEM_DOMAIN_GTT, NULL); | 177 | ret = radeon_bo_pin(bo, RADEON_GEM_DOMAIN_GTT, NULL); |
174 | if (ret) | 178 | if (ret) { |
179 | radeon_bo_unreserve(bo); | ||
175 | return ERR_PTR(ret); | 180 | return ERR_PTR(ret); |
176 | 181 | } | |
182 | radeon_bo_unreserve(bo); | ||
177 | return dma_buf_export(bo, &radeon_dmabuf_ops, obj->size, flags); | 183 | return dma_buf_export(bo, &radeon_dmabuf_ops, obj->size, flags); |
178 | } | 184 | } |
179 | 185 | ||
diff --git a/drivers/gpu/drm/radeon/rv770.c b/drivers/gpu/drm/radeon/rv770.c index 4ad0281fdc37..b4f51c569c36 100644 --- a/drivers/gpu/drm/radeon/rv770.c +++ b/drivers/gpu/drm/radeon/rv770.c | |||
@@ -616,6 +616,9 @@ static void rv770_gpu_init(struct radeon_device *rdev) | |||
616 | ACK_FLUSH_CTL(3) | | 616 | ACK_FLUSH_CTL(3) | |
617 | SYNC_FLUSH_CTL)); | 617 | SYNC_FLUSH_CTL)); |
618 | 618 | ||
619 | if (rdev->family != CHIP_RV770) | ||
620 | WREG32(SMX_SAR_CTL0, 0x00003f3f); | ||
621 | |||
619 | db_debug3 = RREG32(DB_DEBUG3); | 622 | db_debug3 = RREG32(DB_DEBUG3); |
620 | db_debug3 &= ~DB_CLK_OFF_DELAY(0x1f); | 623 | db_debug3 &= ~DB_CLK_OFF_DELAY(0x1f); |
621 | switch (rdev->family) { | 624 | switch (rdev->family) { |
@@ -792,7 +795,7 @@ static void rv770_gpu_init(struct radeon_device *rdev) | |||
792 | 795 | ||
793 | WREG32(PA_CL_ENHANCE, (CLIP_VTX_REORDER_ENA | | 796 | WREG32(PA_CL_ENHANCE, (CLIP_VTX_REORDER_ENA | |
794 | NUM_CLIP_SEQ(3))); | 797 | NUM_CLIP_SEQ(3))); |
795 | 798 | WREG32(VC_ENHANCE, 0); | |
796 | } | 799 | } |
797 | 800 | ||
798 | void r700_vram_gtt_location(struct radeon_device *rdev, struct radeon_mc *mc) | 801 | void r700_vram_gtt_location(struct radeon_device *rdev, struct radeon_mc *mc) |
diff --git a/drivers/gpu/drm/radeon/rv770d.h b/drivers/gpu/drm/radeon/rv770d.h index fdc089896011..b0adfc595d75 100644 --- a/drivers/gpu/drm/radeon/rv770d.h +++ b/drivers/gpu/drm/radeon/rv770d.h | |||
@@ -211,6 +211,7 @@ | |||
211 | #define SCRATCH_UMSK 0x8540 | 211 | #define SCRATCH_UMSK 0x8540 |
212 | #define SCRATCH_ADDR 0x8544 | 212 | #define SCRATCH_ADDR 0x8544 |
213 | 213 | ||
214 | #define SMX_SAR_CTL0 0xA008 | ||
214 | #define SMX_DC_CTL0 0xA020 | 215 | #define SMX_DC_CTL0 0xA020 |
215 | #define USE_HASH_FUNCTION (1 << 0) | 216 | #define USE_HASH_FUNCTION (1 << 0) |
216 | #define CACHE_DEPTH(x) ((x) << 1) | 217 | #define CACHE_DEPTH(x) ((x) << 1) |
@@ -310,6 +311,8 @@ | |||
310 | #define TCP_CNTL 0x9610 | 311 | #define TCP_CNTL 0x9610 |
311 | #define TCP_CHAN_STEER 0x9614 | 312 | #define TCP_CHAN_STEER 0x9614 |
312 | 313 | ||
314 | #define VC_ENHANCE 0x9714 | ||
315 | |||
313 | #define VGT_CACHE_INVALIDATION 0x88C4 | 316 | #define VGT_CACHE_INVALIDATION 0x88C4 |
314 | #define CACHE_INVALIDATION(x) ((x)<<0) | 317 | #define CACHE_INVALIDATION(x) ((x)<<0) |
315 | #define VC_ONLY 0 | 318 | #define VC_ONLY 0 |
diff --git a/drivers/gpu/drm/sis/sis_drv.c b/drivers/gpu/drm/sis/sis_drv.c index 30d98d14b5c5..dd14cd1a0033 100644 --- a/drivers/gpu/drm/sis/sis_drv.c +++ b/drivers/gpu/drm/sis/sis_drv.c | |||
@@ -47,9 +47,9 @@ static int sis_driver_load(struct drm_device *dev, unsigned long chipset) | |||
47 | if (dev_priv == NULL) | 47 | if (dev_priv == NULL) |
48 | return -ENOMEM; | 48 | return -ENOMEM; |
49 | 49 | ||
50 | idr_init(&dev_priv->object_idr); | ||
50 | dev->dev_private = (void *)dev_priv; | 51 | dev->dev_private = (void *)dev_priv; |
51 | dev_priv->chipset = chipset; | 52 | dev_priv->chipset = chipset; |
52 | idr_init(&dev->object_name_idr); | ||
53 | 53 | ||
54 | return 0; | 54 | return 0; |
55 | } | 55 | } |
diff --git a/drivers/gpu/drm/udl/udl_drv.c b/drivers/gpu/drm/udl/udl_drv.c index 4d02c46a9420..6e52069894b3 100644 --- a/drivers/gpu/drm/udl/udl_drv.c +++ b/drivers/gpu/drm/udl/udl_drv.c | |||
@@ -13,8 +13,21 @@ | |||
13 | 13 | ||
14 | static struct drm_driver driver; | 14 | static struct drm_driver driver; |
15 | 15 | ||
16 | /* | ||
17 | * There are many DisplayLink-based graphics products, all with unique PIDs. | ||
18 | * So we match on DisplayLink's VID + Vendor-Defined Interface Class (0xff) | ||
19 | * We also require a match on SubClass (0x00) and Protocol (0x00), | ||
20 | * which is compatible with all known USB 2.0 era graphics chips and firmware, | ||
21 | * but allows DisplayLink to increment those for any future incompatible chips | ||
22 | */ | ||
16 | static struct usb_device_id id_table[] = { | 23 | static struct usb_device_id id_table[] = { |
17 | {.idVendor = 0x17e9, .match_flags = USB_DEVICE_ID_MATCH_VENDOR,}, | 24 | {.idVendor = 0x17e9, .bInterfaceClass = 0xff, |
25 | .bInterfaceSubClass = 0x00, | ||
26 | .bInterfaceProtocol = 0x00, | ||
27 | .match_flags = USB_DEVICE_ID_MATCH_VENDOR | | ||
28 | USB_DEVICE_ID_MATCH_INT_CLASS | | ||
29 | USB_DEVICE_ID_MATCH_INT_SUBCLASS | | ||
30 | USB_DEVICE_ID_MATCH_INT_PROTOCOL,}, | ||
18 | {}, | 31 | {}, |
19 | }; | 32 | }; |
20 | MODULE_DEVICE_TABLE(usb, id_table); | 33 | MODULE_DEVICE_TABLE(usb, id_table); |
diff --git a/drivers/gpu/drm/via/via_map.c b/drivers/gpu/drm/via/via_map.c index 1f182254e81e..c126182ac07e 100644 --- a/drivers/gpu/drm/via/via_map.c +++ b/drivers/gpu/drm/via/via_map.c | |||
@@ -100,12 +100,11 @@ int via_driver_load(struct drm_device *dev, unsigned long chipset) | |||
100 | if (dev_priv == NULL) | 100 | if (dev_priv == NULL) |
101 | return -ENOMEM; | 101 | return -ENOMEM; |
102 | 102 | ||
103 | idr_init(&dev_priv->object_idr); | ||
103 | dev->dev_private = (void *)dev_priv; | 104 | dev->dev_private = (void *)dev_priv; |
104 | 105 | ||
105 | dev_priv->chipset = chipset; | 106 | dev_priv->chipset = chipset; |
106 | 107 | ||
107 | idr_init(&dev->object_name_idr); | ||
108 | |||
109 | pci_set_master(dev->pdev); | 108 | pci_set_master(dev->pdev); |
110 | 109 | ||
111 | ret = drm_vblank_init(dev, 1); | 110 | ret = drm_vblank_init(dev, 1); |
diff --git a/include/linux/vga_switcheroo.h b/include/linux/vga_switcheroo.h index 60da41fe9dc2..d844b7790ea6 100644 --- a/include/linux/vga_switcheroo.h +++ b/include/linux/vga_switcheroo.h | |||
@@ -9,6 +9,8 @@ | |||
9 | 9 | ||
10 | #include <linux/fb.h> | 10 | #include <linux/fb.h> |
11 | 11 | ||
12 | struct pci_dev; | ||
13 | |||
12 | enum vga_switcheroo_state { | 14 | enum vga_switcheroo_state { |
13 | VGA_SWITCHEROO_OFF, | 15 | VGA_SWITCHEROO_OFF, |
14 | VGA_SWITCHEROO_ON, | 16 | VGA_SWITCHEROO_ON, |