diff options
Diffstat (limited to 'arch/arm')
284 files changed, 3191 insertions, 5127 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 87b63fde06d7..245058b3b0ef 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -175,13 +175,6 @@ config ARCH_HAS_ILOG2_U32 | |||
175 | config ARCH_HAS_ILOG2_U64 | 175 | config ARCH_HAS_ILOG2_U64 |
176 | bool | 176 | bool |
177 | 177 | ||
178 | config ARCH_HAS_CPUFREQ | ||
179 | bool | ||
180 | help | ||
181 | Internal node to signify that the ARCH has CPUFREQ support | ||
182 | and that the relevant menu configurations are displayed for | ||
183 | it. | ||
184 | |||
185 | config ARCH_HAS_BANDGAP | 178 | config ARCH_HAS_BANDGAP |
186 | bool | 179 | bool |
187 | 180 | ||
@@ -318,7 +311,6 @@ config ARCH_MULTIPLATFORM | |||
318 | 311 | ||
319 | config ARCH_INTEGRATOR | 312 | config ARCH_INTEGRATOR |
320 | bool "ARM Ltd. Integrator family" | 313 | bool "ARM Ltd. Integrator family" |
321 | select ARCH_HAS_CPUFREQ | ||
322 | select ARM_AMBA | 314 | select ARM_AMBA |
323 | select ARM_PATCH_PHYS_VIRT | 315 | select ARM_PATCH_PHYS_VIRT |
324 | select AUTO_ZRELADDR | 316 | select AUTO_ZRELADDR |
@@ -538,7 +530,6 @@ config ARCH_DOVE | |||
538 | 530 | ||
539 | config ARCH_KIRKWOOD | 531 | config ARCH_KIRKWOOD |
540 | bool "Marvell Kirkwood" | 532 | bool "Marvell Kirkwood" |
541 | select ARCH_HAS_CPUFREQ | ||
542 | select ARCH_REQUIRE_GPIOLIB | 533 | select ARCH_REQUIRE_GPIOLIB |
543 | select CPU_FEROCEON | 534 | select CPU_FEROCEON |
544 | select GENERIC_CLOCKEVENTS | 535 | select GENERIC_CLOCKEVENTS |
@@ -637,7 +628,6 @@ config ARCH_LPC32XX | |||
637 | config ARCH_PXA | 628 | config ARCH_PXA |
638 | bool "PXA2xx/PXA3xx-based" | 629 | bool "PXA2xx/PXA3xx-based" |
639 | depends on MMU | 630 | depends on MMU |
640 | select ARCH_HAS_CPUFREQ | ||
641 | select ARCH_MTD_XIP | 631 | select ARCH_MTD_XIP |
642 | select ARCH_REQUIRE_GPIOLIB | 632 | select ARCH_REQUIRE_GPIOLIB |
643 | select ARM_CPU_SUSPEND if PM | 633 | select ARM_CPU_SUSPEND if PM |
@@ -707,7 +697,6 @@ config ARCH_RPC | |||
707 | 697 | ||
708 | config ARCH_SA1100 | 698 | config ARCH_SA1100 |
709 | bool "SA1100-based" | 699 | bool "SA1100-based" |
710 | select ARCH_HAS_CPUFREQ | ||
711 | select ARCH_MTD_XIP | 700 | select ARCH_MTD_XIP |
712 | select ARCH_REQUIRE_GPIOLIB | 701 | select ARCH_REQUIRE_GPIOLIB |
713 | select ARCH_SPARSEMEM_ENABLE | 702 | select ARCH_SPARSEMEM_ENABLE |
@@ -725,7 +714,6 @@ config ARCH_SA1100 | |||
725 | 714 | ||
726 | config ARCH_S3C24XX | 715 | config ARCH_S3C24XX |
727 | bool "Samsung S3C24XX SoCs" | 716 | bool "Samsung S3C24XX SoCs" |
728 | select ARCH_HAS_CPUFREQ | ||
729 | select ARCH_REQUIRE_GPIOLIB | 717 | select ARCH_REQUIRE_GPIOLIB |
730 | select ATAGS | 718 | select ATAGS |
731 | select CLKDEV_LOOKUP | 719 | select CLKDEV_LOOKUP |
@@ -746,7 +734,6 @@ config ARCH_S3C24XX | |||
746 | 734 | ||
747 | config ARCH_S3C64XX | 735 | config ARCH_S3C64XX |
748 | bool "Samsung S3C64XX" | 736 | bool "Samsung S3C64XX" |
749 | select ARCH_HAS_CPUFREQ | ||
750 | select ARCH_REQUIRE_GPIOLIB | 737 | select ARCH_REQUIRE_GPIOLIB |
751 | select ARM_AMBA | 738 | select ARM_AMBA |
752 | select ARM_VIC | 739 | select ARM_VIC |
@@ -809,7 +796,6 @@ config ARCH_S5PC100 | |||
809 | 796 | ||
810 | config ARCH_S5PV210 | 797 | config ARCH_S5PV210 |
811 | bool "Samsung S5PV210/S5PC110" | 798 | bool "Samsung S5PV210/S5PC110" |
812 | select ARCH_HAS_CPUFREQ | ||
813 | select ARCH_HAS_HOLES_MEMORYMODEL | 799 | select ARCH_HAS_HOLES_MEMORYMODEL |
814 | select ARCH_SPARSEMEM_ENABLE | 800 | select ARCH_SPARSEMEM_ENABLE |
815 | select ATAGS | 801 | select ATAGS |
@@ -845,7 +831,6 @@ config ARCH_DAVINCI | |||
845 | config ARCH_OMAP1 | 831 | config ARCH_OMAP1 |
846 | bool "TI OMAP1" | 832 | bool "TI OMAP1" |
847 | depends on MMU | 833 | depends on MMU |
848 | select ARCH_HAS_CPUFREQ | ||
849 | select ARCH_HAS_HOLES_MEMORYMODEL | 834 | select ARCH_HAS_HOLES_MEMORYMODEL |
850 | select ARCH_OMAP | 835 | select ARCH_OMAP |
851 | select ARCH_REQUIRE_GPIOLIB | 836 | select ARCH_REQUIRE_GPIOLIB |
@@ -1009,8 +994,6 @@ source "arch/arm/mach-rockchip/Kconfig" | |||
1009 | 994 | ||
1010 | source "arch/arm/mach-sa1100/Kconfig" | 995 | source "arch/arm/mach-sa1100/Kconfig" |
1011 | 996 | ||
1012 | source "arch/arm/plat-samsung/Kconfig" | ||
1013 | |||
1014 | source "arch/arm/mach-socfpga/Kconfig" | 997 | source "arch/arm/mach-socfpga/Kconfig" |
1015 | 998 | ||
1016 | source "arch/arm/mach-spear/Kconfig" | 999 | source "arch/arm/mach-spear/Kconfig" |
@@ -1028,6 +1011,7 @@ source "arch/arm/mach-s5pc100/Kconfig" | |||
1028 | source "arch/arm/mach-s5pv210/Kconfig" | 1011 | source "arch/arm/mach-s5pv210/Kconfig" |
1029 | 1012 | ||
1030 | source "arch/arm/mach-exynos/Kconfig" | 1013 | source "arch/arm/mach-exynos/Kconfig" |
1014 | source "arch/arm/plat-samsung/Kconfig" | ||
1031 | 1015 | ||
1032 | source "arch/arm/mach-shmobile/Kconfig" | 1016 | source "arch/arm/mach-shmobile/Kconfig" |
1033 | 1017 | ||
@@ -2109,9 +2093,7 @@ endmenu | |||
2109 | 2093 | ||
2110 | menu "CPU Power Management" | 2094 | menu "CPU Power Management" |
2111 | 2095 | ||
2112 | if ARCH_HAS_CPUFREQ | ||
2113 | source "drivers/cpufreq/Kconfig" | 2096 | source "drivers/cpufreq/Kconfig" |
2114 | endif | ||
2115 | 2097 | ||
2116 | source "drivers/cpuidle/Kconfig" | 2098 | source "drivers/cpuidle/Kconfig" |
2117 | 2099 | ||
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index 5986ff63b901..eb280d3483eb 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile | |||
@@ -327,7 +327,6 @@ dtb-$(CONFIG_ARCH_SHMOBILE_LEGACY) += r7s72100-genmai.dtb \ | |||
327 | r8a7778-bockw-reference.dtb \ | 327 | r8a7778-bockw-reference.dtb \ |
328 | r8a7740-armadillo800eva-reference.dtb \ | 328 | r8a7740-armadillo800eva-reference.dtb \ |
329 | r8a7779-marzen.dtb \ | 329 | r8a7779-marzen.dtb \ |
330 | r8a7779-marzen-reference.dtb \ | ||
331 | r8a7791-koelsch.dtb \ | 330 | r8a7791-koelsch.dtb \ |
332 | r8a7790-lager.dtb \ | 331 | r8a7790-lager.dtb \ |
333 | sh73a0-kzm9g.dtb \ | 332 | sh73a0-kzm9g.dtb \ |
@@ -339,7 +338,8 @@ dtb-$(CONFIG_ARCH_SHMOBILE_MULTI) += emev2-kzm9d.dtb \ | |||
339 | r7s72100-genmai.dtb \ | 338 | r7s72100-genmai.dtb \ |
340 | r8a7791-henninger.dtb \ | 339 | r8a7791-henninger.dtb \ |
341 | r8a7791-koelsch.dtb \ | 340 | r8a7791-koelsch.dtb \ |
342 | r8a7790-lager.dtb | 341 | r8a7790-lager.dtb \ |
342 | r8a7779-marzen.dtb | ||
343 | dtb-$(CONFIG_ARCH_SOCFPGA) += socfpga_arria5_socdk.dtb \ | 343 | dtb-$(CONFIG_ARCH_SOCFPGA) += socfpga_arria5_socdk.dtb \ |
344 | socfpga_cyclone5_socdk.dtb \ | 344 | socfpga_cyclone5_socdk.dtb \ |
345 | socfpga_cyclone5_sockit.dtb \ | 345 | socfpga_cyclone5_sockit.dtb \ |
@@ -357,7 +357,7 @@ dtb-$(CONFIG_ARCH_STI)+= stih407-b2120.dtb \ | |||
357 | stih415-b2020.dtb \ | 357 | stih415-b2020.dtb \ |
358 | stih416-b2000.dtb \ | 358 | stih416-b2000.dtb \ |
359 | stih416-b2020.dtb \ | 359 | stih416-b2020.dtb \ |
360 | stih416-b2020-revE.dtb | 360 | stih416-b2020e.dtb |
361 | dtb-$(CONFIG_MACH_SUN4I) += \ | 361 | dtb-$(CONFIG_MACH_SUN4I) += \ |
362 | sun4i-a10-a1000.dtb \ | 362 | sun4i-a10-a1000.dtb \ |
363 | sun4i-a10-cubieboard.dtb \ | 363 | sun4i-a10-cubieboard.dtb \ |
diff --git a/arch/arm/boot/dts/armada-375-db.dts b/arch/arm/boot/dts/armada-375-db.dts index 772fec2d26ce..1e2919d43d78 100644 --- a/arch/arm/boot/dts/armada-375-db.dts +++ b/arch/arm/boot/dts/armada-375-db.dts | |||
@@ -91,6 +91,8 @@ | |||
91 | marvell,nand-keep-config; | 91 | marvell,nand-keep-config; |
92 | marvell,nand-enable-arbiter; | 92 | marvell,nand-enable-arbiter; |
93 | nand-on-flash-bbt; | 93 | nand-on-flash-bbt; |
94 | nand-ecc-strength = <4>; | ||
95 | nand-ecc-step-size = <512>; | ||
94 | 96 | ||
95 | partition@0 { | 97 | partition@0 { |
96 | label = "U-Boot"; | 98 | label = "U-Boot"; |
diff --git a/arch/arm/boot/dts/armada-380.dtsi b/arch/arm/boot/dts/armada-380.dtsi index e69bc6759c39..4173a8ab34e7 100644 --- a/arch/arm/boot/dts/armada-380.dtsi +++ b/arch/arm/boot/dts/armada-380.dtsi | |||
@@ -16,7 +16,7 @@ | |||
16 | 16 | ||
17 | / { | 17 | / { |
18 | model = "Marvell Armada 380 family SoC"; | 18 | model = "Marvell Armada 380 family SoC"; |
19 | compatible = "marvell,armada380", "marvell,armada38x"; | 19 | compatible = "marvell,armada380"; |
20 | 20 | ||
21 | cpus { | 21 | cpus { |
22 | #address-cells = <1>; | 22 | #address-cells = <1>; |
diff --git a/arch/arm/boot/dts/armada-385-db.dts b/arch/arm/boot/dts/armada-385-db.dts index ff9637dd8d0f..1af886f1e486 100644 --- a/arch/arm/boot/dts/armada-385-db.dts +++ b/arch/arm/boot/dts/armada-385-db.dts | |||
@@ -16,7 +16,7 @@ | |||
16 | 16 | ||
17 | / { | 17 | / { |
18 | model = "Marvell Armada 385 Development Board"; | 18 | model = "Marvell Armada 385 Development Board"; |
19 | compatible = "marvell,a385-db", "marvell,armada385", "marvell,armada38x"; | 19 | compatible = "marvell,a385-db", "marvell,armada385", "marvell,armada380"; |
20 | 20 | ||
21 | chosen { | 21 | chosen { |
22 | bootargs = "console=ttyS0,115200 earlyprintk"; | 22 | bootargs = "console=ttyS0,115200 earlyprintk"; |
@@ -98,6 +98,8 @@ | |||
98 | marvell,nand-keep-config; | 98 | marvell,nand-keep-config; |
99 | marvell,nand-enable-arbiter; | 99 | marvell,nand-enable-arbiter; |
100 | nand-on-flash-bbt; | 100 | nand-on-flash-bbt; |
101 | nand-ecc-strength = <4>; | ||
102 | nand-ecc-step-size = <512>; | ||
101 | 103 | ||
102 | partition@0 { | 104 | partition@0 { |
103 | label = "U-Boot"; | 105 | label = "U-Boot"; |
diff --git a/arch/arm/boot/dts/armada-385-rd.dts b/arch/arm/boot/dts/armada-385-rd.dts index 40893255a3f0..aaca2861dc87 100644 --- a/arch/arm/boot/dts/armada-385-rd.dts +++ b/arch/arm/boot/dts/armada-385-rd.dts | |||
@@ -17,7 +17,7 @@ | |||
17 | 17 | ||
18 | / { | 18 | / { |
19 | model = "Marvell Armada 385 Reference Design"; | 19 | model = "Marvell Armada 385 Reference Design"; |
20 | compatible = "marvell,a385-rd", "marvell,armada385", "marvell,armada38x"; | 20 | compatible = "marvell,a385-rd", "marvell,armada385", "marvell,armada380"; |
21 | 21 | ||
22 | chosen { | 22 | chosen { |
23 | bootargs = "console=ttyS0,115200 earlyprintk"; | 23 | bootargs = "console=ttyS0,115200 earlyprintk"; |
diff --git a/arch/arm/boot/dts/armada-385.dtsi b/arch/arm/boot/dts/armada-385.dtsi index f011009bf4cf..6283d7912f71 100644 --- a/arch/arm/boot/dts/armada-385.dtsi +++ b/arch/arm/boot/dts/armada-385.dtsi | |||
@@ -16,7 +16,7 @@ | |||
16 | 16 | ||
17 | / { | 17 | / { |
18 | model = "Marvell Armada 385 family SoC"; | 18 | model = "Marvell Armada 385 family SoC"; |
19 | compatible = "marvell,armada385", "marvell,armada38x"; | 19 | compatible = "marvell,armada385", "marvell,armada380"; |
20 | 20 | ||
21 | cpus { | 21 | cpus { |
22 | #address-cells = <1>; | 22 | #address-cells = <1>; |
diff --git a/arch/arm/boot/dts/armada-38x.dtsi b/arch/arm/boot/dts/armada-38x.dtsi index 3de364e81b52..689fa1a46728 100644 --- a/arch/arm/boot/dts/armada-38x.dtsi +++ b/arch/arm/boot/dts/armada-38x.dtsi | |||
@@ -20,7 +20,7 @@ | |||
20 | 20 | ||
21 | / { | 21 | / { |
22 | model = "Marvell Armada 38x family SoC"; | 22 | model = "Marvell Armada 38x family SoC"; |
23 | compatible = "marvell,armada38x"; | 23 | compatible = "marvell,armada380"; |
24 | 24 | ||
25 | aliases { | 25 | aliases { |
26 | gpio0 = &gpio0; | 26 | gpio0 = &gpio0; |
diff --git a/arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts b/arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts index e5c6a0492ca0..4e5a59ee1501 100644 --- a/arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts +++ b/arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts | |||
@@ -25,7 +25,7 @@ | |||
25 | 25 | ||
26 | memory { | 26 | memory { |
27 | device_type = "memory"; | 27 | device_type = "memory"; |
28 | reg = <0 0x00000000 0 0xC0000000>; /* 3 GB */ | 28 | reg = <0 0x00000000 0 0x40000000>; /* 1 GB soldered on */ |
29 | }; | 29 | }; |
30 | 30 | ||
31 | soc { | 31 | soc { |
diff --git a/arch/arm/boot/dts/at91sam9261.dtsi b/arch/arm/boot/dts/at91sam9261.dtsi index b309c1c6e848..04927db1d6bf 100644 --- a/arch/arm/boot/dts/at91sam9261.dtsi +++ b/arch/arm/boot/dts/at91sam9261.dtsi | |||
@@ -568,24 +568,17 @@ | |||
568 | #size-cells = <0>; | 568 | #size-cells = <0>; |
569 | #interrupt-cells = <1>; | 569 | #interrupt-cells = <1>; |
570 | 570 | ||
571 | slow_rc_osc: slow_rc_osc { | 571 | main_osc: main_osc { |
572 | compatible = "fixed-clock"; | 572 | compatible = "atmel,at91rm9200-clk-main-osc"; |
573 | #clock-cells = <0>; | 573 | #clock-cells = <0>; |
574 | clock-frequency = <32768>; | 574 | interrupts-extended = <&pmc AT91_PMC_MOSCS>; |
575 | clock-accuracy = <50000000>; | 575 | clocks = <&main_xtal>; |
576 | }; | ||
577 | |||
578 | clk32k: slck { | ||
579 | compatible = "atmel,at91sam9260-clk-slow"; | ||
580 | #clock-cells = <0>; | ||
581 | clocks = <&slow_rc_osc &slow_xtal>; | ||
582 | }; | 576 | }; |
583 | 577 | ||
584 | main: mainck { | 578 | main: mainck { |
585 | compatible = "atmel,at91rm9200-clk-main"; | 579 | compatible = "atmel,at91rm9200-clk-main"; |
586 | #clock-cells = <0>; | 580 | #clock-cells = <0>; |
587 | interrupts-extended = <&pmc AT91_PMC_MOSCS>; | 581 | clocks = <&main_osc>; |
588 | clocks = <&main_xtal>; | ||
589 | }; | 582 | }; |
590 | 583 | ||
591 | plla: pllack { | 584 | plla: pllack { |
@@ -615,7 +608,7 @@ | |||
615 | compatible = "atmel,at91rm9200-clk-master"; | 608 | compatible = "atmel,at91rm9200-clk-master"; |
616 | #clock-cells = <0>; | 609 | #clock-cells = <0>; |
617 | interrupts-extended = <&pmc AT91_PMC_MCKRDY>; | 610 | interrupts-extended = <&pmc AT91_PMC_MCKRDY>; |
618 | clocks = <&clk32k>, <&main>, <&plla>, <&pllb>; | 611 | clocks = <&slow_xtal>, <&main>, <&plla>, <&pllb>; |
619 | atmel,clk-output-range = <0 94000000>; | 612 | atmel,clk-output-range = <0 94000000>; |
620 | atmel,clk-divisors = <1 2 4 0>; | 613 | atmel,clk-divisors = <1 2 4 0>; |
621 | }; | 614 | }; |
@@ -632,7 +625,7 @@ | |||
632 | #address-cells = <1>; | 625 | #address-cells = <1>; |
633 | #size-cells = <0>; | 626 | #size-cells = <0>; |
634 | interrupt-parent = <&pmc>; | 627 | interrupt-parent = <&pmc>; |
635 | clocks = <&clk32k>, <&main>, <&plla>, <&pllb>; | 628 | clocks = <&slow_xtal>, <&main>, <&plla>, <&pllb>; |
636 | 629 | ||
637 | prog0: prog0 { | 630 | prog0: prog0 { |
638 | #clock-cells = <0>; | 631 | #clock-cells = <0>; |
diff --git a/arch/arm/boot/dts/at91sam9261ek.dts b/arch/arm/boot/dts/at91sam9261ek.dts index c6683ea8b743..aa35a7aec9a8 100644 --- a/arch/arm/boot/dts/at91sam9261ek.dts +++ b/arch/arm/boot/dts/at91sam9261ek.dts | |||
@@ -20,6 +20,10 @@ | |||
20 | reg = <0x20000000 0x4000000>; | 20 | reg = <0x20000000 0x4000000>; |
21 | }; | 21 | }; |
22 | 22 | ||
23 | slow_xtal { | ||
24 | clock-frequency = <32768>; | ||
25 | }; | ||
26 | |||
23 | main_xtal { | 27 | main_xtal { |
24 | clock-frequency = <18432000>; | 28 | clock-frequency = <18432000>; |
25 | }; | 29 | }; |
diff --git a/arch/arm/boot/dts/at91sam9n12.dtsi b/arch/arm/boot/dts/at91sam9n12.dtsi index d1b82e6635d5..287795985e32 100644 --- a/arch/arm/boot/dts/at91sam9n12.dtsi +++ b/arch/arm/boot/dts/at91sam9n12.dtsi | |||
@@ -132,8 +132,8 @@ | |||
132 | <595000000 650000000 3 0>, | 132 | <595000000 650000000 3 0>, |
133 | <545000000 600000000 0 1>, | 133 | <545000000 600000000 0 1>, |
134 | <495000000 555000000 1 1>, | 134 | <495000000 555000000 1 1>, |
135 | <445000000 500000000 1 2>, | 135 | <445000000 500000000 2 1>, |
136 | <400000000 450000000 1 3>; | 136 | <400000000 450000000 3 1>; |
137 | }; | 137 | }; |
138 | 138 | ||
139 | plladiv: plladivck { | 139 | plladiv: plladivck { |
diff --git a/arch/arm/boot/dts/at91sam9x5.dtsi b/arch/arm/boot/dts/at91sam9x5.dtsi index 1a57298636a5..d6133f497207 100644 --- a/arch/arm/boot/dts/at91sam9x5.dtsi +++ b/arch/arm/boot/dts/at91sam9x5.dtsi | |||
@@ -140,8 +140,8 @@ | |||
140 | 595000000 650000000 3 0 | 140 | 595000000 650000000 3 0 |
141 | 545000000 600000000 0 1 | 141 | 545000000 600000000 0 1 |
142 | 495000000 555000000 1 1 | 142 | 495000000 555000000 1 1 |
143 | 445000000 500000000 1 2 | 143 | 445000000 500000000 2 1 |
144 | 400000000 450000000 1 3>; | 144 | 400000000 450000000 3 1>; |
145 | }; | 145 | }; |
146 | 146 | ||
147 | plladiv: plladivck { | 147 | plladiv: plladivck { |
diff --git a/arch/arm/boot/dts/emev2.dtsi b/arch/arm/boot/dts/emev2.dtsi index e37985fa10e2..00eeed3721b6 100644 --- a/arch/arm/boot/dts/emev2.dtsi +++ b/arch/arm/boot/dts/emev2.dtsi | |||
@@ -31,11 +31,13 @@ | |||
31 | device_type = "cpu"; | 31 | device_type = "cpu"; |
32 | compatible = "arm,cortex-a9"; | 32 | compatible = "arm,cortex-a9"; |
33 | reg = <0>; | 33 | reg = <0>; |
34 | clock-frequency = <533000000>; | ||
34 | }; | 35 | }; |
35 | cpu@1 { | 36 | cpu@1 { |
36 | device_type = "cpu"; | 37 | device_type = "cpu"; |
37 | compatible = "arm,cortex-a9"; | 38 | compatible = "arm,cortex-a9"; |
38 | reg = <1>; | 39 | reg = <1>; |
40 | clock-frequency = <533000000>; | ||
39 | }; | 41 | }; |
40 | }; | 42 | }; |
41 | 43 | ||
diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/arm/boot/dts/exynos4.dtsi index b8ece4be41ca..fbaf426d2daa 100644 --- a/arch/arm/boot/dts/exynos4.dtsi +++ b/arch/arm/boot/dts/exynos4.dtsi | |||
@@ -113,7 +113,7 @@ | |||
113 | compatible = "arm,cortex-a9-gic"; | 113 | compatible = "arm,cortex-a9-gic"; |
114 | #interrupt-cells = <3>; | 114 | #interrupt-cells = <3>; |
115 | interrupt-controller; | 115 | interrupt-controller; |
116 | reg = <0x10490000 0x1000>, <0x10480000 0x100>; | 116 | reg = <0x10490000 0x10000>, <0x10480000 0x10000>; |
117 | }; | 117 | }; |
118 | 118 | ||
119 | combiner: interrupt-controller@10440000 { | 119 | combiner: interrupt-controller@10440000 { |
diff --git a/arch/arm/boot/dts/imx51-babbage.dts b/arch/arm/boot/dts/imx51-babbage.dts index 6bc3243a80d3..181d77fa2fa6 100644 --- a/arch/arm/boot/dts/imx51-babbage.dts +++ b/arch/arm/boot/dts/imx51-babbage.dts | |||
@@ -315,15 +315,15 @@ | |||
315 | &esdhc1 { | 315 | &esdhc1 { |
316 | pinctrl-names = "default"; | 316 | pinctrl-names = "default"; |
317 | pinctrl-0 = <&pinctrl_esdhc1>; | 317 | pinctrl-0 = <&pinctrl_esdhc1>; |
318 | fsl,cd-controller; | 318 | cd-gpios = <&gpio1 0 GPIO_ACTIVE_LOW>; |
319 | fsl,wp-controller; | 319 | wp-gpios = <&gpio1 1 GPIO_ACTIVE_HIGH>; |
320 | status = "okay"; | 320 | status = "okay"; |
321 | }; | 321 | }; |
322 | 322 | ||
323 | &esdhc2 { | 323 | &esdhc2 { |
324 | pinctrl-names = "default"; | 324 | pinctrl-names = "default"; |
325 | pinctrl-0 = <&pinctrl_esdhc2>; | 325 | pinctrl-0 = <&pinctrl_esdhc2>; |
326 | cd-gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>; | 326 | cd-gpios = <&gpio1 6 GPIO_ACTIVE_LOW>; |
327 | wp-gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>; | 327 | wp-gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>; |
328 | status = "okay"; | 328 | status = "okay"; |
329 | }; | 329 | }; |
@@ -468,8 +468,8 @@ | |||
468 | MX51_PAD_SD1_DATA1__SD1_DATA1 0x20d5 | 468 | MX51_PAD_SD1_DATA1__SD1_DATA1 0x20d5 |
469 | MX51_PAD_SD1_DATA2__SD1_DATA2 0x20d5 | 469 | MX51_PAD_SD1_DATA2__SD1_DATA2 0x20d5 |
470 | MX51_PAD_SD1_DATA3__SD1_DATA3 0x20d5 | 470 | MX51_PAD_SD1_DATA3__SD1_DATA3 0x20d5 |
471 | MX51_PAD_GPIO1_0__SD1_CD 0x20d5 | 471 | MX51_PAD_GPIO1_0__GPIO1_0 0x100 |
472 | MX51_PAD_GPIO1_1__SD1_WP 0x20d5 | 472 | MX51_PAD_GPIO1_1__GPIO1_1 0x100 |
473 | >; | 473 | >; |
474 | }; | 474 | }; |
475 | 475 | ||
diff --git a/arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard.dts b/arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard.dts index 75e66c9c6144..31cfb7f2b02e 100644 --- a/arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard.dts +++ b/arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard.dts | |||
@@ -107,7 +107,7 @@ | |||
107 | &esdhc1 { | 107 | &esdhc1 { |
108 | pinctrl-names = "default"; | 108 | pinctrl-names = "default"; |
109 | pinctrl-0 = <&pinctrl_esdhc1 &pinctrl_esdhc1_cd>; | 109 | pinctrl-0 = <&pinctrl_esdhc1 &pinctrl_esdhc1_cd>; |
110 | fsl,cd-controller; | 110 | cd-gpios = <&gpio1 0 GPIO_ACTIVE_LOW>; |
111 | status = "okay"; | 111 | status = "okay"; |
112 | }; | 112 | }; |
113 | 113 | ||
@@ -206,7 +206,7 @@ | |||
206 | 206 | ||
207 | pinctrl_esdhc1_cd: esdhc1_cd { | 207 | pinctrl_esdhc1_cd: esdhc1_cd { |
208 | fsl,pins = < | 208 | fsl,pins = < |
209 | MX51_PAD_GPIO1_0__SD1_CD 0x20d5 | 209 | MX51_PAD_GPIO1_0__GPIO1_0 0xd5 |
210 | >; | 210 | >; |
211 | }; | 211 | }; |
212 | 212 | ||
diff --git a/arch/arm/boot/dts/imx53-m53evk.dts b/arch/arm/boot/dts/imx53-m53evk.dts index d5d146a8b149..c4956b0ffb35 100644 --- a/arch/arm/boot/dts/imx53-m53evk.dts +++ b/arch/arm/boot/dts/imx53-m53evk.dts | |||
@@ -21,27 +21,25 @@ | |||
21 | <0xb0000000 0x20000000>; | 21 | <0xb0000000 0x20000000>; |
22 | }; | 22 | }; |
23 | 23 | ||
24 | soc { | 24 | display1: display@di1 { |
25 | display1: display@di1 { | 25 | compatible = "fsl,imx-parallel-display"; |
26 | compatible = "fsl,imx-parallel-display"; | 26 | interface-pix-fmt = "bgr666"; |
27 | interface-pix-fmt = "bgr666"; | 27 | pinctrl-names = "default"; |
28 | pinctrl-names = "default"; | 28 | pinctrl-0 = <&pinctrl_ipu_disp1>; |
29 | pinctrl-0 = <&pinctrl_ipu_disp1>; | 29 | |
30 | 30 | display-timings { | |
31 | display-timings { | 31 | 800x480p60 { |
32 | 800x480p60 { | 32 | native-mode; |
33 | native-mode; | 33 | clock-frequency = <31500000>; |
34 | clock-frequency = <31500000>; | 34 | hactive = <800>; |
35 | hactive = <800>; | 35 | vactive = <480>; |
36 | vactive = <480>; | 36 | hfront-porch = <40>; |
37 | hfront-porch = <40>; | 37 | hback-porch = <88>; |
38 | hback-porch = <88>; | 38 | hsync-len = <128>; |
39 | hsync-len = <128>; | 39 | vback-porch = <33>; |
40 | vback-porch = <33>; | 40 | vfront-porch = <9>; |
41 | vfront-porch = <9>; | 41 | vsync-len = <3>; |
42 | vsync-len = <3>; | 42 | vsync-active = <1>; |
43 | vsync-active = <1>; | ||
44 | }; | ||
45 | }; | 43 | }; |
46 | }; | 44 | }; |
47 | 45 | ||
diff --git a/arch/arm/boot/dts/imx6dl-hummingboard.dts b/arch/arm/boot/dts/imx6dl-hummingboard.dts index 5373a5f2782b..c8e51dd41b8f 100644 --- a/arch/arm/boot/dts/imx6dl-hummingboard.dts +++ b/arch/arm/boot/dts/imx6dl-hummingboard.dts | |||
@@ -143,6 +143,14 @@ | |||
143 | fsl,pins = <MX6QDL_PAD_GPIO_0__GPIO1_IO00 0x1b0b0>; | 143 | fsl,pins = <MX6QDL_PAD_GPIO_0__GPIO1_IO00 0x1b0b0>; |
144 | }; | 144 | }; |
145 | 145 | ||
146 | pinctrl_hummingboard_usbotg_id: hummingboard-usbotg-id { | ||
147 | /* | ||
148 | * Similar to pinctrl_usbotg_2, but we want it | ||
149 | * pulled down for a fixed host connection. | ||
150 | */ | ||
151 | fsl,pins = <MX6QDL_PAD_GPIO_1__USB_OTG_ID 0x13059>; | ||
152 | }; | ||
153 | |||
146 | pinctrl_hummingboard_usbotg_vbus: hummingboard-usbotg-vbus { | 154 | pinctrl_hummingboard_usbotg_vbus: hummingboard-usbotg-vbus { |
147 | fsl,pins = <MX6QDL_PAD_EIM_D22__GPIO3_IO22 0x1b0b0>; | 155 | fsl,pins = <MX6QDL_PAD_EIM_D22__GPIO3_IO22 0x1b0b0>; |
148 | }; | 156 | }; |
@@ -178,6 +186,8 @@ | |||
178 | }; | 186 | }; |
179 | 187 | ||
180 | &usbotg { | 188 | &usbotg { |
189 | pinctrl-names = "default"; | ||
190 | pinctrl-0 = <&pinctrl_hummingboard_usbotg_id>; | ||
181 | vbus-supply = <®_usbotg_vbus>; | 191 | vbus-supply = <®_usbotg_vbus>; |
182 | status = "okay"; | 192 | status = "okay"; |
183 | }; | 193 | }; |
diff --git a/arch/arm/boot/dts/imx6q-gw51xx.dts b/arch/arm/boot/dts/imx6q-gw51xx.dts index af4929aee075..0e1406e58eff 100644 --- a/arch/arm/boot/dts/imx6q-gw51xx.dts +++ b/arch/arm/boot/dts/imx6q-gw51xx.dts | |||
@@ -11,7 +11,7 @@ | |||
11 | 11 | ||
12 | /dts-v1/; | 12 | /dts-v1/; |
13 | #include "imx6q.dtsi" | 13 | #include "imx6q.dtsi" |
14 | #include "imx6qdl-gw54xx.dtsi" | 14 | #include "imx6qdl-gw51xx.dtsi" |
15 | 15 | ||
16 | / { | 16 | / { |
17 | model = "Gateworks Ventana i.MX6 Quad GW51XX"; | 17 | model = "Gateworks Ventana i.MX6 Quad GW51XX"; |
diff --git a/arch/arm/boot/dts/imx6qdl-cubox-i.dtsi b/arch/arm/boot/dts/imx6qdl-cubox-i.dtsi index 25da82a03110..e8e781656b3f 100644 --- a/arch/arm/boot/dts/imx6qdl-cubox-i.dtsi +++ b/arch/arm/boot/dts/imx6qdl-cubox-i.dtsi | |||
@@ -12,6 +12,19 @@ | |||
12 | pinctrl-0 = <&pinctrl_cubox_i_ir>; | 12 | pinctrl-0 = <&pinctrl_cubox_i_ir>; |
13 | }; | 13 | }; |
14 | 14 | ||
15 | pwmleds { | ||
16 | compatible = "pwm-leds"; | ||
17 | pinctrl-names = "default"; | ||
18 | pinctrl-0 = <&pinctrl_cubox_i_pwm1>; | ||
19 | |||
20 | front { | ||
21 | active-low; | ||
22 | label = "imx6:red:front"; | ||
23 | max-brightness = <248>; | ||
24 | pwms = <&pwm1 0 50000>; | ||
25 | }; | ||
26 | }; | ||
27 | |||
15 | regulators { | 28 | regulators { |
16 | compatible = "simple-bus"; | 29 | compatible = "simple-bus"; |
17 | 30 | ||
@@ -109,6 +122,10 @@ | |||
109 | >; | 122 | >; |
110 | }; | 123 | }; |
111 | 124 | ||
125 | pinctrl_cubox_i_pwm1: cubox-i-pwm1-front-led { | ||
126 | fsl,pins = <MX6QDL_PAD_DISP0_DAT8__PWM1_OUT 0x1b0b0>; | ||
127 | }; | ||
128 | |||
112 | pinctrl_cubox_i_spdif: cubox-i-spdif { | 129 | pinctrl_cubox_i_spdif: cubox-i-spdif { |
113 | fsl,pins = <MX6QDL_PAD_GPIO_17__SPDIF_OUT 0x13091>; | 130 | fsl,pins = <MX6QDL_PAD_GPIO_17__SPDIF_OUT 0x13091>; |
114 | }; | 131 | }; |
@@ -117,6 +134,14 @@ | |||
117 | fsl,pins = <MX6QDL_PAD_GPIO_0__GPIO1_IO00 0x4001b0b0>; | 134 | fsl,pins = <MX6QDL_PAD_GPIO_0__GPIO1_IO00 0x4001b0b0>; |
118 | }; | 135 | }; |
119 | 136 | ||
137 | pinctrl_cubox_i_usbotg_id: cubox-i-usbotg-id { | ||
138 | /* | ||
139 | * The Cubox-i pulls this low, but as it's pointless | ||
140 | * leaving it as a pull-up, even if it is just 10uA. | ||
141 | */ | ||
142 | fsl,pins = <MX6QDL_PAD_GPIO_1__USB_OTG_ID 0x13059>; | ||
143 | }; | ||
144 | |||
120 | pinctrl_cubox_i_usbotg_vbus: cubox-i-usbotg-vbus { | 145 | pinctrl_cubox_i_usbotg_vbus: cubox-i-usbotg-vbus { |
121 | fsl,pins = <MX6QDL_PAD_EIM_D22__GPIO3_IO22 0x4001b0b0>; | 146 | fsl,pins = <MX6QDL_PAD_EIM_D22__GPIO3_IO22 0x4001b0b0>; |
122 | }; | 147 | }; |
@@ -153,6 +178,8 @@ | |||
153 | }; | 178 | }; |
154 | 179 | ||
155 | &usbotg { | 180 | &usbotg { |
181 | pinctrl-names = "default"; | ||
182 | pinctrl-0 = <&pinctrl_cubox_i_usbotg_id>; | ||
156 | vbus-supply = <®_usbotg_vbus>; | 183 | vbus-supply = <®_usbotg_vbus>; |
157 | status = "okay"; | 184 | status = "okay"; |
158 | }; | 185 | }; |
diff --git a/arch/arm/boot/dts/imx6qdl-gw51xx.dtsi b/arch/arm/boot/dts/imx6qdl-gw51xx.dtsi index 31665adcbf39..0db15af41cb1 100644 --- a/arch/arm/boot/dts/imx6qdl-gw51xx.dtsi +++ b/arch/arm/boot/dts/imx6qdl-gw51xx.dtsi | |||
@@ -161,7 +161,7 @@ | |||
161 | status = "okay"; | 161 | status = "okay"; |
162 | 162 | ||
163 | pmic: ltc3676@3c { | 163 | pmic: ltc3676@3c { |
164 | compatible = "ltc,ltc3676"; | 164 | compatible = "lltc,ltc3676"; |
165 | reg = <0x3c>; | 165 | reg = <0x3c>; |
166 | 166 | ||
167 | regulators { | 167 | regulators { |
diff --git a/arch/arm/boot/dts/imx6qdl-gw52xx.dtsi b/arch/arm/boot/dts/imx6qdl-gw52xx.dtsi index 367af3ec9435..744c8a2d81f6 100644 --- a/arch/arm/boot/dts/imx6qdl-gw52xx.dtsi +++ b/arch/arm/boot/dts/imx6qdl-gw52xx.dtsi | |||
@@ -220,7 +220,7 @@ | |||
220 | }; | 220 | }; |
221 | 221 | ||
222 | pmic: ltc3676@3c { | 222 | pmic: ltc3676@3c { |
223 | compatible = "ltc,ltc3676"; | 223 | compatible = "lltc,ltc3676"; |
224 | reg = <0x3c>; | 224 | reg = <0x3c>; |
225 | 225 | ||
226 | regulators { | 226 | regulators { |
@@ -288,7 +288,7 @@ | |||
288 | codec: sgtl5000@0a { | 288 | codec: sgtl5000@0a { |
289 | compatible = "fsl,sgtl5000"; | 289 | compatible = "fsl,sgtl5000"; |
290 | reg = <0x0a>; | 290 | reg = <0x0a>; |
291 | clocks = <&clks 169>; | 291 | clocks = <&clks 201>; |
292 | VDDA-supply = <®_1p8v>; | 292 | VDDA-supply = <®_1p8v>; |
293 | VDDIO-supply = <®_3p3v>; | 293 | VDDIO-supply = <®_3p3v>; |
294 | }; | 294 | }; |
diff --git a/arch/arm/boot/dts/imx6qdl-gw53xx.dtsi b/arch/arm/boot/dts/imx6qdl-gw53xx.dtsi index c91b5a6c769b..adf150c1be90 100644 --- a/arch/arm/boot/dts/imx6qdl-gw53xx.dtsi +++ b/arch/arm/boot/dts/imx6qdl-gw53xx.dtsi | |||
@@ -234,7 +234,7 @@ | |||
234 | }; | 234 | }; |
235 | 235 | ||
236 | pmic: ltc3676@3c { | 236 | pmic: ltc3676@3c { |
237 | compatible = "ltc,ltc3676"; | 237 | compatible = "lltc,ltc3676"; |
238 | reg = <0x3c>; | 238 | reg = <0x3c>; |
239 | 239 | ||
240 | regulators { | 240 | regulators { |
diff --git a/arch/arm/boot/dts/imx6qdl-microsom.dtsi b/arch/arm/boot/dts/imx6qdl-microsom.dtsi index d729d0b15f25..79eac6849d4c 100644 --- a/arch/arm/boot/dts/imx6qdl-microsom.dtsi +++ b/arch/arm/boot/dts/imx6qdl-microsom.dtsi | |||
@@ -10,14 +10,6 @@ | |||
10 | MX6QDL_PAD_CSI0_DAT11__UART1_RX_DATA 0x1b0b1 | 10 | MX6QDL_PAD_CSI0_DAT11__UART1_RX_DATA 0x1b0b1 |
11 | >; | 11 | >; |
12 | }; | 12 | }; |
13 | |||
14 | pinctrl_microsom_usbotg: microsom-usbotg { | ||
15 | /* | ||
16 | * Similar to pinctrl_usbotg_2, but we want it | ||
17 | * pulled down for a fixed host connection. | ||
18 | */ | ||
19 | fsl,pins = <MX6QDL_PAD_GPIO_1__USB_OTG_ID 0x13059>; | ||
20 | }; | ||
21 | }; | 13 | }; |
22 | }; | 14 | }; |
23 | 15 | ||
@@ -26,8 +18,3 @@ | |||
26 | pinctrl-0 = <&pinctrl_microsom_uart1>; | 18 | pinctrl-0 = <&pinctrl_microsom_uart1>; |
27 | status = "okay"; | 19 | status = "okay"; |
28 | }; | 20 | }; |
29 | |||
30 | &usbotg { | ||
31 | pinctrl-names = "default"; | ||
32 | pinctrl-0 = <&pinctrl_microsom_usbotg>; | ||
33 | }; | ||
diff --git a/arch/arm/boot/dts/imx6sl.dtsi b/arch/arm/boot/dts/imx6sl.dtsi index 2d4e5285f3f3..57d4abe03a94 100644 --- a/arch/arm/boot/dts/imx6sl.dtsi +++ b/arch/arm/boot/dts/imx6sl.dtsi | |||
@@ -686,7 +686,7 @@ | |||
686 | compatible = "fsl,imx6sl-fec", "fsl,imx25-fec"; | 686 | compatible = "fsl,imx6sl-fec", "fsl,imx25-fec"; |
687 | reg = <0x02188000 0x4000>; | 687 | reg = <0x02188000 0x4000>; |
688 | interrupts = <0 114 IRQ_TYPE_LEVEL_HIGH>; | 688 | interrupts = <0 114 IRQ_TYPE_LEVEL_HIGH>; |
689 | clocks = <&clks IMX6SL_CLK_ENET_REF>, | 689 | clocks = <&clks IMX6SL_CLK_ENET>, |
690 | <&clks IMX6SL_CLK_ENET_REF>; | 690 | <&clks IMX6SL_CLK_ENET_REF>; |
691 | clock-names = "ipg", "ahb"; | 691 | clock-names = "ipg", "ahb"; |
692 | status = "disabled"; | 692 | status = "disabled"; |
diff --git a/arch/arm/boot/dts/kirkwood-guruplug-server-plus.dts b/arch/arm/boot/dts/kirkwood-guruplug-server-plus.dts index c5a1fc75c7a3..b2d9834bf458 100644 --- a/arch/arm/boot/dts/kirkwood-guruplug-server-plus.dts +++ b/arch/arm/boot/dts/kirkwood-guruplug-server-plus.dts | |||
@@ -105,7 +105,6 @@ | |||
105 | compatible = "ethernet-phy-id0141.0cb0", | 105 | compatible = "ethernet-phy-id0141.0cb0", |
106 | "ethernet-phy-ieee802.3-c22"; | 106 | "ethernet-phy-ieee802.3-c22"; |
107 | reg = <0>; | 107 | reg = <0>; |
108 | phy-connection-type = "rgmii-id"; | ||
109 | }; | 108 | }; |
110 | 109 | ||
111 | ethphy1: ethernet-phy@1 { | 110 | ethphy1: ethernet-phy@1 { |
@@ -113,7 +112,6 @@ | |||
113 | compatible = "ethernet-phy-id0141.0cb0", | 112 | compatible = "ethernet-phy-id0141.0cb0", |
114 | "ethernet-phy-ieee802.3-c22"; | 113 | "ethernet-phy-ieee802.3-c22"; |
115 | reg = <1>; | 114 | reg = <1>; |
116 | phy-connection-type = "rgmii-id"; | ||
117 | }; | 115 | }; |
118 | }; | 116 | }; |
119 | 117 | ||
@@ -121,6 +119,7 @@ | |||
121 | status = "okay"; | 119 | status = "okay"; |
122 | ethernet0-port@0 { | 120 | ethernet0-port@0 { |
123 | phy-handle = <ðphy0>; | 121 | phy-handle = <ðphy0>; |
122 | phy-connection-type = "rgmii-id"; | ||
124 | }; | 123 | }; |
125 | }; | 124 | }; |
126 | 125 | ||
@@ -128,5 +127,6 @@ | |||
128 | status = "okay"; | 127 | status = "okay"; |
129 | ethernet1-port@0 { | 128 | ethernet1-port@0 { |
130 | phy-handle = <ðphy1>; | 129 | phy-handle = <ðphy1>; |
130 | phy-connection-type = "rgmii-id"; | ||
131 | }; | 131 | }; |
132 | }; | 132 | }; |
diff --git a/arch/arm/boot/dts/r7s72100.dtsi b/arch/arm/boot/dts/r7s72100.dtsi index f50fbc8f3bd9..bdee22541189 100644 --- a/arch/arm/boot/dts/r7s72100.dtsi +++ b/arch/arm/boot/dts/r7s72100.dtsi | |||
@@ -144,6 +144,7 @@ | |||
144 | device_type = "cpu"; | 144 | device_type = "cpu"; |
145 | compatible = "arm,cortex-a9"; | 145 | compatible = "arm,cortex-a9"; |
146 | reg = <0>; | 146 | reg = <0>; |
147 | clock-frequency = <400000000>; | ||
147 | }; | 148 | }; |
148 | }; | 149 | }; |
149 | 150 | ||
diff --git a/arch/arm/boot/dts/r8a7779-marzen-reference.dts b/arch/arm/boot/dts/r8a7779-marzen-reference.dts deleted file mode 100644 index b27c6373ff4d..000000000000 --- a/arch/arm/boot/dts/r8a7779-marzen-reference.dts +++ /dev/null | |||
@@ -1,121 +0,0 @@ | |||
1 | /* | ||
2 | * Reference Device Tree Source for the Marzen board | ||
3 | * | ||
4 | * Copyright (C) 2013 Renesas Solutions Corp. | ||
5 | * Copyright (C) 2013 Simon Horman | ||
6 | * | ||
7 | * This file is licensed under the terms of the GNU General Public License | ||
8 | * version 2. This program is licensed "as is" without any warranty of any | ||
9 | * kind, whether express or implied. | ||
10 | */ | ||
11 | |||
12 | /dts-v1/; | ||
13 | #include "r8a7779.dtsi" | ||
14 | #include <dt-bindings/gpio/gpio.h> | ||
15 | #include <dt-bindings/interrupt-controller/irq.h> | ||
16 | |||
17 | / { | ||
18 | model = "marzen"; | ||
19 | compatible = "renesas,marzen-reference", "renesas,r8a7779"; | ||
20 | |||
21 | chosen { | ||
22 | bootargs = "console=ttySC2,115200 earlyprintk=sh-sci.2,115200 ignore_loglevel root=/dev/nfs ip=on rw"; | ||
23 | }; | ||
24 | |||
25 | memory { | ||
26 | device_type = "memory"; | ||
27 | reg = <0x60000000 0x40000000>; | ||
28 | }; | ||
29 | |||
30 | fixedregulator3v3: fixedregulator@0 { | ||
31 | compatible = "regulator-fixed"; | ||
32 | regulator-name = "fixed-3.3V"; | ||
33 | regulator-min-microvolt = <3300000>; | ||
34 | regulator-max-microvolt = <3300000>; | ||
35 | regulator-boot-on; | ||
36 | regulator-always-on; | ||
37 | }; | ||
38 | |||
39 | lan0@18000000 { | ||
40 | compatible = "smsc,lan9220", "smsc,lan9115"; | ||
41 | reg = <0x18000000 0x100>; | ||
42 | pinctrl-0 = <&lan0_pins>; | ||
43 | pinctrl-names = "default"; | ||
44 | |||
45 | phy-mode = "mii"; | ||
46 | interrupt-parent = <&irqpin0>; | ||
47 | interrupts = <1 IRQ_TYPE_EDGE_FALLING>; | ||
48 | smsc,irq-push-pull; | ||
49 | reg-io-width = <4>; | ||
50 | vddvario-supply = <&fixedregulator3v3>; | ||
51 | vdd33a-supply = <&fixedregulator3v3>; | ||
52 | }; | ||
53 | |||
54 | leds { | ||
55 | compatible = "gpio-leds"; | ||
56 | led2 { | ||
57 | gpios = <&gpio4 29 GPIO_ACTIVE_HIGH>; | ||
58 | }; | ||
59 | led3 { | ||
60 | gpios = <&gpio4 30 GPIO_ACTIVE_HIGH>; | ||
61 | }; | ||
62 | led4 { | ||
63 | gpios = <&gpio4 31 GPIO_ACTIVE_HIGH>; | ||
64 | }; | ||
65 | }; | ||
66 | }; | ||
67 | |||
68 | &irqpin0 { | ||
69 | status = "okay"; | ||
70 | }; | ||
71 | |||
72 | &pfc { | ||
73 | pinctrl-0 = <&scif2_pins &scif4_pins>; | ||
74 | pinctrl-names = "default"; | ||
75 | |||
76 | lan0_pins: lan0 { | ||
77 | intc { | ||
78 | renesas,groups = "intc_irq1_b"; | ||
79 | renesas,function = "intc"; | ||
80 | }; | ||
81 | lbsc { | ||
82 | renesas,groups = "lbsc_ex_cs0"; | ||
83 | renesas,function = "lbsc"; | ||
84 | }; | ||
85 | }; | ||
86 | |||
87 | scif2_pins: serial2 { | ||
88 | renesas,groups = "scif2_data_c"; | ||
89 | renesas,function = "scif2"; | ||
90 | }; | ||
91 | |||
92 | scif4_pins: serial4 { | ||
93 | renesas,groups = "scif4_data"; | ||
94 | renesas,function = "scif4"; | ||
95 | }; | ||
96 | |||
97 | sdhi0_pins: sd0 { | ||
98 | renesas,groups = "sdhi0_data4", "sdhi0_ctrl", "sdhi0_cd"; | ||
99 | renesas,function = "sdhi0"; | ||
100 | }; | ||
101 | |||
102 | hspi0_pins: hspi0 { | ||
103 | renesas,groups = "hspi0"; | ||
104 | renesas,function = "hspi0"; | ||
105 | }; | ||
106 | }; | ||
107 | |||
108 | &sdhi0 { | ||
109 | pinctrl-0 = <&sdhi0_pins>; | ||
110 | pinctrl-names = "default"; | ||
111 | |||
112 | vmmc-supply = <&fixedregulator3v3>; | ||
113 | bus-width = <4>; | ||
114 | status = "okay"; | ||
115 | }; | ||
116 | |||
117 | &hspi0 { | ||
118 | pinctrl-0 = <&hspi0_pins>; | ||
119 | pinctrl-names = "default"; | ||
120 | status = "okay"; | ||
121 | }; | ||
diff --git a/arch/arm/boot/dts/r8a7779-marzen.dts b/arch/arm/boot/dts/r8a7779-marzen.dts index a7af2c2371f2..5745555df943 100644 --- a/arch/arm/boot/dts/r8a7779-marzen.dts +++ b/arch/arm/boot/dts/r8a7779-marzen.dts | |||
@@ -11,17 +11,131 @@ | |||
11 | 11 | ||
12 | /dts-v1/; | 12 | /dts-v1/; |
13 | #include "r8a7779.dtsi" | 13 | #include "r8a7779.dtsi" |
14 | #include <dt-bindings/gpio/gpio.h> | ||
15 | #include <dt-bindings/interrupt-controller/irq.h> | ||
14 | 16 | ||
15 | / { | 17 | / { |
16 | model = "marzen"; | 18 | model = "marzen"; |
17 | compatible = "renesas,marzen", "renesas,r8a7779"; | 19 | compatible = "renesas,marzen", "renesas,r8a7779"; |
18 | 20 | ||
21 | aliases { | ||
22 | serial2 = &scif2; | ||
23 | serial4 = &scif4; | ||
24 | }; | ||
25 | |||
19 | chosen { | 26 | chosen { |
20 | bootargs = "console=ttySC2,115200 earlyprintk=sh-sci.2,115200 ignore_loglevel root=/dev/nfs ip=on"; | 27 | bootargs = "console=ttySC2,115200 ignore_loglevel root=/dev/nfs ip=on"; |
21 | }; | 28 | }; |
22 | 29 | ||
23 | memory { | 30 | memory { |
24 | device_type = "memory"; | 31 | device_type = "memory"; |
25 | reg = <0x60000000 0x40000000>; | 32 | reg = <0x60000000 0x40000000>; |
26 | }; | 33 | }; |
34 | |||
35 | fixedregulator3v3: fixedregulator@0 { | ||
36 | compatible = "regulator-fixed"; | ||
37 | regulator-name = "fixed-3.3V"; | ||
38 | regulator-min-microvolt = <3300000>; | ||
39 | regulator-max-microvolt = <3300000>; | ||
40 | regulator-boot-on; | ||
41 | regulator-always-on; | ||
42 | }; | ||
43 | |||
44 | lan0@18000000 { | ||
45 | compatible = "smsc,lan9220", "smsc,lan9115"; | ||
46 | reg = <0x18000000 0x100>; | ||
47 | pinctrl-0 = <&lan0_pins>; | ||
48 | pinctrl-names = "default"; | ||
49 | |||
50 | phy-mode = "mii"; | ||
51 | interrupt-parent = <&irqpin0>; | ||
52 | interrupts = <1 IRQ_TYPE_EDGE_FALLING>; | ||
53 | smsc,irq-push-pull; | ||
54 | reg-io-width = <4>; | ||
55 | vddvario-supply = <&fixedregulator3v3>; | ||
56 | vdd33a-supply = <&fixedregulator3v3>; | ||
57 | }; | ||
58 | |||
59 | leds { | ||
60 | compatible = "gpio-leds"; | ||
61 | led2 { | ||
62 | gpios = <&gpio4 29 GPIO_ACTIVE_HIGH>; | ||
63 | }; | ||
64 | led3 { | ||
65 | gpios = <&gpio4 30 GPIO_ACTIVE_HIGH>; | ||
66 | }; | ||
67 | led4 { | ||
68 | gpios = <&gpio4 31 GPIO_ACTIVE_HIGH>; | ||
69 | }; | ||
70 | }; | ||
71 | }; | ||
72 | |||
73 | &irqpin0 { | ||
74 | status = "okay"; | ||
75 | }; | ||
76 | |||
77 | &extal_clk { | ||
78 | clock-frequency = <31250000>; | ||
79 | }; | ||
80 | |||
81 | &pfc { | ||
82 | lan0_pins: lan0 { | ||
83 | intc { | ||
84 | renesas,groups = "intc_irq1_b"; | ||
85 | renesas,function = "intc"; | ||
86 | }; | ||
87 | lbsc { | ||
88 | renesas,groups = "lbsc_ex_cs0"; | ||
89 | renesas,function = "lbsc"; | ||
90 | }; | ||
91 | }; | ||
92 | |||
93 | scif2_pins: serial2 { | ||
94 | renesas,groups = "scif2_data_c"; | ||
95 | renesas,function = "scif2"; | ||
96 | }; | ||
97 | |||
98 | scif4_pins: serial4 { | ||
99 | renesas,groups = "scif4_data"; | ||
100 | renesas,function = "scif4"; | ||
101 | }; | ||
102 | |||
103 | sdhi0_pins: sd0 { | ||
104 | renesas,groups = "sdhi0_data4", "sdhi0_ctrl", "sdhi0_cd"; | ||
105 | renesas,function = "sdhi0"; | ||
106 | }; | ||
107 | |||
108 | hspi0_pins: hspi0 { | ||
109 | renesas,groups = "hspi0"; | ||
110 | renesas,function = "hspi0"; | ||
111 | }; | ||
112 | }; | ||
113 | |||
114 | &scif2 { | ||
115 | pinctrl-0 = <&scif2_pins>; | ||
116 | pinctrl-names = "default"; | ||
117 | |||
118 | status = "okay"; | ||
119 | }; | ||
120 | |||
121 | &scif4 { | ||
122 | pinctrl-0 = <&scif4_pins>; | ||
123 | pinctrl-names = "default"; | ||
124 | |||
125 | status = "okay"; | ||
126 | }; | ||
127 | |||
128 | &sdhi0 { | ||
129 | pinctrl-0 = <&sdhi0_pins>; | ||
130 | pinctrl-names = "default"; | ||
131 | |||
132 | vmmc-supply = <&fixedregulator3v3>; | ||
133 | bus-width = <4>; | ||
134 | status = "okay"; | ||
135 | }; | ||
136 | |||
137 | &hspi0 { | ||
138 | pinctrl-0 = <&hspi0_pins>; | ||
139 | pinctrl-names = "default"; | ||
140 | status = "okay"; | ||
27 | }; | 141 | }; |
diff --git a/arch/arm/boot/dts/r8a7779.dtsi b/arch/arm/boot/dts/r8a7779.dtsi index b517c8e6b420..94e2fc836492 100644 --- a/arch/arm/boot/dts/r8a7779.dtsi +++ b/arch/arm/boot/dts/r8a7779.dtsi | |||
@@ -11,6 +11,7 @@ | |||
11 | 11 | ||
12 | /include/ "skeleton.dtsi" | 12 | /include/ "skeleton.dtsi" |
13 | 13 | ||
14 | #include <dt-bindings/clock/r8a7779-clock.h> | ||
14 | #include <dt-bindings/interrupt-controller/irq.h> | 15 | #include <dt-bindings/interrupt-controller/irq.h> |
15 | 16 | ||
16 | / { | 17 | / { |
@@ -25,21 +26,25 @@ | |||
25 | device_type = "cpu"; | 26 | device_type = "cpu"; |
26 | compatible = "arm,cortex-a9"; | 27 | compatible = "arm,cortex-a9"; |
27 | reg = <0>; | 28 | reg = <0>; |
29 | clock-frequency = <1000000000>; | ||
28 | }; | 30 | }; |
29 | cpu@1 { | 31 | cpu@1 { |
30 | device_type = "cpu"; | 32 | device_type = "cpu"; |
31 | compatible = "arm,cortex-a9"; | 33 | compatible = "arm,cortex-a9"; |
32 | reg = <1>; | 34 | reg = <1>; |
35 | clock-frequency = <1000000000>; | ||
33 | }; | 36 | }; |
34 | cpu@2 { | 37 | cpu@2 { |
35 | device_type = "cpu"; | 38 | device_type = "cpu"; |
36 | compatible = "arm,cortex-a9"; | 39 | compatible = "arm,cortex-a9"; |
37 | reg = <2>; | 40 | reg = <2>; |
41 | clock-frequency = <1000000000>; | ||
38 | }; | 42 | }; |
39 | cpu@3 { | 43 | cpu@3 { |
40 | device_type = "cpu"; | 44 | device_type = "cpu"; |
41 | compatible = "arm,cortex-a9"; | 45 | compatible = "arm,cortex-a9"; |
42 | reg = <3>; | 46 | reg = <3>; |
47 | clock-frequency = <1000000000>; | ||
43 | }; | 48 | }; |
44 | }; | 49 | }; |
45 | 50 | ||
@@ -157,6 +162,7 @@ | |||
157 | compatible = "renesas,i2c-r8a7779"; | 162 | compatible = "renesas,i2c-r8a7779"; |
158 | reg = <0xffc70000 0x1000>; | 163 | reg = <0xffc70000 0x1000>; |
159 | interrupts = <0 79 IRQ_TYPE_LEVEL_HIGH>; | 164 | interrupts = <0 79 IRQ_TYPE_LEVEL_HIGH>; |
165 | clocks = <&mstp0_clks R8A7779_CLK_I2C0>; | ||
160 | status = "disabled"; | 166 | status = "disabled"; |
161 | }; | 167 | }; |
162 | 168 | ||
@@ -166,6 +172,7 @@ | |||
166 | compatible = "renesas,i2c-r8a7779"; | 172 | compatible = "renesas,i2c-r8a7779"; |
167 | reg = <0xffc71000 0x1000>; | 173 | reg = <0xffc71000 0x1000>; |
168 | interrupts = <0 82 IRQ_TYPE_LEVEL_HIGH>; | 174 | interrupts = <0 82 IRQ_TYPE_LEVEL_HIGH>; |
175 | clocks = <&mstp0_clks R8A7779_CLK_I2C1>; | ||
169 | status = "disabled"; | 176 | status = "disabled"; |
170 | }; | 177 | }; |
171 | 178 | ||
@@ -175,6 +182,7 @@ | |||
175 | compatible = "renesas,i2c-r8a7779"; | 182 | compatible = "renesas,i2c-r8a7779"; |
176 | reg = <0xffc72000 0x1000>; | 183 | reg = <0xffc72000 0x1000>; |
177 | interrupts = <0 80 IRQ_TYPE_LEVEL_HIGH>; | 184 | interrupts = <0 80 IRQ_TYPE_LEVEL_HIGH>; |
185 | clocks = <&mstp0_clks R8A7779_CLK_I2C2>; | ||
178 | status = "disabled"; | 186 | status = "disabled"; |
179 | }; | 187 | }; |
180 | 188 | ||
@@ -184,6 +192,67 @@ | |||
184 | compatible = "renesas,i2c-r8a7779"; | 192 | compatible = "renesas,i2c-r8a7779"; |
185 | reg = <0xffc73000 0x1000>; | 193 | reg = <0xffc73000 0x1000>; |
186 | interrupts = <0 81 IRQ_TYPE_LEVEL_HIGH>; | 194 | interrupts = <0 81 IRQ_TYPE_LEVEL_HIGH>; |
195 | clocks = <&mstp0_clks R8A7779_CLK_I2C3>; | ||
196 | status = "disabled"; | ||
197 | }; | ||
198 | |||
199 | scif0: serial@ffe40000 { | ||
200 | compatible = "renesas,scif-r8a7779", "renesas,scif"; | ||
201 | reg = <0xffe40000 0x100>; | ||
202 | interrupt-parent = <&gic>; | ||
203 | interrupts = <0 88 IRQ_TYPE_LEVEL_HIGH>; | ||
204 | clocks = <&cpg_clocks R8A7779_CLK_P>; | ||
205 | clock-names = "sci_ick"; | ||
206 | status = "disabled"; | ||
207 | }; | ||
208 | |||
209 | scif1: serial@ffe41000 { | ||
210 | compatible = "renesas,scif-r8a7779", "renesas,scif"; | ||
211 | reg = <0xffe41000 0x100>; | ||
212 | interrupt-parent = <&gic>; | ||
213 | interrupts = <0 89 IRQ_TYPE_LEVEL_HIGH>; | ||
214 | clocks = <&cpg_clocks R8A7779_CLK_P>; | ||
215 | clock-names = "sci_ick"; | ||
216 | status = "disabled"; | ||
217 | }; | ||
218 | |||
219 | scif2: serial@ffe42000 { | ||
220 | compatible = "renesas,scif-r8a7779", "renesas,scif"; | ||
221 | reg = <0xffe42000 0x100>; | ||
222 | interrupt-parent = <&gic>; | ||
223 | interrupts = <0 90 IRQ_TYPE_LEVEL_HIGH>; | ||
224 | clocks = <&cpg_clocks R8A7779_CLK_P>; | ||
225 | clock-names = "sci_ick"; | ||
226 | status = "disabled"; | ||
227 | }; | ||
228 | |||
229 | scif3: serial@ffe43000 { | ||
230 | compatible = "renesas,scif-r8a7779", "renesas,scif"; | ||
231 | reg = <0xffe43000 0x100>; | ||
232 | interrupt-parent = <&gic>; | ||
233 | interrupts = <0 91 IRQ_TYPE_LEVEL_HIGH>; | ||
234 | clocks = <&cpg_clocks R8A7779_CLK_P>; | ||
235 | clock-names = "sci_ick"; | ||
236 | status = "disabled"; | ||
237 | }; | ||
238 | |||
239 | scif4: serial@ffe44000 { | ||
240 | compatible = "renesas,scif-r8a7779", "renesas,scif"; | ||
241 | reg = <0xffe44000 0x100>; | ||
242 | interrupt-parent = <&gic>; | ||
243 | interrupts = <0 92 IRQ_TYPE_LEVEL_HIGH>; | ||
244 | clocks = <&cpg_clocks R8A7779_CLK_P>; | ||
245 | clock-names = "sci_ick"; | ||
246 | status = "disabled"; | ||
247 | }; | ||
248 | |||
249 | scif5: serial@ffe45000 { | ||
250 | compatible = "renesas,scif-r8a7779", "renesas,scif"; | ||
251 | reg = <0xffe45000 0x100>; | ||
252 | interrupt-parent = <&gic>; | ||
253 | interrupts = <0 93 IRQ_TYPE_LEVEL_HIGH>; | ||
254 | clocks = <&cpg_clocks R8A7779_CLK_P>; | ||
255 | clock-names = "sci_ick"; | ||
187 | status = "disabled"; | 256 | status = "disabled"; |
188 | }; | 257 | }; |
189 | 258 | ||
@@ -201,12 +270,14 @@ | |||
201 | compatible = "renesas,rcar-sata"; | 270 | compatible = "renesas,rcar-sata"; |
202 | reg = <0xfc600000 0x2000>; | 271 | reg = <0xfc600000 0x2000>; |
203 | interrupts = <0 100 IRQ_TYPE_LEVEL_HIGH>; | 272 | interrupts = <0 100 IRQ_TYPE_LEVEL_HIGH>; |
273 | clocks = <&mstp1_clks R8A7779_CLK_SATA>; | ||
204 | }; | 274 | }; |
205 | 275 | ||
206 | sdhi0: sd@ffe4c000 { | 276 | sdhi0: sd@ffe4c000 { |
207 | compatible = "renesas,sdhi-r8a7779"; | 277 | compatible = "renesas,sdhi-r8a7779"; |
208 | reg = <0xffe4c000 0x100>; | 278 | reg = <0xffe4c000 0x100>; |
209 | interrupts = <0 104 IRQ_TYPE_LEVEL_HIGH>; | 279 | interrupts = <0 104 IRQ_TYPE_LEVEL_HIGH>; |
280 | clocks = <&mstp3_clks R8A7779_CLK_SDHI0>; | ||
210 | cap-sd-highspeed; | 281 | cap-sd-highspeed; |
211 | cap-sdio-irq; | 282 | cap-sdio-irq; |
212 | status = "disabled"; | 283 | status = "disabled"; |
@@ -216,6 +287,7 @@ | |||
216 | compatible = "renesas,sdhi-r8a7779"; | 287 | compatible = "renesas,sdhi-r8a7779"; |
217 | reg = <0xffe4d000 0x100>; | 288 | reg = <0xffe4d000 0x100>; |
218 | interrupts = <0 105 IRQ_TYPE_LEVEL_HIGH>; | 289 | interrupts = <0 105 IRQ_TYPE_LEVEL_HIGH>; |
290 | clocks = <&mstp3_clks R8A7779_CLK_SDHI1>; | ||
219 | cap-sd-highspeed; | 291 | cap-sd-highspeed; |
220 | cap-sdio-irq; | 292 | cap-sdio-irq; |
221 | status = "disabled"; | 293 | status = "disabled"; |
@@ -225,6 +297,7 @@ | |||
225 | compatible = "renesas,sdhi-r8a7779"; | 297 | compatible = "renesas,sdhi-r8a7779"; |
226 | reg = <0xffe4e000 0x100>; | 298 | reg = <0xffe4e000 0x100>; |
227 | interrupts = <0 107 IRQ_TYPE_LEVEL_HIGH>; | 299 | interrupts = <0 107 IRQ_TYPE_LEVEL_HIGH>; |
300 | clocks = <&mstp3_clks R8A7779_CLK_SDHI2>; | ||
228 | cap-sd-highspeed; | 301 | cap-sd-highspeed; |
229 | cap-sdio-irq; | 302 | cap-sdio-irq; |
230 | status = "disabled"; | 303 | status = "disabled"; |
@@ -234,6 +307,7 @@ | |||
234 | compatible = "renesas,sdhi-r8a7779"; | 307 | compatible = "renesas,sdhi-r8a7779"; |
235 | reg = <0xffe4f000 0x100>; | 308 | reg = <0xffe4f000 0x100>; |
236 | interrupts = <0 106 IRQ_TYPE_LEVEL_HIGH>; | 309 | interrupts = <0 106 IRQ_TYPE_LEVEL_HIGH>; |
310 | clocks = <&mstp3_clks R8A7779_CLK_SDHI3>; | ||
237 | cap-sd-highspeed; | 311 | cap-sd-highspeed; |
238 | cap-sdio-irq; | 312 | cap-sdio-irq; |
239 | status = "disabled"; | 313 | status = "disabled"; |
@@ -245,6 +319,7 @@ | |||
245 | interrupts = <0 73 IRQ_TYPE_LEVEL_HIGH>; | 319 | interrupts = <0 73 IRQ_TYPE_LEVEL_HIGH>; |
246 | #address-cells = <1>; | 320 | #address-cells = <1>; |
247 | #size-cells = <0>; | 321 | #size-cells = <0>; |
322 | clocks = <&mstp0_clks R8A7779_CLK_HSPI>; | ||
248 | status = "disabled"; | 323 | status = "disabled"; |
249 | }; | 324 | }; |
250 | 325 | ||
@@ -254,6 +329,7 @@ | |||
254 | interrupts = <0 74 IRQ_TYPE_LEVEL_HIGH>; | 329 | interrupts = <0 74 IRQ_TYPE_LEVEL_HIGH>; |
255 | #address-cells = <1>; | 330 | #address-cells = <1>; |
256 | #size-cells = <0>; | 331 | #size-cells = <0>; |
332 | clocks = <&mstp0_clks R8A7779_CLK_HSPI>; | ||
257 | status = "disabled"; | 333 | status = "disabled"; |
258 | }; | 334 | }; |
259 | 335 | ||
@@ -263,6 +339,150 @@ | |||
263 | interrupts = <0 75 IRQ_TYPE_LEVEL_HIGH>; | 339 | interrupts = <0 75 IRQ_TYPE_LEVEL_HIGH>; |
264 | #address-cells = <1>; | 340 | #address-cells = <1>; |
265 | #size-cells = <0>; | 341 | #size-cells = <0>; |
342 | clocks = <&mstp0_clks R8A7779_CLK_HSPI>; | ||
266 | status = "disabled"; | 343 | status = "disabled"; |
267 | }; | 344 | }; |
345 | |||
346 | clocks { | ||
347 | #address-cells = <1>; | ||
348 | #size-cells = <1>; | ||
349 | ranges; | ||
350 | |||
351 | /* External root clock */ | ||
352 | extal_clk: extal_clk { | ||
353 | compatible = "fixed-clock"; | ||
354 | #clock-cells = <0>; | ||
355 | /* This value must be overriden by the board. */ | ||
356 | clock-frequency = <0>; | ||
357 | clock-output-names = "extal"; | ||
358 | }; | ||
359 | |||
360 | /* Special CPG clocks */ | ||
361 | cpg_clocks: clocks@ffc80000 { | ||
362 | compatible = "renesas,r8a7779-cpg-clocks"; | ||
363 | reg = <0xffc80000 0x30>; | ||
364 | clocks = <&extal_clk>; | ||
365 | #clock-cells = <1>; | ||
366 | clock-output-names = "plla", "z", "zs", "s", | ||
367 | "s1", "p", "b", "out"; | ||
368 | }; | ||
369 | |||
370 | /* Fixed factor clocks */ | ||
371 | i_clk: i_clk { | ||
372 | compatible = "fixed-factor-clock"; | ||
373 | clocks = <&cpg_clocks R8A7779_CLK_PLLA>; | ||
374 | #clock-cells = <0>; | ||
375 | clock-div = <2>; | ||
376 | clock-mult = <1>; | ||
377 | clock-output-names = "i"; | ||
378 | }; | ||
379 | s3_clk: s3_clk { | ||
380 | compatible = "fixed-factor-clock"; | ||
381 | clocks = <&cpg_clocks R8A7779_CLK_PLLA>; | ||
382 | #clock-cells = <0>; | ||
383 | clock-div = <8>; | ||
384 | clock-mult = <1>; | ||
385 | clock-output-names = "s3"; | ||
386 | }; | ||
387 | s4_clk: s4_clk { | ||
388 | compatible = "fixed-factor-clock"; | ||
389 | clocks = <&cpg_clocks R8A7779_CLK_PLLA>; | ||
390 | #clock-cells = <0>; | ||
391 | clock-div = <16>; | ||
392 | clock-mult = <1>; | ||
393 | clock-output-names = "s4"; | ||
394 | }; | ||
395 | g_clk: g_clk { | ||
396 | compatible = "fixed-factor-clock"; | ||
397 | clocks = <&cpg_clocks R8A7779_CLK_PLLA>; | ||
398 | #clock-cells = <0>; | ||
399 | clock-div = <24>; | ||
400 | clock-mult = <1>; | ||
401 | clock-output-names = "g"; | ||
402 | }; | ||
403 | |||
404 | /* Gate clocks */ | ||
405 | mstp0_clks: clocks@ffc80030 { | ||
406 | compatible = "renesas,r8a7779-mstp-clocks", | ||
407 | "renesas,cpg-mstp-clocks"; | ||
408 | reg = <0xffc80030 4>; | ||
409 | clocks = <&cpg_clocks R8A7779_CLK_S>, | ||
410 | <&cpg_clocks R8A7779_CLK_P>, | ||
411 | <&cpg_clocks R8A7779_CLK_P>, | ||
412 | <&cpg_clocks R8A7779_CLK_P>, | ||
413 | <&cpg_clocks R8A7779_CLK_S>, | ||
414 | <&cpg_clocks R8A7779_CLK_S>, | ||
415 | <&cpg_clocks R8A7779_CLK_S1>, | ||
416 | <&cpg_clocks R8A7779_CLK_S1>, | ||
417 | <&cpg_clocks R8A7779_CLK_S1>, | ||
418 | <&cpg_clocks R8A7779_CLK_S1>, | ||
419 | <&cpg_clocks R8A7779_CLK_S1>, | ||
420 | <&cpg_clocks R8A7779_CLK_S1>, | ||
421 | <&cpg_clocks R8A7779_CLK_P>, | ||
422 | <&cpg_clocks R8A7779_CLK_P>, | ||
423 | <&cpg_clocks R8A7779_CLK_P>, | ||
424 | <&cpg_clocks R8A7779_CLK_P>; | ||
425 | #clock-cells = <1>; | ||
426 | renesas,clock-indices = < | ||
427 | R8A7779_CLK_HSPI R8A7779_CLK_TMU2 | ||
428 | R8A7779_CLK_TMU1 R8A7779_CLK_TMU0 | ||
429 | R8A7779_CLK_HSCIF1 R8A7779_CLK_HSCIF0 | ||
430 | R8A7779_CLK_SCIF5 R8A7779_CLK_SCIF4 | ||
431 | R8A7779_CLK_SCIF3 R8A7779_CLK_SCIF2 | ||
432 | R8A7779_CLK_SCIF1 R8A7779_CLK_SCIF0 | ||
433 | R8A7779_CLK_I2C3 R8A7779_CLK_I2C2 | ||
434 | R8A7779_CLK_I2C1 R8A7779_CLK_I2C0 | ||
435 | >; | ||
436 | clock-output-names = | ||
437 | "hspi", "tmu2", "tmu1", "tmu0", "hscif1", | ||
438 | "hscif0", "scif5", "scif4", "scif3", "scif2", | ||
439 | "scif1", "scif0", "i2c3", "i2c2", "i2c1", | ||
440 | "i2c0"; | ||
441 | }; | ||
442 | mstp1_clks: clocks@ffc80034 { | ||
443 | compatible = "renesas,r8a7779-mstp-clocks", | ||
444 | "renesas,cpg-mstp-clocks"; | ||
445 | reg = <0xffc80034 4>, <0xffc80044 4>; | ||
446 | clocks = <&cpg_clocks R8A7779_CLK_P>, | ||
447 | <&cpg_clocks R8A7779_CLK_P>, | ||
448 | <&cpg_clocks R8A7779_CLK_S>, | ||
449 | <&cpg_clocks R8A7779_CLK_S>, | ||
450 | <&cpg_clocks R8A7779_CLK_S>, | ||
451 | <&cpg_clocks R8A7779_CLK_S>, | ||
452 | <&cpg_clocks R8A7779_CLK_P>, | ||
453 | <&cpg_clocks R8A7779_CLK_P>, | ||
454 | <&cpg_clocks R8A7779_CLK_P>, | ||
455 | <&cpg_clocks R8A7779_CLK_S>; | ||
456 | #clock-cells = <1>; | ||
457 | renesas,clock-indices = < | ||
458 | R8A7779_CLK_USB01 R8A7779_CLK_USB2 | ||
459 | R8A7779_CLK_DU R8A7779_CLK_VIN2 | ||
460 | R8A7779_CLK_VIN1 R8A7779_CLK_VIN0 | ||
461 | R8A7779_CLK_ETHER R8A7779_CLK_SATA | ||
462 | R8A7779_CLK_PCIE R8A7779_CLK_VIN3 | ||
463 | >; | ||
464 | clock-output-names = | ||
465 | "usb01", "usb2", | ||
466 | "du", "vin2", | ||
467 | "vin1", "vin0", | ||
468 | "ether", "sata", | ||
469 | "pcie", "vin3"; | ||
470 | }; | ||
471 | mstp3_clks: clocks@ffc8003c { | ||
472 | compatible = "renesas,r8a7779-mstp-clocks", | ||
473 | "renesas,cpg-mstp-clocks"; | ||
474 | reg = <0xffc8003c 4>; | ||
475 | clocks = <&s4_clk>, <&s4_clk>, <&s4_clk>, <&s4_clk>, | ||
476 | <&s4_clk>, <&s4_clk>; | ||
477 | #clock-cells = <1>; | ||
478 | renesas,clock-indices = < | ||
479 | R8A7779_CLK_SDHI3 R8A7779_CLK_SDHI2 | ||
480 | R8A7779_CLK_SDHI1 R8A7779_CLK_SDHI0 | ||
481 | R8A7779_CLK_MMC1 R8A7779_CLK_MMC0 | ||
482 | >; | ||
483 | clock-output-names = | ||
484 | "sdhi3", "sdhi2", "sdhi1", "sdhi0", | ||
485 | "mmc1", "mmc0"; | ||
486 | }; | ||
487 | }; | ||
268 | }; | 488 | }; |
diff --git a/arch/arm/boot/dts/stih415.dtsi b/arch/arm/boot/dts/stih415.dtsi index d6f254f302fe..a0f6f75fe3b5 100644 --- a/arch/arm/boot/dts/stih415.dtsi +++ b/arch/arm/boot/dts/stih415.dtsi | |||
@@ -169,8 +169,8 @@ | |||
169 | 169 | ||
170 | pinctrl-names = "default"; | 170 | pinctrl-names = "default"; |
171 | pinctrl-0 = <&pinctrl_mii0>; | 171 | pinctrl-0 = <&pinctrl_mii0>; |
172 | clock-names = "stmmaceth"; | 172 | clock-names = "stmmaceth", "sti-ethclk"; |
173 | clocks = <&clk_s_a1_ls CLK_GMAC0_PHY>; | 173 | clocks = <&clk_s_a1_ls CLK_ICN_IF_2>, <&clk_s_a1_ls CLK_GMAC0_PHY>; |
174 | }; | 174 | }; |
175 | 175 | ||
176 | ethernet1: dwmac@fef08000 { | 176 | ethernet1: dwmac@fef08000 { |
@@ -192,8 +192,8 @@ | |||
192 | reset-names = "stmmaceth"; | 192 | reset-names = "stmmaceth"; |
193 | pinctrl-names = "default"; | 193 | pinctrl-names = "default"; |
194 | pinctrl-0 = <&pinctrl_mii1>; | 194 | pinctrl-0 = <&pinctrl_mii1>; |
195 | clock-names = "stmmaceth"; | 195 | clock-names = "stmmaceth", "sti-ethclk"; |
196 | clocks = <&clk_s_a0_ls CLK_ETH1_PHY>; | 196 | clocks = <&clk_s_a0_ls CLK_ICN_REG>, <&clk_s_a0_ls CLK_ETH1_PHY>; |
197 | }; | 197 | }; |
198 | 198 | ||
199 | rc: rc@fe518000 { | 199 | rc: rc@fe518000 { |
diff --git a/arch/arm/boot/dts/stih416-b2020-revE.dts b/arch/arm/boot/dts/stih416-b2020e.dts index ba0fa2caaf18..ba0fa2caaf18 100644 --- a/arch/arm/boot/dts/stih416-b2020-revE.dts +++ b/arch/arm/boot/dts/stih416-b2020e.dts | |||
diff --git a/arch/arm/boot/dts/stih416.dtsi b/arch/arm/boot/dts/stih416.dtsi index 06473c5d9ea9..84758d76d064 100644 --- a/arch/arm/boot/dts/stih416.dtsi +++ b/arch/arm/boot/dts/stih416.dtsi | |||
@@ -175,8 +175,8 @@ | |||
175 | reset-names = "stmmaceth"; | 175 | reset-names = "stmmaceth"; |
176 | pinctrl-names = "default"; | 176 | pinctrl-names = "default"; |
177 | pinctrl-0 = <&pinctrl_mii0>; | 177 | pinctrl-0 = <&pinctrl_mii0>; |
178 | clock-names = "stmmaceth"; | 178 | clock-names = "stmmaceth", "sti-ethclk"; |
179 | clocks = <&clk_s_a1_ls CLK_GMAC0_PHY>; | 179 | clocks = <&clk_s_a1_ls CLK_ICN_IF_2>, <&clk_s_a1_ls CLK_GMAC0_PHY>; |
180 | }; | 180 | }; |
181 | 181 | ||
182 | ethernet1: dwmac@fef08000 { | 182 | ethernet1: dwmac@fef08000 { |
@@ -197,8 +197,8 @@ | |||
197 | reset-names = "stmmaceth"; | 197 | reset-names = "stmmaceth"; |
198 | pinctrl-names = "default"; | 198 | pinctrl-names = "default"; |
199 | pinctrl-0 = <&pinctrl_mii1>; | 199 | pinctrl-0 = <&pinctrl_mii1>; |
200 | clock-names = "stmmaceth"; | 200 | clock-names = "stmmaceth", "sti-ethclk"; |
201 | clocks = <&clk_s_a0_ls CLK_ETH1_PHY>; | 201 | clocks = <&clk_s_a0_ls CLK_ICN_REG>, <&clk_s_a0_ls CLK_ETH1_PHY>; |
202 | }; | 202 | }; |
203 | 203 | ||
204 | rc: rc@fe518000 { | 204 | rc: rc@fe518000 { |
diff --git a/arch/arm/boot/dts/versatile-ab.dts b/arch/arm/boot/dts/versatile-ab.dts index e01e5a081def..36c771a2d765 100644 --- a/arch/arm/boot/dts/versatile-ab.dts +++ b/arch/arm/boot/dts/versatile-ab.dts | |||
@@ -19,6 +19,41 @@ | |||
19 | reg = <0x0 0x08000000>; | 19 | reg = <0x0 0x08000000>; |
20 | }; | 20 | }; |
21 | 21 | ||
22 | xtal24mhz: xtal24mhz@24M { | ||
23 | #clock-cells = <0>; | ||
24 | compatible = "fixed-clock"; | ||
25 | clock-frequency = <24000000>; | ||
26 | }; | ||
27 | |||
28 | core-module@10000000 { | ||
29 | compatible = "arm,core-module-versatile", "syscon"; | ||
30 | reg = <0x10000000 0x200>; | ||
31 | |||
32 | /* OSC1 on AB, OSC4 on PB */ | ||
33 | osc1: cm_aux_osc@24M { | ||
34 | #clock-cells = <0>; | ||
35 | compatible = "arm,versatile-cm-auxosc"; | ||
36 | clocks = <&xtal24mhz>; | ||
37 | }; | ||
38 | |||
39 | /* The timer clock is the 24 MHz oscillator divided to 1MHz */ | ||
40 | timclk: timclk@1M { | ||
41 | #clock-cells = <0>; | ||
42 | compatible = "fixed-factor-clock"; | ||
43 | clock-div = <24>; | ||
44 | clock-mult = <1>; | ||
45 | clocks = <&xtal24mhz>; | ||
46 | }; | ||
47 | |||
48 | pclk: pclk@24M { | ||
49 | #clock-cells = <0>; | ||
50 | compatible = "fixed-factor-clock"; | ||
51 | clock-div = <1>; | ||
52 | clock-mult = <1>; | ||
53 | clocks = <&xtal24mhz>; | ||
54 | }; | ||
55 | }; | ||
56 | |||
22 | flash@34000000 { | 57 | flash@34000000 { |
23 | compatible = "arm,versatile-flash"; | 58 | compatible = "arm,versatile-flash"; |
24 | reg = <0x34000000 0x4000000>; | 59 | reg = <0x34000000 0x4000000>; |
@@ -59,6 +94,8 @@ | |||
59 | interrupt-controller; | 94 | interrupt-controller; |
60 | #interrupt-cells = <1>; | 95 | #interrupt-cells = <1>; |
61 | reg = <0x10140000 0x1000>; | 96 | reg = <0x10140000 0x1000>; |
97 | clear-mask = <0xffffffff>; | ||
98 | valid-mask = <0xffffffff>; | ||
62 | }; | 99 | }; |
63 | 100 | ||
64 | sic: intc@10003000 { | 101 | sic: intc@10003000 { |
@@ -68,69 +105,93 @@ | |||
68 | reg = <0x10003000 0x1000>; | 105 | reg = <0x10003000 0x1000>; |
69 | interrupt-parent = <&vic>; | 106 | interrupt-parent = <&vic>; |
70 | interrupts = <31>; /* Cascaded to vic */ | 107 | interrupts = <31>; /* Cascaded to vic */ |
108 | clear-mask = <0xffffffff>; | ||
109 | valid-mask = <0xffc203f8>; | ||
71 | }; | 110 | }; |
72 | 111 | ||
73 | dma@10130000 { | 112 | dma@10130000 { |
74 | compatible = "arm,pl081", "arm,primecell"; | 113 | compatible = "arm,pl081", "arm,primecell"; |
75 | reg = <0x10130000 0x1000>; | 114 | reg = <0x10130000 0x1000>; |
76 | interrupts = <17>; | 115 | interrupts = <17>; |
116 | clocks = <&pclk>; | ||
117 | clock-names = "apb_pclk"; | ||
77 | }; | 118 | }; |
78 | 119 | ||
79 | uart0: uart@101f1000 { | 120 | uart0: uart@101f1000 { |
80 | compatible = "arm,pl011", "arm,primecell"; | 121 | compatible = "arm,pl011", "arm,primecell"; |
81 | reg = <0x101f1000 0x1000>; | 122 | reg = <0x101f1000 0x1000>; |
82 | interrupts = <12>; | 123 | interrupts = <12>; |
124 | clocks = <&xtal24mhz>, <&pclk>; | ||
125 | clock-names = "uartclk", "apb_pclk"; | ||
83 | }; | 126 | }; |
84 | 127 | ||
85 | uart1: uart@101f2000 { | 128 | uart1: uart@101f2000 { |
86 | compatible = "arm,pl011", "arm,primecell"; | 129 | compatible = "arm,pl011", "arm,primecell"; |
87 | reg = <0x101f2000 0x1000>; | 130 | reg = <0x101f2000 0x1000>; |
88 | interrupts = <13>; | 131 | interrupts = <13>; |
132 | clocks = <&xtal24mhz>, <&pclk>; | ||
133 | clock-names = "uartclk", "apb_pclk"; | ||
89 | }; | 134 | }; |
90 | 135 | ||
91 | uart2: uart@101f3000 { | 136 | uart2: uart@101f3000 { |
92 | compatible = "arm,pl011", "arm,primecell"; | 137 | compatible = "arm,pl011", "arm,primecell"; |
93 | reg = <0x101f3000 0x1000>; | 138 | reg = <0x101f3000 0x1000>; |
94 | interrupts = <14>; | 139 | interrupts = <14>; |
140 | clocks = <&xtal24mhz>, <&pclk>; | ||
141 | clock-names = "uartclk", "apb_pclk"; | ||
95 | }; | 142 | }; |
96 | 143 | ||
97 | smc@10100000 { | 144 | smc@10100000 { |
98 | compatible = "arm,primecell"; | 145 | compatible = "arm,primecell"; |
99 | reg = <0x10100000 0x1000>; | 146 | reg = <0x10100000 0x1000>; |
147 | clocks = <&pclk>; | ||
148 | clock-names = "apb_pclk"; | ||
100 | }; | 149 | }; |
101 | 150 | ||
102 | mpmc@10110000 { | 151 | mpmc@10110000 { |
103 | compatible = "arm,primecell"; | 152 | compatible = "arm,primecell"; |
104 | reg = <0x10110000 0x1000>; | 153 | reg = <0x10110000 0x1000>; |
154 | clocks = <&pclk>; | ||
155 | clock-names = "apb_pclk"; | ||
105 | }; | 156 | }; |
106 | 157 | ||
107 | display@10120000 { | 158 | display@10120000 { |
108 | compatible = "arm,pl110", "arm,primecell"; | 159 | compatible = "arm,pl110", "arm,primecell"; |
109 | reg = <0x10120000 0x1000>; | 160 | reg = <0x10120000 0x1000>; |
110 | interrupts = <16>; | 161 | interrupts = <16>; |
162 | clocks = <&osc1>, <&pclk>; | ||
163 | clock-names = "clcd", "apb_pclk"; | ||
111 | }; | 164 | }; |
112 | 165 | ||
113 | sctl@101e0000 { | 166 | sctl@101e0000 { |
114 | compatible = "arm,primecell"; | 167 | compatible = "arm,primecell"; |
115 | reg = <0x101e0000 0x1000>; | 168 | reg = <0x101e0000 0x1000>; |
169 | clocks = <&pclk>; | ||
170 | clock-names = "apb_pclk"; | ||
116 | }; | 171 | }; |
117 | 172 | ||
118 | watchdog@101e1000 { | 173 | watchdog@101e1000 { |
119 | compatible = "arm,primecell"; | 174 | compatible = "arm,primecell"; |
120 | reg = <0x101e1000 0x1000>; | 175 | reg = <0x101e1000 0x1000>; |
121 | interrupts = <0>; | 176 | interrupts = <0>; |
177 | clocks = <&pclk>; | ||
178 | clock-names = "apb_pclk"; | ||
122 | }; | 179 | }; |
123 | 180 | ||
124 | timer@101e2000 { | 181 | timer@101e2000 { |
125 | compatible = "arm,sp804", "arm,primecell"; | 182 | compatible = "arm,sp804", "arm,primecell"; |
126 | reg = <0x101e2000 0x1000>; | 183 | reg = <0x101e2000 0x1000>; |
127 | interrupts = <4>; | 184 | interrupts = <4>; |
185 | clocks = <&timclk>, <&timclk>, <&pclk>; | ||
186 | clock-names = "timer0", "timer1", "apb_pclk"; | ||
128 | }; | 187 | }; |
129 | 188 | ||
130 | timer@101e3000 { | 189 | timer@101e3000 { |
131 | compatible = "arm,sp804", "arm,primecell"; | 190 | compatible = "arm,sp804", "arm,primecell"; |
132 | reg = <0x101e3000 0x1000>; | 191 | reg = <0x101e3000 0x1000>; |
133 | interrupts = <5>; | 192 | interrupts = <5>; |
193 | clocks = <&timclk>, <&timclk>, <&pclk>; | ||
194 | clock-names = "timer0", "timer1", "apb_pclk"; | ||
134 | }; | 195 | }; |
135 | 196 | ||
136 | gpio0: gpio@101e4000 { | 197 | gpio0: gpio@101e4000 { |
@@ -141,6 +202,8 @@ | |||
141 | #gpio-cells = <2>; | 202 | #gpio-cells = <2>; |
142 | interrupt-controller; | 203 | interrupt-controller; |
143 | #interrupt-cells = <2>; | 204 | #interrupt-cells = <2>; |
205 | clocks = <&pclk>; | ||
206 | clock-names = "apb_pclk"; | ||
144 | }; | 207 | }; |
145 | 208 | ||
146 | gpio1: gpio@101e5000 { | 209 | gpio1: gpio@101e5000 { |
@@ -151,24 +214,32 @@ | |||
151 | #gpio-cells = <2>; | 214 | #gpio-cells = <2>; |
152 | interrupt-controller; | 215 | interrupt-controller; |
153 | #interrupt-cells = <2>; | 216 | #interrupt-cells = <2>; |
217 | clocks = <&pclk>; | ||
218 | clock-names = "apb_pclk"; | ||
154 | }; | 219 | }; |
155 | 220 | ||
156 | rtc@101e8000 { | 221 | rtc@101e8000 { |
157 | compatible = "arm,pl030", "arm,primecell"; | 222 | compatible = "arm,pl030", "arm,primecell"; |
158 | reg = <0x101e8000 0x1000>; | 223 | reg = <0x101e8000 0x1000>; |
159 | interrupts = <10>; | 224 | interrupts = <10>; |
225 | clocks = <&pclk>; | ||
226 | clock-names = "apb_pclk"; | ||
160 | }; | 227 | }; |
161 | 228 | ||
162 | sci@101f0000 { | 229 | sci@101f0000 { |
163 | compatible = "arm,primecell"; | 230 | compatible = "arm,primecell"; |
164 | reg = <0x101f0000 0x1000>; | 231 | reg = <0x101f0000 0x1000>; |
165 | interrupts = <15>; | 232 | interrupts = <15>; |
233 | clocks = <&pclk>; | ||
234 | clock-names = "apb_pclk"; | ||
166 | }; | 235 | }; |
167 | 236 | ||
168 | ssp@101f4000 { | 237 | ssp@101f4000 { |
169 | compatible = "arm,pl022", "arm,primecell"; | 238 | compatible = "arm,pl022", "arm,primecell"; |
170 | reg = <0x101f4000 0x1000>; | 239 | reg = <0x101f4000 0x1000>; |
171 | interrupts = <11>; | 240 | interrupts = <11>; |
241 | clocks = <&xtal24mhz>, <&pclk>; | ||
242 | clock-names = "SSPCLK", "apb_pclk"; | ||
172 | }; | 243 | }; |
173 | 244 | ||
174 | fpga { | 245 | fpga { |
@@ -181,23 +252,31 @@ | |||
181 | compatible = "arm,primecell"; | 252 | compatible = "arm,primecell"; |
182 | reg = <0x4000 0x1000>; | 253 | reg = <0x4000 0x1000>; |
183 | interrupts = <24>; | 254 | interrupts = <24>; |
255 | clocks = <&pclk>; | ||
256 | clock-names = "apb_pclk"; | ||
184 | }; | 257 | }; |
185 | mmc@5000 { | 258 | mmc@5000 { |
186 | compatible = "arm,primecell"; | 259 | compatible = "arm,pl180", "arm,primecell"; |
187 | reg = < 0x5000 0x1000>; | 260 | reg = < 0x5000 0x1000>; |
188 | interrupts-extended = <&vic 22 &sic 2>; | 261 | interrupts-extended = <&vic 22 &sic 2>; |
262 | clocks = <&xtal24mhz>, <&pclk>; | ||
263 | clock-names = "mclk", "apb_pclk"; | ||
189 | }; | 264 | }; |
190 | kmi@6000 { | 265 | kmi@6000 { |
191 | compatible = "arm,pl050", "arm,primecell"; | 266 | compatible = "arm,pl050", "arm,primecell"; |
192 | reg = <0x6000 0x1000>; | 267 | reg = <0x6000 0x1000>; |
193 | interrupt-parent = <&sic>; | 268 | interrupt-parent = <&sic>; |
194 | interrupts = <3>; | 269 | interrupts = <3>; |
270 | clocks = <&xtal24mhz>, <&pclk>; | ||
271 | clock-names = "KMIREFCLK", "apb_pclk"; | ||
195 | }; | 272 | }; |
196 | kmi@7000 { | 273 | kmi@7000 { |
197 | compatible = "arm,pl050", "arm,primecell"; | 274 | compatible = "arm,pl050", "arm,primecell"; |
198 | reg = <0x7000 0x1000>; | 275 | reg = <0x7000 0x1000>; |
199 | interrupt-parent = <&sic>; | 276 | interrupt-parent = <&sic>; |
200 | interrupts = <4>; | 277 | interrupts = <4>; |
278 | clocks = <&xtal24mhz>, <&pclk>; | ||
279 | clock-names = "KMIREFCLK", "apb_pclk"; | ||
201 | }; | 280 | }; |
202 | }; | 281 | }; |
203 | }; | 282 | }; |
diff --git a/arch/arm/boot/dts/versatile-pb.dts b/arch/arm/boot/dts/versatile-pb.dts index 65f657711323..d025048119d3 100644 --- a/arch/arm/boot/dts/versatile-pb.dts +++ b/arch/arm/boot/dts/versatile-pb.dts | |||
@@ -13,6 +13,8 @@ | |||
13 | #gpio-cells = <2>; | 13 | #gpio-cells = <2>; |
14 | interrupt-controller; | 14 | interrupt-controller; |
15 | #interrupt-cells = <2>; | 15 | #interrupt-cells = <2>; |
16 | clocks = <&pclk>; | ||
17 | clock-names = "apb_pclk"; | ||
16 | }; | 18 | }; |
17 | 19 | ||
18 | gpio3: gpio@101e7000 { | 20 | gpio3: gpio@101e7000 { |
@@ -23,6 +25,8 @@ | |||
23 | #gpio-cells = <2>; | 25 | #gpio-cells = <2>; |
24 | interrupt-controller; | 26 | interrupt-controller; |
25 | #interrupt-cells = <2>; | 27 | #interrupt-cells = <2>; |
28 | clocks = <&pclk>; | ||
29 | clock-names = "apb_pclk"; | ||
26 | }; | 30 | }; |
27 | 31 | ||
28 | fpga { | 32 | fpga { |
@@ -31,17 +35,23 @@ | |||
31 | reg = <0x9000 0x1000>; | 35 | reg = <0x9000 0x1000>; |
32 | interrupt-parent = <&sic>; | 36 | interrupt-parent = <&sic>; |
33 | interrupts = <6>; | 37 | interrupts = <6>; |
38 | clocks = <&xtal24mhz>, <&pclk>; | ||
39 | clock-names = "uartclk", "apb_pclk"; | ||
34 | }; | 40 | }; |
35 | sci@a000 { | 41 | sci@a000 { |
36 | compatible = "arm,primecell"; | 42 | compatible = "arm,primecell"; |
37 | reg = <0xa000 0x1000>; | 43 | reg = <0xa000 0x1000>; |
38 | interrupt-parent = <&sic>; | 44 | interrupt-parent = <&sic>; |
39 | interrupts = <5>; | 45 | interrupts = <5>; |
46 | clocks = <&xtal24mhz>; | ||
47 | clock-names = "apb_pclk"; | ||
40 | }; | 48 | }; |
41 | mmc@b000 { | 49 | mmc@b000 { |
42 | compatible = "arm,primecell"; | 50 | compatible = "arm,pl180", "arm,primecell"; |
43 | reg = <0xb000 0x1000>; | 51 | reg = <0xb000 0x1000>; |
44 | interrupts-extended = <&vic 23 &sic 2>; | 52 | interrupts-extended = <&vic 23 &sic 2>; |
53 | clocks = <&xtal24mhz>, <&pclk>; | ||
54 | clock-names = "mclk", "apb_pclk"; | ||
45 | }; | 55 | }; |
46 | }; | 56 | }; |
47 | }; | 57 | }; |
diff --git a/arch/arm/common/scoop.c b/arch/arm/common/scoop.c index 6ef146edd0cd..a20fa80776d3 100644 --- a/arch/arm/common/scoop.c +++ b/arch/arm/common/scoop.c | |||
@@ -182,7 +182,6 @@ static int scoop_probe(struct platform_device *pdev) | |||
182 | struct scoop_config *inf; | 182 | struct scoop_config *inf; |
183 | struct resource *mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 183 | struct resource *mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
184 | int ret; | 184 | int ret; |
185 | int temp; | ||
186 | 185 | ||
187 | if (!mem) | 186 | if (!mem) |
188 | return -EINVAL; | 187 | return -EINVAL; |
diff --git a/arch/arm/common/timer-sp.c b/arch/arm/common/timer-sp.c index fd6bff0c5b96..19211324772f 100644 --- a/arch/arm/common/timer-sp.c +++ b/arch/arm/common/timer-sp.c | |||
@@ -233,13 +233,13 @@ static void __init sp804_of_init(struct device_node *np) | |||
233 | if (IS_ERR(clk1)) | 233 | if (IS_ERR(clk1)) |
234 | clk1 = NULL; | 234 | clk1 = NULL; |
235 | 235 | ||
236 | /* Get the 2nd clock if the timer has 2 timer clocks */ | 236 | /* Get the 2nd clock if the timer has 3 timer clocks */ |
237 | if (of_count_phandle_with_args(np, "clocks", "#clock-cells") == 3) { | 237 | if (of_count_phandle_with_args(np, "clocks", "#clock-cells") == 3) { |
238 | clk2 = of_clk_get(np, 1); | 238 | clk2 = of_clk_get(np, 1); |
239 | if (IS_ERR(clk2)) { | 239 | if (IS_ERR(clk2)) { |
240 | pr_err("sp804: %s clock not found: %d\n", np->name, | 240 | pr_err("sp804: %s clock not found: %d\n", np->name, |
241 | (int)PTR_ERR(clk2)); | 241 | (int)PTR_ERR(clk2)); |
242 | goto err; | 242 | clk2 = NULL; |
243 | } | 243 | } |
244 | } else | 244 | } else |
245 | clk2 = clk1; | 245 | clk2 = clk1; |
diff --git a/arch/arm/configs/imx_v4_v5_defconfig b/arch/arm/configs/imx_v4_v5_defconfig index bada59d93b67..63bde0efc041 100644 --- a/arch/arm/configs/imx_v4_v5_defconfig +++ b/arch/arm/configs/imx_v4_v5_defconfig | |||
@@ -1,6 +1,7 @@ | |||
1 | # CONFIG_SWAP is not set | 1 | # CONFIG_SWAP is not set |
2 | CONFIG_SYSVIPC=y | 2 | CONFIG_SYSVIPC=y |
3 | CONFIG_POSIX_MQUEUE=y | 3 | CONFIG_POSIX_MQUEUE=y |
4 | CONFIG_FHANDLE=y | ||
4 | CONFIG_NO_HZ=y | 5 | CONFIG_NO_HZ=y |
5 | CONFIG_HIGH_RES_TIMERS=y | 6 | CONFIG_HIGH_RES_TIMERS=y |
6 | CONFIG_LOG_BUF_SHIFT=14 | 7 | CONFIG_LOG_BUF_SHIFT=14 |
@@ -35,10 +36,8 @@ CONFIG_MACH_EUKREA_CPUIMX27_USESDHC2=y | |||
35 | CONFIG_MACH_EUKREA_CPUIMX27_USEUART4=y | 36 | CONFIG_MACH_EUKREA_CPUIMX27_USEUART4=y |
36 | CONFIG_MACH_MX27_3DS=y | 37 | CONFIG_MACH_MX27_3DS=y |
37 | CONFIG_MACH_IMX27_VISSTRIM_M10=y | 38 | CONFIG_MACH_IMX27_VISSTRIM_M10=y |
38 | CONFIG_MACH_IMX27LITE=y | ||
39 | CONFIG_MACH_PCA100=y | 39 | CONFIG_MACH_PCA100=y |
40 | CONFIG_MACH_MXT_TD60=y | 40 | CONFIG_MACH_MXT_TD60=y |
41 | CONFIG_MACH_IMX27IPCAM=y | ||
42 | CONFIG_MACH_IMX27_DT=y | 41 | CONFIG_MACH_IMX27_DT=y |
43 | CONFIG_PREEMPT=y | 42 | CONFIG_PREEMPT=y |
44 | CONFIG_AEABI=y | 43 | CONFIG_AEABI=y |
@@ -159,6 +158,8 @@ CONFIG_USB_CHIPIDEA=y | |||
159 | CONFIG_USB_CHIPIDEA_UDC=y | 158 | CONFIG_USB_CHIPIDEA_UDC=y |
160 | CONFIG_USB_CHIPIDEA_HOST=y | 159 | CONFIG_USB_CHIPIDEA_HOST=y |
161 | CONFIG_NOP_USB_XCEIV=y | 160 | CONFIG_NOP_USB_XCEIV=y |
161 | CONFIG_USB_GADGET=y | ||
162 | CONFIG_USB_ETH=m | ||
162 | CONFIG_MMC=y | 163 | CONFIG_MMC=y |
163 | CONFIG_MMC_SDHCI=y | 164 | CONFIG_MMC_SDHCI=y |
164 | CONFIG_MMC_SDHCI_PLTFM=y | 165 | CONFIG_MMC_SDHCI_PLTFM=y |
diff --git a/arch/arm/configs/imx_v6_v7_defconfig b/arch/arm/configs/imx_v6_v7_defconfig index ef8815327e5b..16cfec4385c8 100644 --- a/arch/arm/configs/imx_v6_v7_defconfig +++ b/arch/arm/configs/imx_v6_v7_defconfig | |||
@@ -1,5 +1,6 @@ | |||
1 | CONFIG_KERNEL_LZO=y | 1 | CONFIG_KERNEL_LZO=y |
2 | CONFIG_SYSVIPC=y | 2 | CONFIG_SYSVIPC=y |
3 | CONFIG_FHANDLE=y | ||
3 | CONFIG_NO_HZ=y | 4 | CONFIG_NO_HZ=y |
4 | CONFIG_HIGH_RES_TIMERS=y | 5 | CONFIG_HIGH_RES_TIMERS=y |
5 | CONFIG_LOG_BUF_SHIFT=18 | 6 | CONFIG_LOG_BUF_SHIFT=18 |
@@ -31,11 +32,12 @@ CONFIG_MACH_IMX35_DT=y | |||
31 | CONFIG_MACH_PCM043=y | 32 | CONFIG_MACH_PCM043=y |
32 | CONFIG_MACH_MX35_3DS=y | 33 | CONFIG_MACH_MX35_3DS=y |
33 | CONFIG_MACH_VPR200=y | 34 | CONFIG_MACH_VPR200=y |
34 | CONFIG_MACH_IMX51_DT=y | 35 | CONFIG_SOC_IMX51=y |
35 | CONFIG_SOC_IMX50=y | 36 | CONFIG_SOC_IMX50=y |
36 | CONFIG_SOC_IMX53=y | 37 | CONFIG_SOC_IMX53=y |
37 | CONFIG_SOC_IMX6Q=y | 38 | CONFIG_SOC_IMX6Q=y |
38 | CONFIG_SOC_IMX6SL=y | 39 | CONFIG_SOC_IMX6SL=y |
40 | CONFIG_SOC_IMX6SX=y | ||
39 | CONFIG_SOC_VF610=y | 41 | CONFIG_SOC_VF610=y |
40 | CONFIG_PCI=y | 42 | CONFIG_PCI=y |
41 | CONFIG_PCI_IMX6=y | 43 | CONFIG_PCI_IMX6=y |
@@ -67,6 +69,8 @@ CONFIG_IP_PNP_DHCP=y | |||
67 | # CONFIG_INET_LRO is not set | 69 | # CONFIG_INET_LRO is not set |
68 | CONFIG_IPV6=y | 70 | CONFIG_IPV6=y |
69 | CONFIG_NETFILTER=y | 71 | CONFIG_NETFILTER=y |
72 | CONFIG_CAN=y | ||
73 | CONFIG_CAN_FLEXCAN=y | ||
70 | CONFIG_CFG80211=y | 74 | CONFIG_CFG80211=y |
71 | CONFIG_MAC80211=y | 75 | CONFIG_MAC80211=y |
72 | CONFIG_RFKILL=y | 76 | CONFIG_RFKILL=y |
@@ -160,6 +164,7 @@ CONFIG_SPI=y | |||
160 | CONFIG_SPI_IMX=y | 164 | CONFIG_SPI_IMX=y |
161 | CONFIG_GPIO_SYSFS=y | 165 | CONFIG_GPIO_SYSFS=y |
162 | CONFIG_GPIO_MC9S08DZ60=y | 166 | CONFIG_GPIO_MC9S08DZ60=y |
167 | CONFIG_GPIO_STMPE=y | ||
163 | # CONFIG_HWMON is not set | 168 | # CONFIG_HWMON is not set |
164 | CONFIG_WATCHDOG=y | 169 | CONFIG_WATCHDOG=y |
165 | CONFIG_IMX2_WDT=y | 170 | CONFIG_IMX2_WDT=y |
@@ -186,6 +191,7 @@ CONFIG_VIDEO_MX3=y | |||
186 | CONFIG_V4L_MEM2MEM_DRIVERS=y | 191 | CONFIG_V4L_MEM2MEM_DRIVERS=y |
187 | CONFIG_VIDEO_CODA=y | 192 | CONFIG_VIDEO_CODA=y |
188 | CONFIG_SOC_CAMERA_OV2640=y | 193 | CONFIG_SOC_CAMERA_OV2640=y |
194 | CONFIG_IMX_IPUV3_CORE=y | ||
189 | CONFIG_DRM=y | 195 | CONFIG_DRM=y |
190 | CONFIG_DRM_PANEL_SIMPLE=y | 196 | CONFIG_DRM_PANEL_SIMPLE=y |
191 | CONFIG_BACKLIGHT_LCD_SUPPORT=y | 197 | CONFIG_BACKLIGHT_LCD_SUPPORT=y |
@@ -241,6 +247,7 @@ CONFIG_RTC_DRV_SNVS=y | |||
241 | CONFIG_DMADEVICES=y | 247 | CONFIG_DMADEVICES=y |
242 | CONFIG_IMX_SDMA=y | 248 | CONFIG_IMX_SDMA=y |
243 | CONFIG_MXS_DMA=y | 249 | CONFIG_MXS_DMA=y |
250 | CONFIG_FSL_EDMA=y | ||
244 | CONFIG_STAGING=y | 251 | CONFIG_STAGING=y |
245 | CONFIG_DRM_IMX=y | 252 | CONFIG_DRM_IMX=y |
246 | CONFIG_DRM_IMX_FB_HELPER=y | 253 | CONFIG_DRM_IMX_FB_HELPER=y |
@@ -287,6 +294,7 @@ CONFIG_NLS_ASCII=y | |||
287 | CONFIG_NLS_ISO8859_1=y | 294 | CONFIG_NLS_ISO8859_1=y |
288 | CONFIG_NLS_ISO8859_15=m | 295 | CONFIG_NLS_ISO8859_15=m |
289 | CONFIG_NLS_UTF8=y | 296 | CONFIG_NLS_UTF8=y |
297 | CONFIG_PRINTK_TIME=y | ||
290 | CONFIG_DEBUG_FS=y | 298 | CONFIG_DEBUG_FS=y |
291 | CONFIG_MAGIC_SYSRQ=y | 299 | CONFIG_MAGIC_SYSRQ=y |
292 | # CONFIG_SCHED_DEBUG is not set | 300 | # CONFIG_SCHED_DEBUG is not set |
diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig index e2d62048e198..9a1e7b0c3bea 100644 --- a/arch/arm/configs/multi_v7_defconfig +++ b/arch/arm/configs/multi_v7_defconfig | |||
@@ -27,7 +27,7 @@ CONFIG_ARCH_HIGHBANK=y | |||
27 | CONFIG_ARCH_HI3xxx=y | 27 | CONFIG_ARCH_HI3xxx=y |
28 | CONFIG_ARCH_KEYSTONE=y | 28 | CONFIG_ARCH_KEYSTONE=y |
29 | CONFIG_ARCH_MXC=y | 29 | CONFIG_ARCH_MXC=y |
30 | CONFIG_MACH_IMX51_DT=y | 30 | CONFIG_SOC_IMX51=y |
31 | CONFIG_SOC_IMX53=y | 31 | CONFIG_SOC_IMX53=y |
32 | CONFIG_SOC_IMX6Q=y | 32 | CONFIG_SOC_IMX6Q=y |
33 | CONFIG_SOC_IMX6SL=y | 33 | CONFIG_SOC_IMX6SL=y |
@@ -300,6 +300,7 @@ CONFIG_MMC=y | |||
300 | CONFIG_MMC_BLOCK_MINORS=16 | 300 | CONFIG_MMC_BLOCK_MINORS=16 |
301 | CONFIG_MMC_ARMMMCI=y | 301 | CONFIG_MMC_ARMMMCI=y |
302 | CONFIG_MMC_SDHCI=y | 302 | CONFIG_MMC_SDHCI=y |
303 | CONFIG_MMC_SDHCI_PLTFM=y | ||
303 | CONFIG_MMC_SDHCI_OF_ARASAN=y | 304 | CONFIG_MMC_SDHCI_OF_ARASAN=y |
304 | CONFIG_MMC_SDHCI_ESDHC_IMX=y | 305 | CONFIG_MMC_SDHCI_ESDHC_IMX=y |
305 | CONFIG_MMC_SDHCI_DOVE=y | 306 | CONFIG_MMC_SDHCI_DOVE=y |
@@ -352,6 +353,7 @@ CONFIG_MFD_NVEC=y | |||
352 | CONFIG_KEYBOARD_NVEC=y | 353 | CONFIG_KEYBOARD_NVEC=y |
353 | CONFIG_SERIO_NVEC_PS2=y | 354 | CONFIG_SERIO_NVEC_PS2=y |
354 | CONFIG_NVEC_POWER=y | 355 | CONFIG_NVEC_POWER=y |
356 | CONFIG_QCOM_GSBI=y | ||
355 | CONFIG_COMMON_CLK_QCOM=y | 357 | CONFIG_COMMON_CLK_QCOM=y |
356 | CONFIG_MSM_GCC_8660=y | 358 | CONFIG_MSM_GCC_8660=y |
357 | CONFIG_MSM_MMCC_8960=y | 359 | CONFIG_MSM_MMCC_8960=y |
diff --git a/arch/arm/configs/mvebu_v7_defconfig b/arch/arm/configs/mvebu_v7_defconfig index e11170e37442..b0bfefa23902 100644 --- a/arch/arm/configs/mvebu_v7_defconfig +++ b/arch/arm/configs/mvebu_v7_defconfig | |||
@@ -14,6 +14,7 @@ CONFIG_MACH_ARMADA_370=y | |||
14 | CONFIG_MACH_ARMADA_375=y | 14 | CONFIG_MACH_ARMADA_375=y |
15 | CONFIG_MACH_ARMADA_38X=y | 15 | CONFIG_MACH_ARMADA_38X=y |
16 | CONFIG_MACH_ARMADA_XP=y | 16 | CONFIG_MACH_ARMADA_XP=y |
17 | CONFIG_MACH_DOVE=y | ||
17 | CONFIG_NEON=y | 18 | CONFIG_NEON=y |
18 | # CONFIG_CACHE_L2X0 is not set | 19 | # CONFIG_CACHE_L2X0 is not set |
19 | # CONFIG_SWP_EMULATE is not set | 20 | # CONFIG_SWP_EMULATE is not set |
@@ -52,6 +53,7 @@ CONFIG_INPUT_EVDEV=y | |||
52 | CONFIG_KEYBOARD_GPIO=y | 53 | CONFIG_KEYBOARD_GPIO=y |
53 | CONFIG_SERIAL_8250=y | 54 | CONFIG_SERIAL_8250=y |
54 | CONFIG_SERIAL_8250_CONSOLE=y | 55 | CONFIG_SERIAL_8250_CONSOLE=y |
56 | CONFIG_SERIAL_OF_PLATFORM=y | ||
55 | CONFIG_I2C=y | 57 | CONFIG_I2C=y |
56 | CONFIG_SPI=y | 58 | CONFIG_SPI=y |
57 | CONFIG_SPI_ORION=y | 59 | CONFIG_SPI_ORION=y |
diff --git a/arch/arm/configs/mxs_defconfig b/arch/arm/configs/mxs_defconfig index a9f992335eb2..c7906c2fd645 100644 --- a/arch/arm/configs/mxs_defconfig +++ b/arch/arm/configs/mxs_defconfig | |||
@@ -1,4 +1,5 @@ | |||
1 | CONFIG_SYSVIPC=y | 1 | CONFIG_SYSVIPC=y |
2 | CONFIG_FHANDLE=y | ||
2 | CONFIG_NO_HZ=y | 3 | CONFIG_NO_HZ=y |
3 | CONFIG_HIGH_RES_TIMERS=y | 4 | CONFIG_HIGH_RES_TIMERS=y |
4 | CONFIG_TASKSTATS=y | 5 | CONFIG_TASKSTATS=y |
diff --git a/arch/arm/configs/omap2plus_defconfig b/arch/arm/configs/omap2plus_defconfig index 59066cf0271a..536a137863cb 100644 --- a/arch/arm/configs/omap2plus_defconfig +++ b/arch/arm/configs/omap2plus_defconfig | |||
@@ -32,6 +32,7 @@ CONFIG_SOC_OMAP5=y | |||
32 | CONFIG_SOC_AM33XX=y | 32 | CONFIG_SOC_AM33XX=y |
33 | CONFIG_SOC_AM43XX=y | 33 | CONFIG_SOC_AM43XX=y |
34 | CONFIG_SOC_DRA7XX=y | 34 | CONFIG_SOC_DRA7XX=y |
35 | CONFIG_CACHE_L2X0=y | ||
35 | CONFIG_ARM_THUMBEE=y | 36 | CONFIG_ARM_THUMBEE=y |
36 | CONFIG_ARM_ERRATA_411920=y | 37 | CONFIG_ARM_ERRATA_411920=y |
37 | CONFIG_SMP=y | 38 | CONFIG_SMP=y |
diff --git a/arch/arm/include/asm/ftrace.h b/arch/arm/include/asm/ftrace.h index eb577f4f5f70..39eb16b0066f 100644 --- a/arch/arm/include/asm/ftrace.h +++ b/arch/arm/include/asm/ftrace.h | |||
@@ -52,7 +52,7 @@ extern inline void *return_address(unsigned int level) | |||
52 | 52 | ||
53 | #endif | 53 | #endif |
54 | 54 | ||
55 | #define ftrace_return_addr(n) return_address(n) | 55 | #define ftrace_return_address(n) return_address(n) |
56 | 56 | ||
57 | #endif /* ifndef __ASSEMBLY__ */ | 57 | #endif /* ifndef __ASSEMBLY__ */ |
58 | 58 | ||
diff --git a/arch/arm/include/asm/mcpm.h b/arch/arm/include/asm/mcpm.h index d9702eb0b02b..94060adba174 100644 --- a/arch/arm/include/asm/mcpm.h +++ b/arch/arm/include/asm/mcpm.h | |||
@@ -208,8 +208,6 @@ struct sync_struct { | |||
208 | struct mcpm_sync_struct clusters[MAX_NR_CLUSTERS]; | 208 | struct mcpm_sync_struct clusters[MAX_NR_CLUSTERS]; |
209 | }; | 209 | }; |
210 | 210 | ||
211 | extern unsigned long sync_phys; /* physical address of *mcpm_sync */ | ||
212 | |||
213 | void __mcpm_cpu_going_down(unsigned int cpu, unsigned int cluster); | 211 | void __mcpm_cpu_going_down(unsigned int cpu, unsigned int cluster); |
214 | void __mcpm_cpu_down(unsigned int cpu, unsigned int cluster); | 212 | void __mcpm_cpu_down(unsigned int cpu, unsigned int cluster); |
215 | void __mcpm_outbound_leave_critical(unsigned int cluster, int state); | 213 | void __mcpm_outbound_leave_critical(unsigned int cluster, int state); |
diff --git a/arch/arm/include/asm/thread_info.h b/arch/arm/include/asm/thread_info.h index f989d7c22dc5..e4e4208a9130 100644 --- a/arch/arm/include/asm/thread_info.h +++ b/arch/arm/include/asm/thread_info.h | |||
@@ -114,8 +114,14 @@ static inline struct thread_info *current_thread_info(void) | |||
114 | ((unsigned long)(task_thread_info(tsk)->cpu_context.pc)) | 114 | ((unsigned long)(task_thread_info(tsk)->cpu_context.pc)) |
115 | #define thread_saved_sp(tsk) \ | 115 | #define thread_saved_sp(tsk) \ |
116 | ((unsigned long)(task_thread_info(tsk)->cpu_context.sp)) | 116 | ((unsigned long)(task_thread_info(tsk)->cpu_context.sp)) |
117 | |||
118 | #ifndef CONFIG_THUMB2_KERNEL | ||
117 | #define thread_saved_fp(tsk) \ | 119 | #define thread_saved_fp(tsk) \ |
118 | ((unsigned long)(task_thread_info(tsk)->cpu_context.fp)) | 120 | ((unsigned long)(task_thread_info(tsk)->cpu_context.fp)) |
121 | #else | ||
122 | #define thread_saved_fp(tsk) \ | ||
123 | ((unsigned long)(task_thread_info(tsk)->cpu_context.r7)) | ||
124 | #endif | ||
119 | 125 | ||
120 | extern void crunch_task_disable(struct thread_info *); | 126 | extern void crunch_task_disable(struct thread_info *); |
121 | extern void crunch_task_copy(struct thread_info *, void *); | 127 | extern void crunch_task_copy(struct thread_info *, void *); |
diff --git a/arch/arm/kernel/perf_event_v7.c b/arch/arm/kernel/perf_event_v7.c index 2037f7205987..1d37568c547a 100644 --- a/arch/arm/kernel/perf_event_v7.c +++ b/arch/arm/kernel/perf_event_v7.c | |||
@@ -1924,7 +1924,7 @@ static int krait_pmu_get_event_idx(struct pmu_hw_events *cpuc, | |||
1924 | struct perf_event *event) | 1924 | struct perf_event *event) |
1925 | { | 1925 | { |
1926 | int idx; | 1926 | int idx; |
1927 | int bit; | 1927 | int bit = -1; |
1928 | unsigned int prefix; | 1928 | unsigned int prefix; |
1929 | unsigned int region; | 1929 | unsigned int region; |
1930 | unsigned int code; | 1930 | unsigned int code; |
@@ -1953,7 +1953,7 @@ static int krait_pmu_get_event_idx(struct pmu_hw_events *cpuc, | |||
1953 | } | 1953 | } |
1954 | 1954 | ||
1955 | idx = armv7pmu_get_event_idx(cpuc, event); | 1955 | idx = armv7pmu_get_event_idx(cpuc, event); |
1956 | if (idx < 0 && krait_event) | 1956 | if (idx < 0 && bit >= 0) |
1957 | clear_bit(bit, cpuc->used_mask); | 1957 | clear_bit(bit, cpuc->used_mask); |
1958 | 1958 | ||
1959 | return idx; | 1959 | return idx; |
diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c index 0dd3b79b15c3..0c27ed6f3f23 100644 --- a/arch/arm/kernel/ptrace.c +++ b/arch/arm/kernel/ptrace.c | |||
@@ -908,7 +908,7 @@ enum ptrace_syscall_dir { | |||
908 | PTRACE_SYSCALL_EXIT, | 908 | PTRACE_SYSCALL_EXIT, |
909 | }; | 909 | }; |
910 | 910 | ||
911 | static int tracehook_report_syscall(struct pt_regs *regs, | 911 | static void tracehook_report_syscall(struct pt_regs *regs, |
912 | enum ptrace_syscall_dir dir) | 912 | enum ptrace_syscall_dir dir) |
913 | { | 913 | { |
914 | unsigned long ip; | 914 | unsigned long ip; |
@@ -926,7 +926,6 @@ static int tracehook_report_syscall(struct pt_regs *regs, | |||
926 | current_thread_info()->syscall = -1; | 926 | current_thread_info()->syscall = -1; |
927 | 927 | ||
928 | regs->ARM_ip = ip; | 928 | regs->ARM_ip = ip; |
929 | return current_thread_info()->syscall; | ||
930 | } | 929 | } |
931 | 930 | ||
932 | asmlinkage int syscall_trace_enter(struct pt_regs *regs, int scno) | 931 | asmlinkage int syscall_trace_enter(struct pt_regs *regs, int scno) |
@@ -938,7 +937,9 @@ asmlinkage int syscall_trace_enter(struct pt_regs *regs, int scno) | |||
938 | return -1; | 937 | return -1; |
939 | 938 | ||
940 | if (test_thread_flag(TIF_SYSCALL_TRACE)) | 939 | if (test_thread_flag(TIF_SYSCALL_TRACE)) |
941 | scno = tracehook_report_syscall(regs, PTRACE_SYSCALL_ENTER); | 940 | tracehook_report_syscall(regs, PTRACE_SYSCALL_ENTER); |
941 | |||
942 | scno = current_thread_info()->syscall; | ||
942 | 943 | ||
943 | if (test_thread_flag(TIF_SYSCALL_TRACEPOINT)) | 944 | if (test_thread_flag(TIF_SYSCALL_TRACEPOINT)) |
944 | trace_sys_enter(regs, scno); | 945 | trace_sys_enter(regs, scno); |
diff --git a/arch/arm/lib/delay.c b/arch/arm/lib/delay.c index 5306de350133..312d43eb686a 100644 --- a/arch/arm/lib/delay.c +++ b/arch/arm/lib/delay.c | |||
@@ -19,6 +19,7 @@ | |||
19 | * Author: Will Deacon <will.deacon@arm.com> | 19 | * Author: Will Deacon <will.deacon@arm.com> |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/clocksource.h> | ||
22 | #include <linux/delay.h> | 23 | #include <linux/delay.h> |
23 | #include <linux/init.h> | 24 | #include <linux/init.h> |
24 | #include <linux/kernel.h> | 25 | #include <linux/kernel.h> |
@@ -36,6 +37,7 @@ struct arm_delay_ops arm_delay_ops = { | |||
36 | 37 | ||
37 | static const struct delay_timer *delay_timer; | 38 | static const struct delay_timer *delay_timer; |
38 | static bool delay_calibrated; | 39 | static bool delay_calibrated; |
40 | static u64 delay_res; | ||
39 | 41 | ||
40 | int read_current_timer(unsigned long *timer_val) | 42 | int read_current_timer(unsigned long *timer_val) |
41 | { | 43 | { |
@@ -47,6 +49,11 @@ int read_current_timer(unsigned long *timer_val) | |||
47 | } | 49 | } |
48 | EXPORT_SYMBOL_GPL(read_current_timer); | 50 | EXPORT_SYMBOL_GPL(read_current_timer); |
49 | 51 | ||
52 | static inline u64 cyc_to_ns(u64 cyc, u32 mult, u32 shift) | ||
53 | { | ||
54 | return (cyc * mult) >> shift; | ||
55 | } | ||
56 | |||
50 | static void __timer_delay(unsigned long cycles) | 57 | static void __timer_delay(unsigned long cycles) |
51 | { | 58 | { |
52 | cycles_t start = get_cycles(); | 59 | cycles_t start = get_cycles(); |
@@ -69,18 +76,24 @@ static void __timer_udelay(unsigned long usecs) | |||
69 | 76 | ||
70 | void __init register_current_timer_delay(const struct delay_timer *timer) | 77 | void __init register_current_timer_delay(const struct delay_timer *timer) |
71 | { | 78 | { |
72 | if (!delay_calibrated) { | 79 | u32 new_mult, new_shift; |
73 | pr_info("Switching to timer-based delay loop\n"); | 80 | u64 res; |
81 | |||
82 | clocks_calc_mult_shift(&new_mult, &new_shift, timer->freq, | ||
83 | NSEC_PER_SEC, 3600); | ||
84 | res = cyc_to_ns(1ULL, new_mult, new_shift); | ||
85 | |||
86 | if (!delay_calibrated && (!delay_res || (res < delay_res))) { | ||
87 | pr_info("Switching to timer-based delay loop, resolution %lluns\n", res); | ||
74 | delay_timer = timer; | 88 | delay_timer = timer; |
75 | lpj_fine = timer->freq / HZ; | 89 | lpj_fine = timer->freq / HZ; |
90 | delay_res = res; | ||
76 | 91 | ||
77 | /* cpufreq may scale loops_per_jiffy, so keep a private copy */ | 92 | /* cpufreq may scale loops_per_jiffy, so keep a private copy */ |
78 | arm_delay_ops.ticks_per_jiffy = lpj_fine; | 93 | arm_delay_ops.ticks_per_jiffy = lpj_fine; |
79 | arm_delay_ops.delay = __timer_delay; | 94 | arm_delay_ops.delay = __timer_delay; |
80 | arm_delay_ops.const_udelay = __timer_const_udelay; | 95 | arm_delay_ops.const_udelay = __timer_const_udelay; |
81 | arm_delay_ops.udelay = __timer_udelay; | 96 | arm_delay_ops.udelay = __timer_udelay; |
82 | |||
83 | delay_calibrated = true; | ||
84 | } else { | 97 | } else { |
85 | pr_info("Ignoring duplicate/late registration of read_current_timer delay\n"); | 98 | pr_info("Ignoring duplicate/late registration of read_current_timer delay\n"); |
86 | } | 99 | } |
@@ -91,3 +104,8 @@ unsigned long calibrate_delay_is_known(void) | |||
91 | delay_calibrated = true; | 104 | delay_calibrated = true; |
92 | return lpj_fine; | 105 | return lpj_fine; |
93 | } | 106 | } |
107 | |||
108 | void calibration_delay_done(void) | ||
109 | { | ||
110 | delay_calibrated = true; | ||
111 | } | ||
diff --git a/arch/arm/mach-bcm/Kconfig b/arch/arm/mach-bcm/Kconfig index 9bc6db1c1348..41c839167e87 100644 --- a/arch/arm/mach-bcm/Kconfig +++ b/arch/arm/mach-bcm/Kconfig | |||
@@ -1,10 +1,9 @@ | |||
1 | config ARCH_BCM | 1 | menuconfig ARCH_BCM |
2 | bool "Broadcom SoC Support" if ARCH_MULTI_V6_V7 | 2 | bool "Broadcom SoC Support" if ARCH_MULTI_V6_V7 |
3 | help | 3 | help |
4 | This enables support for Broadcom ARM based SoC chips | 4 | This enables support for Broadcom ARM based SoC chips |
5 | 5 | ||
6 | menu "Broadcom SoC Selection" | 6 | if ARCH_BCM |
7 | depends on ARCH_BCM | ||
8 | 7 | ||
9 | config ARCH_BCM_MOBILE | 8 | config ARCH_BCM_MOBILE |
10 | bool "Broadcom Mobile SoC Support" if ARCH_MULTI_V7 | 9 | bool "Broadcom Mobile SoC Support" if ARCH_MULTI_V7 |
@@ -88,4 +87,4 @@ config ARCH_BCM_5301X | |||
88 | different SoC or with the older BCM47XX and BCM53XX based | 87 | different SoC or with the older BCM47XX and BCM53XX based |
89 | network SoC using a MIPS CPU, they are supported by arch/mips/bcm47xx | 88 | network SoC using a MIPS CPU, they are supported by arch/mips/bcm47xx |
90 | 89 | ||
91 | endmenu | 90 | endif |
diff --git a/arch/arm/mach-berlin/Kconfig b/arch/arm/mach-berlin/Kconfig index 101e0f356730..24f85be71671 100644 --- a/arch/arm/mach-berlin/Kconfig +++ b/arch/arm/mach-berlin/Kconfig | |||
@@ -1,4 +1,4 @@ | |||
1 | config ARCH_BERLIN | 1 | menuconfig ARCH_BERLIN |
2 | bool "Marvell Berlin SoCs" if ARCH_MULTI_V7 | 2 | bool "Marvell Berlin SoCs" if ARCH_MULTI_V7 |
3 | select ARCH_REQUIRE_GPIOLIB | 3 | select ARCH_REQUIRE_GPIOLIB |
4 | select ARM_GIC | 4 | select ARM_GIC |
@@ -9,13 +9,13 @@ config ARCH_BERLIN | |||
9 | 9 | ||
10 | if ARCH_BERLIN | 10 | if ARCH_BERLIN |
11 | 11 | ||
12 | menu "Marvell Berlin SoC variants" | ||
13 | |||
14 | config MACH_BERLIN_BG2 | 12 | config MACH_BERLIN_BG2 |
15 | bool "Marvell Armada 1500 (BG2)" | 13 | bool "Marvell Armada 1500 (BG2)" |
16 | select CACHE_L2X0 | 14 | select CACHE_L2X0 |
17 | select CPU_PJ4B | 15 | select CPU_PJ4B |
16 | select HAVE_ARM_SCU if SMP | ||
18 | select HAVE_ARM_TWD if SMP | 17 | select HAVE_ARM_TWD if SMP |
18 | select HAVE_SMP | ||
19 | select PINCTRL_BERLIN_BG2 | 19 | select PINCTRL_BERLIN_BG2 |
20 | 20 | ||
21 | config MACH_BERLIN_BG2CD | 21 | config MACH_BERLIN_BG2CD |
@@ -27,9 +27,8 @@ config MACH_BERLIN_BG2CD | |||
27 | config MACH_BERLIN_BG2Q | 27 | config MACH_BERLIN_BG2Q |
28 | bool "Marvell Armada 1500 Pro (BG2-Q)" | 28 | bool "Marvell Armada 1500 Pro (BG2-Q)" |
29 | select CACHE_L2X0 | 29 | select CACHE_L2X0 |
30 | select HAVE_ARM_SCU if SMP | ||
30 | select HAVE_ARM_TWD if SMP | 31 | select HAVE_ARM_TWD if SMP |
31 | select PINCTRL_BERLIN_BG2Q | 32 | select PINCTRL_BERLIN_BG2Q |
32 | 33 | ||
33 | endmenu | ||
34 | |||
35 | endif | 34 | endif |
diff --git a/arch/arm/mach-berlin/Makefile b/arch/arm/mach-berlin/Makefile index ab69fe956f49..c0719ecd1890 100644 --- a/arch/arm/mach-berlin/Makefile +++ b/arch/arm/mach-berlin/Makefile | |||
@@ -1 +1,2 @@ | |||
1 | obj-y += berlin.o | 1 | obj-y += berlin.o |
2 | obj-$(CONFIG_SMP) += headsmp.o platsmp.o | ||
diff --git a/arch/arm/mach-berlin/headsmp.S b/arch/arm/mach-berlin/headsmp.S new file mode 100644 index 000000000000..4a4c56a58ad3 --- /dev/null +++ b/arch/arm/mach-berlin/headsmp.S | |||
@@ -0,0 +1,30 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2014 Marvell Technology Group Ltd. | ||
3 | * | ||
4 | * Antoine Ténart <antoine.tenart@free-electrons.com> | ||
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 version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | #include <linux/linkage.h> | ||
12 | #include <linux/init.h> | ||
13 | #include <asm/assembler.h> | ||
14 | |||
15 | ENTRY(berlin_secondary_startup) | ||
16 | ARM_BE8(setend be) | ||
17 | bl v7_invalidate_l1 | ||
18 | b secondary_startup | ||
19 | ENDPROC(berlin_secondary_startup) | ||
20 | |||
21 | /* | ||
22 | * If the following instruction is set in the reset exception vector, CPUs | ||
23 | * will fetch the value of the software reset address vector when being | ||
24 | * reset. | ||
25 | */ | ||
26 | .global boot_inst | ||
27 | boot_inst: | ||
28 | ldr pc, [pc, #140] | ||
29 | |||
30 | .align | ||
diff --git a/arch/arm/mach-berlin/platsmp.c b/arch/arm/mach-berlin/platsmp.c new file mode 100644 index 000000000000..702e7982015a --- /dev/null +++ b/arch/arm/mach-berlin/platsmp.c | |||
@@ -0,0 +1,99 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2014 Marvell Technology Group Ltd. | ||
3 | * | ||
4 | * Antoine Ténart <antoine.tenart@free-electrons.com> | ||
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 version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | #include <linux/io.h> | ||
12 | #include <linux/delay.h> | ||
13 | #include <linux/of.h> | ||
14 | #include <linux/of_address.h> | ||
15 | |||
16 | #include <asm/cacheflush.h> | ||
17 | #include <asm/smp_plat.h> | ||
18 | #include <asm/smp_scu.h> | ||
19 | |||
20 | #define CPU_RESET 0x00 | ||
21 | |||
22 | #define RESET_VECT 0x00 | ||
23 | #define SW_RESET_ADDR 0x94 | ||
24 | |||
25 | extern void berlin_secondary_startup(void); | ||
26 | extern u32 boot_inst; | ||
27 | |||
28 | static void __iomem *cpu_ctrl; | ||
29 | |||
30 | static inline void berlin_perform_reset_cpu(unsigned int cpu) | ||
31 | { | ||
32 | u32 val; | ||
33 | |||
34 | val = readl(cpu_ctrl + CPU_RESET); | ||
35 | val |= BIT(cpu_logical_map(cpu)); | ||
36 | writel(val, cpu_ctrl + CPU_RESET); | ||
37 | } | ||
38 | |||
39 | static int berlin_boot_secondary(unsigned int cpu, struct task_struct *idle) | ||
40 | { | ||
41 | if (!cpu_ctrl) | ||
42 | return -EFAULT; | ||
43 | |||
44 | /* | ||
45 | * Reset the CPU, making it to execute the instruction in the reset | ||
46 | * exception vector. | ||
47 | */ | ||
48 | berlin_perform_reset_cpu(cpu); | ||
49 | |||
50 | return 0; | ||
51 | } | ||
52 | |||
53 | static void __init berlin_smp_prepare_cpus(unsigned int max_cpus) | ||
54 | { | ||
55 | struct device_node *np; | ||
56 | void __iomem *scu_base; | ||
57 | void __iomem *vectors_base; | ||
58 | |||
59 | np = of_find_compatible_node(NULL, NULL, "arm,cortex-a9-scu"); | ||
60 | scu_base = of_iomap(np, 0); | ||
61 | of_node_put(np); | ||
62 | if (!scu_base) | ||
63 | return; | ||
64 | |||
65 | np = of_find_compatible_node(NULL, NULL, "marvell,berlin-cpu-ctrl"); | ||
66 | cpu_ctrl = of_iomap(np, 0); | ||
67 | of_node_put(np); | ||
68 | if (!cpu_ctrl) | ||
69 | goto unmap_scu; | ||
70 | |||
71 | vectors_base = ioremap(CONFIG_VECTORS_BASE, SZ_32K); | ||
72 | if (!vectors_base) | ||
73 | goto unmap_scu; | ||
74 | |||
75 | scu_enable(scu_base); | ||
76 | flush_cache_all(); | ||
77 | |||
78 | /* | ||
79 | * Write the first instruction the CPU will execute after being reset | ||
80 | * in the reset exception vector. | ||
81 | */ | ||
82 | writel(boot_inst, vectors_base + RESET_VECT); | ||
83 | |||
84 | /* | ||
85 | * Write the secondary startup address into the SW reset address | ||
86 | * vector. This is used by boot_inst. | ||
87 | */ | ||
88 | writel(virt_to_phys(berlin_secondary_startup), vectors_base + SW_RESET_ADDR); | ||
89 | |||
90 | iounmap(vectors_base); | ||
91 | unmap_scu: | ||
92 | iounmap(scu_base); | ||
93 | } | ||
94 | |||
95 | static struct smp_operations berlin_smp_ops __initdata = { | ||
96 | .smp_prepare_cpus = berlin_smp_prepare_cpus, | ||
97 | .smp_boot_secondary = berlin_boot_secondary, | ||
98 | }; | ||
99 | CPU_METHOD_OF_DECLARE(berlin_smp, "marvell,berlin-smp", &berlin_smp_ops); | ||
diff --git a/arch/arm/mach-cns3xxx/Kconfig b/arch/arm/mach-cns3xxx/Kconfig index 66838f42037f..3c22a1990ecd 100644 --- a/arch/arm/mach-cns3xxx/Kconfig +++ b/arch/arm/mach-cns3xxx/Kconfig | |||
@@ -1,12 +1,11 @@ | |||
1 | config ARCH_CNS3XXX | 1 | menuconfig ARCH_CNS3XXX |
2 | bool "Cavium Networks CNS3XXX family" if ARCH_MULTI_V6 | 2 | bool "Cavium Networks CNS3XXX family" if ARCH_MULTI_V6 |
3 | select ARM_GIC | 3 | select ARM_GIC |
4 | select PCI_DOMAINS if PCI | 4 | select PCI_DOMAINS if PCI |
5 | help | 5 | help |
6 | Support for Cavium Networks CNS3XXX platform. | 6 | Support for Cavium Networks CNS3XXX platform. |
7 | 7 | ||
8 | menu "CNS3XXX platform type" | 8 | if ARCH_CNS3XXX |
9 | depends on ARCH_CNS3XXX | ||
10 | 9 | ||
11 | config MACH_CNS3420VB | 10 | config MACH_CNS3420VB |
12 | bool "Support for CNS3420 Validation Board" | 11 | bool "Support for CNS3420 Validation Board" |
@@ -17,4 +16,4 @@ config MACH_CNS3420VB | |||
17 | This is a platform with an on-board ARM11 MPCore and has support | 16 | This is a platform with an on-board ARM11 MPCore and has support |
18 | for USB, USB-OTG, MMC/SD/SDIO, SATA, PCI-E, etc. | 17 | for USB, USB-OTG, MMC/SD/SDIO, SATA, PCI-E, etc. |
19 | 18 | ||
20 | endmenu | 19 | endif |
diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig index db18ef866593..584e8d4e2892 100644 --- a/arch/arm/mach-davinci/Kconfig +++ b/arch/arm/mach-davinci/Kconfig | |||
@@ -39,7 +39,6 @@ config ARCH_DAVINCI_DA830 | |||
39 | config ARCH_DAVINCI_DA850 | 39 | config ARCH_DAVINCI_DA850 |
40 | bool "DA850/OMAP-L138/AM18x based system" | 40 | bool "DA850/OMAP-L138/AM18x based system" |
41 | select ARCH_DAVINCI_DA8XX | 41 | select ARCH_DAVINCI_DA8XX |
42 | select ARCH_HAS_CPUFREQ | ||
43 | select CP_INTC | 42 | select CP_INTC |
44 | 43 | ||
45 | config ARCH_DAVINCI_DA8XX | 44 | config ARCH_DAVINCI_DA8XX |
diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig index d58995c9a95a..8f9b66c4ac78 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig | |||
@@ -7,10 +7,9 @@ | |||
7 | 7 | ||
8 | # Configuration options for the EXYNOS4 | 8 | # Configuration options for the EXYNOS4 |
9 | 9 | ||
10 | config ARCH_EXYNOS | 10 | menuconfig ARCH_EXYNOS |
11 | bool "Samsung EXYNOS" if ARCH_MULTI_V7 | 11 | bool "Samsung EXYNOS" if ARCH_MULTI_V7 |
12 | select ARCH_HAS_BANDGAP | 12 | select ARCH_HAS_BANDGAP |
13 | select ARCH_HAS_CPUFREQ | ||
14 | select ARCH_HAS_HOLES_MEMORYMODEL | 13 | select ARCH_HAS_HOLES_MEMORYMODEL |
15 | select ARCH_REQUIRE_GPIOLIB | 14 | select ARCH_REQUIRE_GPIOLIB |
16 | select ARM_AMBA | 15 | select ARM_AMBA |
@@ -30,8 +29,6 @@ config ARCH_EXYNOS | |||
30 | 29 | ||
31 | if ARCH_EXYNOS | 30 | if ARCH_EXYNOS |
32 | 31 | ||
33 | menu "SAMSUNG EXYNOS SoCs Support" | ||
34 | |||
35 | config ARCH_EXYNOS3 | 32 | config ARCH_EXYNOS3 |
36 | bool "SAMSUNG EXYNOS3" | 33 | bool "SAMSUNG EXYNOS3" |
37 | select ARM_CPU_SUSPEND if PM | 34 | select ARM_CPU_SUSPEND if PM |
@@ -118,8 +115,6 @@ config SOC_EXYNOS5800 | |||
118 | default y | 115 | default y |
119 | depends on SOC_EXYNOS5420 | 116 | depends on SOC_EXYNOS5420 |
120 | 117 | ||
121 | endmenu | ||
122 | |||
123 | config EXYNOS5420_MCPM | 118 | config EXYNOS5420_MCPM |
124 | bool "Exynos5420 Multi-Cluster PM support" | 119 | bool "Exynos5420 Multi-Cluster PM support" |
125 | depends on MCPM && SOC_EXYNOS5420 | 120 | depends on MCPM && SOC_EXYNOS5420 |
diff --git a/arch/arm/mach-exynos/common.h b/arch/arm/mach-exynos/common.h index 16617bdb37a9..1ee91763fa7c 100644 --- a/arch/arm/mach-exynos/common.h +++ b/arch/arm/mach-exynos/common.h | |||
@@ -118,6 +118,7 @@ extern void __iomem *sysram_ns_base_addr; | |||
118 | extern void __iomem *sysram_base_addr; | 118 | extern void __iomem *sysram_base_addr; |
119 | void exynos_init_io(void); | 119 | void exynos_init_io(void); |
120 | void exynos_restart(enum reboot_mode mode, const char *cmd); | 120 | void exynos_restart(enum reboot_mode mode, const char *cmd); |
121 | void exynos_sysram_init(void); | ||
121 | void exynos_cpuidle_init(void); | 122 | void exynos_cpuidle_init(void); |
122 | void exynos_cpufreq_init(void); | 123 | void exynos_cpufreq_init(void); |
123 | void exynos_init_late(void); | 124 | void exynos_init_late(void); |
diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c index 90aab4d75d08..f38cf7c110cc 100644 --- a/arch/arm/mach-exynos/exynos.c +++ b/arch/arm/mach-exynos/exynos.c | |||
@@ -184,6 +184,28 @@ void __init exynos_cpufreq_init(void) | |||
184 | platform_device_register_simple("exynos-cpufreq", -1, NULL, 0); | 184 | platform_device_register_simple("exynos-cpufreq", -1, NULL, 0); |
185 | } | 185 | } |
186 | 186 | ||
187 | void __iomem *sysram_base_addr; | ||
188 | void __iomem *sysram_ns_base_addr; | ||
189 | |||
190 | void __init exynos_sysram_init(void) | ||
191 | { | ||
192 | struct device_node *node; | ||
193 | |||
194 | for_each_compatible_node(node, NULL, "samsung,exynos4210-sysram") { | ||
195 | if (!of_device_is_available(node)) | ||
196 | continue; | ||
197 | sysram_base_addr = of_iomap(node, 0); | ||
198 | break; | ||
199 | } | ||
200 | |||
201 | for_each_compatible_node(node, NULL, "samsung,exynos4210-sysram-ns") { | ||
202 | if (!of_device_is_available(node)) | ||
203 | continue; | ||
204 | sysram_ns_base_addr = of_iomap(node, 0); | ||
205 | break; | ||
206 | } | ||
207 | } | ||
208 | |||
187 | void __init exynos_init_late(void) | 209 | void __init exynos_init_late(void) |
188 | { | 210 | { |
189 | if (of_machine_is_compatible("samsung,exynos5440")) | 211 | if (of_machine_is_compatible("samsung,exynos5440")) |
@@ -198,7 +220,7 @@ static int __init exynos_fdt_map_chipid(unsigned long node, const char *uname, | |||
198 | int depth, void *data) | 220 | int depth, void *data) |
199 | { | 221 | { |
200 | struct map_desc iodesc; | 222 | struct map_desc iodesc; |
201 | __be32 *reg; | 223 | const __be32 *reg; |
202 | int len; | 224 | int len; |
203 | 225 | ||
204 | if (!of_flat_dt_is_compatible(node, "samsung,exynos4210-chipid") && | 226 | if (!of_flat_dt_is_compatible(node, "samsung,exynos4210-chipid") && |
@@ -271,6 +293,13 @@ static void __init exynos_dt_machine_init(void) | |||
271 | } | 293 | } |
272 | } | 294 | } |
273 | 295 | ||
296 | /* | ||
297 | * This is called from smp_prepare_cpus if we've built for SMP, but | ||
298 | * we still need to set it up for PM and firmware ops if not. | ||
299 | */ | ||
300 | if (!IS_ENABLED(SMP)) | ||
301 | exynos_sysram_init(); | ||
302 | |||
274 | exynos_cpuidle_init(); | 303 | exynos_cpuidle_init(); |
275 | exynos_cpufreq_init(); | 304 | exynos_cpufreq_init(); |
276 | 305 | ||
diff --git a/arch/arm/mach-exynos/hotplug.c b/arch/arm/mach-exynos/hotplug.c index 69fa48397394..8a134d019cb3 100644 --- a/arch/arm/mach-exynos/hotplug.c +++ b/arch/arm/mach-exynos/hotplug.c | |||
@@ -46,13 +46,7 @@ static inline void platform_do_lowpower(unsigned int cpu, int *spurious) | |||
46 | if (cpu == 1) | 46 | if (cpu == 1) |
47 | exynos_cpu_power_down(cpu); | 47 | exynos_cpu_power_down(cpu); |
48 | 48 | ||
49 | /* | 49 | wfi(); |
50 | * here's the WFI | ||
51 | */ | ||
52 | asm(".word 0xe320f003\n" | ||
53 | : | ||
54 | : | ||
55 | : "memory", "cc"); | ||
56 | 50 | ||
57 | if (pen_release == cpu_logical_map(cpu)) { | 51 | if (pen_release == cpu_logical_map(cpu)) { |
58 | /* | 52 | /* |
diff --git a/arch/arm/mach-exynos/mcpm-exynos.c b/arch/arm/mach-exynos/mcpm-exynos.c index 0498d0b887ef..ace0ed617476 100644 --- a/arch/arm/mach-exynos/mcpm-exynos.c +++ b/arch/arm/mach-exynos/mcpm-exynos.c | |||
@@ -25,7 +25,6 @@ | |||
25 | 25 | ||
26 | #define EXYNOS5420_CPUS_PER_CLUSTER 4 | 26 | #define EXYNOS5420_CPUS_PER_CLUSTER 4 |
27 | #define EXYNOS5420_NR_CLUSTERS 2 | 27 | #define EXYNOS5420_NR_CLUSTERS 2 |
28 | #define MCPM_BOOT_ADDR_OFFSET 0x1c | ||
29 | 28 | ||
30 | /* | 29 | /* |
31 | * The common v7_exit_coherency_flush API could not be used because of the | 30 | * The common v7_exit_coherency_flush API could not be used because of the |
@@ -343,11 +342,13 @@ static int __init exynos_mcpm_init(void) | |||
343 | pr_info("Exynos MCPM support installed\n"); | 342 | pr_info("Exynos MCPM support installed\n"); |
344 | 343 | ||
345 | /* | 344 | /* |
346 | * Future entries into the kernel can now go | 345 | * U-Boot SPL is hardcoded to jump to the start of ns_sram_base_addr |
347 | * through the cluster entry vectors. | 346 | * as part of secondary_cpu_start(). Let's redirect it to the |
347 | * mcpm_entry_point(). | ||
348 | */ | 348 | */ |
349 | __raw_writel(virt_to_phys(mcpm_entry_point), | 349 | __raw_writel(0xe59f0000, ns_sram_base_addr); /* ldr r0, [pc, #0] */ |
350 | ns_sram_base_addr + MCPM_BOOT_ADDR_OFFSET); | 350 | __raw_writel(0xe12fff10, ns_sram_base_addr + 4); /* bx r0 */ |
351 | __raw_writel(virt_to_phys(mcpm_entry_point), ns_sram_base_addr + 8); | ||
351 | 352 | ||
352 | iounmap(ns_sram_base_addr); | 353 | iounmap(ns_sram_base_addr); |
353 | 354 | ||
diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c index ec02422e8499..1c8d31e39520 100644 --- a/arch/arm/mach-exynos/platsmp.c +++ b/arch/arm/mach-exynos/platsmp.c | |||
@@ -32,28 +32,6 @@ | |||
32 | 32 | ||
33 | extern void exynos4_secondary_startup(void); | 33 | extern void exynos4_secondary_startup(void); |
34 | 34 | ||
35 | void __iomem *sysram_base_addr; | ||
36 | void __iomem *sysram_ns_base_addr; | ||
37 | |||
38 | static void __init exynos_smp_prepare_sysram(void) | ||
39 | { | ||
40 | struct device_node *node; | ||
41 | |||
42 | for_each_compatible_node(node, NULL, "samsung,exynos4210-sysram") { | ||
43 | if (!of_device_is_available(node)) | ||
44 | continue; | ||
45 | sysram_base_addr = of_iomap(node, 0); | ||
46 | break; | ||
47 | } | ||
48 | |||
49 | for_each_compatible_node(node, NULL, "samsung,exynos4210-sysram-ns") { | ||
50 | if (!of_device_is_available(node)) | ||
51 | continue; | ||
52 | sysram_ns_base_addr = of_iomap(node, 0); | ||
53 | break; | ||
54 | } | ||
55 | } | ||
56 | |||
57 | static inline void __iomem *cpu_boot_reg_base(void) | 35 | static inline void __iomem *cpu_boot_reg_base(void) |
58 | { | 36 | { |
59 | if (soc_is_exynos4210() && samsung_rev() == EXYNOS4210_REV_1_1) | 37 | if (soc_is_exynos4210() && samsung_rev() == EXYNOS4210_REV_1_1) |
@@ -234,11 +212,11 @@ static void __init exynos_smp_prepare_cpus(unsigned int max_cpus) | |||
234 | { | 212 | { |
235 | int i; | 213 | int i; |
236 | 214 | ||
215 | exynos_sysram_init(); | ||
216 | |||
237 | if (read_cpuid_part_number() == ARM_CPU_PART_CORTEX_A9) | 217 | if (read_cpuid_part_number() == ARM_CPU_PART_CORTEX_A9) |
238 | scu_enable(scu_base_addr()); | 218 | scu_enable(scu_base_addr()); |
239 | 219 | ||
240 | exynos_smp_prepare_sysram(); | ||
241 | |||
242 | /* | 220 | /* |
243 | * Write the address of secondary startup into the | 221 | * Write the address of secondary startup into the |
244 | * system-wide flags register. The boot monitor waits | 222 | * system-wide flags register. The boot monitor waits |
diff --git a/arch/arm/mach-exynos/pm.c b/arch/arm/mach-exynos/pm.c index 87c0d34c7fba..202ca73e49c4 100644 --- a/arch/arm/mach-exynos/pm.c +++ b/arch/arm/mach-exynos/pm.c | |||
@@ -300,7 +300,7 @@ static int exynos_pm_suspend(void) | |||
300 | tmp = (S5P_USE_STANDBY_WFI0 | S5P_USE_STANDBY_WFE0); | 300 | tmp = (S5P_USE_STANDBY_WFI0 | S5P_USE_STANDBY_WFE0); |
301 | __raw_writel(tmp, S5P_CENTRAL_SEQ_OPTION); | 301 | __raw_writel(tmp, S5P_CENTRAL_SEQ_OPTION); |
302 | 302 | ||
303 | if (!soc_is_exynos5250()) | 303 | if (read_cpuid_part_number() == ARM_CPU_PART_CORTEX_A9) |
304 | exynos_cpu_save_register(); | 304 | exynos_cpu_save_register(); |
305 | 305 | ||
306 | return 0; | 306 | return 0; |
@@ -334,7 +334,7 @@ static void exynos_pm_resume(void) | |||
334 | if (exynos_pm_central_resume()) | 334 | if (exynos_pm_central_resume()) |
335 | goto early_wakeup; | 335 | goto early_wakeup; |
336 | 336 | ||
337 | if (!soc_is_exynos5250()) | 337 | if (read_cpuid_part_number() == ARM_CPU_PART_CORTEX_A9) |
338 | exynos_cpu_restore_register(); | 338 | exynos_cpu_restore_register(); |
339 | 339 | ||
340 | /* For release retention */ | 340 | /* For release retention */ |
@@ -353,7 +353,7 @@ static void exynos_pm_resume(void) | |||
353 | 353 | ||
354 | s3c_pm_do_restore_core(exynos_core_save, ARRAY_SIZE(exynos_core_save)); | 354 | s3c_pm_do_restore_core(exynos_core_save, ARRAY_SIZE(exynos_core_save)); |
355 | 355 | ||
356 | if (!soc_is_exynos5250()) | 356 | if (read_cpuid_part_number() == ARM_CPU_PART_CORTEX_A9) |
357 | scu_enable(S5P_VA_SCU); | 357 | scu_enable(S5P_VA_SCU); |
358 | 358 | ||
359 | early_wakeup: | 359 | early_wakeup: |
@@ -440,15 +440,18 @@ static int exynos_cpu_pm_notifier(struct notifier_block *self, | |||
440 | case CPU_PM_ENTER: | 440 | case CPU_PM_ENTER: |
441 | if (cpu == 0) { | 441 | if (cpu == 0) { |
442 | exynos_pm_central_suspend(); | 442 | exynos_pm_central_suspend(); |
443 | exynos_cpu_save_register(); | 443 | if (read_cpuid_part_number() == ARM_CPU_PART_CORTEX_A9) |
444 | exynos_cpu_save_register(); | ||
444 | } | 445 | } |
445 | break; | 446 | break; |
446 | 447 | ||
447 | case CPU_PM_EXIT: | 448 | case CPU_PM_EXIT: |
448 | if (cpu == 0) { | 449 | if (cpu == 0) { |
449 | if (!soc_is_exynos5250()) | 450 | if (read_cpuid_part_number() == |
451 | ARM_CPU_PART_CORTEX_A9) { | ||
450 | scu_enable(S5P_VA_SCU); | 452 | scu_enable(S5P_VA_SCU); |
451 | exynos_cpu_restore_register(); | 453 | exynos_cpu_restore_register(); |
454 | } | ||
452 | exynos_pm_central_resume(); | 455 | exynos_pm_central_resume(); |
453 | } | 456 | } |
454 | break; | 457 | break; |
diff --git a/arch/arm/mach-highbank/Kconfig b/arch/arm/mach-highbank/Kconfig index 830b76e70250..a5960e2ac090 100644 --- a/arch/arm/mach-highbank/Kconfig +++ b/arch/arm/mach-highbank/Kconfig | |||
@@ -1,7 +1,6 @@ | |||
1 | config ARCH_HIGHBANK | 1 | config ARCH_HIGHBANK |
2 | bool "Calxeda ECX-1000/2000 (Highbank/Midway)" if ARCH_MULTI_V7 | 2 | bool "Calxeda ECX-1000/2000 (Highbank/Midway)" if ARCH_MULTI_V7 |
3 | select ARCH_DMA_ADDR_T_64BIT if ARM_LPAE | 3 | select ARCH_DMA_ADDR_T_64BIT if ARM_LPAE |
4 | select ARCH_HAS_CPUFREQ | ||
5 | select ARCH_HAS_HOLES_MEMORYMODEL | 4 | select ARCH_HAS_HOLES_MEMORYMODEL |
6 | select ARCH_HAS_OPP | 5 | select ARCH_HAS_OPP |
7 | select ARCH_SUPPORTS_BIG_ENDIAN | 6 | select ARCH_SUPPORTS_BIG_ENDIAN |
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index 8d42eab76d53..2bc7b97861b4 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig | |||
@@ -1,6 +1,5 @@ | |||
1 | config ARCH_MXC | 1 | menuconfig ARCH_MXC |
2 | bool "Freescale i.MX family" if ARCH_MULTI_V4_V5 || ARCH_MULTI_V6_V7 | 2 | bool "Freescale i.MX family" if ARCH_MULTI_V4_V5 || ARCH_MULTI_V6_V7 |
3 | select ARCH_HAS_CPUFREQ | ||
4 | select ARCH_HAS_OPP | 3 | select ARCH_HAS_OPP |
5 | select ARCH_REQUIRE_GPIOLIB | 4 | select ARCH_REQUIRE_GPIOLIB |
6 | select ARM_CPU_SUSPEND if PM | 5 | select ARM_CPU_SUSPEND if PM |
@@ -13,8 +12,7 @@ config ARCH_MXC | |||
13 | help | 12 | help |
14 | Support for Freescale MXC/iMX-based family of processors | 13 | Support for Freescale MXC/iMX-based family of processors |
15 | 14 | ||
16 | menu "Freescale i.MX support" | 15 | if ARCH_MXC |
17 | depends on ARCH_MXC | ||
18 | 16 | ||
19 | config MXC_TZIC | 17 | config MXC_TZIC |
20 | bool | 18 | bool |
@@ -67,18 +65,8 @@ config IMX_HAVE_IOMUX_V1 | |||
67 | config ARCH_MXC_IOMUX_V3 | 65 | config ARCH_MXC_IOMUX_V3 |
68 | bool | 66 | bool |
69 | 67 | ||
70 | config ARCH_MX1 | ||
71 | bool | ||
72 | |||
73 | config ARCH_MX25 | ||
74 | bool | ||
75 | |||
76 | config MACH_MX27 | ||
77 | bool | ||
78 | |||
79 | config SOC_IMX1 | 68 | config SOC_IMX1 |
80 | bool | 69 | bool |
81 | select ARCH_MX1 | ||
82 | select CPU_ARM920T | 70 | select CPU_ARM920T |
83 | select IMX_HAVE_IOMUX_V1 | 71 | select IMX_HAVE_IOMUX_V1 |
84 | select MXC_AVIC | 72 | select MXC_AVIC |
@@ -91,7 +79,6 @@ config SOC_IMX21 | |||
91 | 79 | ||
92 | config SOC_IMX25 | 80 | config SOC_IMX25 |
93 | bool | 81 | bool |
94 | select ARCH_MX25 | ||
95 | select ARCH_MXC_IOMUX_V3 | 82 | select ARCH_MXC_IOMUX_V3 |
96 | select CPU_ARM926T | 83 | select CPU_ARM926T |
97 | select MXC_AVIC | 84 | select MXC_AVIC |
@@ -99,11 +86,9 @@ config SOC_IMX25 | |||
99 | 86 | ||
100 | config SOC_IMX27 | 87 | config SOC_IMX27 |
101 | bool | 88 | bool |
102 | select ARCH_HAS_CPUFREQ | ||
103 | select ARCH_HAS_OPP | 89 | select ARCH_HAS_OPP |
104 | select CPU_ARM926T | 90 | select CPU_ARM926T |
105 | select IMX_HAVE_IOMUX_V1 | 91 | select IMX_HAVE_IOMUX_V1 |
106 | select MACH_MX27 | ||
107 | select MXC_AVIC | 92 | select MXC_AVIC |
108 | select PINCTRL_IMX27 | 93 | select PINCTRL_IMX27 |
109 | 94 | ||
@@ -122,19 +107,6 @@ config SOC_IMX35 | |||
122 | select PINCTRL_IMX35 | 107 | select PINCTRL_IMX35 |
123 | select SMP_ON_UP if SMP | 108 | select SMP_ON_UP if SMP |
124 | 109 | ||
125 | config SOC_IMX5 | ||
126 | bool | ||
127 | select ARCH_HAS_CPUFREQ | ||
128 | select ARCH_HAS_OPP | ||
129 | select ARCH_MXC_IOMUX_V3 | ||
130 | select MXC_TZIC | ||
131 | |||
132 | config SOC_IMX51 | ||
133 | bool | ||
134 | select HAVE_IMX_SRC | ||
135 | select PINCTRL_IMX51 | ||
136 | select SOC_IMX5 | ||
137 | |||
138 | if ARCH_MULTI_V4T | 110 | if ARCH_MULTI_V4T |
139 | 111 | ||
140 | comment "MX1 platforms:" | 112 | comment "MX1 platforms:" |
@@ -370,15 +342,6 @@ config MACH_IMX27_VISSTRIM_M10 | |||
370 | This includes specific configurations for the board and its | 342 | This includes specific configurations for the board and its |
371 | peripherals. | 343 | peripherals. |
372 | 344 | ||
373 | config MACH_IMX27LITE | ||
374 | bool "LogicPD MX27 LITEKIT platform" | ||
375 | select IMX_HAVE_PLATFORM_IMX_SSI | ||
376 | select IMX_HAVE_PLATFORM_IMX_UART | ||
377 | select SOC_IMX27 | ||
378 | help | ||
379 | Include support for MX27 LITEKIT platform. This includes specific | ||
380 | configurations for the board and its peripherals. | ||
381 | |||
382 | config MACH_PCA100 | 345 | config MACH_PCA100 |
383 | bool "Phytec phyCARD-s (pca100)" | 346 | bool "Phytec phyCARD-s (pca100)" |
384 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC | 347 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC |
@@ -410,15 +373,6 @@ config MACH_MXT_TD60 | |||
410 | Include support for i-MXT (aka td60) platform. This | 373 | Include support for i-MXT (aka td60) platform. This |
411 | includes specific configurations for the module and its peripherals. | 374 | includes specific configurations for the module and its peripherals. |
412 | 375 | ||
413 | config MACH_IMX27IPCAM | ||
414 | bool "IMX27 IPCAM platform" | ||
415 | select IMX_HAVE_PLATFORM_IMX2_WDT | ||
416 | select IMX_HAVE_PLATFORM_IMX_UART | ||
417 | select SOC_IMX27 | ||
418 | help | ||
419 | Include support for IMX27 IPCAM platform. This includes specific | ||
420 | configurations for the board and its peripherals. | ||
421 | |||
422 | config MACH_IMX27_DT | 376 | config MACH_IMX27_DT |
423 | bool "Support i.MX27 platforms from device tree" | 377 | bool "Support i.MX27 platforms from device tree" |
424 | select SOC_IMX27 | 378 | select SOC_IMX27 |
@@ -704,24 +658,29 @@ if ARCH_MULTI_V7 | |||
704 | 658 | ||
705 | comment "Device tree only" | 659 | comment "Device tree only" |
706 | 660 | ||
661 | config SOC_IMX5 | ||
662 | bool | ||
663 | select ARCH_HAS_OPP | ||
664 | select HAVE_IMX_SRC | ||
665 | select MXC_TZIC | ||
666 | |||
707 | config SOC_IMX50 | 667 | config SOC_IMX50 |
708 | bool "i.MX50 support" | 668 | bool "i.MX50 support" |
709 | select HAVE_IMX_SRC | ||
710 | select PINCTRL_IMX50 | 669 | select PINCTRL_IMX50 |
711 | select SOC_IMX5 | 670 | select SOC_IMX5 |
712 | 671 | ||
713 | help | 672 | help |
714 | This enables support for Freescale i.MX50 processor. | 673 | This enables support for Freescale i.MX50 processor. |
715 | 674 | ||
716 | config MACH_IMX51_DT | 675 | config SOC_IMX51 |
717 | bool "i.MX51 support" | 676 | bool "i.MX51 support" |
718 | select SOC_IMX51 | 677 | select PINCTRL_IMX51 |
678 | select SOC_IMX5 | ||
719 | help | 679 | help |
720 | This enables support for Freescale i.MX51 processor | 680 | This enables support for Freescale i.MX51 processor |
721 | 681 | ||
722 | config SOC_IMX53 | 682 | config SOC_IMX53 |
723 | bool "i.MX53 support" | 683 | bool "i.MX53 support" |
724 | select HAVE_IMX_SRC | ||
725 | select PINCTRL_IMX53 | 684 | select PINCTRL_IMX53 |
726 | select SOC_IMX5 | 685 | select SOC_IMX5 |
727 | 686 | ||
@@ -738,9 +697,7 @@ config SOC_IMX6 | |||
738 | select HAVE_IMX_MMDC | 697 | select HAVE_IMX_MMDC |
739 | select HAVE_IMX_SRC | 698 | select HAVE_IMX_SRC |
740 | select MFD_SYSCON | 699 | select MFD_SYSCON |
741 | select PL310_ERRATA_588369 if CACHE_PL310 | 700 | select PL310_ERRATA_769419 if CACHE_L2X0 |
742 | select PL310_ERRATA_727915 if CACHE_PL310 | ||
743 | select PL310_ERRATA_769419 if CACHE_PL310 | ||
744 | 701 | ||
745 | config SOC_IMX6Q | 702 | config SOC_IMX6Q |
746 | bool "i.MX6 Quad/DualLite support" | 703 | bool "i.MX6 Quad/DualLite support" |
@@ -775,9 +732,7 @@ config SOC_VF610 | |||
775 | select ARM_GIC | 732 | select ARM_GIC |
776 | select PINCTRL_VF610 | 733 | select PINCTRL_VF610 |
777 | select VF_PIT_TIMER | 734 | select VF_PIT_TIMER |
778 | select PL310_ERRATA_588369 if CACHE_PL310 | 735 | select PL310_ERRATA_769419 if CACHE_L2X0 |
779 | select PL310_ERRATA_727915 if CACHE_PL310 | ||
780 | select PL310_ERRATA_769419 if CACHE_PL310 | ||
781 | 736 | ||
782 | help | 737 | help |
783 | This enable support for Freescale Vybrid VF610 processor. | 738 | This enable support for Freescale Vybrid VF610 processor. |
@@ -786,4 +741,4 @@ endif | |||
786 | 741 | ||
787 | source "arch/arm/mach-imx/devices/Kconfig" | 742 | source "arch/arm/mach-imx/devices/Kconfig" |
788 | 743 | ||
789 | endmenu | 744 | endif |
diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile index bbe93bbfd003..ac88599ca080 100644 --- a/arch/arm/mach-imx/Makefile +++ b/arch/arm/mach-imx/Makefile | |||
@@ -12,7 +12,7 @@ obj-$(CONFIG_SOC_IMX31) += mm-imx3.o cpu-imx31.o clk-imx31.o iomux-imx31.o ehci- | |||
12 | obj-$(CONFIG_SOC_IMX35) += mm-imx3.o cpu-imx35.o clk-imx35.o ehci-imx35.o pm-imx3.o | 12 | obj-$(CONFIG_SOC_IMX35) += mm-imx3.o cpu-imx35.o clk-imx35.o ehci-imx35.o pm-imx3.o |
13 | 13 | ||
14 | imx5-pm-$(CONFIG_PM) += pm-imx5.o | 14 | imx5-pm-$(CONFIG_PM) += pm-imx5.o |
15 | obj-$(CONFIG_SOC_IMX5) += cpu-imx5.o mm-imx5.o clk-imx51-imx53.o ehci-imx5.o $(imx5-pm-y) | 15 | obj-$(CONFIG_SOC_IMX5) += cpu-imx5.o clk-imx51-imx53.o $(imx5-pm-y) |
16 | 16 | ||
17 | obj-$(CONFIG_COMMON_CLK) += clk-pllv1.o clk-pllv2.o clk-pllv3.o clk-gate2.o \ | 17 | obj-$(CONFIG_COMMON_CLK) += clk-pllv1.o clk-pllv2.o clk-pllv3.o clk-gate2.o \ |
18 | clk-pfd.o clk-busy.o clk.o \ | 18 | clk-pfd.o clk-busy.o clk.o \ |
@@ -31,6 +31,8 @@ ifeq ($(CONFIG_CPU_IDLE),y) | |||
31 | obj-$(CONFIG_SOC_IMX5) += cpuidle-imx5.o | 31 | obj-$(CONFIG_SOC_IMX5) += cpuidle-imx5.o |
32 | obj-$(CONFIG_SOC_IMX6Q) += cpuidle-imx6q.o | 32 | obj-$(CONFIG_SOC_IMX6Q) += cpuidle-imx6q.o |
33 | obj-$(CONFIG_SOC_IMX6SL) += cpuidle-imx6sl.o | 33 | obj-$(CONFIG_SOC_IMX6SL) += cpuidle-imx6sl.o |
34 | # i.MX6SX reuses i.MX6Q cpuidle driver | ||
35 | obj-$(CONFIG_SOC_IMX6SX) += cpuidle-imx6q.o | ||
34 | endif | 36 | endif |
35 | 37 | ||
36 | ifdef CONFIG_SND_IMX_SOC | 38 | ifdef CONFIG_SND_IMX_SOC |
@@ -38,9 +40,6 @@ obj-y += ssi-fiq.o | |||
38 | obj-y += ssi-fiq-ksym.o | 40 | obj-y += ssi-fiq-ksym.o |
39 | endif | 41 | endif |
40 | 42 | ||
41 | # Support for CMOS sensor interface | ||
42 | obj-$(CONFIG_MX1_VIDEO) += mx1-camera-fiq.o mx1-camera-fiq-ksym.o | ||
43 | |||
44 | # i.MX1 based machines | 43 | # i.MX1 based machines |
45 | obj-$(CONFIG_ARCH_MX1ADS) += mach-mx1ads.o | 44 | obj-$(CONFIG_ARCH_MX1ADS) += mach-mx1ads.o |
46 | obj-$(CONFIG_MACH_SCB9328) += mach-scb9328.o | 45 | obj-$(CONFIG_MACH_SCB9328) += mach-scb9328.o |
@@ -60,13 +59,11 @@ obj-$(CONFIG_MACH_MX27ADS) += mach-mx27ads.o | |||
60 | obj-$(CONFIG_MACH_PCM038) += mach-pcm038.o | 59 | obj-$(CONFIG_MACH_PCM038) += mach-pcm038.o |
61 | obj-$(CONFIG_MACH_PCM970_BASEBOARD) += pcm970-baseboard.o | 60 | obj-$(CONFIG_MACH_PCM970_BASEBOARD) += pcm970-baseboard.o |
62 | obj-$(CONFIG_MACH_MX27_3DS) += mach-mx27_3ds.o | 61 | obj-$(CONFIG_MACH_MX27_3DS) += mach-mx27_3ds.o |
63 | obj-$(CONFIG_MACH_IMX27LITE) += mach-imx27lite.o | ||
64 | obj-$(CONFIG_MACH_IMX27_VISSTRIM_M10) += mach-imx27_visstrim_m10.o | 62 | obj-$(CONFIG_MACH_IMX27_VISSTRIM_M10) += mach-imx27_visstrim_m10.o |
65 | obj-$(CONFIG_MACH_CPUIMX27) += mach-cpuimx27.o | 63 | obj-$(CONFIG_MACH_CPUIMX27) += mach-cpuimx27.o |
66 | obj-$(CONFIG_MACH_EUKREA_MBIMX27_BASEBOARD) += eukrea_mbimx27-baseboard.o | 64 | obj-$(CONFIG_MACH_EUKREA_MBIMX27_BASEBOARD) += eukrea_mbimx27-baseboard.o |
67 | obj-$(CONFIG_MACH_PCA100) += mach-pca100.o | 65 | obj-$(CONFIG_MACH_PCA100) += mach-pca100.o |
68 | obj-$(CONFIG_MACH_MXT_TD60) += mach-mxt_td60.o | 66 | obj-$(CONFIG_MACH_MXT_TD60) += mach-mxt_td60.o |
69 | obj-$(CONFIG_MACH_IMX27IPCAM) += mach-imx27ipcam.o | ||
70 | obj-$(CONFIG_MACH_IMX27_DT) += imx27-dt.o | 67 | obj-$(CONFIG_MACH_IMX27_DT) += imx27-dt.o |
71 | 68 | ||
72 | # i.MX31 based machines | 69 | # i.MX31 based machines |
@@ -109,8 +106,8 @@ obj-$(CONFIG_SOC_IMX6) += suspend-imx6.o | |||
109 | endif | 106 | endif |
110 | obj-$(CONFIG_SOC_IMX6) += pm-imx6.o | 107 | obj-$(CONFIG_SOC_IMX6) += pm-imx6.o |
111 | 108 | ||
112 | obj-$(CONFIG_MACH_IMX51_DT) += imx51-dt.o | ||
113 | obj-$(CONFIG_SOC_IMX50) += mach-imx50.o | 109 | obj-$(CONFIG_SOC_IMX50) += mach-imx50.o |
110 | obj-$(CONFIG_SOC_IMX51) += mach-imx51.o | ||
114 | obj-$(CONFIG_SOC_IMX53) += mach-imx53.o | 111 | obj-$(CONFIG_SOC_IMX53) += mach-imx53.o |
115 | 112 | ||
116 | obj-$(CONFIG_SOC_VF610) += clk-vf610.o mach-vf610.o | 113 | obj-$(CONFIG_SOC_VF610) += clk-vf610.o mach-vf610.o |
diff --git a/arch/arm/mach-imx/clk-imx1.c b/arch/arm/mach-imx/clk-imx1.c index 7f739be3de2c..37c307a8d896 100644 --- a/arch/arm/mach-imx/clk-imx1.c +++ b/arch/arm/mach-imx/clk-imx1.c | |||
@@ -15,100 +15,103 @@ | |||
15 | * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. | 15 | * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include <linux/kernel.h> | ||
19 | #include <linux/init.h> | ||
20 | #include <linux/clk.h> | 18 | #include <linux/clk.h> |
21 | #include <linux/io.h> | ||
22 | #include <linux/clkdev.h> | 19 | #include <linux/clkdev.h> |
20 | #include <linux/clk-provider.h> | ||
23 | #include <linux/err.h> | 21 | #include <linux/err.h> |
22 | #include <linux/init.h> | ||
23 | #include <linux/of.h> | ||
24 | #include <linux/of_address.h> | ||
25 | #include <dt-bindings/clock/imx1-clock.h> | ||
24 | 26 | ||
25 | #include "clk.h" | 27 | #include "clk.h" |
26 | #include "common.h" | 28 | #include "common.h" |
27 | #include "hardware.h" | 29 | #include "hardware.h" |
28 | 30 | ||
29 | /* CCM register addresses */ | ||
30 | #define IO_ADDR_CCM(off) (MX1_IO_ADDRESS(MX1_CCM_BASE_ADDR + (off))) | ||
31 | |||
32 | #define CCM_CSCR IO_ADDR_CCM(0x0) | ||
33 | #define CCM_MPCTL0 IO_ADDR_CCM(0x4) | ||
34 | #define CCM_SPCTL0 IO_ADDR_CCM(0xc) | ||
35 | #define CCM_PCDR IO_ADDR_CCM(0x20) | ||
36 | |||
37 | /* SCM register addresses */ | ||
38 | #define IO_ADDR_SCM(off) (MX1_IO_ADDRESS(MX1_SCM_BASE_ADDR + (off))) | ||
39 | |||
40 | #define SCM_GCCR IO_ADDR_SCM(0xc) | ||
41 | |||
42 | static const char *prem_sel_clks[] = { "clk32_premult", "clk16m", }; | 31 | static const char *prem_sel_clks[] = { "clk32_premult", "clk16m", }; |
43 | static const char *clko_sel_clks[] = { "per1", "hclk", "clk48m", "clk16m", | 32 | static const char *clko_sel_clks[] = { "per1", "hclk", "clk48m", "clk16m", |
44 | "prem", "fclk", }; | 33 | "prem", "fclk", }; |
45 | 34 | ||
46 | enum imx1_clks { | 35 | static struct clk *clk[IMX1_CLK_MAX]; |
47 | dummy, clk32, clk16m_ext, clk16m, clk32_premult, prem, mpll, mpll_gate, | 36 | static struct clk_onecell_data clk_data; |
48 | spll, spll_gate, mcu, fclk, hclk, clk48m, per1, per2, per3, clko, | ||
49 | uart3_gate, ssi2_gate, brom_gate, dma_gate, csi_gate, mma_gate, | ||
50 | usbd_gate, clk_max | ||
51 | }; | ||
52 | 37 | ||
53 | static struct clk *clk[clk_max]; | 38 | static void __iomem *ccm __initdata; |
39 | #define CCM_CSCR (ccm + 0x0000) | ||
40 | #define CCM_MPCTL0 (ccm + 0x0004) | ||
41 | #define CCM_SPCTL0 (ccm + 0x000c) | ||
42 | #define CCM_PCDR (ccm + 0x0020) | ||
43 | #define SCM_GCCR (ccm + 0x0810) | ||
54 | 44 | ||
55 | int __init mx1_clocks_init(unsigned long fref) | 45 | static void __init _mx1_clocks_init(unsigned long fref) |
56 | { | 46 | { |
57 | int i; | 47 | clk[IMX1_CLK_DUMMY] = imx_clk_fixed("dummy", 0); |
48 | clk[IMX1_CLK_CLK32] = imx_obtain_fixed_clock("clk32", fref); | ||
49 | clk[IMX1_CLK_CLK16M_EXT] = imx_clk_fixed("clk16m_ext", 16000000); | ||
50 | clk[IMX1_CLK_CLK16M] = imx_clk_gate("clk16m", "clk16m_ext", CCM_CSCR, 17); | ||
51 | clk[IMX1_CLK_CLK32_PREMULT] = imx_clk_fixed_factor("clk32_premult", "clk32", 512, 1); | ||
52 | clk[IMX1_CLK_PREM] = imx_clk_mux("prem", CCM_CSCR, 16, 1, prem_sel_clks, ARRAY_SIZE(prem_sel_clks)); | ||
53 | clk[IMX1_CLK_MPLL] = imx_clk_pllv1("mpll", "clk32_premult", CCM_MPCTL0); | ||
54 | clk[IMX1_CLK_MPLL_GATE] = imx_clk_gate("mpll_gate", "mpll", CCM_CSCR, 0); | ||
55 | clk[IMX1_CLK_SPLL] = imx_clk_pllv1("spll", "prem", CCM_SPCTL0); | ||
56 | clk[IMX1_CLK_SPLL_GATE] = imx_clk_gate("spll_gate", "spll", CCM_CSCR, 1); | ||
57 | clk[IMX1_CLK_MCU] = imx_clk_divider("mcu", "clk32_premult", CCM_CSCR, 15, 1); | ||
58 | clk[IMX1_CLK_FCLK] = imx_clk_divider("fclk", "mpll_gate", CCM_CSCR, 15, 1); | ||
59 | clk[IMX1_CLK_HCLK] = imx_clk_divider("hclk", "spll_gate", CCM_CSCR, 10, 4); | ||
60 | clk[IMX1_CLK_CLK48M] = imx_clk_divider("clk48m", "spll_gate", CCM_CSCR, 26, 3); | ||
61 | clk[IMX1_CLK_PER1] = imx_clk_divider("per1", "spll_gate", CCM_PCDR, 0, 4); | ||
62 | clk[IMX1_CLK_PER2] = imx_clk_divider("per2", "spll_gate", CCM_PCDR, 4, 4); | ||
63 | clk[IMX1_CLK_PER3] = imx_clk_divider("per3", "spll_gate", CCM_PCDR, 16, 7); | ||
64 | clk[IMX1_CLK_CLKO] = imx_clk_mux("clko", CCM_CSCR, 29, 3, clko_sel_clks, ARRAY_SIZE(clko_sel_clks)); | ||
65 | clk[IMX1_CLK_UART3_GATE] = imx_clk_gate("uart3_gate", "hclk", SCM_GCCR, 6); | ||
66 | clk[IMX1_CLK_SSI2_GATE] = imx_clk_gate("ssi2_gate", "hclk", SCM_GCCR, 5); | ||
67 | clk[IMX1_CLK_BROM_GATE] = imx_clk_gate("brom_gate", "hclk", SCM_GCCR, 4); | ||
68 | clk[IMX1_CLK_DMA_GATE] = imx_clk_gate("dma_gate", "hclk", SCM_GCCR, 3); | ||
69 | clk[IMX1_CLK_CSI_GATE] = imx_clk_gate("csi_gate", "hclk", SCM_GCCR, 2); | ||
70 | clk[IMX1_CLK_MMA_GATE] = imx_clk_gate("mma_gate", "hclk", SCM_GCCR, 1); | ||
71 | clk[IMX1_CLK_USBD_GATE] = imx_clk_gate("usbd_gate", "clk48m", SCM_GCCR, 0); | ||
72 | |||
73 | imx_check_clocks(clk, ARRAY_SIZE(clk)); | ||
74 | } | ||
58 | 75 | ||
59 | clk[dummy] = imx_clk_fixed("dummy", 0); | 76 | int __init mx1_clocks_init(unsigned long fref) |
60 | clk[clk32] = imx_clk_fixed("clk32", fref); | 77 | { |
61 | clk[clk16m_ext] = imx_clk_fixed("clk16m_ext", 16000000); | 78 | ccm = MX1_IO_ADDRESS(MX1_CCM_BASE_ADDR); |
62 | clk[clk16m] = imx_clk_gate("clk16m", "clk16m_ext", CCM_CSCR, 17); | ||
63 | clk[clk32_premult] = imx_clk_fixed_factor("clk32_premult", "clk32", 512, 1); | ||
64 | clk[prem] = imx_clk_mux("prem", CCM_CSCR, 16, 1, prem_sel_clks, | ||
65 | ARRAY_SIZE(prem_sel_clks)); | ||
66 | clk[mpll] = imx_clk_pllv1("mpll", "clk32_premult", CCM_MPCTL0); | ||
67 | clk[mpll_gate] = imx_clk_gate("mpll_gate", "mpll", CCM_CSCR, 0); | ||
68 | clk[spll] = imx_clk_pllv1("spll", "prem", CCM_SPCTL0); | ||
69 | clk[spll_gate] = imx_clk_gate("spll_gate", "spll", CCM_CSCR, 1); | ||
70 | clk[mcu] = imx_clk_divider("mcu", "clk32_premult", CCM_CSCR, 15, 1); | ||
71 | clk[fclk] = imx_clk_divider("fclk", "mpll_gate", CCM_CSCR, 15, 1); | ||
72 | clk[hclk] = imx_clk_divider("hclk", "spll_gate", CCM_CSCR, 10, 4); | ||
73 | clk[clk48m] = imx_clk_divider("clk48m", "spll_gate", CCM_CSCR, 26, 3); | ||
74 | clk[per1] = imx_clk_divider("per1", "spll_gate", CCM_PCDR, 0, 4); | ||
75 | clk[per2] = imx_clk_divider("per2", "spll_gate", CCM_PCDR, 4, 4); | ||
76 | clk[per3] = imx_clk_divider("per3", "spll_gate", CCM_PCDR, 16, 7); | ||
77 | clk[clko] = imx_clk_mux("clko", CCM_CSCR, 29, 3, clko_sel_clks, | ||
78 | ARRAY_SIZE(clko_sel_clks)); | ||
79 | clk[uart3_gate] = imx_clk_gate("uart3_gate", "hclk", SCM_GCCR, 6); | ||
80 | clk[ssi2_gate] = imx_clk_gate("ssi2_gate", "hclk", SCM_GCCR, 5); | ||
81 | clk[brom_gate] = imx_clk_gate("brom_gate", "hclk", SCM_GCCR, 4); | ||
82 | clk[dma_gate] = imx_clk_gate("dma_gate", "hclk", SCM_GCCR, 3); | ||
83 | clk[csi_gate] = imx_clk_gate("csi_gate", "hclk", SCM_GCCR, 2); | ||
84 | clk[mma_gate] = imx_clk_gate("mma_gate", "hclk", SCM_GCCR, 1); | ||
85 | clk[usbd_gate] = imx_clk_gate("usbd_gate", "clk48m", SCM_GCCR, 0); | ||
86 | 79 | ||
87 | for (i = 0; i < ARRAY_SIZE(clk); i++) | 80 | _mx1_clocks_init(fref); |
88 | if (IS_ERR(clk[i])) | ||
89 | pr_err("imx1 clk %d: register failed with %ld\n", | ||
90 | i, PTR_ERR(clk[i])); | ||
91 | 81 | ||
92 | clk_register_clkdev(clk[dma_gate], "ahb", "imx1-dma"); | 82 | clk_register_clkdev(clk[IMX1_CLK_PER1], "per", "imx-gpt.0"); |
93 | clk_register_clkdev(clk[hclk], "ipg", "imx1-dma"); | 83 | clk_register_clkdev(clk[IMX1_CLK_HCLK], "ipg", "imx-gpt.0"); |
94 | clk_register_clkdev(clk[per1], "per", "imx-gpt.0"); | 84 | clk_register_clkdev(clk[IMX1_CLK_DMA_GATE], "ahb", "imx1-dma"); |
95 | clk_register_clkdev(clk[hclk], "ipg", "imx-gpt.0"); | 85 | clk_register_clkdev(clk[IMX1_CLK_HCLK], "ipg", "imx1-dma"); |
96 | clk_register_clkdev(clk[per1], "per", "imx1-uart.0"); | 86 | clk_register_clkdev(clk[IMX1_CLK_PER1], "per", "imx1-uart.0"); |
97 | clk_register_clkdev(clk[hclk], "ipg", "imx1-uart.0"); | 87 | clk_register_clkdev(clk[IMX1_CLK_HCLK], "ipg", "imx1-uart.0"); |
98 | clk_register_clkdev(clk[per1], "per", "imx1-uart.1"); | 88 | clk_register_clkdev(clk[IMX1_CLK_PER1], "per", "imx1-uart.1"); |
99 | clk_register_clkdev(clk[hclk], "ipg", "imx1-uart.1"); | 89 | clk_register_clkdev(clk[IMX1_CLK_HCLK], "ipg", "imx1-uart.1"); |
100 | clk_register_clkdev(clk[per1], "per", "imx1-uart.2"); | 90 | clk_register_clkdev(clk[IMX1_CLK_PER1], "per", "imx1-uart.2"); |
101 | clk_register_clkdev(clk[uart3_gate], "ipg", "imx1-uart.2"); | 91 | clk_register_clkdev(clk[IMX1_CLK_UART3_GATE], "ipg", "imx1-uart.2"); |
102 | clk_register_clkdev(clk[hclk], NULL, "imx1-i2c.0"); | 92 | clk_register_clkdev(clk[IMX1_CLK_HCLK], NULL, "imx1-i2c.0"); |
103 | clk_register_clkdev(clk[per2], "per", "imx1-cspi.0"); | 93 | clk_register_clkdev(clk[IMX1_CLK_PER2], "per", "imx1-cspi.0"); |
104 | clk_register_clkdev(clk[dummy], "ipg", "imx1-cspi.0"); | 94 | clk_register_clkdev(clk[IMX1_CLK_DUMMY], "ipg", "imx1-cspi.0"); |
105 | clk_register_clkdev(clk[per2], "per", "imx1-cspi.1"); | 95 | clk_register_clkdev(clk[IMX1_CLK_PER2], "per", "imx1-cspi.1"); |
106 | clk_register_clkdev(clk[dummy], "ipg", "imx1-cspi.1"); | 96 | clk_register_clkdev(clk[IMX1_CLK_DUMMY], "ipg", "imx1-cspi.1"); |
107 | clk_register_clkdev(clk[per2], "per", "imx1-fb.0"); | 97 | clk_register_clkdev(clk[IMX1_CLK_PER2], "per", "imx1-fb.0"); |
108 | clk_register_clkdev(clk[dummy], "ipg", "imx1-fb.0"); | 98 | clk_register_clkdev(clk[IMX1_CLK_DUMMY], "ipg", "imx1-fb.0"); |
109 | clk_register_clkdev(clk[dummy], "ahb", "imx1-fb.0"); | 99 | clk_register_clkdev(clk[IMX1_CLK_DUMMY], "ahb", "imx1-fb.0"); |
110 | 100 | ||
111 | mxc_timer_init(MX1_IO_ADDRESS(MX1_TIM1_BASE_ADDR), MX1_TIM1_INT); | 101 | mxc_timer_init(MX1_IO_ADDRESS(MX1_TIM1_BASE_ADDR), MX1_TIM1_INT); |
112 | 102 | ||
113 | return 0; | 103 | return 0; |
114 | } | 104 | } |
105 | |||
106 | static void __init mx1_clocks_init_dt(struct device_node *np) | ||
107 | { | ||
108 | ccm = of_iomap(np, 0); | ||
109 | BUG_ON(!ccm); | ||
110 | |||
111 | _mx1_clocks_init(32768); | ||
112 | |||
113 | clk_data.clks = clk; | ||
114 | clk_data.clk_num = ARRAY_SIZE(clk); | ||
115 | of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data); | ||
116 | } | ||
117 | CLK_OF_DECLARE(imx1_ccm, "fsl,imx1-ccm", mx1_clocks_init_dt); | ||
diff --git a/arch/arm/mach-imx/clk-imx21.c b/arch/arm/mach-imx/clk-imx21.c index bdc2e4630a08..4b4c75339aa6 100644 --- a/arch/arm/mach-imx/clk-imx21.c +++ b/arch/arm/mach-imx/clk-imx21.c | |||
@@ -7,178 +7,165 @@ | |||
7 | * modify it under the terms of the GNU General Public License | 7 | * modify it under the terms of the GNU General Public License |
8 | * as published by the Free Software Foundation; either version 2 | 8 | * as published by the Free Software Foundation; either version 2 |
9 | * of the License, or (at your option) any later version. | 9 | * of the License, or (at your option) any later version. |
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
18 | * MA 02110-1301, USA. | ||
19 | */ | 10 | */ |
20 | 11 | ||
21 | #include <linux/clk.h> | 12 | #include <linux/clk.h> |
22 | #include <linux/clkdev.h> | ||
23 | #include <linux/clk-provider.h> | 13 | #include <linux/clk-provider.h> |
24 | #include <linux/io.h> | 14 | #include <linux/clkdev.h> |
25 | #include <linux/module.h> | 15 | #include <linux/of.h> |
26 | #include <linux/err.h> | 16 | #include <linux/of_address.h> |
17 | #include <dt-bindings/clock/imx21-clock.h> | ||
27 | 18 | ||
28 | #include "clk.h" | 19 | #include "clk.h" |
29 | #include "common.h" | 20 | #include "common.h" |
30 | #include "hardware.h" | 21 | #include "hardware.h" |
31 | 22 | ||
32 | #define IO_ADDR_CCM(off) (MX21_IO_ADDRESS(MX21_CCM_BASE_ADDR + (off))) | 23 | static void __iomem *ccm __initdata; |
33 | 24 | ||
34 | /* Register offsets */ | 25 | /* Register offsets */ |
35 | #define CCM_CSCR IO_ADDR_CCM(0x0) | 26 | #define CCM_CSCR (ccm + 0x00) |
36 | #define CCM_MPCTL0 IO_ADDR_CCM(0x4) | 27 | #define CCM_MPCTL0 (ccm + 0x04) |
37 | #define CCM_MPCTL1 IO_ADDR_CCM(0x8) | 28 | #define CCM_SPCTL0 (ccm + 0x0c) |
38 | #define CCM_SPCTL0 IO_ADDR_CCM(0xc) | 29 | #define CCM_PCDR0 (ccm + 0x18) |
39 | #define CCM_SPCTL1 IO_ADDR_CCM(0x10) | 30 | #define CCM_PCDR1 (ccm + 0x1c) |
40 | #define CCM_OSC26MCTL IO_ADDR_CCM(0x14) | 31 | #define CCM_PCCR0 (ccm + 0x20) |
41 | #define CCM_PCDR0 IO_ADDR_CCM(0x18) | 32 | #define CCM_PCCR1 (ccm + 0x24) |
42 | #define CCM_PCDR1 IO_ADDR_CCM(0x1c) | 33 | |
43 | #define CCM_PCCR0 IO_ADDR_CCM(0x20) | 34 | static const char *mpll_osc_sel_clks[] = { "ckih_gate", "ckih_div1p5", }; |
44 | #define CCM_PCCR1 IO_ADDR_CCM(0x24) | 35 | static const char *mpll_sel_clks[] = { "fpm_gate", "mpll_osc_sel", }; |
45 | #define CCM_CCSR IO_ADDR_CCM(0x28) | 36 | static const char *spll_sel_clks[] = { "fpm_gate", "mpll_osc_sel", }; |
46 | #define CCM_PMCTL IO_ADDR_CCM(0x2c) | 37 | static const char *ssi_sel_clks[] = { "spll_gate", "mpll_gate", }; |
47 | #define CCM_PMCOUNT IO_ADDR_CCM(0x30) | 38 | |
48 | #define CCM_WKGDCTL IO_ADDR_CCM(0x34) | 39 | static struct clk *clk[IMX21_CLK_MAX]; |
49 | 40 | static struct clk_onecell_data clk_data; | |
50 | static const char *mpll_sel_clks[] = { "fpm", "ckih", }; | 41 | |
51 | static const char *spll_sel_clks[] = { "fpm", "ckih", }; | 42 | static void __init _mx21_clocks_init(unsigned long lref, unsigned long href) |
52 | 43 | { | |
53 | enum imx21_clks { | 44 | BUG_ON(!ccm); |
54 | ckil, ckih, fpm, mpll_sel, spll_sel, mpll, spll, fclk, hclk, ipg, per1, | 45 | |
55 | per2, per3, per4, uart1_ipg_gate, uart2_ipg_gate, uart3_ipg_gate, | 46 | clk[IMX21_CLK_DUMMY] = imx_clk_fixed("dummy", 0); |
56 | uart4_ipg_gate, gpt1_ipg_gate, gpt2_ipg_gate, gpt3_ipg_gate, | 47 | clk[IMX21_CLK_CKIL] = imx_obtain_fixed_clock("ckil", lref); |
57 | pwm_ipg_gate, sdhc1_ipg_gate, sdhc2_ipg_gate, lcdc_ipg_gate, | 48 | clk[IMX21_CLK_CKIH] = imx_obtain_fixed_clock("ckih", href); |
58 | lcdc_hclk_gate, cspi3_ipg_gate, cspi2_ipg_gate, cspi1_ipg_gate, | 49 | clk[IMX21_CLK_FPM] = imx_clk_fixed_factor("fpm", "ckil", 512, 1); |
59 | per4_gate, csi_hclk_gate, usb_div, usb_gate, usb_hclk_gate, ssi1_gate, | 50 | clk[IMX21_CLK_CKIH_DIV1P5] = imx_clk_fixed_factor("ckih_div1p5", "ckih_gate", 2, 3); |
60 | ssi2_gate, nfc_div, nfc_gate, dma_gate, dma_hclk_gate, brom_gate, | 51 | |
61 | emma_gate, emma_hclk_gate, slcdc_gate, slcdc_hclk_gate, wdog_gate, | 52 | clk[IMX21_CLK_MPLL_GATE] = imx_clk_gate("mpll_gate", "mpll", CCM_CSCR, 0); |
62 | gpio_gate, i2c_gate, kpp_gate, owire_gate, rtc_gate, clk_max | 53 | clk[IMX21_CLK_SPLL_GATE] = imx_clk_gate("spll_gate", "spll", CCM_CSCR, 1); |
63 | }; | 54 | clk[IMX21_CLK_FPM_GATE] = imx_clk_gate("fpm_gate", "fpm", CCM_CSCR, 2); |
64 | 55 | clk[IMX21_CLK_CKIH_GATE] = imx_clk_gate_dis("ckih_gate", "ckih", CCM_CSCR, 3); | |
65 | static struct clk *clk[clk_max]; | 56 | clk[IMX21_CLK_MPLL_OSC_SEL] = imx_clk_mux("mpll_osc_sel", CCM_CSCR, 4, 1, mpll_osc_sel_clks, ARRAY_SIZE(mpll_osc_sel_clks)); |
57 | clk[IMX21_CLK_IPG] = imx_clk_divider("ipg", "hclk", CCM_CSCR, 9, 1); | ||
58 | clk[IMX21_CLK_HCLK] = imx_clk_divider("hclk", "fclk", CCM_CSCR, 10, 4); | ||
59 | clk[IMX21_CLK_MPLL_SEL] = imx_clk_mux("mpll_sel", CCM_CSCR, 16, 1, mpll_sel_clks, ARRAY_SIZE(mpll_sel_clks)); | ||
60 | clk[IMX21_CLK_SPLL_SEL] = imx_clk_mux("spll_sel", CCM_CSCR, 17, 1, spll_sel_clks, ARRAY_SIZE(spll_sel_clks)); | ||
61 | clk[IMX21_CLK_SSI1_SEL] = imx_clk_mux("ssi1_sel", CCM_CSCR, 19, 1, ssi_sel_clks, ARRAY_SIZE(ssi_sel_clks)); | ||
62 | clk[IMX21_CLK_SSI2_SEL] = imx_clk_mux("ssi2_sel", CCM_CSCR, 20, 1, ssi_sel_clks, ARRAY_SIZE(ssi_sel_clks)); | ||
63 | clk[IMX21_CLK_USB_DIV] = imx_clk_divider("usb_div", "spll_gate", CCM_CSCR, 26, 3); | ||
64 | clk[IMX21_CLK_FCLK] = imx_clk_divider("fclk", "mpll_gate", CCM_CSCR, 29, 3); | ||
65 | |||
66 | clk[IMX21_CLK_MPLL] = imx_clk_pllv1("mpll", "mpll_sel", CCM_MPCTL0); | ||
67 | |||
68 | clk[IMX21_CLK_SPLL] = imx_clk_pllv1("spll", "spll_sel", CCM_SPCTL0); | ||
69 | |||
70 | clk[IMX21_CLK_NFC_DIV] = imx_clk_divider("nfc_div", "fclk", CCM_PCDR0, 12, 4); | ||
71 | clk[IMX21_CLK_SSI1_DIV] = imx_clk_divider("ssi1_div", "ssi1_sel", CCM_PCDR0, 16, 6); | ||
72 | clk[IMX21_CLK_SSI2_DIV] = imx_clk_divider("ssi2_div", "ssi2_sel", CCM_PCDR0, 26, 6); | ||
73 | |||
74 | clk[IMX21_CLK_PER1] = imx_clk_divider("per1", "mpll_gate", CCM_PCDR1, 0, 6); | ||
75 | clk[IMX21_CLK_PER2] = imx_clk_divider("per2", "mpll_gate", CCM_PCDR1, 8, 6); | ||
76 | clk[IMX21_CLK_PER3] = imx_clk_divider("per3", "mpll_gate", CCM_PCDR1, 16, 6); | ||
77 | clk[IMX21_CLK_PER4] = imx_clk_divider("per4", "mpll_gate", CCM_PCDR1, 24, 6); | ||
78 | |||
79 | clk[IMX21_CLK_UART1_IPG_GATE] = imx_clk_gate("uart1_ipg_gate", "ipg", CCM_PCCR0, 0); | ||
80 | clk[IMX21_CLK_UART2_IPG_GATE] = imx_clk_gate("uart2_ipg_gate", "ipg", CCM_PCCR0, 1); | ||
81 | clk[IMX21_CLK_UART3_IPG_GATE] = imx_clk_gate("uart3_ipg_gate", "ipg", CCM_PCCR0, 2); | ||
82 | clk[IMX21_CLK_UART4_IPG_GATE] = imx_clk_gate("uart4_ipg_gate", "ipg", CCM_PCCR0, 3); | ||
83 | clk[IMX21_CLK_CSPI1_IPG_GATE] = imx_clk_gate("cspi1_ipg_gate", "ipg", CCM_PCCR0, 4); | ||
84 | clk[IMX21_CLK_CSPI2_IPG_GATE] = imx_clk_gate("cspi2_ipg_gate", "ipg", CCM_PCCR0, 5); | ||
85 | clk[IMX21_CLK_SSI1_GATE] = imx_clk_gate("ssi1_gate", "ipg", CCM_PCCR0, 6); | ||
86 | clk[IMX21_CLK_SSI2_GATE] = imx_clk_gate("ssi2_gate", "ipg", CCM_PCCR0, 7); | ||
87 | clk[IMX21_CLK_SDHC1_IPG_GATE] = imx_clk_gate("sdhc1_ipg_gate", "ipg", CCM_PCCR0, 9); | ||
88 | clk[IMX21_CLK_SDHC2_IPG_GATE] = imx_clk_gate("sdhc2_ipg_gate", "ipg", CCM_PCCR0, 10); | ||
89 | clk[IMX21_CLK_GPIO_GATE] = imx_clk_gate("gpio_gate", "ipg", CCM_PCCR0, 11); | ||
90 | clk[IMX21_CLK_I2C_GATE] = imx_clk_gate("i2c_gate", "ipg", CCM_PCCR0, 12); | ||
91 | clk[IMX21_CLK_DMA_GATE] = imx_clk_gate("dma_gate", "ipg", CCM_PCCR0, 13); | ||
92 | clk[IMX21_CLK_USB_GATE] = imx_clk_gate("usb_gate", "usb_div", CCM_PCCR0, 14); | ||
93 | clk[IMX21_CLK_EMMA_GATE] = imx_clk_gate("emma_gate", "ipg", CCM_PCCR0, 15); | ||
94 | clk[IMX21_CLK_SSI2_BAUD_GATE] = imx_clk_gate("ssi2_baud_gate", "ipg", CCM_PCCR0, 16); | ||
95 | clk[IMX21_CLK_SSI1_BAUD_GATE] = imx_clk_gate("ssi1_baud_gate", "ipg", CCM_PCCR0, 17); | ||
96 | clk[IMX21_CLK_LCDC_IPG_GATE] = imx_clk_gate("lcdc_ipg_gate", "ipg", CCM_PCCR0, 18); | ||
97 | clk[IMX21_CLK_NFC_GATE] = imx_clk_gate("nfc_gate", "nfc_div", CCM_PCCR0, 19); | ||
98 | clk[IMX21_CLK_SLCDC_HCLK_GATE] = imx_clk_gate("slcdc_hclk_gate", "hclk", CCM_PCCR0, 21); | ||
99 | clk[IMX21_CLK_PER4_GATE] = imx_clk_gate("per4_gate", "per4", CCM_PCCR0, 22); | ||
100 | clk[IMX21_CLK_BMI_GATE] = imx_clk_gate("bmi_gate", "hclk", CCM_PCCR0, 23); | ||
101 | clk[IMX21_CLK_USB_HCLK_GATE] = imx_clk_gate("usb_hclk_gate", "hclk", CCM_PCCR0, 24); | ||
102 | clk[IMX21_CLK_SLCDC_GATE] = imx_clk_gate("slcdc_gate", "hclk", CCM_PCCR0, 25); | ||
103 | clk[IMX21_CLK_LCDC_HCLK_GATE] = imx_clk_gate("lcdc_hclk_gate", "hclk", CCM_PCCR0, 26); | ||
104 | clk[IMX21_CLK_EMMA_HCLK_GATE] = imx_clk_gate("emma_hclk_gate", "hclk", CCM_PCCR0, 27); | ||
105 | clk[IMX21_CLK_BROM_GATE] = imx_clk_gate("brom_gate", "hclk", CCM_PCCR0, 28); | ||
106 | clk[IMX21_CLK_DMA_HCLK_GATE] = imx_clk_gate("dma_hclk_gate", "hclk", CCM_PCCR0, 30); | ||
107 | clk[IMX21_CLK_CSI_HCLK_GATE] = imx_clk_gate("csi_hclk_gate", "hclk", CCM_PCCR0, 31); | ||
108 | |||
109 | clk[IMX21_CLK_CSPI3_IPG_GATE] = imx_clk_gate("cspi3_ipg_gate", "ipg", CCM_PCCR1, 23); | ||
110 | clk[IMX21_CLK_WDOG_GATE] = imx_clk_gate("wdog_gate", "ipg", CCM_PCCR1, 24); | ||
111 | clk[IMX21_CLK_GPT1_IPG_GATE] = imx_clk_gate("gpt1_ipg_gate", "ipg", CCM_PCCR1, 25); | ||
112 | clk[IMX21_CLK_GPT2_IPG_GATE] = imx_clk_gate("gpt2_ipg_gate", "ipg", CCM_PCCR1, 26); | ||
113 | clk[IMX21_CLK_GPT3_IPG_GATE] = imx_clk_gate("gpt3_ipg_gate", "ipg", CCM_PCCR1, 27); | ||
114 | clk[IMX21_CLK_PWM_IPG_GATE] = imx_clk_gate("pwm_ipg_gate", "ipg", CCM_PCCR1, 28); | ||
115 | clk[IMX21_CLK_RTC_GATE] = imx_clk_gate("rtc_gate", "ipg", CCM_PCCR1, 29); | ||
116 | clk[IMX21_CLK_KPP_GATE] = imx_clk_gate("kpp_gate", "ipg", CCM_PCCR1, 30); | ||
117 | clk[IMX21_CLK_OWIRE_GATE] = imx_clk_gate("owire_gate", "ipg", CCM_PCCR1, 31); | ||
118 | |||
119 | imx_check_clocks(clk, ARRAY_SIZE(clk)); | ||
120 | } | ||
66 | 121 | ||
67 | /* | ||
68 | * must be called very early to get information about the | ||
69 | * available clock rate when the timer framework starts | ||
70 | */ | ||
71 | int __init mx21_clocks_init(unsigned long lref, unsigned long href) | 122 | int __init mx21_clocks_init(unsigned long lref, unsigned long href) |
72 | { | 123 | { |
73 | int i; | 124 | ccm = ioremap(MX21_CCM_BASE_ADDR, SZ_2K); |
74 | 125 | ||
75 | clk[ckil] = imx_clk_fixed("ckil", lref); | 126 | _mx21_clocks_init(lref, href); |
76 | clk[ckih] = imx_clk_fixed("ckih", href); | 127 | |
77 | clk[fpm] = imx_clk_fixed_factor("fpm", "ckil", 512, 1); | 128 | clk_register_clkdev(clk[IMX21_CLK_PER1], "per", "imx21-uart.0"); |
78 | clk[mpll_sel] = imx_clk_mux("mpll_sel", CCM_CSCR, 16, 1, mpll_sel_clks, | 129 | clk_register_clkdev(clk[IMX21_CLK_UART1_IPG_GATE], "ipg", "imx21-uart.0"); |
79 | ARRAY_SIZE(mpll_sel_clks)); | 130 | clk_register_clkdev(clk[IMX21_CLK_PER1], "per", "imx21-uart.1"); |
80 | clk[spll_sel] = imx_clk_mux("spll_sel", CCM_CSCR, 17, 1, spll_sel_clks, | 131 | clk_register_clkdev(clk[IMX21_CLK_UART2_IPG_GATE], "ipg", "imx21-uart.1"); |
81 | ARRAY_SIZE(spll_sel_clks)); | 132 | clk_register_clkdev(clk[IMX21_CLK_PER1], "per", "imx21-uart.2"); |
82 | clk[mpll] = imx_clk_pllv1("mpll", "mpll_sel", CCM_MPCTL0); | 133 | clk_register_clkdev(clk[IMX21_CLK_UART3_IPG_GATE], "ipg", "imx21-uart.2"); |
83 | clk[spll] = imx_clk_pllv1("spll", "spll_sel", CCM_SPCTL0); | 134 | clk_register_clkdev(clk[IMX21_CLK_PER1], "per", "imx21-uart.3"); |
84 | clk[fclk] = imx_clk_divider("fclk", "mpll", CCM_CSCR, 29, 3); | 135 | clk_register_clkdev(clk[IMX21_CLK_UART4_IPG_GATE], "ipg", "imx21-uart.3"); |
85 | clk[hclk] = imx_clk_divider("hclk", "fclk", CCM_CSCR, 10, 4); | 136 | clk_register_clkdev(clk[IMX21_CLK_GPT1_IPG_GATE], "ipg", "imx-gpt.0"); |
86 | clk[ipg] = imx_clk_divider("ipg", "hclk", CCM_CSCR, 9, 1); | 137 | clk_register_clkdev(clk[IMX21_CLK_PER1], "per", "imx-gpt.0"); |
87 | clk[per1] = imx_clk_divider("per1", "mpll", CCM_PCDR1, 0, 6); | 138 | clk_register_clkdev(clk[IMX21_CLK_PER2], "per", "imx21-cspi.0"); |
88 | clk[per2] = imx_clk_divider("per2", "mpll", CCM_PCDR1, 8, 6); | 139 | clk_register_clkdev(clk[IMX21_CLK_CSPI1_IPG_GATE], "ipg", "imx21-cspi.0"); |
89 | clk[per3] = imx_clk_divider("per3", "mpll", CCM_PCDR1, 16, 6); | 140 | clk_register_clkdev(clk[IMX21_CLK_PER2], "per", "imx21-cspi.1"); |
90 | clk[per4] = imx_clk_divider("per4", "mpll", CCM_PCDR1, 24, 6); | 141 | clk_register_clkdev(clk[IMX21_CLK_CSPI2_IPG_GATE], "ipg", "imx21-cspi.1"); |
91 | clk[uart1_ipg_gate] = imx_clk_gate("uart1_ipg_gate", "ipg", CCM_PCCR0, 0); | 142 | clk_register_clkdev(clk[IMX21_CLK_PER2], "per", "imx21-cspi.2"); |
92 | clk[uart2_ipg_gate] = imx_clk_gate("uart2_ipg_gate", "ipg", CCM_PCCR0, 1); | 143 | clk_register_clkdev(clk[IMX21_CLK_CSPI3_IPG_GATE], "ipg", "imx21-cspi.2"); |
93 | clk[uart3_ipg_gate] = imx_clk_gate("uart3_ipg_gate", "ipg", CCM_PCCR0, 2); | 144 | clk_register_clkdev(clk[IMX21_CLK_PER3], "per", "imx21-fb.0"); |
94 | clk[uart4_ipg_gate] = imx_clk_gate("uart4_ipg_gate", "ipg", CCM_PCCR0, 3); | 145 | clk_register_clkdev(clk[IMX21_CLK_LCDC_IPG_GATE], "ipg", "imx21-fb.0"); |
95 | clk[gpt1_ipg_gate] = imx_clk_gate("gpt1_ipg_gate", "ipg", CCM_PCCR1, 25); | 146 | clk_register_clkdev(clk[IMX21_CLK_LCDC_HCLK_GATE], "ahb", "imx21-fb.0"); |
96 | clk[gpt2_ipg_gate] = imx_clk_gate("gpt2_ipg_gate", "ipg", CCM_PCCR1, 26); | 147 | clk_register_clkdev(clk[IMX21_CLK_USB_GATE], "per", "imx21-hcd.0"); |
97 | clk[gpt3_ipg_gate] = imx_clk_gate("gpt3_ipg_gate", "ipg", CCM_PCCR1, 27); | 148 | clk_register_clkdev(clk[IMX21_CLK_USB_HCLK_GATE], "ahb", "imx21-hcd.0"); |
98 | clk[pwm_ipg_gate] = imx_clk_gate("pwm_ipg_gate", "ipg", CCM_PCCR1, 28); | 149 | clk_register_clkdev(clk[IMX21_CLK_NFC_GATE], NULL, "imx21-nand.0"); |
99 | clk[sdhc1_ipg_gate] = imx_clk_gate("sdhc1_ipg_gate", "ipg", CCM_PCCR0, 9); | 150 | clk_register_clkdev(clk[IMX21_CLK_DMA_HCLK_GATE], "ahb", "imx21-dma"); |
100 | clk[sdhc2_ipg_gate] = imx_clk_gate("sdhc2_ipg_gate", "ipg", CCM_PCCR0, 10); | 151 | clk_register_clkdev(clk[IMX21_CLK_DMA_GATE], "ipg", "imx21-dma"); |
101 | clk[lcdc_ipg_gate] = imx_clk_gate("lcdc_ipg_gate", "ipg", CCM_PCCR0, 18); | 152 | clk_register_clkdev(clk[IMX21_CLK_WDOG_GATE], NULL, "imx2-wdt.0"); |
102 | clk[lcdc_hclk_gate] = imx_clk_gate("lcdc_hclk_gate", "hclk", CCM_PCCR0, 26); | 153 | clk_register_clkdev(clk[IMX21_CLK_I2C_GATE], NULL, "imx21-i2c.0"); |
103 | clk[cspi3_ipg_gate] = imx_clk_gate("cspi3_ipg_gate", "ipg", CCM_PCCR1, 23); | 154 | clk_register_clkdev(clk[IMX21_CLK_OWIRE_GATE], NULL, "mxc_w1.0"); |
104 | clk[cspi2_ipg_gate] = imx_clk_gate("cspi2_ipg_gate", "ipg", CCM_PCCR0, 5); | ||
105 | clk[cspi1_ipg_gate] = imx_clk_gate("cspi1_ipg_gate", "ipg", CCM_PCCR0, 4); | ||
106 | clk[per4_gate] = imx_clk_gate("per4_gate", "per4", CCM_PCCR0, 22); | ||
107 | clk[csi_hclk_gate] = imx_clk_gate("csi_hclk_gate", "hclk", CCM_PCCR0, 31); | ||
108 | clk[usb_div] = imx_clk_divider("usb_div", "spll", CCM_CSCR, 26, 3); | ||
109 | clk[usb_gate] = imx_clk_gate("usb_gate", "usb_div", CCM_PCCR0, 14); | ||
110 | clk[usb_hclk_gate] = imx_clk_gate("usb_hclk_gate", "hclk", CCM_PCCR0, 24); | ||
111 | clk[ssi1_gate] = imx_clk_gate("ssi1_gate", "ipg", CCM_PCCR0, 6); | ||
112 | clk[ssi2_gate] = imx_clk_gate("ssi2_gate", "ipg", CCM_PCCR0, 7); | ||
113 | clk[nfc_div] = imx_clk_divider("nfc_div", "ipg", CCM_PCDR0, 12, 4); | ||
114 | clk[nfc_gate] = imx_clk_gate("nfc_gate", "nfc_div", CCM_PCCR0, 19); | ||
115 | clk[dma_gate] = imx_clk_gate("dma_gate", "ipg", CCM_PCCR0, 13); | ||
116 | clk[dma_hclk_gate] = imx_clk_gate("dma_hclk_gate", "hclk", CCM_PCCR0, 30); | ||
117 | clk[brom_gate] = imx_clk_gate("brom_gate", "hclk", CCM_PCCR0, 28); | ||
118 | clk[emma_gate] = imx_clk_gate("emma_gate", "ipg", CCM_PCCR0, 15); | ||
119 | clk[emma_hclk_gate] = imx_clk_gate("emma_hclk_gate", "hclk", CCM_PCCR0, 27); | ||
120 | clk[slcdc_gate] = imx_clk_gate("slcdc_gate", "ipg", CCM_PCCR0, 25); | ||
121 | clk[slcdc_hclk_gate] = imx_clk_gate("slcdc_hclk_gate", "hclk", CCM_PCCR0, 21); | ||
122 | clk[wdog_gate] = imx_clk_gate("wdog_gate", "ipg", CCM_PCCR1, 24); | ||
123 | clk[gpio_gate] = imx_clk_gate("gpio_gate", "ipg", CCM_PCCR0, 11); | ||
124 | clk[i2c_gate] = imx_clk_gate("i2c_gate", "ipg", CCM_PCCR0, 12); | ||
125 | clk[kpp_gate] = imx_clk_gate("kpp_gate", "ipg", CCM_PCCR1, 30); | ||
126 | clk[owire_gate] = imx_clk_gate("owire_gate", "ipg", CCM_PCCR1, 31); | ||
127 | clk[rtc_gate] = imx_clk_gate("rtc_gate", "ipg", CCM_PCCR1, 29); | ||
128 | |||
129 | for (i = 0; i < ARRAY_SIZE(clk); i++) | ||
130 | if (IS_ERR(clk[i])) | ||
131 | pr_err("i.MX21 clk %d: register failed with %ld\n", | ||
132 | i, PTR_ERR(clk[i])); | ||
133 | |||
134 | clk_register_clkdev(clk[per1], "per1", NULL); | ||
135 | clk_register_clkdev(clk[per2], "per2", NULL); | ||
136 | clk_register_clkdev(clk[per3], "per3", NULL); | ||
137 | clk_register_clkdev(clk[per4], "per4", NULL); | ||
138 | clk_register_clkdev(clk[per1], "per", "imx21-uart.0"); | ||
139 | clk_register_clkdev(clk[uart1_ipg_gate], "ipg", "imx21-uart.0"); | ||
140 | clk_register_clkdev(clk[per1], "per", "imx21-uart.1"); | ||
141 | clk_register_clkdev(clk[uart2_ipg_gate], "ipg", "imx21-uart.1"); | ||
142 | clk_register_clkdev(clk[per1], "per", "imx21-uart.2"); | ||
143 | clk_register_clkdev(clk[uart3_ipg_gate], "ipg", "imx21-uart.2"); | ||
144 | clk_register_clkdev(clk[per1], "per", "imx21-uart.3"); | ||
145 | clk_register_clkdev(clk[uart4_ipg_gate], "ipg", "imx21-uart.3"); | ||
146 | clk_register_clkdev(clk[gpt1_ipg_gate], "ipg", "imx-gpt.0"); | ||
147 | clk_register_clkdev(clk[per1], "per", "imx-gpt.0"); | ||
148 | clk_register_clkdev(clk[gpt2_ipg_gate], "ipg", "imx-gpt.1"); | ||
149 | clk_register_clkdev(clk[per1], "per", "imx-gpt.1"); | ||
150 | clk_register_clkdev(clk[gpt3_ipg_gate], "ipg", "imx-gpt.2"); | ||
151 | clk_register_clkdev(clk[per1], "per", "imx-gpt.2"); | ||
152 | clk_register_clkdev(clk[per2], "per", "imx21-cspi.0"); | ||
153 | clk_register_clkdev(clk[cspi1_ipg_gate], "ipg", "imx21-cspi.0"); | ||
154 | clk_register_clkdev(clk[per2], "per", "imx21-cspi.1"); | ||
155 | clk_register_clkdev(clk[cspi2_ipg_gate], "ipg", "imx21-cspi.1"); | ||
156 | clk_register_clkdev(clk[per2], "per", "imx21-cspi.2"); | ||
157 | clk_register_clkdev(clk[cspi3_ipg_gate], "ipg", "imx21-cspi.2"); | ||
158 | clk_register_clkdev(clk[per3], "per", "imx21-fb.0"); | ||
159 | clk_register_clkdev(clk[lcdc_ipg_gate], "ipg", "imx21-fb.0"); | ||
160 | clk_register_clkdev(clk[lcdc_hclk_gate], "ahb", "imx21-fb.0"); | ||
161 | clk_register_clkdev(clk[usb_gate], "per", "imx21-hcd.0"); | ||
162 | clk_register_clkdev(clk[usb_hclk_gate], "ahb", "imx21-hcd.0"); | ||
163 | clk_register_clkdev(clk[nfc_gate], NULL, "imx21-nand.0"); | ||
164 | clk_register_clkdev(clk[dma_hclk_gate], "ahb", "imx21-dma"); | ||
165 | clk_register_clkdev(clk[dma_gate], "ipg", "imx21-dma"); | ||
166 | clk_register_clkdev(clk[wdog_gate], NULL, "imx2-wdt.0"); | ||
167 | clk_register_clkdev(clk[i2c_gate], NULL, "imx21-i2c.0"); | ||
168 | clk_register_clkdev(clk[kpp_gate], NULL, "mxc-keypad"); | ||
169 | clk_register_clkdev(clk[owire_gate], NULL, "mxc_w1.0"); | ||
170 | clk_register_clkdev(clk[brom_gate], "brom", NULL); | ||
171 | clk_register_clkdev(clk[emma_gate], "emma", NULL); | ||
172 | clk_register_clkdev(clk[slcdc_gate], "slcdc", NULL); | ||
173 | clk_register_clkdev(clk[gpio_gate], "gpio", NULL); | ||
174 | clk_register_clkdev(clk[rtc_gate], "rtc", NULL); | ||
175 | clk_register_clkdev(clk[csi_hclk_gate], "csi", NULL); | ||
176 | clk_register_clkdev(clk[ssi1_gate], "ssi1", NULL); | ||
177 | clk_register_clkdev(clk[ssi2_gate], "ssi2", NULL); | ||
178 | clk_register_clkdev(clk[sdhc1_ipg_gate], "sdhc1", NULL); | ||
179 | clk_register_clkdev(clk[sdhc2_ipg_gate], "sdhc2", NULL); | ||
180 | 155 | ||
181 | mxc_timer_init(MX21_IO_ADDRESS(MX21_GPT1_BASE_ADDR), MX21_INT_GPT1); | 156 | mxc_timer_init(MX21_IO_ADDRESS(MX21_GPT1_BASE_ADDR), MX21_INT_GPT1); |
182 | 157 | ||
183 | return 0; | 158 | return 0; |
184 | } | 159 | } |
160 | |||
161 | static void __init mx21_clocks_init_dt(struct device_node *np) | ||
162 | { | ||
163 | ccm = of_iomap(np, 0); | ||
164 | |||
165 | _mx21_clocks_init(32768, 26000000); | ||
166 | |||
167 | clk_data.clks = clk; | ||
168 | clk_data.clk_num = ARRAY_SIZE(clk); | ||
169 | of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data); | ||
170 | } | ||
171 | CLK_OF_DECLARE(imx27_ccm, "fsl,imx21-ccm", mx21_clocks_init_dt); | ||
diff --git a/arch/arm/mach-imx/clk-imx25.c b/arch/arm/mach-imx/clk-imx25.c index ae578c096ad8..59c0c8558c6b 100644 --- a/arch/arm/mach-imx/clk-imx25.c +++ b/arch/arm/mach-imx/clk-imx25.c | |||
@@ -32,8 +32,6 @@ | |||
32 | #include "hardware.h" | 32 | #include "hardware.h" |
33 | #include "mx25.h" | 33 | #include "mx25.h" |
34 | 34 | ||
35 | #define CRM_BASE MX25_IO_ADDRESS(MX25_CRM_BASE_ADDR) | ||
36 | |||
37 | #define CCM_MPCTL 0x00 | 35 | #define CCM_MPCTL 0x00 |
38 | #define CCM_UPCTL 0x04 | 36 | #define CCM_UPCTL 0x04 |
39 | #define CCM_CCTL 0x08 | 37 | #define CCM_CCTL 0x08 |
@@ -56,7 +54,7 @@ | |||
56 | #define CCM_LTR3 0x4c | 54 | #define CCM_LTR3 0x4c |
57 | #define CCM_MCR 0x64 | 55 | #define CCM_MCR 0x64 |
58 | 56 | ||
59 | #define ccm(x) (CRM_BASE + (x)) | 57 | #define ccm(x) (ccm_base + (x)) |
60 | 58 | ||
61 | static struct clk_onecell_data clk_data; | 59 | static struct clk_onecell_data clk_data; |
62 | 60 | ||
@@ -91,9 +89,10 @@ enum mx25_clks { | |||
91 | 89 | ||
92 | static struct clk *clk[clk_max]; | 90 | static struct clk *clk[clk_max]; |
93 | 91 | ||
94 | static int __init __mx25_clocks_init(unsigned long osc_rate) | 92 | static int __init __mx25_clocks_init(unsigned long osc_rate, |
93 | void __iomem *ccm_base) | ||
95 | { | 94 | { |
96 | int i; | 95 | BUG_ON(!ccm_base); |
97 | 96 | ||
98 | clk[dummy] = imx_clk_fixed("dummy", 0); | 97 | clk[dummy] = imx_clk_fixed("dummy", 0); |
99 | clk[osc] = imx_clk_fixed("osc", osc_rate); | 98 | clk[osc] = imx_clk_fixed("osc", osc_rate); |
@@ -224,19 +223,13 @@ static int __init __mx25_clocks_init(unsigned long osc_rate) | |||
224 | /* CCM_CGCR2(19): reserved in datasheet, but used as wdt in FSL kernel */ | 223 | /* CCM_CGCR2(19): reserved in datasheet, but used as wdt in FSL kernel */ |
225 | clk[wdt_ipg] = imx_clk_gate("wdt_ipg", "ipg", ccm(CCM_CGCR2), 19); | 224 | clk[wdt_ipg] = imx_clk_gate("wdt_ipg", "ipg", ccm(CCM_CGCR2), 19); |
226 | 225 | ||
227 | for (i = 0; i < ARRAY_SIZE(clk); i++) | 226 | imx_check_clocks(clk, ARRAY_SIZE(clk)); |
228 | if (IS_ERR(clk[i])) | ||
229 | pr_err("i.MX25 clk %d: register failed with %ld\n", | ||
230 | i, PTR_ERR(clk[i])); | ||
231 | 227 | ||
232 | clk_prepare_enable(clk[emi_ahb]); | 228 | clk_prepare_enable(clk[emi_ahb]); |
233 | 229 | ||
234 | /* Clock source for gpt must be derived from AHB */ | 230 | /* Clock source for gpt must be derived from AHB */ |
235 | clk_set_parent(clk[per5_sel], clk[ahb]); | 231 | clk_set_parent(clk[per5_sel], clk[ahb]); |
236 | 232 | ||
237 | clk_register_clkdev(clk[ipg], "ipg", "imx-gpt.0"); | ||
238 | clk_register_clkdev(clk[gpt_ipg_per], "per", "imx-gpt.0"); | ||
239 | |||
240 | /* | 233 | /* |
241 | * Let's initially set up CLKO parent as ipg, since this configuration | 234 | * Let's initially set up CLKO parent as ipg, since this configuration |
242 | * is used on some imx25 board designs to clock the audio codec. | 235 | * is used on some imx25 board designs to clock the audio codec. |
@@ -248,8 +241,14 @@ static int __init __mx25_clocks_init(unsigned long osc_rate) | |||
248 | 241 | ||
249 | int __init mx25_clocks_init(void) | 242 | int __init mx25_clocks_init(void) |
250 | { | 243 | { |
251 | __mx25_clocks_init(24000000); | 244 | void __iomem *ccm; |
252 | 245 | ||
246 | ccm = ioremap(MX25_CRM_BASE_ADDR, SZ_16K); | ||
247 | |||
248 | __mx25_clocks_init(24000000, ccm); | ||
249 | |||
250 | clk_register_clkdev(clk[gpt1_ipg], "ipg", "imx-gpt.0"); | ||
251 | clk_register_clkdev(clk[gpt_ipg_per], "per", "imx-gpt.0"); | ||
253 | /* i.mx25 has the i.mx21 type uart */ | 252 | /* i.mx25 has the i.mx21 type uart */ |
254 | clk_register_clkdev(clk[uart1_ipg], "ipg", "imx21-uart.0"); | 253 | clk_register_clkdev(clk[uart1_ipg], "ipg", "imx21-uart.0"); |
255 | clk_register_clkdev(clk[uart_ipg_per], "per", "imx21-uart.0"); | 254 | clk_register_clkdev(clk[uart_ipg_per], "per", "imx21-uart.0"); |
@@ -314,29 +313,27 @@ int __init mx25_clocks_init(void) | |||
314 | return 0; | 313 | return 0; |
315 | } | 314 | } |
316 | 315 | ||
317 | int __init mx25_clocks_init_dt(void) | 316 | static void __init mx25_clocks_init_dt(struct device_node *np) |
318 | { | 317 | { |
319 | struct device_node *np; | 318 | struct device_node *refnp; |
320 | unsigned long osc_rate = 24000000; | 319 | unsigned long osc_rate = 24000000; |
320 | void __iomem *ccm; | ||
321 | 321 | ||
322 | /* retrieve the freqency of fixed clocks from device tree */ | 322 | /* retrieve the freqency of fixed clocks from device tree */ |
323 | for_each_compatible_node(np, NULL, "fixed-clock") { | 323 | for_each_compatible_node(refnp, NULL, "fixed-clock") { |
324 | u32 rate; | 324 | u32 rate; |
325 | if (of_property_read_u32(np, "clock-frequency", &rate)) | 325 | if (of_property_read_u32(refnp, "clock-frequency", &rate)) |
326 | continue; | 326 | continue; |
327 | 327 | ||
328 | if (of_device_is_compatible(np, "fsl,imx-osc")) | 328 | if (of_device_is_compatible(refnp, "fsl,imx-osc")) |
329 | osc_rate = rate; | 329 | osc_rate = rate; |
330 | } | 330 | } |
331 | 331 | ||
332 | np = of_find_compatible_node(NULL, NULL, "fsl,imx25-ccm"); | 332 | ccm = of_iomap(np, 0); |
333 | __mx25_clocks_init(osc_rate, ccm); | ||
334 | |||
333 | clk_data.clks = clk; | 335 | clk_data.clks = clk; |
334 | clk_data.clk_num = ARRAY_SIZE(clk); | 336 | clk_data.clk_num = ARRAY_SIZE(clk); |
335 | of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data); | 337 | of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data); |
336 | |||
337 | __mx25_clocks_init(osc_rate); | ||
338 | |||
339 | mxc_timer_init_dt(of_find_compatible_node(NULL, NULL, "fsl,imx25-gpt")); | ||
340 | |||
341 | return 0; | ||
342 | } | 338 | } |
339 | CLK_OF_DECLARE(imx25_ccm, "fsl,imx25-ccm", mx25_clocks_init_dt); | ||
diff --git a/arch/arm/mach-imx/clk-imx27.c b/arch/arm/mach-imx/clk-imx27.c index 317a662626d6..ab6349ec23b9 100644 --- a/arch/arm/mach-imx/clk-imx27.c +++ b/arch/arm/mach-imx/clk-imx27.c | |||
@@ -1,61 +1,36 @@ | |||
1 | #include <linux/clk.h> | 1 | #include <linux/clk.h> |
2 | #include <linux/io.h> | 2 | #include <linux/clk-provider.h> |
3 | #include <linux/module.h> | ||
4 | #include <linux/clkdev.h> | 3 | #include <linux/clkdev.h> |
5 | #include <linux/err.h> | 4 | #include <linux/err.h> |
6 | #include <linux/clk-provider.h> | ||
7 | #include <linux/of.h> | 5 | #include <linux/of.h> |
6 | #include <linux/of_address.h> | ||
7 | #include <dt-bindings/clock/imx27-clock.h> | ||
8 | 8 | ||
9 | #include "clk.h" | 9 | #include "clk.h" |
10 | #include "common.h" | 10 | #include "common.h" |
11 | #include "hardware.h" | 11 | #include "hardware.h" |
12 | 12 | ||
13 | #define IO_ADDR_CCM(off) (MX27_IO_ADDRESS(MX27_CCM_BASE_ADDR + (off))) | 13 | static void __iomem *ccm __initdata; |
14 | 14 | ||
15 | /* Register offsets */ | 15 | /* Register offsets */ |
16 | #define CCM_CSCR IO_ADDR_CCM(0x0) | 16 | #define CCM_CSCR (ccm + 0x00) |
17 | #define CCM_MPCTL0 IO_ADDR_CCM(0x4) | 17 | #define CCM_MPCTL0 (ccm + 0x04) |
18 | #define CCM_MPCTL1 IO_ADDR_CCM(0x8) | 18 | #define CCM_MPCTL1 (ccm + 0x08) |
19 | #define CCM_SPCTL0 IO_ADDR_CCM(0xc) | 19 | #define CCM_SPCTL0 (ccm + 0x0c) |
20 | #define CCM_SPCTL1 IO_ADDR_CCM(0x10) | 20 | #define CCM_SPCTL1 (ccm + 0x10) |
21 | #define CCM_OSC26MCTL IO_ADDR_CCM(0x14) | 21 | #define CCM_PCDR0 (ccm + 0x18) |
22 | #define CCM_PCDR0 IO_ADDR_CCM(0x18) | 22 | #define CCM_PCDR1 (ccm + 0x1c) |
23 | #define CCM_PCDR1 IO_ADDR_CCM(0x1c) | 23 | #define CCM_PCCR0 (ccm + 0x20) |
24 | #define CCM_PCCR0 IO_ADDR_CCM(0x20) | 24 | #define CCM_PCCR1 (ccm + 0x24) |
25 | #define CCM_PCCR1 IO_ADDR_CCM(0x24) | 25 | #define CCM_CCSR (ccm + 0x28) |
26 | #define CCM_CCSR IO_ADDR_CCM(0x28) | ||
27 | #define CCM_PMCTL IO_ADDR_CCM(0x2c) | ||
28 | #define CCM_PMCOUNT IO_ADDR_CCM(0x30) | ||
29 | #define CCM_WKGDCTL IO_ADDR_CCM(0x34) | ||
30 | |||
31 | #define CCM_CSCR_UPDATE_DIS (1 << 31) | ||
32 | #define CCM_CSCR_SSI2 (1 << 23) | ||
33 | #define CCM_CSCR_SSI1 (1 << 22) | ||
34 | #define CCM_CSCR_VPU (1 << 21) | ||
35 | #define CCM_CSCR_MSHC (1 << 20) | ||
36 | #define CCM_CSCR_SPLLRES (1 << 19) | ||
37 | #define CCM_CSCR_MPLLRES (1 << 18) | ||
38 | #define CCM_CSCR_SP (1 << 17) | ||
39 | #define CCM_CSCR_MCU (1 << 16) | ||
40 | #define CCM_CSCR_OSC26MDIV (1 << 4) | ||
41 | #define CCM_CSCR_OSC26M (1 << 3) | ||
42 | #define CCM_CSCR_FPM (1 << 2) | ||
43 | #define CCM_CSCR_SPEN (1 << 1) | ||
44 | #define CCM_CSCR_MPEN (1 << 0) | ||
45 | |||
46 | /* i.MX27 TO 2+ */ | ||
47 | #define CCM_CSCR_ARM_SRC (1 << 15) | ||
48 | |||
49 | #define CCM_SPCTL1_LF (1 << 15) | ||
50 | #define CCM_SPCTL1_BRMO (1 << 6) | ||
51 | 26 | ||
52 | static const char *vpu_sel_clks[] = { "spll", "mpll_main2", }; | 27 | static const char *vpu_sel_clks[] = { "spll", "mpll_main2", }; |
53 | static const char *cpu_sel_clks[] = { "mpll_main2", "mpll", }; | 28 | static const char *cpu_sel_clks[] = { "mpll_main2", "mpll", }; |
54 | static const char *mpll_sel_clks[] = { "fpm", "mpll_osc_sel", }; | 29 | static const char *mpll_sel_clks[] = { "fpm", "mpll_osc_sel", }; |
55 | static const char *mpll_osc_sel_clks[] = { "ckih", "ckih_div1p5", }; | 30 | static const char *mpll_osc_sel_clks[] = { "ckih_gate", "ckih_div1p5", }; |
56 | static const char *clko_sel_clks[] = { | 31 | static const char *clko_sel_clks[] = { |
57 | "ckil", "fpm", "ckih", "ckih", | 32 | "ckil", "fpm", "ckih_gate", "ckih_gate", |
58 | "ckih", "mpll", "spll", "cpu_div", | 33 | "ckih_gate", "mpll", "spll", "cpu_div", |
59 | "ahb", "ipg", "per1_div", "per2_div", | 34 | "ahb", "ipg", "per1_div", "per2_div", |
60 | "per3_div", "per4_div", "ssi1_div", "ssi2_div", | 35 | "per3_div", "per4_div", "ssi1_div", "ssi2_div", |
61 | "nfc_div", "mshc_div", "vpu_div", "60m", | 36 | "nfc_div", "mshc_div", "vpu_div", "60m", |
@@ -64,239 +39,220 @@ static const char *clko_sel_clks[] = { | |||
64 | 39 | ||
65 | static const char *ssi_sel_clks[] = { "spll_gate", "mpll", }; | 40 | static const char *ssi_sel_clks[] = { "spll_gate", "mpll", }; |
66 | 41 | ||
67 | enum mx27_clks { | 42 | static struct clk *clk[IMX27_CLK_MAX]; |
68 | dummy, ckih, ckil, mpll, spll, mpll_main2, ahb, ipg, nfc_div, per1_div, | ||
69 | per2_div, per3_div, per4_div, vpu_sel, vpu_div, usb_div, cpu_sel, | ||
70 | clko_sel, cpu_div, clko_div, ssi1_sel, ssi2_sel, ssi1_div, ssi2_div, | ||
71 | clko_en, ssi2_ipg_gate, ssi1_ipg_gate, slcdc_ipg_gate, sdhc3_ipg_gate, | ||
72 | sdhc2_ipg_gate, sdhc1_ipg_gate, scc_ipg_gate, sahara_ipg_gate, | ||
73 | rtc_ipg_gate, pwm_ipg_gate, owire_ipg_gate, lcdc_ipg_gate, | ||
74 | kpp_ipg_gate, iim_ipg_gate, i2c2_ipg_gate, i2c1_ipg_gate, | ||
75 | gpt6_ipg_gate, gpt5_ipg_gate, gpt4_ipg_gate, gpt3_ipg_gate, | ||
76 | gpt2_ipg_gate, gpt1_ipg_gate, gpio_ipg_gate, fec_ipg_gate, | ||
77 | emma_ipg_gate, dma_ipg_gate, cspi3_ipg_gate, cspi2_ipg_gate, | ||
78 | cspi1_ipg_gate, nfc_baud_gate, ssi2_baud_gate, ssi1_baud_gate, | ||
79 | vpu_baud_gate, per4_gate, per3_gate, per2_gate, per1_gate, | ||
80 | usb_ahb_gate, slcdc_ahb_gate, sahara_ahb_gate, lcdc_ahb_gate, | ||
81 | vpu_ahb_gate, fec_ahb_gate, emma_ahb_gate, emi_ahb_gate, dma_ahb_gate, | ||
82 | csi_ahb_gate, brom_ahb_gate, ata_ahb_gate, wdog_ipg_gate, usb_ipg_gate, | ||
83 | uart6_ipg_gate, uart5_ipg_gate, uart4_ipg_gate, uart3_ipg_gate, | ||
84 | uart2_ipg_gate, uart1_ipg_gate, ckih_div1p5, fpm, mpll_osc_sel, | ||
85 | mpll_sel, spll_gate, mshc_div, rtic_ipg_gate, mshc_ipg_gate, | ||
86 | rtic_ahb_gate, mshc_baud_gate, clk_max | ||
87 | }; | ||
88 | |||
89 | static struct clk *clk[clk_max]; | ||
90 | static struct clk_onecell_data clk_data; | 43 | static struct clk_onecell_data clk_data; |
91 | 44 | ||
92 | int __init mx27_clocks_init(unsigned long fref) | 45 | static void __init _mx27_clocks_init(unsigned long fref) |
93 | { | 46 | { |
94 | int i; | 47 | BUG_ON(!ccm); |
95 | struct device_node *np; | ||
96 | |||
97 | clk[dummy] = imx_clk_fixed("dummy", 0); | ||
98 | clk[ckih] = imx_clk_fixed("ckih", fref); | ||
99 | clk[ckil] = imx_clk_fixed("ckil", 32768); | ||
100 | clk[fpm] = imx_clk_fixed_factor("fpm", "ckil", 1024, 1); | ||
101 | clk[ckih_div1p5] = imx_clk_fixed_factor("ckih_div1p5", "ckih", 2, 3); | ||
102 | 48 | ||
103 | clk[mpll_osc_sel] = imx_clk_mux("mpll_osc_sel", CCM_CSCR, 4, 1, | 49 | clk[IMX27_CLK_DUMMY] = imx_clk_fixed("dummy", 0); |
104 | mpll_osc_sel_clks, | 50 | clk[IMX27_CLK_CKIH] = imx_clk_fixed("ckih", fref); |
105 | ARRAY_SIZE(mpll_osc_sel_clks)); | 51 | clk[IMX27_CLK_CKIL] = imx_clk_fixed("ckil", 32768); |
106 | clk[mpll_sel] = imx_clk_mux("mpll_sel", CCM_CSCR, 16, 1, mpll_sel_clks, | 52 | clk[IMX27_CLK_FPM] = imx_clk_fixed_factor("fpm", "ckil", 1024, 1); |
107 | ARRAY_SIZE(mpll_sel_clks)); | 53 | clk[IMX27_CLK_CKIH_DIV1P5] = imx_clk_fixed_factor("ckih_div1p5", "ckih_gate", 2, 3); |
108 | clk[mpll] = imx_clk_pllv1("mpll", "mpll_sel", CCM_MPCTL0); | 54 | clk[IMX27_CLK_CKIH_GATE] = imx_clk_gate_dis("ckih_gate", "ckih", CCM_CSCR, 3); |
109 | clk[spll] = imx_clk_pllv1("spll", "ckih", CCM_SPCTL0); | 55 | clk[IMX27_CLK_MPLL_OSC_SEL] = imx_clk_mux("mpll_osc_sel", CCM_CSCR, 4, 1, mpll_osc_sel_clks, ARRAY_SIZE(mpll_osc_sel_clks)); |
110 | clk[spll_gate] = imx_clk_gate("spll_gate", "spll", CCM_CSCR, 1); | 56 | clk[IMX27_CLK_MPLL_SEL] = imx_clk_mux("mpll_sel", CCM_CSCR, 16, 1, mpll_sel_clks, ARRAY_SIZE(mpll_sel_clks)); |
111 | clk[mpll_main2] = imx_clk_fixed_factor("mpll_main2", "mpll", 2, 3); | 57 | clk[IMX27_CLK_MPLL] = imx_clk_pllv1("mpll", "mpll_sel", CCM_MPCTL0); |
58 | clk[IMX27_CLK_SPLL] = imx_clk_pllv1("spll", "ckih_gate", CCM_SPCTL0); | ||
59 | clk[IMX27_CLK_SPLL_GATE] = imx_clk_gate("spll_gate", "spll", CCM_CSCR, 1); | ||
60 | clk[IMX27_CLK_MPLL_MAIN2] = imx_clk_fixed_factor("mpll_main2", "mpll", 2, 3); | ||
112 | 61 | ||
113 | if (mx27_revision() >= IMX_CHIP_REVISION_2_0) { | 62 | if (mx27_revision() >= IMX_CHIP_REVISION_2_0) { |
114 | clk[ahb] = imx_clk_divider("ahb", "mpll_main2", CCM_CSCR, 8, 2); | 63 | clk[IMX27_CLK_AHB] = imx_clk_divider("ahb", "mpll_main2", CCM_CSCR, 8, 2); |
115 | clk[ipg] = imx_clk_fixed_factor("ipg", "ahb", 1, 2); | 64 | clk[IMX27_CLK_IPG] = imx_clk_fixed_factor("ipg", "ahb", 1, 2); |
116 | } else { | 65 | } else { |
117 | clk[ahb] = imx_clk_divider("ahb", "mpll_main2", CCM_CSCR, 9, 4); | 66 | clk[IMX27_CLK_AHB] = imx_clk_divider("ahb", "mpll_main2", CCM_CSCR, 9, 4); |
118 | clk[ipg] = imx_clk_divider("ipg", "ahb", CCM_CSCR, 8, 1); | 67 | clk[IMX27_CLK_IPG] = imx_clk_divider("ipg", "ahb", CCM_CSCR, 8, 1); |
119 | } | 68 | } |
120 | 69 | ||
121 | clk[mshc_div] = imx_clk_divider("mshc_div", "ahb", CCM_PCDR0, 0, 6); | 70 | clk[IMX27_CLK_MSHC_DIV] = imx_clk_divider("mshc_div", "ahb", CCM_PCDR0, 0, 6); |
122 | clk[nfc_div] = imx_clk_divider("nfc_div", "ahb", CCM_PCDR0, 6, 4); | 71 | clk[IMX27_CLK_NFC_DIV] = imx_clk_divider("nfc_div", "ahb", CCM_PCDR0, 6, 4); |
123 | clk[per1_div] = imx_clk_divider("per1_div", "mpll_main2", CCM_PCDR1, 0, 6); | 72 | clk[IMX27_CLK_PER1_DIV] = imx_clk_divider("per1_div", "mpll_main2", CCM_PCDR1, 0, 6); |
124 | clk[per2_div] = imx_clk_divider("per2_div", "mpll_main2", CCM_PCDR1, 8, 6); | 73 | clk[IMX27_CLK_PER2_DIV] = imx_clk_divider("per2_div", "mpll_main2", CCM_PCDR1, 8, 6); |
125 | clk[per3_div] = imx_clk_divider("per3_div", "mpll_main2", CCM_PCDR1, 16, 6); | 74 | clk[IMX27_CLK_PER3_DIV] = imx_clk_divider("per3_div", "mpll_main2", CCM_PCDR1, 16, 6); |
126 | clk[per4_div] = imx_clk_divider("per4_div", "mpll_main2", CCM_PCDR1, 24, 6); | 75 | clk[IMX27_CLK_PER4_DIV] = imx_clk_divider("per4_div", "mpll_main2", CCM_PCDR1, 24, 6); |
127 | clk[vpu_sel] = imx_clk_mux("vpu_sel", CCM_CSCR, 21, 1, vpu_sel_clks, ARRAY_SIZE(vpu_sel_clks)); | 76 | clk[IMX27_CLK_VPU_SEL] = imx_clk_mux("vpu_sel", CCM_CSCR, 21, 1, vpu_sel_clks, ARRAY_SIZE(vpu_sel_clks)); |
128 | clk[vpu_div] = imx_clk_divider("vpu_div", "vpu_sel", CCM_PCDR0, 10, 6); | 77 | clk[IMX27_CLK_VPU_DIV] = imx_clk_divider("vpu_div", "vpu_sel", CCM_PCDR0, 10, 6); |
129 | clk[usb_div] = imx_clk_divider("usb_div", "spll_gate", CCM_CSCR, 28, 3); | 78 | clk[IMX27_CLK_USB_DIV] = imx_clk_divider("usb_div", "spll_gate", CCM_CSCR, 28, 3); |
130 | clk[cpu_sel] = imx_clk_mux("cpu_sel", CCM_CSCR, 15, 1, cpu_sel_clks, ARRAY_SIZE(cpu_sel_clks)); | 79 | clk[IMX27_CLK_CPU_SEL] = imx_clk_mux("cpu_sel", CCM_CSCR, 15, 1, cpu_sel_clks, ARRAY_SIZE(cpu_sel_clks)); |
131 | clk[clko_sel] = imx_clk_mux("clko_sel", CCM_CCSR, 0, 5, clko_sel_clks, ARRAY_SIZE(clko_sel_clks)); | 80 | clk[IMX27_CLK_CLKO_SEL] = imx_clk_mux("clko_sel", CCM_CCSR, 0, 5, clko_sel_clks, ARRAY_SIZE(clko_sel_clks)); |
81 | |||
132 | if (mx27_revision() >= IMX_CHIP_REVISION_2_0) | 82 | if (mx27_revision() >= IMX_CHIP_REVISION_2_0) |
133 | clk[cpu_div] = imx_clk_divider("cpu_div", "cpu_sel", CCM_CSCR, 12, 2); | 83 | clk[IMX27_CLK_CPU_DIV] = imx_clk_divider("cpu_div", "cpu_sel", CCM_CSCR, 12, 2); |
134 | else | 84 | else |
135 | clk[cpu_div] = imx_clk_divider("cpu_div", "cpu_sel", CCM_CSCR, 13, 3); | 85 | clk[IMX27_CLK_CPU_DIV] = imx_clk_divider("cpu_div", "cpu_sel", CCM_CSCR, 13, 3); |
136 | clk[clko_div] = imx_clk_divider("clko_div", "clko_sel", CCM_PCDR0, 22, 3); | ||
137 | clk[ssi1_sel] = imx_clk_mux("ssi1_sel", CCM_CSCR, 22, 1, ssi_sel_clks, ARRAY_SIZE(ssi_sel_clks)); | ||
138 | clk[ssi2_sel] = imx_clk_mux("ssi2_sel", CCM_CSCR, 23, 1, ssi_sel_clks, ARRAY_SIZE(ssi_sel_clks)); | ||
139 | clk[ssi1_div] = imx_clk_divider("ssi1_div", "ssi1_sel", CCM_PCDR0, 16, 6); | ||
140 | clk[ssi2_div] = imx_clk_divider("ssi2_div", "ssi2_sel", CCM_PCDR0, 26, 6); | ||
141 | clk[clko_en] = imx_clk_gate("clko_en", "clko_div", CCM_PCCR0, 0); | ||
142 | clk[ssi2_ipg_gate] = imx_clk_gate("ssi2_ipg_gate", "ipg", CCM_PCCR0, 0); | ||
143 | clk[ssi1_ipg_gate] = imx_clk_gate("ssi1_ipg_gate", "ipg", CCM_PCCR0, 1); | ||
144 | clk[slcdc_ipg_gate] = imx_clk_gate("slcdc_ipg_gate", "ipg", CCM_PCCR0, 2); | ||
145 | clk[sdhc3_ipg_gate] = imx_clk_gate("sdhc3_ipg_gate", "ipg", CCM_PCCR0, 3); | ||
146 | clk[sdhc2_ipg_gate] = imx_clk_gate("sdhc2_ipg_gate", "ipg", CCM_PCCR0, 4); | ||
147 | clk[sdhc1_ipg_gate] = imx_clk_gate("sdhc1_ipg_gate", "ipg", CCM_PCCR0, 5); | ||
148 | clk[scc_ipg_gate] = imx_clk_gate("scc_ipg_gate", "ipg", CCM_PCCR0, 6); | ||
149 | clk[sahara_ipg_gate] = imx_clk_gate("sahara_ipg_gate", "ipg", CCM_PCCR0, 7); | ||
150 | clk[rtic_ipg_gate] = imx_clk_gate("rtic_ipg_gate", "ipg", CCM_PCCR0, 8); | ||
151 | clk[rtc_ipg_gate] = imx_clk_gate("rtc_ipg_gate", "ipg", CCM_PCCR0, 9); | ||
152 | clk[pwm_ipg_gate] = imx_clk_gate("pwm_ipg_gate", "ipg", CCM_PCCR0, 11); | ||
153 | clk[owire_ipg_gate] = imx_clk_gate("owire_ipg_gate", "ipg", CCM_PCCR0, 12); | ||
154 | clk[mshc_ipg_gate] = imx_clk_gate("mshc_ipg_gate", "ipg", CCM_PCCR0, 13); | ||
155 | clk[lcdc_ipg_gate] = imx_clk_gate("lcdc_ipg_gate", "ipg", CCM_PCCR0, 14); | ||
156 | clk[kpp_ipg_gate] = imx_clk_gate("kpp_ipg_gate", "ipg", CCM_PCCR0, 15); | ||
157 | clk[iim_ipg_gate] = imx_clk_gate("iim_ipg_gate", "ipg", CCM_PCCR0, 16); | ||
158 | clk[i2c2_ipg_gate] = imx_clk_gate("i2c2_ipg_gate", "ipg", CCM_PCCR0, 17); | ||
159 | clk[i2c1_ipg_gate] = imx_clk_gate("i2c1_ipg_gate", "ipg", CCM_PCCR0, 18); | ||
160 | clk[gpt6_ipg_gate] = imx_clk_gate("gpt6_ipg_gate", "ipg", CCM_PCCR0, 19); | ||
161 | clk[gpt5_ipg_gate] = imx_clk_gate("gpt5_ipg_gate", "ipg", CCM_PCCR0, 20); | ||
162 | clk[gpt4_ipg_gate] = imx_clk_gate("gpt4_ipg_gate", "ipg", CCM_PCCR0, 21); | ||
163 | clk[gpt3_ipg_gate] = imx_clk_gate("gpt3_ipg_gate", "ipg", CCM_PCCR0, 22); | ||
164 | clk[gpt2_ipg_gate] = imx_clk_gate("gpt2_ipg_gate", "ipg", CCM_PCCR0, 23); | ||
165 | clk[gpt1_ipg_gate] = imx_clk_gate("gpt1_ipg_gate", "ipg", CCM_PCCR0, 24); | ||
166 | clk[gpio_ipg_gate] = imx_clk_gate("gpio_ipg_gate", "ipg", CCM_PCCR0, 25); | ||
167 | clk[fec_ipg_gate] = imx_clk_gate("fec_ipg_gate", "ipg", CCM_PCCR0, 26); | ||
168 | clk[emma_ipg_gate] = imx_clk_gate("emma_ipg_gate", "ipg", CCM_PCCR0, 27); | ||
169 | clk[dma_ipg_gate] = imx_clk_gate("dma_ipg_gate", "ipg", CCM_PCCR0, 28); | ||
170 | clk[cspi3_ipg_gate] = imx_clk_gate("cspi3_ipg_gate", "ipg", CCM_PCCR0, 29); | ||
171 | clk[cspi2_ipg_gate] = imx_clk_gate("cspi2_ipg_gate", "ipg", CCM_PCCR0, 30); | ||
172 | clk[cspi1_ipg_gate] = imx_clk_gate("cspi1_ipg_gate", "ipg", CCM_PCCR0, 31); | ||
173 | clk[mshc_baud_gate] = imx_clk_gate("mshc_baud_gate", "mshc_div", CCM_PCCR1, 2); | ||
174 | clk[nfc_baud_gate] = imx_clk_gate("nfc_baud_gate", "nfc_div", CCM_PCCR1, 3); | ||
175 | clk[ssi2_baud_gate] = imx_clk_gate("ssi2_baud_gate", "ssi2_div", CCM_PCCR1, 4); | ||
176 | clk[ssi1_baud_gate] = imx_clk_gate("ssi1_baud_gate", "ssi1_div", CCM_PCCR1, 5); | ||
177 | clk[vpu_baud_gate] = imx_clk_gate("vpu_baud_gate", "vpu_div", CCM_PCCR1, 6); | ||
178 | clk[per4_gate] = imx_clk_gate("per4_gate", "per4_div", CCM_PCCR1, 7); | ||
179 | clk[per3_gate] = imx_clk_gate("per3_gate", "per3_div", CCM_PCCR1, 8); | ||
180 | clk[per2_gate] = imx_clk_gate("per2_gate", "per2_div", CCM_PCCR1, 9); | ||
181 | clk[per1_gate] = imx_clk_gate("per1_gate", "per1_div", CCM_PCCR1, 10); | ||
182 | clk[usb_ahb_gate] = imx_clk_gate("usb_ahb_gate", "ahb", CCM_PCCR1, 11); | ||
183 | clk[slcdc_ahb_gate] = imx_clk_gate("slcdc_ahb_gate", "ahb", CCM_PCCR1, 12); | ||
184 | clk[sahara_ahb_gate] = imx_clk_gate("sahara_ahb_gate", "ahb", CCM_PCCR1, 13); | ||
185 | clk[rtic_ahb_gate] = imx_clk_gate("rtic_ahb_gate", "ahb", CCM_PCCR1, 14); | ||
186 | clk[lcdc_ahb_gate] = imx_clk_gate("lcdc_ahb_gate", "ahb", CCM_PCCR1, 15); | ||
187 | clk[vpu_ahb_gate] = imx_clk_gate("vpu_ahb_gate", "ahb", CCM_PCCR1, 16); | ||
188 | clk[fec_ahb_gate] = imx_clk_gate("fec_ahb_gate", "ahb", CCM_PCCR1, 17); | ||
189 | clk[emma_ahb_gate] = imx_clk_gate("emma_ahb_gate", "ahb", CCM_PCCR1, 18); | ||
190 | clk[emi_ahb_gate] = imx_clk_gate("emi_ahb_gate", "ahb", CCM_PCCR1, 19); | ||
191 | clk[dma_ahb_gate] = imx_clk_gate("dma_ahb_gate", "ahb", CCM_PCCR1, 20); | ||
192 | clk[csi_ahb_gate] = imx_clk_gate("csi_ahb_gate", "ahb", CCM_PCCR1, 21); | ||
193 | clk[brom_ahb_gate] = imx_clk_gate("brom_ahb_gate", "ahb", CCM_PCCR1, 22); | ||
194 | clk[ata_ahb_gate] = imx_clk_gate("ata_ahb_gate", "ahb", CCM_PCCR1, 23); | ||
195 | clk[wdog_ipg_gate] = imx_clk_gate("wdog_ipg_gate", "ipg", CCM_PCCR1, 24); | ||
196 | clk[usb_ipg_gate] = imx_clk_gate("usb_ipg_gate", "ipg", CCM_PCCR1, 25); | ||
197 | clk[uart6_ipg_gate] = imx_clk_gate("uart6_ipg_gate", "ipg", CCM_PCCR1, 26); | ||
198 | clk[uart5_ipg_gate] = imx_clk_gate("uart5_ipg_gate", "ipg", CCM_PCCR1, 27); | ||
199 | clk[uart4_ipg_gate] = imx_clk_gate("uart4_ipg_gate", "ipg", CCM_PCCR1, 28); | ||
200 | clk[uart3_ipg_gate] = imx_clk_gate("uart3_ipg_gate", "ipg", CCM_PCCR1, 29); | ||
201 | clk[uart2_ipg_gate] = imx_clk_gate("uart2_ipg_gate", "ipg", CCM_PCCR1, 30); | ||
202 | clk[uart1_ipg_gate] = imx_clk_gate("uart1_ipg_gate", "ipg", CCM_PCCR1, 31); | ||
203 | 86 | ||
204 | for (i = 0; i < ARRAY_SIZE(clk); i++) | 87 | clk[IMX27_CLK_CLKO_DIV] = imx_clk_divider("clko_div", "clko_sel", CCM_PCDR0, 22, 3); |
205 | if (IS_ERR(clk[i])) | 88 | clk[IMX27_CLK_SSI1_SEL] = imx_clk_mux("ssi1_sel", CCM_CSCR, 22, 1, ssi_sel_clks, ARRAY_SIZE(ssi_sel_clks)); |
206 | pr_err("i.MX27 clk %d: register failed with %ld\n", | 89 | clk[IMX27_CLK_SSI2_SEL] = imx_clk_mux("ssi2_sel", CCM_CSCR, 23, 1, ssi_sel_clks, ARRAY_SIZE(ssi_sel_clks)); |
207 | i, PTR_ERR(clk[i])); | 90 | clk[IMX27_CLK_SSI1_DIV] = imx_clk_divider("ssi1_div", "ssi1_sel", CCM_PCDR0, 16, 6); |
91 | clk[IMX27_CLK_SSI2_DIV] = imx_clk_divider("ssi2_div", "ssi2_sel", CCM_PCDR0, 26, 6); | ||
92 | clk[IMX27_CLK_CLKO_EN] = imx_clk_gate("clko_en", "clko_div", CCM_PCCR0, 0); | ||
93 | clk[IMX27_CLK_SSI2_IPG_GATE] = imx_clk_gate("ssi2_ipg_gate", "ipg", CCM_PCCR0, 0); | ||
94 | clk[IMX27_CLK_SSI1_IPG_GATE] = imx_clk_gate("ssi1_ipg_gate", "ipg", CCM_PCCR0, 1); | ||
95 | clk[IMX27_CLK_SLCDC_IPG_GATE] = imx_clk_gate("slcdc_ipg_gate", "ipg", CCM_PCCR0, 2); | ||
96 | clk[IMX27_CLK_SDHC3_IPG_GATE] = imx_clk_gate("sdhc3_ipg_gate", "ipg", CCM_PCCR0, 3); | ||
97 | clk[IMX27_CLK_SDHC2_IPG_GATE] = imx_clk_gate("sdhc2_ipg_gate", "ipg", CCM_PCCR0, 4); | ||
98 | clk[IMX27_CLK_SDHC1_IPG_GATE] = imx_clk_gate("sdhc1_ipg_gate", "ipg", CCM_PCCR0, 5); | ||
99 | clk[IMX27_CLK_SCC_IPG_GATE] = imx_clk_gate("scc_ipg_gate", "ipg", CCM_PCCR0, 6); | ||
100 | clk[IMX27_CLK_SAHARA_IPG_GATE] = imx_clk_gate("sahara_ipg_gate", "ipg", CCM_PCCR0, 7); | ||
101 | clk[IMX27_CLK_RTIC_IPG_GATE] = imx_clk_gate("rtic_ipg_gate", "ipg", CCM_PCCR0, 8); | ||
102 | clk[IMX27_CLK_RTC_IPG_GATE] = imx_clk_gate("rtc_ipg_gate", "ipg", CCM_PCCR0, 9); | ||
103 | clk[IMX27_CLK_PWM_IPG_GATE] = imx_clk_gate("pwm_ipg_gate", "ipg", CCM_PCCR0, 11); | ||
104 | clk[IMX27_CLK_OWIRE_IPG_GATE] = imx_clk_gate("owire_ipg_gate", "ipg", CCM_PCCR0, 12); | ||
105 | clk[IMX27_CLK_MSHC_IPG_GATE] = imx_clk_gate("mshc_ipg_gate", "ipg", CCM_PCCR0, 13); | ||
106 | clk[IMX27_CLK_LCDC_IPG_GATE] = imx_clk_gate("lcdc_ipg_gate", "ipg", CCM_PCCR0, 14); | ||
107 | clk[IMX27_CLK_KPP_IPG_GATE] = imx_clk_gate("kpp_ipg_gate", "ipg", CCM_PCCR0, 15); | ||
108 | clk[IMX27_CLK_IIM_IPG_GATE] = imx_clk_gate("iim_ipg_gate", "ipg", CCM_PCCR0, 16); | ||
109 | clk[IMX27_CLK_I2C2_IPG_GATE] = imx_clk_gate("i2c2_ipg_gate", "ipg", CCM_PCCR0, 17); | ||
110 | clk[IMX27_CLK_I2C1_IPG_GATE] = imx_clk_gate("i2c1_ipg_gate", "ipg", CCM_PCCR0, 18); | ||
111 | clk[IMX27_CLK_GPT6_IPG_GATE] = imx_clk_gate("gpt6_ipg_gate", "ipg", CCM_PCCR0, 19); | ||
112 | clk[IMX27_CLK_GPT5_IPG_GATE] = imx_clk_gate("gpt5_ipg_gate", "ipg", CCM_PCCR0, 20); | ||
113 | clk[IMX27_CLK_GPT4_IPG_GATE] = imx_clk_gate("gpt4_ipg_gate", "ipg", CCM_PCCR0, 21); | ||
114 | clk[IMX27_CLK_GPT3_IPG_GATE] = imx_clk_gate("gpt3_ipg_gate", "ipg", CCM_PCCR0, 22); | ||
115 | clk[IMX27_CLK_GPT2_IPG_GATE] = imx_clk_gate("gpt2_ipg_gate", "ipg", CCM_PCCR0, 23); | ||
116 | clk[IMX27_CLK_GPT1_IPG_GATE] = imx_clk_gate("gpt1_ipg_gate", "ipg", CCM_PCCR0, 24); | ||
117 | clk[IMX27_CLK_GPIO_IPG_GATE] = imx_clk_gate("gpio_ipg_gate", "ipg", CCM_PCCR0, 25); | ||
118 | clk[IMX27_CLK_FEC_IPG_GATE] = imx_clk_gate("fec_ipg_gate", "ipg", CCM_PCCR0, 26); | ||
119 | clk[IMX27_CLK_EMMA_IPG_GATE] = imx_clk_gate("emma_ipg_gate", "ipg", CCM_PCCR0, 27); | ||
120 | clk[IMX27_CLK_DMA_IPG_GATE] = imx_clk_gate("dma_ipg_gate", "ipg", CCM_PCCR0, 28); | ||
121 | clk[IMX27_CLK_CSPI3_IPG_GATE] = imx_clk_gate("cspi3_ipg_gate", "ipg", CCM_PCCR0, 29); | ||
122 | clk[IMX27_CLK_CSPI2_IPG_GATE] = imx_clk_gate("cspi2_ipg_gate", "ipg", CCM_PCCR0, 30); | ||
123 | clk[IMX27_CLK_CSPI1_IPG_GATE] = imx_clk_gate("cspi1_ipg_gate", "ipg", CCM_PCCR0, 31); | ||
124 | clk[IMX27_CLK_MSHC_BAUD_GATE] = imx_clk_gate("mshc_baud_gate", "mshc_div", CCM_PCCR1, 2); | ||
125 | clk[IMX27_CLK_NFC_BAUD_GATE] = imx_clk_gate("nfc_baud_gate", "nfc_div", CCM_PCCR1, 3); | ||
126 | clk[IMX27_CLK_SSI2_BAUD_GATE] = imx_clk_gate("ssi2_baud_gate", "ssi2_div", CCM_PCCR1, 4); | ||
127 | clk[IMX27_CLK_SSI1_BAUD_GATE] = imx_clk_gate("ssi1_baud_gate", "ssi1_div", CCM_PCCR1, 5); | ||
128 | clk[IMX27_CLK_VPU_BAUD_GATE] = imx_clk_gate("vpu_baud_gate", "vpu_div", CCM_PCCR1, 6); | ||
129 | clk[IMX27_CLK_PER4_GATE] = imx_clk_gate("per4_gate", "per4_div", CCM_PCCR1, 7); | ||
130 | clk[IMX27_CLK_PER3_GATE] = imx_clk_gate("per3_gate", "per3_div", CCM_PCCR1, 8); | ||
131 | clk[IMX27_CLK_PER2_GATE] = imx_clk_gate("per2_gate", "per2_div", CCM_PCCR1, 9); | ||
132 | clk[IMX27_CLK_PER1_GATE] = imx_clk_gate("per1_gate", "per1_div", CCM_PCCR1, 10); | ||
133 | clk[IMX27_CLK_USB_AHB_GATE] = imx_clk_gate("usb_ahb_gate", "ahb", CCM_PCCR1, 11); | ||
134 | clk[IMX27_CLK_SLCDC_AHB_GATE] = imx_clk_gate("slcdc_ahb_gate", "ahb", CCM_PCCR1, 12); | ||
135 | clk[IMX27_CLK_SAHARA_AHB_GATE] = imx_clk_gate("sahara_ahb_gate", "ahb", CCM_PCCR1, 13); | ||
136 | clk[IMX27_CLK_RTIC_AHB_GATE] = imx_clk_gate("rtic_ahb_gate", "ahb", CCM_PCCR1, 14); | ||
137 | clk[IMX27_CLK_LCDC_AHB_GATE] = imx_clk_gate("lcdc_ahb_gate", "ahb", CCM_PCCR1, 15); | ||
138 | clk[IMX27_CLK_VPU_AHB_GATE] = imx_clk_gate("vpu_ahb_gate", "ahb", CCM_PCCR1, 16); | ||
139 | clk[IMX27_CLK_FEC_AHB_GATE] = imx_clk_gate("fec_ahb_gate", "ahb", CCM_PCCR1, 17); | ||
140 | clk[IMX27_CLK_EMMA_AHB_GATE] = imx_clk_gate("emma_ahb_gate", "ahb", CCM_PCCR1, 18); | ||
141 | clk[IMX27_CLK_EMI_AHB_GATE] = imx_clk_gate("emi_ahb_gate", "ahb", CCM_PCCR1, 19); | ||
142 | clk[IMX27_CLK_DMA_AHB_GATE] = imx_clk_gate("dma_ahb_gate", "ahb", CCM_PCCR1, 20); | ||
143 | clk[IMX27_CLK_CSI_AHB_GATE] = imx_clk_gate("csi_ahb_gate", "ahb", CCM_PCCR1, 21); | ||
144 | clk[IMX27_CLK_BROM_AHB_GATE] = imx_clk_gate("brom_ahb_gate", "ahb", CCM_PCCR1, 22); | ||
145 | clk[IMX27_CLK_ATA_AHB_GATE] = imx_clk_gate("ata_ahb_gate", "ahb", CCM_PCCR1, 23); | ||
146 | clk[IMX27_CLK_WDOG_IPG_GATE] = imx_clk_gate("wdog_ipg_gate", "ipg", CCM_PCCR1, 24); | ||
147 | clk[IMX27_CLK_USB_IPG_GATE] = imx_clk_gate("usb_ipg_gate", "ipg", CCM_PCCR1, 25); | ||
148 | clk[IMX27_CLK_UART6_IPG_GATE] = imx_clk_gate("uart6_ipg_gate", "ipg", CCM_PCCR1, 26); | ||
149 | clk[IMX27_CLK_UART5_IPG_GATE] = imx_clk_gate("uart5_ipg_gate", "ipg", CCM_PCCR1, 27); | ||
150 | clk[IMX27_CLK_UART4_IPG_GATE] = imx_clk_gate("uart4_ipg_gate", "ipg", CCM_PCCR1, 28); | ||
151 | clk[IMX27_CLK_UART3_IPG_GATE] = imx_clk_gate("uart3_ipg_gate", "ipg", CCM_PCCR1, 29); | ||
152 | clk[IMX27_CLK_UART2_IPG_GATE] = imx_clk_gate("uart2_ipg_gate", "ipg", CCM_PCCR1, 30); | ||
153 | clk[IMX27_CLK_UART1_IPG_GATE] = imx_clk_gate("uart1_ipg_gate", "ipg", CCM_PCCR1, 31); | ||
208 | 154 | ||
209 | np = of_find_compatible_node(NULL, NULL, "fsl,imx27-ccm"); | 155 | imx_check_clocks(clk, ARRAY_SIZE(clk)); |
210 | if (np) { | ||
211 | clk_data.clks = clk; | ||
212 | clk_data.clk_num = ARRAY_SIZE(clk); | ||
213 | of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data); | ||
214 | } | ||
215 | 156 | ||
216 | clk_register_clkdev(clk[uart1_ipg_gate], "ipg", "imx21-uart.0"); | 157 | clk_register_clkdev(clk[IMX27_CLK_CPU_DIV], NULL, "cpu0"); |
217 | clk_register_clkdev(clk[per1_gate], "per", "imx21-uart.0"); | ||
218 | clk_register_clkdev(clk[uart2_ipg_gate], "ipg", "imx21-uart.1"); | ||
219 | clk_register_clkdev(clk[per1_gate], "per", "imx21-uart.1"); | ||
220 | clk_register_clkdev(clk[uart3_ipg_gate], "ipg", "imx21-uart.2"); | ||
221 | clk_register_clkdev(clk[per1_gate], "per", "imx21-uart.2"); | ||
222 | clk_register_clkdev(clk[uart4_ipg_gate], "ipg", "imx21-uart.3"); | ||
223 | clk_register_clkdev(clk[per1_gate], "per", "imx21-uart.3"); | ||
224 | clk_register_clkdev(clk[uart5_ipg_gate], "ipg", "imx21-uart.4"); | ||
225 | clk_register_clkdev(clk[per1_gate], "per", "imx21-uart.4"); | ||
226 | clk_register_clkdev(clk[uart6_ipg_gate], "ipg", "imx21-uart.5"); | ||
227 | clk_register_clkdev(clk[per1_gate], "per", "imx21-uart.5"); | ||
228 | clk_register_clkdev(clk[gpt1_ipg_gate], "ipg", "imx-gpt.0"); | ||
229 | clk_register_clkdev(clk[per1_gate], "per", "imx-gpt.0"); | ||
230 | clk_register_clkdev(clk[per2_gate], "per", "imx21-mmc.0"); | ||
231 | clk_register_clkdev(clk[sdhc1_ipg_gate], "ipg", "imx21-mmc.0"); | ||
232 | clk_register_clkdev(clk[per2_gate], "per", "imx21-mmc.1"); | ||
233 | clk_register_clkdev(clk[sdhc2_ipg_gate], "ipg", "imx21-mmc.1"); | ||
234 | clk_register_clkdev(clk[per2_gate], "per", "imx21-mmc.2"); | ||
235 | clk_register_clkdev(clk[sdhc2_ipg_gate], "ipg", "imx21-mmc.2"); | ||
236 | clk_register_clkdev(clk[per2_gate], "per", "imx27-cspi.0"); | ||
237 | clk_register_clkdev(clk[cspi1_ipg_gate], "ipg", "imx27-cspi.0"); | ||
238 | clk_register_clkdev(clk[per2_gate], "per", "imx27-cspi.1"); | ||
239 | clk_register_clkdev(clk[cspi2_ipg_gate], "ipg", "imx27-cspi.1"); | ||
240 | clk_register_clkdev(clk[per2_gate], "per", "imx27-cspi.2"); | ||
241 | clk_register_clkdev(clk[cspi3_ipg_gate], "ipg", "imx27-cspi.2"); | ||
242 | clk_register_clkdev(clk[per3_gate], "per", "imx21-fb.0"); | ||
243 | clk_register_clkdev(clk[lcdc_ipg_gate], "ipg", "imx21-fb.0"); | ||
244 | clk_register_clkdev(clk[lcdc_ahb_gate], "ahb", "imx21-fb.0"); | ||
245 | clk_register_clkdev(clk[csi_ahb_gate], "ahb", "imx27-camera.0"); | ||
246 | clk_register_clkdev(clk[per4_gate], "per", "imx27-camera.0"); | ||
247 | clk_register_clkdev(clk[usb_div], "per", "imx-udc-mx27"); | ||
248 | clk_register_clkdev(clk[usb_ipg_gate], "ipg", "imx-udc-mx27"); | ||
249 | clk_register_clkdev(clk[usb_ahb_gate], "ahb", "imx-udc-mx27"); | ||
250 | clk_register_clkdev(clk[usb_div], "per", "mxc-ehci.0"); | ||
251 | clk_register_clkdev(clk[usb_ipg_gate], "ipg", "mxc-ehci.0"); | ||
252 | clk_register_clkdev(clk[usb_ahb_gate], "ahb", "mxc-ehci.0"); | ||
253 | clk_register_clkdev(clk[usb_div], "per", "mxc-ehci.1"); | ||
254 | clk_register_clkdev(clk[usb_ipg_gate], "ipg", "mxc-ehci.1"); | ||
255 | clk_register_clkdev(clk[usb_ahb_gate], "ahb", "mxc-ehci.1"); | ||
256 | clk_register_clkdev(clk[usb_div], "per", "mxc-ehci.2"); | ||
257 | clk_register_clkdev(clk[usb_ipg_gate], "ipg", "mxc-ehci.2"); | ||
258 | clk_register_clkdev(clk[usb_ahb_gate], "ahb", "mxc-ehci.2"); | ||
259 | clk_register_clkdev(clk[ssi1_ipg_gate], NULL, "imx-ssi.0"); | ||
260 | clk_register_clkdev(clk[ssi2_ipg_gate], NULL, "imx-ssi.1"); | ||
261 | clk_register_clkdev(clk[nfc_baud_gate], NULL, "imx27-nand.0"); | ||
262 | clk_register_clkdev(clk[vpu_baud_gate], "per", "coda-imx27.0"); | ||
263 | clk_register_clkdev(clk[vpu_ahb_gate], "ahb", "coda-imx27.0"); | ||
264 | clk_register_clkdev(clk[dma_ahb_gate], "ahb", "imx27-dma"); | ||
265 | clk_register_clkdev(clk[dma_ipg_gate], "ipg", "imx27-dma"); | ||
266 | clk_register_clkdev(clk[fec_ipg_gate], "ipg", "imx27-fec.0"); | ||
267 | clk_register_clkdev(clk[fec_ahb_gate], "ahb", "imx27-fec.0"); | ||
268 | clk_register_clkdev(clk[wdog_ipg_gate], NULL, "imx2-wdt.0"); | ||
269 | clk_register_clkdev(clk[i2c1_ipg_gate], NULL, "imx21-i2c.0"); | ||
270 | clk_register_clkdev(clk[i2c2_ipg_gate], NULL, "imx21-i2c.1"); | ||
271 | clk_register_clkdev(clk[owire_ipg_gate], NULL, "mxc_w1.0"); | ||
272 | clk_register_clkdev(clk[kpp_ipg_gate], NULL, "imx-keypad"); | ||
273 | clk_register_clkdev(clk[emma_ahb_gate], "emma-ahb", "imx27-camera.0"); | ||
274 | clk_register_clkdev(clk[emma_ipg_gate], "emma-ipg", "imx27-camera.0"); | ||
275 | clk_register_clkdev(clk[emma_ahb_gate], "ahb", "m2m-emmaprp.0"); | ||
276 | clk_register_clkdev(clk[emma_ipg_gate], "ipg", "m2m-emmaprp.0"); | ||
277 | clk_register_clkdev(clk[cpu_div], NULL, "cpu0"); | ||
278 | 158 | ||
279 | mxc_timer_init(MX27_IO_ADDRESS(MX27_GPT1_BASE_ADDR), MX27_INT_GPT1); | 159 | clk_prepare_enable(clk[IMX27_CLK_EMI_AHB_GATE]); |
280 | |||
281 | clk_prepare_enable(clk[emi_ahb_gate]); | ||
282 | 160 | ||
283 | imx_print_silicon_rev("i.MX27", mx27_revision()); | 161 | imx_print_silicon_rev("i.MX27", mx27_revision()); |
162 | } | ||
163 | |||
164 | int __init mx27_clocks_init(unsigned long fref) | ||
165 | { | ||
166 | ccm = ioremap(MX27_CCM_BASE_ADDR, SZ_4K); | ||
167 | |||
168 | _mx27_clocks_init(fref); | ||
169 | |||
170 | clk_register_clkdev(clk[IMX27_CLK_UART1_IPG_GATE], "ipg", "imx21-uart.0"); | ||
171 | clk_register_clkdev(clk[IMX27_CLK_PER1_GATE], "per", "imx21-uart.0"); | ||
172 | clk_register_clkdev(clk[IMX27_CLK_UART2_IPG_GATE], "ipg", "imx21-uart.1"); | ||
173 | clk_register_clkdev(clk[IMX27_CLK_PER1_GATE], "per", "imx21-uart.1"); | ||
174 | clk_register_clkdev(clk[IMX27_CLK_UART3_IPG_GATE], "ipg", "imx21-uart.2"); | ||
175 | clk_register_clkdev(clk[IMX27_CLK_PER1_GATE], "per", "imx21-uart.2"); | ||
176 | clk_register_clkdev(clk[IMX27_CLK_UART4_IPG_GATE], "ipg", "imx21-uart.3"); | ||
177 | clk_register_clkdev(clk[IMX27_CLK_PER1_GATE], "per", "imx21-uart.3"); | ||
178 | clk_register_clkdev(clk[IMX27_CLK_UART5_IPG_GATE], "ipg", "imx21-uart.4"); | ||
179 | clk_register_clkdev(clk[IMX27_CLK_PER1_GATE], "per", "imx21-uart.4"); | ||
180 | clk_register_clkdev(clk[IMX27_CLK_UART6_IPG_GATE], "ipg", "imx21-uart.5"); | ||
181 | clk_register_clkdev(clk[IMX27_CLK_PER1_GATE], "per", "imx21-uart.5"); | ||
182 | clk_register_clkdev(clk[IMX27_CLK_GPT1_IPG_GATE], "ipg", "imx-gpt.0"); | ||
183 | clk_register_clkdev(clk[IMX27_CLK_PER1_GATE], "per", "imx-gpt.0"); | ||
184 | clk_register_clkdev(clk[IMX27_CLK_PER2_GATE], "per", "imx21-mmc.0"); | ||
185 | clk_register_clkdev(clk[IMX27_CLK_SDHC1_IPG_GATE], "ipg", "imx21-mmc.0"); | ||
186 | clk_register_clkdev(clk[IMX27_CLK_PER2_GATE], "per", "imx21-mmc.1"); | ||
187 | clk_register_clkdev(clk[IMX27_CLK_SDHC2_IPG_GATE], "ipg", "imx21-mmc.1"); | ||
188 | clk_register_clkdev(clk[IMX27_CLK_PER2_GATE], "per", "imx21-mmc.2"); | ||
189 | clk_register_clkdev(clk[IMX27_CLK_SDHC2_IPG_GATE], "ipg", "imx21-mmc.2"); | ||
190 | clk_register_clkdev(clk[IMX27_CLK_PER2_GATE], "per", "imx27-cspi.0"); | ||
191 | clk_register_clkdev(clk[IMX27_CLK_CSPI1_IPG_GATE], "ipg", "imx27-cspi.0"); | ||
192 | clk_register_clkdev(clk[IMX27_CLK_PER2_GATE], "per", "imx27-cspi.1"); | ||
193 | clk_register_clkdev(clk[IMX27_CLK_CSPI2_IPG_GATE], "ipg", "imx27-cspi.1"); | ||
194 | clk_register_clkdev(clk[IMX27_CLK_PER2_GATE], "per", "imx27-cspi.2"); | ||
195 | clk_register_clkdev(clk[IMX27_CLK_CSPI3_IPG_GATE], "ipg", "imx27-cspi.2"); | ||
196 | clk_register_clkdev(clk[IMX27_CLK_PER3_GATE], "per", "imx21-fb.0"); | ||
197 | clk_register_clkdev(clk[IMX27_CLK_LCDC_IPG_GATE], "ipg", "imx21-fb.0"); | ||
198 | clk_register_clkdev(clk[IMX27_CLK_LCDC_AHB_GATE], "ahb", "imx21-fb.0"); | ||
199 | clk_register_clkdev(clk[IMX27_CLK_CSI_AHB_GATE], "ahb", "imx27-camera.0"); | ||
200 | clk_register_clkdev(clk[IMX27_CLK_PER4_GATE], "per", "imx27-camera.0"); | ||
201 | clk_register_clkdev(clk[IMX27_CLK_USB_DIV], "per", "imx-udc-mx27"); | ||
202 | clk_register_clkdev(clk[IMX27_CLK_USB_IPG_GATE], "ipg", "imx-udc-mx27"); | ||
203 | clk_register_clkdev(clk[IMX27_CLK_USB_AHB_GATE], "ahb", "imx-udc-mx27"); | ||
204 | clk_register_clkdev(clk[IMX27_CLK_USB_DIV], "per", "mxc-ehci.0"); | ||
205 | clk_register_clkdev(clk[IMX27_CLK_USB_IPG_GATE], "ipg", "mxc-ehci.0"); | ||
206 | clk_register_clkdev(clk[IMX27_CLK_USB_AHB_GATE], "ahb", "mxc-ehci.0"); | ||
207 | clk_register_clkdev(clk[IMX27_CLK_USB_DIV], "per", "mxc-ehci.1"); | ||
208 | clk_register_clkdev(clk[IMX27_CLK_USB_IPG_GATE], "ipg", "mxc-ehci.1"); | ||
209 | clk_register_clkdev(clk[IMX27_CLK_USB_AHB_GATE], "ahb", "mxc-ehci.1"); | ||
210 | clk_register_clkdev(clk[IMX27_CLK_USB_DIV], "per", "mxc-ehci.2"); | ||
211 | clk_register_clkdev(clk[IMX27_CLK_USB_IPG_GATE], "ipg", "mxc-ehci.2"); | ||
212 | clk_register_clkdev(clk[IMX27_CLK_USB_AHB_GATE], "ahb", "mxc-ehci.2"); | ||
213 | clk_register_clkdev(clk[IMX27_CLK_SSI1_IPG_GATE], NULL, "imx-ssi.0"); | ||
214 | clk_register_clkdev(clk[IMX27_CLK_SSI2_IPG_GATE], NULL, "imx-ssi.1"); | ||
215 | clk_register_clkdev(clk[IMX27_CLK_NFC_BAUD_GATE], NULL, "imx27-nand.0"); | ||
216 | clk_register_clkdev(clk[IMX27_CLK_VPU_BAUD_GATE], "per", "coda-imx27.0"); | ||
217 | clk_register_clkdev(clk[IMX27_CLK_VPU_AHB_GATE], "ahb", "coda-imx27.0"); | ||
218 | clk_register_clkdev(clk[IMX27_CLK_DMA_AHB_GATE], "ahb", "imx27-dma"); | ||
219 | clk_register_clkdev(clk[IMX27_CLK_DMA_IPG_GATE], "ipg", "imx27-dma"); | ||
220 | clk_register_clkdev(clk[IMX27_CLK_FEC_IPG_GATE], "ipg", "imx27-fec.0"); | ||
221 | clk_register_clkdev(clk[IMX27_CLK_FEC_AHB_GATE], "ahb", "imx27-fec.0"); | ||
222 | clk_register_clkdev(clk[IMX27_CLK_WDOG_IPG_GATE], NULL, "imx2-wdt.0"); | ||
223 | clk_register_clkdev(clk[IMX27_CLK_I2C1_IPG_GATE], NULL, "imx21-i2c.0"); | ||
224 | clk_register_clkdev(clk[IMX27_CLK_I2C2_IPG_GATE], NULL, "imx21-i2c.1"); | ||
225 | clk_register_clkdev(clk[IMX27_CLK_OWIRE_IPG_GATE], NULL, "mxc_w1.0"); | ||
226 | clk_register_clkdev(clk[IMX27_CLK_KPP_IPG_GATE], NULL, "imx-keypad"); | ||
227 | clk_register_clkdev(clk[IMX27_CLK_EMMA_AHB_GATE], "emma-ahb", "imx27-camera.0"); | ||
228 | clk_register_clkdev(clk[IMX27_CLK_EMMA_IPG_GATE], "emma-ipg", "imx27-camera.0"); | ||
229 | clk_register_clkdev(clk[IMX27_CLK_EMMA_AHB_GATE], "ahb", "m2m-emmaprp.0"); | ||
230 | clk_register_clkdev(clk[IMX27_CLK_EMMA_IPG_GATE], "ipg", "m2m-emmaprp.0"); | ||
231 | |||
232 | mxc_timer_init(MX27_IO_ADDRESS(MX27_GPT1_BASE_ADDR), MX27_INT_GPT1); | ||
284 | 233 | ||
285 | return 0; | 234 | return 0; |
286 | } | 235 | } |
287 | 236 | ||
288 | int __init mx27_clocks_init_dt(void) | 237 | static void __init mx27_clocks_init_dt(struct device_node *np) |
289 | { | 238 | { |
290 | struct device_node *np; | 239 | struct device_node *refnp; |
291 | u32 fref = 26000000; /* default */ | 240 | u32 fref = 26000000; /* default */ |
292 | 241 | ||
293 | for_each_compatible_node(np, NULL, "fixed-clock") { | 242 | for_each_compatible_node(refnp, NULL, "fixed-clock") { |
294 | if (!of_device_is_compatible(np, "fsl,imx-osc26m")) | 243 | if (!of_device_is_compatible(refnp, "fsl,imx-osc26m")) |
295 | continue; | 244 | continue; |
296 | 245 | ||
297 | if (!of_property_read_u32(np, "clock-frequency", &fref)) | 246 | if (!of_property_read_u32(refnp, "clock-frequency", &fref)) |
298 | break; | 247 | break; |
299 | } | 248 | } |
300 | 249 | ||
301 | return mx27_clocks_init(fref); | 250 | ccm = of_iomap(np, 0); |
251 | |||
252 | _mx27_clocks_init(fref); | ||
253 | |||
254 | clk_data.clks = clk; | ||
255 | clk_data.clk_num = ARRAY_SIZE(clk); | ||
256 | of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data); | ||
302 | } | 257 | } |
258 | CLK_OF_DECLARE(imx27_ccm, "fsl,imx27-ccm", mx27_clocks_init_dt); | ||
diff --git a/arch/arm/mach-imx/clk-imx31.c b/arch/arm/mach-imx/clk-imx31.c index 4a9de0835eb1..286ef422cebc 100644 --- a/arch/arm/mach-imx/clk-imx31.c +++ b/arch/arm/mach-imx/clk-imx31.c | |||
@@ -51,7 +51,6 @@ static struct clk_onecell_data clk_data; | |||
51 | int __init mx31_clocks_init(unsigned long fref) | 51 | int __init mx31_clocks_init(unsigned long fref) |
52 | { | 52 | { |
53 | void __iomem *base = MX31_IO_ADDRESS(MX31_CCM_BASE_ADDR); | 53 | void __iomem *base = MX31_IO_ADDRESS(MX31_CCM_BASE_ADDR); |
54 | int i; | ||
55 | struct device_node *np; | 54 | struct device_node *np; |
56 | 55 | ||
57 | clk[dummy] = imx_clk_fixed("dummy", 0); | 56 | clk[dummy] = imx_clk_fixed("dummy", 0); |
@@ -114,10 +113,7 @@ int __init mx31_clocks_init(unsigned long fref) | |||
114 | clk[rtic_gate] = imx_clk_gate2("rtic_gate", "ahb", base + MXC_CCM_CGR2, 10); | 113 | clk[rtic_gate] = imx_clk_gate2("rtic_gate", "ahb", base + MXC_CCM_CGR2, 10); |
115 | clk[firi_gate] = imx_clk_gate2("firi_gate", "upll", base+MXC_CCM_CGR2, 12); | 114 | clk[firi_gate] = imx_clk_gate2("firi_gate", "upll", base+MXC_CCM_CGR2, 12); |
116 | 115 | ||
117 | for (i = 0; i < ARRAY_SIZE(clk); i++) | 116 | imx_check_clocks(clk, ARRAY_SIZE(clk)); |
118 | if (IS_ERR(clk[i])) | ||
119 | pr_err("imx31 clk %d: register failed with %ld\n", | ||
120 | i, PTR_ERR(clk[i])); | ||
121 | 117 | ||
122 | np = of_find_compatible_node(NULL, NULL, "fsl,imx31-ccm"); | 118 | np = of_find_compatible_node(NULL, NULL, "fsl,imx31-ccm"); |
123 | 119 | ||
diff --git a/arch/arm/mach-imx/clk-imx35.c b/arch/arm/mach-imx/clk-imx35.c index 71c86a2f856d..a0d2b57fd376 100644 --- a/arch/arm/mach-imx/clk-imx35.c +++ b/arch/arm/mach-imx/clk-imx35.c | |||
@@ -75,7 +75,6 @@ int __init mx35_clocks_init(void) | |||
75 | u32 pdr0, consumer_sel, hsp_sel; | 75 | u32 pdr0, consumer_sel, hsp_sel; |
76 | struct arm_ahb_div *aad; | 76 | struct arm_ahb_div *aad; |
77 | unsigned char *hsp_div; | 77 | unsigned char *hsp_div; |
78 | u32 i; | ||
79 | 78 | ||
80 | pdr0 = __raw_readl(base + MXC_CCM_PDR0); | 79 | pdr0 = __raw_readl(base + MXC_CCM_PDR0); |
81 | consumer_sel = (pdr0 >> 16) & 0xf; | 80 | consumer_sel = (pdr0 >> 16) & 0xf; |
@@ -200,10 +199,7 @@ int __init mx35_clocks_init(void) | |||
200 | clk[iim_gate] = imx_clk_gate2("iim_gate", "ipg", base + MX35_CCM_CGR3, 2); | 199 | clk[iim_gate] = imx_clk_gate2("iim_gate", "ipg", base + MX35_CCM_CGR3, 2); |
201 | clk[gpu2d_gate] = imx_clk_gate2("gpu2d_gate", "ahb", base + MX35_CCM_CGR3, 4); | 200 | clk[gpu2d_gate] = imx_clk_gate2("gpu2d_gate", "ahb", base + MX35_CCM_CGR3, 4); |
202 | 201 | ||
203 | for (i = 0; i < ARRAY_SIZE(clk); i++) | 202 | imx_check_clocks(clk, ARRAY_SIZE(clk)); |
204 | if (IS_ERR(clk[i])) | ||
205 | pr_err("i.MX35 clk %d: register failed with %ld\n", | ||
206 | i, PTR_ERR(clk[i])); | ||
207 | 203 | ||
208 | clk_register_clkdev(clk[pata_gate], NULL, "pata_imx"); | 204 | clk_register_clkdev(clk[pata_gate], NULL, "pata_imx"); |
209 | clk_register_clkdev(clk[can1_gate], NULL, "flexcan.0"); | 205 | clk_register_clkdev(clk[can1_gate], NULL, "flexcan.0"); |
diff --git a/arch/arm/mach-imx/clk-imx51-imx53.c b/arch/arm/mach-imx/clk-imx51-imx53.c index 21d2b111c83d..72d65214223e 100644 --- a/arch/arm/mach-imx/clk-imx51-imx53.c +++ b/arch/arm/mach-imx/clk-imx51-imx53.c | |||
@@ -18,11 +18,54 @@ | |||
18 | #include <linux/of_irq.h> | 18 | #include <linux/of_irq.h> |
19 | #include <dt-bindings/clock/imx5-clock.h> | 19 | #include <dt-bindings/clock/imx5-clock.h> |
20 | 20 | ||
21 | #include "crm-regs-imx5.h" | ||
22 | #include "clk.h" | 21 | #include "clk.h" |
23 | #include "common.h" | 22 | #include "common.h" |
24 | #include "hardware.h" | 23 | #include "hardware.h" |
25 | 24 | ||
25 | #define MX51_DPLL1_BASE 0x83f80000 | ||
26 | #define MX51_DPLL2_BASE 0x83f84000 | ||
27 | #define MX51_DPLL3_BASE 0x83f88000 | ||
28 | |||
29 | #define MX53_DPLL1_BASE 0x63f80000 | ||
30 | #define MX53_DPLL2_BASE 0x63f84000 | ||
31 | #define MX53_DPLL3_BASE 0x63f88000 | ||
32 | #define MX53_DPLL4_BASE 0x63f8c000 | ||
33 | |||
34 | #define MXC_CCM_CCR (ccm_base + 0x00) | ||
35 | #define MXC_CCM_CCDR (ccm_base + 0x04) | ||
36 | #define MXC_CCM_CSR (ccm_base + 0x08) | ||
37 | #define MXC_CCM_CCSR (ccm_base + 0x0c) | ||
38 | #define MXC_CCM_CACRR (ccm_base + 0x10) | ||
39 | #define MXC_CCM_CBCDR (ccm_base + 0x14) | ||
40 | #define MXC_CCM_CBCMR (ccm_base + 0x18) | ||
41 | #define MXC_CCM_CSCMR1 (ccm_base + 0x1c) | ||
42 | #define MXC_CCM_CSCMR2 (ccm_base + 0x20) | ||
43 | #define MXC_CCM_CSCDR1 (ccm_base + 0x24) | ||
44 | #define MXC_CCM_CS1CDR (ccm_base + 0x28) | ||
45 | #define MXC_CCM_CS2CDR (ccm_base + 0x2c) | ||
46 | #define MXC_CCM_CDCDR (ccm_base + 0x30) | ||
47 | #define MXC_CCM_CHSCDR (ccm_base + 0x34) | ||
48 | #define MXC_CCM_CSCDR2 (ccm_base + 0x38) | ||
49 | #define MXC_CCM_CSCDR3 (ccm_base + 0x3c) | ||
50 | #define MXC_CCM_CSCDR4 (ccm_base + 0x40) | ||
51 | #define MXC_CCM_CWDR (ccm_base + 0x44) | ||
52 | #define MXC_CCM_CDHIPR (ccm_base + 0x48) | ||
53 | #define MXC_CCM_CDCR (ccm_base + 0x4c) | ||
54 | #define MXC_CCM_CTOR (ccm_base + 0x50) | ||
55 | #define MXC_CCM_CLPCR (ccm_base + 0x54) | ||
56 | #define MXC_CCM_CISR (ccm_base + 0x58) | ||
57 | #define MXC_CCM_CIMR (ccm_base + 0x5c) | ||
58 | #define MXC_CCM_CCOSR (ccm_base + 0x60) | ||
59 | #define MXC_CCM_CGPR (ccm_base + 0x64) | ||
60 | #define MXC_CCM_CCGR0 (ccm_base + 0x68) | ||
61 | #define MXC_CCM_CCGR1 (ccm_base + 0x6c) | ||
62 | #define MXC_CCM_CCGR2 (ccm_base + 0x70) | ||
63 | #define MXC_CCM_CCGR3 (ccm_base + 0x74) | ||
64 | #define MXC_CCM_CCGR4 (ccm_base + 0x78) | ||
65 | #define MXC_CCM_CCGR5 (ccm_base + 0x7c) | ||
66 | #define MXC_CCM_CCGR6 (ccm_base + 0x80) | ||
67 | #define MXC_CCM_CCGR7 (ccm_base + 0x84) | ||
68 | |||
26 | /* Low-power Audio Playback Mode clock */ | 69 | /* Low-power Audio Playback Mode clock */ |
27 | static const char *lp_apm_sel[] = { "osc", }; | 70 | static const char *lp_apm_sel[] = { "osc", }; |
28 | 71 | ||
@@ -86,17 +129,15 @@ static const char *mx51_spdif1_com_sel[] = { "spdif1_podf", "ssi2_root_gate", }; | |||
86 | static struct clk *clk[IMX5_CLK_END]; | 129 | static struct clk *clk[IMX5_CLK_END]; |
87 | static struct clk_onecell_data clk_data; | 130 | static struct clk_onecell_data clk_data; |
88 | 131 | ||
89 | static void __init mx5_clocks_common_init(unsigned long rate_ckil, | 132 | static void __init mx5_clocks_common_init(void __iomem *ccm_base) |
90 | unsigned long rate_osc, unsigned long rate_ckih1, | ||
91 | unsigned long rate_ckih2) | ||
92 | { | 133 | { |
93 | int i; | 134 | imx5_pm_set_ccm_base(ccm_base); |
94 | 135 | ||
95 | clk[IMX5_CLK_DUMMY] = imx_clk_fixed("dummy", 0); | 136 | clk[IMX5_CLK_DUMMY] = imx_clk_fixed("dummy", 0); |
96 | clk[IMX5_CLK_CKIL] = imx_obtain_fixed_clock("ckil", rate_ckil); | 137 | clk[IMX5_CLK_CKIL] = imx_obtain_fixed_clock("ckil", 0); |
97 | clk[IMX5_CLK_OSC] = imx_obtain_fixed_clock("osc", rate_osc); | 138 | clk[IMX5_CLK_OSC] = imx_obtain_fixed_clock("osc", 0); |
98 | clk[IMX5_CLK_CKIH1] = imx_obtain_fixed_clock("ckih1", rate_ckih1); | 139 | clk[IMX5_CLK_CKIH1] = imx_obtain_fixed_clock("ckih1", 0); |
99 | clk[IMX5_CLK_CKIH2] = imx_obtain_fixed_clock("ckih2", rate_ckih2); | 140 | clk[IMX5_CLK_CKIH2] = imx_obtain_fixed_clock("ckih2", 0); |
100 | 141 | ||
101 | clk[IMX5_CLK_PERIPH_APM] = imx_clk_mux("periph_apm", MXC_CCM_CBCMR, 12, 2, | 142 | clk[IMX5_CLK_PERIPH_APM] = imx_clk_mux("periph_apm", MXC_CCM_CBCMR, 12, 2, |
102 | periph_apm_sel, ARRAY_SIZE(periph_apm_sel)); | 143 | periph_apm_sel, ARRAY_SIZE(periph_apm_sel)); |
@@ -244,58 +285,8 @@ static void __init mx5_clocks_common_init(unsigned long rate_ckil, | |||
244 | clk[IMX5_CLK_SAHARA_IPG_GATE] = imx_clk_gate2("sahara_ipg_gate", "ipg", MXC_CCM_CCGR4, 14); | 285 | clk[IMX5_CLK_SAHARA_IPG_GATE] = imx_clk_gate2("sahara_ipg_gate", "ipg", MXC_CCM_CCGR4, 14); |
245 | clk[IMX5_CLK_SATA_REF] = imx_clk_fixed_factor("sata_ref", "usb_phy1_gate", 1, 1); | 286 | clk[IMX5_CLK_SATA_REF] = imx_clk_fixed_factor("sata_ref", "usb_phy1_gate", 1, 1); |
246 | 287 | ||
247 | for (i = 0; i < ARRAY_SIZE(clk); i++) | ||
248 | if (IS_ERR(clk[i])) | ||
249 | pr_err("i.MX5 clk %d: register failed with %ld\n", | ||
250 | i, PTR_ERR(clk[i])); | ||
251 | |||
252 | clk_register_clkdev(clk[IMX5_CLK_GPT_HF_GATE], "per", "imx-gpt.0"); | ||
253 | clk_register_clkdev(clk[IMX5_CLK_GPT_IPG_GATE], "ipg", "imx-gpt.0"); | ||
254 | clk_register_clkdev(clk[IMX5_CLK_UART1_PER_GATE], "per", "imx21-uart.0"); | ||
255 | clk_register_clkdev(clk[IMX5_CLK_UART1_IPG_GATE], "ipg", "imx21-uart.0"); | ||
256 | clk_register_clkdev(clk[IMX5_CLK_UART2_PER_GATE], "per", "imx21-uart.1"); | ||
257 | clk_register_clkdev(clk[IMX5_CLK_UART2_IPG_GATE], "ipg", "imx21-uart.1"); | ||
258 | clk_register_clkdev(clk[IMX5_CLK_UART3_PER_GATE], "per", "imx21-uart.2"); | ||
259 | clk_register_clkdev(clk[IMX5_CLK_UART3_IPG_GATE], "ipg", "imx21-uart.2"); | ||
260 | clk_register_clkdev(clk[IMX5_CLK_UART4_PER_GATE], "per", "imx21-uart.3"); | ||
261 | clk_register_clkdev(clk[IMX5_CLK_UART4_IPG_GATE], "ipg", "imx21-uart.3"); | ||
262 | clk_register_clkdev(clk[IMX5_CLK_UART5_PER_GATE], "per", "imx21-uart.4"); | ||
263 | clk_register_clkdev(clk[IMX5_CLK_UART5_IPG_GATE], "ipg", "imx21-uart.4"); | ||
264 | clk_register_clkdev(clk[IMX5_CLK_ECSPI1_PER_GATE], "per", "imx51-ecspi.0"); | ||
265 | clk_register_clkdev(clk[IMX5_CLK_ECSPI1_IPG_GATE], "ipg", "imx51-ecspi.0"); | ||
266 | clk_register_clkdev(clk[IMX5_CLK_ECSPI2_PER_GATE], "per", "imx51-ecspi.1"); | ||
267 | clk_register_clkdev(clk[IMX5_CLK_ECSPI2_IPG_GATE], "ipg", "imx51-ecspi.1"); | ||
268 | clk_register_clkdev(clk[IMX5_CLK_CSPI_IPG_GATE], NULL, "imx35-cspi.2"); | ||
269 | clk_register_clkdev(clk[IMX5_CLK_I2C1_GATE], NULL, "imx21-i2c.0"); | ||
270 | clk_register_clkdev(clk[IMX5_CLK_I2C2_GATE], NULL, "imx21-i2c.1"); | ||
271 | clk_register_clkdev(clk[IMX5_CLK_USBOH3_PER_GATE], "per", "mxc-ehci.0"); | ||
272 | clk_register_clkdev(clk[IMX5_CLK_USBOH3_GATE], "ipg", "mxc-ehci.0"); | ||
273 | clk_register_clkdev(clk[IMX5_CLK_USBOH3_GATE], "ahb", "mxc-ehci.0"); | ||
274 | clk_register_clkdev(clk[IMX5_CLK_USBOH3_PER_GATE], "per", "mxc-ehci.1"); | ||
275 | clk_register_clkdev(clk[IMX5_CLK_USBOH3_GATE], "ipg", "mxc-ehci.1"); | ||
276 | clk_register_clkdev(clk[IMX5_CLK_USBOH3_GATE], "ahb", "mxc-ehci.1"); | ||
277 | clk_register_clkdev(clk[IMX5_CLK_USBOH3_PER_GATE], "per", "mxc-ehci.2"); | ||
278 | clk_register_clkdev(clk[IMX5_CLK_USBOH3_GATE], "ipg", "mxc-ehci.2"); | ||
279 | clk_register_clkdev(clk[IMX5_CLK_USBOH3_GATE], "ahb", "mxc-ehci.2"); | ||
280 | clk_register_clkdev(clk[IMX5_CLK_USBOH3_PER_GATE], "per", "imx-udc-mx51"); | ||
281 | clk_register_clkdev(clk[IMX5_CLK_USBOH3_GATE], "ipg", "imx-udc-mx51"); | ||
282 | clk_register_clkdev(clk[IMX5_CLK_USBOH3_GATE], "ahb", "imx-udc-mx51"); | ||
283 | clk_register_clkdev(clk[IMX5_CLK_NFC_GATE], NULL, "imx51-nand"); | ||
284 | clk_register_clkdev(clk[IMX5_CLK_SSI1_IPG_GATE], NULL, "imx-ssi.0"); | ||
285 | clk_register_clkdev(clk[IMX5_CLK_SSI2_IPG_GATE], NULL, "imx-ssi.1"); | ||
286 | clk_register_clkdev(clk[IMX5_CLK_SSI3_IPG_GATE], NULL, "imx-ssi.2"); | ||
287 | clk_register_clkdev(clk[IMX5_CLK_SDMA_GATE], NULL, "imx35-sdma"); | ||
288 | clk_register_clkdev(clk[IMX5_CLK_CPU_PODF], NULL, "cpu0"); | 288 | clk_register_clkdev(clk[IMX5_CLK_CPU_PODF], NULL, "cpu0"); |
289 | clk_register_clkdev(clk[IMX5_CLK_IIM_GATE], "iim", NULL); | ||
290 | clk_register_clkdev(clk[IMX5_CLK_DUMMY], NULL, "imx2-wdt.0"); | ||
291 | clk_register_clkdev(clk[IMX5_CLK_DUMMY], NULL, "imx2-wdt.1"); | ||
292 | clk_register_clkdev(clk[IMX5_CLK_DUMMY], NULL, "imx-keypad"); | ||
293 | clk_register_clkdev(clk[IMX5_CLK_IPU_DI1_GATE], "di1", "imx-tve.0"); | ||
294 | clk_register_clkdev(clk[IMX5_CLK_GPC_DVFS], "gpc_dvfs", NULL); | 289 | clk_register_clkdev(clk[IMX5_CLK_GPC_DVFS], "gpc_dvfs", NULL); |
295 | clk_register_clkdev(clk[IMX5_CLK_EPIT1_IPG_GATE], "ipg", "imx-epit.0"); | ||
296 | clk_register_clkdev(clk[IMX5_CLK_EPIT1_HF_GATE], "per", "imx-epit.0"); | ||
297 | clk_register_clkdev(clk[IMX5_CLK_EPIT2_IPG_GATE], "ipg", "imx-epit.1"); | ||
298 | clk_register_clkdev(clk[IMX5_CLK_EPIT2_HF_GATE], "per", "imx-epit.1"); | ||
299 | 290 | ||
300 | /* Set SDHC parents to be PLL2 */ | 291 | /* Set SDHC parents to be PLL2 */ |
301 | clk_set_parent(clk[IMX5_CLK_ESDHC_A_SEL], clk[IMX5_CLK_PLL2_SW]); | 292 | clk_set_parent(clk[IMX5_CLK_ESDHC_A_SEL], clk[IMX5_CLK_PLL2_SW]); |
@@ -322,12 +313,26 @@ static void __init mx5_clocks_common_init(unsigned long rate_ckil, | |||
322 | 313 | ||
323 | static void __init mx50_clocks_init(struct device_node *np) | 314 | static void __init mx50_clocks_init(struct device_node *np) |
324 | { | 315 | { |
316 | void __iomem *ccm_base; | ||
317 | void __iomem *pll_base; | ||
325 | unsigned long r; | 318 | unsigned long r; |
326 | int i; | ||
327 | 319 | ||
328 | clk[IMX5_CLK_PLL1_SW] = imx_clk_pllv2("pll1_sw", "osc", MX53_DPLL1_BASE); | 320 | pll_base = ioremap(MX53_DPLL1_BASE, SZ_16K); |
329 | clk[IMX5_CLK_PLL2_SW] = imx_clk_pllv2("pll2_sw", "osc", MX53_DPLL2_BASE); | 321 | WARN_ON(!pll_base); |
330 | clk[IMX5_CLK_PLL3_SW] = imx_clk_pllv2("pll3_sw", "osc", MX53_DPLL3_BASE); | 322 | clk[IMX5_CLK_PLL1_SW] = imx_clk_pllv2("pll1_sw", "osc", pll_base); |
323 | |||
324 | pll_base = ioremap(MX53_DPLL2_BASE, SZ_16K); | ||
325 | WARN_ON(!pll_base); | ||
326 | clk[IMX5_CLK_PLL2_SW] = imx_clk_pllv2("pll2_sw", "osc", pll_base); | ||
327 | |||
328 | pll_base = ioremap(MX53_DPLL3_BASE, SZ_16K); | ||
329 | WARN_ON(!pll_base); | ||
330 | clk[IMX5_CLK_PLL3_SW] = imx_clk_pllv2("pll3_sw", "osc", pll_base); | ||
331 | |||
332 | ccm_base = of_iomap(np, 0); | ||
333 | WARN_ON(!ccm_base); | ||
334 | |||
335 | mx5_clocks_common_init(ccm_base); | ||
331 | 336 | ||
332 | clk[IMX5_CLK_LP_APM] = imx_clk_mux("lp_apm", MXC_CCM_CCSR, 10, 1, | 337 | clk[IMX5_CLK_LP_APM] = imx_clk_mux("lp_apm", MXC_CCM_CCSR, 10, 1, |
333 | lp_apm_sel, ARRAY_SIZE(lp_apm_sel)); | 338 | lp_apm_sel, ARRAY_SIZE(lp_apm_sel)); |
@@ -349,17 +354,12 @@ static void __init mx50_clocks_init(struct device_node *np) | |||
349 | clk[IMX5_CLK_CKO2_PODF] = imx_clk_divider("cko2_podf", "cko2_sel", MXC_CCM_CCOSR, 21, 3); | 354 | clk[IMX5_CLK_CKO2_PODF] = imx_clk_divider("cko2_podf", "cko2_sel", MXC_CCM_CCOSR, 21, 3); |
350 | clk[IMX5_CLK_CKO2] = imx_clk_gate2("cko2", "cko2_podf", MXC_CCM_CCOSR, 24); | 355 | clk[IMX5_CLK_CKO2] = imx_clk_gate2("cko2", "cko2_podf", MXC_CCM_CCOSR, 24); |
351 | 356 | ||
352 | for (i = 0; i < ARRAY_SIZE(clk); i++) | 357 | imx_check_clocks(clk, ARRAY_SIZE(clk)); |
353 | if (IS_ERR(clk[i])) | ||
354 | pr_err("i.MX50 clk %d: register failed with %ld\n", | ||
355 | i, PTR_ERR(clk[i])); | ||
356 | 358 | ||
357 | clk_data.clks = clk; | 359 | clk_data.clks = clk; |
358 | clk_data.clk_num = ARRAY_SIZE(clk); | 360 | clk_data.clk_num = ARRAY_SIZE(clk); |
359 | of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data); | 361 | of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data); |
360 | 362 | ||
361 | mx5_clocks_common_init(0, 0, 0, 0); | ||
362 | |||
363 | /* set SDHC root clock to 200MHZ*/ | 363 | /* set SDHC root clock to 200MHZ*/ |
364 | clk_set_rate(clk[IMX5_CLK_ESDHC_A_PODF], 200000000); | 364 | clk_set_rate(clk[IMX5_CLK_ESDHC_A_PODF], 200000000); |
365 | clk_set_rate(clk[IMX5_CLK_ESDHC_B_PODF], 200000000); | 365 | clk_set_rate(clk[IMX5_CLK_ESDHC_B_PODF], 200000000); |
@@ -370,21 +370,32 @@ static void __init mx50_clocks_init(struct device_node *np) | |||
370 | 370 | ||
371 | r = clk_round_rate(clk[IMX5_CLK_USBOH3_PER_GATE], 54000000); | 371 | r = clk_round_rate(clk[IMX5_CLK_USBOH3_PER_GATE], 54000000); |
372 | clk_set_rate(clk[IMX5_CLK_USBOH3_PER_GATE], r); | 372 | clk_set_rate(clk[IMX5_CLK_USBOH3_PER_GATE], r); |
373 | |||
374 | mxc_timer_init_dt(of_find_compatible_node(NULL, NULL, "fsl,imx50-gpt")); | ||
375 | } | 373 | } |
376 | CLK_OF_DECLARE(imx50_ccm, "fsl,imx50-ccm", mx50_clocks_init); | 374 | CLK_OF_DECLARE(imx50_ccm, "fsl,imx50-ccm", mx50_clocks_init); |
377 | 375 | ||
378 | int __init mx51_clocks_init(unsigned long rate_ckil, unsigned long rate_osc, | 376 | static void __init mx51_clocks_init(struct device_node *np) |
379 | unsigned long rate_ckih1, unsigned long rate_ckih2) | ||
380 | { | 377 | { |
381 | int i; | 378 | void __iomem *ccm_base; |
379 | void __iomem *pll_base; | ||
382 | u32 val; | 380 | u32 val; |
383 | struct device_node *np; | ||
384 | 381 | ||
385 | clk[IMX5_CLK_PLL1_SW] = imx_clk_pllv2("pll1_sw", "osc", MX51_DPLL1_BASE); | 382 | pll_base = ioremap(MX51_DPLL1_BASE, SZ_16K); |
386 | clk[IMX5_CLK_PLL2_SW] = imx_clk_pllv2("pll2_sw", "osc", MX51_DPLL2_BASE); | 383 | WARN_ON(!pll_base); |
387 | clk[IMX5_CLK_PLL3_SW] = imx_clk_pllv2("pll3_sw", "osc", MX51_DPLL3_BASE); | 384 | clk[IMX5_CLK_PLL1_SW] = imx_clk_pllv2("pll1_sw", "osc", pll_base); |
385 | |||
386 | pll_base = ioremap(MX51_DPLL2_BASE, SZ_16K); | ||
387 | WARN_ON(!pll_base); | ||
388 | clk[IMX5_CLK_PLL2_SW] = imx_clk_pllv2("pll2_sw", "osc", pll_base); | ||
389 | |||
390 | pll_base = ioremap(MX51_DPLL3_BASE, SZ_16K); | ||
391 | WARN_ON(!pll_base); | ||
392 | clk[IMX5_CLK_PLL3_SW] = imx_clk_pllv2("pll3_sw", "osc", pll_base); | ||
393 | |||
394 | ccm_base = of_iomap(np, 0); | ||
395 | WARN_ON(!ccm_base); | ||
396 | |||
397 | mx5_clocks_common_init(ccm_base); | ||
398 | |||
388 | clk[IMX5_CLK_LP_APM] = imx_clk_mux("lp_apm", MXC_CCM_CCSR, 9, 1, | 399 | clk[IMX5_CLK_LP_APM] = imx_clk_mux("lp_apm", MXC_CCM_CCSR, 9, 1, |
389 | lp_apm_sel, ARRAY_SIZE(lp_apm_sel)); | 400 | lp_apm_sel, ARRAY_SIZE(lp_apm_sel)); |
390 | clk[IMX5_CLK_IPU_DI0_SEL] = imx_clk_mux("ipu_di0_sel", MXC_CCM_CSCMR2, 26, 3, | 401 | clk[IMX5_CLK_IPU_DI0_SEL] = imx_clk_mux("ipu_di0_sel", MXC_CCM_CSCMR2, 26, 3, |
@@ -417,35 +428,12 @@ int __init mx51_clocks_init(unsigned long rate_ckil, unsigned long rate_osc, | |||
417 | mx51_spdif1_com_sel, ARRAY_SIZE(mx51_spdif1_com_sel)); | 428 | mx51_spdif1_com_sel, ARRAY_SIZE(mx51_spdif1_com_sel)); |
418 | clk[IMX5_CLK_SPDIF1_GATE] = imx_clk_gate2("spdif1_gate", "spdif1_com_sel", MXC_CCM_CCGR5, 28); | 429 | clk[IMX5_CLK_SPDIF1_GATE] = imx_clk_gate2("spdif1_gate", "spdif1_com_sel", MXC_CCM_CCGR5, 28); |
419 | 430 | ||
420 | for (i = 0; i < ARRAY_SIZE(clk); i++) | 431 | imx_check_clocks(clk, ARRAY_SIZE(clk)); |
421 | if (IS_ERR(clk[i])) | ||
422 | pr_err("i.MX51 clk %d: register failed with %ld\n", | ||
423 | i, PTR_ERR(clk[i])); | ||
424 | 432 | ||
425 | np = of_find_compatible_node(NULL, NULL, "fsl,imx51-ccm"); | ||
426 | clk_data.clks = clk; | 433 | clk_data.clks = clk; |
427 | clk_data.clk_num = ARRAY_SIZE(clk); | 434 | clk_data.clk_num = ARRAY_SIZE(clk); |
428 | of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data); | 435 | of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data); |
429 | 436 | ||
430 | mx5_clocks_common_init(rate_ckil, rate_osc, rate_ckih1, rate_ckih2); | ||
431 | |||
432 | clk_register_clkdev(clk[IMX5_CLK_HSI2C_GATE], NULL, "imx21-i2c.2"); | ||
433 | clk_register_clkdev(clk[IMX5_CLK_MX51_MIPI], "mipi_hsp", NULL); | ||
434 | clk_register_clkdev(clk[IMX5_CLK_FEC_GATE], NULL, "imx27-fec.0"); | ||
435 | clk_register_clkdev(clk[IMX5_CLK_USB_PHY_GATE], "phy", "mxc-ehci.0"); | ||
436 | clk_register_clkdev(clk[IMX5_CLK_ESDHC1_IPG_GATE], "ipg", "sdhci-esdhc-imx51.0"); | ||
437 | clk_register_clkdev(clk[IMX5_CLK_DUMMY], "ahb", "sdhci-esdhc-imx51.0"); | ||
438 | clk_register_clkdev(clk[IMX5_CLK_ESDHC1_PER_GATE], "per", "sdhci-esdhc-imx51.0"); | ||
439 | clk_register_clkdev(clk[IMX5_CLK_ESDHC2_IPG_GATE], "ipg", "sdhci-esdhc-imx51.1"); | ||
440 | clk_register_clkdev(clk[IMX5_CLK_DUMMY], "ahb", "sdhci-esdhc-imx51.1"); | ||
441 | clk_register_clkdev(clk[IMX5_CLK_ESDHC2_PER_GATE], "per", "sdhci-esdhc-imx51.1"); | ||
442 | clk_register_clkdev(clk[IMX5_CLK_ESDHC3_IPG_GATE], "ipg", "sdhci-esdhc-imx51.2"); | ||
443 | clk_register_clkdev(clk[IMX5_CLK_DUMMY], "ahb", "sdhci-esdhc-imx51.2"); | ||
444 | clk_register_clkdev(clk[IMX5_CLK_ESDHC3_PER_GATE], "per", "sdhci-esdhc-imx51.2"); | ||
445 | clk_register_clkdev(clk[IMX5_CLK_ESDHC4_IPG_GATE], "ipg", "sdhci-esdhc-imx51.3"); | ||
446 | clk_register_clkdev(clk[IMX5_CLK_DUMMY], "ahb", "sdhci-esdhc-imx51.3"); | ||
447 | clk_register_clkdev(clk[IMX5_CLK_ESDHC4_PER_GATE], "per", "sdhci-esdhc-imx51.3"); | ||
448 | |||
449 | /* set the usboh3 parent to pll2_sw */ | 437 | /* set the usboh3 parent to pll2_sw */ |
450 | clk_set_parent(clk[IMX5_CLK_USBOH3_SEL], clk[IMX5_CLK_PLL2_SW]); | 438 | clk_set_parent(clk[IMX5_CLK_USBOH3_SEL], clk[IMX5_CLK_PLL2_SW]); |
451 | 439 | ||
@@ -453,9 +441,6 @@ int __init mx51_clocks_init(unsigned long rate_ckil, unsigned long rate_osc, | |||
453 | clk_set_rate(clk[IMX5_CLK_ESDHC_A_PODF], 166250000); | 441 | clk_set_rate(clk[IMX5_CLK_ESDHC_A_PODF], 166250000); |
454 | clk_set_rate(clk[IMX5_CLK_ESDHC_B_PODF], 166250000); | 442 | clk_set_rate(clk[IMX5_CLK_ESDHC_B_PODF], 166250000); |
455 | 443 | ||
456 | /* System timer */ | ||
457 | mxc_timer_init(MX51_IO_ADDRESS(MX51_GPT1_BASE_ADDR), MX51_INT_GPT); | ||
458 | |||
459 | clk_prepare_enable(clk[IMX5_CLK_IIM_GATE]); | 444 | clk_prepare_enable(clk[IMX5_CLK_IIM_GATE]); |
460 | imx_print_silicon_rev("i.MX51", mx51_revision()); | 445 | imx_print_silicon_rev("i.MX51", mx51_revision()); |
461 | clk_disable_unprepare(clk[IMX5_CLK_IIM_GATE]); | 446 | clk_disable_unprepare(clk[IMX5_CLK_IIM_GATE]); |
@@ -474,25 +459,35 @@ int __init mx51_clocks_init(unsigned long rate_ckil, unsigned long rate_osc, | |||
474 | val = readl(MXC_CCM_CLPCR); | 459 | val = readl(MXC_CCM_CLPCR); |
475 | val |= 1 << 23; | 460 | val |= 1 << 23; |
476 | writel(val, MXC_CCM_CLPCR); | 461 | writel(val, MXC_CCM_CLPCR); |
477 | |||
478 | return 0; | ||
479 | } | ||
480 | |||
481 | static void __init mx51_clocks_init_dt(struct device_node *np) | ||
482 | { | ||
483 | mx51_clocks_init(0, 0, 0, 0); | ||
484 | } | 462 | } |
485 | CLK_OF_DECLARE(imx51_ccm, "fsl,imx51-ccm", mx51_clocks_init_dt); | 463 | CLK_OF_DECLARE(imx51_ccm, "fsl,imx51-ccm", mx51_clocks_init); |
486 | 464 | ||
487 | static void __init mx53_clocks_init(struct device_node *np) | 465 | static void __init mx53_clocks_init(struct device_node *np) |
488 | { | 466 | { |
489 | int i; | 467 | void __iomem *ccm_base; |
468 | void __iomem *pll_base; | ||
490 | unsigned long r; | 469 | unsigned long r; |
491 | 470 | ||
492 | clk[IMX5_CLK_PLL1_SW] = imx_clk_pllv2("pll1_sw", "osc", MX53_DPLL1_BASE); | 471 | pll_base = ioremap(MX53_DPLL1_BASE, SZ_16K); |
493 | clk[IMX5_CLK_PLL2_SW] = imx_clk_pllv2("pll2_sw", "osc", MX53_DPLL2_BASE); | 472 | WARN_ON(!pll_base); |
494 | clk[IMX5_CLK_PLL3_SW] = imx_clk_pllv2("pll3_sw", "osc", MX53_DPLL3_BASE); | 473 | clk[IMX5_CLK_PLL1_SW] = imx_clk_pllv2("pll1_sw", "osc", pll_base); |
495 | clk[IMX5_CLK_PLL4_SW] = imx_clk_pllv2("pll4_sw", "osc", MX53_DPLL4_BASE); | 474 | |
475 | pll_base = ioremap(MX53_DPLL2_BASE, SZ_16K); | ||
476 | WARN_ON(!pll_base); | ||
477 | clk[IMX5_CLK_PLL2_SW] = imx_clk_pllv2("pll2_sw", "osc", pll_base); | ||
478 | |||
479 | pll_base = ioremap(MX53_DPLL3_BASE, SZ_16K); | ||
480 | WARN_ON(!pll_base); | ||
481 | clk[IMX5_CLK_PLL3_SW] = imx_clk_pllv2("pll3_sw", "osc", pll_base); | ||
482 | |||
483 | pll_base = ioremap(MX53_DPLL4_BASE, SZ_16K); | ||
484 | WARN_ON(!pll_base); | ||
485 | clk[IMX5_CLK_PLL4_SW] = imx_clk_pllv2("pll4_sw", "osc", pll_base); | ||
486 | |||
487 | ccm_base = of_iomap(np, 0); | ||
488 | WARN_ON(!ccm_base); | ||
489 | |||
490 | mx5_clocks_common_init(ccm_base); | ||
496 | 491 | ||
497 | clk[IMX5_CLK_LP_APM] = imx_clk_mux("lp_apm", MXC_CCM_CCSR, 10, 1, | 492 | clk[IMX5_CLK_LP_APM] = imx_clk_mux("lp_apm", MXC_CCM_CCSR, 10, 1, |
498 | lp_apm_sel, ARRAY_SIZE(lp_apm_sel)); | 493 | lp_apm_sel, ARRAY_SIZE(lp_apm_sel)); |
@@ -543,33 +538,12 @@ static void __init mx53_clocks_init(struct device_node *np) | |||
543 | clk[IMX5_CLK_SPDIF_XTAL_SEL] = imx_clk_mux("spdif_xtal_sel", MXC_CCM_CSCMR1, 2, 2, | 538 | clk[IMX5_CLK_SPDIF_XTAL_SEL] = imx_clk_mux("spdif_xtal_sel", MXC_CCM_CSCMR1, 2, 2, |
544 | mx53_spdif_xtal_sel, ARRAY_SIZE(mx53_spdif_xtal_sel)); | 539 | mx53_spdif_xtal_sel, ARRAY_SIZE(mx53_spdif_xtal_sel)); |
545 | 540 | ||
546 | for (i = 0; i < ARRAY_SIZE(clk); i++) | 541 | imx_check_clocks(clk, ARRAY_SIZE(clk)); |
547 | if (IS_ERR(clk[i])) | ||
548 | pr_err("i.MX53 clk %d: register failed with %ld\n", | ||
549 | i, PTR_ERR(clk[i])); | ||
550 | 542 | ||
551 | clk_data.clks = clk; | 543 | clk_data.clks = clk; |
552 | clk_data.clk_num = ARRAY_SIZE(clk); | 544 | clk_data.clk_num = ARRAY_SIZE(clk); |
553 | of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data); | 545 | of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data); |
554 | 546 | ||
555 | mx5_clocks_common_init(0, 0, 0, 0); | ||
556 | |||
557 | clk_register_clkdev(clk[IMX5_CLK_I2C3_GATE], NULL, "imx21-i2c.2"); | ||
558 | clk_register_clkdev(clk[IMX5_CLK_FEC_GATE], NULL, "imx25-fec.0"); | ||
559 | clk_register_clkdev(clk[IMX5_CLK_USB_PHY1_GATE], "usb_phy1", "mxc-ehci.0"); | ||
560 | clk_register_clkdev(clk[IMX5_CLK_ESDHC1_IPG_GATE], "ipg", "sdhci-esdhc-imx53.0"); | ||
561 | clk_register_clkdev(clk[IMX5_CLK_DUMMY], "ahb", "sdhci-esdhc-imx53.0"); | ||
562 | clk_register_clkdev(clk[IMX5_CLK_ESDHC1_PER_GATE], "per", "sdhci-esdhc-imx53.0"); | ||
563 | clk_register_clkdev(clk[IMX5_CLK_ESDHC2_IPG_GATE], "ipg", "sdhci-esdhc-imx53.1"); | ||
564 | clk_register_clkdev(clk[IMX5_CLK_DUMMY], "ahb", "sdhci-esdhc-imx53.1"); | ||
565 | clk_register_clkdev(clk[IMX5_CLK_ESDHC2_PER_GATE], "per", "sdhci-esdhc-imx53.1"); | ||
566 | clk_register_clkdev(clk[IMX5_CLK_ESDHC3_IPG_GATE], "ipg", "sdhci-esdhc-imx53.2"); | ||
567 | clk_register_clkdev(clk[IMX5_CLK_DUMMY], "ahb", "sdhci-esdhc-imx53.2"); | ||
568 | clk_register_clkdev(clk[IMX5_CLK_ESDHC3_PER_GATE], "per", "sdhci-esdhc-imx53.2"); | ||
569 | clk_register_clkdev(clk[IMX5_CLK_ESDHC4_IPG_GATE], "ipg", "sdhci-esdhc-imx53.3"); | ||
570 | clk_register_clkdev(clk[IMX5_CLK_DUMMY], "ahb", "sdhci-esdhc-imx53.3"); | ||
571 | clk_register_clkdev(clk[IMX5_CLK_ESDHC4_PER_GATE], "per", "sdhci-esdhc-imx53.3"); | ||
572 | |||
573 | /* set SDHC root clock to 200MHZ*/ | 547 | /* set SDHC root clock to 200MHZ*/ |
574 | clk_set_rate(clk[IMX5_CLK_ESDHC_A_PODF], 200000000); | 548 | clk_set_rate(clk[IMX5_CLK_ESDHC_A_PODF], 200000000); |
575 | clk_set_rate(clk[IMX5_CLK_ESDHC_B_PODF], 200000000); | 549 | clk_set_rate(clk[IMX5_CLK_ESDHC_B_PODF], 200000000); |
@@ -583,7 +557,5 @@ static void __init mx53_clocks_init(struct device_node *np) | |||
583 | 557 | ||
584 | r = clk_round_rate(clk[IMX5_CLK_USBOH3_PER_GATE], 54000000); | 558 | r = clk_round_rate(clk[IMX5_CLK_USBOH3_PER_GATE], 54000000); |
585 | clk_set_rate(clk[IMX5_CLK_USBOH3_PER_GATE], r); | 559 | clk_set_rate(clk[IMX5_CLK_USBOH3_PER_GATE], r); |
586 | |||
587 | mxc_timer_init_dt(of_find_compatible_node(NULL, NULL, "fsl,imx53-gpt")); | ||
588 | } | 560 | } |
589 | CLK_OF_DECLARE(imx53_ccm, "fsl,imx53-ccm", mx53_clocks_init); | 561 | CLK_OF_DECLARE(imx53_ccm, "fsl,imx53-ccm", mx53_clocks_init); |
diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c index 8e795dea02ec..6cceb7765c14 100644 --- a/arch/arm/mach-imx/clk-imx6q.c +++ b/arch/arm/mach-imx/clk-imx6q.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/of.h> | 19 | #include <linux/of.h> |
20 | #include <linux/of_address.h> | 20 | #include <linux/of_address.h> |
21 | #include <linux/of_irq.h> | 21 | #include <linux/of_irq.h> |
22 | #include <dt-bindings/clock/imx6qdl-clock.h> | ||
22 | 23 | ||
23 | #include "clk.h" | 24 | #include "clk.h" |
24 | #include "common.h" | 25 | #include "common.h" |
@@ -70,51 +71,16 @@ static const char *cko_sels[] = { "cko1", "cko2", }; | |||
70 | static const char *lvds_sels[] = { | 71 | static const char *lvds_sels[] = { |
71 | "dummy", "dummy", "dummy", "dummy", "dummy", "dummy", | 72 | "dummy", "dummy", "dummy", "dummy", "dummy", "dummy", |
72 | "pll4_audio", "pll5_video", "pll8_mlb", "enet_ref", | 73 | "pll4_audio", "pll5_video", "pll8_mlb", "enet_ref", |
73 | "pcie_ref", "sata_ref", | 74 | "pcie_ref_125m", "sata_ref_100m", |
74 | }; | 75 | }; |
75 | 76 | ||
76 | enum mx6q_clks { | 77 | static struct clk *clk[IMX6QDL_CLK_END]; |
77 | dummy, ckil, ckih, osc, pll2_pfd0_352m, pll2_pfd1_594m, pll2_pfd2_396m, | ||
78 | pll3_pfd0_720m, pll3_pfd1_540m, pll3_pfd2_508m, pll3_pfd3_454m, | ||
79 | pll2_198m, pll3_120m, pll3_80m, pll3_60m, twd, step, pll1_sw, | ||
80 | periph_pre, periph2_pre, periph_clk2_sel, periph2_clk2_sel, axi_sel, | ||
81 | esai_sel, asrc_sel, spdif_sel, gpu2d_axi, gpu3d_axi, gpu2d_core_sel, | ||
82 | gpu3d_core_sel, gpu3d_shader_sel, ipu1_sel, ipu2_sel, ldb_di0_sel, | ||
83 | ldb_di1_sel, ipu1_di0_pre_sel, ipu1_di1_pre_sel, ipu2_di0_pre_sel, | ||
84 | ipu2_di1_pre_sel, ipu1_di0_sel, ipu1_di1_sel, ipu2_di0_sel, | ||
85 | ipu2_di1_sel, hsi_tx_sel, pcie_axi_sel, ssi1_sel, ssi2_sel, ssi3_sel, | ||
86 | usdhc1_sel, usdhc2_sel, usdhc3_sel, usdhc4_sel, enfc_sel, emi_sel, | ||
87 | emi_slow_sel, vdo_axi_sel, vpu_axi_sel, cko1_sel, periph, periph2, | ||
88 | periph_clk2, periph2_clk2, ipg, ipg_per, esai_pred, esai_podf, | ||
89 | asrc_pred, asrc_podf, spdif_pred, spdif_podf, can_root, ecspi_root, | ||
90 | gpu2d_core_podf, gpu3d_core_podf, gpu3d_shader, ipu1_podf, ipu2_podf, | ||
91 | ldb_di0_podf, ldb_di1_podf, ipu1_di0_pre, ipu1_di1_pre, ipu2_di0_pre, | ||
92 | ipu2_di1_pre, hsi_tx_podf, ssi1_pred, ssi1_podf, ssi2_pred, ssi2_podf, | ||
93 | ssi3_pred, ssi3_podf, uart_serial_podf, usdhc1_podf, usdhc2_podf, | ||
94 | usdhc3_podf, usdhc4_podf, enfc_pred, enfc_podf, emi_podf, | ||
95 | emi_slow_podf, vpu_axi_podf, cko1_podf, axi, mmdc_ch0_axi_podf, | ||
96 | mmdc_ch1_axi_podf, arm, ahb, apbh_dma, asrc, can1_ipg, can1_serial, | ||
97 | can2_ipg, can2_serial, ecspi1, ecspi2, ecspi3, ecspi4, ecspi5, enet, | ||
98 | esai, gpt_ipg, gpt_ipg_per, gpu2d_core, gpu3d_core, hdmi_iahb, | ||
99 | hdmi_isfr, i2c1, i2c2, i2c3, iim, enfc, ipu1, ipu1_di0, ipu1_di1, ipu2, | ||
100 | ipu2_di0, ldb_di0, ldb_di1, ipu2_di1, hsi_tx, mlb, mmdc_ch0_axi, | ||
101 | mmdc_ch1_axi, ocram, openvg_axi, pcie_axi, pwm1, pwm2, pwm3, pwm4, per1_bch, | ||
102 | gpmi_bch_apb, gpmi_bch, gpmi_io, gpmi_apb, sata, sdma, spba, ssi1, | ||
103 | ssi2, ssi3, uart_ipg, uart_serial, usboh3, usdhc1, usdhc2, usdhc3, | ||
104 | usdhc4, vdo_axi, vpu_axi, cko1, pll1_sys, pll2_bus, pll3_usb_otg, | ||
105 | pll4_audio, pll5_video, pll8_mlb, pll7_usb_host, pll6_enet, ssi1_ipg, | ||
106 | ssi2_ipg, ssi3_ipg, rom, usbphy1, usbphy2, ldb_di0_div_3_5, ldb_di1_div_3_5, | ||
107 | sata_ref, sata_ref_100m, pcie_ref, pcie_ref_125m, enet_ref, usbphy1_gate, | ||
108 | usbphy2_gate, pll4_post_div, pll5_post_div, pll5_video_div, eim_slow, | ||
109 | spdif, cko2_sel, cko2_podf, cko2, cko, vdoa, pll4_audio_div, | ||
110 | lvds1_sel, lvds2_sel, lvds1_gate, lvds2_gate, esai_ahb, clk_max | ||
111 | }; | ||
112 | |||
113 | static struct clk *clk[clk_max]; | ||
114 | static struct clk_onecell_data clk_data; | 78 | static struct clk_onecell_data clk_data; |
115 | 79 | ||
116 | static enum mx6q_clks const clks_init_on[] __initconst = { | 80 | static unsigned int const clks_init_on[] __initconst = { |
117 | mmdc_ch0_axi, rom, arm, | 81 | IMX6QDL_CLK_MMDC_CH0_AXI, |
82 | IMX6QDL_CLK_ROM, | ||
83 | IMX6QDL_CLK_ARM, | ||
118 | }; | 84 | }; |
119 | 85 | ||
120 | static struct clk_div_table clk_enet_ref_table[] = { | 86 | static struct clk_div_table clk_enet_ref_table[] = { |
@@ -149,10 +115,10 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node) | |||
149 | int i; | 115 | int i; |
150 | int ret; | 116 | int ret; |
151 | 117 | ||
152 | clk[dummy] = imx_clk_fixed("dummy", 0); | 118 | clk[IMX6QDL_CLK_DUMMY] = imx_clk_fixed("dummy", 0); |
153 | clk[ckil] = imx_obtain_fixed_clock("ckil", 0); | 119 | clk[IMX6QDL_CLK_CKIL] = imx_obtain_fixed_clock("ckil", 0); |
154 | clk[ckih] = imx_obtain_fixed_clock("ckih1", 0); | 120 | clk[IMX6QDL_CLK_CKIH] = imx_obtain_fixed_clock("ckih1", 0); |
155 | clk[osc] = imx_obtain_fixed_clock("osc", 0); | 121 | clk[IMX6QDL_CLK_OSC] = imx_obtain_fixed_clock("osc", 0); |
156 | 122 | ||
157 | np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-anatop"); | 123 | np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-anatop"); |
158 | base = of_iomap(np, 0); | 124 | base = of_iomap(np, 0); |
@@ -166,14 +132,14 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node) | |||
166 | video_div_table[2].div = 1; | 132 | video_div_table[2].div = 1; |
167 | }; | 133 | }; |
168 | 134 | ||
169 | /* type name parent_name base div_mask */ | 135 | /* type name parent_name base div_mask */ |
170 | clk[pll1_sys] = imx_clk_pllv3(IMX_PLLV3_SYS, "pll1_sys", "osc", base, 0x7f); | 136 | clk[IMX6QDL_CLK_PLL1_SYS] = imx_clk_pllv3(IMX_PLLV3_SYS, "pll1_sys", "osc", base, 0x7f); |
171 | clk[pll2_bus] = imx_clk_pllv3(IMX_PLLV3_GENERIC, "pll2_bus", "osc", base + 0x30, 0x1); | 137 | clk[IMX6QDL_CLK_PLL2_BUS] = imx_clk_pllv3(IMX_PLLV3_GENERIC, "pll2_bus", "osc", base + 0x30, 0x1); |
172 | clk[pll3_usb_otg] = imx_clk_pllv3(IMX_PLLV3_USB, "pll3_usb_otg", "osc", base + 0x10, 0x3); | 138 | clk[IMX6QDL_CLK_PLL3_USB_OTG] = imx_clk_pllv3(IMX_PLLV3_USB, "pll3_usb_otg", "osc", base + 0x10, 0x3); |
173 | clk[pll4_audio] = imx_clk_pllv3(IMX_PLLV3_AV, "pll4_audio", "osc", base + 0x70, 0x7f); | 139 | clk[IMX6QDL_CLK_PLL4_AUDIO] = imx_clk_pllv3(IMX_PLLV3_AV, "pll4_audio", "osc", base + 0x70, 0x7f); |
174 | clk[pll5_video] = imx_clk_pllv3(IMX_PLLV3_AV, "pll5_video", "osc", base + 0xa0, 0x7f); | 140 | clk[IMX6QDL_CLK_PLL5_VIDEO] = imx_clk_pllv3(IMX_PLLV3_AV, "pll5_video", "osc", base + 0xa0, 0x7f); |
175 | clk[pll6_enet] = imx_clk_pllv3(IMX_PLLV3_ENET, "pll6_enet", "osc", base + 0xe0, 0x3); | 141 | clk[IMX6QDL_CLK_PLL6_ENET] = imx_clk_pllv3(IMX_PLLV3_ENET, "pll6_enet", "osc", base + 0xe0, 0x3); |
176 | clk[pll7_usb_host] = imx_clk_pllv3(IMX_PLLV3_USB, "pll7_usb_host","osc", base + 0x20, 0x3); | 142 | clk[IMX6QDL_CLK_PLL7_USB_HOST] = imx_clk_pllv3(IMX_PLLV3_USB, "pll7_usb_host","osc", base + 0x20, 0x3); |
177 | 143 | ||
178 | /* | 144 | /* |
179 | * Bit 20 is the reserved and read-only bit, we do this only for: | 145 | * Bit 20 is the reserved and read-only bit, we do this only for: |
@@ -181,28 +147,28 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node) | |||
181 | * - Keep refcount when do usbphy clk_enable/disable, in that case, | 147 | * - Keep refcount when do usbphy clk_enable/disable, in that case, |
182 | * the clk framework may need to enable/disable usbphy's parent | 148 | * the clk framework may need to enable/disable usbphy's parent |
183 | */ | 149 | */ |
184 | clk[usbphy1] = imx_clk_gate("usbphy1", "pll3_usb_otg", base + 0x10, 20); | 150 | clk[IMX6QDL_CLK_USBPHY1] = imx_clk_gate("usbphy1", "pll3_usb_otg", base + 0x10, 20); |
185 | clk[usbphy2] = imx_clk_gate("usbphy2", "pll7_usb_host", base + 0x20, 20); | 151 | clk[IMX6QDL_CLK_USBPHY2] = imx_clk_gate("usbphy2", "pll7_usb_host", base + 0x20, 20); |
186 | 152 | ||
187 | /* | 153 | /* |
188 | * usbphy*_gate needs to be on after system boots up, and software | 154 | * usbphy*_gate needs to be on after system boots up, and software |
189 | * never needs to control it anymore. | 155 | * never needs to control it anymore. |
190 | */ | 156 | */ |
191 | clk[usbphy1_gate] = imx_clk_gate("usbphy1_gate", "dummy", base + 0x10, 6); | 157 | clk[IMX6QDL_CLK_USBPHY1_GATE] = imx_clk_gate("usbphy1_gate", "dummy", base + 0x10, 6); |
192 | clk[usbphy2_gate] = imx_clk_gate("usbphy2_gate", "dummy", base + 0x20, 6); | 158 | clk[IMX6QDL_CLK_USBPHY2_GATE] = imx_clk_gate("usbphy2_gate", "dummy", base + 0x20, 6); |
193 | 159 | ||
194 | clk[sata_ref] = imx_clk_fixed_factor("sata_ref", "pll6_enet", 1, 5); | 160 | clk[IMX6QDL_CLK_SATA_REF] = imx_clk_fixed_factor("sata_ref", "pll6_enet", 1, 5); |
195 | clk[pcie_ref] = imx_clk_fixed_factor("pcie_ref", "pll6_enet", 1, 4); | 161 | clk[IMX6QDL_CLK_PCIE_REF] = imx_clk_fixed_factor("pcie_ref", "pll6_enet", 1, 4); |
196 | 162 | ||
197 | clk[sata_ref_100m] = imx_clk_gate("sata_ref_100m", "sata_ref", base + 0xe0, 20); | 163 | clk[IMX6QDL_CLK_SATA_REF_100M] = imx_clk_gate("sata_ref_100m", "sata_ref", base + 0xe0, 20); |
198 | clk[pcie_ref_125m] = imx_clk_gate("pcie_ref_125m", "pcie_ref", base + 0xe0, 19); | 164 | clk[IMX6QDL_CLK_PCIE_REF_125M] = imx_clk_gate("pcie_ref_125m", "pcie_ref", base + 0xe0, 19); |
199 | 165 | ||
200 | clk[enet_ref] = clk_register_divider_table(NULL, "enet_ref", "pll6_enet", 0, | 166 | clk[IMX6QDL_CLK_ENET_REF] = clk_register_divider_table(NULL, "enet_ref", "pll6_enet", 0, |
201 | base + 0xe0, 0, 2, 0, clk_enet_ref_table, | 167 | base + 0xe0, 0, 2, 0, clk_enet_ref_table, |
202 | &imx_ccm_lock); | 168 | &imx_ccm_lock); |
203 | 169 | ||
204 | clk[lvds1_sel] = imx_clk_mux("lvds1_sel", base + 0x160, 0, 5, lvds_sels, ARRAY_SIZE(lvds_sels)); | 170 | clk[IMX6QDL_CLK_LVDS1_SEL] = imx_clk_mux("lvds1_sel", base + 0x160, 0, 5, lvds_sels, ARRAY_SIZE(lvds_sels)); |
205 | clk[lvds2_sel] = imx_clk_mux("lvds2_sel", base + 0x160, 5, 5, lvds_sels, ARRAY_SIZE(lvds_sels)); | 171 | clk[IMX6QDL_CLK_LVDS2_SEL] = imx_clk_mux("lvds2_sel", base + 0x160, 5, 5, lvds_sels, ARRAY_SIZE(lvds_sels)); |
206 | 172 | ||
207 | /* | 173 | /* |
208 | * lvds1_gate and lvds2_gate are pseudo-gates. Both can be | 174 | * lvds1_gate and lvds2_gate are pseudo-gates. Both can be |
@@ -210,29 +176,29 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node) | |||
210 | * the "output_enable" bit as a gate, even though it's really just | 176 | * the "output_enable" bit as a gate, even though it's really just |
211 | * enabling clock output. | 177 | * enabling clock output. |
212 | */ | 178 | */ |
213 | clk[lvds1_gate] = imx_clk_gate("lvds1_gate", "lvds1_sel", base + 0x160, 10); | 179 | clk[IMX6QDL_CLK_LVDS1_GATE] = imx_clk_gate("lvds1_gate", "lvds1_sel", base + 0x160, 10); |
214 | clk[lvds2_gate] = imx_clk_gate("lvds2_gate", "lvds2_sel", base + 0x160, 11); | 180 | clk[IMX6QDL_CLK_LVDS2_GATE] = imx_clk_gate("lvds2_gate", "lvds2_sel", base + 0x160, 11); |
215 | 181 | ||
216 | /* name parent_name reg idx */ | 182 | /* name parent_name reg idx */ |
217 | clk[pll2_pfd0_352m] = imx_clk_pfd("pll2_pfd0_352m", "pll2_bus", base + 0x100, 0); | 183 | clk[IMX6QDL_CLK_PLL2_PFD0_352M] = imx_clk_pfd("pll2_pfd0_352m", "pll2_bus", base + 0x100, 0); |
218 | clk[pll2_pfd1_594m] = imx_clk_pfd("pll2_pfd1_594m", "pll2_bus", base + 0x100, 1); | 184 | clk[IMX6QDL_CLK_PLL2_PFD1_594M] = imx_clk_pfd("pll2_pfd1_594m", "pll2_bus", base + 0x100, 1); |
219 | clk[pll2_pfd2_396m] = imx_clk_pfd("pll2_pfd2_396m", "pll2_bus", base + 0x100, 2); | 185 | clk[IMX6QDL_CLK_PLL2_PFD2_396M] = imx_clk_pfd("pll2_pfd2_396m", "pll2_bus", base + 0x100, 2); |
220 | clk[pll3_pfd0_720m] = imx_clk_pfd("pll3_pfd0_720m", "pll3_usb_otg", base + 0xf0, 0); | 186 | clk[IMX6QDL_CLK_PLL3_PFD0_720M] = imx_clk_pfd("pll3_pfd0_720m", "pll3_usb_otg", base + 0xf0, 0); |
221 | clk[pll3_pfd1_540m] = imx_clk_pfd("pll3_pfd1_540m", "pll3_usb_otg", base + 0xf0, 1); | 187 | clk[IMX6QDL_CLK_PLL3_PFD1_540M] = imx_clk_pfd("pll3_pfd1_540m", "pll3_usb_otg", base + 0xf0, 1); |
222 | clk[pll3_pfd2_508m] = imx_clk_pfd("pll3_pfd2_508m", "pll3_usb_otg", base + 0xf0, 2); | 188 | clk[IMX6QDL_CLK_PLL3_PFD2_508M] = imx_clk_pfd("pll3_pfd2_508m", "pll3_usb_otg", base + 0xf0, 2); |
223 | clk[pll3_pfd3_454m] = imx_clk_pfd("pll3_pfd3_454m", "pll3_usb_otg", base + 0xf0, 3); | 189 | clk[IMX6QDL_CLK_PLL3_PFD3_454M] = imx_clk_pfd("pll3_pfd3_454m", "pll3_usb_otg", base + 0xf0, 3); |
224 | 190 | ||
225 | /* name parent_name mult div */ | 191 | /* name parent_name mult div */ |
226 | clk[pll2_198m] = imx_clk_fixed_factor("pll2_198m", "pll2_pfd2_396m", 1, 2); | 192 | clk[IMX6QDL_CLK_PLL2_198M] = imx_clk_fixed_factor("pll2_198m", "pll2_pfd2_396m", 1, 2); |
227 | clk[pll3_120m] = imx_clk_fixed_factor("pll3_120m", "pll3_usb_otg", 1, 4); | 193 | clk[IMX6QDL_CLK_PLL3_120M] = imx_clk_fixed_factor("pll3_120m", "pll3_usb_otg", 1, 4); |
228 | clk[pll3_80m] = imx_clk_fixed_factor("pll3_80m", "pll3_usb_otg", 1, 6); | 194 | clk[IMX6QDL_CLK_PLL3_80M] = imx_clk_fixed_factor("pll3_80m", "pll3_usb_otg", 1, 6); |
229 | clk[pll3_60m] = imx_clk_fixed_factor("pll3_60m", "pll3_usb_otg", 1, 8); | 195 | clk[IMX6QDL_CLK_PLL3_60M] = imx_clk_fixed_factor("pll3_60m", "pll3_usb_otg", 1, 8); |
230 | clk[twd] = imx_clk_fixed_factor("twd", "arm", 1, 2); | 196 | clk[IMX6QDL_CLK_TWD] = imx_clk_fixed_factor("twd", "arm", 1, 2); |
231 | 197 | ||
232 | clk[pll4_post_div] = clk_register_divider_table(NULL, "pll4_post_div", "pll4_audio", CLK_SET_RATE_PARENT, base + 0x70, 19, 2, 0, post_div_table, &imx_ccm_lock); | 198 | clk[IMX6QDL_CLK_PLL4_POST_DIV] = clk_register_divider_table(NULL, "pll4_post_div", "pll4_audio", CLK_SET_RATE_PARENT, base + 0x70, 19, 2, 0, post_div_table, &imx_ccm_lock); |
233 | clk[pll4_audio_div] = clk_register_divider(NULL, "pll4_audio_div", "pll4_post_div", CLK_SET_RATE_PARENT, base + 0x170, 15, 1, 0, &imx_ccm_lock); | 199 | clk[IMX6QDL_CLK_PLL4_AUDIO_DIV] = clk_register_divider(NULL, "pll4_audio_div", "pll4_post_div", CLK_SET_RATE_PARENT, base + 0x170, 15, 1, 0, &imx_ccm_lock); |
234 | clk[pll5_post_div] = clk_register_divider_table(NULL, "pll5_post_div", "pll5_video", CLK_SET_RATE_PARENT, base + 0xa0, 19, 2, 0, post_div_table, &imx_ccm_lock); | 200 | clk[IMX6QDL_CLK_PLL5_POST_DIV] = clk_register_divider_table(NULL, "pll5_post_div", "pll5_video", CLK_SET_RATE_PARENT, base + 0xa0, 19, 2, 0, post_div_table, &imx_ccm_lock); |
235 | clk[pll5_video_div] = clk_register_divider_table(NULL, "pll5_video_div", "pll5_post_div", CLK_SET_RATE_PARENT, base + 0x170, 30, 2, 0, video_div_table, &imx_ccm_lock); | 201 | clk[IMX6QDL_CLK_PLL5_VIDEO_DIV] = clk_register_divider_table(NULL, "pll5_video_div", "pll5_post_div", CLK_SET_RATE_PARENT, base + 0x170, 30, 2, 0, video_div_table, &imx_ccm_lock); |
236 | 202 | ||
237 | np = ccm_node; | 203 | np = ccm_node; |
238 | base = of_iomap(np, 0); | 204 | base = of_iomap(np, 0); |
@@ -240,262 +206,254 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node) | |||
240 | 206 | ||
241 | imx6q_pm_set_ccm_base(base); | 207 | imx6q_pm_set_ccm_base(base); |
242 | 208 | ||
243 | /* name reg shift width parent_names num_parents */ | 209 | /* name reg shift width parent_names num_parents */ |
244 | clk[step] = imx_clk_mux("step", base + 0xc, 8, 1, step_sels, ARRAY_SIZE(step_sels)); | 210 | clk[IMX6QDL_CLK_STEP] = imx_clk_mux("step", base + 0xc, 8, 1, step_sels, ARRAY_SIZE(step_sels)); |
245 | clk[pll1_sw] = imx_clk_mux("pll1_sw", base + 0xc, 2, 1, pll1_sw_sels, ARRAY_SIZE(pll1_sw_sels)); | 211 | clk[IMX6QDL_CLK_PLL1_SW] = imx_clk_mux("pll1_sw", base + 0xc, 2, 1, pll1_sw_sels, ARRAY_SIZE(pll1_sw_sels)); |
246 | clk[periph_pre] = imx_clk_mux("periph_pre", base + 0x18, 18, 2, periph_pre_sels, ARRAY_SIZE(periph_pre_sels)); | 212 | clk[IMX6QDL_CLK_PERIPH_PRE] = imx_clk_mux("periph_pre", base + 0x18, 18, 2, periph_pre_sels, ARRAY_SIZE(periph_pre_sels)); |
247 | clk[periph2_pre] = imx_clk_mux("periph2_pre", base + 0x18, 21, 2, periph_pre_sels, ARRAY_SIZE(periph_pre_sels)); | 213 | clk[IMX6QDL_CLK_PERIPH2_PRE] = imx_clk_mux("periph2_pre", base + 0x18, 21, 2, periph_pre_sels, ARRAY_SIZE(periph_pre_sels)); |
248 | clk[periph_clk2_sel] = imx_clk_mux("periph_clk2_sel", base + 0x18, 12, 2, periph_clk2_sels, ARRAY_SIZE(periph_clk2_sels)); | 214 | clk[IMX6QDL_CLK_PERIPH_CLK2_SEL] = imx_clk_mux("periph_clk2_sel", base + 0x18, 12, 2, periph_clk2_sels, ARRAY_SIZE(periph_clk2_sels)); |
249 | clk[periph2_clk2_sel] = imx_clk_mux("periph2_clk2_sel", base + 0x18, 20, 1, periph2_clk2_sels, ARRAY_SIZE(periph2_clk2_sels)); | 215 | clk[IMX6QDL_CLK_PERIPH2_CLK2_SEL] = imx_clk_mux("periph2_clk2_sel", base + 0x18, 20, 1, periph2_clk2_sels, ARRAY_SIZE(periph2_clk2_sels)); |
250 | clk[axi_sel] = imx_clk_mux("axi_sel", base + 0x14, 6, 2, axi_sels, ARRAY_SIZE(axi_sels)); | 216 | clk[IMX6QDL_CLK_AXI_SEL] = imx_clk_mux("axi_sel", base + 0x14, 6, 2, axi_sels, ARRAY_SIZE(axi_sels)); |
251 | clk[esai_sel] = imx_clk_mux("esai_sel", base + 0x20, 19, 2, audio_sels, ARRAY_SIZE(audio_sels)); | 217 | clk[IMX6QDL_CLK_ESAI_SEL] = imx_clk_mux("esai_sel", base + 0x20, 19, 2, audio_sels, ARRAY_SIZE(audio_sels)); |
252 | clk[asrc_sel] = imx_clk_mux("asrc_sel", base + 0x30, 7, 2, audio_sels, ARRAY_SIZE(audio_sels)); | 218 | clk[IMX6QDL_CLK_ASRC_SEL] = imx_clk_mux("asrc_sel", base + 0x30, 7, 2, audio_sels, ARRAY_SIZE(audio_sels)); |
253 | clk[spdif_sel] = imx_clk_mux("spdif_sel", base + 0x30, 20, 2, audio_sels, ARRAY_SIZE(audio_sels)); | 219 | clk[IMX6QDL_CLK_SPDIF_SEL] = imx_clk_mux("spdif_sel", base + 0x30, 20, 2, audio_sels, ARRAY_SIZE(audio_sels)); |
254 | clk[gpu2d_axi] = imx_clk_mux("gpu2d_axi", base + 0x18, 0, 1, gpu_axi_sels, ARRAY_SIZE(gpu_axi_sels)); | 220 | clk[IMX6QDL_CLK_GPU2D_AXI] = imx_clk_mux("gpu2d_axi", base + 0x18, 0, 1, gpu_axi_sels, ARRAY_SIZE(gpu_axi_sels)); |
255 | clk[gpu3d_axi] = imx_clk_mux("gpu3d_axi", base + 0x18, 1, 1, gpu_axi_sels, ARRAY_SIZE(gpu_axi_sels)); | 221 | clk[IMX6QDL_CLK_GPU3D_AXI] = imx_clk_mux("gpu3d_axi", base + 0x18, 1, 1, gpu_axi_sels, ARRAY_SIZE(gpu_axi_sels)); |
256 | clk[gpu2d_core_sel] = imx_clk_mux("gpu2d_core_sel", base + 0x18, 16, 2, gpu2d_core_sels, ARRAY_SIZE(gpu2d_core_sels)); | 222 | clk[IMX6QDL_CLK_GPU2D_CORE_SEL] = imx_clk_mux("gpu2d_core_sel", base + 0x18, 16, 2, gpu2d_core_sels, ARRAY_SIZE(gpu2d_core_sels)); |
257 | clk[gpu3d_core_sel] = imx_clk_mux("gpu3d_core_sel", base + 0x18, 4, 2, gpu3d_core_sels, ARRAY_SIZE(gpu3d_core_sels)); | 223 | clk[IMX6QDL_CLK_GPU3D_CORE_SEL] = imx_clk_mux("gpu3d_core_sel", base + 0x18, 4, 2, gpu3d_core_sels, ARRAY_SIZE(gpu3d_core_sels)); |
258 | clk[gpu3d_shader_sel] = imx_clk_mux("gpu3d_shader_sel", base + 0x18, 8, 2, gpu3d_shader_sels, ARRAY_SIZE(gpu3d_shader_sels)); | 224 | clk[IMX6QDL_CLK_GPU3D_SHADER_SEL] = imx_clk_mux("gpu3d_shader_sel", base + 0x18, 8, 2, gpu3d_shader_sels, ARRAY_SIZE(gpu3d_shader_sels)); |
259 | clk[ipu1_sel] = imx_clk_mux("ipu1_sel", base + 0x3c, 9, 2, ipu_sels, ARRAY_SIZE(ipu_sels)); | 225 | clk[IMX6QDL_CLK_IPU1_SEL] = imx_clk_mux("ipu1_sel", base + 0x3c, 9, 2, ipu_sels, ARRAY_SIZE(ipu_sels)); |
260 | clk[ipu2_sel] = imx_clk_mux("ipu2_sel", base + 0x3c, 14, 2, ipu_sels, ARRAY_SIZE(ipu_sels)); | 226 | clk[IMX6QDL_CLK_IPU2_SEL] = imx_clk_mux("ipu2_sel", base + 0x3c, 14, 2, ipu_sels, ARRAY_SIZE(ipu_sels)); |
261 | clk[ldb_di0_sel] = imx_clk_mux_flags("ldb_di0_sel", base + 0x2c, 9, 3, ldb_di_sels, ARRAY_SIZE(ldb_di_sels), CLK_SET_RATE_PARENT); | 227 | clk[IMX6QDL_CLK_LDB_DI0_SEL] = imx_clk_mux_flags("ldb_di0_sel", base + 0x2c, 9, 3, ldb_di_sels, ARRAY_SIZE(ldb_di_sels), CLK_SET_RATE_PARENT); |
262 | clk[ldb_di1_sel] = imx_clk_mux_flags("ldb_di1_sel", base + 0x2c, 12, 3, ldb_di_sels, ARRAY_SIZE(ldb_di_sels), CLK_SET_RATE_PARENT); | 228 | clk[IMX6QDL_CLK_LDB_DI1_SEL] = imx_clk_mux_flags("ldb_di1_sel", base + 0x2c, 12, 3, ldb_di_sels, ARRAY_SIZE(ldb_di_sels), CLK_SET_RATE_PARENT); |
263 | clk[ipu1_di0_pre_sel] = imx_clk_mux_flags("ipu1_di0_pre_sel", base + 0x34, 6, 3, ipu_di_pre_sels, ARRAY_SIZE(ipu_di_pre_sels), CLK_SET_RATE_PARENT); | 229 | clk[IMX6QDL_CLK_IPU1_DI0_PRE_SEL] = imx_clk_mux_flags("ipu1_di0_pre_sel", base + 0x34, 6, 3, ipu_di_pre_sels, ARRAY_SIZE(ipu_di_pre_sels), CLK_SET_RATE_PARENT); |
264 | clk[ipu1_di1_pre_sel] = imx_clk_mux_flags("ipu1_di1_pre_sel", base + 0x34, 15, 3, ipu_di_pre_sels, ARRAY_SIZE(ipu_di_pre_sels), CLK_SET_RATE_PARENT); | 230 | clk[IMX6QDL_CLK_IPU1_DI1_PRE_SEL] = imx_clk_mux_flags("ipu1_di1_pre_sel", base + 0x34, 15, 3, ipu_di_pre_sels, ARRAY_SIZE(ipu_di_pre_sels), CLK_SET_RATE_PARENT); |
265 | clk[ipu2_di0_pre_sel] = imx_clk_mux_flags("ipu2_di0_pre_sel", base + 0x38, 6, 3, ipu_di_pre_sels, ARRAY_SIZE(ipu_di_pre_sels), CLK_SET_RATE_PARENT); | 231 | clk[IMX6QDL_CLK_IPU2_DI0_PRE_SEL] = imx_clk_mux_flags("ipu2_di0_pre_sel", base + 0x38, 6, 3, ipu_di_pre_sels, ARRAY_SIZE(ipu_di_pre_sels), CLK_SET_RATE_PARENT); |
266 | clk[ipu2_di1_pre_sel] = imx_clk_mux_flags("ipu2_di1_pre_sel", base + 0x38, 15, 3, ipu_di_pre_sels, ARRAY_SIZE(ipu_di_pre_sels), CLK_SET_RATE_PARENT); | 232 | clk[IMX6QDL_CLK_IPU2_DI1_PRE_SEL] = imx_clk_mux_flags("ipu2_di1_pre_sel", base + 0x38, 15, 3, ipu_di_pre_sels, ARRAY_SIZE(ipu_di_pre_sels), CLK_SET_RATE_PARENT); |
267 | clk[ipu1_di0_sel] = imx_clk_mux_flags("ipu1_di0_sel", base + 0x34, 0, 3, ipu1_di0_sels, ARRAY_SIZE(ipu1_di0_sels), CLK_SET_RATE_PARENT); | 233 | clk[IMX6QDL_CLK_IPU1_DI0_SEL] = imx_clk_mux_flags("ipu1_di0_sel", base + 0x34, 0, 3, ipu1_di0_sels, ARRAY_SIZE(ipu1_di0_sels), CLK_SET_RATE_PARENT); |
268 | clk[ipu1_di1_sel] = imx_clk_mux_flags("ipu1_di1_sel", base + 0x34, 9, 3, ipu1_di1_sels, ARRAY_SIZE(ipu1_di1_sels), CLK_SET_RATE_PARENT); | 234 | clk[IMX6QDL_CLK_IPU1_DI1_SEL] = imx_clk_mux_flags("ipu1_di1_sel", base + 0x34, 9, 3, ipu1_di1_sels, ARRAY_SIZE(ipu1_di1_sels), CLK_SET_RATE_PARENT); |
269 | clk[ipu2_di0_sel] = imx_clk_mux_flags("ipu2_di0_sel", base + 0x38, 0, 3, ipu2_di0_sels, ARRAY_SIZE(ipu2_di0_sels), CLK_SET_RATE_PARENT); | 235 | clk[IMX6QDL_CLK_IPU2_DI0_SEL] = imx_clk_mux_flags("ipu2_di0_sel", base + 0x38, 0, 3, ipu2_di0_sels, ARRAY_SIZE(ipu2_di0_sels), CLK_SET_RATE_PARENT); |
270 | clk[ipu2_di1_sel] = imx_clk_mux_flags("ipu2_di1_sel", base + 0x38, 9, 3, ipu2_di1_sels, ARRAY_SIZE(ipu2_di1_sels), CLK_SET_RATE_PARENT); | 236 | clk[IMX6QDL_CLK_IPU2_DI1_SEL] = imx_clk_mux_flags("ipu2_di1_sel", base + 0x38, 9, 3, ipu2_di1_sels, ARRAY_SIZE(ipu2_di1_sels), CLK_SET_RATE_PARENT); |
271 | clk[hsi_tx_sel] = imx_clk_mux("hsi_tx_sel", base + 0x30, 28, 1, hsi_tx_sels, ARRAY_SIZE(hsi_tx_sels)); | 237 | clk[IMX6QDL_CLK_HSI_TX_SEL] = imx_clk_mux("hsi_tx_sel", base + 0x30, 28, 1, hsi_tx_sels, ARRAY_SIZE(hsi_tx_sels)); |
272 | clk[pcie_axi_sel] = imx_clk_mux("pcie_axi_sel", base + 0x18, 10, 1, pcie_axi_sels, ARRAY_SIZE(pcie_axi_sels)); | 238 | clk[IMX6QDL_CLK_PCIE_AXI_SEL] = imx_clk_mux("pcie_axi_sel", base + 0x18, 10, 1, pcie_axi_sels, ARRAY_SIZE(pcie_axi_sels)); |
273 | clk[ssi1_sel] = imx_clk_fixup_mux("ssi1_sel", base + 0x1c, 10, 2, ssi_sels, ARRAY_SIZE(ssi_sels), imx_cscmr1_fixup); | 239 | clk[IMX6QDL_CLK_SSI1_SEL] = imx_clk_fixup_mux("ssi1_sel", base + 0x1c, 10, 2, ssi_sels, ARRAY_SIZE(ssi_sels), imx_cscmr1_fixup); |
274 | clk[ssi2_sel] = imx_clk_fixup_mux("ssi2_sel", base + 0x1c, 12, 2, ssi_sels, ARRAY_SIZE(ssi_sels), imx_cscmr1_fixup); | 240 | clk[IMX6QDL_CLK_SSI2_SEL] = imx_clk_fixup_mux("ssi2_sel", base + 0x1c, 12, 2, ssi_sels, ARRAY_SIZE(ssi_sels), imx_cscmr1_fixup); |
275 | clk[ssi3_sel] = imx_clk_fixup_mux("ssi3_sel", base + 0x1c, 14, 2, ssi_sels, ARRAY_SIZE(ssi_sels), imx_cscmr1_fixup); | 241 | clk[IMX6QDL_CLK_SSI3_SEL] = imx_clk_fixup_mux("ssi3_sel", base + 0x1c, 14, 2, ssi_sels, ARRAY_SIZE(ssi_sels), imx_cscmr1_fixup); |
276 | clk[usdhc1_sel] = imx_clk_fixup_mux("usdhc1_sel", base + 0x1c, 16, 1, usdhc_sels, ARRAY_SIZE(usdhc_sels), imx_cscmr1_fixup); | 242 | clk[IMX6QDL_CLK_USDHC1_SEL] = imx_clk_fixup_mux("usdhc1_sel", base + 0x1c, 16, 1, usdhc_sels, ARRAY_SIZE(usdhc_sels), imx_cscmr1_fixup); |
277 | clk[usdhc2_sel] = imx_clk_fixup_mux("usdhc2_sel", base + 0x1c, 17, 1, usdhc_sels, ARRAY_SIZE(usdhc_sels), imx_cscmr1_fixup); | 243 | clk[IMX6QDL_CLK_USDHC2_SEL] = imx_clk_fixup_mux("usdhc2_sel", base + 0x1c, 17, 1, usdhc_sels, ARRAY_SIZE(usdhc_sels), imx_cscmr1_fixup); |
278 | clk[usdhc3_sel] = imx_clk_fixup_mux("usdhc3_sel", base + 0x1c, 18, 1, usdhc_sels, ARRAY_SIZE(usdhc_sels), imx_cscmr1_fixup); | 244 | clk[IMX6QDL_CLK_USDHC3_SEL] = imx_clk_fixup_mux("usdhc3_sel", base + 0x1c, 18, 1, usdhc_sels, ARRAY_SIZE(usdhc_sels), imx_cscmr1_fixup); |
279 | clk[usdhc4_sel] = imx_clk_fixup_mux("usdhc4_sel", base + 0x1c, 19, 1, usdhc_sels, ARRAY_SIZE(usdhc_sels), imx_cscmr1_fixup); | 245 | clk[IMX6QDL_CLK_USDHC4_SEL] = imx_clk_fixup_mux("usdhc4_sel", base + 0x1c, 19, 1, usdhc_sels, ARRAY_SIZE(usdhc_sels), imx_cscmr1_fixup); |
280 | clk[enfc_sel] = imx_clk_mux("enfc_sel", base + 0x2c, 16, 2, enfc_sels, ARRAY_SIZE(enfc_sels)); | 246 | clk[IMX6QDL_CLK_ENFC_SEL] = imx_clk_mux("enfc_sel", base + 0x2c, 16, 2, enfc_sels, ARRAY_SIZE(enfc_sels)); |
281 | clk[emi_sel] = imx_clk_fixup_mux("emi_sel", base + 0x1c, 27, 2, emi_sels, ARRAY_SIZE(emi_sels), imx_cscmr1_fixup); | 247 | clk[IMX6QDL_CLK_EMI_SEL] = imx_clk_fixup_mux("emi_sel", base + 0x1c, 27, 2, emi_sels, ARRAY_SIZE(emi_sels), imx_cscmr1_fixup); |
282 | clk[emi_slow_sel] = imx_clk_fixup_mux("emi_slow_sel", base + 0x1c, 29, 2, emi_slow_sels, ARRAY_SIZE(emi_slow_sels), imx_cscmr1_fixup); | 248 | clk[IMX6QDL_CLK_EMI_SLOW_SEL] = imx_clk_fixup_mux("emi_slow_sel", base + 0x1c, 29, 2, emi_slow_sels, ARRAY_SIZE(emi_slow_sels), imx_cscmr1_fixup); |
283 | clk[vdo_axi_sel] = imx_clk_mux("vdo_axi_sel", base + 0x18, 11, 1, vdo_axi_sels, ARRAY_SIZE(vdo_axi_sels)); | 249 | clk[IMX6QDL_CLK_VDO_AXI_SEL] = imx_clk_mux("vdo_axi_sel", base + 0x18, 11, 1, vdo_axi_sels, ARRAY_SIZE(vdo_axi_sels)); |
284 | clk[vpu_axi_sel] = imx_clk_mux("vpu_axi_sel", base + 0x18, 14, 2, vpu_axi_sels, ARRAY_SIZE(vpu_axi_sels)); | 250 | clk[IMX6QDL_CLK_VPU_AXI_SEL] = imx_clk_mux("vpu_axi_sel", base + 0x18, 14, 2, vpu_axi_sels, ARRAY_SIZE(vpu_axi_sels)); |
285 | clk[cko1_sel] = imx_clk_mux("cko1_sel", base + 0x60, 0, 4, cko1_sels, ARRAY_SIZE(cko1_sels)); | 251 | clk[IMX6QDL_CLK_CKO1_SEL] = imx_clk_mux("cko1_sel", base + 0x60, 0, 4, cko1_sels, ARRAY_SIZE(cko1_sels)); |
286 | clk[cko2_sel] = imx_clk_mux("cko2_sel", base + 0x60, 16, 5, cko2_sels, ARRAY_SIZE(cko2_sels)); | 252 | clk[IMX6QDL_CLK_CKO2_SEL] = imx_clk_mux("cko2_sel", base + 0x60, 16, 5, cko2_sels, ARRAY_SIZE(cko2_sels)); |
287 | clk[cko] = imx_clk_mux("cko", base + 0x60, 8, 1, cko_sels, ARRAY_SIZE(cko_sels)); | 253 | clk[IMX6QDL_CLK_CKO] = imx_clk_mux("cko", base + 0x60, 8, 1, cko_sels, ARRAY_SIZE(cko_sels)); |
288 | 254 | ||
289 | /* name reg shift width busy: reg, shift parent_names num_parents */ | 255 | /* name reg shift width busy: reg, shift parent_names num_parents */ |
290 | clk[periph] = imx_clk_busy_mux("periph", base + 0x14, 25, 1, base + 0x48, 5, periph_sels, ARRAY_SIZE(periph_sels)); | 256 | clk[IMX6QDL_CLK_PERIPH] = imx_clk_busy_mux("periph", base + 0x14, 25, 1, base + 0x48, 5, periph_sels, ARRAY_SIZE(periph_sels)); |
291 | clk[periph2] = imx_clk_busy_mux("periph2", base + 0x14, 26, 1, base + 0x48, 3, periph2_sels, ARRAY_SIZE(periph2_sels)); | 257 | clk[IMX6QDL_CLK_PERIPH2] = imx_clk_busy_mux("periph2", base + 0x14, 26, 1, base + 0x48, 3, periph2_sels, ARRAY_SIZE(periph2_sels)); |
292 | 258 | ||
293 | /* name parent_name reg shift width */ | 259 | /* name parent_name reg shift width */ |
294 | clk[periph_clk2] = imx_clk_divider("periph_clk2", "periph_clk2_sel", base + 0x14, 27, 3); | 260 | clk[IMX6QDL_CLK_PERIPH_CLK2] = imx_clk_divider("periph_clk2", "periph_clk2_sel", base + 0x14, 27, 3); |
295 | clk[periph2_clk2] = imx_clk_divider("periph2_clk2", "periph2_clk2_sel", base + 0x14, 0, 3); | 261 | clk[IMX6QDL_CLK_PERIPH2_CLK2] = imx_clk_divider("periph2_clk2", "periph2_clk2_sel", base + 0x14, 0, 3); |
296 | clk[ipg] = imx_clk_divider("ipg", "ahb", base + 0x14, 8, 2); | 262 | clk[IMX6QDL_CLK_IPG] = imx_clk_divider("ipg", "ahb", base + 0x14, 8, 2); |
297 | clk[ipg_per] = imx_clk_fixup_divider("ipg_per", "ipg", base + 0x1c, 0, 6, imx_cscmr1_fixup); | 263 | clk[IMX6QDL_CLK_IPG_PER] = imx_clk_fixup_divider("ipg_per", "ipg", base + 0x1c, 0, 6, imx_cscmr1_fixup); |
298 | clk[esai_pred] = imx_clk_divider("esai_pred", "esai_sel", base + 0x28, 9, 3); | 264 | clk[IMX6QDL_CLK_ESAI_PRED] = imx_clk_divider("esai_pred", "esai_sel", base + 0x28, 9, 3); |
299 | clk[esai_podf] = imx_clk_divider("esai_podf", "esai_pred", base + 0x28, 25, 3); | 265 | clk[IMX6QDL_CLK_ESAI_PODF] = imx_clk_divider("esai_podf", "esai_pred", base + 0x28, 25, 3); |
300 | clk[asrc_pred] = imx_clk_divider("asrc_pred", "asrc_sel", base + 0x30, 12, 3); | 266 | clk[IMX6QDL_CLK_ASRC_PRED] = imx_clk_divider("asrc_pred", "asrc_sel", base + 0x30, 12, 3); |
301 | clk[asrc_podf] = imx_clk_divider("asrc_podf", "asrc_pred", base + 0x30, 9, 3); | 267 | clk[IMX6QDL_CLK_ASRC_PODF] = imx_clk_divider("asrc_podf", "asrc_pred", base + 0x30, 9, 3); |
302 | clk[spdif_pred] = imx_clk_divider("spdif_pred", "spdif_sel", base + 0x30, 25, 3); | 268 | clk[IMX6QDL_CLK_SPDIF_PRED] = imx_clk_divider("spdif_pred", "spdif_sel", base + 0x30, 25, 3); |
303 | clk[spdif_podf] = imx_clk_divider("spdif_podf", "spdif_pred", base + 0x30, 22, 3); | 269 | clk[IMX6QDL_CLK_SPDIF_PODF] = imx_clk_divider("spdif_podf", "spdif_pred", base + 0x30, 22, 3); |
304 | clk[can_root] = imx_clk_divider("can_root", "pll3_60m", base + 0x20, 2, 6); | 270 | clk[IMX6QDL_CLK_CAN_ROOT] = imx_clk_divider("can_root", "pll3_60m", base + 0x20, 2, 6); |
305 | clk[ecspi_root] = imx_clk_divider("ecspi_root", "pll3_60m", base + 0x38, 19, 6); | 271 | clk[IMX6QDL_CLK_ECSPI_ROOT] = imx_clk_divider("ecspi_root", "pll3_60m", base + 0x38, 19, 6); |
306 | clk[gpu2d_core_podf] = imx_clk_divider("gpu2d_core_podf", "gpu2d_core_sel", base + 0x18, 23, 3); | 272 | clk[IMX6QDL_CLK_GPU2D_CORE_PODF] = imx_clk_divider("gpu2d_core_podf", "gpu2d_core_sel", base + 0x18, 23, 3); |
307 | clk[gpu3d_core_podf] = imx_clk_divider("gpu3d_core_podf", "gpu3d_core_sel", base + 0x18, 26, 3); | 273 | clk[IMX6QDL_CLK_GPU3D_CORE_PODF] = imx_clk_divider("gpu3d_core_podf", "gpu3d_core_sel", base + 0x18, 26, 3); |
308 | clk[gpu3d_shader] = imx_clk_divider("gpu3d_shader", "gpu3d_shader_sel", base + 0x18, 29, 3); | 274 | clk[IMX6QDL_CLK_GPU3D_SHADER] = imx_clk_divider("gpu3d_shader", "gpu3d_shader_sel", base + 0x18, 29, 3); |
309 | clk[ipu1_podf] = imx_clk_divider("ipu1_podf", "ipu1_sel", base + 0x3c, 11, 3); | 275 | clk[IMX6QDL_CLK_IPU1_PODF] = imx_clk_divider("ipu1_podf", "ipu1_sel", base + 0x3c, 11, 3); |
310 | clk[ipu2_podf] = imx_clk_divider("ipu2_podf", "ipu2_sel", base + 0x3c, 16, 3); | 276 | clk[IMX6QDL_CLK_IPU2_PODF] = imx_clk_divider("ipu2_podf", "ipu2_sel", base + 0x3c, 16, 3); |
311 | clk[ldb_di0_div_3_5] = imx_clk_fixed_factor("ldb_di0_div_3_5", "ldb_di0_sel", 2, 7); | 277 | clk[IMX6QDL_CLK_LDB_DI0_DIV_3_5] = imx_clk_fixed_factor("ldb_di0_div_3_5", "ldb_di0_sel", 2, 7); |
312 | clk[ldb_di0_podf] = imx_clk_divider_flags("ldb_di0_podf", "ldb_di0_div_3_5", base + 0x20, 10, 1, 0); | 278 | clk[IMX6QDL_CLK_LDB_DI0_PODF] = imx_clk_divider_flags("ldb_di0_podf", "ldb_di0_div_3_5", base + 0x20, 10, 1, 0); |
313 | clk[ldb_di1_div_3_5] = imx_clk_fixed_factor("ldb_di1_div_3_5", "ldb_di1_sel", 2, 7); | 279 | clk[IMX6QDL_CLK_LDB_DI1_DIV_3_5] = imx_clk_fixed_factor("ldb_di1_div_3_5", "ldb_di1_sel", 2, 7); |
314 | clk[ldb_di1_podf] = imx_clk_divider_flags("ldb_di1_podf", "ldb_di1_div_3_5", base + 0x20, 11, 1, 0); | 280 | clk[IMX6QDL_CLK_LDB_DI1_PODF] = imx_clk_divider_flags("ldb_di1_podf", "ldb_di1_div_3_5", base + 0x20, 11, 1, 0); |
315 | clk[ipu1_di0_pre] = imx_clk_divider("ipu1_di0_pre", "ipu1_di0_pre_sel", base + 0x34, 3, 3); | 281 | clk[IMX6QDL_CLK_IPU1_DI0_PRE] = imx_clk_divider("ipu1_di0_pre", "ipu1_di0_pre_sel", base + 0x34, 3, 3); |
316 | clk[ipu1_di1_pre] = imx_clk_divider("ipu1_di1_pre", "ipu1_di1_pre_sel", base + 0x34, 12, 3); | 282 | clk[IMX6QDL_CLK_IPU1_DI1_PRE] = imx_clk_divider("ipu1_di1_pre", "ipu1_di1_pre_sel", base + 0x34, 12, 3); |
317 | clk[ipu2_di0_pre] = imx_clk_divider("ipu2_di0_pre", "ipu2_di0_pre_sel", base + 0x38, 3, 3); | 283 | clk[IMX6QDL_CLK_IPU2_DI0_PRE] = imx_clk_divider("ipu2_di0_pre", "ipu2_di0_pre_sel", base + 0x38, 3, 3); |
318 | clk[ipu2_di1_pre] = imx_clk_divider("ipu2_di1_pre", "ipu2_di1_pre_sel", base + 0x38, 12, 3); | 284 | clk[IMX6QDL_CLK_IPU2_DI1_PRE] = imx_clk_divider("ipu2_di1_pre", "ipu2_di1_pre_sel", base + 0x38, 12, 3); |
319 | clk[hsi_tx_podf] = imx_clk_divider("hsi_tx_podf", "hsi_tx_sel", base + 0x30, 29, 3); | 285 | clk[IMX6QDL_CLK_HSI_TX_PODF] = imx_clk_divider("hsi_tx_podf", "hsi_tx_sel", base + 0x30, 29, 3); |
320 | clk[ssi1_pred] = imx_clk_divider("ssi1_pred", "ssi1_sel", base + 0x28, 6, 3); | 286 | clk[IMX6QDL_CLK_SSI1_PRED] = imx_clk_divider("ssi1_pred", "ssi1_sel", base + 0x28, 6, 3); |
321 | clk[ssi1_podf] = imx_clk_divider("ssi1_podf", "ssi1_pred", base + 0x28, 0, 6); | 287 | clk[IMX6QDL_CLK_SSI1_PODF] = imx_clk_divider("ssi1_podf", "ssi1_pred", base + 0x28, 0, 6); |
322 | clk[ssi2_pred] = imx_clk_divider("ssi2_pred", "ssi2_sel", base + 0x2c, 6, 3); | 288 | clk[IMX6QDL_CLK_SSI2_PRED] = imx_clk_divider("ssi2_pred", "ssi2_sel", base + 0x2c, 6, 3); |
323 | clk[ssi2_podf] = imx_clk_divider("ssi2_podf", "ssi2_pred", base + 0x2c, 0, 6); | 289 | clk[IMX6QDL_CLK_SSI2_PODF] = imx_clk_divider("ssi2_podf", "ssi2_pred", base + 0x2c, 0, 6); |
324 | clk[ssi3_pred] = imx_clk_divider("ssi3_pred", "ssi3_sel", base + 0x28, 22, 3); | 290 | clk[IMX6QDL_CLK_SSI3_PRED] = imx_clk_divider("ssi3_pred", "ssi3_sel", base + 0x28, 22, 3); |
325 | clk[ssi3_podf] = imx_clk_divider("ssi3_podf", "ssi3_pred", base + 0x28, 16, 6); | 291 | clk[IMX6QDL_CLK_SSI3_PODF] = imx_clk_divider("ssi3_podf", "ssi3_pred", base + 0x28, 16, 6); |
326 | clk[uart_serial_podf] = imx_clk_divider("uart_serial_podf", "pll3_80m", base + 0x24, 0, 6); | 292 | clk[IMX6QDL_CLK_UART_SERIAL_PODF] = imx_clk_divider("uart_serial_podf", "pll3_80m", base + 0x24, 0, 6); |
327 | clk[usdhc1_podf] = imx_clk_divider("usdhc1_podf", "usdhc1_sel", base + 0x24, 11, 3); | 293 | clk[IMX6QDL_CLK_USDHC1_PODF] = imx_clk_divider("usdhc1_podf", "usdhc1_sel", base + 0x24, 11, 3); |
328 | clk[usdhc2_podf] = imx_clk_divider("usdhc2_podf", "usdhc2_sel", base + 0x24, 16, 3); | 294 | clk[IMX6QDL_CLK_USDHC2_PODF] = imx_clk_divider("usdhc2_podf", "usdhc2_sel", base + 0x24, 16, 3); |
329 | clk[usdhc3_podf] = imx_clk_divider("usdhc3_podf", "usdhc3_sel", base + 0x24, 19, 3); | 295 | clk[IMX6QDL_CLK_USDHC3_PODF] = imx_clk_divider("usdhc3_podf", "usdhc3_sel", base + 0x24, 19, 3); |
330 | clk[usdhc4_podf] = imx_clk_divider("usdhc4_podf", "usdhc4_sel", base + 0x24, 22, 3); | 296 | clk[IMX6QDL_CLK_USDHC4_PODF] = imx_clk_divider("usdhc4_podf", "usdhc4_sel", base + 0x24, 22, 3); |
331 | clk[enfc_pred] = imx_clk_divider("enfc_pred", "enfc_sel", base + 0x2c, 18, 3); | 297 | clk[IMX6QDL_CLK_ENFC_PRED] = imx_clk_divider("enfc_pred", "enfc_sel", base + 0x2c, 18, 3); |
332 | clk[enfc_podf] = imx_clk_divider("enfc_podf", "enfc_pred", base + 0x2c, 21, 6); | 298 | clk[IMX6QDL_CLK_ENFC_PODF] = imx_clk_divider("enfc_podf", "enfc_pred", base + 0x2c, 21, 6); |
333 | clk[emi_podf] = imx_clk_fixup_divider("emi_podf", "emi_sel", base + 0x1c, 20, 3, imx_cscmr1_fixup); | 299 | clk[IMX6QDL_CLK_EMI_PODF] = imx_clk_fixup_divider("emi_podf", "emi_sel", base + 0x1c, 20, 3, imx_cscmr1_fixup); |
334 | clk[emi_slow_podf] = imx_clk_fixup_divider("emi_slow_podf", "emi_slow_sel", base + 0x1c, 23, 3, imx_cscmr1_fixup); | 300 | clk[IMX6QDL_CLK_EMI_SLOW_PODF] = imx_clk_fixup_divider("emi_slow_podf", "emi_slow_sel", base + 0x1c, 23, 3, imx_cscmr1_fixup); |
335 | clk[vpu_axi_podf] = imx_clk_divider("vpu_axi_podf", "vpu_axi_sel", base + 0x24, 25, 3); | 301 | clk[IMX6QDL_CLK_VPU_AXI_PODF] = imx_clk_divider("vpu_axi_podf", "vpu_axi_sel", base + 0x24, 25, 3); |
336 | clk[cko1_podf] = imx_clk_divider("cko1_podf", "cko1_sel", base + 0x60, 4, 3); | 302 | clk[IMX6QDL_CLK_CKO1_PODF] = imx_clk_divider("cko1_podf", "cko1_sel", base + 0x60, 4, 3); |
337 | clk[cko2_podf] = imx_clk_divider("cko2_podf", "cko2_sel", base + 0x60, 21, 3); | 303 | clk[IMX6QDL_CLK_CKO2_PODF] = imx_clk_divider("cko2_podf", "cko2_sel", base + 0x60, 21, 3); |
338 | 304 | ||
339 | /* name parent_name reg shift width busy: reg, shift */ | 305 | /* name parent_name reg shift width busy: reg, shift */ |
340 | clk[axi] = imx_clk_busy_divider("axi", "axi_sel", base + 0x14, 16, 3, base + 0x48, 0); | 306 | clk[IMX6QDL_CLK_AXI] = imx_clk_busy_divider("axi", "axi_sel", base + 0x14, 16, 3, base + 0x48, 0); |
341 | clk[mmdc_ch0_axi_podf] = imx_clk_busy_divider("mmdc_ch0_axi_podf", "periph", base + 0x14, 19, 3, base + 0x48, 4); | 307 | clk[IMX6QDL_CLK_MMDC_CH0_AXI_PODF] = imx_clk_busy_divider("mmdc_ch0_axi_podf", "periph", base + 0x14, 19, 3, base + 0x48, 4); |
342 | clk[mmdc_ch1_axi_podf] = imx_clk_busy_divider("mmdc_ch1_axi_podf", "periph2", base + 0x14, 3, 3, base + 0x48, 2); | 308 | clk[IMX6QDL_CLK_MMDC_CH1_AXI_PODF] = imx_clk_busy_divider("mmdc_ch1_axi_podf", "periph2", base + 0x14, 3, 3, base + 0x48, 2); |
343 | clk[arm] = imx_clk_busy_divider("arm", "pll1_sw", base + 0x10, 0, 3, base + 0x48, 16); | 309 | clk[IMX6QDL_CLK_ARM] = imx_clk_busy_divider("arm", "pll1_sw", base + 0x10, 0, 3, base + 0x48, 16); |
344 | clk[ahb] = imx_clk_busy_divider("ahb", "periph", base + 0x14, 10, 3, base + 0x48, 1); | 310 | clk[IMX6QDL_CLK_AHB] = imx_clk_busy_divider("ahb", "periph", base + 0x14, 10, 3, base + 0x48, 1); |
345 | 311 | ||
346 | /* name parent_name reg shift */ | 312 | /* name parent_name reg shift */ |
347 | clk[apbh_dma] = imx_clk_gate2("apbh_dma", "usdhc3", base + 0x68, 4); | 313 | clk[IMX6QDL_CLK_APBH_DMA] = imx_clk_gate2("apbh_dma", "usdhc3", base + 0x68, 4); |
348 | clk[asrc] = imx_clk_gate2("asrc", "asrc_podf", base + 0x68, 6); | 314 | clk[IMX6QDL_CLK_ASRC] = imx_clk_gate2("asrc", "asrc_podf", base + 0x68, 6); |
349 | clk[can1_ipg] = imx_clk_gate2("can1_ipg", "ipg", base + 0x68, 14); | 315 | clk[IMX6QDL_CLK_CAN1_IPG] = imx_clk_gate2("can1_ipg", "ipg", base + 0x68, 14); |
350 | clk[can1_serial] = imx_clk_gate2("can1_serial", "can_root", base + 0x68, 16); | 316 | clk[IMX6QDL_CLK_CAN1_SERIAL] = imx_clk_gate2("can1_serial", "can_root", base + 0x68, 16); |
351 | clk[can2_ipg] = imx_clk_gate2("can2_ipg", "ipg", base + 0x68, 18); | 317 | clk[IMX6QDL_CLK_CAN2_IPG] = imx_clk_gate2("can2_ipg", "ipg", base + 0x68, 18); |
352 | clk[can2_serial] = imx_clk_gate2("can2_serial", "can_root", base + 0x68, 20); | 318 | clk[IMX6QDL_CLK_CAN2_SERIAL] = imx_clk_gate2("can2_serial", "can_root", base + 0x68, 20); |
353 | clk[ecspi1] = imx_clk_gate2("ecspi1", "ecspi_root", base + 0x6c, 0); | 319 | clk[IMX6QDL_CLK_ECSPI1] = imx_clk_gate2("ecspi1", "ecspi_root", base + 0x6c, 0); |
354 | clk[ecspi2] = imx_clk_gate2("ecspi2", "ecspi_root", base + 0x6c, 2); | 320 | clk[IMX6QDL_CLK_ECSPI2] = imx_clk_gate2("ecspi2", "ecspi_root", base + 0x6c, 2); |
355 | clk[ecspi3] = imx_clk_gate2("ecspi3", "ecspi_root", base + 0x6c, 4); | 321 | clk[IMX6QDL_CLK_ECSPI3] = imx_clk_gate2("ecspi3", "ecspi_root", base + 0x6c, 4); |
356 | clk[ecspi4] = imx_clk_gate2("ecspi4", "ecspi_root", base + 0x6c, 6); | 322 | clk[IMX6QDL_CLK_ECSPI4] = imx_clk_gate2("ecspi4", "ecspi_root", base + 0x6c, 6); |
357 | if (cpu_is_imx6dl()) | 323 | if (cpu_is_imx6dl()) |
358 | /* ecspi5 is replaced with i2c4 on imx6dl & imx6s */ | 324 | clk[IMX6DL_CLK_I2C4] = imx_clk_gate2("i2c4", "ipg_per", base + 0x6c, 8); |
359 | clk[ecspi5] = imx_clk_gate2("i2c4", "ipg_per", base + 0x6c, 8); | ||
360 | else | 325 | else |
361 | clk[ecspi5] = imx_clk_gate2("ecspi5", "ecspi_root", base + 0x6c, 8); | 326 | clk[IMX6Q_CLK_ECSPI5] = imx_clk_gate2("ecspi5", "ecspi_root", base + 0x6c, 8); |
362 | clk[enet] = imx_clk_gate2("enet", "ipg", base + 0x6c, 10); | 327 | clk[IMX6QDL_CLK_ENET] = imx_clk_gate2("enet", "ipg", base + 0x6c, 10); |
363 | clk[esai] = imx_clk_gate2_shared("esai", "esai_podf", base + 0x6c, 16, &share_count_esai); | 328 | clk[IMX6QDL_CLK_ESAI] = imx_clk_gate2_shared("esai", "esai_podf", base + 0x6c, 16, &share_count_esai); |
364 | clk[esai_ahb] = imx_clk_gate2_shared("esai_ahb", "ahb", base + 0x6c, 16, &share_count_esai); | 329 | clk[IMX6QDL_CLK_ESAI_AHB] = imx_clk_gate2_shared("esai_ahb", "ahb", base + 0x6c, 16, &share_count_esai); |
365 | clk[gpt_ipg] = imx_clk_gate2("gpt_ipg", "ipg", base + 0x6c, 20); | 330 | clk[IMX6QDL_CLK_GPT_IPG] = imx_clk_gate2("gpt_ipg", "ipg", base + 0x6c, 20); |
366 | clk[gpt_ipg_per] = imx_clk_gate2("gpt_ipg_per", "ipg_per", base + 0x6c, 22); | 331 | clk[IMX6QDL_CLK_GPT_IPG_PER] = imx_clk_gate2("gpt_ipg_per", "ipg_per", base + 0x6c, 22); |
367 | if (cpu_is_imx6dl()) | 332 | if (cpu_is_imx6dl()) |
368 | /* | 333 | /* |
369 | * The multiplexer and divider of imx6q clock gpu3d_shader get | 334 | * The multiplexer and divider of imx6q clock gpu3d_shader get |
370 | * redefined/reused as gpu2d_core_sel and gpu2d_core_podf on imx6dl. | 335 | * redefined/reused as gpu2d_core_sel and gpu2d_core_podf on imx6dl. |
371 | */ | 336 | */ |
372 | clk[gpu2d_core] = imx_clk_gate2("gpu2d_core", "gpu3d_shader", base + 0x6c, 24); | 337 | clk[IMX6QDL_CLK_GPU2D_CORE] = imx_clk_gate2("gpu2d_core", "gpu3d_shader", base + 0x6c, 24); |
373 | else | 338 | else |
374 | clk[gpu2d_core] = imx_clk_gate2("gpu2d_core", "gpu2d_core_podf", base + 0x6c, 24); | 339 | clk[IMX6QDL_CLK_GPU2D_CORE] = imx_clk_gate2("gpu2d_core", "gpu2d_core_podf", base + 0x6c, 24); |
375 | clk[gpu3d_core] = imx_clk_gate2("gpu3d_core", "gpu3d_core_podf", base + 0x6c, 26); | 340 | clk[IMX6QDL_CLK_GPU3D_CORE] = imx_clk_gate2("gpu3d_core", "gpu3d_core_podf", base + 0x6c, 26); |
376 | clk[hdmi_iahb] = imx_clk_gate2("hdmi_iahb", "ahb", base + 0x70, 0); | 341 | clk[IMX6QDL_CLK_HDMI_IAHB] = imx_clk_gate2("hdmi_iahb", "ahb", base + 0x70, 0); |
377 | clk[hdmi_isfr] = imx_clk_gate2("hdmi_isfr", "pll3_pfd1_540m", base + 0x70, 4); | 342 | clk[IMX6QDL_CLK_HDMI_ISFR] = imx_clk_gate2("hdmi_isfr", "pll3_pfd1_540m", base + 0x70, 4); |
378 | clk[i2c1] = imx_clk_gate2("i2c1", "ipg_per", base + 0x70, 6); | 343 | clk[IMX6QDL_CLK_I2C1] = imx_clk_gate2("i2c1", "ipg_per", base + 0x70, 6); |
379 | clk[i2c2] = imx_clk_gate2("i2c2", "ipg_per", base + 0x70, 8); | 344 | clk[IMX6QDL_CLK_I2C2] = imx_clk_gate2("i2c2", "ipg_per", base + 0x70, 8); |
380 | clk[i2c3] = imx_clk_gate2("i2c3", "ipg_per", base + 0x70, 10); | 345 | clk[IMX6QDL_CLK_I2C3] = imx_clk_gate2("i2c3", "ipg_per", base + 0x70, 10); |
381 | clk[iim] = imx_clk_gate2("iim", "ipg", base + 0x70, 12); | 346 | clk[IMX6QDL_CLK_IIM] = imx_clk_gate2("iim", "ipg", base + 0x70, 12); |
382 | clk[enfc] = imx_clk_gate2("enfc", "enfc_podf", base + 0x70, 14); | 347 | clk[IMX6QDL_CLK_ENFC] = imx_clk_gate2("enfc", "enfc_podf", base + 0x70, 14); |
383 | clk[vdoa] = imx_clk_gate2("vdoa", "vdo_axi", base + 0x70, 26); | 348 | clk[IMX6QDL_CLK_VDOA] = imx_clk_gate2("vdoa", "vdo_axi", base + 0x70, 26); |
384 | clk[ipu1] = imx_clk_gate2("ipu1", "ipu1_podf", base + 0x74, 0); | 349 | clk[IMX6QDL_CLK_IPU1] = imx_clk_gate2("ipu1", "ipu1_podf", base + 0x74, 0); |
385 | clk[ipu1_di0] = imx_clk_gate2("ipu1_di0", "ipu1_di0_sel", base + 0x74, 2); | 350 | clk[IMX6QDL_CLK_IPU1_DI0] = imx_clk_gate2("ipu1_di0", "ipu1_di0_sel", base + 0x74, 2); |
386 | clk[ipu1_di1] = imx_clk_gate2("ipu1_di1", "ipu1_di1_sel", base + 0x74, 4); | 351 | clk[IMX6QDL_CLK_IPU1_DI1] = imx_clk_gate2("ipu1_di1", "ipu1_di1_sel", base + 0x74, 4); |
387 | clk[ipu2] = imx_clk_gate2("ipu2", "ipu2_podf", base + 0x74, 6); | 352 | clk[IMX6QDL_CLK_IPU2] = imx_clk_gate2("ipu2", "ipu2_podf", base + 0x74, 6); |
388 | clk[ipu2_di0] = imx_clk_gate2("ipu2_di0", "ipu2_di0_sel", base + 0x74, 8); | 353 | clk[IMX6QDL_CLK_IPU2_DI0] = imx_clk_gate2("ipu2_di0", "ipu2_di0_sel", base + 0x74, 8); |
389 | clk[ldb_di0] = imx_clk_gate2("ldb_di0", "ldb_di0_podf", base + 0x74, 12); | 354 | clk[IMX6QDL_CLK_LDB_DI0] = imx_clk_gate2("ldb_di0", "ldb_di0_podf", base + 0x74, 12); |
390 | clk[ldb_di1] = imx_clk_gate2("ldb_di1", "ldb_di1_podf", base + 0x74, 14); | 355 | clk[IMX6QDL_CLK_LDB_DI1] = imx_clk_gate2("ldb_di1", "ldb_di1_podf", base + 0x74, 14); |
391 | clk[ipu2_di1] = imx_clk_gate2("ipu2_di1", "ipu2_di1_sel", base + 0x74, 10); | 356 | clk[IMX6QDL_CLK_IPU2_DI1] = imx_clk_gate2("ipu2_di1", "ipu2_di1_sel", base + 0x74, 10); |
392 | clk[hsi_tx] = imx_clk_gate2("hsi_tx", "hsi_tx_podf", base + 0x74, 16); | 357 | clk[IMX6QDL_CLK_HSI_TX] = imx_clk_gate2("hsi_tx", "hsi_tx_podf", base + 0x74, 16); |
393 | if (cpu_is_imx6dl()) | 358 | if (cpu_is_imx6dl()) |
394 | /* | 359 | /* |
395 | * The multiplexer and divider of the imx6q clock gpu2d get | 360 | * The multiplexer and divider of the imx6q clock gpu2d get |
396 | * redefined/reused as mlb_sys_sel and mlb_sys_clk_podf on imx6dl. | 361 | * redefined/reused as mlb_sys_sel and mlb_sys_clk_podf on imx6dl. |
397 | */ | 362 | */ |
398 | clk[mlb] = imx_clk_gate2("mlb", "gpu2d_core_podf", base + 0x74, 18); | 363 | clk[IMX6QDL_CLK_MLB] = imx_clk_gate2("mlb", "gpu2d_core_podf", base + 0x74, 18); |
399 | else | 364 | else |
400 | clk[mlb] = imx_clk_gate2("mlb", "axi", base + 0x74, 18); | 365 | clk[IMX6QDL_CLK_MLB] = imx_clk_gate2("mlb", "axi", base + 0x74, 18); |
401 | clk[mmdc_ch0_axi] = imx_clk_gate2("mmdc_ch0_axi", "mmdc_ch0_axi_podf", base + 0x74, 20); | 366 | clk[IMX6QDL_CLK_MMDC_CH0_AXI] = imx_clk_gate2("mmdc_ch0_axi", "mmdc_ch0_axi_podf", base + 0x74, 20); |
402 | clk[mmdc_ch1_axi] = imx_clk_gate2("mmdc_ch1_axi", "mmdc_ch1_axi_podf", base + 0x74, 22); | 367 | clk[IMX6QDL_CLK_MMDC_CH1_AXI] = imx_clk_gate2("mmdc_ch1_axi", "mmdc_ch1_axi_podf", base + 0x74, 22); |
403 | clk[ocram] = imx_clk_gate2("ocram", "ahb", base + 0x74, 28); | 368 | clk[IMX6QDL_CLK_OCRAM] = imx_clk_gate2("ocram", "ahb", base + 0x74, 28); |
404 | clk[openvg_axi] = imx_clk_gate2("openvg_axi", "axi", base + 0x74, 30); | 369 | clk[IMX6QDL_CLK_OPENVG_AXI] = imx_clk_gate2("openvg_axi", "axi", base + 0x74, 30); |
405 | clk[pcie_axi] = imx_clk_gate2("pcie_axi", "pcie_axi_sel", base + 0x78, 0); | 370 | clk[IMX6QDL_CLK_PCIE_AXI] = imx_clk_gate2("pcie_axi", "pcie_axi_sel", base + 0x78, 0); |
406 | clk[per1_bch] = imx_clk_gate2("per1_bch", "usdhc3", base + 0x78, 12); | 371 | clk[IMX6QDL_CLK_PER1_BCH] = imx_clk_gate2("per1_bch", "usdhc3", base + 0x78, 12); |
407 | clk[pwm1] = imx_clk_gate2("pwm1", "ipg_per", base + 0x78, 16); | 372 | clk[IMX6QDL_CLK_PWM1] = imx_clk_gate2("pwm1", "ipg_per", base + 0x78, 16); |
408 | clk[pwm2] = imx_clk_gate2("pwm2", "ipg_per", base + 0x78, 18); | 373 | clk[IMX6QDL_CLK_PWM2] = imx_clk_gate2("pwm2", "ipg_per", base + 0x78, 18); |
409 | clk[pwm3] = imx_clk_gate2("pwm3", "ipg_per", base + 0x78, 20); | 374 | clk[IMX6QDL_CLK_PWM3] = imx_clk_gate2("pwm3", "ipg_per", base + 0x78, 20); |
410 | clk[pwm4] = imx_clk_gate2("pwm4", "ipg_per", base + 0x78, 22); | 375 | clk[IMX6QDL_CLK_PWM4] = imx_clk_gate2("pwm4", "ipg_per", base + 0x78, 22); |
411 | clk[gpmi_bch_apb] = imx_clk_gate2("gpmi_bch_apb", "usdhc3", base + 0x78, 24); | 376 | clk[IMX6QDL_CLK_GPMI_BCH_APB] = imx_clk_gate2("gpmi_bch_apb", "usdhc3", base + 0x78, 24); |
412 | clk[gpmi_bch] = imx_clk_gate2("gpmi_bch", "usdhc4", base + 0x78, 26); | 377 | clk[IMX6QDL_CLK_GPMI_BCH] = imx_clk_gate2("gpmi_bch", "usdhc4", base + 0x78, 26); |
413 | clk[gpmi_io] = imx_clk_gate2("gpmi_io", "enfc", base + 0x78, 28); | 378 | clk[IMX6QDL_CLK_GPMI_IO] = imx_clk_gate2("gpmi_io", "enfc", base + 0x78, 28); |
414 | clk[gpmi_apb] = imx_clk_gate2("gpmi_apb", "usdhc3", base + 0x78, 30); | 379 | clk[IMX6QDL_CLK_GPMI_APB] = imx_clk_gate2("gpmi_apb", "usdhc3", base + 0x78, 30); |
415 | clk[rom] = imx_clk_gate2("rom", "ahb", base + 0x7c, 0); | 380 | clk[IMX6QDL_CLK_ROM] = imx_clk_gate2("rom", "ahb", base + 0x7c, 0); |
416 | clk[sata] = imx_clk_gate2("sata", "ipg", base + 0x7c, 4); | 381 | clk[IMX6QDL_CLK_SATA] = imx_clk_gate2("sata", "ipg", base + 0x7c, 4); |
417 | clk[sdma] = imx_clk_gate2("sdma", "ahb", base + 0x7c, 6); | 382 | clk[IMX6QDL_CLK_SDMA] = imx_clk_gate2("sdma", "ahb", base + 0x7c, 6); |
418 | clk[spba] = imx_clk_gate2("spba", "ipg", base + 0x7c, 12); | 383 | clk[IMX6QDL_CLK_SPBA] = imx_clk_gate2("spba", "ipg", base + 0x7c, 12); |
419 | clk[spdif] = imx_clk_gate2("spdif", "spdif_podf", base + 0x7c, 14); | 384 | clk[IMX6QDL_CLK_SPDIF] = imx_clk_gate2("spdif", "spdif_podf", base + 0x7c, 14); |
420 | clk[ssi1_ipg] = imx_clk_gate2("ssi1_ipg", "ipg", base + 0x7c, 18); | 385 | clk[IMX6QDL_CLK_SSI1_IPG] = imx_clk_gate2("ssi1_ipg", "ipg", base + 0x7c, 18); |
421 | clk[ssi2_ipg] = imx_clk_gate2("ssi2_ipg", "ipg", base + 0x7c, 20); | 386 | clk[IMX6QDL_CLK_SSI2_IPG] = imx_clk_gate2("ssi2_ipg", "ipg", base + 0x7c, 20); |
422 | clk[ssi3_ipg] = imx_clk_gate2("ssi3_ipg", "ipg", base + 0x7c, 22); | 387 | clk[IMX6QDL_CLK_SSI3_IPG] = imx_clk_gate2("ssi3_ipg", "ipg", base + 0x7c, 22); |
423 | clk[uart_ipg] = imx_clk_gate2("uart_ipg", "ipg", base + 0x7c, 24); | 388 | clk[IMX6QDL_CLK_UART_IPG] = imx_clk_gate2("uart_ipg", "ipg", base + 0x7c, 24); |
424 | clk[uart_serial] = imx_clk_gate2("uart_serial", "uart_serial_podf", base + 0x7c, 26); | 389 | clk[IMX6QDL_CLK_UART_SERIAL] = imx_clk_gate2("uart_serial", "uart_serial_podf", base + 0x7c, 26); |
425 | clk[usboh3] = imx_clk_gate2("usboh3", "ipg", base + 0x80, 0); | 390 | clk[IMX6QDL_CLK_USBOH3] = imx_clk_gate2("usboh3", "ipg", base + 0x80, 0); |
426 | clk[usdhc1] = imx_clk_gate2("usdhc1", "usdhc1_podf", base + 0x80, 2); | 391 | clk[IMX6QDL_CLK_USDHC1] = imx_clk_gate2("usdhc1", "usdhc1_podf", base + 0x80, 2); |
427 | clk[usdhc2] = imx_clk_gate2("usdhc2", "usdhc2_podf", base + 0x80, 4); | 392 | clk[IMX6QDL_CLK_USDHC2] = imx_clk_gate2("usdhc2", "usdhc2_podf", base + 0x80, 4); |
428 | clk[usdhc3] = imx_clk_gate2("usdhc3", "usdhc3_podf", base + 0x80, 6); | 393 | clk[IMX6QDL_CLK_USDHC3] = imx_clk_gate2("usdhc3", "usdhc3_podf", base + 0x80, 6); |
429 | clk[usdhc4] = imx_clk_gate2("usdhc4", "usdhc4_podf", base + 0x80, 8); | 394 | clk[IMX6QDL_CLK_USDHC4] = imx_clk_gate2("usdhc4", "usdhc4_podf", base + 0x80, 8); |
430 | clk[eim_slow] = imx_clk_gate2("eim_slow", "emi_slow_podf", base + 0x80, 10); | 395 | clk[IMX6QDL_CLK_EIM_SLOW] = imx_clk_gate2("eim_slow", "emi_slow_podf", base + 0x80, 10); |
431 | clk[vdo_axi] = imx_clk_gate2("vdo_axi", "vdo_axi_sel", base + 0x80, 12); | 396 | clk[IMX6QDL_CLK_VDO_AXI] = imx_clk_gate2("vdo_axi", "vdo_axi_sel", base + 0x80, 12); |
432 | clk[vpu_axi] = imx_clk_gate2("vpu_axi", "vpu_axi_podf", base + 0x80, 14); | 397 | clk[IMX6QDL_CLK_VPU_AXI] = imx_clk_gate2("vpu_axi", "vpu_axi_podf", base + 0x80, 14); |
433 | clk[cko1] = imx_clk_gate("cko1", "cko1_podf", base + 0x60, 7); | 398 | clk[IMX6QDL_CLK_CKO1] = imx_clk_gate("cko1", "cko1_podf", base + 0x60, 7); |
434 | clk[cko2] = imx_clk_gate("cko2", "cko2_podf", base + 0x60, 24); | 399 | clk[IMX6QDL_CLK_CKO2] = imx_clk_gate("cko2", "cko2_podf", base + 0x60, 24); |
435 | 400 | ||
436 | for (i = 0; i < ARRAY_SIZE(clk); i++) | 401 | imx_check_clocks(clk, ARRAY_SIZE(clk)); |
437 | if (IS_ERR(clk[i])) | ||
438 | pr_err("i.MX6q clk %d: register failed with %ld\n", | ||
439 | i, PTR_ERR(clk[i])); | ||
440 | 402 | ||
441 | clk_data.clks = clk; | 403 | clk_data.clks = clk; |
442 | clk_data.clk_num = ARRAY_SIZE(clk); | 404 | clk_data.clk_num = ARRAY_SIZE(clk); |
443 | of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data); | 405 | of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data); |
444 | 406 | ||
445 | clk_register_clkdev(clk[gpt_ipg], "ipg", "imx-gpt.0"); | 407 | clk_register_clkdev(clk[IMX6QDL_CLK_ENET_REF], "enet_ref", NULL); |
446 | clk_register_clkdev(clk[gpt_ipg_per], "per", "imx-gpt.0"); | ||
447 | clk_register_clkdev(clk[enet_ref], "enet_ref", NULL); | ||
448 | 408 | ||
449 | if ((imx_get_soc_revision() != IMX_CHIP_REVISION_1_0) || | 409 | if ((imx_get_soc_revision() != IMX_CHIP_REVISION_1_0) || |
450 | cpu_is_imx6dl()) { | 410 | cpu_is_imx6dl()) { |
451 | clk_set_parent(clk[ldb_di0_sel], clk[pll5_video_div]); | 411 | clk_set_parent(clk[IMX6QDL_CLK_LDB_DI0_SEL], clk[IMX6QDL_CLK_PLL5_VIDEO_DIV]); |
452 | clk_set_parent(clk[ldb_di1_sel], clk[pll5_video_div]); | 412 | clk_set_parent(clk[IMX6QDL_CLK_LDB_DI1_SEL], clk[IMX6QDL_CLK_PLL5_VIDEO_DIV]); |
453 | } | 413 | } |
454 | 414 | ||
455 | clk_set_parent(clk[ipu1_di0_pre_sel], clk[pll5_video_div]); | 415 | clk_set_parent(clk[IMX6QDL_CLK_IPU1_DI0_PRE_SEL], clk[IMX6QDL_CLK_PLL5_VIDEO_DIV]); |
456 | clk_set_parent(clk[ipu1_di1_pre_sel], clk[pll5_video_div]); | 416 | clk_set_parent(clk[IMX6QDL_CLK_IPU1_DI1_PRE_SEL], clk[IMX6QDL_CLK_PLL5_VIDEO_DIV]); |
457 | clk_set_parent(clk[ipu2_di0_pre_sel], clk[pll5_video_div]); | 417 | clk_set_parent(clk[IMX6QDL_CLK_IPU2_DI0_PRE_SEL], clk[IMX6QDL_CLK_PLL5_VIDEO_DIV]); |
458 | clk_set_parent(clk[ipu2_di1_pre_sel], clk[pll5_video_div]); | 418 | clk_set_parent(clk[IMX6QDL_CLK_IPU2_DI1_PRE_SEL], clk[IMX6QDL_CLK_PLL5_VIDEO_DIV]); |
459 | clk_set_parent(clk[ipu1_di0_sel], clk[ipu1_di0_pre]); | 419 | clk_set_parent(clk[IMX6QDL_CLK_IPU1_DI0_SEL], clk[IMX6QDL_CLK_IPU1_DI0_PRE]); |
460 | clk_set_parent(clk[ipu1_di1_sel], clk[ipu1_di1_pre]); | 420 | clk_set_parent(clk[IMX6QDL_CLK_IPU1_DI1_SEL], clk[IMX6QDL_CLK_IPU1_DI1_PRE]); |
461 | clk_set_parent(clk[ipu2_di0_sel], clk[ipu2_di0_pre]); | 421 | clk_set_parent(clk[IMX6QDL_CLK_IPU2_DI0_SEL], clk[IMX6QDL_CLK_IPU2_DI0_PRE]); |
462 | clk_set_parent(clk[ipu2_di1_sel], clk[ipu2_di1_pre]); | 422 | clk_set_parent(clk[IMX6QDL_CLK_IPU2_DI1_SEL], clk[IMX6QDL_CLK_IPU2_DI1_PRE]); |
463 | 423 | ||
464 | /* | 424 | /* |
465 | * The gpmi needs 100MHz frequency in the EDO/Sync mode, | 425 | * The gpmi needs 100MHz frequency in the EDO/Sync mode, |
466 | * We can not get the 100MHz from the pll2_pfd0_352m. | 426 | * We can not get the 100MHz from the pll2_pfd0_352m. |
467 | * So choose pll2_pfd2_396m as enfc_sel's parent. | 427 | * So choose pll2_pfd2_396m as enfc_sel's parent. |
468 | */ | 428 | */ |
469 | clk_set_parent(clk[enfc_sel], clk[pll2_pfd2_396m]); | 429 | clk_set_parent(clk[IMX6QDL_CLK_ENFC_SEL], clk[IMX6QDL_CLK_PLL2_PFD2_396M]); |
470 | 430 | ||
471 | for (i = 0; i < ARRAY_SIZE(clks_init_on); i++) | 431 | for (i = 0; i < ARRAY_SIZE(clks_init_on); i++) |
472 | clk_prepare_enable(clk[clks_init_on[i]]); | 432 | clk_prepare_enable(clk[clks_init_on[i]]); |
473 | 433 | ||
474 | if (IS_ENABLED(CONFIG_USB_MXS_PHY)) { | 434 | if (IS_ENABLED(CONFIG_USB_MXS_PHY)) { |
475 | clk_prepare_enable(clk[usbphy1_gate]); | 435 | clk_prepare_enable(clk[IMX6QDL_CLK_USBPHY1_GATE]); |
476 | clk_prepare_enable(clk[usbphy2_gate]); | 436 | clk_prepare_enable(clk[IMX6QDL_CLK_USBPHY2_GATE]); |
477 | } | 437 | } |
478 | 438 | ||
479 | /* | 439 | /* |
480 | * Let's initially set up CLKO with OSC24M, since this configuration | 440 | * Let's initially set up CLKO with OSC24M, since this configuration |
481 | * is widely used by imx6q board designs to clock audio codec. | 441 | * is widely used by imx6q board designs to clock audio codec. |
482 | */ | 442 | */ |
483 | ret = clk_set_parent(clk[cko2_sel], clk[osc]); | 443 | ret = clk_set_parent(clk[IMX6QDL_CLK_CKO2_SEL], clk[IMX6QDL_CLK_OSC]); |
484 | if (!ret) | 444 | if (!ret) |
485 | ret = clk_set_parent(clk[cko], clk[cko2]); | 445 | ret = clk_set_parent(clk[IMX6QDL_CLK_CKO], clk[IMX6QDL_CLK_CKO2]); |
486 | if (ret) | 446 | if (ret) |
487 | pr_warn("failed to set up CLKO: %d\n", ret); | 447 | pr_warn("failed to set up CLKO: %d\n", ret); |
488 | 448 | ||
489 | /* Audio-related clocks configuration */ | 449 | /* Audio-related clocks configuration */ |
490 | clk_set_parent(clk[spdif_sel], clk[pll3_pfd3_454m]); | 450 | clk_set_parent(clk[IMX6QDL_CLK_SPDIF_SEL], clk[IMX6QDL_CLK_PLL3_PFD3_454M]); |
491 | 451 | ||
492 | /* All existing boards with PCIe use LVDS1 */ | 452 | /* All existing boards with PCIe use LVDS1 */ |
493 | if (IS_ENABLED(CONFIG_PCI_IMX6)) | 453 | if (IS_ENABLED(CONFIG_PCI_IMX6)) |
494 | clk_set_parent(clk[lvds1_sel], clk[sata_ref]); | 454 | clk_set_parent(clk[IMX6QDL_CLK_LVDS1_SEL], clk[IMX6QDL_CLK_SATA_REF_100M]); |
495 | 455 | ||
496 | /* Set initial power mode */ | 456 | /* Set initial power mode */ |
497 | imx6q_set_lpm(WAIT_CLOCKED); | 457 | imx6q_set_lpm(WAIT_CLOCKED); |
498 | |||
499 | mxc_timer_init_dt(of_find_compatible_node(NULL, NULL, "fsl,imx6q-gpt")); | ||
500 | } | 458 | } |
501 | CLK_OF_DECLARE(imx6q, "fsl,imx6q-ccm", imx6q_clocks_init); | 459 | CLK_OF_DECLARE(imx6q, "fsl,imx6q-ccm", imx6q_clocks_init); |
diff --git a/arch/arm/mach-imx/clk-imx6sl.c b/arch/arm/mach-imx/clk-imx6sl.c index 21cf06cebade..fef46faf692f 100644 --- a/arch/arm/mach-imx/clk-imx6sl.c +++ b/arch/arm/mach-imx/clk-imx6sl.c | |||
@@ -312,6 +312,7 @@ static void __init imx6sl_clocks_init(struct device_node *ccm_node) | |||
312 | clks[IMX6SL_CLK_ECSPI2] = imx_clk_gate2("ecspi2", "ecspi_root", base + 0x6c, 2); | 312 | clks[IMX6SL_CLK_ECSPI2] = imx_clk_gate2("ecspi2", "ecspi_root", base + 0x6c, 2); |
313 | clks[IMX6SL_CLK_ECSPI3] = imx_clk_gate2("ecspi3", "ecspi_root", base + 0x6c, 4); | 313 | clks[IMX6SL_CLK_ECSPI3] = imx_clk_gate2("ecspi3", "ecspi_root", base + 0x6c, 4); |
314 | clks[IMX6SL_CLK_ECSPI4] = imx_clk_gate2("ecspi4", "ecspi_root", base + 0x6c, 6); | 314 | clks[IMX6SL_CLK_ECSPI4] = imx_clk_gate2("ecspi4", "ecspi_root", base + 0x6c, 6); |
315 | clks[IMX6SL_CLK_ENET] = imx_clk_gate2("enet", "ipg", base + 0x6c, 10); | ||
315 | clks[IMX6SL_CLK_EPIT1] = imx_clk_gate2("epit1", "perclk", base + 0x6c, 12); | 316 | clks[IMX6SL_CLK_EPIT1] = imx_clk_gate2("epit1", "perclk", base + 0x6c, 12); |
316 | clks[IMX6SL_CLK_EPIT2] = imx_clk_gate2("epit2", "perclk", base + 0x6c, 14); | 317 | clks[IMX6SL_CLK_EPIT2] = imx_clk_gate2("epit2", "perclk", base + 0x6c, 14); |
317 | clks[IMX6SL_CLK_EXTERN_AUDIO] = imx_clk_gate2("extern_audio", "extern_audio_podf", base + 0x6c, 16); | 318 | clks[IMX6SL_CLK_EXTERN_AUDIO] = imx_clk_gate2("extern_audio", "extern_audio_podf", base + 0x6c, 16); |
@@ -347,18 +348,12 @@ static void __init imx6sl_clocks_init(struct device_node *ccm_node) | |||
347 | clks[IMX6SL_CLK_USDHC3] = imx_clk_gate2("usdhc3", "usdhc3_podf", base + 0x80, 6); | 348 | clks[IMX6SL_CLK_USDHC3] = imx_clk_gate2("usdhc3", "usdhc3_podf", base + 0x80, 6); |
348 | clks[IMX6SL_CLK_USDHC4] = imx_clk_gate2("usdhc4", "usdhc4_podf", base + 0x80, 8); | 349 | clks[IMX6SL_CLK_USDHC4] = imx_clk_gate2("usdhc4", "usdhc4_podf", base + 0x80, 8); |
349 | 350 | ||
350 | for (i = 0; i < ARRAY_SIZE(clks); i++) | 351 | imx_check_clocks(clks, ARRAY_SIZE(clks)); |
351 | if (IS_ERR(clks[i])) | ||
352 | pr_err("i.MX6SL clk %d: register failed with %ld\n", | ||
353 | i, PTR_ERR(clks[i])); | ||
354 | 352 | ||
355 | clk_data.clks = clks; | 353 | clk_data.clks = clks; |
356 | clk_data.clk_num = ARRAY_SIZE(clks); | 354 | clk_data.clk_num = ARRAY_SIZE(clks); |
357 | of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data); | 355 | of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data); |
358 | 356 | ||
359 | clk_register_clkdev(clks[IMX6SL_CLK_GPT], "ipg", "imx-gpt.0"); | ||
360 | clk_register_clkdev(clks[IMX6SL_CLK_GPT_SERIAL], "per", "imx-gpt.0"); | ||
361 | |||
362 | /* Ensure the AHB clk is at 132MHz. */ | 357 | /* Ensure the AHB clk is at 132MHz. */ |
363 | ret = clk_set_rate(clks[IMX6SL_CLK_AHB], 132000000); | 358 | ret = clk_set_rate(clks[IMX6SL_CLK_AHB], 132000000); |
364 | if (ret) | 359 | if (ret) |
@@ -382,8 +377,5 @@ static void __init imx6sl_clocks_init(struct device_node *ccm_node) | |||
382 | 377 | ||
383 | /* Set initial power mode */ | 378 | /* Set initial power mode */ |
384 | imx6q_set_lpm(WAIT_CLOCKED); | 379 | imx6q_set_lpm(WAIT_CLOCKED); |
385 | |||
386 | np = of_find_compatible_node(NULL, NULL, "fsl,imx6sl-gpt"); | ||
387 | mxc_timer_init_dt(np); | ||
388 | } | 380 | } |
389 | CLK_OF_DECLARE(imx6sl, "fsl,imx6sl-ccm", imx6sl_clocks_init); | 381 | CLK_OF_DECLARE(imx6sl, "fsl,imx6sl-ccm", imx6sl_clocks_init); |
diff --git a/arch/arm/mach-imx/clk-imx6sx.c b/arch/arm/mach-imx/clk-imx6sx.c index 72f8902235d1..ecde72bdfe88 100644 --- a/arch/arm/mach-imx/clk-imx6sx.c +++ b/arch/arm/mach-imx/clk-imx6sx.c | |||
@@ -124,6 +124,9 @@ static struct clk_div_table video_div_table[] = { | |||
124 | static u32 share_count_asrc; | 124 | static u32 share_count_asrc; |
125 | static u32 share_count_audio; | 125 | static u32 share_count_audio; |
126 | static u32 share_count_esai; | 126 | static u32 share_count_esai; |
127 | static u32 share_count_ssi1; | ||
128 | static u32 share_count_ssi2; | ||
129 | static u32 share_count_ssi3; | ||
127 | 130 | ||
128 | static void __init imx6sx_clocks_init(struct device_node *ccm_node) | 131 | static void __init imx6sx_clocks_init(struct device_node *ccm_node) |
129 | { | 132 | { |
@@ -409,12 +412,12 @@ static void __init imx6sx_clocks_init(struct device_node *ccm_node) | |||
409 | clks[IMX6SX_CLK_SPBA] = imx_clk_gate2("spba", "ipg", base + 0x7c, 12); | 412 | clks[IMX6SX_CLK_SPBA] = imx_clk_gate2("spba", "ipg", base + 0x7c, 12); |
410 | clks[IMX6SX_CLK_AUDIO] = imx_clk_gate2_shared("audio", "audio_podf", base + 0x7c, 14, &share_count_audio); | 413 | clks[IMX6SX_CLK_AUDIO] = imx_clk_gate2_shared("audio", "audio_podf", base + 0x7c, 14, &share_count_audio); |
411 | clks[IMX6SX_CLK_SPDIF] = imx_clk_gate2_shared("spdif", "spdif_podf", base + 0x7c, 14, &share_count_audio); | 414 | clks[IMX6SX_CLK_SPDIF] = imx_clk_gate2_shared("spdif", "spdif_podf", base + 0x7c, 14, &share_count_audio); |
412 | clks[IMX6SX_CLK_SSI1_IPG] = imx_clk_gate2("ssi1_ipg", "ipg", base + 0x7c, 18); | 415 | clks[IMX6SX_CLK_SSI1_IPG] = imx_clk_gate2_shared("ssi1_ipg", "ipg", base + 0x7c, 18, &share_count_ssi1); |
413 | clks[IMX6SX_CLK_SSI2_IPG] = imx_clk_gate2("ssi2_ipg", "ipg", base + 0x7c, 20); | 416 | clks[IMX6SX_CLK_SSI2_IPG] = imx_clk_gate2_shared("ssi2_ipg", "ipg", base + 0x7c, 20, &share_count_ssi2); |
414 | clks[IMX6SX_CLK_SSI3_IPG] = imx_clk_gate2("ssi3_ipg", "ipg", base + 0x7c, 22); | 417 | clks[IMX6SX_CLK_SSI3_IPG] = imx_clk_gate2_shared("ssi3_ipg", "ipg", base + 0x7c, 22, &share_count_ssi3); |
415 | clks[IMX6SX_CLK_SSI1] = imx_clk_gate2("ssi1", "ssi1_podf", base + 0x7c, 18); | 418 | clks[IMX6SX_CLK_SSI1] = imx_clk_gate2_shared("ssi1", "ssi1_podf", base + 0x7c, 18, &share_count_ssi1); |
416 | clks[IMX6SX_CLK_SSI2] = imx_clk_gate2("ssi2", "ssi2_podf", base + 0x7c, 20); | 419 | clks[IMX6SX_CLK_SSI2] = imx_clk_gate2_shared("ssi2", "ssi2_podf", base + 0x7c, 20, &share_count_ssi2); |
417 | clks[IMX6SX_CLK_SSI3] = imx_clk_gate2("ssi3", "ssi3_podf", base + 0x7c, 22); | 420 | clks[IMX6SX_CLK_SSI3] = imx_clk_gate2_shared("ssi3", "ssi3_podf", base + 0x7c, 22, &share_count_ssi3); |
418 | clks[IMX6SX_CLK_UART_IPG] = imx_clk_gate2("uart_ipg", "ipg", base + 0x7c, 24); | 421 | clks[IMX6SX_CLK_UART_IPG] = imx_clk_gate2("uart_ipg", "ipg", base + 0x7c, 24); |
419 | clks[IMX6SX_CLK_UART_SERIAL] = imx_clk_gate2("uart_serial", "uart_podf", base + 0x7c, 26); | 422 | clks[IMX6SX_CLK_UART_SERIAL] = imx_clk_gate2("uart_serial", "uart_podf", base + 0x7c, 26); |
420 | clks[IMX6SX_CLK_SAI1_IPG] = imx_clk_gate2("sai1_ipg", "ipg", base + 0x7c, 28); | 423 | clks[IMX6SX_CLK_SAI1_IPG] = imx_clk_gate2("sai1_ipg", "ipg", base + 0x7c, 28); |
@@ -443,17 +446,12 @@ static void __init imx6sx_clocks_init(struct device_node *ccm_node) | |||
443 | /* mask handshake of mmdc */ | 446 | /* mask handshake of mmdc */ |
444 | writel_relaxed(BM_CCM_CCDR_MMDC_CH0_MASK, base + CCDR); | 447 | writel_relaxed(BM_CCM_CCDR_MMDC_CH0_MASK, base + CCDR); |
445 | 448 | ||
446 | for (i = 0; i < ARRAY_SIZE(clks); i++) | 449 | imx_check_clocks(clks, ARRAY_SIZE(clks)); |
447 | if (IS_ERR(clks[i])) | ||
448 | pr_err("i.MX6sx clk %d: register failed with %ld\n", i, PTR_ERR(clks[i])); | ||
449 | 450 | ||
450 | clk_data.clks = clks; | 451 | clk_data.clks = clks; |
451 | clk_data.clk_num = ARRAY_SIZE(clks); | 452 | clk_data.clk_num = ARRAY_SIZE(clks); |
452 | of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data); | 453 | of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data); |
453 | 454 | ||
454 | clk_register_clkdev(clks[IMX6SX_CLK_GPT_BUS], "ipg", "imx-gpt.0"); | ||
455 | clk_register_clkdev(clks[IMX6SX_CLK_GPT_SERIAL], "per", "imx-gpt.0"); | ||
456 | |||
457 | for (i = 0; i < ARRAY_SIZE(clks_init_on); i++) | 455 | for (i = 0; i < ARRAY_SIZE(clks_init_on); i++) |
458 | clk_prepare_enable(clks[clks_init_on[i]]); | 456 | clk_prepare_enable(clks[clks_init_on[i]]); |
459 | 457 | ||
@@ -517,8 +515,5 @@ static void __init imx6sx_clocks_init(struct device_node *ccm_node) | |||
517 | 515 | ||
518 | /* Set initial power mode */ | 516 | /* Set initial power mode */ |
519 | imx6q_set_lpm(WAIT_CLOCKED); | 517 | imx6q_set_lpm(WAIT_CLOCKED); |
520 | |||
521 | np = of_find_compatible_node(NULL, NULL, "fsl,imx6sx-gpt"); | ||
522 | mxc_timer_init_dt(np); | ||
523 | } | 518 | } |
524 | CLK_OF_DECLARE(imx6sx, "fsl,imx6sx-ccm", imx6sx_clocks_init); | 519 | CLK_OF_DECLARE(imx6sx, "fsl,imx6sx-ccm", imx6sx_clocks_init); |
diff --git a/arch/arm/mach-imx/clk-vf610.c b/arch/arm/mach-imx/clk-vf610.c index 22dc3ee21fd4..f60d6d569ce3 100644 --- a/arch/arm/mach-imx/clk-vf610.c +++ b/arch/arm/mach-imx/clk-vf610.c | |||
@@ -295,14 +295,18 @@ static void __init vf610_clocks_init(struct device_node *ccm_node) | |||
295 | 295 | ||
296 | clk[VF610_CLK_ASRC] = imx_clk_gate2("asrc", "ipg_bus", CCM_CCGR4, CCM_CCGRx_CGn(1)); | 296 | clk[VF610_CLK_ASRC] = imx_clk_gate2("asrc", "ipg_bus", CCM_CCGR4, CCM_CCGRx_CGn(1)); |
297 | 297 | ||
298 | clk[VF610_CLK_FLEXCAN0] = imx_clk_gate2("flexcan0", "ipg_bus", CCM_CCGR0, CCM_CCGRx_CGn(0)); | 298 | clk[VF610_CLK_FLEXCAN0_EN] = imx_clk_gate("flexcan0_en", "ipg_bus", CCM_CSCDR2, 11); |
299 | clk[VF610_CLK_FLEXCAN1] = imx_clk_gate2("flexcan1", "ipg_bus", CCM_CCGR9, CCM_CCGRx_CGn(4)); | 299 | clk[VF610_CLK_FLEXCAN0] = imx_clk_gate2("flexcan0", "flexcan0_en", CCM_CCGR0, CCM_CCGRx_CGn(0)); |
300 | clk[VF610_CLK_FLEXCAN1_EN] = imx_clk_gate("flexcan1_en", "ipg_bus", CCM_CSCDR2, 12); | ||
301 | clk[VF610_CLK_FLEXCAN1] = imx_clk_gate2("flexcan1", "flexcan1_en", CCM_CCGR9, CCM_CCGRx_CGn(4)); | ||
300 | 302 | ||
301 | clk[VF610_CLK_DMAMUX0] = imx_clk_gate2("dmamux0", "platform_bus", CCM_CCGR0, CCM_CCGRx_CGn(4)); | 303 | clk[VF610_CLK_DMAMUX0] = imx_clk_gate2("dmamux0", "platform_bus", CCM_CCGR0, CCM_CCGRx_CGn(4)); |
302 | clk[VF610_CLK_DMAMUX1] = imx_clk_gate2("dmamux1", "platform_bus", CCM_CCGR0, CCM_CCGRx_CGn(5)); | 304 | clk[VF610_CLK_DMAMUX1] = imx_clk_gate2("dmamux1", "platform_bus", CCM_CCGR0, CCM_CCGRx_CGn(5)); |
303 | clk[VF610_CLK_DMAMUX2] = imx_clk_gate2("dmamux2", "platform_bus", CCM_CCGR6, CCM_CCGRx_CGn(1)); | 305 | clk[VF610_CLK_DMAMUX2] = imx_clk_gate2("dmamux2", "platform_bus", CCM_CCGR6, CCM_CCGRx_CGn(1)); |
304 | clk[VF610_CLK_DMAMUX3] = imx_clk_gate2("dmamux3", "platform_bus", CCM_CCGR6, CCM_CCGRx_CGn(2)); | 306 | clk[VF610_CLK_DMAMUX3] = imx_clk_gate2("dmamux3", "platform_bus", CCM_CCGR6, CCM_CCGRx_CGn(2)); |
305 | 307 | ||
308 | imx_check_clocks(clk, ARRAY_SIZE(clk)); | ||
309 | |||
306 | clk_set_parent(clk[VF610_CLK_QSPI0_SEL], clk[VF610_CLK_PLL1_PFD4]); | 310 | clk_set_parent(clk[VF610_CLK_QSPI0_SEL], clk[VF610_CLK_PLL1_PFD4]); |
307 | clk_set_rate(clk[VF610_CLK_QSPI0_X4_DIV], clk_get_rate(clk[VF610_CLK_QSPI0_SEL]) / 2); | 311 | clk_set_rate(clk[VF610_CLK_QSPI0_X4_DIV], clk_get_rate(clk[VF610_CLK_QSPI0_SEL]) / 2); |
308 | clk_set_rate(clk[VF610_CLK_QSPI0_X2_DIV], clk_get_rate(clk[VF610_CLK_QSPI0_X4_DIV]) / 2); | 312 | clk_set_rate(clk[VF610_CLK_QSPI0_X2_DIV], clk_get_rate(clk[VF610_CLK_QSPI0_X4_DIV]) / 2); |
diff --git a/arch/arm/mach-imx/clk.c b/arch/arm/mach-imx/clk.c index edc35df7bed4..df12b5307175 100644 --- a/arch/arm/mach-imx/clk.c +++ b/arch/arm/mach-imx/clk.c | |||
@@ -7,6 +7,16 @@ | |||
7 | 7 | ||
8 | DEFINE_SPINLOCK(imx_ccm_lock); | 8 | DEFINE_SPINLOCK(imx_ccm_lock); |
9 | 9 | ||
10 | void __init imx_check_clocks(struct clk *clks[], unsigned int count) | ||
11 | { | ||
12 | unsigned i; | ||
13 | |||
14 | for (i = 0; i < count; i++) | ||
15 | if (IS_ERR(clks[i])) | ||
16 | pr_err("i.MX clk %u: register failed with %ld\n", | ||
17 | i, PTR_ERR(clks[i])); | ||
18 | } | ||
19 | |||
10 | static struct clk * __init imx_obtain_fixed_clock_from_dt(const char *name) | 20 | static struct clk * __init imx_obtain_fixed_clock_from_dt(const char *name) |
11 | { | 21 | { |
12 | struct of_phandle_args phandle; | 22 | struct of_phandle_args phandle; |
diff --git a/arch/arm/mach-imx/clk.h b/arch/arm/mach-imx/clk.h index e29f6ebe9f39..d5ba76fee115 100644 --- a/arch/arm/mach-imx/clk.h +++ b/arch/arm/mach-imx/clk.h | |||
@@ -6,6 +6,8 @@ | |||
6 | 6 | ||
7 | extern spinlock_t imx_ccm_lock; | 7 | extern spinlock_t imx_ccm_lock; |
8 | 8 | ||
9 | void imx_check_clocks(struct clk *clks[], unsigned int count); | ||
10 | |||
9 | extern void imx_cscmr1_fixup(u32 *val); | 11 | extern void imx_cscmr1_fixup(u32 *val); |
10 | 12 | ||
11 | struct clk *imx_clk_pllv1(const char *name, const char *parent, | 13 | struct clk *imx_clk_pllv1(const char *name, const char *parent, |
@@ -95,6 +97,13 @@ static inline struct clk *imx_clk_gate(const char *name, const char *parent, | |||
95 | shift, 0, &imx_ccm_lock); | 97 | shift, 0, &imx_ccm_lock); |
96 | } | 98 | } |
97 | 99 | ||
100 | static inline struct clk *imx_clk_gate_dis(const char *name, const char *parent, | ||
101 | void __iomem *reg, u8 shift) | ||
102 | { | ||
103 | return clk_register_gate(NULL, name, parent, CLK_SET_RATE_PARENT, reg, | ||
104 | shift, CLK_GATE_SET_TO_DISABLE, &imx_ccm_lock); | ||
105 | } | ||
106 | |||
98 | static inline struct clk *imx_clk_mux(const char *name, void __iomem *reg, | 107 | static inline struct clk *imx_clk_mux(const char *name, void __iomem *reg, |
99 | u8 shift, u8 width, const char **parents, int num_parents) | 108 | u8 shift, u8 width, const char **parents, int num_parents) |
100 | { | 109 | { |
diff --git a/arch/arm/mach-imx/common.h b/arch/arm/mach-imx/common.h index 9ab785ce13e8..22ba8973bcb9 100644 --- a/arch/arm/mach-imx/common.h +++ b/arch/arm/mach-imx/common.h | |||
@@ -19,6 +19,7 @@ struct pt_regs; | |||
19 | struct clk; | 19 | struct clk; |
20 | struct device_node; | 20 | struct device_node; |
21 | enum mxc_cpu_pwr_mode; | 21 | enum mxc_cpu_pwr_mode; |
22 | struct of_device_id; | ||
22 | 23 | ||
23 | void mx1_map_io(void); | 24 | void mx1_map_io(void); |
24 | void mx21_map_io(void); | 25 | void mx21_map_io(void); |
@@ -26,48 +27,34 @@ void mx25_map_io(void); | |||
26 | void mx27_map_io(void); | 27 | void mx27_map_io(void); |
27 | void mx31_map_io(void); | 28 | void mx31_map_io(void); |
28 | void mx35_map_io(void); | 29 | void mx35_map_io(void); |
29 | void mx51_map_io(void); | ||
30 | void mx53_map_io(void); | ||
31 | void imx1_init_early(void); | 30 | void imx1_init_early(void); |
32 | void imx21_init_early(void); | 31 | void imx21_init_early(void); |
33 | void imx25_init_early(void); | 32 | void imx25_init_early(void); |
34 | void imx27_init_early(void); | 33 | void imx27_init_early(void); |
35 | void imx31_init_early(void); | 34 | void imx31_init_early(void); |
36 | void imx35_init_early(void); | 35 | void imx35_init_early(void); |
37 | void imx51_init_early(void); | ||
38 | void imx53_init_early(void); | ||
39 | void mxc_init_irq(void __iomem *); | 36 | void mxc_init_irq(void __iomem *); |
40 | void tzic_init_irq(void __iomem *); | 37 | void tzic_init_irq(void); |
41 | void mx1_init_irq(void); | 38 | void mx1_init_irq(void); |
42 | void mx21_init_irq(void); | 39 | void mx21_init_irq(void); |
43 | void mx25_init_irq(void); | 40 | void mx25_init_irq(void); |
44 | void mx27_init_irq(void); | 41 | void mx27_init_irq(void); |
45 | void mx31_init_irq(void); | 42 | void mx31_init_irq(void); |
46 | void mx35_init_irq(void); | 43 | void mx35_init_irq(void); |
47 | void mx51_init_irq(void); | ||
48 | void mx53_init_irq(void); | ||
49 | void imx1_soc_init(void); | 44 | void imx1_soc_init(void); |
50 | void imx21_soc_init(void); | 45 | void imx21_soc_init(void); |
51 | void imx25_soc_init(void); | 46 | void imx25_soc_init(void); |
52 | void imx27_soc_init(void); | 47 | void imx27_soc_init(void); |
53 | void imx31_soc_init(void); | 48 | void imx31_soc_init(void); |
54 | void imx35_soc_init(void); | 49 | void imx35_soc_init(void); |
55 | void imx51_soc_init(void); | ||
56 | void imx51_init_late(void); | ||
57 | void imx53_init_late(void); | ||
58 | void epit_timer_init(void __iomem *base, int irq); | 50 | void epit_timer_init(void __iomem *base, int irq); |
59 | void mxc_timer_init(void __iomem *, int); | 51 | void mxc_timer_init(void __iomem *, int); |
60 | void mxc_timer_init_dt(struct device_node *); | ||
61 | int mx1_clocks_init(unsigned long fref); | 52 | int mx1_clocks_init(unsigned long fref); |
62 | int mx21_clocks_init(unsigned long lref, unsigned long fref); | 53 | int mx21_clocks_init(unsigned long lref, unsigned long fref); |
63 | int mx25_clocks_init(void); | 54 | int mx25_clocks_init(void); |
64 | int mx27_clocks_init(unsigned long fref); | 55 | int mx27_clocks_init(unsigned long fref); |
65 | int mx31_clocks_init(unsigned long fref); | 56 | int mx31_clocks_init(unsigned long fref); |
66 | int mx35_clocks_init(void); | 57 | int mx35_clocks_init(void); |
67 | int mx51_clocks_init(unsigned long ckil, unsigned long osc, | ||
68 | unsigned long ckih1, unsigned long ckih2); | ||
69 | int mx25_clocks_init_dt(void); | ||
70 | int mx27_clocks_init_dt(void); | ||
71 | int mx31_clocks_init_dt(void); | 58 | int mx31_clocks_init_dt(void); |
72 | struct platform_device *mxc_register_gpio(char *name, int id, | 59 | struct platform_device *mxc_register_gpio(char *name, int id, |
73 | resource_size_t iobase, resource_size_t iosize, int irq, int irq_high); | 60 | resource_size_t iobase, resource_size_t iosize, int irq, int irq_high); |
@@ -75,8 +62,10 @@ void mxc_set_cpu_type(unsigned int type); | |||
75 | void mxc_restart(enum reboot_mode, const char *); | 62 | void mxc_restart(enum reboot_mode, const char *); |
76 | void mxc_arch_reset_init(void __iomem *); | 63 | void mxc_arch_reset_init(void __iomem *); |
77 | void mxc_arch_reset_init_dt(void); | 64 | void mxc_arch_reset_init_dt(void); |
65 | int mx51_revision(void); | ||
78 | int mx53_revision(void); | 66 | int mx53_revision(void); |
79 | void imx_set_aips(void __iomem *); | 67 | void imx_set_aips(void __iomem *); |
68 | void imx_aips_allow_unprivileged_access(const char *compat); | ||
80 | int mxc_device_init(void); | 69 | int mxc_device_init(void); |
81 | void imx_set_soc_revision(unsigned int rev); | 70 | void imx_set_soc_revision(unsigned int rev); |
82 | unsigned int imx_get_soc_revision(void); | 71 | unsigned int imx_get_soc_revision(void); |
@@ -117,7 +106,7 @@ static inline void imx_scu_standby_enable(void) {} | |||
117 | #endif | 106 | #endif |
118 | void imx_src_init(void); | 107 | void imx_src_init(void); |
119 | void imx_gpc_init(void); | 108 | void imx_gpc_init(void); |
120 | void imx_gpc_pre_suspend(void); | 109 | void imx_gpc_pre_suspend(bool arm_power_off); |
121 | void imx_gpc_post_resume(void); | 110 | void imx_gpc_post_resume(void); |
122 | void imx_gpc_mask_all(void); | 111 | void imx_gpc_mask_all(void); |
123 | void imx_gpc_restore_all(void); | 112 | void imx_gpc_restore_all(void); |
@@ -127,7 +116,7 @@ void imx_anatop_init(void); | |||
127 | void imx_anatop_pre_suspend(void); | 116 | void imx_anatop_pre_suspend(void); |
128 | void imx_anatop_post_resume(void); | 117 | void imx_anatop_post_resume(void); |
129 | int imx6q_set_lpm(enum mxc_cpu_pwr_mode mode); | 118 | int imx6q_set_lpm(enum mxc_cpu_pwr_mode mode); |
130 | void imx6q_set_int_mem_clk_lpm(void); | 119 | void imx6q_set_int_mem_clk_lpm(bool enable); |
131 | void imx6sl_set_wait_clk(bool enter); | 120 | void imx6sl_set_wait_clk(bool enter); |
132 | 121 | ||
133 | void imx_cpu_die(unsigned int cpu); | 122 | void imx_cpu_die(unsigned int cpu); |
@@ -144,12 +133,17 @@ static inline void imx6_suspend(void __iomem *ocram_vbase) {} | |||
144 | void imx6q_pm_init(void); | 133 | void imx6q_pm_init(void); |
145 | void imx6dl_pm_init(void); | 134 | void imx6dl_pm_init(void); |
146 | void imx6sl_pm_init(void); | 135 | void imx6sl_pm_init(void); |
136 | void imx6sx_pm_init(void); | ||
147 | void imx6q_pm_set_ccm_base(void __iomem *base); | 137 | void imx6q_pm_set_ccm_base(void __iomem *base); |
148 | 138 | ||
149 | #ifdef CONFIG_PM | 139 | #ifdef CONFIG_PM |
150 | void imx5_pm_init(void); | 140 | void imx51_pm_init(void); |
141 | void imx53_pm_init(void); | ||
142 | void imx5_pm_set_ccm_base(void __iomem *base); | ||
151 | #else | 143 | #else |
152 | static inline void imx5_pm_init(void) {} | 144 | static inline void imx51_pm_init(void) {} |
145 | static inline void imx53_pm_init(void) {} | ||
146 | static inline void imx5_pm_set_ccm_base(void __iomem *base) {} | ||
153 | #endif | 147 | #endif |
154 | 148 | ||
155 | #ifdef CONFIG_NEON | 149 | #ifdef CONFIG_NEON |
diff --git a/arch/arm/mach-imx/cpu-imx5.c b/arch/arm/mach-imx/cpu-imx5.c index c1c99a72c6a1..3403bac94a31 100644 --- a/arch/arm/mach-imx/cpu-imx5.c +++ b/arch/arm/mach-imx/cpu-imx5.c | |||
@@ -16,6 +16,8 @@ | |||
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/module.h> | 17 | #include <linux/module.h> |
18 | #include <linux/io.h> | 18 | #include <linux/io.h> |
19 | #include <linux/of.h> | ||
20 | #include <linux/of_address.h> | ||
19 | 21 | ||
20 | #include "hardware.h" | 22 | #include "hardware.h" |
21 | #include "common.h" | 23 | #include "common.h" |
@@ -24,10 +26,26 @@ static int mx5_cpu_rev = -1; | |||
24 | 26 | ||
25 | #define IIM_SREV 0x24 | 27 | #define IIM_SREV 0x24 |
26 | 28 | ||
29 | static u32 imx5_read_srev_reg(const char *compat) | ||
30 | { | ||
31 | void __iomem *iim_base; | ||
32 | struct device_node *np; | ||
33 | u32 srev; | ||
34 | |||
35 | np = of_find_compatible_node(NULL, NULL, compat); | ||
36 | iim_base = of_iomap(np, 0); | ||
37 | WARN_ON(!iim_base); | ||
38 | |||
39 | srev = readl(iim_base + IIM_SREV) & 0xff; | ||
40 | |||
41 | iounmap(iim_base); | ||
42 | |||
43 | return srev; | ||
44 | } | ||
45 | |||
27 | static int get_mx51_srev(void) | 46 | static int get_mx51_srev(void) |
28 | { | 47 | { |
29 | void __iomem *iim_base = MX51_IO_ADDRESS(MX51_IIM_BASE_ADDR); | 48 | u32 rev = imx5_read_srev_reg("fsl,imx51-iim"); |
30 | u32 rev = readl(iim_base + IIM_SREV) & 0xff; | ||
31 | 49 | ||
32 | switch (rev) { | 50 | switch (rev) { |
33 | case 0x0: | 51 | case 0x0: |
@@ -77,8 +95,7 @@ int __init mx51_neon_fixup(void) | |||
77 | 95 | ||
78 | static int get_mx53_srev(void) | 96 | static int get_mx53_srev(void) |
79 | { | 97 | { |
80 | void __iomem *iim_base = MX51_IO_ADDRESS(MX53_IIM_BASE_ADDR); | 98 | u32 rev = imx5_read_srev_reg("fsl,imx53-iim"); |
81 | u32 rev = readl(iim_base + IIM_SREV) & 0xff; | ||
82 | 99 | ||
83 | switch (rev) { | 100 | switch (rev) { |
84 | case 0x0: | 101 | case 0x0: |
diff --git a/arch/arm/mach-imx/cpu.c b/arch/arm/mach-imx/cpu.c index bbe8ff1f0412..df42c14ff749 100644 --- a/arch/arm/mach-imx/cpu.c +++ b/arch/arm/mach-imx/cpu.c | |||
@@ -2,6 +2,7 @@ | |||
2 | #include <linux/module.h> | 2 | #include <linux/module.h> |
3 | #include <linux/io.h> | 3 | #include <linux/io.h> |
4 | #include <linux/of.h> | 4 | #include <linux/of.h> |
5 | #include <linux/of_address.h> | ||
5 | #include <linux/slab.h> | 6 | #include <linux/slab.h> |
6 | #include <linux/sys_soc.h> | 7 | #include <linux/sys_soc.h> |
7 | 8 | ||
@@ -60,6 +61,18 @@ void __init imx_set_aips(void __iomem *base) | |||
60 | __raw_writel(reg, base + 0x50); | 61 | __raw_writel(reg, base + 0x50); |
61 | } | 62 | } |
62 | 63 | ||
64 | void __init imx_aips_allow_unprivileged_access( | ||
65 | const char *compat) | ||
66 | { | ||
67 | void __iomem *aips_base_addr; | ||
68 | struct device_node *np; | ||
69 | |||
70 | for_each_compatible_node(np, NULL, compat) { | ||
71 | aips_base_addr = of_iomap(np, 0); | ||
72 | imx_set_aips(aips_base_addr); | ||
73 | } | ||
74 | } | ||
75 | |||
63 | struct device * __init imx_soc_device_init(void) | 76 | struct device * __init imx_soc_device_init(void) |
64 | { | 77 | { |
65 | struct soc_device_attribute *soc_dev_attr; | 78 | struct soc_device_attribute *soc_dev_attr; |
diff --git a/arch/arm/mach-imx/cpuidle-imx6q.c b/arch/arm/mach-imx/cpuidle-imx6q.c index 6bcae0479049..10844d3bb926 100644 --- a/arch/arm/mach-imx/cpuidle-imx6q.c +++ b/arch/arm/mach-imx/cpuidle-imx6q.c | |||
@@ -13,6 +13,7 @@ | |||
13 | 13 | ||
14 | #include "common.h" | 14 | #include "common.h" |
15 | #include "cpuidle.h" | 15 | #include "cpuidle.h" |
16 | #include "hardware.h" | ||
16 | 17 | ||
17 | static atomic_t master = ATOMIC_INIT(0); | 18 | static atomic_t master = ATOMIC_INIT(0); |
18 | static DEFINE_SPINLOCK(master_lock); | 19 | static DEFINE_SPINLOCK(master_lock); |
@@ -66,10 +67,11 @@ static struct cpuidle_driver imx6q_cpuidle_driver = { | |||
66 | int __init imx6q_cpuidle_init(void) | 67 | int __init imx6q_cpuidle_init(void) |
67 | { | 68 | { |
68 | /* Need to enable SCU standby for entering WAIT modes */ | 69 | /* Need to enable SCU standby for entering WAIT modes */ |
69 | imx_scu_standby_enable(); | 70 | if (!cpu_is_imx6sx()) |
71 | imx_scu_standby_enable(); | ||
70 | 72 | ||
71 | /* Set INT_MEM_CLK_LPM bit to get a reliable WAIT mode support */ | 73 | /* Set INT_MEM_CLK_LPM bit to get a reliable WAIT mode support */ |
72 | imx6q_set_int_mem_clk_lpm(); | 74 | imx6q_set_int_mem_clk_lpm(true); |
73 | 75 | ||
74 | return cpuidle_register(&imx6q_cpuidle_driver, NULL); | 76 | return cpuidle_register(&imx6q_cpuidle_driver, NULL); |
75 | } | 77 | } |
diff --git a/arch/arm/mach-imx/crm-regs-imx5.h b/arch/arm/mach-imx/crm-regs-imx5.h deleted file mode 100644 index 5e3f1f0f4cab..000000000000 --- a/arch/arm/mach-imx/crm-regs-imx5.h +++ /dev/null | |||
@@ -1,600 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2008-2009 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | * | ||
4 | * The code contained herein is licensed under the GNU General Public | ||
5 | * License. You may obtain a copy of the GNU General Public License | ||
6 | * Version 2 or later at the following locations: | ||
7 | * | ||
8 | * http://www.opensource.org/licenses/gpl-license.html | ||
9 | * http://www.gnu.org/copyleft/gpl.html | ||
10 | */ | ||
11 | #ifndef __ARCH_ARM_MACH_MX51_CRM_REGS_H__ | ||
12 | #define __ARCH_ARM_MACH_MX51_CRM_REGS_H__ | ||
13 | |||
14 | #define MX51_CCM_BASE MX51_IO_ADDRESS(MX51_CCM_BASE_ADDR) | ||
15 | #define MX51_DPLL1_BASE MX51_IO_ADDRESS(MX51_PLL1_BASE_ADDR) | ||
16 | #define MX51_DPLL2_BASE MX51_IO_ADDRESS(MX51_PLL2_BASE_ADDR) | ||
17 | #define MX51_DPLL3_BASE MX51_IO_ADDRESS(MX51_PLL3_BASE_ADDR) | ||
18 | #define MX51_CORTEXA8_BASE MX51_IO_ADDRESS(MX51_ARM_BASE_ADDR) | ||
19 | #define MX51_GPC_BASE MX51_IO_ADDRESS(MX51_GPC_BASE_ADDR) | ||
20 | |||
21 | /*MX53*/ | ||
22 | #define MX53_CCM_BASE MX53_IO_ADDRESS(MX53_CCM_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) | ||
25 | #define MX53_DPLL3_BASE MX53_IO_ADDRESS(MX53_PLL3_BASE_ADDR) | ||
26 | #define MX53_DPLL4_BASE MX53_IO_ADDRESS(MX53_PLL4_BASE_ADDR) | ||
27 | |||
28 | /* PLL Register Offsets */ | ||
29 | #define MXC_PLL_DP_CTL 0x00 | ||
30 | #define MXC_PLL_DP_CONFIG 0x04 | ||
31 | #define MXC_PLL_DP_OP 0x08 | ||
32 | #define MXC_PLL_DP_MFD 0x0C | ||
33 | #define MXC_PLL_DP_MFN 0x10 | ||
34 | #define MXC_PLL_DP_MFNMINUS 0x14 | ||
35 | #define MXC_PLL_DP_MFNPLUS 0x18 | ||
36 | #define MXC_PLL_DP_HFS_OP 0x1C | ||
37 | #define MXC_PLL_DP_HFS_MFD 0x20 | ||
38 | #define MXC_PLL_DP_HFS_MFN 0x24 | ||
39 | #define MXC_PLL_DP_MFN_TOGC 0x28 | ||
40 | #define MXC_PLL_DP_DESTAT 0x2c | ||
41 | |||
42 | /* PLL Register Bit definitions */ | ||
43 | #define MXC_PLL_DP_CTL_MUL_CTRL 0x2000 | ||
44 | #define MXC_PLL_DP_CTL_DPDCK0_2_EN 0x1000 | ||
45 | #define MXC_PLL_DP_CTL_DPDCK0_2_OFFSET 12 | ||
46 | #define MXC_PLL_DP_CTL_ADE 0x800 | ||
47 | #define MXC_PLL_DP_CTL_REF_CLK_DIV 0x400 | ||
48 | #define MXC_PLL_DP_CTL_REF_CLK_SEL_MASK (3 << 8) | ||
49 | #define MXC_PLL_DP_CTL_REF_CLK_SEL_OFFSET 8 | ||
50 | #define MXC_PLL_DP_CTL_HFSM 0x80 | ||
51 | #define MXC_PLL_DP_CTL_PRE 0x40 | ||
52 | #define MXC_PLL_DP_CTL_UPEN 0x20 | ||
53 | #define MXC_PLL_DP_CTL_RST 0x10 | ||
54 | #define MXC_PLL_DP_CTL_RCP 0x8 | ||
55 | #define MXC_PLL_DP_CTL_PLM 0x4 | ||
56 | #define MXC_PLL_DP_CTL_BRM0 0x2 | ||
57 | #define MXC_PLL_DP_CTL_LRF 0x1 | ||
58 | |||
59 | #define MXC_PLL_DP_CONFIG_BIST 0x8 | ||
60 | #define MXC_PLL_DP_CONFIG_SJC_CE 0x4 | ||
61 | #define MXC_PLL_DP_CONFIG_AREN 0x2 | ||
62 | #define MXC_PLL_DP_CONFIG_LDREQ 0x1 | ||
63 | |||
64 | #define MXC_PLL_DP_OP_MFI_OFFSET 4 | ||
65 | #define MXC_PLL_DP_OP_MFI_MASK (0xF << 4) | ||
66 | #define MXC_PLL_DP_OP_PDF_OFFSET 0 | ||
67 | #define MXC_PLL_DP_OP_PDF_MASK 0xF | ||
68 | |||
69 | #define MXC_PLL_DP_MFD_OFFSET 0 | ||
70 | #define MXC_PLL_DP_MFD_MASK 0x07FFFFFF | ||
71 | |||
72 | #define MXC_PLL_DP_MFN_OFFSET 0x0 | ||
73 | #define MXC_PLL_DP_MFN_MASK 0x07FFFFFF | ||
74 | |||
75 | #define MXC_PLL_DP_MFN_TOGC_TOG_DIS (1 << 17) | ||
76 | #define MXC_PLL_DP_MFN_TOGC_TOG_EN (1 << 16) | ||
77 | #define MXC_PLL_DP_MFN_TOGC_CNT_OFFSET 0x0 | ||
78 | #define MXC_PLL_DP_MFN_TOGC_CNT_MASK 0xFFFF | ||
79 | |||
80 | #define MXC_PLL_DP_DESTAT_TOG_SEL (1 << 31) | ||
81 | #define MXC_PLL_DP_DESTAT_MFN 0x07FFFFFF | ||
82 | |||
83 | /* Register addresses of CCM*/ | ||
84 | #define MXC_CCM_CCR (MX51_CCM_BASE + 0x00) | ||
85 | #define MXC_CCM_CCDR (MX51_CCM_BASE + 0x04) | ||
86 | #define MXC_CCM_CSR (MX51_CCM_BASE + 0x08) | ||
87 | #define MXC_CCM_CCSR (MX51_CCM_BASE + 0x0C) | ||
88 | #define MXC_CCM_CACRR (MX51_CCM_BASE + 0x10) | ||
89 | #define MXC_CCM_CBCDR (MX51_CCM_BASE + 0x14) | ||
90 | #define MXC_CCM_CBCMR (MX51_CCM_BASE + 0x18) | ||
91 | #define MXC_CCM_CSCMR1 (MX51_CCM_BASE + 0x1C) | ||
92 | #define MXC_CCM_CSCMR2 (MX51_CCM_BASE + 0x20) | ||
93 | #define MXC_CCM_CSCDR1 (MX51_CCM_BASE + 0x24) | ||
94 | #define MXC_CCM_CS1CDR (MX51_CCM_BASE + 0x28) | ||
95 | #define MXC_CCM_CS2CDR (MX51_CCM_BASE + 0x2C) | ||
96 | #define MXC_CCM_CDCDR (MX51_CCM_BASE + 0x30) | ||
97 | #define MXC_CCM_CHSCDR (MX51_CCM_BASE + 0x34) | ||
98 | #define MXC_CCM_CSCDR2 (MX51_CCM_BASE + 0x38) | ||
99 | #define MXC_CCM_CSCDR3 (MX51_CCM_BASE + 0x3C) | ||
100 | #define MXC_CCM_CSCDR4 (MX51_CCM_BASE + 0x40) | ||
101 | #define MXC_CCM_CWDR (MX51_CCM_BASE + 0x44) | ||
102 | #define MXC_CCM_CDHIPR (MX51_CCM_BASE + 0x48) | ||
103 | #define MXC_CCM_CDCR (MX51_CCM_BASE + 0x4C) | ||
104 | #define MXC_CCM_CTOR (MX51_CCM_BASE + 0x50) | ||
105 | #define MXC_CCM_CLPCR (MX51_CCM_BASE + 0x54) | ||
106 | #define MXC_CCM_CISR (MX51_CCM_BASE + 0x58) | ||
107 | #define MXC_CCM_CIMR (MX51_CCM_BASE + 0x5C) | ||
108 | #define MXC_CCM_CCOSR (MX51_CCM_BASE + 0x60) | ||
109 | #define MXC_CCM_CGPR (MX51_CCM_BASE + 0x64) | ||
110 | #define MXC_CCM_CCGR0 (MX51_CCM_BASE + 0x68) | ||
111 | #define MXC_CCM_CCGR1 (MX51_CCM_BASE + 0x6C) | ||
112 | #define MXC_CCM_CCGR2 (MX51_CCM_BASE + 0x70) | ||
113 | #define MXC_CCM_CCGR3 (MX51_CCM_BASE + 0x74) | ||
114 | #define MXC_CCM_CCGR4 (MX51_CCM_BASE + 0x78) | ||
115 | #define MXC_CCM_CCGR5 (MX51_CCM_BASE + 0x7C) | ||
116 | #define MXC_CCM_CCGR6 (MX51_CCM_BASE + 0x80) | ||
117 | #define MXC_CCM_CCGR7 (MX51_CCM_BASE + 0x84) | ||
118 | |||
119 | #define MXC_CCM_CMEOR (MX51_CCM_BASE + 0x84) | ||
120 | |||
121 | /* Define the bits in register CCR */ | ||
122 | #define MXC_CCM_CCR_COSC_EN (1 << 12) | ||
123 | #define MXC_CCM_CCR_FPM_MULT_MASK (1 << 11) | ||
124 | #define MXC_CCM_CCR_CAMP2_EN (1 << 10) | ||
125 | #define MXC_CCM_CCR_CAMP1_EN (1 << 9) | ||
126 | #define MXC_CCM_CCR_FPM_EN (1 << 8) | ||
127 | #define MXC_CCM_CCR_OSCNT_OFFSET (0) | ||
128 | #define MXC_CCM_CCR_OSCNT_MASK (0xFF) | ||
129 | |||
130 | /* Define the bits in register CCDR */ | ||
131 | #define MXC_CCM_CCDR_HSC_HS_MASK (0x1 << 18) | ||
132 | #define MXC_CCM_CCDR_IPU_HS_MASK (0x1 << 17) | ||
133 | #define MXC_CCM_CCDR_EMI_HS_MASK (0x1 << 16) | ||
134 | |||
135 | /* Define the bits in register CSR */ | ||
136 | #define MXC_CCM_CSR_COSR_READY (1 << 5) | ||
137 | #define MXC_CCM_CSR_LVS_VALUE (1 << 4) | ||
138 | #define MXC_CCM_CSR_CAMP2_READY (1 << 3) | ||
139 | #define MXC_CCM_CSR_CAMP1_READY (1 << 2) | ||
140 | #define MXC_CCM_CSR_FPM_READY (1 << 1) | ||
141 | #define MXC_CCM_CSR_REF_EN_B (1 << 0) | ||
142 | |||
143 | /* Define the bits in register CCSR */ | ||
144 | #define MXC_CCM_CCSR_LP_APM_SEL (0x1 << 9) | ||
145 | #define MXC_CCM_CCSR_STEP_SEL_OFFSET (7) | ||
146 | #define MXC_CCM_CCSR_STEP_SEL_MASK (0x3 << 7) | ||
147 | #define MXC_CCM_CCSR_STEP_SEL_LP_APM 0 | ||
148 | #define MXC_CCM_CCSR_STEP_SEL_PLL1_BYPASS 1 /* Only when JTAG connected? */ | ||
149 | #define MXC_CCM_CCSR_STEP_SEL_PLL2_DIVIDED 2 | ||
150 | #define MXC_CCM_CCSR_STEP_SEL_PLL3_DIVIDED 3 | ||
151 | #define MXC_CCM_CCSR_PLL2_PODF_OFFSET (5) | ||
152 | #define MXC_CCM_CCSR_PLL2_PODF_MASK (0x3 << 5) | ||
153 | #define MXC_CCM_CCSR_PLL3_PODF_OFFSET (3) | ||
154 | #define MXC_CCM_CCSR_PLL3_PODF_MASK (0x3 << 3) | ||
155 | #define MXC_CCM_CCSR_PLL1_SW_CLK_SEL (1 << 2) /* 0: pll1_main_clk, | ||
156 | 1: step_clk */ | ||
157 | #define MXC_CCM_CCSR_PLL2_SW_CLK_SEL (1 << 1) | ||
158 | #define MXC_CCM_CCSR_PLL3_SW_CLK_SEL (1 << 0) | ||
159 | |||
160 | /* Define the bits in register CACRR */ | ||
161 | #define MXC_CCM_CACRR_ARM_PODF_OFFSET (0) | ||
162 | #define MXC_CCM_CACRR_ARM_PODF_MASK (0x7) | ||
163 | |||
164 | /* Define the bits in register CBCDR */ | ||
165 | #define MXC_CCM_CBCDR_EMI_CLK_SEL (0x1 << 26) | ||
166 | #define MXC_CCM_CBCDR_PERIPH_CLK_SEL (0x1 << 25) | ||
167 | #define MXC_CCM_CBCDR_DDR_HF_SEL_OFFSET (30) | ||
168 | #define MXC_CCM_CBCDR_DDR_HF_SEL (0x1 << 30) | ||
169 | #define MXC_CCM_CBCDR_DDR_PODF_OFFSET (27) | ||
170 | #define MXC_CCM_CBCDR_DDR_PODF_MASK (0x7 << 27) | ||
171 | #define MXC_CCM_CBCDR_EMI_PODF_OFFSET (22) | ||
172 | #define MXC_CCM_CBCDR_EMI_PODF_MASK (0x7 << 22) | ||
173 | #define MXC_CCM_CBCDR_AXI_B_PODF_OFFSET (19) | ||
174 | #define MXC_CCM_CBCDR_AXI_B_PODF_MASK (0x7 << 19) | ||
175 | #define MXC_CCM_CBCDR_AXI_A_PODF_OFFSET (16) | ||
176 | #define MXC_CCM_CBCDR_AXI_A_PODF_MASK (0x7 << 16) | ||
177 | #define MXC_CCM_CBCDR_NFC_PODF_OFFSET (13) | ||
178 | #define MXC_CCM_CBCDR_NFC_PODF_MASK (0x7 << 13) | ||
179 | #define MXC_CCM_CBCDR_AHB_PODF_OFFSET (10) | ||
180 | #define MXC_CCM_CBCDR_AHB_PODF_MASK (0x7 << 10) | ||
181 | #define MXC_CCM_CBCDR_IPG_PODF_OFFSET (8) | ||
182 | #define MXC_CCM_CBCDR_IPG_PODF_MASK (0x3 << 8) | ||
183 | #define MXC_CCM_CBCDR_PERCLK_PRED1_OFFSET (6) | ||
184 | #define MXC_CCM_CBCDR_PERCLK_PRED1_MASK (0x3 << 6) | ||
185 | #define MXC_CCM_CBCDR_PERCLK_PRED2_OFFSET (3) | ||
186 | #define MXC_CCM_CBCDR_PERCLK_PRED2_MASK (0x7 << 3) | ||
187 | #define MXC_CCM_CBCDR_PERCLK_PODF_OFFSET (0) | ||
188 | #define MXC_CCM_CBCDR_PERCLK_PODF_MASK (0x7) | ||
189 | |||
190 | /* Define the bits in register CBCMR */ | ||
191 | #define MXC_CCM_CBCMR_VPU_AXI_CLK_SEL_OFFSET (14) | ||
192 | #define MXC_CCM_CBCMR_VPU_AXI_CLK_SEL_MASK (0x3 << 14) | ||
193 | #define MXC_CCM_CBCMR_PERIPH_CLK_SEL_OFFSET (12) | ||
194 | #define MXC_CCM_CBCMR_PERIPH_CLK_SEL_MASK (0x3 << 12) | ||
195 | #define MXC_CCM_CBCMR_DDR_CLK_SEL_OFFSET (10) | ||
196 | #define MXC_CCM_CBCMR_DDR_CLK_SEL_MASK (0x3 << 10) | ||
197 | #define MXC_CCM_CBCMR_ARM_AXI_CLK_SEL_OFFSET (8) | ||
198 | #define MXC_CCM_CBCMR_ARM_AXI_CLK_SEL_MASK (0x3 << 8) | ||
199 | #define MXC_CCM_CBCMR_IPU_HSP_CLK_SEL_OFFSET (6) | ||
200 | #define MXC_CCM_CBCMR_IPU_HSP_CLK_SEL_MASK (0x3 << 6) | ||
201 | #define MXC_CCM_CBCMR_GPU_CLK_SEL_OFFSET (4) | ||
202 | #define MXC_CCM_CBCMR_GPU_CLK_SEL_MASK (0x3 << 4) | ||
203 | #define MXC_CCM_CBCMR_GPU2D_CLK_SEL_OFFSET (14) | ||
204 | #define MXC_CCM_CBCMR_GPU2D_CLK_SEL_MASK (0x3 << 14) | ||
205 | #define MXC_CCM_CBCMR_PERCLK_LP_APM_CLK_SEL (0x1 << 1) | ||
206 | #define MXC_CCM_CBCMR_PERCLK_IPG_CLK_SEL (0x1 << 0) | ||
207 | |||
208 | /* Define the bits in register CSCMR1 */ | ||
209 | #define MXC_CCM_CSCMR1_SSI_EXT2_CLK_SEL_OFFSET (30) | ||
210 | #define MXC_CCM_CSCMR1_SSI_EXT2_CLK_SEL_MASK (0x3 << 30) | ||
211 | #define MXC_CCM_CSCMR1_SSI_EXT1_CLK_SEL_OFFSET (28) | ||
212 | #define MXC_CCM_CSCMR1_SSI_EXT1_CLK_SEL_MASK (0x3 << 28) | ||
213 | #define MXC_CCM_CSCMR1_USB_PHY_CLK_SEL_OFFSET (26) | ||
214 | #define MXC_CCM_CSCMR1_USB_PHY_CLK_SEL (0x1 << 26) | ||
215 | #define MXC_CCM_CSCMR1_UART_CLK_SEL_OFFSET (24) | ||
216 | #define MXC_CCM_CSCMR1_UART_CLK_SEL_MASK (0x3 << 24) | ||
217 | #define MXC_CCM_CSCMR1_USBOH3_CLK_SEL_OFFSET (22) | ||
218 | #define MXC_CCM_CSCMR1_USBOH3_CLK_SEL_MASK (0x3 << 22) | ||
219 | #define MXC_CCM_CSCMR1_ESDHC1_MSHC1_CLK_SEL_OFFSET (20) | ||
220 | #define MXC_CCM_CSCMR1_ESDHC1_MSHC1_CLK_SEL_MASK (0x3 << 20) | ||
221 | #define MXC_CCM_CSCMR1_ESDHC3_CLK_SEL (0x1 << 19) | ||
222 | #define MXC_CCM_CSCMR1_ESDHC2_MSHC2_MX53_CLK_SEL (0x1 << 19) | ||
223 | #define MXC_CCM_CSCMR1_ESDHC4_CLK_SEL (0x1 << 18) | ||
224 | #define MXC_CCM_CSCMR1_ESDHC2_MSHC2_CLK_SEL_OFFSET (16) | ||
225 | #define MXC_CCM_CSCMR1_ESDHC2_MSHC2_CLK_SEL_MASK (0x3 << 16) | ||
226 | #define MXC_CCM_CSCMR1_ESDHC3_MX53_CLK_SEL_OFFSET (16) | ||
227 | #define MXC_CCM_CSCMR1_ESDHC3_MX53_CLK_SEL_MASK (0x3 << 16) | ||
228 | #define MXC_CCM_CSCMR1_SSI1_CLK_SEL_OFFSET (14) | ||
229 | #define MXC_CCM_CSCMR1_SSI1_CLK_SEL_MASK (0x3 << 14) | ||
230 | #define MXC_CCM_CSCMR1_SSI2_CLK_SEL_OFFSET (12) | ||
231 | #define MXC_CCM_CSCMR1_SSI2_CLK_SEL_MASK (0x3 << 12) | ||
232 | #define MXC_CCM_CSCMR1_SSI3_CLK_SEL (0x1 << 11) | ||
233 | #define MXC_CCM_CSCMR1_VPU_RCLK_SEL (0x1 << 10) | ||
234 | #define MXC_CCM_CSCMR1_SSI_APM_CLK_SEL_OFFSET (8) | ||
235 | #define MXC_CCM_CSCMR1_SSI_APM_CLK_SEL_MASK (0x3 << 8) | ||
236 | #define MXC_CCM_CSCMR1_TVE_CLK_SEL (0x1 << 7) | ||
237 | #define MXC_CCM_CSCMR1_TVE_EXT_CLK_SEL (0x1 << 6) | ||
238 | #define MXC_CCM_CSCMR1_CSPI_CLK_SEL_OFFSET (4) | ||
239 | #define MXC_CCM_CSCMR1_CSPI_CLK_SEL_MASK (0x3 << 4) | ||
240 | #define MXC_CCM_CSCMR1_SPDIF_CLK_SEL_OFFSET (2) | ||
241 | #define MXC_CCM_CSCMR1_SPDIF_CLK_SEL_MASK (0x3 << 2) | ||
242 | #define MXC_CCM_CSCMR1_SSI_EXT2_COM_CLK_SEL (0x1 << 1) | ||
243 | #define MXC_CCM_CSCMR1_SSI_EXT1_COM_CLK_SEL (0x1) | ||
244 | |||
245 | /* Define the bits in register CSCMR2 */ | ||
246 | #define MXC_CCM_CSCMR2_DI_CLK_SEL_OFFSET(n) (26+n*3) | ||
247 | #define MXC_CCM_CSCMR2_DI_CLK_SEL_MASK(n) (0x7 << (26+n*3)) | ||
248 | #define MXC_CCM_CSCMR2_CSI_MCLK2_CLK_SEL_OFFSET (24) | ||
249 | #define MXC_CCM_CSCMR2_CSI_MCLK2_CLK_SEL_MASK (0x3 << 24) | ||
250 | #define MXC_CCM_CSCMR2_CSI_MCLK1_CLK_SEL_OFFSET (22) | ||
251 | #define MXC_CCM_CSCMR2_CSI_MCLK1_CLK_SEL_MASK (0x3 << 22) | ||
252 | #define MXC_CCM_CSCMR2_ESC_CLK_SEL_OFFSET (20) | ||
253 | #define MXC_CCM_CSCMR2_ESC_CLK_SEL_MASK (0x3 << 20) | ||
254 | #define MXC_CCM_CSCMR2_HSC2_CLK_SEL_OFFSET (18) | ||
255 | #define MXC_CCM_CSCMR2_HSC2_CLK_SEL_MASK (0x3 << 18) | ||
256 | #define MXC_CCM_CSCMR2_HSC1_CLK_SEL_OFFSET (16) | ||
257 | #define MXC_CCM_CSCMR2_HSC1_CLK_SEL_MASK (0x3 << 16) | ||
258 | #define MXC_CCM_CSCMR2_HSI2C_CLK_SEL_OFFSET (14) | ||
259 | #define MXC_CCM_CSCMR2_HSI2C_CLK_SEL_MASK (0x3 << 14) | ||
260 | #define MXC_CCM_CSCMR2_FIRI_CLK_SEL_OFFSET (12) | ||
261 | #define MXC_CCM_CSCMR2_FIRI_CLK_SEL_MASK (0x3 << 12) | ||
262 | #define MXC_CCM_CSCMR2_SIM_CLK_SEL_OFFSET (10) | ||
263 | #define MXC_CCM_CSCMR2_SIM_CLK_SEL_MASK (0x3 << 10) | ||
264 | #define MXC_CCM_CSCMR2_SLIMBUS_COM (0x1 << 9) | ||
265 | #define MXC_CCM_CSCMR2_SLIMBUS_CLK_SEL_OFFSET (6) | ||
266 | #define MXC_CCM_CSCMR2_SLIMBUS_CLK_SEL_MASK (0x7 << 6) | ||
267 | #define MXC_CCM_CSCMR2_SPDIF1_COM (1 << 5) | ||
268 | #define MXC_CCM_CSCMR2_SPDIF0_COM (1 << 4) | ||
269 | #define MXC_CCM_CSCMR2_SPDIF1_CLK_SEL_OFFSET (2) | ||
270 | #define MXC_CCM_CSCMR2_SPDIF1_CLK_SEL_MASK (0x3 << 2) | ||
271 | #define MXC_CCM_CSCMR2_SPDIF0_CLK_SEL_OFFSET (0) | ||
272 | #define MXC_CCM_CSCMR2_SPDIF0_CLK_SEL_MASK (0x3) | ||
273 | |||
274 | /* Define the bits in register CSCDR1 */ | ||
275 | #define MXC_CCM_CSCDR1_ESDHC2_MSHC2_CLK_PRED_OFFSET (22) | ||
276 | #define MXC_CCM_CSCDR1_ESDHC2_MSHC2_CLK_PRED_MASK (0x7 << 22) | ||
277 | #define MXC_CCM_CSCDR1_ESDHC2_MSHC2_CLK_PODF_OFFSET (19) | ||
278 | #define MXC_CCM_CSCDR1_ESDHC2_MSHC2_CLK_PODF_MASK (0x7 << 19) | ||
279 | #define MXC_CCM_CSCDR1_ESDHC3_MX53_CLK_PRED_OFFSET (22) | ||
280 | #define MXC_CCM_CSCDR1_ESDHC3_MX53_CLK_PRED_MASK (0x7 << 22) | ||
281 | #define MXC_CCM_CSCDR1_ESDHC3_MX53_CLK_PODF_OFFSET (19) | ||
282 | #define MXC_CCM_CSCDR1_ESDHC3_MX53_CLK_PODF_MASK (0x7 << 19) | ||
283 | #define MXC_CCM_CSCDR1_ESDHC1_MSHC1_CLK_PRED_OFFSET (16) | ||
284 | #define MXC_CCM_CSCDR1_ESDHC1_MSHC1_CLK_PRED_MASK (0x7 << 16) | ||
285 | #define MXC_CCM_CSCDR1_PGC_CLK_PODF_OFFSET (14) | ||
286 | #define MXC_CCM_CSCDR1_PGC_CLK_PODF_MASK (0x3 << 14) | ||
287 | #define MXC_CCM_CSCDR1_ESDHC1_MSHC1_CLK_PODF_OFFSET (11) | ||
288 | #define MXC_CCM_CSCDR1_ESDHC1_MSHC1_CLK_PODF_MASK (0x7 << 11) | ||
289 | #define MXC_CCM_CSCDR1_USBOH3_CLK_PRED_OFFSET (8) | ||
290 | #define MXC_CCM_CSCDR1_USBOH3_CLK_PRED_MASK (0x7 << 8) | ||
291 | #define MXC_CCM_CSCDR1_USBOH3_CLK_PODF_OFFSET (6) | ||
292 | #define MXC_CCM_CSCDR1_USBOH3_CLK_PODF_MASK (0x3 << 6) | ||
293 | #define MXC_CCM_CSCDR1_UART_CLK_PRED_OFFSET (3) | ||
294 | #define MXC_CCM_CSCDR1_UART_CLK_PRED_MASK (0x7 << 3) | ||
295 | #define MXC_CCM_CSCDR1_UART_CLK_PODF_OFFSET (0) | ||
296 | #define MXC_CCM_CSCDR1_UART_CLK_PODF_MASK (0x7) | ||
297 | |||
298 | /* Define the bits in register CS1CDR and CS2CDR */ | ||
299 | #define MXC_CCM_CS1CDR_SSI_EXT1_CLK_PRED_OFFSET (22) | ||
300 | #define MXC_CCM_CS1CDR_SSI_EXT1_CLK_PRED_MASK (0x7 << 22) | ||
301 | #define MXC_CCM_CS1CDR_SSI_EXT1_CLK_PODF_OFFSET (16) | ||
302 | #define MXC_CCM_CS1CDR_SSI_EXT1_CLK_PODF_MASK (0x3F << 16) | ||
303 | #define MXC_CCM_CS1CDR_SSI1_CLK_PRED_OFFSET (6) | ||
304 | #define MXC_CCM_CS1CDR_SSI1_CLK_PRED_MASK (0x7 << 6) | ||
305 | #define MXC_CCM_CS1CDR_SSI1_CLK_PODF_OFFSET (0) | ||
306 | #define MXC_CCM_CS1CDR_SSI1_CLK_PODF_MASK (0x3F) | ||
307 | |||
308 | #define MXC_CCM_CS2CDR_SSI_EXT2_CLK_PRED_OFFSET (22) | ||
309 | #define MXC_CCM_CS2CDR_SSI_EXT2_CLK_PRED_MASK (0x7 << 22) | ||
310 | #define MXC_CCM_CS2CDR_SSI_EXT2_CLK_PODF_OFFSET (16) | ||
311 | #define MXC_CCM_CS2CDR_SSI_EXT2_CLK_PODF_MASK (0x3F << 16) | ||
312 | #define MXC_CCM_CS2CDR_SSI2_CLK_PRED_OFFSET (6) | ||
313 | #define MXC_CCM_CS2CDR_SSI2_CLK_PRED_MASK (0x7 << 6) | ||
314 | #define MXC_CCM_CS2CDR_SSI2_CLK_PODF_OFFSET (0) | ||
315 | #define MXC_CCM_CS2CDR_SSI2_CLK_PODF_MASK (0x3F) | ||
316 | |||
317 | /* Define the bits in register CDCDR */ | ||
318 | #define MXC_CCM_CDCDR_TVE_CLK_PRED_OFFSET (28) | ||
319 | #define MXC_CCM_CDCDR_TVE_CLK_PRED_MASK (0x7 << 28) | ||
320 | #define MXC_CCM_CDCDR_SPDIF0_CLK_PRED_OFFSET (25) | ||
321 | #define MXC_CCM_CDCDR_SPDIF0_CLK_PRED_MASK (0x7 << 25) | ||
322 | #define MXC_CCM_CDCDR_SPDIF0_CLK_PODF_OFFSET (19) | ||
323 | #define MXC_CCM_CDCDR_SPDIF0_CLK_PODF_MASK (0x3F << 19) | ||
324 | #define MXC_CCM_CDCDR_SPDIF1_CLK_PRED_OFFSET (16) | ||
325 | #define MXC_CCM_CDCDR_SPDIF1_CLK_PRED_MASK (0x7 << 16) | ||
326 | #define MXC_CCM_CDCDR_SPDIF1_CLK_PODF_OFFSET (9) | ||
327 | #define MXC_CCM_CDCDR_SPDIF1_CLK_PODF_MASK (0x3F << 9) | ||
328 | #define MXC_CCM_CDCDR_DI_CLK_PRED_OFFSET (6) | ||
329 | #define MXC_CCM_CDCDR_DI_CLK_PRED_MASK (0x7 << 6) | ||
330 | #define MXC_CCM_CDCDR_USB_PHY_PRED_OFFSET (3) | ||
331 | #define MXC_CCM_CDCDR_USB_PHY_PRED_MASK (0x7 << 3) | ||
332 | #define MXC_CCM_CDCDR_USB_PHY_PODF_OFFSET (0) | ||
333 | #define MXC_CCM_CDCDR_USB_PHY_PODF_MASK (0x7) | ||
334 | |||
335 | /* Define the bits in register CHSCCDR */ | ||
336 | #define MXC_CCM_CHSCCDR_ESC_CLK_PRED_OFFSET (12) | ||
337 | #define MXC_CCM_CHSCCDR_ESC_CLK_PRED_MASK (0x7 << 12) | ||
338 | #define MXC_CCM_CHSCCDR_ESC_CLK_PODF_OFFSET (6) | ||
339 | #define MXC_CCM_CHSCCDR_ESC_CLK_PODF_MASK (0x3F << 6) | ||
340 | #define MXC_CCM_CHSCCDR_HSC2_CLK_PODF_OFFSET (3) | ||
341 | #define MXC_CCM_CHSCCDR_HSC2_CLK_PODF_MASK (0x7 << 3) | ||
342 | #define MXC_CCM_CHSCCDR_HSC1_CLK_PODF_OFFSET (0) | ||
343 | #define MXC_CCM_CHSCCDR_HSC1_CLK_PODF_MASK (0x7) | ||
344 | |||
345 | /* Define the bits in register CSCDR2 */ | ||
346 | #define MXC_CCM_CSCDR2_CSPI_CLK_PRED_OFFSET (25) | ||
347 | #define MXC_CCM_CSCDR2_CSPI_CLK_PRED_MASK (0x7 << 25) | ||
348 | #define MXC_CCM_CSCDR2_CSPI_CLK_PODF_OFFSET (19) | ||
349 | #define MXC_CCM_CSCDR2_CSPI_CLK_PODF_MASK (0x3F << 19) | ||
350 | #define MXC_CCM_CSCDR2_SIM_CLK_PRED_OFFSET (16) | ||
351 | #define MXC_CCM_CSCDR2_SIM_CLK_PRED_MASK (0x7 << 16) | ||
352 | #define MXC_CCM_CSCDR2_SIM_CLK_PODF_OFFSET (9) | ||
353 | #define MXC_CCM_CSCDR2_SIM_CLK_PODF_MASK (0x3F << 9) | ||
354 | #define MXC_CCM_CSCDR2_SLIMBUS_CLK_PRED_OFFSET (6) | ||
355 | #define MXC_CCM_CSCDR2_SLIMBUS_PRED_MASK (0x7 << 6) | ||
356 | #define MXC_CCM_CSCDR2_SLIMBUS_PODF_OFFSET (0) | ||
357 | #define MXC_CCM_CSCDR2_SLIMBUS_PODF_MASK (0x3F) | ||
358 | |||
359 | /* Define the bits in register CSCDR3 */ | ||
360 | #define MXC_CCM_CSCDR3_HSI2C_CLK_PRED_OFFSET (16) | ||
361 | #define MXC_CCM_CSCDR3_HSI2C_CLK_PRED_MASK (0x7 << 16) | ||
362 | #define MXC_CCM_CSCDR3_HSI2C_CLK_PODF_OFFSET (9) | ||
363 | #define MXC_CCM_CSCDR3_HSI2C_CLK_PODF_MASK (0x3F << 9) | ||
364 | #define MXC_CCM_CSCDR3_FIRI_CLK_PRED_OFFSET (6) | ||
365 | #define MXC_CCM_CSCDR3_FIRI_CLK_PRED_MASK (0x7 << 6) | ||
366 | #define MXC_CCM_CSCDR3_FIRI_CLK_PODF_OFFSET (0) | ||
367 | #define MXC_CCM_CSCDR3_FIRI_CLK_PODF_MASK (0x3F) | ||
368 | |||
369 | /* Define the bits in register CSCDR4 */ | ||
370 | #define MXC_CCM_CSCDR4_CSI_MCLK2_CLK_PRED_OFFSET (16) | ||
371 | #define MXC_CCM_CSCDR4_CSI_MCLK2_CLK_PRED_MASK (0x7 << 16) | ||
372 | #define MXC_CCM_CSCDR4_CSI_MCLK2_CLK_PODF_OFFSET (9) | ||
373 | #define MXC_CCM_CSCDR4_CSI_MCLK2_CLK_PODF_MASK (0x3F << 9) | ||
374 | #define MXC_CCM_CSCDR4_CSI_MCLK1_CLK_PRED_OFFSET (6) | ||
375 | #define MXC_CCM_CSCDR4_CSI_MCLK1_CLK_PRED_MASK (0x7 << 6) | ||
376 | #define MXC_CCM_CSCDR4_CSI_MCLK1_CLK_PODF_OFFSET (0) | ||
377 | #define MXC_CCM_CSCDR4_CSI_MCLK1_CLK_PODF_MASK (0x3F) | ||
378 | |||
379 | /* Define the bits in register CDHIPR */ | ||
380 | #define MXC_CCM_CDHIPR_ARM_PODF_BUSY (1 << 16) | ||
381 | #define MXC_CCM_CDHIPR_DDR_HF_CLK_SEL_BUSY (1 << 8) | ||
382 | #define MXC_CCM_CDHIPR_DDR_PODF_BUSY (1 << 7) | ||
383 | #define MXC_CCM_CDHIPR_EMI_CLK_SEL_BUSY (1 << 6) | ||
384 | #define MXC_CCM_CDHIPR_PERIPH_CLK_SEL_BUSY (1 << 5) | ||
385 | #define MXC_CCM_CDHIPR_NFC_IPG_INT_MEM_PODF_BUSY (1 << 4) | ||
386 | #define MXC_CCM_CDHIPR_AHB_PODF_BUSY (1 << 3) | ||
387 | #define MXC_CCM_CDHIPR_EMI_PODF_BUSY (1 << 2) | ||
388 | #define MXC_CCM_CDHIPR_AXI_B_PODF_BUSY (1 << 1) | ||
389 | #define MXC_CCM_CDHIPR_AXI_A_PODF_BUSY (1 << 0) | ||
390 | |||
391 | /* Define the bits in register CDCR */ | ||
392 | #define MXC_CCM_CDCR_ARM_FREQ_SHIFT_DIVIDER (0x1 << 2) | ||
393 | #define MXC_CCM_CDCR_PERIPH_CLK_DVFS_PODF_OFFSET (0) | ||
394 | #define MXC_CCM_CDCR_PERIPH_CLK_DVFS_PODF_MASK (0x3) | ||
395 | |||
396 | /* Define the bits in register CLPCR */ | ||
397 | #define MXC_CCM_CLPCR_BYPASS_HSC_LPM_HS (0x1 << 23) | ||
398 | #define MXC_CCM_CLPCR_BYPASS_SCC_LPM_HS (0x1 << 22) | ||
399 | #define MX51_CCM_CLPCR_BYPASS_MAX_LPM_HS (0x1 << 21) | ||
400 | #define MX53_CCM_CLPCR_BYPASS_MAX_LPM_HS (0x1 << 25) | ||
401 | #define MXC_CCM_CLPCR_BYPASS_SDMA_LPM_HS (0x1 << 20) | ||
402 | #define MXC_CCM_CLPCR_BYPASS_EMI_LPM_HS (0x1 << 19) | ||
403 | #define MXC_CCM_CLPCR_BYPASS_IPU_LPM_HS (0x1 << 18) | ||
404 | #define MXC_CCM_CLPCR_BYPASS_RTIC_LPM_HS (0x1 << 17) | ||
405 | #define MXC_CCM_CLPCR_BYPASS_RNGC_LPM_HS (0x1 << 16) | ||
406 | #define MXC_CCM_CLPCR_COSC_PWRDOWN (0x1 << 11) | ||
407 | #define MXC_CCM_CLPCR_STBY_COUNT_OFFSET (9) | ||
408 | #define MXC_CCM_CLPCR_STBY_COUNT_MASK (0x3 << 9) | ||
409 | #define MXC_CCM_CLPCR_VSTBY (0x1 << 8) | ||
410 | #define MXC_CCM_CLPCR_DIS_REF_OSC (0x1 << 7) | ||
411 | #define MXC_CCM_CLPCR_SBYOS (0x1 << 6) | ||
412 | #define MXC_CCM_CLPCR_ARM_CLK_DIS_ON_LPM (0x1 << 5) | ||
413 | #define MXC_CCM_CLPCR_LPSR_CLK_SEL_OFFSET (3) | ||
414 | #define MXC_CCM_CLPCR_LPSR_CLK_SEL_MASK (0x3 << 3) | ||
415 | #define MXC_CCM_CLPCR_LPM_OFFSET (0) | ||
416 | #define MXC_CCM_CLPCR_LPM_MASK (0x3) | ||
417 | |||
418 | /* Define the bits in register CISR */ | ||
419 | #define MXC_CCM_CISR_ARM_PODF_LOADED (0x1 << 25) | ||
420 | #define MXC_CCM_CISR_NFC_IPG_INT_MEM_PODF_LOADED (0x1 << 21) | ||
421 | #define MXC_CCM_CISR_AHB_PODF_LOADED (0x1 << 20) | ||
422 | #define MXC_CCM_CISR_EMI_PODF_LOADED (0x1 << 19) | ||
423 | #define MXC_CCM_CISR_AXI_B_PODF_LOADED (0x1 << 18) | ||
424 | #define MXC_CCM_CISR_AXI_A_PODF_LOADED (0x1 << 17) | ||
425 | #define MXC_CCM_CISR_DIVIDER_LOADED (0x1 << 16) | ||
426 | #define MXC_CCM_CISR_COSC_READY (0x1 << 6) | ||
427 | #define MXC_CCM_CISR_CKIH2_READY (0x1 << 5) | ||
428 | #define MXC_CCM_CISR_CKIH_READY (0x1 << 4) | ||
429 | #define MXC_CCM_CISR_FPM_READY (0x1 << 3) | ||
430 | #define MXC_CCM_CISR_LRF_PLL3 (0x1 << 2) | ||
431 | #define MXC_CCM_CISR_LRF_PLL2 (0x1 << 1) | ||
432 | #define MXC_CCM_CISR_LRF_PLL1 (0x1) | ||
433 | |||
434 | /* Define the bits in register CIMR */ | ||
435 | #define MXC_CCM_CIMR_MASK_ARM_PODF_LOADED (0x1 << 25) | ||
436 | #define MXC_CCM_CIMR_MASK_NFC_IPG_INT_MEM_PODF_LOADED (0x1 << 21) | ||
437 | #define MXC_CCM_CIMR_MASK_EMI_PODF_LOADED (0x1 << 20) | ||
438 | #define MXC_CCM_CIMR_MASK_AXI_C_PODF_LOADED (0x1 << 19) | ||
439 | #define MXC_CCM_CIMR_MASK_AXI_B_PODF_LOADED (0x1 << 18) | ||
440 | #define MXC_CCM_CIMR_MASK_AXI_A_PODF_LOADED (0x1 << 17) | ||
441 | #define MXC_CCM_CIMR_MASK_DIVIDER_LOADED (0x1 << 16) | ||
442 | #define MXC_CCM_CIMR_MASK_COSC_READY (0x1 << 5) | ||
443 | #define MXC_CCM_CIMR_MASK_CKIH_READY (0x1 << 4) | ||
444 | #define MXC_CCM_CIMR_MASK_FPM_READY (0x1 << 3) | ||
445 | #define MXC_CCM_CIMR_MASK_LRF_PLL3 (0x1 << 2) | ||
446 | #define MXC_CCM_CIMR_MASK_LRF_PLL2 (0x1 << 1) | ||
447 | #define MXC_CCM_CIMR_MASK_LRF_PLL1 (0x1) | ||
448 | |||
449 | /* Define the bits in register CCOSR */ | ||
450 | #define MXC_CCM_CCOSR_CKO2_EN_OFFSET (0x1 << 24) | ||
451 | #define MXC_CCM_CCOSR_CKO2_DIV_OFFSET (21) | ||
452 | #define MXC_CCM_CCOSR_CKO2_DIV_MASK (0x7 << 21) | ||
453 | #define MXC_CCM_CCOSR_CKO2_SEL_OFFSET (16) | ||
454 | #define MXC_CCM_CCOSR_CKO2_SEL_MASK (0x1F << 16) | ||
455 | #define MXC_CCM_CCOSR_CKOL_EN (0x1 << 7) | ||
456 | #define MXC_CCM_CCOSR_CKOL_DIV_OFFSET (4) | ||
457 | #define MXC_CCM_CCOSR_CKOL_DIV_MASK (0x7 << 4) | ||
458 | #define MXC_CCM_CCOSR_CKOL_SEL_OFFSET (0) | ||
459 | #define MXC_CCM_CCOSR_CKOL_SEL_MASK (0xF) | ||
460 | |||
461 | /* Define the bits in registers CGPR */ | ||
462 | #define MXC_CCM_CGPR_EFUSE_PROG_SUPPLY_GATE (0x1 << 4) | ||
463 | #define MXC_CCM_CGPR_FPM_SEL (0x1 << 3) | ||
464 | #define MXC_CCM_CGPR_VL_L2BIST_CLKDIV_OFFSET (0) | ||
465 | #define MXC_CCM_CGPR_VL_L2BIST_CLKDIV_MASK (0x7) | ||
466 | |||
467 | /* Define the bits in registers CCGRx */ | ||
468 | #define MXC_CCM_CCGRx_CG_MASK 0x3 | ||
469 | #define MXC_CCM_CCGRx_MOD_OFF 0x0 | ||
470 | #define MXC_CCM_CCGRx_MOD_ON 0x3 | ||
471 | #define MXC_CCM_CCGRx_MOD_IDLE 0x1 | ||
472 | |||
473 | #define MXC_CCM_CCGRx_CG15_MASK (0x3 << 30) | ||
474 | #define MXC_CCM_CCGRx_CG14_MASK (0x3 << 28) | ||
475 | #define MXC_CCM_CCGRx_CG13_MASK (0x3 << 26) | ||
476 | #define MXC_CCM_CCGRx_CG12_MASK (0x3 << 24) | ||
477 | #define MXC_CCM_CCGRx_CG11_MASK (0x3 << 22) | ||
478 | #define MXC_CCM_CCGRx_CG10_MASK (0x3 << 20) | ||
479 | #define MXC_CCM_CCGRx_CG9_MASK (0x3 << 18) | ||
480 | #define MXC_CCM_CCGRx_CG8_MASK (0x3 << 16) | ||
481 | #define MXC_CCM_CCGRx_CG5_MASK (0x3 << 10) | ||
482 | #define MXC_CCM_CCGRx_CG4_MASK (0x3 << 8) | ||
483 | #define MXC_CCM_CCGRx_CG3_MASK (0x3 << 6) | ||
484 | #define MXC_CCM_CCGRx_CG2_MASK (0x3 << 4) | ||
485 | #define MXC_CCM_CCGRx_CG1_MASK (0x3 << 2) | ||
486 | #define MXC_CCM_CCGRx_CG0_MASK (0x3 << 0) | ||
487 | |||
488 | #define MXC_CCM_CCGRx_CG15_OFFSET 30 | ||
489 | #define MXC_CCM_CCGRx_CG14_OFFSET 28 | ||
490 | #define MXC_CCM_CCGRx_CG13_OFFSET 26 | ||
491 | #define MXC_CCM_CCGRx_CG12_OFFSET 24 | ||
492 | #define MXC_CCM_CCGRx_CG11_OFFSET 22 | ||
493 | #define MXC_CCM_CCGRx_CG10_OFFSET 20 | ||
494 | #define MXC_CCM_CCGRx_CG9_OFFSET 18 | ||
495 | #define MXC_CCM_CCGRx_CG8_OFFSET 16 | ||
496 | #define MXC_CCM_CCGRx_CG7_OFFSET 14 | ||
497 | #define MXC_CCM_CCGRx_CG6_OFFSET 12 | ||
498 | #define MXC_CCM_CCGRx_CG5_OFFSET 10 | ||
499 | #define MXC_CCM_CCGRx_CG4_OFFSET 8 | ||
500 | #define MXC_CCM_CCGRx_CG3_OFFSET 6 | ||
501 | #define MXC_CCM_CCGRx_CG2_OFFSET 4 | ||
502 | #define MXC_CCM_CCGRx_CG1_OFFSET 2 | ||
503 | #define MXC_CCM_CCGRx_CG0_OFFSET 0 | ||
504 | |||
505 | #define MXC_DPTC_LP_BASE (MX51_GPC_BASE + 0x80) | ||
506 | #define MXC_DPTC_GP_BASE (MX51_GPC_BASE + 0x100) | ||
507 | #define MXC_DVFS_CORE_BASE (MX51_GPC_BASE + 0x180) | ||
508 | #define MXC_DPTC_PER_BASE (MX51_GPC_BASE + 0x1C0) | ||
509 | #define MXC_PGC_IPU_BASE (MX51_GPC_BASE + 0x220) | ||
510 | #define MXC_PGC_VPU_BASE (MX51_GPC_BASE + 0x240) | ||
511 | #define MXC_PGC_GPU_BASE (MX51_GPC_BASE + 0x260) | ||
512 | #define MXC_SRPG_NEON_BASE (MX51_GPC_BASE + 0x280) | ||
513 | #define MXC_SRPG_ARM_BASE (MX51_GPC_BASE + 0x2A0) | ||
514 | #define MXC_SRPG_EMPGC0_BASE (MX51_GPC_BASE + 0x2C0) | ||
515 | #define MXC_SRPG_EMPGC1_BASE (MX51_GPC_BASE + 0x2D0) | ||
516 | #define MXC_SRPG_MEGAMIX_BASE (MX51_GPC_BASE + 0x2E0) | ||
517 | #define MXC_SRPG_EMI_BASE (MX51_GPC_BASE + 0x300) | ||
518 | |||
519 | /* CORTEXA8 platform */ | ||
520 | #define MXC_CORTEXA8_PLAT_PVID (MX51_CORTEXA8_BASE + 0x0) | ||
521 | #define MXC_CORTEXA8_PLAT_GPC (MX51_CORTEXA8_BASE + 0x4) | ||
522 | #define MXC_CORTEXA8_PLAT_PIC (MX51_CORTEXA8_BASE + 0x8) | ||
523 | #define MXC_CORTEXA8_PLAT_LPC (MX51_CORTEXA8_BASE + 0xC) | ||
524 | #define MXC_CORTEXA8_PLAT_NEON_LPC (MX51_CORTEXA8_BASE + 0x10) | ||
525 | #define MXC_CORTEXA8_PLAT_ICGC (MX51_CORTEXA8_BASE + 0x14) | ||
526 | #define MXC_CORTEXA8_PLAT_AMC (MX51_CORTEXA8_BASE + 0x18) | ||
527 | #define MXC_CORTEXA8_PLAT_NMC (MX51_CORTEXA8_BASE + 0x20) | ||
528 | #define MXC_CORTEXA8_PLAT_NMS (MX51_CORTEXA8_BASE + 0x24) | ||
529 | |||
530 | /* DVFS CORE */ | ||
531 | #define MXC_DVFSTHRS (MXC_DVFS_CORE_BASE + 0x00) | ||
532 | #define MXC_DVFSCOUN (MXC_DVFS_CORE_BASE + 0x04) | ||
533 | #define MXC_DVFSSIG1 (MXC_DVFS_CORE_BASE + 0x08) | ||
534 | #define MXC_DVFSSIG0 (MXC_DVFS_CORE_BASE + 0x0C) | ||
535 | #define MXC_DVFSGPC0 (MXC_DVFS_CORE_BASE + 0x10) | ||
536 | #define MXC_DVFSGPC1 (MXC_DVFS_CORE_BASE + 0x14) | ||
537 | #define MXC_DVFSGPBT (MXC_DVFS_CORE_BASE + 0x18) | ||
538 | #define MXC_DVFSEMAC (MXC_DVFS_CORE_BASE + 0x1C) | ||
539 | #define MXC_DVFSCNTR (MXC_DVFS_CORE_BASE + 0x20) | ||
540 | #define MXC_DVFSLTR0_0 (MXC_DVFS_CORE_BASE + 0x24) | ||
541 | #define MXC_DVFSLTR0_1 (MXC_DVFS_CORE_BASE + 0x28) | ||
542 | #define MXC_DVFSLTR1_0 (MXC_DVFS_CORE_BASE + 0x2C) | ||
543 | #define MXC_DVFSLTR1_1 (MXC_DVFS_CORE_BASE + 0x30) | ||
544 | #define MXC_DVFSPT0 (MXC_DVFS_CORE_BASE + 0x34) | ||
545 | #define MXC_DVFSPT1 (MXC_DVFS_CORE_BASE + 0x38) | ||
546 | #define MXC_DVFSPT2 (MXC_DVFS_CORE_BASE + 0x3C) | ||
547 | #define MXC_DVFSPT3 (MXC_DVFS_CORE_BASE + 0x40) | ||
548 | |||
549 | /* GPC */ | ||
550 | #define MXC_GPC_CNTR (MX51_GPC_BASE + 0x0) | ||
551 | #define MXC_GPC_PGR (MX51_GPC_BASE + 0x4) | ||
552 | #define MXC_GPC_VCR (MX51_GPC_BASE + 0x8) | ||
553 | #define MXC_GPC_ALL_PU (MX51_GPC_BASE + 0xC) | ||
554 | #define MXC_GPC_NEON (MX51_GPC_BASE + 0x10) | ||
555 | #define MXC_GPC_PGR_ARMPG_OFFSET 8 | ||
556 | #define MXC_GPC_PGR_ARMPG_MASK (3 << 8) | ||
557 | |||
558 | /* PGC */ | ||
559 | #define MXC_PGC_IPU_PGCR (MXC_PGC_IPU_BASE + 0x0) | ||
560 | #define MXC_PGC_IPU_PGSR (MXC_PGC_IPU_BASE + 0xC) | ||
561 | #define MXC_PGC_VPU_PGCR (MXC_PGC_VPU_BASE + 0x0) | ||
562 | #define MXC_PGC_VPU_PGSR (MXC_PGC_VPU_BASE + 0xC) | ||
563 | #define MXC_PGC_GPU_PGCR (MXC_PGC_GPU_BASE + 0x0) | ||
564 | #define MXC_PGC_GPU_PGSR (MXC_PGC_GPU_BASE + 0xC) | ||
565 | |||
566 | #define MXC_PGCR_PCR 1 | ||
567 | #define MXC_SRPGCR_PCR 1 | ||
568 | #define MXC_EMPGCR_PCR 1 | ||
569 | #define MXC_PGSR_PSR 1 | ||
570 | |||
571 | |||
572 | #define MXC_CORTEXA8_PLAT_LPC_DSM (1 << 0) | ||
573 | #define MXC_CORTEXA8_PLAT_LPC_DBG_DSM (1 << 1) | ||
574 | |||
575 | /* SRPG */ | ||
576 | #define MXC_SRPG_NEON_SRPGCR (MXC_SRPG_NEON_BASE + 0x0) | ||
577 | #define MXC_SRPG_NEON_PUPSCR (MXC_SRPG_NEON_BASE + 0x4) | ||
578 | #define MXC_SRPG_NEON_PDNSCR (MXC_SRPG_NEON_BASE + 0x8) | ||
579 | |||
580 | #define MXC_SRPG_ARM_SRPGCR (MXC_SRPG_ARM_BASE + 0x0) | ||
581 | #define MXC_SRPG_ARM_PUPSCR (MXC_SRPG_ARM_BASE + 0x4) | ||
582 | #define MXC_SRPG_ARM_PDNSCR (MXC_SRPG_ARM_BASE + 0x8) | ||
583 | |||
584 | #define MXC_SRPG_EMPGC0_SRPGCR (MXC_SRPG_EMPGC0_BASE + 0x0) | ||
585 | #define MXC_SRPG_EMPGC0_PUPSCR (MXC_SRPG_EMPGC0_BASE + 0x4) | ||
586 | #define MXC_SRPG_EMPGC0_PDNSCR (MXC_SRPG_EMPGC0_BASE + 0x8) | ||
587 | |||
588 | #define MXC_SRPG_EMPGC1_SRPGCR (MXC_SRPG_EMPGC1_BASE + 0x0) | ||
589 | #define MXC_SRPG_EMPGC1_PUPSCR (MXC_SRPG_EMPGC1_BASE + 0x4) | ||
590 | #define MXC_SRPG_EMPGC1_PDNSCR (MXC_SRPG_EMPGC1_BASE + 0x8) | ||
591 | |||
592 | #define MXC_SRPG_MEGAMIX_SRPGCR (MXC_SRPG_MEGAMIX_BASE + 0x0) | ||
593 | #define MXC_SRPG_MEGAMIX_PUPSCR (MXC_SRPG_MEGAMIX_BASE + 0x4) | ||
594 | #define MXC_SRPG_MEGAMIX_PDNSCR (MXC_SRPG_MEGAMIX_BASE + 0x8) | ||
595 | |||
596 | #define MXC_SRPGC_EMI_SRPGCR (MXC_SRPGC_EMI_BASE + 0x0) | ||
597 | #define MXC_SRPGC_EMI_PUPSCR (MXC_SRPGC_EMI_BASE + 0x4) | ||
598 | #define MXC_SRPGC_EMI_PDNSCR (MXC_SRPGC_EMI_BASE + 0x8) | ||
599 | |||
600 | #endif /* __ARCH_ARM_MACH_MX51_CRM_REGS_H__ */ | ||
diff --git a/arch/arm/mach-imx/devices-imx51.h b/arch/arm/mach-imx/devices-imx51.h deleted file mode 100644 index 26389f35a2b2..000000000000 --- a/arch/arm/mach-imx/devices-imx51.h +++ /dev/null | |||
@@ -1,66 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Pengutronix | ||
3 | * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it under | ||
6 | * the terms of the GNU General Public License version 2 as published by the | ||
7 | * Free Software Foundation. | ||
8 | */ | ||
9 | #include "devices/devices-common.h" | ||
10 | |||
11 | extern const struct imx_fec_data imx51_fec_data; | ||
12 | #define imx51_add_fec(pdata) \ | ||
13 | imx_add_fec(&imx51_fec_data, pdata) | ||
14 | |||
15 | extern const struct imx_fsl_usb2_udc_data imx51_fsl_usb2_udc_data; | ||
16 | #define imx51_add_fsl_usb2_udc(pdata) \ | ||
17 | imx_add_fsl_usb2_udc(&imx51_fsl_usb2_udc_data, pdata) | ||
18 | |||
19 | extern const struct imx_imx_i2c_data imx51_imx_i2c_data[]; | ||
20 | #define imx51_add_imx_i2c(id, pdata) \ | ||
21 | imx_add_imx_i2c(&imx51_imx_i2c_data[id], pdata) | ||
22 | #define imx51_add_hsi2c(pdata) \ | ||
23 | imx51_add_imx_i2c(2, pdata) | ||
24 | |||
25 | extern const struct imx_imx_ssi_data imx51_imx_ssi_data[]; | ||
26 | #define imx51_add_imx_ssi(id, pdata) \ | ||
27 | imx_add_imx_ssi(&imx51_imx_ssi_data[id], pdata) | ||
28 | |||
29 | extern const struct imx_imx_uart_1irq_data imx51_imx_uart_data[]; | ||
30 | #define imx51_add_imx_uart(id, pdata) \ | ||
31 | imx_add_imx_uart_1irq(&imx51_imx_uart_data[id], pdata) | ||
32 | |||
33 | extern const struct imx_mxc_ehci_data imx51_mxc_ehci_otg_data; | ||
34 | #define imx51_add_mxc_ehci_otg(pdata) \ | ||
35 | imx_add_mxc_ehci(&imx51_mxc_ehci_otg_data, pdata) | ||
36 | extern const struct imx_mxc_ehci_data imx51_mxc_ehci_hs_data[]; | ||
37 | #define imx51_add_mxc_ehci_hs(id, pdata) \ | ||
38 | imx_add_mxc_ehci(&imx51_mxc_ehci_hs_data[id - 1], pdata) | ||
39 | |||
40 | extern const struct imx_mxc_nand_data imx51_mxc_nand_data; | ||
41 | #define imx51_add_mxc_nand(pdata) \ | ||
42 | imx_add_mxc_nand(&imx51_mxc_nand_data, pdata) | ||
43 | |||
44 | extern const struct imx_sdhci_esdhc_imx_data imx51_sdhci_esdhc_imx_data[]; | ||
45 | #define imx51_add_sdhci_esdhc_imx(id, pdata) \ | ||
46 | imx_add_sdhci_esdhc_imx(&imx51_sdhci_esdhc_imx_data[id], pdata) | ||
47 | |||
48 | extern const struct imx_spi_imx_data imx51_cspi_data; | ||
49 | #define imx51_add_cspi(pdata) \ | ||
50 | imx_add_spi_imx(&imx51_cspi_data, pdata) | ||
51 | |||
52 | extern const struct imx_spi_imx_data imx51_ecspi_data[]; | ||
53 | #define imx51_add_ecspi(id, pdata) \ | ||
54 | imx_add_spi_imx(&imx51_ecspi_data[id], pdata) | ||
55 | |||
56 | extern const struct imx_imx2_wdt_data imx51_imx2_wdt_data[]; | ||
57 | #define imx51_add_imx2_wdt(id) \ | ||
58 | imx_add_imx2_wdt(&imx51_imx2_wdt_data[id]) | ||
59 | |||
60 | extern const struct imx_imx_keypad_data imx51_imx_keypad_data; | ||
61 | #define imx51_add_imx_keypad(pdata) \ | ||
62 | imx_add_imx_keypad(&imx51_imx_keypad_data, pdata) | ||
63 | |||
64 | extern const struct imx_pata_imx_data imx51_pata_imx_data; | ||
65 | #define imx51_add_pata_imx() \ | ||
66 | imx_add_pata_imx(&imx51_pata_imx_data) | ||
diff --git a/arch/arm/mach-imx/devices/Kconfig b/arch/arm/mach-imx/devices/Kconfig index 2d260a5a307c..1d2cc1805f3e 100644 --- a/arch/arm/mach-imx/devices/Kconfig +++ b/arch/arm/mach-imx/devices/Kconfig | |||
@@ -1,6 +1,6 @@ | |||
1 | config IMX_HAVE_PLATFORM_FEC | 1 | config IMX_HAVE_PLATFORM_FEC |
2 | bool | 2 | bool |
3 | default y if ARCH_MX25 || SOC_IMX27 || SOC_IMX35 || SOC_IMX51 || SOC_IMX53 | 3 | default y if SOC_IMX25 || SOC_IMX27 || SOC_IMX35 |
4 | 4 | ||
5 | config IMX_HAVE_PLATFORM_FLEXCAN | 5 | config IMX_HAVE_PLATFORM_FLEXCAN |
6 | bool | 6 | bool |
@@ -10,7 +10,6 @@ config IMX_HAVE_PLATFORM_FSL_USB2_UDC | |||
10 | 10 | ||
11 | config IMX_HAVE_PLATFORM_GPIO_KEYS | 11 | config IMX_HAVE_PLATFORM_GPIO_KEYS |
12 | bool | 12 | bool |
13 | default y if SOC_IMX51 | ||
14 | 13 | ||
15 | config IMX_HAVE_PLATFORM_IMX21_HCD | 14 | config IMX_HAVE_PLATFORM_IMX21_HCD |
16 | bool | 15 | bool |
@@ -43,15 +42,9 @@ config IMX_HAVE_PLATFORM_IMX_SSI | |||
43 | config IMX_HAVE_PLATFORM_IMX_UART | 42 | config IMX_HAVE_PLATFORM_IMX_UART |
44 | bool | 43 | bool |
45 | 44 | ||
46 | config IMX_HAVE_PLATFORM_IMX_UDC | ||
47 | bool | ||
48 | |||
49 | config IMX_HAVE_PLATFORM_IPU_CORE | 45 | config IMX_HAVE_PLATFORM_IPU_CORE |
50 | bool | 46 | bool |
51 | 47 | ||
52 | config IMX_HAVE_PLATFORM_MX1_CAMERA | ||
53 | bool | ||
54 | |||
55 | config IMX_HAVE_PLATFORM_MX2_CAMERA | 48 | config IMX_HAVE_PLATFORM_MX2_CAMERA |
56 | bool | 49 | bool |
57 | 50 | ||
diff --git a/arch/arm/mach-imx/devices/Makefile b/arch/arm/mach-imx/devices/Makefile index 1cbc14cd80d1..8fdb12b4ca7e 100644 --- a/arch/arm/mach-imx/devices/Makefile +++ b/arch/arm/mach-imx/devices/Makefile | |||
@@ -16,9 +16,7 @@ obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_KEYPAD) += platform-imx-keypad.o | |||
16 | obj-$(CONFIG_IMX_HAVE_PLATFORM_PATA_IMX) += platform-pata_imx.o | 16 | obj-$(CONFIG_IMX_HAVE_PLATFORM_PATA_IMX) += platform-pata_imx.o |
17 | obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_SSI) += platform-imx-ssi.o | 17 | obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_SSI) += platform-imx-ssi.o |
18 | obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_UART) += platform-imx-uart.o | 18 | obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_UART) += platform-imx-uart.o |
19 | obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_UDC) += platform-imx_udc.o | ||
20 | obj-$(CONFIG_IMX_HAVE_PLATFORM_IPU_CORE) += platform-ipu-core.o | 19 | obj-$(CONFIG_IMX_HAVE_PLATFORM_IPU_CORE) += platform-ipu-core.o |
21 | obj-$(CONFIG_IMX_HAVE_PLATFORM_MX1_CAMERA) += platform-mx1-camera.o | ||
22 | obj-$(CONFIG_IMX_HAVE_PLATFORM_MX2_CAMERA) += platform-mx2-camera.o | 20 | obj-$(CONFIG_IMX_HAVE_PLATFORM_MX2_CAMERA) += platform-mx2-camera.o |
23 | obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_EHCI) += platform-mxc-ehci.o | 21 | obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_EHCI) += platform-mxc-ehci.o |
24 | obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_MMC) += platform-mxc-mmc.o | 22 | obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_MMC) += platform-mxc-mmc.o |
diff --git a/arch/arm/mach-imx/devices/devices-common.h b/arch/arm/mach-imx/devices/devices-common.h index 61352a80bb59..67f7fb13050d 100644 --- a/arch/arm/mach-imx/devices/devices-common.h +++ b/arch/arm/mach-imx/devices/devices-common.h | |||
@@ -176,22 +176,6 @@ struct platform_device *__init imx_add_imx_uart_1irq( | |||
176 | const struct imx_imx_uart_1irq_data *data, | 176 | const struct imx_imx_uart_1irq_data *data, |
177 | const struct imxuart_platform_data *pdata); | 177 | const struct imxuart_platform_data *pdata); |
178 | 178 | ||
179 | #include <linux/platform_data/usb-imx_udc.h> | ||
180 | struct imx_imx_udc_data { | ||
181 | resource_size_t iobase; | ||
182 | resource_size_t iosize; | ||
183 | resource_size_t irq0; | ||
184 | resource_size_t irq1; | ||
185 | resource_size_t irq2; | ||
186 | resource_size_t irq3; | ||
187 | resource_size_t irq4; | ||
188 | resource_size_t irq5; | ||
189 | resource_size_t irq6; | ||
190 | }; | ||
191 | struct platform_device *__init imx_add_imx_udc( | ||
192 | const struct imx_imx_udc_data *data, | ||
193 | const struct imxusb_platform_data *pdata); | ||
194 | |||
195 | #include <linux/platform_data/video-mx3fb.h> | 179 | #include <linux/platform_data/video-mx3fb.h> |
196 | #include <linux/platform_data/camera-mx3.h> | 180 | #include <linux/platform_data/camera-mx3.h> |
197 | struct imx_ipu_core_data { | 181 | struct imx_ipu_core_data { |
@@ -208,16 +192,6 @@ struct platform_device *__init imx_add_mx3_sdc_fb( | |||
208 | const struct imx_ipu_core_data *data, | 192 | const struct imx_ipu_core_data *data, |
209 | struct mx3fb_platform_data *pdata); | 193 | struct mx3fb_platform_data *pdata); |
210 | 194 | ||
211 | #include <linux/platform_data/camera-mx1.h> | ||
212 | struct imx_mx1_camera_data { | ||
213 | resource_size_t iobase; | ||
214 | resource_size_t iosize; | ||
215 | resource_size_t irq; | ||
216 | }; | ||
217 | struct platform_device *__init imx_add_mx1_camera( | ||
218 | const struct imx_mx1_camera_data *data, | ||
219 | const struct mx1_camera_pdata *pdata); | ||
220 | |||
221 | #include <linux/platform_data/camera-mx2.h> | 195 | #include <linux/platform_data/camera-mx2.h> |
222 | struct imx_mx2_camera_data { | 196 | struct imx_mx2_camera_data { |
223 | const char *devid; | 197 | const char *devid; |
diff --git a/arch/arm/mach-imx/devices/platform-fec.c b/arch/arm/mach-imx/devices/platform-fec.c index 63eba08f87b1..d86f9250b4ee 100644 --- a/arch/arm/mach-imx/devices/platform-fec.c +++ b/arch/arm/mach-imx/devices/platform-fec.c | |||
@@ -35,18 +35,6 @@ const struct imx_fec_data imx35_fec_data __initconst = | |||
35 | imx_fec_data_entry_single(MX35, "imx27-fec"); | 35 | imx_fec_data_entry_single(MX35, "imx27-fec"); |
36 | #endif | 36 | #endif |
37 | 37 | ||
38 | #ifdef CONFIG_SOC_IMX51 | ||
39 | /* i.mx51 has the i.mx27 type fec */ | ||
40 | const struct imx_fec_data imx51_fec_data __initconst = | ||
41 | imx_fec_data_entry_single(MX51, "imx27-fec"); | ||
42 | #endif | ||
43 | |||
44 | #ifdef CONFIG_SOC_IMX53 | ||
45 | /* i.mx53 has the i.mx25 type fec */ | ||
46 | const struct imx_fec_data imx53_fec_data __initconst = | ||
47 | imx_fec_data_entry_single(MX53, "imx25-fec"); | ||
48 | #endif | ||
49 | |||
50 | struct platform_device *__init imx_add_fec( | 38 | struct platform_device *__init imx_add_fec( |
51 | const struct imx_fec_data *data, | 39 | const struct imx_fec_data *data, |
52 | const struct fec_platform_data *pdata) | 40 | const struct fec_platform_data *pdata) |
diff --git a/arch/arm/mach-imx/devices/platform-fsl-usb2-udc.c b/arch/arm/mach-imx/devices/platform-fsl-usb2-udc.c index 3c06bd96e9cc..23b0061347cb 100644 --- a/arch/arm/mach-imx/devices/platform-fsl-usb2-udc.c +++ b/arch/arm/mach-imx/devices/platform-fsl-usb2-udc.c | |||
@@ -38,11 +38,6 @@ const struct imx_fsl_usb2_udc_data imx35_fsl_usb2_udc_data __initconst = | |||
38 | imx_fsl_usb2_udc_data_entry_single(MX35, "imx-udc-mx27"); | 38 | imx_fsl_usb2_udc_data_entry_single(MX35, "imx-udc-mx27"); |
39 | #endif /* ifdef CONFIG_SOC_IMX35 */ | 39 | #endif /* ifdef CONFIG_SOC_IMX35 */ |
40 | 40 | ||
41 | #ifdef CONFIG_SOC_IMX51 | ||
42 | const struct imx_fsl_usb2_udc_data imx51_fsl_usb2_udc_data __initconst = | ||
43 | imx_fsl_usb2_udc_data_entry_single(MX51, "imx-udc-mx51"); | ||
44 | #endif | ||
45 | |||
46 | struct platform_device *__init imx_add_fsl_usb2_udc( | 41 | struct platform_device *__init imx_add_fsl_usb2_udc( |
47 | const struct imx_fsl_usb2_udc_data *data, | 42 | const struct imx_fsl_usb2_udc_data *data, |
48 | const struct fsl_usb2_platform_data *pdata) | 43 | const struct fsl_usb2_platform_data *pdata) |
diff --git a/arch/arm/mach-imx/devices/platform-imx-i2c.c b/arch/arm/mach-imx/devices/platform-imx-i2c.c index 57d342e85c2f..644ac2689882 100644 --- a/arch/arm/mach-imx/devices/platform-imx-i2c.c +++ b/arch/arm/mach-imx/devices/platform-imx-i2c.c | |||
@@ -70,32 +70,6 @@ const struct imx_imx_i2c_data imx35_imx_i2c_data[] __initconst = { | |||
70 | }; | 70 | }; |
71 | #endif /* ifdef CONFIG_SOC_IMX35 */ | 71 | #endif /* ifdef CONFIG_SOC_IMX35 */ |
72 | 72 | ||
73 | #ifdef CONFIG_SOC_IMX51 | ||
74 | const struct imx_imx_i2c_data imx51_imx_i2c_data[] __initconst = { | ||
75 | #define imx51_imx_i2c_data_entry(_id, _hwid) \ | ||
76 | imx_imx_i2c_data_entry(MX51, "imx21-i2c", _id, _hwid, SZ_4K) | ||
77 | imx51_imx_i2c_data_entry(0, 1), | ||
78 | imx51_imx_i2c_data_entry(1, 2), | ||
79 | { | ||
80 | .devid = "imx21-i2c", | ||
81 | .id = 2, | ||
82 | .iobase = MX51_HSI2C_DMA_BASE_ADDR, | ||
83 | .iosize = SZ_16K, | ||
84 | .irq = MX51_INT_HS_I2C, | ||
85 | }, | ||
86 | }; | ||
87 | #endif /* ifdef CONFIG_SOC_IMX51 */ | ||
88 | |||
89 | #ifdef CONFIG_SOC_IMX53 | ||
90 | const struct imx_imx_i2c_data imx53_imx_i2c_data[] __initconst = { | ||
91 | #define imx53_imx_i2c_data_entry(_id, _hwid) \ | ||
92 | imx_imx_i2c_data_entry(MX53, "imx21-i2c", _id, _hwid, SZ_4K) | ||
93 | imx53_imx_i2c_data_entry(0, 1), | ||
94 | imx53_imx_i2c_data_entry(1, 2), | ||
95 | imx53_imx_i2c_data_entry(2, 3), | ||
96 | }; | ||
97 | #endif /* ifdef CONFIG_SOC_IMX53 */ | ||
98 | |||
99 | struct platform_device *__init imx_add_imx_i2c( | 73 | struct platform_device *__init imx_add_imx_i2c( |
100 | const struct imx_imx_i2c_data *data, | 74 | const struct imx_imx_i2c_data *data, |
101 | const struct imxi2c_platform_data *pdata) | 75 | const struct imxi2c_platform_data *pdata) |
diff --git a/arch/arm/mach-imx/devices/platform-imx-keypad.c b/arch/arm/mach-imx/devices/platform-imx-keypad.c index 8f22a4c98a4c..f42200b7aca9 100644 --- a/arch/arm/mach-imx/devices/platform-imx-keypad.c +++ b/arch/arm/mach-imx/devices/platform-imx-keypad.c | |||
@@ -41,16 +41,6 @@ const struct imx_imx_keypad_data imx35_imx_keypad_data __initconst = | |||
41 | imx_imx_keypad_data_entry_single(MX35, SZ_16); | 41 | imx_imx_keypad_data_entry_single(MX35, SZ_16); |
42 | #endif /* ifdef CONFIG_SOC_IMX35 */ | 42 | #endif /* ifdef CONFIG_SOC_IMX35 */ |
43 | 43 | ||
44 | #ifdef CONFIG_SOC_IMX51 | ||
45 | const struct imx_imx_keypad_data imx51_imx_keypad_data __initconst = | ||
46 | imx_imx_keypad_data_entry_single(MX51, SZ_16); | ||
47 | #endif /* ifdef CONFIG_SOC_IMX51 */ | ||
48 | |||
49 | #ifdef CONFIG_SOC_IMX53 | ||
50 | const struct imx_imx_keypad_data imx53_imx_keypad_data __initconst = | ||
51 | imx_imx_keypad_data_entry_single(MX53, SZ_16); | ||
52 | #endif /* ifdef CONFIG_SOC_IMX53 */ | ||
53 | |||
54 | struct platform_device *__init imx_add_imx_keypad( | 44 | struct platform_device *__init imx_add_imx_keypad( |
55 | const struct imx_imx_keypad_data *data, | 45 | const struct imx_imx_keypad_data *data, |
56 | const struct matrix_keymap_data *pdata) | 46 | const struct matrix_keymap_data *pdata) |
diff --git a/arch/arm/mach-imx/devices/platform-imx-ssi.c b/arch/arm/mach-imx/devices/platform-imx-ssi.c index bfcb8f3dfa8d..1c7c721ebff1 100644 --- a/arch/arm/mach-imx/devices/platform-imx-ssi.c +++ b/arch/arm/mach-imx/devices/platform-imx-ssi.c | |||
@@ -66,26 +66,6 @@ const struct imx_imx_ssi_data imx35_imx_ssi_data[] __initconst = { | |||
66 | }; | 66 | }; |
67 | #endif /* ifdef CONFIG_SOC_IMX35 */ | 67 | #endif /* ifdef CONFIG_SOC_IMX35 */ |
68 | 68 | ||
69 | #ifdef CONFIG_SOC_IMX51 | ||
70 | const struct imx_imx_ssi_data imx51_imx_ssi_data[] __initconst = { | ||
71 | #define imx51_imx_ssi_data_entry(_id, _hwid) \ | ||
72 | imx_imx_ssi_data_entry(MX51, _id, _hwid, SZ_16K) | ||
73 | imx51_imx_ssi_data_entry(0, 1), | ||
74 | imx51_imx_ssi_data_entry(1, 2), | ||
75 | imx51_imx_ssi_data_entry(2, 3), | ||
76 | }; | ||
77 | #endif /* ifdef CONFIG_SOC_IMX51 */ | ||
78 | |||
79 | #ifdef CONFIG_SOC_IMX53 | ||
80 | const struct imx_imx_ssi_data imx53_imx_ssi_data[] __initconst = { | ||
81 | #define imx53_imx_ssi_data_entry(_id, _hwid) \ | ||
82 | imx_imx_ssi_data_entry(MX53, _id, _hwid, SZ_16K) | ||
83 | imx53_imx_ssi_data_entry(0, 1), | ||
84 | imx53_imx_ssi_data_entry(1, 2), | ||
85 | imx53_imx_ssi_data_entry(2, 3), | ||
86 | }; | ||
87 | #endif /* ifdef CONFIG_SOC_IMX53 */ | ||
88 | |||
89 | struct platform_device *__init imx_add_imx_ssi( | 69 | struct platform_device *__init imx_add_imx_ssi( |
90 | const struct imx_imx_ssi_data *data, | 70 | const struct imx_imx_ssi_data *data, |
91 | const struct imx_ssi_platform_data *pdata) | 71 | const struct imx_ssi_platform_data *pdata) |
diff --git a/arch/arm/mach-imx/devices/platform-imx-uart.c b/arch/arm/mach-imx/devices/platform-imx-uart.c index faac4aa6ca6d..8c01836bc1d4 100644 --- a/arch/arm/mach-imx/devices/platform-imx-uart.c +++ b/arch/arm/mach-imx/devices/platform-imx-uart.c | |||
@@ -94,28 +94,6 @@ const struct imx_imx_uart_1irq_data imx35_imx_uart_data[] __initconst = { | |||
94 | }; | 94 | }; |
95 | #endif /* ifdef CONFIG_SOC_IMX35 */ | 95 | #endif /* ifdef CONFIG_SOC_IMX35 */ |
96 | 96 | ||
97 | #ifdef CONFIG_SOC_IMX51 | ||
98 | const struct imx_imx_uart_1irq_data imx51_imx_uart_data[] __initconst = { | ||
99 | #define imx51_imx_uart_data_entry(_id, _hwid) \ | ||
100 | imx_imx_uart_1irq_data_entry(MX51, _id, _hwid, SZ_4K) | ||
101 | imx51_imx_uart_data_entry(0, 1), | ||
102 | imx51_imx_uart_data_entry(1, 2), | ||
103 | imx51_imx_uart_data_entry(2, 3), | ||
104 | }; | ||
105 | #endif /* ifdef CONFIG_SOC_IMX51 */ | ||
106 | |||
107 | #ifdef CONFIG_SOC_IMX53 | ||
108 | const struct imx_imx_uart_1irq_data imx53_imx_uart_data[] __initconst = { | ||
109 | #define imx53_imx_uart_data_entry(_id, _hwid) \ | ||
110 | imx_imx_uart_1irq_data_entry(MX53, _id, _hwid, SZ_4K) | ||
111 | imx53_imx_uart_data_entry(0, 1), | ||
112 | imx53_imx_uart_data_entry(1, 2), | ||
113 | imx53_imx_uart_data_entry(2, 3), | ||
114 | imx53_imx_uart_data_entry(3, 4), | ||
115 | imx53_imx_uart_data_entry(4, 5), | ||
116 | }; | ||
117 | #endif /* ifdef CONFIG_SOC_IMX53 */ | ||
118 | |||
119 | struct platform_device *__init imx_add_imx_uart_3irq( | 97 | struct platform_device *__init imx_add_imx_uart_3irq( |
120 | const struct imx_imx_uart_3irq_data *data, | 98 | const struct imx_imx_uart_3irq_data *data, |
121 | const struct imxuart_platform_data *pdata) | 99 | const struct imxuart_platform_data *pdata) |
diff --git a/arch/arm/mach-imx/devices/platform-imx2-wdt.c b/arch/arm/mach-imx/devices/platform-imx2-wdt.c index ec75d6413686..54f63bc25ca4 100644 --- a/arch/arm/mach-imx/devices/platform-imx2-wdt.c +++ b/arch/arm/mach-imx/devices/platform-imx2-wdt.c | |||
@@ -45,24 +45,6 @@ const struct imx_imx2_wdt_data imx35_imx2_wdt_data __initconst = | |||
45 | imx_imx2_wdt_data_entry_single(MX35, 0, , SZ_16K); | 45 | imx_imx2_wdt_data_entry_single(MX35, 0, , SZ_16K); |
46 | #endif /* ifdef CONFIG_SOC_IMX35 */ | 46 | #endif /* ifdef CONFIG_SOC_IMX35 */ |
47 | 47 | ||
48 | #ifdef CONFIG_SOC_IMX51 | ||
49 | const struct imx_imx2_wdt_data imx51_imx2_wdt_data[] __initconst = { | ||
50 | #define imx51_imx2_wdt_data_entry(_id, _hwid) \ | ||
51 | imx_imx2_wdt_data_entry(MX51, _id, _hwid, SZ_16K) | ||
52 | imx51_imx2_wdt_data_entry(0, 1), | ||
53 | imx51_imx2_wdt_data_entry(1, 2), | ||
54 | }; | ||
55 | #endif /* ifdef CONFIG_SOC_IMX51 */ | ||
56 | |||
57 | #ifdef CONFIG_SOC_IMX53 | ||
58 | const struct imx_imx2_wdt_data imx53_imx2_wdt_data[] __initconst = { | ||
59 | #define imx53_imx2_wdt_data_entry(_id, _hwid) \ | ||
60 | imx_imx2_wdt_data_entry(MX53, _id, _hwid, SZ_16K) | ||
61 | imx53_imx2_wdt_data_entry(0, 1), | ||
62 | imx53_imx2_wdt_data_entry(1, 2), | ||
63 | }; | ||
64 | #endif /* ifdef CONFIG_SOC_IMX53 */ | ||
65 | |||
66 | struct platform_device *__init imx_add_imx2_wdt( | 48 | struct platform_device *__init imx_add_imx2_wdt( |
67 | const struct imx_imx2_wdt_data *data) | 49 | const struct imx_imx2_wdt_data *data) |
68 | { | 50 | { |
diff --git a/arch/arm/mach-imx/devices/platform-imx_udc.c b/arch/arm/mach-imx/devices/platform-imx_udc.c deleted file mode 100644 index 5ced7e4e2c71..000000000000 --- a/arch/arm/mach-imx/devices/platform-imx_udc.c +++ /dev/null | |||
@@ -1,75 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Pengutronix | ||
3 | * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it under | ||
6 | * the terms of the GNU General Public License version 2 as published by the | ||
7 | * Free Software Foundation. | ||
8 | */ | ||
9 | #include "../hardware.h" | ||
10 | #include "devices-common.h" | ||
11 | |||
12 | #define imx_imx_udc_data_entry_single(soc, _size) \ | ||
13 | { \ | ||
14 | .iobase = soc ## _USBD_BASE_ADDR, \ | ||
15 | .iosize = _size, \ | ||
16 | .irq0 = soc ## _INT_USBD0, \ | ||
17 | .irq1 = soc ## _INT_USBD1, \ | ||
18 | .irq2 = soc ## _INT_USBD2, \ | ||
19 | .irq3 = soc ## _INT_USBD3, \ | ||
20 | .irq4 = soc ## _INT_USBD4, \ | ||
21 | .irq5 = soc ## _INT_USBD5, \ | ||
22 | .irq6 = soc ## _INT_USBD6, \ | ||
23 | } | ||
24 | |||
25 | #define imx_imx_udc_data_entry(soc, _size) \ | ||
26 | [_id] = imx_imx_udc_data_entry_single(soc, _size) | ||
27 | |||
28 | #ifdef CONFIG_SOC_IMX1 | ||
29 | const struct imx_imx_udc_data imx1_imx_udc_data __initconst = | ||
30 | imx_imx_udc_data_entry_single(MX1, SZ_4K); | ||
31 | #endif /* ifdef CONFIG_SOC_IMX1 */ | ||
32 | |||
33 | struct platform_device *__init imx_add_imx_udc( | ||
34 | const struct imx_imx_udc_data *data, | ||
35 | const struct imxusb_platform_data *pdata) | ||
36 | { | ||
37 | struct resource res[] = { | ||
38 | { | ||
39 | .start = data->iobase, | ||
40 | .end = data->iobase + data->iosize - 1, | ||
41 | .flags = IORESOURCE_MEM, | ||
42 | }, { | ||
43 | .start = data->irq0, | ||
44 | .end = data->irq0, | ||
45 | .flags = IORESOURCE_IRQ, | ||
46 | }, { | ||
47 | .start = data->irq1, | ||
48 | .end = data->irq1, | ||
49 | .flags = IORESOURCE_IRQ, | ||
50 | }, { | ||
51 | .start = data->irq2, | ||
52 | .end = data->irq2, | ||
53 | .flags = IORESOURCE_IRQ, | ||
54 | }, { | ||
55 | .start = data->irq3, | ||
56 | .end = data->irq3, | ||
57 | .flags = IORESOURCE_IRQ, | ||
58 | }, { | ||
59 | .start = data->irq4, | ||
60 | .end = data->irq4, | ||
61 | .flags = IORESOURCE_IRQ, | ||
62 | }, { | ||
63 | .start = data->irq5, | ||
64 | .end = data->irq5, | ||
65 | .flags = IORESOURCE_IRQ, | ||
66 | }, { | ||
67 | .start = data->irq6, | ||
68 | .end = data->irq6, | ||
69 | .flags = IORESOURCE_IRQ, | ||
70 | }, | ||
71 | }; | ||
72 | |||
73 | return imx_add_platform_device("imx_udc", 0, | ||
74 | res, ARRAY_SIZE(res), pdata, sizeof(*pdata)); | ||
75 | } | ||
diff --git a/arch/arm/mach-imx/devices/platform-mx1-camera.c b/arch/arm/mach-imx/devices/platform-mx1-camera.c deleted file mode 100644 index 2c6788131080..000000000000 --- a/arch/arm/mach-imx/devices/platform-mx1-camera.c +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Pengutronix | ||
3 | * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it under | ||
6 | * the terms of the GNU General Public License version 2 as published by the | ||
7 | * Free Software Foundation. | ||
8 | */ | ||
9 | #include "../hardware.h" | ||
10 | #include "devices-common.h" | ||
11 | |||
12 | #define imx_mx1_camera_data_entry_single(soc, _size) \ | ||
13 | { \ | ||
14 | .iobase = soc ## _CSI ## _BASE_ADDR, \ | ||
15 | .iosize = _size, \ | ||
16 | .irq = soc ## _INT_CSI, \ | ||
17 | } | ||
18 | |||
19 | #ifdef CONFIG_SOC_IMX1 | ||
20 | const struct imx_mx1_camera_data imx1_mx1_camera_data __initconst = | ||
21 | imx_mx1_camera_data_entry_single(MX1, 10); | ||
22 | #endif /* ifdef CONFIG_SOC_IMX1 */ | ||
23 | |||
24 | struct platform_device *__init imx_add_mx1_camera( | ||
25 | const struct imx_mx1_camera_data *data, | ||
26 | const struct mx1_camera_pdata *pdata) | ||
27 | { | ||
28 | struct resource res[] = { | ||
29 | { | ||
30 | .start = data->iobase, | ||
31 | .end = data->iobase + data->iosize - 1, | ||
32 | .flags = IORESOURCE_MEM, | ||
33 | }, { | ||
34 | .start = data->irq, | ||
35 | .end = data->irq, | ||
36 | .flags = IORESOURCE_IRQ, | ||
37 | }, | ||
38 | }; | ||
39 | return imx_add_platform_device_dmamask("mx1-camera", 0, | ||
40 | res, ARRAY_SIZE(res), | ||
41 | pdata, sizeof(*pdata), DMA_BIT_MASK(32)); | ||
42 | } | ||
diff --git a/arch/arm/mach-imx/devices/platform-mxc-ehci.c b/arch/arm/mach-imx/devices/platform-mxc-ehci.c index 5d4bbbfde641..296353662ff0 100644 --- a/arch/arm/mach-imx/devices/platform-mxc-ehci.c +++ b/arch/arm/mach-imx/devices/platform-mxc-ehci.c | |||
@@ -50,15 +50,6 @@ const struct imx_mxc_ehci_data imx35_mxc_ehci_hs_data __initconst = | |||
50 | imx_mxc_ehci_data_entry_single(MX35, 1, HS); | 50 | imx_mxc_ehci_data_entry_single(MX35, 1, HS); |
51 | #endif /* ifdef CONFIG_SOC_IMX35 */ | 51 | #endif /* ifdef CONFIG_SOC_IMX35 */ |
52 | 52 | ||
53 | #ifdef CONFIG_SOC_IMX51 | ||
54 | const struct imx_mxc_ehci_data imx51_mxc_ehci_otg_data __initconst = | ||
55 | imx_mxc_ehci_data_entry_single(MX51, 0, OTG); | ||
56 | const struct imx_mxc_ehci_data imx51_mxc_ehci_hs_data[] __initconst = { | ||
57 | imx_mxc_ehci_data_entry_single(MX51, 1, HS1), | ||
58 | imx_mxc_ehci_data_entry_single(MX51, 2, HS2), | ||
59 | }; | ||
60 | #endif /* ifdef CONFIG_SOC_IMX51 */ | ||
61 | |||
62 | struct platform_device *__init imx_add_mxc_ehci( | 53 | struct platform_device *__init imx_add_mxc_ehci( |
63 | const struct imx_mxc_ehci_data *data, | 54 | const struct imx_mxc_ehci_data *data, |
64 | const struct mxc_usbh_platform_data *pdata) | 55 | const struct mxc_usbh_platform_data *pdata) |
diff --git a/arch/arm/mach-imx/devices/platform-mxc_nand.c b/arch/arm/mach-imx/devices/platform-mxc_nand.c index 7af1c53e42b5..fa618a34f462 100644 --- a/arch/arm/mach-imx/devices/platform-mxc_nand.c +++ b/arch/arm/mach-imx/devices/platform-mxc_nand.c | |||
@@ -54,11 +54,6 @@ const struct imx_mxc_nand_data imx35_mxc_nand_data __initconst = | |||
54 | imx_mxc_nand_data_entry_single(MX35, "imx25-nand", SZ_8K); | 54 | imx_mxc_nand_data_entry_single(MX35, "imx25-nand", SZ_8K); |
55 | #endif | 55 | #endif |
56 | 56 | ||
57 | #ifdef CONFIG_SOC_IMX51 | ||
58 | const struct imx_mxc_nand_data imx51_mxc_nand_data __initconst = | ||
59 | imx_mxc_nandv3_data_entry_single(MX51, "imx51-nand", SZ_16K); | ||
60 | #endif | ||
61 | |||
62 | struct platform_device *__init imx_add_mxc_nand( | 57 | struct platform_device *__init imx_add_mxc_nand( |
63 | const struct imx_mxc_nand_data *data, | 58 | const struct imx_mxc_nand_data *data, |
64 | const struct mxc_nand_platform_data *pdata) | 59 | const struct mxc_nand_platform_data *pdata) |
diff --git a/arch/arm/mach-imx/devices/platform-mxc_rnga.c b/arch/arm/mach-imx/devices/platform-mxc_rnga.c index c58404badb59..851fbc8af7a9 100644 --- a/arch/arm/mach-imx/devices/platform-mxc_rnga.c +++ b/arch/arm/mach-imx/devices/platform-mxc_rnga.c | |||
@@ -48,9 +48,6 @@ static int __init imxXX_add_mxc_rnga(void) | |||
48 | #endif /* if defined(CONFIG_SOC_IMX31) */ | 48 | #endif /* if defined(CONFIG_SOC_IMX31) */ |
49 | ret = ERR_PTR(-ENODEV); | 49 | ret = ERR_PTR(-ENODEV); |
50 | 50 | ||
51 | if (IS_ERR(ret)) | 51 | return PTR_ERR_OR_ZERO(ret); |
52 | return PTR_ERR(ret); | ||
53 | |||
54 | return 0; | ||
55 | } | 52 | } |
56 | arch_initcall(imxXX_add_mxc_rnga); | 53 | arch_initcall(imxXX_add_mxc_rnga); |
diff --git a/arch/arm/mach-imx/devices/platform-pata_imx.c b/arch/arm/mach-imx/devices/platform-pata_imx.c index e4ec11c8ce55..1c7f895a69d2 100644 --- a/arch/arm/mach-imx/devices/platform-pata_imx.c +++ b/arch/arm/mach-imx/devices/platform-pata_imx.c | |||
@@ -28,16 +28,6 @@ const struct imx_pata_imx_data imx35_pata_imx_data __initconst = | |||
28 | imx_pata_imx_data_entry_single(MX35, SZ_16K); | 28 | imx_pata_imx_data_entry_single(MX35, SZ_16K); |
29 | #endif /* ifdef CONFIG_SOC_IMX35 */ | 29 | #endif /* ifdef CONFIG_SOC_IMX35 */ |
30 | 30 | ||
31 | #ifdef CONFIG_SOC_IMX51 | ||
32 | const struct imx_pata_imx_data imx51_pata_imx_data __initconst = | ||
33 | imx_pata_imx_data_entry_single(MX51, SZ_16K); | ||
34 | #endif /* ifdef CONFIG_SOC_IMX51 */ | ||
35 | |||
36 | #ifdef CONFIG_SOC_IMX53 | ||
37 | const struct imx_pata_imx_data imx53_pata_imx_data __initconst = | ||
38 | imx_pata_imx_data_entry_single(MX53, SZ_16K); | ||
39 | #endif /* ifdef CONFIG_SOC_IMX53 */ | ||
40 | |||
41 | struct platform_device *__init imx_add_pata_imx( | 31 | struct platform_device *__init imx_add_pata_imx( |
42 | const struct imx_pata_imx_data *data) | 32 | const struct imx_pata_imx_data *data) |
43 | { | 33 | { |
diff --git a/arch/arm/mach-imx/devices/platform-sdhci-esdhc-imx.c b/arch/arm/mach-imx/devices/platform-sdhci-esdhc-imx.c index e66a4e316311..fb8d4a2ad48c 100644 --- a/arch/arm/mach-imx/devices/platform-sdhci-esdhc-imx.c +++ b/arch/arm/mach-imx/devices/platform-sdhci-esdhc-imx.c | |||
@@ -43,30 +43,6 @@ imx35_sdhci_esdhc_imx_data[] __initconst = { | |||
43 | }; | 43 | }; |
44 | #endif /* ifdef CONFIG_SOC_IMX35 */ | 44 | #endif /* ifdef CONFIG_SOC_IMX35 */ |
45 | 45 | ||
46 | #ifdef CONFIG_SOC_IMX51 | ||
47 | const struct imx_sdhci_esdhc_imx_data | ||
48 | imx51_sdhci_esdhc_imx_data[] __initconst = { | ||
49 | #define imx51_sdhci_esdhc_imx_data_entry(_id, _hwid) \ | ||
50 | imx_sdhci_esdhc_imx_data_entry(MX51, "sdhci-esdhc-imx51", _id, _hwid) | ||
51 | imx51_sdhci_esdhc_imx_data_entry(0, 1), | ||
52 | imx51_sdhci_esdhc_imx_data_entry(1, 2), | ||
53 | imx51_sdhci_esdhc_imx_data_entry(2, 3), | ||
54 | imx51_sdhci_esdhc_imx_data_entry(3, 4), | ||
55 | }; | ||
56 | #endif /* ifdef CONFIG_SOC_IMX51 */ | ||
57 | |||
58 | #ifdef CONFIG_SOC_IMX53 | ||
59 | const struct imx_sdhci_esdhc_imx_data | ||
60 | imx53_sdhci_esdhc_imx_data[] __initconst = { | ||
61 | #define imx53_sdhci_esdhc_imx_data_entry(_id, _hwid) \ | ||
62 | imx_sdhci_esdhc_imx_data_entry(MX53, "sdhci-esdhc-imx53", _id, _hwid) | ||
63 | imx53_sdhci_esdhc_imx_data_entry(0, 1), | ||
64 | imx53_sdhci_esdhc_imx_data_entry(1, 2), | ||
65 | imx53_sdhci_esdhc_imx_data_entry(2, 3), | ||
66 | imx53_sdhci_esdhc_imx_data_entry(3, 4), | ||
67 | }; | ||
68 | #endif /* ifdef CONFIG_SOC_IMX53 */ | ||
69 | |||
70 | static const struct esdhc_platform_data default_esdhc_pdata __initconst = { | 46 | static const struct esdhc_platform_data default_esdhc_pdata __initconst = { |
71 | .wp_type = ESDHC_WP_NONE, | 47 | .wp_type = ESDHC_WP_NONE, |
72 | .cd_type = ESDHC_CD_NONE, | 48 | .cd_type = ESDHC_CD_NONE, |
diff --git a/arch/arm/mach-imx/devices/platform-spi_imx.c b/arch/arm/mach-imx/devices/platform-spi_imx.c index 8880bcb11e05..aca825d74c48 100644 --- a/arch/arm/mach-imx/devices/platform-spi_imx.c +++ b/arch/arm/mach-imx/devices/platform-spi_imx.c | |||
@@ -79,33 +79,6 @@ const struct imx_spi_imx_data imx35_cspi_data[] __initconst = { | |||
79 | }; | 79 | }; |
80 | #endif /* ifdef CONFIG_SOC_IMX35 */ | 80 | #endif /* ifdef CONFIG_SOC_IMX35 */ |
81 | 81 | ||
82 | #ifdef CONFIG_SOC_IMX51 | ||
83 | /* i.mx51 has the i.mx35 type cspi */ | ||
84 | const struct imx_spi_imx_data imx51_cspi_data __initconst = | ||
85 | imx_spi_imx_data_entry_single(MX51, CSPI, "imx35-cspi", 2, , SZ_4K); | ||
86 | |||
87 | const struct imx_spi_imx_data imx51_ecspi_data[] __initconst = { | ||
88 | #define imx51_ecspi_data_entry(_id, _hwid) \ | ||
89 | imx_spi_imx_data_entry(MX51, ECSPI, "imx51-ecspi", _id, _hwid, SZ_4K) | ||
90 | imx51_ecspi_data_entry(0, 1), | ||
91 | imx51_ecspi_data_entry(1, 2), | ||
92 | }; | ||
93 | #endif /* ifdef CONFIG_SOC_IMX51 */ | ||
94 | |||
95 | #ifdef CONFIG_SOC_IMX53 | ||
96 | /* i.mx53 has the i.mx35 type cspi */ | ||
97 | const struct imx_spi_imx_data imx53_cspi_data __initconst = | ||
98 | imx_spi_imx_data_entry_single(MX53, CSPI, "imx35-cspi", 2, , SZ_4K); | ||
99 | |||
100 | /* i.mx53 has the i.mx51 type ecspi */ | ||
101 | const struct imx_spi_imx_data imx53_ecspi_data[] __initconst = { | ||
102 | #define imx53_ecspi_data_entry(_id, _hwid) \ | ||
103 | imx_spi_imx_data_entry(MX53, ECSPI, "imx51-ecspi", _id, _hwid, SZ_4K) | ||
104 | imx53_ecspi_data_entry(0, 1), | ||
105 | imx53_ecspi_data_entry(1, 2), | ||
106 | }; | ||
107 | #endif /* ifdef CONFIG_SOC_IMX53 */ | ||
108 | |||
109 | struct platform_device *__init imx_add_spi_imx( | 82 | struct platform_device *__init imx_add_spi_imx( |
110 | const struct imx_spi_imx_data *data, | 83 | const struct imx_spi_imx_data *data, |
111 | const struct spi_imx_master *pdata) | 84 | const struct spi_imx_master *pdata) |
diff --git a/arch/arm/mach-imx/ehci-imx25.c b/arch/arm/mach-imx/ehci-imx25.c index 134c190e3003..42a5a3d14c5f 100644 --- a/arch/arm/mach-imx/ehci-imx25.c +++ b/arch/arm/mach-imx/ehci-imx25.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/io.h> | 17 | #include <linux/io.h> |
18 | #include <linux/platform_data/usb-ehci-mxc.h> | 18 | #include <linux/platform_data/usb-ehci-mxc.h> |
19 | 19 | ||
20 | #include "ehci.h" | ||
20 | #include "hardware.h" | 21 | #include "hardware.h" |
21 | 22 | ||
22 | #define USBCTRL_OTGBASE_OFFSET 0x600 | 23 | #define USBCTRL_OTGBASE_OFFSET 0x600 |
diff --git a/arch/arm/mach-imx/ehci-imx27.c b/arch/arm/mach-imx/ehci-imx27.c index 448d9115539d..c56974346c16 100644 --- a/arch/arm/mach-imx/ehci-imx27.c +++ b/arch/arm/mach-imx/ehci-imx27.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/io.h> | 17 | #include <linux/io.h> |
18 | #include <linux/platform_data/usb-ehci-mxc.h> | 18 | #include <linux/platform_data/usb-ehci-mxc.h> |
19 | 19 | ||
20 | #include "ehci.h" | ||
20 | #include "hardware.h" | 21 | #include "hardware.h" |
21 | 22 | ||
22 | #define USBCTRL_OTGBASE_OFFSET 0x600 | 23 | #define USBCTRL_OTGBASE_OFFSET 0x600 |
diff --git a/arch/arm/mach-imx/ehci-imx31.c b/arch/arm/mach-imx/ehci-imx31.c index 05de4e1e39d7..bede21d9b981 100644 --- a/arch/arm/mach-imx/ehci-imx31.c +++ b/arch/arm/mach-imx/ehci-imx31.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/io.h> | 17 | #include <linux/io.h> |
18 | #include <linux/platform_data/usb-ehci-mxc.h> | 18 | #include <linux/platform_data/usb-ehci-mxc.h> |
19 | 19 | ||
20 | #include "ehci.h" | ||
20 | #include "hardware.h" | 21 | #include "hardware.h" |
21 | 22 | ||
22 | #define USBCTRL_OTGBASE_OFFSET 0x600 | 23 | #define USBCTRL_OTGBASE_OFFSET 0x600 |
diff --git a/arch/arm/mach-imx/ehci-imx35.c b/arch/arm/mach-imx/ehci-imx35.c index 554e7cccff53..f424a543755c 100644 --- a/arch/arm/mach-imx/ehci-imx35.c +++ b/arch/arm/mach-imx/ehci-imx35.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/io.h> | 17 | #include <linux/io.h> |
18 | #include <linux/platform_data/usb-ehci-mxc.h> | 18 | #include <linux/platform_data/usb-ehci-mxc.h> |
19 | 19 | ||
20 | #include "ehci.h" | ||
20 | #include "hardware.h" | 21 | #include "hardware.h" |
21 | 22 | ||
22 | #define USBCTRL_OTGBASE_OFFSET 0x600 | 23 | #define USBCTRL_OTGBASE_OFFSET 0x600 |
diff --git a/arch/arm/mach-imx/ehci-imx5.c b/arch/arm/mach-imx/ehci-imx5.c deleted file mode 100644 index e49710b10c68..000000000000 --- a/arch/arm/mach-imx/ehci-imx5.c +++ /dev/null | |||
@@ -1,171 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2009 Daniel Mack <daniel@caiaq.de> | ||
3 | * Copyright (C) 2010 Freescale Semiconductor, Inc. | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it | ||
6 | * under the terms of the GNU General Public License as published by the | ||
7 | * Free Software Foundation; either version 2 of the License, or (at your | ||
8 | * option) any later version. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, but | ||
11 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | ||
12 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
13 | * for more details. | ||
14 | */ | ||
15 | |||
16 | #include <linux/platform_device.h> | ||
17 | #include <linux/io.h> | ||
18 | #include <linux/platform_data/usb-ehci-mxc.h> | ||
19 | |||
20 | #include "hardware.h" | ||
21 | |||
22 | #define MXC_OTG_OFFSET 0 | ||
23 | #define MXC_H1_OFFSET 0x200 | ||
24 | #define MXC_H2_OFFSET 0x400 | ||
25 | |||
26 | /* USB_CTRL */ | ||
27 | #define MXC_OTG_UCTRL_OWIE_BIT (1 << 27) /* OTG wakeup intr enable */ | ||
28 | #define MXC_OTG_UCTRL_OPM_BIT (1 << 24) /* OTG power mask */ | ||
29 | #define MXC_H1_UCTRL_H1UIE_BIT (1 << 12) /* Host1 ULPI interrupt enable */ | ||
30 | #define MXC_H1_UCTRL_H1WIE_BIT (1 << 11) /* HOST1 wakeup intr enable */ | ||
31 | #define MXC_H1_UCTRL_H1PM_BIT (1 << 8) /* HOST1 power mask */ | ||
32 | |||
33 | /* USB_PHY_CTRL_FUNC */ | ||
34 | #define MXC_OTG_PHYCTRL_OC_POL_BIT (1 << 9) /* OTG Polarity of Overcurrent */ | ||
35 | #define MXC_OTG_PHYCTRL_OC_DIS_BIT (1 << 8) /* OTG Disable Overcurrent Event */ | ||
36 | #define MXC_H1_OC_POL_BIT (1 << 6) /* UH1 Polarity of Overcurrent */ | ||
37 | #define MXC_H1_OC_DIS_BIT (1 << 5) /* UH1 Disable Overcurrent Event */ | ||
38 | #define MXC_OTG_PHYCTRL_PWR_POL_BIT (1 << 3) /* OTG Power Pin Polarity */ | ||
39 | |||
40 | /* USBH2CTRL */ | ||
41 | #define MXC_H2_UCTRL_H2UIE_BIT (1 << 8) | ||
42 | #define MXC_H2_UCTRL_H2WIE_BIT (1 << 7) | ||
43 | #define MXC_H2_UCTRL_H2PM_BIT (1 << 4) | ||
44 | |||
45 | #define MXC_USBCMD_OFFSET 0x140 | ||
46 | |||
47 | /* USBCMD */ | ||
48 | #define MXC_UCMD_ITC_NO_THRESHOLD_MASK (~(0xff << 16)) /* Interrupt Threshold Control */ | ||
49 | |||
50 | int mx51_initialize_usb_hw(int port, unsigned int flags) | ||
51 | { | ||
52 | unsigned int v; | ||
53 | void __iomem *usb_base; | ||
54 | void __iomem *usbotg_base; | ||
55 | void __iomem *usbother_base; | ||
56 | int ret = 0; | ||
57 | |||
58 | usb_base = ioremap(MX51_USB_OTG_BASE_ADDR, SZ_4K); | ||
59 | if (!usb_base) { | ||
60 | printk(KERN_ERR "%s(): ioremap failed\n", __func__); | ||
61 | return -ENOMEM; | ||
62 | } | ||
63 | |||
64 | switch (port) { | ||
65 | case 0: /* OTG port */ | ||
66 | usbotg_base = usb_base + MXC_OTG_OFFSET; | ||
67 | break; | ||
68 | case 1: /* Host 1 port */ | ||
69 | usbotg_base = usb_base + MXC_H1_OFFSET; | ||
70 | break; | ||
71 | case 2: /* Host 2 port */ | ||
72 | usbotg_base = usb_base + MXC_H2_OFFSET; | ||
73 | break; | ||
74 | default: | ||
75 | printk(KERN_ERR"%s no such port %d\n", __func__, port); | ||
76 | ret = -ENOENT; | ||
77 | goto error; | ||
78 | } | ||
79 | usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET; | ||
80 | |||
81 | switch (port) { | ||
82 | case 0: /*OTG port */ | ||
83 | if (flags & MXC_EHCI_INTERNAL_PHY) { | ||
84 | v = __raw_readl(usbother_base + MXC_USB_PHY_CTR_FUNC_OFFSET); | ||
85 | |||
86 | if (flags & MXC_EHCI_OC_PIN_ACTIVE_LOW) | ||
87 | v |= MXC_OTG_PHYCTRL_OC_POL_BIT; | ||
88 | else | ||
89 | v &= ~MXC_OTG_PHYCTRL_OC_POL_BIT; | ||
90 | if (flags & MXC_EHCI_POWER_PINS_ENABLED) { | ||
91 | /* OC/USBPWR is used */ | ||
92 | v &= ~MXC_OTG_PHYCTRL_OC_DIS_BIT; | ||
93 | } else { | ||
94 | /* OC/USBPWR is not used */ | ||
95 | v |= MXC_OTG_PHYCTRL_OC_DIS_BIT; | ||
96 | } | ||
97 | if (flags & MXC_EHCI_PWR_PIN_ACTIVE_HIGH) | ||
98 | v |= MXC_OTG_PHYCTRL_PWR_POL_BIT; | ||
99 | else | ||
100 | v &= ~MXC_OTG_PHYCTRL_PWR_POL_BIT; | ||
101 | __raw_writel(v, usbother_base + MXC_USB_PHY_CTR_FUNC_OFFSET); | ||
102 | |||
103 | v = __raw_readl(usbother_base + MXC_USBCTRL_OFFSET); | ||
104 | if (flags & MXC_EHCI_WAKEUP_ENABLED) | ||
105 | v |= MXC_OTG_UCTRL_OWIE_BIT;/* OTG wakeup enable */ | ||
106 | else | ||
107 | v &= ~MXC_OTG_UCTRL_OWIE_BIT;/* OTG wakeup disable */ | ||
108 | if (flags & MXC_EHCI_POWER_PINS_ENABLED) | ||
109 | v &= ~MXC_OTG_UCTRL_OPM_BIT; | ||
110 | else | ||
111 | v |= MXC_OTG_UCTRL_OPM_BIT; | ||
112 | __raw_writel(v, usbother_base + MXC_USBCTRL_OFFSET); | ||
113 | } | ||
114 | break; | ||
115 | case 1: /* Host 1 */ | ||
116 | /*Host ULPI */ | ||
117 | v = __raw_readl(usbother_base + MXC_USBCTRL_OFFSET); | ||
118 | if (flags & MXC_EHCI_WAKEUP_ENABLED) { | ||
119 | /* HOST1 wakeup/ULPI intr enable */ | ||
120 | v |= (MXC_H1_UCTRL_H1WIE_BIT | MXC_H1_UCTRL_H1UIE_BIT); | ||
121 | } else { | ||
122 | /* HOST1 wakeup/ULPI intr disable */ | ||
123 | v &= ~(MXC_H1_UCTRL_H1WIE_BIT | MXC_H1_UCTRL_H1UIE_BIT); | ||
124 | } | ||
125 | |||
126 | if (flags & MXC_EHCI_POWER_PINS_ENABLED) | ||
127 | v &= ~MXC_H1_UCTRL_H1PM_BIT; /* HOST1 power mask unused*/ | ||
128 | else | ||
129 | v |= MXC_H1_UCTRL_H1PM_BIT; /* HOST1 power mask used*/ | ||
130 | __raw_writel(v, usbother_base + MXC_USBCTRL_OFFSET); | ||
131 | |||
132 | v = __raw_readl(usbother_base + MXC_USB_PHY_CTR_FUNC_OFFSET); | ||
133 | if (flags & MXC_EHCI_OC_PIN_ACTIVE_LOW) | ||
134 | v |= MXC_H1_OC_POL_BIT; | ||
135 | else | ||
136 | v &= ~MXC_H1_OC_POL_BIT; | ||
137 | if (flags & MXC_EHCI_POWER_PINS_ENABLED) | ||
138 | v &= ~MXC_H1_OC_DIS_BIT; /* OC is used */ | ||
139 | else | ||
140 | v |= MXC_H1_OC_DIS_BIT; /* OC is not used */ | ||
141 | __raw_writel(v, usbother_base + MXC_USB_PHY_CTR_FUNC_OFFSET); | ||
142 | |||
143 | v = __raw_readl(usbotg_base + MXC_USBCMD_OFFSET); | ||
144 | if (flags & MXC_EHCI_ITC_NO_THRESHOLD) | ||
145 | /* Interrupt Threshold Control:Immediate (no threshold) */ | ||
146 | v &= MXC_UCMD_ITC_NO_THRESHOLD_MASK; | ||
147 | __raw_writel(v, usbotg_base + MXC_USBCMD_OFFSET); | ||
148 | break; | ||
149 | case 2: /* Host 2 ULPI */ | ||
150 | v = __raw_readl(usbother_base + MXC_USBH2CTRL_OFFSET); | ||
151 | if (flags & MXC_EHCI_WAKEUP_ENABLED) { | ||
152 | /* HOST1 wakeup/ULPI intr enable */ | ||
153 | v |= (MXC_H2_UCTRL_H2WIE_BIT | MXC_H2_UCTRL_H2UIE_BIT); | ||
154 | } else { | ||
155 | /* HOST1 wakeup/ULPI intr disable */ | ||
156 | v &= ~(MXC_H2_UCTRL_H2WIE_BIT | MXC_H2_UCTRL_H2UIE_BIT); | ||
157 | } | ||
158 | |||
159 | if (flags & MXC_EHCI_POWER_PINS_ENABLED) | ||
160 | v &= ~MXC_H2_UCTRL_H2PM_BIT; /* HOST2 power mask unused*/ | ||
161 | else | ||
162 | v |= MXC_H2_UCTRL_H2PM_BIT; /* HOST2 power mask used*/ | ||
163 | __raw_writel(v, usbother_base + MXC_USBH2CTRL_OFFSET); | ||
164 | break; | ||
165 | } | ||
166 | |||
167 | error: | ||
168 | iounmap(usb_base); | ||
169 | return ret; | ||
170 | } | ||
171 | |||
diff --git a/arch/arm/mach-imx/ehci.h b/arch/arm/mach-imx/ehci.h new file mode 100644 index 000000000000..0e060023db8b --- /dev/null +++ b/arch/arm/mach-imx/ehci.h | |||
@@ -0,0 +1,43 @@ | |||
1 | #ifndef __MACH_IMX_EHCI_H | ||
2 | #define __MACH_IMX_EHCI_H | ||
3 | |||
4 | /* values for portsc field */ | ||
5 | #define MXC_EHCI_PHY_LOW_POWER_SUSPEND (1 << 23) | ||
6 | #define MXC_EHCI_FORCE_FS (1 << 24) | ||
7 | #define MXC_EHCI_UTMI_8BIT (0 << 28) | ||
8 | #define MXC_EHCI_UTMI_16BIT (1 << 28) | ||
9 | #define MXC_EHCI_SERIAL (1 << 29) | ||
10 | #define MXC_EHCI_MODE_UTMI (0 << 30) | ||
11 | #define MXC_EHCI_MODE_PHILIPS (1 << 30) | ||
12 | #define MXC_EHCI_MODE_ULPI (2 << 30) | ||
13 | #define MXC_EHCI_MODE_SERIAL (3 << 30) | ||
14 | |||
15 | /* values for flags field */ | ||
16 | #define MXC_EHCI_INTERFACE_DIFF_UNI (0 << 0) | ||
17 | #define MXC_EHCI_INTERFACE_DIFF_BI (1 << 0) | ||
18 | #define MXC_EHCI_INTERFACE_SINGLE_UNI (2 << 0) | ||
19 | #define MXC_EHCI_INTERFACE_SINGLE_BI (3 << 0) | ||
20 | #define MXC_EHCI_INTERFACE_MASK (0xf) | ||
21 | |||
22 | #define MXC_EHCI_POWER_PINS_ENABLED (1 << 5) | ||
23 | #define MXC_EHCI_PWR_PIN_ACTIVE_HIGH (1 << 6) | ||
24 | #define MXC_EHCI_OC_PIN_ACTIVE_LOW (1 << 7) | ||
25 | #define MXC_EHCI_TTL_ENABLED (1 << 8) | ||
26 | |||
27 | #define MXC_EHCI_INTERNAL_PHY (1 << 9) | ||
28 | #define MXC_EHCI_IPPUE_DOWN (1 << 10) | ||
29 | #define MXC_EHCI_IPPUE_UP (1 << 11) | ||
30 | #define MXC_EHCI_WAKEUP_ENABLED (1 << 12) | ||
31 | #define MXC_EHCI_ITC_NO_THRESHOLD (1 << 13) | ||
32 | |||
33 | #define MXC_USBCTRL_OFFSET 0 | ||
34 | #define MXC_USB_PHY_CTR_FUNC_OFFSET 0x8 | ||
35 | #define MXC_USB_PHY_CTR_FUNC2_OFFSET 0xc | ||
36 | #define MXC_USBH2CTRL_OFFSET 0x14 | ||
37 | |||
38 | int mx25_initialize_usb_hw(int port, unsigned int flags); | ||
39 | int mx31_initialize_usb_hw(int port, unsigned int flags); | ||
40 | int mx35_initialize_usb_hw(int port, unsigned int flags); | ||
41 | int mx27_initialize_usb_hw(int port, unsigned int flags); | ||
42 | |||
43 | #endif /* __MACH_IMX_EHCI_H */ | ||
diff --git a/arch/arm/mach-imx/gpc.c b/arch/arm/mach-imx/gpc.c index 586e0171a652..82ea74e68482 100644 --- a/arch/arm/mach-imx/gpc.c +++ b/arch/arm/mach-imx/gpc.c | |||
@@ -27,13 +27,14 @@ static void __iomem *gpc_base; | |||
27 | static u32 gpc_wake_irqs[IMR_NUM]; | 27 | static u32 gpc_wake_irqs[IMR_NUM]; |
28 | static u32 gpc_saved_imrs[IMR_NUM]; | 28 | static u32 gpc_saved_imrs[IMR_NUM]; |
29 | 29 | ||
30 | void imx_gpc_pre_suspend(void) | 30 | void imx_gpc_pre_suspend(bool arm_power_off) |
31 | { | 31 | { |
32 | void __iomem *reg_imr1 = gpc_base + GPC_IMR1; | 32 | void __iomem *reg_imr1 = gpc_base + GPC_IMR1; |
33 | int i; | 33 | int i; |
34 | 34 | ||
35 | /* Tell GPC to power off ARM core when suspend */ | 35 | /* Tell GPC to power off ARM core when suspend */ |
36 | writel_relaxed(0x1, gpc_base + GPC_PGC_CPU_PDN); | 36 | if (arm_power_off) |
37 | writel_relaxed(0x1, gpc_base + GPC_PGC_CPU_PDN); | ||
37 | 38 | ||
38 | for (i = 0; i < IMR_NUM; i++) { | 39 | for (i = 0; i < IMR_NUM; i++) { |
39 | gpc_saved_imrs[i] = readl_relaxed(reg_imr1 + i * 4); | 40 | gpc_saved_imrs[i] = readl_relaxed(reg_imr1 + i * 4); |
diff --git a/arch/arm/mach-imx/hardware.h b/arch/arm/mach-imx/hardware.h index abf43bb47eca..66b2b564c463 100644 --- a/arch/arm/mach-imx/hardware.h +++ b/arch/arm/mach-imx/hardware.h | |||
@@ -105,8 +105,6 @@ | |||
105 | 105 | ||
106 | #include "mxc.h" | 106 | #include "mxc.h" |
107 | 107 | ||
108 | #include "mx51.h" | ||
109 | #include "mx53.h" | ||
110 | #include "mx3x.h" | 108 | #include "mx3x.h" |
111 | #include "mx31.h" | 109 | #include "mx31.h" |
112 | #include "mx35.h" | 110 | #include "mx35.h" |
diff --git a/arch/arm/mach-imx/imx25-dt.c b/arch/arm/mach-imx/imx25-dt.c index 42a65e067443..cf8032bae277 100644 --- a/arch/arm/mach-imx/imx25-dt.c +++ b/arch/arm/mach-imx/imx25-dt.c | |||
@@ -29,16 +29,10 @@ static const char * const imx25_dt_board_compat[] __initconst = { | |||
29 | NULL | 29 | NULL |
30 | }; | 30 | }; |
31 | 31 | ||
32 | static void __init imx25_timer_init(void) | ||
33 | { | ||
34 | mx25_clocks_init_dt(); | ||
35 | } | ||
36 | |||
37 | DT_MACHINE_START(IMX25_DT, "Freescale i.MX25 (Device Tree Support)") | 32 | DT_MACHINE_START(IMX25_DT, "Freescale i.MX25 (Device Tree Support)") |
38 | .map_io = mx25_map_io, | 33 | .map_io = mx25_map_io, |
39 | .init_early = imx25_init_early, | 34 | .init_early = imx25_init_early, |
40 | .init_irq = mx25_init_irq, | 35 | .init_irq = mx25_init_irq, |
41 | .init_time = imx25_timer_init, | ||
42 | .init_machine = imx25_dt_init, | 36 | .init_machine = imx25_dt_init, |
43 | .dt_compat = imx25_dt_board_compat, | 37 | .dt_compat = imx25_dt_board_compat, |
44 | .restart = mxc_restart, | 38 | .restart = mxc_restart, |
diff --git a/arch/arm/mach-imx/imx27-dt.c b/arch/arm/mach-imx/imx27-dt.c index 17bd4058133d..080e66c6a1d0 100644 --- a/arch/arm/mach-imx/imx27-dt.c +++ b/arch/arm/mach-imx/imx27-dt.c | |||
@@ -34,16 +34,10 @@ static const char * const imx27_dt_board_compat[] __initconst = { | |||
34 | NULL | 34 | NULL |
35 | }; | 35 | }; |
36 | 36 | ||
37 | static void __init imx27_timer_init(void) | ||
38 | { | ||
39 | mx27_clocks_init_dt(); | ||
40 | } | ||
41 | |||
42 | DT_MACHINE_START(IMX27_DT, "Freescale i.MX27 (Device Tree Support)") | 37 | DT_MACHINE_START(IMX27_DT, "Freescale i.MX27 (Device Tree Support)") |
43 | .map_io = mx27_map_io, | 38 | .map_io = mx27_map_io, |
44 | .init_early = imx27_init_early, | 39 | .init_early = imx27_init_early, |
45 | .init_irq = mx27_init_irq, | 40 | .init_irq = mx27_init_irq, |
46 | .init_time = imx27_timer_init, | ||
47 | .init_machine = imx27_dt_init, | 41 | .init_machine = imx27_dt_init, |
48 | .dt_compat = imx27_dt_board_compat, | 42 | .dt_compat = imx27_dt_board_compat, |
49 | .restart = mxc_restart, | 43 | .restart = mxc_restart, |
diff --git a/arch/arm/mach-imx/imx31-dt.c b/arch/arm/mach-imx/imx31-dt.c index 581f4d6c9b8a..418dbc82adc4 100644 --- a/arch/arm/mach-imx/imx31-dt.c +++ b/arch/arm/mach-imx/imx31-dt.c | |||
@@ -25,7 +25,7 @@ static void __init imx31_dt_init(void) | |||
25 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | 25 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
26 | } | 26 | } |
27 | 27 | ||
28 | static const char *imx31_dt_board_compat[] __initconst = { | 28 | static const char * const imx31_dt_board_compat[] __initconst = { |
29 | "fsl,imx31", | 29 | "fsl,imx31", |
30 | NULL | 30 | NULL |
31 | }; | 31 | }; |
diff --git a/arch/arm/mach-imx/imx35-dt.c b/arch/arm/mach-imx/imx35-dt.c index a62854c59240..584fbe105579 100644 --- a/arch/arm/mach-imx/imx35-dt.c +++ b/arch/arm/mach-imx/imx35-dt.c | |||
@@ -34,7 +34,7 @@ static void __init imx35_irq_init(void) | |||
34 | mx35_init_irq(); | 34 | mx35_init_irq(); |
35 | } | 35 | } |
36 | 36 | ||
37 | static const char *imx35_dt_board_compat[] __initconst = { | 37 | static const char * const imx35_dt_board_compat[] __initconst = { |
38 | "fsl,imx35", | 38 | "fsl,imx35", |
39 | NULL | 39 | NULL |
40 | }; | 40 | }; |
diff --git a/arch/arm/mach-imx/iomux-mx51.h b/arch/arm/mach-imx/iomux-mx51.h deleted file mode 100644 index 75bbcc4aa2d2..000000000000 --- a/arch/arm/mach-imx/iomux-mx51.h +++ /dev/null | |||
@@ -1,827 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2009-2010 Amit Kucheria <amit.kucheria@canonical.com> | ||
3 | * Copyright (C) 2010 Freescale Semiconductor, Inc. | ||
4 | * | ||
5 | * The code contained herein is licensed under the GNU General Public | ||
6 | * License. You may obtain a copy of the GNU General Public License | ||
7 | * Version 2 or later at the following locations: | ||
8 | * | ||
9 | * http://www.opensource.org/licenses/gpl-license.html | ||
10 | * http://www.gnu.org/copyleft/gpl.html | ||
11 | */ | ||
12 | |||
13 | #ifndef __MACH_IOMUX_MX51_H__ | ||
14 | #define __MACH_IOMUX_MX51_H__ | ||
15 | |||
16 | #include "iomux-v3.h" | ||
17 | #define __NA_ 0x000 | ||
18 | |||
19 | |||
20 | /* Pad control groupings */ | ||
21 | #define MX51_UART_PAD_CTRL (PAD_CTL_PKE | PAD_CTL_PUE | PAD_CTL_DSE_HIGH | \ | ||
22 | PAD_CTL_HYS | PAD_CTL_SRE_FAST) | ||
23 | #define MX51_I2C_PAD_CTRL (PAD_CTL_SRE_FAST | PAD_CTL_ODE | \ | ||
24 | PAD_CTL_DSE_HIGH | PAD_CTL_PUS_100K_UP | \ | ||
25 | PAD_CTL_HYS) | ||
26 | #define MX51_ESDHC_PAD_CTRL (PAD_CTL_SRE_FAST | PAD_CTL_ODE | \ | ||
27 | PAD_CTL_DSE_HIGH | PAD_CTL_PUS_100K_UP | \ | ||
28 | PAD_CTL_HYS) | ||
29 | #define MX51_USBH1_PAD_CTRL (PAD_CTL_PKE | PAD_CTL_SRE_FAST | \ | ||
30 | PAD_CTL_DSE_HIGH | PAD_CTL_PUS_100K_UP | \ | ||
31 | PAD_CTL_HYS | PAD_CTL_PUE) | ||
32 | #define MX51_ECSPI_PAD_CTRL (PAD_CTL_PKE | PAD_CTL_HYS | \ | ||
33 | PAD_CTL_DSE_HIGH | PAD_CTL_SRE_FAST) | ||
34 | #define MX51_SDHCI_PAD_CTRL (PAD_CTL_PKE | PAD_CTL_DSE_HIGH | \ | ||
35 | PAD_CTL_PUS_47K_UP | PAD_CTL_PUE | \ | ||
36 | PAD_CTL_SRE_FAST | PAD_CTL_DVS) | ||
37 | #define MX51_GPIO_PAD_CTRL (PAD_CTL_DSE_HIGH | PAD_CTL_PKE | PAD_CTL_SRE_FAST) | ||
38 | |||
39 | #define MX51_PAD_CTRL_2 (PAD_CTL_PKE | PAD_CTL_HYS) | ||
40 | #define MX51_PAD_CTRL_3 (PAD_CTL_PKE | PAD_CTL_PUS_100K_UP) | ||
41 | #define MX51_PAD_CTRL_4 (PAD_CTL_PKE | PAD_CTL_DVS | PAD_CTL_HYS) | ||
42 | #define MX51_PAD_CTRL_5 (PAD_CTL_DVS | PAD_CTL_DSE_HIGH) | ||
43 | |||
44 | /* | ||
45 | * The naming convention for the pad modes is MX51_PAD_<padname>__<padmode> | ||
46 | * If <padname> or <padmode> refers to a GPIO, it is named GPIO<unit>_<num> | ||
47 | * See also iomux-v3.h | ||
48 | */ | ||
49 | |||
50 | /* Raw pin modes without pad control */ | ||
51 | /* PAD MUX ALT INPSE PATH PADCTRL */ | ||
52 | |||
53 | /* The same pins as above but with the default pad control values applied */ | ||
54 | #define MX51_PAD_EIM_D16__AUD4_RXFS IOMUX_PAD(0x3f0, 0x05c, 5, __NA_, 0, NO_PAD_CTRL) | ||
55 | #define MX51_PAD_EIM_D16__AUD5_TXD IOMUX_PAD(0x3f0, 0x05c, 7, 0x8d8, 0, NO_PAD_CTRL) | ||
56 | #define MX51_PAD_EIM_D16__EIM_D16 IOMUX_PAD(0x3f0, 0x05c, 0, __NA_, 0, NO_PAD_CTRL) | ||
57 | #define MX51_PAD_EIM_D16__GPIO2_0 IOMUX_PAD(0x3f0, 0x05c, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
58 | #define MX51_PAD_EIM_D16__I2C1_SDA IOMUX_PAD(0x3f0, 0x05c, 0x14, 0x9b4, 0, MX51_I2C_PAD_CTRL) | ||
59 | #define MX51_PAD_EIM_D16__UART2_CTS IOMUX_PAD(0x3f0, 0x05c, 3, __NA_, 0, MX51_UART_PAD_CTRL) | ||
60 | #define MX51_PAD_EIM_D16__USBH2_DATA0 IOMUX_PAD(0x3f0, 0x05c, 2, __NA_, 0, NO_PAD_CTRL) | ||
61 | #define MX51_PAD_EIM_D17__AUD5_RXD IOMUX_PAD(0x3f4, 0x060, 7, 0x8d4, 0, NO_PAD_CTRL) | ||
62 | #define MX51_PAD_EIM_D17__EIM_D17 IOMUX_PAD(0x3f4, 0x060, 0, __NA_, 0, NO_PAD_CTRL) | ||
63 | #define MX51_PAD_EIM_D17__GPIO2_1 IOMUX_PAD(0x3f4, 0x060, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
64 | #define MX51_PAD_EIM_D17__UART2_RXD IOMUX_PAD(0x3f4, 0x060, 3, 0x9ec, 0, MX51_UART_PAD_CTRL) | ||
65 | #define MX51_PAD_EIM_D17__UART3_CTS IOMUX_PAD(0x3f4, 0x060, 4, __NA_, 0, MX51_UART_PAD_CTRL) | ||
66 | #define MX51_PAD_EIM_D17__USBH2_DATA1 IOMUX_PAD(0x3f4, 0x060, 2, __NA_, 0, NO_PAD_CTRL) | ||
67 | #define MX51_PAD_EIM_D18__AUD5_TXC IOMUX_PAD(0x3f8, 0x064, 7, 0x8e4, 0, NO_PAD_CTRL) | ||
68 | #define MX51_PAD_EIM_D18__EIM_D18 IOMUX_PAD(0x3f8, 0x064, 0, __NA_, 0, NO_PAD_CTRL) | ||
69 | #define MX51_PAD_EIM_D18__GPIO2_2 IOMUX_PAD(0x3f8, 0x064, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
70 | #define MX51_PAD_EIM_D18__UART2_TXD IOMUX_PAD(0x3f8, 0x064, 3, __NA_, 0, MX51_UART_PAD_CTRL) | ||
71 | #define MX51_PAD_EIM_D18__UART3_RTS IOMUX_PAD(0x3f8, 0x064, 4, 0x9f0, 1, MX51_UART_PAD_CTRL) | ||
72 | #define MX51_PAD_EIM_D18__USBH2_DATA2 IOMUX_PAD(0x3f8, 0x064, 2, __NA_, 0, NO_PAD_CTRL) | ||
73 | #define MX51_PAD_EIM_D19__AUD4_RXC IOMUX_PAD(0x3fc, 0x068, 5, __NA_, 0, NO_PAD_CTRL) | ||
74 | #define MX51_PAD_EIM_D19__AUD5_TXFS IOMUX_PAD(0x3fc, 0x068, 7, 0x8e8, 0, NO_PAD_CTRL) | ||
75 | #define MX51_PAD_EIM_D19__EIM_D19 IOMUX_PAD(0x3fc, 0x068, 0, __NA_, 0, NO_PAD_CTRL) | ||
76 | #define MX51_PAD_EIM_D19__GPIO2_3 IOMUX_PAD(0x3fc, 0x068, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
77 | #define MX51_PAD_EIM_D19__I2C1_SCL IOMUX_PAD(0x3fc, 0x068, 0x14, 0x9b0, 0, MX51_I2C_PAD_CTRL) | ||
78 | #define MX51_PAD_EIM_D19__UART2_RTS IOMUX_PAD(0x3fc, 0x068, 3, 0x9e8, 1, MX51_UART_PAD_CTRL) | ||
79 | #define MX51_PAD_EIM_D19__USBH2_DATA3 IOMUX_PAD(0x3fc, 0x068, 2, __NA_, 0, NO_PAD_CTRL) | ||
80 | #define MX51_PAD_EIM_D20__AUD4_TXD IOMUX_PAD(0x400, 0x06c, 5, 0x8c8, 0, NO_PAD_CTRL) | ||
81 | #define MX51_PAD_EIM_D20__EIM_D20 IOMUX_PAD(0x400, 0x06c, 0, __NA_, 0, NO_PAD_CTRL) | ||
82 | #define MX51_PAD_EIM_D20__GPIO2_4 IOMUX_PAD(0x400, 0x06c, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
83 | #define MX51_PAD_EIM_D20__SRTC_ALARM_DEB IOMUX_PAD(0x400, 0x06c, 4, __NA_, 0, NO_PAD_CTRL) | ||
84 | #define MX51_PAD_EIM_D20__USBH2_DATA4 IOMUX_PAD(0x400, 0x06c, 2, __NA_, 0, NO_PAD_CTRL) | ||
85 | #define MX51_PAD_EIM_D21__AUD4_RXD IOMUX_PAD(0x404, 0x070, 5, 0x8c4, 0, NO_PAD_CTRL) | ||
86 | #define MX51_PAD_EIM_D21__EIM_D21 IOMUX_PAD(0x404, 0x070, 0, __NA_, 0, NO_PAD_CTRL) | ||
87 | #define MX51_PAD_EIM_D21__GPIO2_5 IOMUX_PAD(0x404, 0x070, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
88 | #define MX51_PAD_EIM_D21__SRTC_ALARM_DEB IOMUX_PAD(0x404, 0x070, 3, __NA_, 0, NO_PAD_CTRL) | ||
89 | #define MX51_PAD_EIM_D21__USBH2_DATA5 IOMUX_PAD(0x404, 0x070, 2, __NA_, 0, NO_PAD_CTRL) | ||
90 | #define MX51_PAD_EIM_D22__AUD4_TXC IOMUX_PAD(0x408, 0x074, 5, 0x8cc, 0, NO_PAD_CTRL) | ||
91 | #define MX51_PAD_EIM_D22__EIM_D22 IOMUX_PAD(0x408, 0x074, 0, __NA_, 0, NO_PAD_CTRL) | ||
92 | #define MX51_PAD_EIM_D22__GPIO2_6 IOMUX_PAD(0x408, 0x074, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
93 | #define MX51_PAD_EIM_D22__USBH2_DATA6 IOMUX_PAD(0x408, 0x074, 2, __NA_, 0, NO_PAD_CTRL) | ||
94 | #define MX51_PAD_EIM_D23__AUD4_TXFS IOMUX_PAD(0x40c, 0x078, 5, 0x8d0, 0, NO_PAD_CTRL) | ||
95 | #define MX51_PAD_EIM_D23__EIM_D23 IOMUX_PAD(0x40c, 0x078, 0, __NA_, 0, NO_PAD_CTRL) | ||
96 | #define MX51_PAD_EIM_D23__GPIO2_7 IOMUX_PAD(0x40c, 0x078, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
97 | #define MX51_PAD_EIM_D23__SPDIF_OUT1 IOMUX_PAD(0x40c, 0x078, 4, __NA_, 0, NO_PAD_CTRL) | ||
98 | #define MX51_PAD_EIM_D23__USBH2_DATA7 IOMUX_PAD(0x40c, 0x078, 2, __NA_, 0, NO_PAD_CTRL) | ||
99 | #define MX51_PAD_EIM_D24__AUD6_RXFS IOMUX_PAD(0x410, 0x07c, 5, 0x8f8, 0, NO_PAD_CTRL) | ||
100 | #define MX51_PAD_EIM_D24__EIM_D24 IOMUX_PAD(0x410, 0x07c, 0, __NA_, 0, NO_PAD_CTRL) | ||
101 | #define MX51_PAD_EIM_D24__GPIO2_8 IOMUX_PAD(0x410, 0x07c, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
102 | #define MX51_PAD_EIM_D24__I2C2_SDA IOMUX_PAD(0x410, 0x07c, 0x14, 0x9bc, 0, MX51_I2C_PAD_CTRL) | ||
103 | #define MX51_PAD_EIM_D24__UART3_CTS IOMUX_PAD(0x410, 0x07c, 3, __NA_, 0, MX51_UART_PAD_CTRL) | ||
104 | #define MX51_PAD_EIM_D24__USBOTG_DATA0 IOMUX_PAD(0x410, 0x07c, 2, __NA_, 0, NO_PAD_CTRL) | ||
105 | #define MX51_PAD_EIM_D25__EIM_D25 IOMUX_PAD(0x414, 0x080, 0, __NA_, 0, NO_PAD_CTRL) | ||
106 | #define MX51_PAD_EIM_D25__KEY_COL6 IOMUX_PAD(0x414, 0x080, 1, 0x9c8, 0, NO_PAD_CTRL) | ||
107 | #define MX51_PAD_EIM_D25__UART2_CTS IOMUX_PAD(0x414, 0x080, 4, __NA_, 0, MX51_UART_PAD_CTRL) | ||
108 | #define MX51_PAD_EIM_D25__UART3_RXD IOMUX_PAD(0x414, 0x080, 3, 0x9f4, 0, MX51_UART_PAD_CTRL) | ||
109 | #define MX51_PAD_EIM_D25__USBOTG_DATA1 IOMUX_PAD(0x414, 0x080, 2, __NA_, 0, NO_PAD_CTRL) | ||
110 | #define MX51_PAD_EIM_D25__GPT_CMPOUT1 IOMUX_PAD(0x414, 0x080, 5, __NA_, 0, NO_PAD_CTRL) | ||
111 | #define MX51_PAD_EIM_D26__EIM_D26 IOMUX_PAD(0x418, 0x084, 0, __NA_, 0, NO_PAD_CTRL) | ||
112 | #define MX51_PAD_EIM_D26__KEY_COL7 IOMUX_PAD(0x418, 0x084, 1, 0x9cc, 0, NO_PAD_CTRL) | ||
113 | #define MX51_PAD_EIM_D26__UART2_RTS IOMUX_PAD(0x418, 0x084, 4, 0x9e8, 3, MX51_UART_PAD_CTRL) | ||
114 | #define MX51_PAD_EIM_D26__UART3_TXD IOMUX_PAD(0x418, 0x084, 3, __NA_, 0, MX51_UART_PAD_CTRL) | ||
115 | #define MX51_PAD_EIM_D26__USBOTG_DATA2 IOMUX_PAD(0x418, 0x084, 2, __NA_, 0, NO_PAD_CTRL) | ||
116 | #define MX51_PAD_EIM_D26__GPT_CMPOUT2 IOMUX_PAD(0x418, 0x084, 5, __NA_, 0, NO_PAD_CTRL) | ||
117 | #define MX51_PAD_EIM_D27__AUD6_RXC IOMUX_PAD(0x41c, 0x088, 5, 0x8f4, 0, NO_PAD_CTRL) | ||
118 | #define MX51_PAD_EIM_D27__EIM_D27 IOMUX_PAD(0x41c, 0x088, 0, __NA_, 0, NO_PAD_CTRL) | ||
119 | #define MX51_PAD_EIM_D27__GPIO2_9 IOMUX_PAD(0x41c, 0x088, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
120 | #define MX51_PAD_EIM_D27__I2C2_SCL IOMUX_PAD(0x41c, 0x088, 0x14, 0x9b8, 0, MX51_I2C_PAD_CTRL) | ||
121 | #define MX51_PAD_EIM_D27__UART3_RTS IOMUX_PAD(0x41c, 0x088, 3, 0x9f0, 3, MX51_UART_PAD_CTRL) | ||
122 | #define MX51_PAD_EIM_D27__USBOTG_DATA3 IOMUX_PAD(0x41c, 0x088, 2, __NA_, 0, NO_PAD_CTRL) | ||
123 | #define MX51_PAD_EIM_D28__AUD6_TXD IOMUX_PAD(0x420, 0x08c, 5, 0x8f0, 0, NO_PAD_CTRL) | ||
124 | #define MX51_PAD_EIM_D28__EIM_D28 IOMUX_PAD(0x420, 0x08c, 0, __NA_, 0, NO_PAD_CTRL) | ||
125 | #define MX51_PAD_EIM_D28__KEY_ROW4 IOMUX_PAD(0x420, 0x08c, 1, 0x9d0, 0, NO_PAD_CTRL) | ||
126 | #define MX51_PAD_EIM_D28__USBOTG_DATA4 IOMUX_PAD(0x420, 0x08c, 2, __NA_, 0, NO_PAD_CTRL) | ||
127 | #define MX51_PAD_EIM_D29__AUD6_RXD IOMUX_PAD(0x424, 0x090, 5, 0x8ec, 0, NO_PAD_CTRL) | ||
128 | #define MX51_PAD_EIM_D29__EIM_D29 IOMUX_PAD(0x424, 0x090, 0, __NA_, 0, NO_PAD_CTRL) | ||
129 | #define MX51_PAD_EIM_D29__KEY_ROW5 IOMUX_PAD(0x424, 0x090, 1, 0x9d4, 0, NO_PAD_CTRL) | ||
130 | #define MX51_PAD_EIM_D29__USBOTG_DATA5 IOMUX_PAD(0x424, 0x090, 2, __NA_, 0, NO_PAD_CTRL) | ||
131 | #define MX51_PAD_EIM_D30__AUD6_TXC IOMUX_PAD(0x428, 0x094, 5, 0x8fc, 0, NO_PAD_CTRL) | ||
132 | #define MX51_PAD_EIM_D30__EIM_D30 IOMUX_PAD(0x428, 0x094, 0, __NA_, 0, NO_PAD_CTRL) | ||
133 | #define MX51_PAD_EIM_D30__KEY_ROW6 IOMUX_PAD(0x428, 0x094, 1, 0x9d8, 0, NO_PAD_CTRL) | ||
134 | #define MX51_PAD_EIM_D30__USBOTG_DATA6 IOMUX_PAD(0x428, 0x094, 2, __NA_, 0, NO_PAD_CTRL) | ||
135 | #define MX51_PAD_EIM_D31__AUD6_TXFS IOMUX_PAD(0x42c, 0x098, 5, 0x900, 0, NO_PAD_CTRL) | ||
136 | #define MX51_PAD_EIM_D31__EIM_D31 IOMUX_PAD(0x42c, 0x098, 0, __NA_, 0, NO_PAD_CTRL) | ||
137 | #define MX51_PAD_EIM_D31__KEY_ROW7 IOMUX_PAD(0x42c, 0x098, 1, 0x9dc, 0, NO_PAD_CTRL) | ||
138 | #define MX51_PAD_EIM_D31__USBOTG_DATA7 IOMUX_PAD(0x42c, 0x098, 2, __NA_, 0, NO_PAD_CTRL) | ||
139 | #define MX51_PAD_EIM_A16__EIM_A16 IOMUX_PAD(0x430, 0x09c, 0, __NA_, 0, NO_PAD_CTRL) | ||
140 | #define MX51_PAD_EIM_A16__GPIO2_10 IOMUX_PAD(0x430, 0x09c, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
141 | #define MX51_PAD_EIM_A16__OSC_FREQ_SEL0 IOMUX_PAD(0x430, 0x09c, 7, __NA_, 0, NO_PAD_CTRL) | ||
142 | #define MX51_PAD_EIM_A17__EIM_A17 IOMUX_PAD(0x434, 0x0a0, 0, __NA_, 0, NO_PAD_CTRL) | ||
143 | #define MX51_PAD_EIM_A17__GPIO2_11 IOMUX_PAD(0x434, 0x0a0, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
144 | #define MX51_PAD_EIM_A17__OSC_FREQ_SEL1 IOMUX_PAD(0x434, 0x0a0, 7, __NA_, 0, NO_PAD_CTRL) | ||
145 | #define MX51_PAD_EIM_A18__BOOT_LPB0 IOMUX_PAD(0x438, 0x0a4, 7, __NA_, 0, NO_PAD_CTRL) | ||
146 | #define MX51_PAD_EIM_A18__EIM_A18 IOMUX_PAD(0x438, 0x0a4, 0, __NA_, 0, NO_PAD_CTRL) | ||
147 | #define MX51_PAD_EIM_A18__GPIO2_12 IOMUX_PAD(0x438, 0x0a4, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
148 | #define MX51_PAD_EIM_A19__BOOT_LPB1 IOMUX_PAD(0x43c, 0x0a8, 7, __NA_, 0, NO_PAD_CTRL) | ||
149 | #define MX51_PAD_EIM_A19__EIM_A19 IOMUX_PAD(0x43c, 0x0a8, 0, __NA_, 0, NO_PAD_CTRL) | ||
150 | #define MX51_PAD_EIM_A19__GPIO2_13 IOMUX_PAD(0x43c, 0x0a8, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
151 | #define MX51_PAD_EIM_A20__BOOT_UART_SRC0 IOMUX_PAD(0x440, 0x0ac, 7, __NA_, 0, NO_PAD_CTRL) | ||
152 | #define MX51_PAD_EIM_A20__EIM_A20 IOMUX_PAD(0x440, 0x0ac, 0, __NA_, 0, NO_PAD_CTRL) | ||
153 | #define MX51_PAD_EIM_A20__GPIO2_14 IOMUX_PAD(0x440, 0x0ac, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
154 | #define MX51_PAD_EIM_A21__BOOT_UART_SRC1 IOMUX_PAD(0x444, 0x0b0, 7, __NA_, 0, NO_PAD_CTRL) | ||
155 | #define MX51_PAD_EIM_A21__EIM_A21 IOMUX_PAD(0x444, 0x0b0, 0, __NA_, 0, NO_PAD_CTRL) | ||
156 | #define MX51_PAD_EIM_A21__GPIO2_15 IOMUX_PAD(0x444, 0x0b0, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
157 | #define MX51_PAD_EIM_A22__EIM_A22 IOMUX_PAD(0x448, 0x0b4, 0, __NA_, 0, NO_PAD_CTRL) | ||
158 | #define MX51_PAD_EIM_A22__GPIO2_16 IOMUX_PAD(0x448, 0x0b4, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
159 | #define MX51_PAD_EIM_A23__BOOT_HPN_EN IOMUX_PAD(0x44c, 0x0b8, 7, __NA_, 0, NO_PAD_CTRL) | ||
160 | #define MX51_PAD_EIM_A23__EIM_A23 IOMUX_PAD(0x44c, 0x0b8, 0, __NA_, 0, NO_PAD_CTRL) | ||
161 | #define MX51_PAD_EIM_A23__GPIO2_17 IOMUX_PAD(0x44c, 0x0b8, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
162 | #define MX51_PAD_EIM_A24__EIM_A24 IOMUX_PAD(0x450, 0x0bc, 0, __NA_, 0, NO_PAD_CTRL) | ||
163 | #define MX51_PAD_EIM_A24__GPIO2_18 IOMUX_PAD(0x450, 0x0bc, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
164 | #define MX51_PAD_EIM_A24__USBH2_CLK IOMUX_PAD(0x450, 0x0bc, 2, __NA_, 0, NO_PAD_CTRL) | ||
165 | #define MX51_PAD_EIM_A25__DISP1_PIN4 IOMUX_PAD(0x454, 0x0c0, 6, __NA_, 0, NO_PAD_CTRL) | ||
166 | #define MX51_PAD_EIM_A25__EIM_A25 IOMUX_PAD(0x454, 0x0c0, 0, __NA_, 0, NO_PAD_CTRL) | ||
167 | #define MX51_PAD_EIM_A25__GPIO2_19 IOMUX_PAD(0x454, 0x0c0, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
168 | #define MX51_PAD_EIM_A25__USBH2_DIR IOMUX_PAD(0x454, 0x0c0, 2, __NA_, 0, NO_PAD_CTRL) | ||
169 | #define MX51_PAD_EIM_A26__CSI1_DATA_EN IOMUX_PAD(0x458, 0x0c4, 5, 0x9a0, 0, NO_PAD_CTRL) | ||
170 | #define MX51_PAD_EIM_A26__DISP2_EXT_CLK IOMUX_PAD(0x458, 0x0c4, 6, 0x908, 0, NO_PAD_CTRL) | ||
171 | #define MX51_PAD_EIM_A26__EIM_A26 IOMUX_PAD(0x458, 0x0c4, 0, __NA_, 0, NO_PAD_CTRL) | ||
172 | #define MX51_PAD_EIM_A26__GPIO2_20 IOMUX_PAD(0x458, 0x0c4, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
173 | #define MX51_PAD_EIM_A26__USBH2_STP IOMUX_PAD(0x458, 0x0c4, 2, __NA_, 0, NO_PAD_CTRL) | ||
174 | #define MX51_PAD_EIM_A27__CSI2_DATA_EN IOMUX_PAD(0x45c, 0x0c8, 5, 0x99c, 0, NO_PAD_CTRL) | ||
175 | #define MX51_PAD_EIM_A27__DISP1_PIN1 IOMUX_PAD(0x45c, 0x0c8, 6, 0x9a4, 0, NO_PAD_CTRL) | ||
176 | #define MX51_PAD_EIM_A27__EIM_A27 IOMUX_PAD(0x45c, 0x0c8, 0, __NA_, 0, NO_PAD_CTRL) | ||
177 | #define MX51_PAD_EIM_A27__GPIO2_21 IOMUX_PAD(0x45c, 0x0c8, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
178 | #define MX51_PAD_EIM_A27__USBH2_NXT IOMUX_PAD(0x45c, 0x0c8, 2, __NA_, 0, NO_PAD_CTRL) | ||
179 | #define MX51_PAD_EIM_EB0__EIM_EB0 IOMUX_PAD(0x460, 0x0cc, 0, __NA_, 0, NO_PAD_CTRL) | ||
180 | #define MX51_PAD_EIM_EB1__EIM_EB1 IOMUX_PAD(0x464, 0x0d0, 0, __NA_, 0, NO_PAD_CTRL) | ||
181 | #define MX51_PAD_EIM_EB2__AUD5_RXFS IOMUX_PAD(0x468, 0x0d4, 6, 0x8e0, 0, NO_PAD_CTRL) | ||
182 | #define MX51_PAD_EIM_EB2__CSI1_D2 IOMUX_PAD(0x468, 0x0d4, 5, __NA_, 0, NO_PAD_CTRL) | ||
183 | #define MX51_PAD_EIM_EB2__EIM_EB2 IOMUX_PAD(0x468, 0x0d4, 0, __NA_, 0, NO_PAD_CTRL) | ||
184 | #define MX51_PAD_EIM_EB2__FEC_MDIO (IOMUX_PAD(0x468, 0x0d4, 3, 0x954, 0, 0) | \ | ||
185 | MUX_PAD_CTRL(PAD_CTL_PUS_22K_UP | PAD_CTL_PKE | PAD_CTL_SRE_FAST | \ | ||
186 | PAD_CTL_DSE_HIGH | PAD_CTL_PUE | PAD_CTL_HYS)) | ||
187 | #define MX51_PAD_EIM_EB2__GPIO2_22 IOMUX_PAD(0x468, 0x0d4, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
188 | #define MX51_PAD_EIM_EB2__GPT_CMPOUT1 IOMUX_PAD(0x468, 0x0d4, 7, __NA_, 0, NO_PAD_CTRL) | ||
189 | #define MX51_PAD_EIM_EB3__AUD5_RXC IOMUX_PAD(0x46c, 0x0d8, 6, 0x8dc, 0, NO_PAD_CTRL) | ||
190 | #define MX51_PAD_EIM_EB3__CSI1_D3 IOMUX_PAD(0x46c, 0x0d8, 5, __NA_, 0, NO_PAD_CTRL) | ||
191 | #define MX51_PAD_EIM_EB3__EIM_EB3 IOMUX_PAD(0x46c, 0x0d8, 0, __NA_, 0, NO_PAD_CTRL) | ||
192 | #define MX51_PAD_EIM_EB3__FEC_RDATA1 IOMUX_PAD(0x46c, 0x0d8, 3, 0x95c, 0, NO_PAD_CTRL) | ||
193 | #define MX51_PAD_EIM_EB3__GPIO2_23 IOMUX_PAD(0x46c, 0x0d8, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
194 | #define MX51_PAD_EIM_EB3__GPT_CMPOUT2 IOMUX_PAD(0x46c, 0x0d8, 7, __NA_, 0, NO_PAD_CTRL) | ||
195 | #define MX51_PAD_EIM_OE__EIM_OE IOMUX_PAD(0x470, 0x0dc, 0, __NA_, 0, NO_PAD_CTRL) | ||
196 | #define MX51_PAD_EIM_OE__GPIO2_24 IOMUX_PAD(0x470, 0x0dc, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
197 | #define MX51_PAD_EIM_CS0__EIM_CS0 IOMUX_PAD(0x474, 0x0e0, 0, __NA_, 0, NO_PAD_CTRL) | ||
198 | #define MX51_PAD_EIM_CS0__GPIO2_25 IOMUX_PAD(0x474, 0x0e0, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
199 | #define MX51_PAD_EIM_CS1__EIM_CS1 IOMUX_PAD(0x478, 0x0e4, 0, __NA_, 0, NO_PAD_CTRL) | ||
200 | #define MX51_PAD_EIM_CS1__GPIO2_26 IOMUX_PAD(0x478, 0x0e4, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
201 | #define MX51_PAD_EIM_CS2__AUD5_TXD IOMUX_PAD(0x47c, 0x0e8, 6, 0x8d8, 1, NO_PAD_CTRL) | ||
202 | #define MX51_PAD_EIM_CS2__CSI1_D4 IOMUX_PAD(0x47c, 0x0e8, 5, __NA_, 0, NO_PAD_CTRL) | ||
203 | #define MX51_PAD_EIM_CS2__EIM_CS2 IOMUX_PAD(0x47c, 0x0e8, 0, __NA_, 0, NO_PAD_CTRL) | ||
204 | #define MX51_PAD_EIM_CS2__FEC_RDATA2 IOMUX_PAD(0x47c, 0x0e8, 3, 0x960, 0, NO_PAD_CTRL) | ||
205 | #define MX51_PAD_EIM_CS2__GPIO2_27 IOMUX_PAD(0x47c, 0x0e8, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
206 | #define MX51_PAD_EIM_CS2__USBOTG_STP IOMUX_PAD(0x47c, 0x0e8, 2, __NA_, 0, NO_PAD_CTRL) | ||
207 | #define MX51_PAD_EIM_CS3__AUD5_RXD IOMUX_PAD(0x480, 0x0ec, 6, 0x8d4, 1, NO_PAD_CTRL) | ||
208 | #define MX51_PAD_EIM_CS3__CSI1_D5 IOMUX_PAD(0x480, 0x0ec, 5, __NA_, 0, NO_PAD_CTRL) | ||
209 | #define MX51_PAD_EIM_CS3__EIM_CS3 IOMUX_PAD(0x480, 0x0ec, 0, __NA_, 0, NO_PAD_CTRL) | ||
210 | #define MX51_PAD_EIM_CS3__FEC_RDATA3 IOMUX_PAD(0x480, 0x0ec, 3, 0x964, 0, NO_PAD_CTRL) | ||
211 | #define MX51_PAD_EIM_CS3__GPIO2_28 IOMUX_PAD(0x480, 0x0ec, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
212 | #define MX51_PAD_EIM_CS3__USBOTG_NXT IOMUX_PAD(0x480, 0x0ec, 2, __NA_, 0, NO_PAD_CTRL) | ||
213 | #define MX51_PAD_EIM_CS4__AUD5_TXC IOMUX_PAD(0x484, 0x0f0, 6, 0x8e4, 1, NO_PAD_CTRL) | ||
214 | #define MX51_PAD_EIM_CS4__CSI1_D6 IOMUX_PAD(0x484, 0x0f0, 5, __NA_, 0, NO_PAD_CTRL) | ||
215 | #define MX51_PAD_EIM_CS4__EIM_CS4 IOMUX_PAD(0x484, 0x0f0, 0, __NA_, 0, NO_PAD_CTRL) | ||
216 | #define MX51_PAD_EIM_CS4__FEC_RX_ER IOMUX_PAD(0x484, 0x0f0, 3, 0x970, 0, MX51_PAD_CTRL_2) | ||
217 | #define MX51_PAD_EIM_CS4__GPIO2_29 IOMUX_PAD(0x484, 0x0f0, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
218 | #define MX51_PAD_EIM_CS4__USBOTG_CLK IOMUX_PAD(0x484, 0x0f0, 2, __NA_, 0, NO_PAD_CTRL) | ||
219 | #define MX51_PAD_EIM_CS5__AUD5_TXFS IOMUX_PAD(0x488, 0x0f4, 6, 0x8e8, 1, NO_PAD_CTRL) | ||
220 | #define MX51_PAD_EIM_CS5__CSI1_D7 IOMUX_PAD(0x488, 0x0f4, 5, __NA_, 0, NO_PAD_CTRL) | ||
221 | #define MX51_PAD_EIM_CS5__DISP1_EXT_CLK IOMUX_PAD(0x488, 0x0f4, 4, 0x904, 0, NO_PAD_CTRL) | ||
222 | #define MX51_PAD_EIM_CS5__EIM_CS5 IOMUX_PAD(0x488, 0x0f4, 0, __NA_, 0, NO_PAD_CTRL) | ||
223 | #define MX51_PAD_EIM_CS5__FEC_CRS IOMUX_PAD(0x488, 0x0f4, 3, 0x950, 0, MX51_PAD_CTRL_2) | ||
224 | #define MX51_PAD_EIM_CS5__GPIO2_30 IOMUX_PAD(0x488, 0x0f4, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
225 | #define MX51_PAD_EIM_CS5__USBOTG_DIR IOMUX_PAD(0x488, 0x0f4, 2, __NA_, 0, NO_PAD_CTRL) | ||
226 | #define MX51_PAD_EIM_DTACK__EIM_DTACK IOMUX_PAD(0x48c, 0x0f8, 0, __NA_, 0, NO_PAD_CTRL) | ||
227 | #define MX51_PAD_EIM_DTACK__GPIO2_31 IOMUX_PAD(0x48c, 0x0f8, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
228 | #define MX51_PAD_EIM_LBA__EIM_LBA IOMUX_PAD(0x494, 0x0fc, 0, __NA_, 0, NO_PAD_CTRL) | ||
229 | #define MX51_PAD_EIM_LBA__GPIO3_1 IOMUX_PAD(0x494, 0x0fc, 1, 0x978, 0, MX51_GPIO_PAD_CTRL) | ||
230 | #define MX51_PAD_EIM_CRE__EIM_CRE IOMUX_PAD(0x4a0, 0x100, 0, __NA_, 0, NO_PAD_CTRL) | ||
231 | #define MX51_PAD_EIM_CRE__GPIO3_2 IOMUX_PAD(0x4a0, 0x100, 1, 0x97c, 0, MX51_GPIO_PAD_CTRL) | ||
232 | #define MX51_PAD_DRAM_CS1__DRAM_CS1 IOMUX_PAD(0x4d0, 0x104, 0, __NA_, 0, NO_PAD_CTRL) | ||
233 | #define MX51_PAD_DRAM_CS1__CCM_CLKO IOMUX_PAD(0x4d0, 0x104, 1, __NA_, 0, NO_PAD_CTRL) | ||
234 | #define MX51_PAD_NANDF_WE_B__GPIO3_3 IOMUX_PAD(0x4e4, 0x108, 3, 0x980, 0, MX51_GPIO_PAD_CTRL) | ||
235 | #define MX51_PAD_NANDF_WE_B__NANDF_WE_B IOMUX_PAD(0x4e4, 0x108, 0, __NA_, 0, NO_PAD_CTRL) | ||
236 | #define MX51_PAD_NANDF_WE_B__PATA_DIOW IOMUX_PAD(0x4e4, 0x108, 1, __NA_, 0, NO_PAD_CTRL) | ||
237 | #define MX51_PAD_NANDF_WE_B__SD3_DATA0 IOMUX_PAD(0x4e4, 0x108, 2, 0x93c, 0, MX51_SDHCI_PAD_CTRL) | ||
238 | #define MX51_PAD_NANDF_RE_B__GPIO3_4 IOMUX_PAD(0x4e8, 0x10c, 3, 0x984, 0, MX51_GPIO_PAD_CTRL) | ||
239 | #define MX51_PAD_NANDF_RE_B__NANDF_RE_B IOMUX_PAD(0x4e8, 0x10c, 0, __NA_, 0, NO_PAD_CTRL) | ||
240 | #define MX51_PAD_NANDF_RE_B__PATA_DIOR IOMUX_PAD(0x4e8, 0x10c, 1, __NA_, 0, NO_PAD_CTRL) | ||
241 | #define MX51_PAD_NANDF_RE_B__SD3_DATA1 IOMUX_PAD(0x4e8, 0x10c, 2, 0x940, 0, MX51_SDHCI_PAD_CTRL) | ||
242 | #define MX51_PAD_NANDF_ALE__GPIO3_5 IOMUX_PAD(0x4ec, 0x110, 3, 0x988, 0, MX51_GPIO_PAD_CTRL) | ||
243 | #define MX51_PAD_NANDF_ALE__NANDF_ALE IOMUX_PAD(0x4ec, 0x110, 0, __NA_, 0, NO_PAD_CTRL) | ||
244 | #define MX51_PAD_NANDF_ALE__PATA_BUFFER_EN IOMUX_PAD(0x4ec, 0x110, 1, __NA_, 0, NO_PAD_CTRL) | ||
245 | #define MX51_PAD_NANDF_CLE__GPIO3_6 IOMUX_PAD(0x4f0, 0x114, 3, 0x98c, 0, MX51_GPIO_PAD_CTRL) | ||
246 | #define MX51_PAD_NANDF_CLE__NANDF_CLE IOMUX_PAD(0x4f0, 0x114, 0, __NA_, 0, NO_PAD_CTRL) | ||
247 | #define MX51_PAD_NANDF_CLE__PATA_RESET_B IOMUX_PAD(0x4f0, 0x114, 1, __NA_, 0, NO_PAD_CTRL) | ||
248 | #define MX51_PAD_NANDF_WP_B__GPIO3_7 IOMUX_PAD(0x4f4, 0x118, 3, 0x990, 0, MX51_GPIO_PAD_CTRL) | ||
249 | #define MX51_PAD_NANDF_WP_B__NANDF_WP_B IOMUX_PAD(0x4f4, 0x118, 0, __NA_, 0, NO_PAD_CTRL) | ||
250 | #define MX51_PAD_NANDF_WP_B__PATA_DMACK IOMUX_PAD(0x4f4, 0x118, 1, __NA_, 0, NO_PAD_CTRL) | ||
251 | #define MX51_PAD_NANDF_WP_B__SD3_DATA2 IOMUX_PAD(0x4f4, 0x118, 2, 0x944, 0, MX51_SDHCI_PAD_CTRL) | ||
252 | #define MX51_PAD_NANDF_RB0__ECSPI2_SS1 IOMUX_PAD(0x4f8, 0x11c, 5, 0x930, 0, MX51_ECSPI_PAD_CTRL) | ||
253 | #define MX51_PAD_NANDF_RB0__GPIO3_8 IOMUX_PAD(0x4f8, 0x11c, 3, 0x994, 0, MX51_GPIO_PAD_CTRL) | ||
254 | #define MX51_PAD_NANDF_RB0__NANDF_RB0 IOMUX_PAD(0x4f8, 0x11c, 0, __NA_, 0, NO_PAD_CTRL) | ||
255 | #define MX51_PAD_NANDF_RB0__PATA_DMARQ IOMUX_PAD(0x4f8, 0x11c, 1, __NA_, 0, NO_PAD_CTRL) | ||
256 | #define MX51_PAD_NANDF_RB0__SD3_DATA3 IOMUX_PAD(0x4f8, 0x11c, 2, 0x948, 0, MX51_SDHCI_PAD_CTRL) | ||
257 | #define MX51_PAD_NANDF_RB1__CSPI_MOSI IOMUX_PAD(0x4fc, 0x120, 6, 0x91c, 0, MX51_ECSPI_PAD_CTRL) | ||
258 | #define MX51_PAD_NANDF_RB1__ECSPI2_RDY IOMUX_PAD(0x4fc, 0x120, 2, __NA_, 0, MX51_ECSPI_PAD_CTRL) | ||
259 | #define MX51_PAD_NANDF_RB1__GPIO3_9 IOMUX_PAD(0x4fc, 0x120, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
260 | #define MX51_PAD_NANDF_RB1__NANDF_RB1 IOMUX_PAD(0x4fc, 0x120, 0, __NA_, 0, NO_PAD_CTRL) | ||
261 | #define MX51_PAD_NANDF_RB1__PATA_IORDY IOMUX_PAD(0x4fc, 0x120, 1, __NA_, 0, NO_PAD_CTRL) | ||
262 | #define MX51_PAD_NANDF_RB1__GPT_CMPOUT2 IOMUX_PAD(0x4fc, 0x120, 4, __NA_, 0, NO_PAD_CTRL) | ||
263 | #define MX51_PAD_NANDF_RB1__SD4_CMD IOMUX_PAD(0x4fc, 0x120, 0x15, __NA_, 0, MX51_SDHCI_PAD_CTRL) | ||
264 | #define MX51_PAD_NANDF_RB2__DISP2_WAIT IOMUX_PAD(0x500, 0x124, 5, 0x9a8, 0, NO_PAD_CTRL) | ||
265 | #define MX51_PAD_NANDF_RB2__ECSPI2_SCLK IOMUX_PAD(0x500, 0x124, 2, __NA_, 0, MX51_ECSPI_PAD_CTRL) | ||
266 | #define MX51_PAD_NANDF_RB2__FEC_COL IOMUX_PAD(0x500, 0x124, 1, 0x94c, 0, MX51_PAD_CTRL_2) | ||
267 | #define MX51_PAD_NANDF_RB2__GPIO3_10 IOMUX_PAD(0x500, 0x124, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
268 | #define MX51_PAD_NANDF_RB2__NANDF_RB2 IOMUX_PAD(0x500, 0x124, 0, __NA_, 0, NO_PAD_CTRL) | ||
269 | #define MX51_PAD_NANDF_RB2__GPT_CMPOUT3 IOMUX_PAD(0x500, 0x124, 4, __NA_, 0, NO_PAD_CTRL) | ||
270 | #define MX51_PAD_NANDF_RB2__USBH3_H3_DP IOMUX_PAD(0x500, 0x124, 0x17, __NA_, 0, NO_PAD_CTRL) | ||
271 | #define MX51_PAD_NANDF_RB2__USBH3_NXT IOMUX_PAD(0x500, 0x124, 6, 0xa20, 0, NO_PAD_CTRL) | ||
272 | #define MX51_PAD_NANDF_RB3__DISP1_WAIT IOMUX_PAD(0x504, 0x128, 5, __NA_, 0, NO_PAD_CTRL) | ||
273 | #define MX51_PAD_NANDF_RB3__ECSPI2_MISO IOMUX_PAD(0x504, 0x128, 2, __NA_, 0, MX51_ECSPI_PAD_CTRL) | ||
274 | #define MX51_PAD_NANDF_RB3__FEC_RX_CLK IOMUX_PAD(0x504, 0x128, 1, 0x968, 0, MX51_PAD_CTRL_2) | ||
275 | #define MX51_PAD_NANDF_RB3__GPIO3_11 IOMUX_PAD(0x504, 0x128, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
276 | #define MX51_PAD_NANDF_RB3__NANDF_RB3 IOMUX_PAD(0x504, 0x128, 0, __NA_, 0, NO_PAD_CTRL) | ||
277 | #define MX51_PAD_NANDF_RB3__USBH3_CLK IOMUX_PAD(0x504, 0x128, 6, 0x9f8, 0, NO_PAD_CTRL) | ||
278 | #define MX51_PAD_NANDF_RB3__USBH3_H3_DM IOMUX_PAD(0x504, 0x128, 0x17, __NA_, 0, NO_PAD_CTRL) | ||
279 | #define MX51_PAD_GPIO_NAND__GPIO_NAND IOMUX_PAD(0x514, 0x12c, 0, 0x998, 0, MX51_GPIO_PAD_CTRL) | ||
280 | #define MX51_PAD_GPIO_NAND__PATA_INTRQ IOMUX_PAD(0x514, 0x12c, 1, __NA_, 0, NO_PAD_CTRL) | ||
281 | #define MX51_PAD_NANDF_CS0__GPIO3_16 IOMUX_PAD(0x518, 0x130, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
282 | #define MX51_PAD_NANDF_CS0__NANDF_CS0 IOMUX_PAD(0x518, 0x130, 0, __NA_, 0, NO_PAD_CTRL) | ||
283 | #define MX51_PAD_NANDF_CS1__GPIO3_17 IOMUX_PAD(0x51c, 0x134, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
284 | #define MX51_PAD_NANDF_CS1__NANDF_CS1 IOMUX_PAD(0x51c, 0x134, 0, __NA_, 0, NO_PAD_CTRL) | ||
285 | #define MX51_PAD_NANDF_CS2__CSPI_SCLK IOMUX_PAD(0x520, 0x138, 6, 0x914, 0, MX51_ECSPI_PAD_CTRL) | ||
286 | #define MX51_PAD_NANDF_CS2__FEC_TX_ER IOMUX_PAD(0x520, 0x138, 2, __NA_, 0, MX51_PAD_CTRL_5) | ||
287 | #define MX51_PAD_NANDF_CS2__GPIO3_18 IOMUX_PAD(0x520, 0x138, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
288 | #define MX51_PAD_NANDF_CS2__NANDF_CS2 IOMUX_PAD(0x520, 0x138, 0, __NA_, 0, NO_PAD_CTRL) | ||
289 | #define MX51_PAD_NANDF_CS2__PATA_CS_0 IOMUX_PAD(0x520, 0x138, 1, __NA_, 0, NO_PAD_CTRL) | ||
290 | #define MX51_PAD_NANDF_CS2__SD4_CLK IOMUX_PAD(0x520, 0x138, 5, __NA_, 0, MX51_SDHCI_PAD_CTRL | PAD_CTL_HYS) | ||
291 | #define MX51_PAD_NANDF_CS2__USBH3_H1_DP IOMUX_PAD(0x520, 0x138, 0x17, __NA_, 0, NO_PAD_CTRL) | ||
292 | #define MX51_PAD_NANDF_CS3__FEC_MDC IOMUX_PAD(0x524, 0x13c, 2, __NA_, 0, MX51_PAD_CTRL_5) | ||
293 | #define MX51_PAD_NANDF_CS3__GPIO3_19 IOMUX_PAD(0x524, 0x13c, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
294 | #define MX51_PAD_NANDF_CS3__NANDF_CS3 IOMUX_PAD(0x524, 0x13c, 0, __NA_, 0, NO_PAD_CTRL) | ||
295 | #define MX51_PAD_NANDF_CS3__PATA_CS_1 IOMUX_PAD(0x524, 0x13c, 1, __NA_, 0, NO_PAD_CTRL) | ||
296 | #define MX51_PAD_NANDF_CS3__SD4_DAT0 IOMUX_PAD(0x524, 0x13c, 5, __NA_, 0, MX51_SDHCI_PAD_CTRL) | ||
297 | #define MX51_PAD_NANDF_CS3__USBH3_H1_DM IOMUX_PAD(0x524, 0x13c, 0x17, __NA_, 0, NO_PAD_CTRL) | ||
298 | #define MX51_PAD_NANDF_CS4__FEC_TDATA1 IOMUX_PAD(0x528, 0x140, 2, __NA_, 0, MX51_PAD_CTRL_5) | ||
299 | #define MX51_PAD_NANDF_CS4__GPIO3_20 IOMUX_PAD(0x528, 0x140, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
300 | #define MX51_PAD_NANDF_CS4__NANDF_CS4 IOMUX_PAD(0x528, 0x140, 0, __NA_, 0, NO_PAD_CTRL) | ||
301 | #define MX51_PAD_NANDF_CS4__PATA_DA_0 IOMUX_PAD(0x528, 0x140, 1, __NA_, 0, NO_PAD_CTRL) | ||
302 | #define MX51_PAD_NANDF_CS4__SD4_DAT1 IOMUX_PAD(0x528, 0x140, 5, __NA_, 0, MX51_SDHCI_PAD_CTRL) | ||
303 | #define MX51_PAD_NANDF_CS4__USBH3_STP IOMUX_PAD(0x528, 0x140, 7, 0xa24, 0, NO_PAD_CTRL) | ||
304 | #define MX51_PAD_NANDF_CS5__FEC_TDATA2 IOMUX_PAD(0x52c, 0x144, 2, __NA_, 0, MX51_PAD_CTRL_5) | ||
305 | #define MX51_PAD_NANDF_CS5__GPIO3_21 IOMUX_PAD(0x52c, 0x144, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
306 | #define MX51_PAD_NANDF_CS5__NANDF_CS5 IOMUX_PAD(0x52c, 0x144, 0, __NA_, 0, NO_PAD_CTRL) | ||
307 | #define MX51_PAD_NANDF_CS5__PATA_DA_1 IOMUX_PAD(0x52c, 0x144, 1, __NA_, 0, NO_PAD_CTRL) | ||
308 | #define MX51_PAD_NANDF_CS5__SD4_DAT2 IOMUX_PAD(0x52c, 0x144, 5, __NA_, 0, MX51_SDHCI_PAD_CTRL) | ||
309 | #define MX51_PAD_NANDF_CS5__USBH3_DIR IOMUX_PAD(0x52c, 0x144, 7, 0xa1c, 0, NO_PAD_CTRL) | ||
310 | #define MX51_PAD_NANDF_CS6__CSPI_SS3 IOMUX_PAD(0x530, 0x148, 7, 0x928, 0, MX51_ECSPI_PAD_CTRL) | ||
311 | #define MX51_PAD_NANDF_CS6__FEC_TDATA3 IOMUX_PAD(0x530, 0x148, 2, __NA_, 0, MX51_PAD_CTRL_5) | ||
312 | #define MX51_PAD_NANDF_CS6__GPIO3_22 IOMUX_PAD(0x530, 0x148, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
313 | #define MX51_PAD_NANDF_CS6__NANDF_CS6 IOMUX_PAD(0x530, 0x148, 0, __NA_, 0, NO_PAD_CTRL) | ||
314 | #define MX51_PAD_NANDF_CS6__PATA_DA_2 IOMUX_PAD(0x530, 0x148, 1, __NA_, 0, NO_PAD_CTRL) | ||
315 | #define MX51_PAD_NANDF_CS6__SD4_DAT3 IOMUX_PAD(0x530, 0x148, 5, __NA_, 0, MX51_SDHCI_PAD_CTRL) | ||
316 | #define MX51_PAD_NANDF_CS7__FEC_TX_EN IOMUX_PAD(0x534, 0x14c, 1, __NA_, 0, MX51_PAD_CTRL_5) | ||
317 | #define MX51_PAD_NANDF_CS7__GPIO3_23 IOMUX_PAD(0x534, 0x14c, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
318 | #define MX51_PAD_NANDF_CS7__NANDF_CS7 IOMUX_PAD(0x534, 0x14c, 0, __NA_, 0, NO_PAD_CTRL) | ||
319 | #define MX51_PAD_NANDF_CS7__SD3_CLK IOMUX_PAD(0x534, 0x14c, 5, __NA_, 0, MX51_SDHCI_PAD_CTRL | PAD_CTL_HYS) | ||
320 | #define MX51_PAD_NANDF_RDY_INT__ECSPI2_SS0 IOMUX_PAD(0x538, 0x150, 2, __NA_, 0, MX51_ECSPI_PAD_CTRL) | ||
321 | #define MX51_PAD_NANDF_RDY_INT__FEC_TX_CLK IOMUX_PAD(0x538, 0x150, 1, 0x974, 0, MX51_PAD_CTRL_4) | ||
322 | #define MX51_PAD_NANDF_RDY_INT__GPIO3_24 IOMUX_PAD(0x538, 0x150, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
323 | #define MX51_PAD_NANDF_RDY_INT__NANDF_RDY_INT IOMUX_PAD(0x538, 0x150, 0, 0x938, 0, NO_PAD_CTRL) | ||
324 | #define MX51_PAD_NANDF_RDY_INT__SD3_CMD IOMUX_PAD(0x538, 0x150, 0x15, __NA_, 0, MX51_SDHCI_PAD_CTRL) | ||
325 | #define MX51_PAD_NANDF_D15__ECSPI2_MOSI IOMUX_PAD(0x53c, 0x154, 2, __NA_, 0, MX51_ECSPI_PAD_CTRL) | ||
326 | #define MX51_PAD_NANDF_D15__GPIO3_25 IOMUX_PAD(0x53c, 0x154, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
327 | #define MX51_PAD_NANDF_D15__NANDF_D15 IOMUX_PAD(0x53c, 0x154, 0, __NA_, 0, NO_PAD_CTRL) | ||
328 | #define MX51_PAD_NANDF_D15__PATA_DATA15 IOMUX_PAD(0x53c, 0x154, 1, __NA_, 0, NO_PAD_CTRL) | ||
329 | #define MX51_PAD_NANDF_D15__SD3_DAT7 IOMUX_PAD(0x53c, 0x154, 5, __NA_, 0, NO_PAD_CTRL) | ||
330 | #define MX51_PAD_NANDF_D14__ECSPI2_SS3 IOMUX_PAD(0x540, 0x158, 2, 0x934, 0, MX51_ECSPI_PAD_CTRL) | ||
331 | #define MX51_PAD_NANDF_D14__GPIO3_26 IOMUX_PAD(0x540, 0x158, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
332 | #define MX51_PAD_NANDF_D14__NANDF_D14 IOMUX_PAD(0x540, 0x158, 0, __NA_, 0, NO_PAD_CTRL) | ||
333 | #define MX51_PAD_NANDF_D14__PATA_DATA14 IOMUX_PAD(0x540, 0x158, 1, __NA_, 0, NO_PAD_CTRL) | ||
334 | #define MX51_PAD_NANDF_D14__SD3_DAT6 IOMUX_PAD(0x540, 0x158, 5, __NA_, 0, NO_PAD_CTRL) | ||
335 | #define MX51_PAD_NANDF_D13__ECSPI2_SS2 IOMUX_PAD(0x544, 0x15c, 2, __NA_, 0, MX51_ECSPI_PAD_CTRL) | ||
336 | #define MX51_PAD_NANDF_D13__GPIO3_27 IOMUX_PAD(0x544, 0x15c, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
337 | #define MX51_PAD_NANDF_D13__NANDF_D13 IOMUX_PAD(0x544, 0x15c, 0, __NA_, 0, NO_PAD_CTRL) | ||
338 | #define MX51_PAD_NANDF_D13__PATA_DATA13 IOMUX_PAD(0x544, 0x15c, 1, __NA_, 0, NO_PAD_CTRL) | ||
339 | #define MX51_PAD_NANDF_D13__SD3_DAT5 IOMUX_PAD(0x544, 0x15c, 5, __NA_, 0, NO_PAD_CTRL) | ||
340 | #define MX51_PAD_NANDF_D12__ECSPI2_SS1 IOMUX_PAD(0x548, 0x160, 2, 0x930, 1, MX51_ECSPI_PAD_CTRL) | ||
341 | #define MX51_PAD_NANDF_D12__GPIO3_28 IOMUX_PAD(0x548, 0x160, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
342 | #define MX51_PAD_NANDF_D12__NANDF_D12 IOMUX_PAD(0x548, 0x160, 0, __NA_, 0, NO_PAD_CTRL) | ||
343 | #define MX51_PAD_NANDF_D12__PATA_DATA12 IOMUX_PAD(0x548, 0x160, 1, __NA_, 0, NO_PAD_CTRL) | ||
344 | #define MX51_PAD_NANDF_D12__SD3_DAT4 IOMUX_PAD(0x548, 0x160, 5, __NA_, 0, NO_PAD_CTRL) | ||
345 | #define MX51_PAD_NANDF_D11__FEC_RX_DV IOMUX_PAD(0x54c, 0x164, 2, 0x96c, 0, NO_PAD_CTRL) | ||
346 | #define MX51_PAD_NANDF_D11__GPIO3_29 IOMUX_PAD(0x54c, 0x164, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
347 | #define MX51_PAD_NANDF_D11__NANDF_D11 IOMUX_PAD(0x54c, 0x164, 0, __NA_, 0, NO_PAD_CTRL) | ||
348 | #define MX51_PAD_NANDF_D11__PATA_DATA11 IOMUX_PAD(0x54c, 0x164, 1, __NA_, 0, NO_PAD_CTRL) | ||
349 | #define MX51_PAD_NANDF_D11__SD3_DATA3 IOMUX_PAD(0x54c, 0x164, 5, 0x948, 1, NO_PAD_CTRL) | ||
350 | #define MX51_PAD_NANDF_D10__GPIO3_30 IOMUX_PAD(0x550, 0x168, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
351 | #define MX51_PAD_NANDF_D10__NANDF_D10 IOMUX_PAD(0x550, 0x168, 0, __NA_, 0, NO_PAD_CTRL) | ||
352 | #define MX51_PAD_NANDF_D10__PATA_DATA10 IOMUX_PAD(0x550, 0x168, 1, __NA_, 0, NO_PAD_CTRL) | ||
353 | #define MX51_PAD_NANDF_D10__SD3_DATA2 IOMUX_PAD(0x550, 0x168, 5, 0x944, 1, NO_PAD_CTRL) | ||
354 | #define MX51_PAD_NANDF_D9__FEC_RDATA0 IOMUX_PAD(0x554, 0x16c, 0x12, 0x958, 0, MX51_PAD_CTRL_4) | ||
355 | #define MX51_PAD_NANDF_D9__GPIO3_31 IOMUX_PAD(0x554, 0x16c, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
356 | #define MX51_PAD_NANDF_D9__NANDF_D9 IOMUX_PAD(0x554, 0x16c, 0, __NA_, 0, NO_PAD_CTRL) | ||
357 | #define MX51_PAD_NANDF_D9__PATA_DATA9 IOMUX_PAD(0x554, 0x16c, 1, __NA_, 0, NO_PAD_CTRL) | ||
358 | #define MX51_PAD_NANDF_D9__SD3_DATA1 IOMUX_PAD(0x554, 0x16c, 5, 0x940, 1, NO_PAD_CTRL) | ||
359 | #define MX51_PAD_NANDF_D8__FEC_TDATA0 IOMUX_PAD(0x558, 0x170, 2, __NA_, 0, MX51_PAD_CTRL_5) | ||
360 | #define MX51_PAD_NANDF_D8__GPIO4_0 IOMUX_PAD(0x558, 0x170, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
361 | #define MX51_PAD_NANDF_D8__NANDF_D8 IOMUX_PAD(0x558, 0x170, 0, __NA_, 0, NO_PAD_CTRL) | ||
362 | #define MX51_PAD_NANDF_D8__PATA_DATA8 IOMUX_PAD(0x558, 0x170, 1, __NA_, 0, NO_PAD_CTRL) | ||
363 | #define MX51_PAD_NANDF_D8__SD3_DATA0 IOMUX_PAD(0x558, 0x170, 5, 0x93c, 1, NO_PAD_CTRL) | ||
364 | #define MX51_PAD_NANDF_D7__GPIO4_1 IOMUX_PAD(0x55c, 0x174, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
365 | #define MX51_PAD_NANDF_D7__NANDF_D7 IOMUX_PAD(0x55c, 0x174, 0, __NA_, 0, NO_PAD_CTRL) | ||
366 | #define MX51_PAD_NANDF_D7__PATA_DATA7 IOMUX_PAD(0x55c, 0x174, 1, __NA_, 0, NO_PAD_CTRL) | ||
367 | #define MX51_PAD_NANDF_D7__USBH3_DATA0 IOMUX_PAD(0x55c, 0x174, 5, 0x9fc, 0, NO_PAD_CTRL) | ||
368 | #define MX51_PAD_NANDF_D6__GPIO4_2 IOMUX_PAD(0x560, 0x178, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
369 | #define MX51_PAD_NANDF_D6__NANDF_D6 IOMUX_PAD(0x560, 0x178, 0, __NA_, 0, NO_PAD_CTRL) | ||
370 | #define MX51_PAD_NANDF_D6__PATA_DATA6 IOMUX_PAD(0x560, 0x178, 1, __NA_, 0, NO_PAD_CTRL) | ||
371 | #define MX51_PAD_NANDF_D6__SD4_LCTL IOMUX_PAD(0x560, 0x178, 2, __NA_, 0, NO_PAD_CTRL) | ||
372 | #define MX51_PAD_NANDF_D6__USBH3_DATA1 IOMUX_PAD(0x560, 0x178, 5, 0xa00, 0, NO_PAD_CTRL) | ||
373 | #define MX51_PAD_NANDF_D5__GPIO4_3 IOMUX_PAD(0x564, 0x17c, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
374 | #define MX51_PAD_NANDF_D5__NANDF_D5 IOMUX_PAD(0x564, 0x17c, 0, __NA_, 0, NO_PAD_CTRL) | ||
375 | #define MX51_PAD_NANDF_D5__PATA_DATA5 IOMUX_PAD(0x564, 0x17c, 1, __NA_, 0, NO_PAD_CTRL) | ||
376 | #define MX51_PAD_NANDF_D5__SD4_WP IOMUX_PAD(0x564, 0x17c, 2, __NA_, 0, NO_PAD_CTRL) | ||
377 | #define MX51_PAD_NANDF_D5__USBH3_DATA2 IOMUX_PAD(0x564, 0x17c, 5, 0xa04, 0, NO_PAD_CTRL) | ||
378 | #define MX51_PAD_NANDF_D4__GPIO4_4 IOMUX_PAD(0x568, 0x180, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
379 | #define MX51_PAD_NANDF_D4__NANDF_D4 IOMUX_PAD(0x568, 0x180, 0, __NA_, 0, NO_PAD_CTRL) | ||
380 | #define MX51_PAD_NANDF_D4__PATA_DATA4 IOMUX_PAD(0x568, 0x180, 1, __NA_, 0, NO_PAD_CTRL) | ||
381 | #define MX51_PAD_NANDF_D4__SD4_CD IOMUX_PAD(0x568, 0x180, 2, __NA_, 0, NO_PAD_CTRL) | ||
382 | #define MX51_PAD_NANDF_D4__USBH3_DATA3 IOMUX_PAD(0x568, 0x180, 5, 0xa08, 0, NO_PAD_CTRL) | ||
383 | #define MX51_PAD_NANDF_D3__GPIO4_5 IOMUX_PAD(0x56c, 0x184, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
384 | #define MX51_PAD_NANDF_D3__NANDF_D3 IOMUX_PAD(0x56c, 0x184, 0, __NA_, 0, NO_PAD_CTRL) | ||
385 | #define MX51_PAD_NANDF_D3__PATA_DATA3 IOMUX_PAD(0x56c, 0x184, 1, __NA_, 0, NO_PAD_CTRL) | ||
386 | #define MX51_PAD_NANDF_D3__SD4_DAT4 IOMUX_PAD(0x56c, 0x184, 2, __NA_, 0, NO_PAD_CTRL) | ||
387 | #define MX51_PAD_NANDF_D3__USBH3_DATA4 IOMUX_PAD(0x56c, 0x184, 5, 0xa0c, 0, NO_PAD_CTRL) | ||
388 | #define MX51_PAD_NANDF_D2__GPIO4_6 IOMUX_PAD(0x570, 0x188, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
389 | #define MX51_PAD_NANDF_D2__NANDF_D2 IOMUX_PAD(0x570, 0x188, 0, __NA_, 0, NO_PAD_CTRL) | ||
390 | #define MX51_PAD_NANDF_D2__PATA_DATA2 IOMUX_PAD(0x570, 0x188, 1, __NA_, 0, NO_PAD_CTRL) | ||
391 | #define MX51_PAD_NANDF_D2__SD4_DAT5 IOMUX_PAD(0x570, 0x188, 2, __NA_, 0, NO_PAD_CTRL) | ||
392 | #define MX51_PAD_NANDF_D2__USBH3_DATA5 IOMUX_PAD(0x570, 0x188, 5, 0xa10, 0, NO_PAD_CTRL) | ||
393 | #define MX51_PAD_NANDF_D1__GPIO4_7 IOMUX_PAD(0x574, 0x18c, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
394 | #define MX51_PAD_NANDF_D1__NANDF_D1 IOMUX_PAD(0x574, 0x18c, 0, __NA_, 0, NO_PAD_CTRL) | ||
395 | #define MX51_PAD_NANDF_D1__PATA_DATA1 IOMUX_PAD(0x574, 0x18c, 1, __NA_, 0, NO_PAD_CTRL) | ||
396 | #define MX51_PAD_NANDF_D1__SD4_DAT6 IOMUX_PAD(0x574, 0x18c, 2, __NA_, 0, NO_PAD_CTRL) | ||
397 | #define MX51_PAD_NANDF_D1__USBH3_DATA6 IOMUX_PAD(0x574, 0x18c, 5, 0xa14, 0, NO_PAD_CTRL) | ||
398 | #define MX51_PAD_NANDF_D0__GPIO4_8 IOMUX_PAD(0x578, 0x190, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
399 | #define MX51_PAD_NANDF_D0__NANDF_D0 IOMUX_PAD(0x578, 0x190, 0, __NA_, 0, NO_PAD_CTRL) | ||
400 | #define MX51_PAD_NANDF_D0__PATA_DATA0 IOMUX_PAD(0x578, 0x190, 1, __NA_, 0, NO_PAD_CTRL) | ||
401 | #define MX51_PAD_NANDF_D0__SD4_DAT7 IOMUX_PAD(0x578, 0x190, 2, __NA_, 0, NO_PAD_CTRL) | ||
402 | #define MX51_PAD_NANDF_D0__USBH3_DATA7 IOMUX_PAD(0x578, 0x190, 5, 0xa18, 0, NO_PAD_CTRL) | ||
403 | #define MX51_PAD_CSI1_D8__CSI1_D8 IOMUX_PAD(0x57c, 0x194, 0, __NA_, 0, NO_PAD_CTRL) | ||
404 | #define MX51_PAD_CSI1_D8__GPIO3_12 IOMUX_PAD(0x57c, 0x194, 3, 0x998, 1, MX51_GPIO_PAD_CTRL) | ||
405 | #define MX51_PAD_CSI1_D9__CSI1_D9 IOMUX_PAD(0x580, 0x198, 0, __NA_, 0, NO_PAD_CTRL) | ||
406 | #define MX51_PAD_CSI1_D9__GPIO3_13 IOMUX_PAD(0x580, 0x198, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
407 | #define MX51_PAD_CSI1_D10__CSI1_D10 IOMUX_PAD(0x584, 0x19c, 0, __NA_, 0, NO_PAD_CTRL) | ||
408 | #define MX51_PAD_CSI1_D11__CSI1_D11 IOMUX_PAD(0x588, 0x1a0, 0, __NA_, 0, NO_PAD_CTRL) | ||
409 | #define MX51_PAD_CSI1_D12__CSI1_D12 IOMUX_PAD(0x58c, 0x1a4, 0, __NA_, 0, NO_PAD_CTRL) | ||
410 | #define MX51_PAD_CSI1_D13__CSI1_D13 IOMUX_PAD(0x590, 0x1a8, 0, __NA_, 0, NO_PAD_CTRL) | ||
411 | #define MX51_PAD_CSI1_D14__CSI1_D14 IOMUX_PAD(0x594, 0x1ac, 0, __NA_, 0, NO_PAD_CTRL) | ||
412 | #define MX51_PAD_CSI1_D15__CSI1_D15 IOMUX_PAD(0x598, 0x1b0, 0, __NA_, 0, NO_PAD_CTRL) | ||
413 | #define MX51_PAD_CSI1_D16__CSI1_D16 IOMUX_PAD(0x59c, 0x1b4, 0, __NA_, 0, NO_PAD_CTRL) | ||
414 | #define MX51_PAD_CSI1_D17__CSI1_D17 IOMUX_PAD(0x5a0, 0x1b8, 0, __NA_, 0, NO_PAD_CTRL) | ||
415 | #define MX51_PAD_CSI1_D18__CSI1_D18 IOMUX_PAD(0x5a4, 0x1bc, 0, __NA_, 0, NO_PAD_CTRL) | ||
416 | #define MX51_PAD_CSI1_D19__CSI1_D19 IOMUX_PAD(0x5a8, 0x1c0, 0, __NA_, 0, NO_PAD_CTRL) | ||
417 | #define MX51_PAD_CSI1_VSYNC__CSI1_VSYNC IOMUX_PAD(0x5ac, 0x1c4, 0, __NA_, 0, NO_PAD_CTRL) | ||
418 | #define MX51_PAD_CSI1_VSYNC__GPIO3_14 IOMUX_PAD(0x5ac, 0x1c4, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
419 | #define MX51_PAD_CSI1_HSYNC__CSI1_HSYNC IOMUX_PAD(0x5b0, 0x1c8, 0, __NA_, 0, NO_PAD_CTRL) | ||
420 | #define MX51_PAD_CSI1_HSYNC__GPIO3_15 IOMUX_PAD(0x5b0, 0x1c8, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
421 | #define MX51_PAD_CSI1_PIXCLK__CSI1_PIXCLK IOMUX_PAD(0x5b4, __NA_, 0, 0x000, 0, NO_PAD_CTRL) | ||
422 | #define MX51_PAD_CSI1_MCLK__CSI1_MCLK IOMUX_PAD(0x5b8, __NA_, 0, 0x000, 0, NO_PAD_CTRL) | ||
423 | #define MX51_PAD_CSI2_D12__CSI2_D12 IOMUX_PAD(0x5bc, 0x1cc, 0, __NA_, 0, NO_PAD_CTRL) | ||
424 | #define MX51_PAD_CSI2_D12__GPIO4_9 IOMUX_PAD(0x5bc, 0x1cc, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
425 | #define MX51_PAD_CSI2_D13__CSI2_D13 IOMUX_PAD(0x5c0, 0x1d0, 0, __NA_, 0, NO_PAD_CTRL) | ||
426 | #define MX51_PAD_CSI2_D13__GPIO4_10 IOMUX_PAD(0x5c0, 0x1d0, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
427 | #define MX51_PAD_CSI2_D14__CSI2_D14 IOMUX_PAD(0x5c4, 0x1d4, 0, __NA_, 0, NO_PAD_CTRL) | ||
428 | #define MX51_PAD_CSI2_D15__CSI2_D15 IOMUX_PAD(0x5c8, 0x1d8, 0, __NA_, 0, NO_PAD_CTRL) | ||
429 | #define MX51_PAD_CSI2_D16__CSI2_D16 IOMUX_PAD(0x5cc, 0x1dc, 0, __NA_, 0, NO_PAD_CTRL) | ||
430 | #define MX51_PAD_CSI2_D17__CSI2_D17 IOMUX_PAD(0x5d0, 0x1e0, 0, __NA_, 0, NO_PAD_CTRL) | ||
431 | #define MX51_PAD_CSI2_D18__CSI2_D18 IOMUX_PAD(0x5d4, 0x1e4, 0, __NA_, 0, NO_PAD_CTRL) | ||
432 | #define MX51_PAD_CSI2_D18__GPIO4_11 IOMUX_PAD(0x5d4, 0x1e4, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
433 | #define MX51_PAD_CSI2_D19__CSI2_D19 IOMUX_PAD(0x5d8, 0x1e8, 0, __NA_, 0, NO_PAD_CTRL) | ||
434 | #define MX51_PAD_CSI2_D19__GPIO4_12 IOMUX_PAD(0x5d8, 0x1e8, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
435 | #define MX51_PAD_CSI2_VSYNC__CSI2_VSYNC IOMUX_PAD(0x5dc, 0x1ec, 0, __NA_, 0, NO_PAD_CTRL) | ||
436 | #define MX51_PAD_CSI2_VSYNC__GPIO4_13 IOMUX_PAD(0x5dc, 0x1ec, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
437 | #define MX51_PAD_CSI2_HSYNC__CSI2_HSYNC IOMUX_PAD(0x5e0, 0x1f0, 0, __NA_, 0, NO_PAD_CTRL) | ||
438 | #define MX51_PAD_CSI2_HSYNC__GPIO4_14 IOMUX_PAD(0x5e0, 0x1f0, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
439 | #define MX51_PAD_CSI2_PIXCLK__CSI2_PIXCLK IOMUX_PAD(0x5e4, 0x1f4, 0, __NA_, 0, NO_PAD_CTRL) | ||
440 | #define MX51_PAD_CSI2_PIXCLK__GPIO4_15 IOMUX_PAD(0x5e4, 0x1f4, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
441 | #define MX51_PAD_I2C1_CLK__GPIO4_16 IOMUX_PAD(0x5e8, 0x1f8, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
442 | #define MX51_PAD_I2C1_CLK__I2C1_CLK IOMUX_PAD(0x5e8, 0x1f8, 0x10, __NA_, 0, MX51_I2C_PAD_CTRL) | ||
443 | #define MX51_PAD_I2C1_DAT__GPIO4_17 IOMUX_PAD(0x5ec, 0x1fc, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
444 | #define MX51_PAD_I2C1_DAT__I2C1_DAT IOMUX_PAD(0x5ec, 0x1fc, 0x10, __NA_, 0, MX51_I2C_PAD_CTRL) | ||
445 | #define MX51_PAD_AUD3_BB_TXD__AUD3_TXD IOMUX_PAD(0x5f0, 0x200, 0, __NA_, 0, NO_PAD_CTRL) | ||
446 | #define MX51_PAD_AUD3_BB_TXD__GPIO4_18 IOMUX_PAD(0x5f0, 0x200, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
447 | #define MX51_PAD_AUD3_BB_RXD__AUD3_RXD IOMUX_PAD(0x5f4, 0x204, 0, __NA_, 0, NO_PAD_CTRL) | ||
448 | #define MX51_PAD_AUD3_BB_RXD__GPIO4_19 IOMUX_PAD(0x5f4, 0x204, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
449 | #define MX51_PAD_AUD3_BB_RXD__UART3_RXD IOMUX_PAD(0x5f4, 0x204, 1, 0x9f4, 2, MX51_UART_PAD_CTRL) | ||
450 | #define MX51_PAD_AUD3_BB_CK__AUD3_TXC IOMUX_PAD(0x5f8, 0x208, 0, __NA_, 0, NO_PAD_CTRL) | ||
451 | #define MX51_PAD_AUD3_BB_CK__GPIO4_20 IOMUX_PAD(0x5f8, 0x208, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
452 | #define MX51_PAD_AUD3_BB_FS__AUD3_TXFS IOMUX_PAD(0x5fc, 0x20c, 0, __NA_, 0, NO_PAD_CTRL) | ||
453 | #define MX51_PAD_AUD3_BB_FS__GPIO4_21 IOMUX_PAD(0x5fc, 0x20c, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
454 | #define MX51_PAD_AUD3_BB_FS__UART3_TXD IOMUX_PAD(0x5fc, 0x20c, 1, __NA_, 0, MX51_UART_PAD_CTRL) | ||
455 | #define MX51_PAD_CSPI1_MOSI__ECSPI1_MOSI IOMUX_PAD(0x600, 0x210, 0, __NA_, 0, MX51_ECSPI_PAD_CTRL) | ||
456 | #define MX51_PAD_CSPI1_MOSI__GPIO4_22 IOMUX_PAD(0x600, 0x210, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
457 | #define MX51_PAD_CSPI1_MOSI__I2C1_SDA IOMUX_PAD(0x600, 0x210, 0x11, 0x9b4, 1, MX51_I2C_PAD_CTRL) | ||
458 | #define MX51_PAD_CSPI1_MISO__AUD4_RXD IOMUX_PAD(0x604, 0x214, 1, 0x8c4, 1, NO_PAD_CTRL) | ||
459 | #define MX51_PAD_CSPI1_MISO__ECSPI1_MISO IOMUX_PAD(0x604, 0x214, 0, __NA_, 0, MX51_ECSPI_PAD_CTRL) | ||
460 | #define MX51_PAD_CSPI1_MISO__GPIO4_23 IOMUX_PAD(0x604, 0x214, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
461 | #define MX51_PAD_CSPI1_SS0__AUD4_TXC IOMUX_PAD(0x608, 0x218, 1, 0x8cc, 1, NO_PAD_CTRL) | ||
462 | #define MX51_PAD_CSPI1_SS0__ECSPI1_SS0 IOMUX_PAD(0x608, 0x218, 0, __NA_, 0, MX51_ECSPI_PAD_CTRL) | ||
463 | #define MX51_PAD_CSPI1_SS0__GPIO4_24 IOMUX_PAD(0x608, 0x218, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
464 | #define MX51_PAD_CSPI1_SS1__AUD4_TXD IOMUX_PAD(0x60c, 0x21c, 1, 0x8c8, 1, NO_PAD_CTRL) | ||
465 | #define MX51_PAD_CSPI1_SS1__ECSPI1_SS1 IOMUX_PAD(0x60c, 0x21c, 0, __NA_, 0, MX51_ECSPI_PAD_CTRL) | ||
466 | #define MX51_PAD_CSPI1_SS1__GPIO4_25 IOMUX_PAD(0x60c, 0x21c, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
467 | #define MX51_PAD_CSPI1_RDY__AUD4_TXFS IOMUX_PAD(0x610, 0x220, 1, 0x8d0, 1, NO_PAD_CTRL) | ||
468 | #define MX51_PAD_CSPI1_RDY__ECSPI1_RDY IOMUX_PAD(0x610, 0x220, 0, __NA_, 0, MX51_ECSPI_PAD_CTRL) | ||
469 | #define MX51_PAD_CSPI1_RDY__GPIO4_26 IOMUX_PAD(0x610, 0x220, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
470 | #define MX51_PAD_CSPI1_SCLK__ECSPI1_SCLK IOMUX_PAD(0x614, 0x224, 0, __NA_, 0, MX51_ECSPI_PAD_CTRL) | ||
471 | #define MX51_PAD_CSPI1_SCLK__GPIO4_27 IOMUX_PAD(0x614, 0x224, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
472 | #define MX51_PAD_CSPI1_SCLK__I2C1_SCL IOMUX_PAD(0x614, 0x224, 0x11, 0x9b0, 1, MX51_I2C_PAD_CTRL) | ||
473 | #define MX51_PAD_UART1_RXD__GPIO4_28 IOMUX_PAD(0x618, 0x228, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
474 | #define MX51_PAD_UART1_RXD__UART1_RXD IOMUX_PAD(0x618, 0x228, 0, 0x9e4, 0, MX51_UART_PAD_CTRL) | ||
475 | #define MX51_PAD_UART1_TXD__GPIO4_29 IOMUX_PAD(0x61c, 0x22c, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
476 | #define MX51_PAD_UART1_TXD__PWM2_PWMO IOMUX_PAD(0x61c, 0x22c, 1, __NA_, 0, NO_PAD_CTRL) | ||
477 | #define MX51_PAD_UART1_TXD__UART1_TXD IOMUX_PAD(0x61c, 0x22c, 0, __NA_, 0, MX51_UART_PAD_CTRL) | ||
478 | #define MX51_PAD_UART1_RTS__GPIO4_30 IOMUX_PAD(0x620, 0x230, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
479 | #define MX51_PAD_UART1_RTS__UART1_RTS IOMUX_PAD(0x620, 0x230, 0, 0x9e0, 0, MX51_UART_PAD_CTRL) | ||
480 | #define MX51_PAD_UART1_CTS__GPIO4_31 IOMUX_PAD(0x624, 0x234, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
481 | #define MX51_PAD_UART1_CTS__UART1_CTS IOMUX_PAD(0x624, 0x234, 0, __NA_, 0, MX51_UART_PAD_CTRL) | ||
482 | #define MX51_PAD_UART2_RXD__FIRI_TXD IOMUX_PAD(0x628, 0x238, 1, __NA_, 0, NO_PAD_CTRL) | ||
483 | #define MX51_PAD_UART2_RXD__GPIO1_20 IOMUX_PAD(0x628, 0x238, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
484 | #define MX51_PAD_UART2_RXD__UART2_RXD IOMUX_PAD(0x628, 0x238, 0, 0x9ec, 2, MX51_UART_PAD_CTRL) | ||
485 | #define MX51_PAD_UART2_TXD__FIRI_RXD IOMUX_PAD(0x62c, 0x23c, 1, __NA_, 0, NO_PAD_CTRL) | ||
486 | #define MX51_PAD_UART2_TXD__GPIO1_21 IOMUX_PAD(0x62c, 0x23c, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
487 | #define MX51_PAD_UART2_TXD__UART2_TXD IOMUX_PAD(0x62c, 0x23c, 0, __NA_, 0, MX51_UART_PAD_CTRL) | ||
488 | #define MX51_PAD_UART3_RXD__CSI1_D0 IOMUX_PAD(0x630, 0x240, 2, __NA_, 0, NO_PAD_CTRL) | ||
489 | #define MX51_PAD_UART3_RXD__GPIO1_22 IOMUX_PAD(0x630, 0x240, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
490 | #define MX51_PAD_UART3_RXD__UART1_DTR IOMUX_PAD(0x630, 0x240, 0, __NA_, 0, NO_PAD_CTRL) | ||
491 | #define MX51_PAD_UART3_RXD__UART3_RXD IOMUX_PAD(0x630, 0x240, 1, 0x9f4, 4, MX51_UART_PAD_CTRL) | ||
492 | #define MX51_PAD_UART3_TXD__CSI1_D1 IOMUX_PAD(0x634, 0x244, 2, __NA_, 0, NO_PAD_CTRL) | ||
493 | #define MX51_PAD_UART3_TXD__GPIO1_23 IOMUX_PAD(0x634, 0x244, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
494 | #define MX51_PAD_UART3_TXD__UART1_DSR IOMUX_PAD(0x634, 0x244, 0, __NA_, 0, MX51_UART_PAD_CTRL) | ||
495 | #define MX51_PAD_UART3_TXD__UART3_TXD IOMUX_PAD(0x634, 0x244, 1, __NA_, 0, MX51_UART_PAD_CTRL) | ||
496 | #define MX51_PAD_OWIRE_LINE__GPIO1_24 IOMUX_PAD(0x638, 0x248, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
497 | #define MX51_PAD_OWIRE_LINE__OWIRE_LINE IOMUX_PAD(0x638, 0x248, 0, __NA_, 0, NO_PAD_CTRL) | ||
498 | #define MX51_PAD_OWIRE_LINE__SPDIF_OUT IOMUX_PAD(0x638, 0x248, 6, __NA_, 0, NO_PAD_CTRL) | ||
499 | #define MX51_PAD_KEY_ROW0__KEY_ROW0 IOMUX_PAD(0x63c, 0x24c, 0, __NA_, 0, NO_PAD_CTRL) | ||
500 | #define MX51_PAD_KEY_ROW1__KEY_ROW1 IOMUX_PAD(0x640, 0x250, 0, __NA_, 0, NO_PAD_CTRL) | ||
501 | #define MX51_PAD_KEY_ROW2__KEY_ROW2 IOMUX_PAD(0x644, 0x254, 0, __NA_, 0, NO_PAD_CTRL) | ||
502 | #define MX51_PAD_KEY_ROW3__KEY_ROW3 IOMUX_PAD(0x648, 0x258, 0, __NA_, 0, NO_PAD_CTRL) | ||
503 | #define MX51_PAD_KEY_COL0__KEY_COL0 IOMUX_PAD(0x64c, 0x25c, 0, __NA_, 0, NO_PAD_CTRL) | ||
504 | #define MX51_PAD_KEY_COL0__PLL1_BYP IOMUX_PAD(0x64c, 0x25c, 7, 0x90c, 0, NO_PAD_CTRL) | ||
505 | #define MX51_PAD_KEY_COL1__KEY_COL1 IOMUX_PAD(0x650, 0x260, 0, __NA_, 0, NO_PAD_CTRL) | ||
506 | #define MX51_PAD_KEY_COL1__PLL2_BYP IOMUX_PAD(0x650, 0x260, 7, 0x910, 0, NO_PAD_CTRL) | ||
507 | #define MX51_PAD_KEY_COL2__KEY_COL2 IOMUX_PAD(0x654, 0x264, 0, __NA_, 0, NO_PAD_CTRL) | ||
508 | #define MX51_PAD_KEY_COL2__PLL3_BYP IOMUX_PAD(0x654, 0x264, 7, __NA_, 0, NO_PAD_CTRL) | ||
509 | #define MX51_PAD_KEY_COL3__KEY_COL3 IOMUX_PAD(0x658, 0x268, 0, __NA_, 0, NO_PAD_CTRL) | ||
510 | #define MX51_PAD_KEY_COL4__I2C2_SCL IOMUX_PAD(0x65c, 0x26c, 0x13, 0x9b8, 1, MX51_I2C_PAD_CTRL) | ||
511 | #define MX51_PAD_KEY_COL4__KEY_COL4 IOMUX_PAD(0x65c, 0x26c, 0, __NA_, 0, NO_PAD_CTRL) | ||
512 | #define MX51_PAD_KEY_COL4__SPDIF_OUT1 IOMUX_PAD(0x65c, 0x26c, 6, __NA_, 0, NO_PAD_CTRL) | ||
513 | #define MX51_PAD_KEY_COL4__UART1_RI IOMUX_PAD(0x65c, 0x26c, 1, __NA_, 0, MX51_UART_PAD_CTRL) | ||
514 | #define MX51_PAD_KEY_COL4__UART3_RTS IOMUX_PAD(0x65c, 0x26c, 2, 0x9f0, 4, MX51_UART_PAD_CTRL) | ||
515 | #define MX51_PAD_KEY_COL5__I2C2_SDA IOMUX_PAD(0x660, 0x270, 0x13, 0x9bc, 1, MX51_I2C_PAD_CTRL) | ||
516 | #define MX51_PAD_KEY_COL5__KEY_COL5 IOMUX_PAD(0x660, 0x270, 0, __NA_, 0, NO_PAD_CTRL) | ||
517 | #define MX51_PAD_KEY_COL5__UART1_DCD IOMUX_PAD(0x660, 0x270, 1, __NA_, 0, MX51_UART_PAD_CTRL) | ||
518 | #define MX51_PAD_KEY_COL5__UART3_CTS IOMUX_PAD(0x660, 0x270, 2, __NA_, 0, MX51_UART_PAD_CTRL) | ||
519 | #define MX51_PAD_USBH1_CLK__CSPI_SCLK IOMUX_PAD(0x678, 0x278, 1, 0x914, 1, MX51_ECSPI_PAD_CTRL) | ||
520 | #define MX51_PAD_USBH1_CLK__GPIO1_25 IOMUX_PAD(0x678, 0x278, 2, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
521 | #define MX51_PAD_USBH1_CLK__I2C2_SCL IOMUX_PAD(0x678, 0x278, 0x15, 0x9b8, 2, MX51_I2C_PAD_CTRL) | ||
522 | #define MX51_PAD_USBH1_CLK__USBH1_CLK IOMUX_PAD(0x678, 0x278, 0, __NA_, 0, MX51_USBH1_PAD_CTRL) | ||
523 | #define MX51_PAD_USBH1_DIR__CSPI_MOSI IOMUX_PAD(0x67c, 0x27c, 1, 0x91c, 1, MX51_ECSPI_PAD_CTRL) | ||
524 | #define MX51_PAD_USBH1_DIR__GPIO1_26 IOMUX_PAD(0x67c, 0x27c, 2, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
525 | #define MX51_PAD_USBH1_DIR__I2C2_SDA IOMUX_PAD(0x67c, 0x27c, 0x15, 0x9bc, 2, MX51_I2C_PAD_CTRL) | ||
526 | #define MX51_PAD_USBH1_DIR__USBH1_DIR IOMUX_PAD(0x67c, 0x27c, 0, __NA_, 0, MX51_USBH1_PAD_CTRL) | ||
527 | #define MX51_PAD_USBH1_STP__CSPI_RDY IOMUX_PAD(0x680, 0x280, 1, __NA_, 0, MX51_ECSPI_PAD_CTRL) | ||
528 | #define MX51_PAD_USBH1_STP__GPIO1_27 IOMUX_PAD(0x680, 0x280, 2, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
529 | #define MX51_PAD_USBH1_STP__UART3_RXD IOMUX_PAD(0x680, 0x280, 5, 0x9f4, 6, MX51_UART_PAD_CTRL) | ||
530 | #define MX51_PAD_USBH1_STP__USBH1_STP IOMUX_PAD(0x680, 0x280, 0, __NA_, 0, MX51_USBH1_PAD_CTRL) | ||
531 | #define MX51_PAD_USBH1_NXT__CSPI_MISO IOMUX_PAD(0x684, 0x284, 1, 0x918, 0, MX51_ECSPI_PAD_CTRL) | ||
532 | #define MX51_PAD_USBH1_NXT__GPIO1_28 IOMUX_PAD(0x684, 0x284, 2, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
533 | #define MX51_PAD_USBH1_NXT__UART3_TXD IOMUX_PAD(0x684, 0x284, 5, __NA_, 0, MX51_UART_PAD_CTRL) | ||
534 | #define MX51_PAD_USBH1_NXT__USBH1_NXT IOMUX_PAD(0x684, 0x284, 0, __NA_, 0, MX51_USBH1_PAD_CTRL) | ||
535 | #define MX51_PAD_USBH1_DATA0__GPIO1_11 IOMUX_PAD(0x688, 0x288, 2, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
536 | #define MX51_PAD_USBH1_DATA0__UART2_CTS IOMUX_PAD(0x688, 0x288, 1, __NA_, 0, MX51_UART_PAD_CTRL) | ||
537 | #define MX51_PAD_USBH1_DATA0__USBH1_DATA0 IOMUX_PAD(0x688, 0x288, 0, __NA_, 0, MX51_USBH1_PAD_CTRL) | ||
538 | #define MX51_PAD_USBH1_DATA1__GPIO1_12 IOMUX_PAD(0x68c, 0x28c, 2, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
539 | #define MX51_PAD_USBH1_DATA1__UART2_RXD IOMUX_PAD(0x68c, 0x28c, 1, 0x9ec, 4, MX51_UART_PAD_CTRL) | ||
540 | #define MX51_PAD_USBH1_DATA1__USBH1_DATA1 IOMUX_PAD(0x68c, 0x28c, 0, __NA_, 0, MX51_USBH1_PAD_CTRL) | ||
541 | #define MX51_PAD_USBH1_DATA2__GPIO1_13 IOMUX_PAD(0x690, 0x290, 2, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
542 | #define MX51_PAD_USBH1_DATA2__UART2_TXD IOMUX_PAD(0x690, 0x290, 1, __NA_, 0, MX51_UART_PAD_CTRL) | ||
543 | #define MX51_PAD_USBH1_DATA2__USBH1_DATA2 IOMUX_PAD(0x690, 0x290, 0, __NA_, 0, MX51_USBH1_PAD_CTRL) | ||
544 | #define MX51_PAD_USBH1_DATA3__GPIO1_14 IOMUX_PAD(0x694, 0x294, 2, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
545 | #define MX51_PAD_USBH1_DATA3__UART2_RTS IOMUX_PAD(0x694, 0x294, 1, 0x9e8, 5, MX51_UART_PAD_CTRL) | ||
546 | #define MX51_PAD_USBH1_DATA3__USBH1_DATA3 IOMUX_PAD(0x694, 0x294, 0, __NA_, 0, MX51_USBH1_PAD_CTRL) | ||
547 | #define MX51_PAD_USBH1_DATA4__CSPI_SS0 IOMUX_PAD(0x698, 0x298, 1, __NA_, 0, MX51_ECSPI_PAD_CTRL) | ||
548 | #define MX51_PAD_USBH1_DATA4__GPIO1_15 IOMUX_PAD(0x698, 0x298, 2, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
549 | #define MX51_PAD_USBH1_DATA4__USBH1_DATA4 IOMUX_PAD(0x698, 0x298, 0, __NA_, 0, MX51_USBH1_PAD_CTRL) | ||
550 | #define MX51_PAD_USBH1_DATA5__CSPI_SS1 IOMUX_PAD(0x69c, 0x29c, 1, 0x920, 0, MX51_ECSPI_PAD_CTRL) | ||
551 | #define MX51_PAD_USBH1_DATA5__GPIO1_16 IOMUX_PAD(0x69c, 0x29c, 2, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
552 | #define MX51_PAD_USBH1_DATA5__USBH1_DATA5 IOMUX_PAD(0x69c, 0x29c, 0, __NA_, 0, MX51_USBH1_PAD_CTRL) | ||
553 | #define MX51_PAD_USBH1_DATA6__CSPI_SS3 IOMUX_PAD(0x6a0, 0x2a0, 1, 0x928, 1, MX51_ECSPI_PAD_CTRL) | ||
554 | #define MX51_PAD_USBH1_DATA6__GPIO1_17 IOMUX_PAD(0x6a0, 0x2a0, 2, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
555 | #define MX51_PAD_USBH1_DATA6__USBH1_DATA6 IOMUX_PAD(0x6a0, 0x2a0, 0, __NA_, 0, MX51_USBH1_PAD_CTRL) | ||
556 | #define MX51_PAD_USBH1_DATA7__ECSPI1_SS3 IOMUX_PAD(0x6a4, 0x2a4, 1, __NA_, 0, MX51_ECSPI_PAD_CTRL) | ||
557 | #define MX51_PAD_USBH1_DATA7__ECSPI2_SS3 IOMUX_PAD(0x6a4, 0x2a4, 5, 0x934, 1, MX51_ECSPI_PAD_CTRL) | ||
558 | #define MX51_PAD_USBH1_DATA7__GPIO1_18 IOMUX_PAD(0x6a4, 0x2a4, 2, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
559 | #define MX51_PAD_USBH1_DATA7__USBH1_DATA7 IOMUX_PAD(0x6a4, 0x2a4, 0, __NA_, 0, MX51_USBH1_PAD_CTRL) | ||
560 | #define MX51_PAD_DI1_PIN11__DI1_PIN11 IOMUX_PAD(0x6a8, 0x2a8, 0, __NA_, 0, NO_PAD_CTRL) | ||
561 | #define MX51_PAD_DI1_PIN11__ECSPI1_SS2 IOMUX_PAD(0x6a8, 0x2a8, 7, __NA_, 0, MX51_ECSPI_PAD_CTRL) | ||
562 | #define MX51_PAD_DI1_PIN11__GPIO3_0 IOMUX_PAD(0x6a8, 0x2a8, 4, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
563 | #define MX51_PAD_DI1_PIN12__DI1_PIN12 IOMUX_PAD(0x6ac, 0x2ac, 0, __NA_, 0, NO_PAD_CTRL) | ||
564 | #define MX51_PAD_DI1_PIN12__GPIO3_1 IOMUX_PAD(0x6ac, 0x2ac, 4, 0x978, 1, MX51_GPIO_PAD_CTRL) | ||
565 | #define MX51_PAD_DI1_PIN13__DI1_PIN13 IOMUX_PAD(0x6b0, 0x2b0, 0, __NA_, 0, NO_PAD_CTRL) | ||
566 | #define MX51_PAD_DI1_PIN13__GPIO3_2 IOMUX_PAD(0x6b0, 0x2b0, 4, 0x97c, 1, MX51_GPIO_PAD_CTRL) | ||
567 | #define MX51_PAD_DI1_D0_CS__DI1_D0_CS IOMUX_PAD(0x6b4, 0x2b4, 0, __NA_, 0, NO_PAD_CTRL) | ||
568 | #define MX51_PAD_DI1_D0_CS__GPIO3_3 IOMUX_PAD(0x6b4, 0x2b4, 4, 0x980, 1, MX51_GPIO_PAD_CTRL) | ||
569 | #define MX51_PAD_DI1_D1_CS__DI1_D1_CS IOMUX_PAD(0x6b8, 0x2b8, 0, __NA_, 0, NO_PAD_CTRL) | ||
570 | #define MX51_PAD_DI1_D1_CS__DISP1_PIN14 IOMUX_PAD(0x6b8, 0x2b8, 2, __NA_, 0, NO_PAD_CTRL) | ||
571 | #define MX51_PAD_DI1_D1_CS__DISP1_PIN5 IOMUX_PAD(0x6b8, 0x2b8, 3, __NA_, 0, NO_PAD_CTRL) | ||
572 | #define MX51_PAD_DI1_D1_CS__GPIO3_4 IOMUX_PAD(0x6b8, 0x2b8, 4, 0x984, 1, MX51_GPIO_PAD_CTRL) | ||
573 | #define MX51_PAD_DISPB2_SER_DIN__DISP1_PIN1 IOMUX_PAD(0x6bc, 0x2bc, 2, 0x9a4, 1, NO_PAD_CTRL) | ||
574 | #define MX51_PAD_DISPB2_SER_DIN__DISPB2_SER_DIN IOMUX_PAD(0x6bc, 0x2bc, 0, 0x9c4, 0, NO_PAD_CTRL) | ||
575 | #define MX51_PAD_DISPB2_SER_DIN__GPIO3_5 IOMUX_PAD(0x6bc, 0x2bc, 4, 0x988, 1, MX51_GPIO_PAD_CTRL) | ||
576 | #define MX51_PAD_DISPB2_SER_DIO__DISP1_PIN6 IOMUX_PAD(0x6c0, 0x2c0, 3, __NA_, 0, NO_PAD_CTRL) | ||
577 | #define MX51_PAD_DISPB2_SER_DIO__DISPB2_SER_DIO IOMUX_PAD(0x6c0, 0x2c0, 0, 0x9c4, 1, NO_PAD_CTRL) | ||
578 | #define MX51_PAD_DISPB2_SER_DIO__GPIO3_6 IOMUX_PAD(0x6c0, 0x2c0, 4, 0x98c, 1, MX51_GPIO_PAD_CTRL) | ||
579 | #define MX51_PAD_DISPB2_SER_CLK__DISP1_PIN17 IOMUX_PAD(0x6c4, 0x2c4, 2, __NA_, 0, NO_PAD_CTRL) | ||
580 | #define MX51_PAD_DISPB2_SER_CLK__DISP1_PIN7 IOMUX_PAD(0x6c4, 0x2c4, 3, __NA_, 0, NO_PAD_CTRL) | ||
581 | #define MX51_PAD_DISPB2_SER_CLK__DISPB2_SER_CLK IOMUX_PAD(0x6c4, 0x2c4, 0, __NA_, 0, NO_PAD_CTRL) | ||
582 | #define MX51_PAD_DISPB2_SER_CLK__GPIO3_7 IOMUX_PAD(0x6c4, 0x2c4, 4, 0x990, 1, MX51_GPIO_PAD_CTRL) | ||
583 | #define MX51_PAD_DISPB2_SER_RS__DISP1_EXT_CLK IOMUX_PAD(0x6c8, 0x2c8, 2, __NA_, 0, NO_PAD_CTRL) | ||
584 | #define MX51_PAD_DISPB2_SER_RS__DISP1_PIN16 IOMUX_PAD(0x6c8, 0x2c8, 2, __NA_, 0, NO_PAD_CTRL) | ||
585 | #define MX51_PAD_DISPB2_SER_RS__DISP1_PIN8 IOMUX_PAD(0x6c8, 0x2c8, 3, __NA_, 0, NO_PAD_CTRL) | ||
586 | #define MX51_PAD_DISPB2_SER_RS__DISPB2_SER_RS IOMUX_PAD(0x6c8, 0x2c8, 0, __NA_, 0, NO_PAD_CTRL) | ||
587 | #define MX51_PAD_DISPB2_SER_RS__DISPB2_SER_RS IOMUX_PAD(0x6c8, 0x2c8, 0, __NA_, 0, NO_PAD_CTRL) | ||
588 | #define MX51_PAD_DISPB2_SER_RS__GPIO3_8 IOMUX_PAD(0x6c8, 0x2c8, 4, 0x994, 1, MX51_GPIO_PAD_CTRL) | ||
589 | #define MX51_PAD_DISP1_DAT0__DISP1_DAT0 IOMUX_PAD(0x6cc, 0x2cc, 0, __NA_, 0, NO_PAD_CTRL) | ||
590 | #define MX51_PAD_DISP1_DAT1__DISP1_DAT1 IOMUX_PAD(0x6d0, 0x2d0, 0, __NA_, 0, NO_PAD_CTRL) | ||
591 | #define MX51_PAD_DISP1_DAT2__DISP1_DAT2 IOMUX_PAD(0x6d4, 0x2d4, 0, __NA_, 0, NO_PAD_CTRL) | ||
592 | #define MX51_PAD_DISP1_DAT3__DISP1_DAT3 IOMUX_PAD(0x6d8, 0x2d8, 0, __NA_, 0, NO_PAD_CTRL) | ||
593 | #define MX51_PAD_DISP1_DAT4__DISP1_DAT4 IOMUX_PAD(0x6dc, 0x2dc, 0, __NA_, 0, NO_PAD_CTRL) | ||
594 | #define MX51_PAD_DISP1_DAT5__DISP1_DAT5 IOMUX_PAD(0x6e0, 0x2e0, 0, __NA_, 0, NO_PAD_CTRL) | ||
595 | #define MX51_PAD_DISP1_DAT6__BOOT_USB_SRC IOMUX_PAD(0x6e4, 0x2e4, 7, __NA_, 0, NO_PAD_CTRL) | ||
596 | #define MX51_PAD_DISP1_DAT6__DISP1_DAT6 IOMUX_PAD(0x6e4, 0x2e4, 0, __NA_, 0, NO_PAD_CTRL) | ||
597 | #define MX51_PAD_DISP1_DAT7__BOOT_EEPROM_CFG IOMUX_PAD(0x6e8, 0x2e8, 7, __NA_, 0, NO_PAD_CTRL) | ||
598 | #define MX51_PAD_DISP1_DAT7__DISP1_DAT7 IOMUX_PAD(0x6e8, 0x2e8, 0, __NA_, 0, NO_PAD_CTRL) | ||
599 | #define MX51_PAD_DISP1_DAT8__BOOT_SRC0 IOMUX_PAD(0x6ec, 0x2ec, 7, __NA_, 0, NO_PAD_CTRL) | ||
600 | #define MX51_PAD_DISP1_DAT8__DISP1_DAT8 IOMUX_PAD(0x6ec, 0x2ec, 0, __NA_, 0, NO_PAD_CTRL) | ||
601 | #define MX51_PAD_DISP1_DAT9__BOOT_SRC1 IOMUX_PAD(0x6f0, 0x2f0, 7, __NA_, 0, NO_PAD_CTRL) | ||
602 | #define MX51_PAD_DISP1_DAT9__DISP1_DAT9 IOMUX_PAD(0x6f0, 0x2f0, 0, __NA_, 0, NO_PAD_CTRL) | ||
603 | #define MX51_PAD_DISP1_DAT10__BOOT_SPARE_SIZE IOMUX_PAD(0x6f4, 0x2f4, 7, __NA_, 0, NO_PAD_CTRL) | ||
604 | #define MX51_PAD_DISP1_DAT10__DISP1_DAT10 IOMUX_PAD(0x6f4, 0x2f4, 0, __NA_, 0, NO_PAD_CTRL) | ||
605 | #define MX51_PAD_DISP1_DAT11__BOOT_LPB_FREQ2 IOMUX_PAD(0x6f8, 0x2f8, 7, __NA_, 0, NO_PAD_CTRL) | ||
606 | #define MX51_PAD_DISP1_DAT11__DISP1_DAT11 IOMUX_PAD(0x6f8, 0x2f8, 0, __NA_, 0, NO_PAD_CTRL) | ||
607 | #define MX51_PAD_DISP1_DAT12__BOOT_MLC_SEL IOMUX_PAD(0x6fc, 0x2fc, 7, __NA_, 0, NO_PAD_CTRL) | ||
608 | #define MX51_PAD_DISP1_DAT12__DISP1_DAT12 IOMUX_PAD(0x6fc, 0x2fc, 0, __NA_, 0, NO_PAD_CTRL) | ||
609 | #define MX51_PAD_DISP1_DAT13__BOOT_MEM_CTL0 IOMUX_PAD(0x700, 0x300, 7, __NA_, 0, NO_PAD_CTRL) | ||
610 | #define MX51_PAD_DISP1_DAT13__DISP1_DAT13 IOMUX_PAD(0x700, 0x300, 0, __NA_, 0, NO_PAD_CTRL) | ||
611 | #define MX51_PAD_DISP1_DAT14__BOOT_MEM_CTL1 IOMUX_PAD(0x704, 0x304, 7, __NA_, 0, NO_PAD_CTRL) | ||
612 | #define MX51_PAD_DISP1_DAT14__DISP1_DAT14 IOMUX_PAD(0x704, 0x304, 0, __NA_, 0, NO_PAD_CTRL) | ||
613 | #define MX51_PAD_DISP1_DAT15__BOOT_BUS_WIDTH IOMUX_PAD(0x708, 0x308, 7, __NA_, 0, NO_PAD_CTRL) | ||
614 | #define MX51_PAD_DISP1_DAT15__DISP1_DAT15 IOMUX_PAD(0x708, 0x308, 0, __NA_, 0, NO_PAD_CTRL) | ||
615 | #define MX51_PAD_DISP1_DAT16__BOOT_PAGE_SIZE0 IOMUX_PAD(0x70c, 0x30c, 7, __NA_, 0, NO_PAD_CTRL) | ||
616 | #define MX51_PAD_DISP1_DAT16__DISP1_DAT16 IOMUX_PAD(0x70c, 0x30c, 0, __NA_, 0, NO_PAD_CTRL) | ||
617 | #define MX51_PAD_DISP1_DAT17__BOOT_PAGE_SIZE1 IOMUX_PAD(0x710, 0x310, 7, __NA_, 0, NO_PAD_CTRL) | ||
618 | #define MX51_PAD_DISP1_DAT17__DISP1_DAT17 IOMUX_PAD(0x710, 0x310, 0, __NA_, 0, NO_PAD_CTRL) | ||
619 | #define MX51_PAD_DISP1_DAT18__BOOT_WEIM_MUXED0 IOMUX_PAD(0x714, 0x314, 7, __NA_, 0, NO_PAD_CTRL) | ||
620 | #define MX51_PAD_DISP1_DAT18__DISP1_DAT18 IOMUX_PAD(0x714, 0x314, 0, __NA_, 0, NO_PAD_CTRL) | ||
621 | #define MX51_PAD_DISP1_DAT18__DISP2_PIN11 IOMUX_PAD(0x714, 0x314, 5, __NA_, 0, NO_PAD_CTRL) | ||
622 | #define MX51_PAD_DISP1_DAT18__DISP2_PIN5 IOMUX_PAD(0x714, 0x314, 4, __NA_, 0, NO_PAD_CTRL) | ||
623 | #define MX51_PAD_DISP1_DAT19__BOOT_WEIM_MUXED1 IOMUX_PAD(0x718, 0x318, 7, __NA_, 0, NO_PAD_CTRL) | ||
624 | #define MX51_PAD_DISP1_DAT19__DISP1_DAT19 IOMUX_PAD(0x718, 0x318, 0, __NA_, 0, NO_PAD_CTRL) | ||
625 | #define MX51_PAD_DISP1_DAT19__DISP2_PIN12 IOMUX_PAD(0x718, 0x318, 5, __NA_, 0, NO_PAD_CTRL) | ||
626 | #define MX51_PAD_DISP1_DAT19__DISP2_PIN6 IOMUX_PAD(0x718, 0x318, 4, __NA_, 0, NO_PAD_CTRL) | ||
627 | #define MX51_PAD_DISP1_DAT20__BOOT_MEM_TYPE0 IOMUX_PAD(0x71c, 0x31c, 7, __NA_, 0, NO_PAD_CTRL) | ||
628 | #define MX51_PAD_DISP1_DAT20__DISP1_DAT20 IOMUX_PAD(0x71c, 0x31c, 0, __NA_, 0, NO_PAD_CTRL) | ||
629 | #define MX51_PAD_DISP1_DAT20__DISP2_PIN13 IOMUX_PAD(0x71c, 0x31c, 5, __NA_, 0, NO_PAD_CTRL) | ||
630 | #define MX51_PAD_DISP1_DAT20__DISP2_PIN7 IOMUX_PAD(0x71c, 0x31c, 4, __NA_, 0, NO_PAD_CTRL) | ||
631 | #define MX51_PAD_DISP1_DAT21__BOOT_MEM_TYPE1 IOMUX_PAD(0x720, 0x320, 7, __NA_, 0, NO_PAD_CTRL) | ||
632 | #define MX51_PAD_DISP1_DAT21__DISP1_DAT21 IOMUX_PAD(0x720, 0x320, 0, __NA_, 0, NO_PAD_CTRL) | ||
633 | #define MX51_PAD_DISP1_DAT21__DISP2_PIN14 IOMUX_PAD(0x720, 0x320, 5, __NA_, 0, NO_PAD_CTRL) | ||
634 | #define MX51_PAD_DISP1_DAT21__DISP2_PIN8 IOMUX_PAD(0x720, 0x320, 4, __NA_, 0, NO_PAD_CTRL) | ||
635 | #define MX51_PAD_DISP1_DAT22__BOOT_LPB_FREQ0 IOMUX_PAD(0x724, 0x324, 7, __NA_, 0, NO_PAD_CTRL) | ||
636 | #define MX51_PAD_DISP1_DAT22__DISP1_DAT22 IOMUX_PAD(0x724, 0x324, 0, __NA_, 0, NO_PAD_CTRL) | ||
637 | #define MX51_PAD_DISP1_DAT22__DISP2_D0_CS IOMUX_PAD(0x724, 0x324, 6, __NA_, 0, NO_PAD_CTRL) | ||
638 | #define MX51_PAD_DISP1_DAT22__DISP2_DAT16 IOMUX_PAD(0x724, 0x324, 5, __NA_, 0, NO_PAD_CTRL) | ||
639 | #define MX51_PAD_DISP1_DAT23__BOOT_LPB_FREQ1 IOMUX_PAD(0x728, 0x328, 7, __NA_, 0, NO_PAD_CTRL) | ||
640 | #define MX51_PAD_DISP1_DAT23__DISP1_DAT23 IOMUX_PAD(0x728, 0x328, 0, __NA_, 0, NO_PAD_CTRL) | ||
641 | #define MX51_PAD_DISP1_DAT23__DISP2_D1_CS IOMUX_PAD(0x728, 0x328, 6, __NA_, 0, NO_PAD_CTRL) | ||
642 | #define MX51_PAD_DISP1_DAT23__DISP2_DAT17 IOMUX_PAD(0x728, 0x328, 5, __NA_, 0, NO_PAD_CTRL) | ||
643 | #define MX51_PAD_DISP1_DAT23__DISP2_SER_CS IOMUX_PAD(0x728, 0x328, 4, __NA_, 0, NO_PAD_CTRL) | ||
644 | #define MX51_PAD_DI1_PIN3__DI1_PIN3 IOMUX_PAD(0x72c, 0x32c, 0, __NA_, 0, NO_PAD_CTRL) | ||
645 | #define MX51_PAD_DI1_DISP_CLK__DI1_DISP_CLK IOMUX_PAD(0x730, __NA_, 0, __NA_, 0, NO_PAD_CTRL) | ||
646 | #define MX51_PAD_DI1_PIN2__DI1_PIN2 IOMUX_PAD(0x734, 0x330, 0, __NA_, 0, NO_PAD_CTRL) | ||
647 | #define MX51_PAD_DI1_PIN15__DI1_PIN15 IOMUX_PAD(0x738, __NA_, 0, __NA_, 0, NO_PAD_CTRL) | ||
648 | #define MX51_PAD_DI_GP2__DISP1_SER_CLK IOMUX_PAD(0x740, 0x338, 0, __NA_, 0, NO_PAD_CTRL) | ||
649 | #define MX51_PAD_DI_GP2__DISP2_WAIT IOMUX_PAD(0x740, 0x338, 2, 0x9a8, 1, NO_PAD_CTRL) | ||
650 | #define MX51_PAD_DI_GP3__CSI1_DATA_EN IOMUX_PAD(0x744, 0x33c, 3, 0x9a0, 1, NO_PAD_CTRL) | ||
651 | #define MX51_PAD_DI_GP3__DISP1_SER_DIO IOMUX_PAD(0x744, 0x33c, 0, 0x9c0, 0, NO_PAD_CTRL) | ||
652 | #define MX51_PAD_DI_GP3__FEC_TX_ER IOMUX_PAD(0x744, 0x33c, 2, __NA_, 0, MX51_PAD_CTRL_5) | ||
653 | #define MX51_PAD_DI2_PIN4__CSI2_DATA_EN IOMUX_PAD(0x748, 0x340, 3, 0x99c, 1, NO_PAD_CTRL) | ||
654 | #define MX51_PAD_DI2_PIN4__DI2_PIN4 IOMUX_PAD(0x748, 0x340, 0, __NA_, 0, NO_PAD_CTRL) | ||
655 | #define MX51_PAD_DI2_PIN4__FEC_CRS IOMUX_PAD(0x748, 0x340, 2, 0x950, 1, NO_PAD_CTRL) | ||
656 | #define MX51_PAD_DI2_PIN2__DI2_PIN2 IOMUX_PAD(0x74c, 0x344, 0, __NA_, 0, NO_PAD_CTRL) | ||
657 | #define MX51_PAD_DI2_PIN2__FEC_MDC IOMUX_PAD(0x74c, 0x344, 2, __NA_, 0, MX51_PAD_CTRL_5) | ||
658 | #define MX51_PAD_DI2_PIN3__DI2_PIN3 IOMUX_PAD(0x750, 0x348, 0, __NA_, 0, NO_PAD_CTRL) | ||
659 | #define MX51_PAD_DI2_PIN3__FEC_MDIO IOMUX_PAD(0x750, 0x348, 2, 0x954, 1, NO_PAD_CTRL) | ||
660 | #define MX51_PAD_DI2_DISP_CLK__DI2_DISP_CLK IOMUX_PAD(0x754, 0x34c, 0, __NA_, 0, NO_PAD_CTRL) | ||
661 | #define MX51_PAD_DI2_DISP_CLK__FEC_RDATA1 IOMUX_PAD(0x754, 0x34c, 2, 0x95c, 1, NO_PAD_CTRL) | ||
662 | #define MX51_PAD_DI_GP4__DI2_PIN15 IOMUX_PAD(0x758, 0x350, 4, __NA_, 0, NO_PAD_CTRL) | ||
663 | #define MX51_PAD_DI_GP4__DISP1_SER_DIN IOMUX_PAD(0x758, 0x350, 0, 0x9c0, 1, NO_PAD_CTRL) | ||
664 | #define MX51_PAD_DI_GP4__DISP2_PIN1 IOMUX_PAD(0x758, 0x350, 3, __NA_, 0, NO_PAD_CTRL) | ||
665 | #define MX51_PAD_DI_GP4__FEC_RDATA2 IOMUX_PAD(0x758, 0x350, 2, 0x960, 1, NO_PAD_CTRL) | ||
666 | #define MX51_PAD_DISP2_DAT0__DISP2_DAT0 IOMUX_PAD(0x75c, 0x354, 0, __NA_, 0, NO_PAD_CTRL) | ||
667 | #define MX51_PAD_DISP2_DAT0__FEC_RDATA3 IOMUX_PAD(0x75c, 0x354, 2, 0x964, 1, NO_PAD_CTRL) | ||
668 | #define MX51_PAD_DISP2_DAT0__KEY_COL6 IOMUX_PAD(0x75c, 0x354, 4, 0x9c8, 1, NO_PAD_CTRL) | ||
669 | #define MX51_PAD_DISP2_DAT0__UART3_RXD IOMUX_PAD(0x75c, 0x354, 5, 0x9f4, 8, MX51_UART_PAD_CTRL) | ||
670 | #define MX51_PAD_DISP2_DAT0__USBH3_CLK IOMUX_PAD(0x75c, 0x354, 3, 0x9f8, 1, MX51_UART_PAD_CTRL) | ||
671 | #define MX51_PAD_DISP2_DAT1__DISP2_DAT1 IOMUX_PAD(0x760, 0x358, 0, __NA_, 0, NO_PAD_CTRL) | ||
672 | #define MX51_PAD_DISP2_DAT1__FEC_RX_ER IOMUX_PAD(0x760, 0x358, 2, 0x970, 1, NO_PAD_CTRL) | ||
673 | #define MX51_PAD_DISP2_DAT1__KEY_COL7 IOMUX_PAD(0x760, 0x358, 4, 0x9cc, 1, NO_PAD_CTRL) | ||
674 | #define MX51_PAD_DISP2_DAT1__UART3_TXD IOMUX_PAD(0x760, 0x358, 5, __NA_, 0, MX51_UART_PAD_CTRL) | ||
675 | #define MX51_PAD_DISP2_DAT1__USBH3_DIR IOMUX_PAD(0x760, 0x358, 3, 0xa1c, 1, NO_PAD_CTRL) | ||
676 | #define MX51_PAD_DISP2_DAT2__DISP2_DAT2 IOMUX_PAD(0x764, 0x35c, 0, __NA_, 0, NO_PAD_CTRL) | ||
677 | #define MX51_PAD_DISP2_DAT3__DISP2_DAT3 IOMUX_PAD(0x768, 0x360, 0, __NA_, 0, NO_PAD_CTRL) | ||
678 | #define MX51_PAD_DISP2_DAT4__DISP2_DAT4 IOMUX_PAD(0x76c, 0x364, 0, __NA_, 0, NO_PAD_CTRL) | ||
679 | #define MX51_PAD_DISP2_DAT5__DISP2_DAT5 IOMUX_PAD(0x770, 0x368, 0, __NA_, 0, NO_PAD_CTRL) | ||
680 | #define MX51_PAD_DISP2_DAT6__DISP2_DAT6 IOMUX_PAD(0x774, 0x36c, 0, __NA_, 0, NO_PAD_CTRL) | ||
681 | #define MX51_PAD_DISP2_DAT6__FEC_TDATA1 IOMUX_PAD(0x774, 0x36c, 2, __NA_, 0, MX51_PAD_CTRL_5) | ||
682 | #define MX51_PAD_DISP2_DAT6__GPIO1_19 IOMUX_PAD(0x774, 0x36c, 5, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
683 | #define MX51_PAD_DISP2_DAT6__KEY_ROW4 IOMUX_PAD(0x774, 0x36c, 4, 0x9d0, 1, NO_PAD_CTRL) | ||
684 | #define MX51_PAD_DISP2_DAT6__USBH3_STP IOMUX_PAD(0x774, 0x36c, 3, 0xa24, 1, NO_PAD_CTRL) | ||
685 | #define MX51_PAD_DISP2_DAT7__DISP2_DAT7 IOMUX_PAD(0x778, 0x370, 0, __NA_, 0, NO_PAD_CTRL) | ||
686 | #define MX51_PAD_DISP2_DAT7__FEC_TDATA2 IOMUX_PAD(0x778, 0x370, 2, __NA_, 0, MX51_PAD_CTRL_5) | ||
687 | #define MX51_PAD_DISP2_DAT7__GPIO1_29 IOMUX_PAD(0x778, 0x370, 5, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
688 | #define MX51_PAD_DISP2_DAT7__KEY_ROW5 IOMUX_PAD(0x778, 0x370, 4, 0x9d4, 1, NO_PAD_CTRL) | ||
689 | #define MX51_PAD_DISP2_DAT7__USBH3_NXT IOMUX_PAD(0x778, 0x370, 3, 0xa20, 1, NO_PAD_CTRL) | ||
690 | #define MX51_PAD_DISP2_DAT8__DISP2_DAT8 IOMUX_PAD(0x77c, 0x374, 0, __NA_, 0, NO_PAD_CTRL) | ||
691 | #define MX51_PAD_DISP2_DAT8__FEC_TDATA3 IOMUX_PAD(0x77c, 0x374, 2, __NA_, 0, MX51_PAD_CTRL_5) | ||
692 | #define MX51_PAD_DISP2_DAT8__GPIO1_30 IOMUX_PAD(0x77c, 0x374, 5, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
693 | #define MX51_PAD_DISP2_DAT8__KEY_ROW6 IOMUX_PAD(0x77c, 0x374, 4, 0x9d8, 1, NO_PAD_CTRL) | ||
694 | #define MX51_PAD_DISP2_DAT8__USBH3_DATA0 IOMUX_PAD(0x77c, 0x374, 3, 0x9fc, 1, NO_PAD_CTRL) | ||
695 | #define MX51_PAD_DISP2_DAT9__AUD6_RXC IOMUX_PAD(0x780, 0x378, 4, 0x8f4, 1, NO_PAD_CTRL) | ||
696 | #define MX51_PAD_DISP2_DAT9__DISP2_DAT9 IOMUX_PAD(0x780, 0x378, 0, __NA_, 0, NO_PAD_CTRL) | ||
697 | #define MX51_PAD_DISP2_DAT9__FEC_TX_EN IOMUX_PAD(0x780, 0x378, 2, __NA_, 0, MX51_PAD_CTRL_5) | ||
698 | #define MX51_PAD_DISP2_DAT9__GPIO1_31 IOMUX_PAD(0x780, 0x378, 5, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
699 | #define MX51_PAD_DISP2_DAT9__USBH3_DATA1 IOMUX_PAD(0x780, 0x378, 3, 0xa00, 1, NO_PAD_CTRL) | ||
700 | #define MX51_PAD_DISP2_DAT10__DISP2_DAT10 IOMUX_PAD(0x784, 0x37c, 0, __NA_, 0, NO_PAD_CTRL) | ||
701 | #define MX51_PAD_DISP2_DAT10__DISP2_SER_CS IOMUX_PAD(0x784, 0x37c, 5, __NA_, 0, NO_PAD_CTRL) | ||
702 | #define MX51_PAD_DISP2_DAT10__FEC_COL IOMUX_PAD(0x784, 0x37c, 2, 0x94c, 1, NO_PAD_CTRL) | ||
703 | #define MX51_PAD_DISP2_DAT10__KEY_ROW7 IOMUX_PAD(0x784, 0x37c, 4, 0x9dc, 1, NO_PAD_CTRL) | ||
704 | #define MX51_PAD_DISP2_DAT10__USBH3_DATA2 IOMUX_PAD(0x784, 0x37c, 3, 0xa04, 1, NO_PAD_CTRL) | ||
705 | #define MX51_PAD_DISP2_DAT11__AUD6_TXD IOMUX_PAD(0x788, 0x380, 4, 0x8f0, 1, NO_PAD_CTRL) | ||
706 | #define MX51_PAD_DISP2_DAT11__DISP2_DAT11 IOMUX_PAD(0x788, 0x380, 0, __NA_, 0, NO_PAD_CTRL) | ||
707 | #define MX51_PAD_DISP2_DAT11__FEC_RX_CLK IOMUX_PAD(0x788, 0x380, 2, 0x968, 1, NO_PAD_CTRL) | ||
708 | #define MX51_PAD_DISP2_DAT11__GPIO1_10 IOMUX_PAD(0x788, 0x380, 7, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
709 | #define MX51_PAD_DISP2_DAT11__USBH3_DATA3 IOMUX_PAD(0x788, 0x380, 3, 0xa08, 1, NO_PAD_CTRL) | ||
710 | #define MX51_PAD_DISP2_DAT12__AUD6_RXD IOMUX_PAD(0x78c, 0x384, 4, 0x8ec, 1, NO_PAD_CTRL) | ||
711 | #define MX51_PAD_DISP2_DAT12__DISP2_DAT12 IOMUX_PAD(0x78c, 0x384, 0, __NA_, 0, NO_PAD_CTRL) | ||
712 | #define MX51_PAD_DISP2_DAT12__FEC_RX_DV IOMUX_PAD(0x78c, 0x384, 2, 0x96c, 1, NO_PAD_CTRL) | ||
713 | #define MX51_PAD_DISP2_DAT12__USBH3_DATA4 IOMUX_PAD(0x78c, 0x384, 3, 0xa0c, 1, NO_PAD_CTRL) | ||
714 | #define MX51_PAD_DISP2_DAT13__AUD6_TXC IOMUX_PAD(0x790, 0x388, 4, 0x8fc, 1, NO_PAD_CTRL) | ||
715 | #define MX51_PAD_DISP2_DAT13__DISP2_DAT13 IOMUX_PAD(0x790, 0x388, 0, __NA_, 0, NO_PAD_CTRL) | ||
716 | #define MX51_PAD_DISP2_DAT13__FEC_TX_CLK IOMUX_PAD(0x790, 0x388, 2, 0x974, 1, MX51_PAD_CTRL_4) | ||
717 | #define MX51_PAD_DISP2_DAT13__USBH3_DATA5 IOMUX_PAD(0x790, 0x388, 3, 0xa10, 1, NO_PAD_CTRL) | ||
718 | #define MX51_PAD_DISP2_DAT14__AUD6_TXFS IOMUX_PAD(0x794, 0x38c, 4, 0x900, 1, NO_PAD_CTRL) | ||
719 | #define MX51_PAD_DISP2_DAT14__DISP2_DAT14 IOMUX_PAD(0x794, 0x38c, 0, __NA_, 0, NO_PAD_CTRL) | ||
720 | #define MX51_PAD_DISP2_DAT14__FEC_RDATA0 IOMUX_PAD(0x794, 0x38c, 2, 0x958, 1, MX51_PAD_CTRL_4) | ||
721 | #define MX51_PAD_DISP2_DAT14__USBH3_DATA6 IOMUX_PAD(0x794, 0x38c, 3, 0xa14, 1, NO_PAD_CTRL) | ||
722 | #define MX51_PAD_DISP2_DAT15__AUD6_RXFS IOMUX_PAD(0x798, 0x390, 4, 0x8f8, 1, NO_PAD_CTRL) | ||
723 | #define MX51_PAD_DISP2_DAT15__DISP1_SER_CS IOMUX_PAD(0x798, 0x390, 5, __NA_, 0, NO_PAD_CTRL) | ||
724 | #define MX51_PAD_DISP2_DAT15__DISP2_DAT15 IOMUX_PAD(0x798, 0x390, 0, __NA_, 0, NO_PAD_CTRL) | ||
725 | #define MX51_PAD_DISP2_DAT15__FEC_TDATA0 IOMUX_PAD(0x798, 0x390, 2, __NA_, 0, MX51_PAD_CTRL_5) | ||
726 | #define MX51_PAD_DISP2_DAT15__USBH3_DATA7 IOMUX_PAD(0x798, 0x390, 3, 0xa18, 1, NO_PAD_CTRL) | ||
727 | #define MX51_PAD_SD1_CMD__AUD5_RXFS IOMUX_PAD(0x79c, 0x394, 1, 0x8e0, 1, NO_PAD_CTRL) | ||
728 | #define MX51_PAD_SD1_CMD__CSPI_MOSI IOMUX_PAD(0x79c, 0x394, 2, 0x91c, 2, NO_PAD_CTRL) | ||
729 | #define MX51_PAD_SD1_CMD__SD1_CMD IOMUX_PAD(0x79c, 0x394, 0x10, __NA_, 0, MX51_SDHCI_PAD_CTRL) | ||
730 | #define MX51_PAD_SD1_CLK__AUD5_RXC IOMUX_PAD(0x7a0, 0x398, 1, 0x8dc, 1, NO_PAD_CTRL) | ||
731 | #define MX51_PAD_SD1_CLK__CSPI_SCLK IOMUX_PAD(0x7a0, 0x398, 2, 0x914, 2, NO_PAD_CTRL) | ||
732 | #define MX51_PAD_SD1_CLK__SD1_CLK IOMUX_PAD(0x7a0, 0x398, 0x10, __NA_, 0, MX51_SDHCI_PAD_CTRL | PAD_CTL_HYS) | ||
733 | #define MX51_PAD_SD1_DATA0__AUD5_TXD IOMUX_PAD(0x7a4, 0x39c, 1, 0x8d8, 2, NO_PAD_CTRL) | ||
734 | #define MX51_PAD_SD1_DATA0__CSPI_MISO IOMUX_PAD(0x7a4, 0x39c, 2, 0x918, 1, MX51_ECSPI_PAD_CTRL) | ||
735 | #define MX51_PAD_SD1_DATA0__SD1_DATA0 IOMUX_PAD(0x7a4, 0x39c, 0x10, __NA_, 0, MX51_SDHCI_PAD_CTRL) | ||
736 | #define MX51_PAD_EIM_DA0__EIM_DA0 IOMUX_PAD(__NA_, 0x01c, 0, 0x000, 0, NO_PAD_CTRL) | ||
737 | #define MX51_PAD_EIM_DA1__EIM_DA1 IOMUX_PAD(__NA_, 0x020, 0, 0x000, 0, NO_PAD_CTRL) | ||
738 | #define MX51_PAD_EIM_DA2__EIM_DA2 IOMUX_PAD(__NA_, 0x024, 0, 0x000, 0, NO_PAD_CTRL) | ||
739 | #define MX51_PAD_EIM_DA3__EIM_DA3 IOMUX_PAD(__NA_, 0x028, 0, 0x000, 0, NO_PAD_CTRL) | ||
740 | #define MX51_PAD_SD1_DATA1__AUD5_RXD IOMUX_PAD(0x7a8, 0x3a0, 1, 0x8d4, 2, NO_PAD_CTRL) | ||
741 | #define MX51_PAD_SD1_DATA1__SD1_DATA1 IOMUX_PAD(0x7a8, 0x3a0, 0x10, __NA_, 0, MX51_SDHCI_PAD_CTRL) | ||
742 | #define MX51_PAD_EIM_DA4__EIM_DA4 IOMUX_PAD(__NA_, 0x02c, 0, 0x000, 0, NO_PAD_CTRL) | ||
743 | #define MX51_PAD_EIM_DA5__EIM_DA5 IOMUX_PAD(__NA_, 0x030, 0, 0x000, 0, NO_PAD_CTRL) | ||
744 | #define MX51_PAD_EIM_DA6__EIM_DA6 IOMUX_PAD(__NA_, 0x034, 0, 0x000, 0, NO_PAD_CTRL) | ||
745 | #define MX51_PAD_EIM_DA7__EIM_DA7 IOMUX_PAD(__NA_, 0x038, 0, 0x000, 0, NO_PAD_CTRL) | ||
746 | #define MX51_PAD_SD1_DATA2__AUD5_TXC IOMUX_PAD(0x7ac, 0x3a4, 1, 0x8e4, 2, NO_PAD_CTRL) | ||
747 | #define MX51_PAD_SD1_DATA2__SD1_DATA2 IOMUX_PAD(0x7ac, 0x3a4, 0x10, __NA_, 0, MX51_SDHCI_PAD_CTRL) | ||
748 | #define MX51_PAD_EIM_DA10__EIM_DA10 IOMUX_PAD(__NA_, 0x044, 0, 0x000, 0, NO_PAD_CTRL) | ||
749 | #define MX51_PAD_EIM_DA11__EIM_DA11 IOMUX_PAD(__NA_, 0x048, 0, 0x000, 0, NO_PAD_CTRL) | ||
750 | #define MX51_PAD_EIM_DA8__EIM_DA8 IOMUX_PAD(__NA_, 0x03c, 0, 0x000, 0, NO_PAD_CTRL) | ||
751 | #define MX51_PAD_EIM_DA9__EIM_DA9 IOMUX_PAD(__NA_, 0x040, 0, 0x000, 0, NO_PAD_CTRL) | ||
752 | #define MX51_PAD_SD1_DATA3__AUD5_TXFS IOMUX_PAD(0x7b0, 0x3a8, 1, 0x8e8, 2, NO_PAD_CTRL) | ||
753 | #define MX51_PAD_SD1_DATA3__CSPI_SS1 IOMUX_PAD(0x7b0, 0x3a8, 2, 0x920, 1, MX51_ECSPI_PAD_CTRL) | ||
754 | #define MX51_PAD_SD1_DATA3__SD1_DATA3 IOMUX_PAD(0x7b0, 0x3a8, 0x10, __NA_, 0, MX51_SDHCI_PAD_CTRL) | ||
755 | #define MX51_PAD_GPIO1_0__CSPI_SS2 IOMUX_PAD(0x7b4, 0x3ac, 2, 0x924, 0, MX51_ECSPI_PAD_CTRL) | ||
756 | #define MX51_PAD_GPIO1_0__GPIO1_0 IOMUX_PAD(0x7b4, 0x3ac, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
757 | #define MX51_PAD_GPIO1_0__SD1_CD IOMUX_PAD(0x7b4, 0x3ac, 0, __NA_, 0, MX51_ESDHC_PAD_CTRL) | ||
758 | #define MX51_PAD_GPIO1_1__CSPI_MISO IOMUX_PAD(0x7b8, 0x3b0, 2, 0x918, 2, MX51_ECSPI_PAD_CTRL) | ||
759 | #define MX51_PAD_GPIO1_1__GPIO1_1 IOMUX_PAD(0x7b8, 0x3b0, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
760 | #define MX51_PAD_GPIO1_1__SD1_WP IOMUX_PAD(0x7b8, 0x3b0, 0, __NA_, 0, MX51_ESDHC_PAD_CTRL) | ||
761 | #define MX51_PAD_EIM_DA12__EIM_DA12 IOMUX_PAD(__NA_, 0x04c, 0, 0x000, 0, NO_PAD_CTRL) | ||
762 | #define MX51_PAD_EIM_DA13__EIM_DA13 IOMUX_PAD(__NA_, 0x050, 0, 0x000, 0, NO_PAD_CTRL) | ||
763 | #define MX51_PAD_EIM_DA14__EIM_DA14 IOMUX_PAD(__NA_, 0x054, 0, 0x000, 0, NO_PAD_CTRL) | ||
764 | #define MX51_PAD_EIM_DA15__EIM_DA15 IOMUX_PAD(__NA_, 0x058, 0, 0x000, 0, NO_PAD_CTRL) | ||
765 | #define MX51_PAD_SD2_CMD__CSPI_MOSI IOMUX_PAD(0x7bc, 0x3b4, 2, 0x91c, 3, MX51_ECSPI_PAD_CTRL) | ||
766 | #define MX51_PAD_SD2_CMD__I2C1_SCL IOMUX_PAD(0x7bc, 0x3b4, 0x11, 0x9b0, 2, MX51_I2C_PAD_CTRL) | ||
767 | #define MX51_PAD_SD2_CMD__SD2_CMD IOMUX_PAD(0x7bc, 0x3b4, 0x10, __NA_, 0, MX51_SDHCI_PAD_CTRL) | ||
768 | #define MX51_PAD_SD2_CLK__CSPI_SCLK IOMUX_PAD(0x7c0, 0x3b8, 2, 0x914, 3, MX51_ECSPI_PAD_CTRL) | ||
769 | #define MX51_PAD_SD2_CLK__I2C1_SDA IOMUX_PAD(0x7c0, 0x3b8, 0x11, 0x9b4, 2, MX51_I2C_PAD_CTRL) | ||
770 | #define MX51_PAD_SD2_CLK__SD2_CLK IOMUX_PAD(0x7c0, 0x3b8, 0x10, __NA_, 0, MX51_SDHCI_PAD_CTRL | PAD_CTL_HYS) | ||
771 | #define MX51_PAD_SD2_DATA0__CSPI_MISO IOMUX_PAD(0x7c4, 0x3bc, 2, 0x918, 3, MX51_ECSPI_PAD_CTRL) | ||
772 | #define MX51_PAD_SD2_DATA0__SD1_DAT4 IOMUX_PAD(0x7c4, 0x3bc, 1, __NA_, 0, NO_PAD_CTRL) | ||
773 | #define MX51_PAD_SD2_DATA0__SD2_DATA0 IOMUX_PAD(0x7c4, 0x3bc, 0x10, __NA_, 0, MX51_SDHCI_PAD_CTRL) | ||
774 | #define MX51_PAD_SD2_DATA1__SD1_DAT5 IOMUX_PAD(0x7c8, 0x3c0, 1, __NA_, 0, NO_PAD_CTRL) | ||
775 | #define MX51_PAD_SD2_DATA1__SD2_DATA1 IOMUX_PAD(0x7c8, 0x3c0, 0x10, __NA_, 0, MX51_SDHCI_PAD_CTRL) | ||
776 | #define MX51_PAD_SD2_DATA1__USBH3_H2_DP IOMUX_PAD(0x7c8, 0x3c0, 0x12, __NA_, 0, NO_PAD_CTRL) | ||
777 | #define MX51_PAD_SD2_DATA2__SD1_DAT6 IOMUX_PAD(0x7cc, 0x3c4, 1, __NA_, 0, NO_PAD_CTRL) | ||
778 | #define MX51_PAD_SD2_DATA2__SD2_DATA2 IOMUX_PAD(0x7cc, 0x3c4, 0x10, __NA_, 0, MX51_SDHCI_PAD_CTRL) | ||
779 | #define MX51_PAD_SD2_DATA2__USBH3_H2_DM IOMUX_PAD(0x7cc, 0x3c4, 0x12, __NA_, 0, NO_PAD_CTRL) | ||
780 | #define MX51_PAD_SD2_DATA3__CSPI_SS2 IOMUX_PAD(0x7d0, 0x3c8, 2, 0x924, 1, MX51_ECSPI_PAD_CTRL) | ||
781 | #define MX51_PAD_SD2_DATA3__SD1_DAT7 IOMUX_PAD(0x7d0, 0x3c8, 1, __NA_, 0, NO_PAD_CTRL) | ||
782 | #define MX51_PAD_SD2_DATA3__SD2_DATA3 IOMUX_PAD(0x7d0, 0x3c8, 0x10, __NA_, 0, MX51_SDHCI_PAD_CTRL) | ||
783 | #define MX51_PAD_GPIO1_2__CCM_OUT_2 IOMUX_PAD(0x7d4, 0x3cc, 5, __NA_, 0, NO_PAD_CTRL) | ||
784 | #define MX51_PAD_GPIO1_2__GPIO1_2 IOMUX_PAD(0x7d4, 0x3cc, 0, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
785 | #define MX51_PAD_GPIO1_2__I2C2_SCL IOMUX_PAD(0x7d4, 0x3cc, 0x12, 0x9b8, 3, MX51_I2C_PAD_CTRL) | ||
786 | #define MX51_PAD_GPIO1_2__PLL1_BYP IOMUX_PAD(0x7d4, 0x3cc, 7, 0x90c, 1, NO_PAD_CTRL) | ||
787 | #define MX51_PAD_GPIO1_2__PWM1_PWMO IOMUX_PAD(0x7d4, 0x3cc, 1, __NA_, 0, NO_PAD_CTRL) | ||
788 | #define MX51_PAD_GPIO1_3__GPIO1_3 IOMUX_PAD(0x7d8, 0x3d0, 0, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
789 | #define MX51_PAD_GPIO1_3__I2C2_SDA IOMUX_PAD(0x7d8, 0x3d0, 0x12, 0x9bc, 3, MX51_I2C_PAD_CTRL) | ||
790 | #define MX51_PAD_GPIO1_3__CCM_CLKO2 IOMUX_PAD(0x7d8, 0x3d0, 5, __NA_, 0, NO_PAD_CTRL) | ||
791 | #define MX51_PAD_GPIO1_3__GPT_CLKIN IOMUX_PAD(0x7d8, 0x3d0, 6, __NA_, 0, NO_PAD_CTRL) | ||
792 | #define MX51_PAD_GPIO1_3__PLL2_BYP IOMUX_PAD(0x7d8, 0x3d0, 7, 0x910, 1, NO_PAD_CTRL) | ||
793 | #define MX51_PAD_GPIO1_3__PWM2_PWMO IOMUX_PAD(0x7d8, 0x3d0, 1, __NA_, 0, NO_PAD_CTRL) | ||
794 | #define MX51_PAD_PMIC_INT_REQ__PMIC_INT_REQ IOMUX_PAD(0x7fc, 0x3d4, 0, __NA_, 0, NO_PAD_CTRL) | ||
795 | #define MX51_PAD_PMIC_INT_REQ__PMIC_PMU_IRQ_B IOMUX_PAD(0x7fc, 0x3d4, 1, __NA_, 0, NO_PAD_CTRL) | ||
796 | #define MX51_PAD_GPIO1_4__DISP2_EXT_CLK IOMUX_PAD(0x804, 0x3d8, 4, 0x908, 1, NO_PAD_CTRL) | ||
797 | #define MX51_PAD_GPIO1_4__EIM_RDY IOMUX_PAD(0x804, 0x3d8, 3, 0x938, 1, NO_PAD_CTRL) | ||
798 | #define MX51_PAD_GPIO1_4__GPIO1_4 IOMUX_PAD(0x804, 0x3d8, 0, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
799 | #define MX51_PAD_GPIO1_4__WDOG1_WDOG_B IOMUX_PAD(0x804, 0x3d8, 2, __NA_, 0, NO_PAD_CTRL) | ||
800 | #define MX51_PAD_GPIO1_4__GPT_CAPIN1 IOMUX_PAD(0x804, 0x3d8, 6, __NA_, 0, NO_PAD_CTRL) | ||
801 | #define MX51_PAD_GPIO1_5__CSI2_MCLK IOMUX_PAD(0x808, 0x3dc, 6, __NA_, 0, NO_PAD_CTRL) | ||
802 | #define MX51_PAD_GPIO1_5__DISP2_PIN16 IOMUX_PAD(0x808, 0x3dc, 3, __NA_, 0, NO_PAD_CTRL) | ||
803 | #define MX51_PAD_GPIO1_5__GPIO1_5 IOMUX_PAD(0x808, 0x3dc, 0, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
804 | #define MX51_PAD_GPIO1_5__WDOG2_WDOG_B IOMUX_PAD(0x808, 0x3dc, 2, __NA_, 0, NO_PAD_CTRL) | ||
805 | #define MX51_PAD_GPIO1_5__CCM_CLKO IOMUX_PAD(0x808, 0x3dc, 5, __NA_, 0, NO_PAD_CTRL) | ||
806 | #define MX51_PAD_GPIO1_6__DISP2_PIN17 IOMUX_PAD(0x80c, 0x3e0, 4, __NA_, 0, NO_PAD_CTRL) | ||
807 | #define MX51_PAD_GPIO1_6__GPIO1_6 IOMUX_PAD(0x80c, 0x3e0, 0, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
808 | #define MX51_PAD_GPIO1_6__REF_EN_B IOMUX_PAD(0x80c, 0x3e0, 3, __NA_, 0, NO_PAD_CTRL) | ||
809 | #define MX51_PAD_GPIO1_6__GPT_CAPIN2 IOMUX_PAD(0x80c, 0x3e0, 6, __NA_, 0, NO_PAD_CTRL) | ||
810 | #define MX51_PAD_GPIO1_7__CCM_OUT_0 IOMUX_PAD(0x810, 0x3e4, 3, __NA_, 0, NO_PAD_CTRL) | ||
811 | #define MX51_PAD_GPIO1_7__GPIO1_7 IOMUX_PAD(0x810, 0x3e4, 0, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
812 | #define MX51_PAD_GPIO1_7__SD2_WP IOMUX_PAD(0x810, 0x3e4, 6, __NA_, 0, MX51_ESDHC_PAD_CTRL) | ||
813 | #define MX51_PAD_GPIO1_7__SPDIF_OUT1 IOMUX_PAD(0x810, 0x3e4, 2, __NA_, 0, NO_PAD_CTRL) | ||
814 | #define MX51_PAD_GPIO1_8__CSI2_DATA_EN IOMUX_PAD(0x814, 0x3e8, 2, 0x99c, 2, NO_PAD_CTRL) | ||
815 | #define MX51_PAD_GPIO1_8__GPIO1_8 IOMUX_PAD(0x814, 0x3e8, 0, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
816 | #define MX51_PAD_GPIO1_8__SD2_CD IOMUX_PAD(0x814, 0x3e8, 6, __NA_, 0, MX51_ESDHC_PAD_CTRL) | ||
817 | #define MX51_PAD_GPIO1_8__USBH3_PWR IOMUX_PAD(0x814, 0x3e8, 1, __NA_, 0, NO_PAD_CTRL) | ||
818 | #define MX51_PAD_GPIO1_8__CCM_CLKO2 IOMUX_PAD(0x814, 0x3e8, 4, __NA_, 0, NO_PAD_CTRL) | ||
819 | #define MX51_PAD_GPIO1_9__CCM_OUT_1 IOMUX_PAD(0x818, 0x3ec, 3, __NA_, 0, NO_PAD_CTRL) | ||
820 | #define MX51_PAD_GPIO1_9__DISP2_D1_CS IOMUX_PAD(0x818, 0x3ec, 2, __NA_, 0, NO_PAD_CTRL) | ||
821 | #define MX51_PAD_GPIO1_9__DISP2_SER_CS IOMUX_PAD(0x818, 0x3ec, 7, __NA_, 0, NO_PAD_CTRL) | ||
822 | #define MX51_PAD_GPIO1_9__GPIO1_9 IOMUX_PAD(0x818, 0x3ec, 0, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
823 | #define MX51_PAD_GPIO1_9__SD2_LCTL IOMUX_PAD(0x818, 0x3ec, 6, __NA_, 0, NO_PAD_CTRL) | ||
824 | #define MX51_PAD_GPIO1_9__USBH3_OC IOMUX_PAD(0x818, 0x3ec, 1, __NA_, 0, NO_PAD_CTRL) | ||
825 | #define MX51_PAD_GPIO1_9__CCM_CLKO IOMUX_PAD(0x818, 0x3ec, 4, __NA_, 0, NO_PAD_CTRL) | ||
826 | |||
827 | #endif /* __MACH_IOMUX_MX51_H__ */ | ||
diff --git a/arch/arm/mach-imx/mach-armadillo5x0.c b/arch/arm/mach-imx/mach-armadillo5x0.c index 39406b7e3228..a7e9bd26a552 100644 --- a/arch/arm/mach-imx/mach-armadillo5x0.c +++ b/arch/arm/mach-imx/mach-armadillo5x0.c | |||
@@ -50,6 +50,7 @@ | |||
50 | #include "common.h" | 50 | #include "common.h" |
51 | #include "devices-imx31.h" | 51 | #include "devices-imx31.h" |
52 | #include "crmregs-imx3.h" | 52 | #include "crmregs-imx3.h" |
53 | #include "ehci.h" | ||
53 | #include "hardware.h" | 54 | #include "hardware.h" |
54 | #include "iomux-mx3.h" | 55 | #include "iomux-mx3.h" |
55 | #include "ulpi.h" | 56 | #include "ulpi.h" |
diff --git a/arch/arm/mach-imx/mach-cpuimx27.c b/arch/arm/mach-imx/mach-cpuimx27.c index 75b7b6aa2720..e6d4b9929571 100644 --- a/arch/arm/mach-imx/mach-cpuimx27.c +++ b/arch/arm/mach-imx/mach-cpuimx27.c | |||
@@ -36,6 +36,7 @@ | |||
36 | 36 | ||
37 | #include "common.h" | 37 | #include "common.h" |
38 | #include "devices-imx27.h" | 38 | #include "devices-imx27.h" |
39 | #include "ehci.h" | ||
39 | #include "eukrea-baseboards.h" | 40 | #include "eukrea-baseboards.h" |
40 | #include "hardware.h" | 41 | #include "hardware.h" |
41 | #include "iomux-mx27.h" | 42 | #include "iomux-mx27.h" |
diff --git a/arch/arm/mach-imx/mach-cpuimx35.c b/arch/arm/mach-imx/mach-cpuimx35.c index 1ffa27169045..62a6e02f4763 100644 --- a/arch/arm/mach-imx/mach-cpuimx35.c +++ b/arch/arm/mach-imx/mach-cpuimx35.c | |||
@@ -39,6 +39,7 @@ | |||
39 | 39 | ||
40 | #include "common.h" | 40 | #include "common.h" |
41 | #include "devices-imx35.h" | 41 | #include "devices-imx35.h" |
42 | #include "ehci.h" | ||
42 | #include "eukrea-baseboards.h" | 43 | #include "eukrea-baseboards.h" |
43 | #include "hardware.h" | 44 | #include "hardware.h" |
44 | #include "iomux-mx35.h" | 45 | #include "iomux-mx35.h" |
diff --git a/arch/arm/mach-imx/mach-eukrea_cpuimx25.c b/arch/arm/mach-imx/mach-eukrea_cpuimx25.c index e978dda1434c..b2ee6e009fe4 100644 --- a/arch/arm/mach-imx/mach-eukrea_cpuimx25.c +++ b/arch/arm/mach-imx/mach-eukrea_cpuimx25.c | |||
@@ -35,6 +35,7 @@ | |||
35 | 35 | ||
36 | #include "common.h" | 36 | #include "common.h" |
37 | #include "devices-imx25.h" | 37 | #include "devices-imx25.h" |
38 | #include "ehci.h" | ||
38 | #include "eukrea-baseboards.h" | 39 | #include "eukrea-baseboards.h" |
39 | #include "hardware.h" | 40 | #include "hardware.h" |
40 | #include "iomux-mx25.h" | 41 | #include "iomux-mx25.h" |
diff --git a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c index b61bd8ed5568..ede2bdbb5dd5 100644 --- a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c +++ b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c | |||
@@ -43,6 +43,7 @@ | |||
43 | 43 | ||
44 | #include "common.h" | 44 | #include "common.h" |
45 | #include "devices-imx27.h" | 45 | #include "devices-imx27.h" |
46 | #include "ehci.h" | ||
46 | #include "hardware.h" | 47 | #include "hardware.h" |
47 | #include "iomux-mx27.h" | 48 | #include "iomux-mx27.h" |
48 | 49 | ||
diff --git a/arch/arm/mach-imx/mach-imx27ipcam.c b/arch/arm/mach-imx/mach-imx27ipcam.c deleted file mode 100644 index bb3ca0429680..000000000000 --- a/arch/arm/mach-imx/mach-imx27ipcam.c +++ /dev/null | |||
@@ -1,77 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2011 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | * | ||
4 | * Author: Fabio Estevam <fabio.estevam@freescale.com> | ||
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 | |||
17 | #include <asm/mach-types.h> | ||
18 | #include <asm/mach/arch.h> | ||
19 | #include <asm/mach/time.h> | ||
20 | |||
21 | #include "hardware.h" | ||
22 | #include "common.h" | ||
23 | #include "devices-imx27.h" | ||
24 | #include "iomux-mx27.h" | ||
25 | |||
26 | static const int mx27ipcam_pins[] __initconst = { | ||
27 | /* UART1 */ | ||
28 | PE12_PF_UART1_TXD, | ||
29 | PE13_PF_UART1_RXD, | ||
30 | /* FEC */ | ||
31 | PD0_AIN_FEC_TXD0, | ||
32 | PD1_AIN_FEC_TXD1, | ||
33 | PD2_AIN_FEC_TXD2, | ||
34 | PD3_AIN_FEC_TXD3, | ||
35 | PD4_AOUT_FEC_RX_ER, | ||
36 | PD5_AOUT_FEC_RXD1, | ||
37 | PD6_AOUT_FEC_RXD2, | ||
38 | PD7_AOUT_FEC_RXD3, | ||
39 | PD8_AF_FEC_MDIO, | ||
40 | PD9_AIN_FEC_MDC, | ||
41 | PD10_AOUT_FEC_CRS, | ||
42 | PD11_AOUT_FEC_TX_CLK, | ||
43 | PD12_AOUT_FEC_RXD0, | ||
44 | PD13_AOUT_FEC_RX_DV, | ||
45 | PD14_AOUT_FEC_RX_CLK, | ||
46 | PD15_AOUT_FEC_COL, | ||
47 | PD16_AIN_FEC_TX_ER, | ||
48 | PF23_AIN_FEC_TX_EN, | ||
49 | }; | ||
50 | |||
51 | static void __init mx27ipcam_init(void) | ||
52 | { | ||
53 | imx27_soc_init(); | ||
54 | |||
55 | mxc_gpio_setup_multiple_pins(mx27ipcam_pins, ARRAY_SIZE(mx27ipcam_pins), | ||
56 | "mx27ipcam"); | ||
57 | |||
58 | imx27_add_imx_uart0(NULL); | ||
59 | imx27_add_fec(NULL); | ||
60 | imx27_add_imx2_wdt(); | ||
61 | } | ||
62 | |||
63 | static void __init mx27ipcam_timer_init(void) | ||
64 | { | ||
65 | mx27_clocks_init(25000000); | ||
66 | } | ||
67 | |||
68 | MACHINE_START(IMX27IPCAM, "Freescale IMX27IPCAM") | ||
69 | /* maintainer: Freescale Semiconductor, Inc. */ | ||
70 | .atag_offset = 0x100, | ||
71 | .map_io = mx27_map_io, | ||
72 | .init_early = imx27_init_early, | ||
73 | .init_irq = mx27_init_irq, | ||
74 | .init_time = mx27ipcam_timer_init, | ||
75 | .init_machine = mx27ipcam_init, | ||
76 | .restart = mxc_restart, | ||
77 | MACHINE_END | ||
diff --git a/arch/arm/mach-imx/mach-imx27lite.c b/arch/arm/mach-imx/mach-imx27lite.c deleted file mode 100644 index 9992089d3ad1..000000000000 --- a/arch/arm/mach-imx/mach-imx27lite.c +++ /dev/null | |||
@@ -1,83 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2007 Robert Schwebel <r.schwebel@pengutronix.de>, Pengutronix | ||
3 | * Copyright (C) 2008 Juergen Beisert (kernel@pengutronix.de) | ||
4 | * Copyright 2009 Daniel Schaeffer (daniel.schaeffer@timesys.com) | ||
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 | |||
17 | #include <linux/platform_device.h> | ||
18 | #include <linux/gpio.h> | ||
19 | #include <asm/mach-types.h> | ||
20 | #include <asm/mach/arch.h> | ||
21 | #include <asm/mach/time.h> | ||
22 | #include <asm/mach/map.h> | ||
23 | |||
24 | #include "common.h" | ||
25 | #include "devices-imx27.h" | ||
26 | #include "hardware.h" | ||
27 | #include "iomux-mx27.h" | ||
28 | |||
29 | static const int mx27lite_pins[] __initconst = { | ||
30 | /* UART1 */ | ||
31 | PE12_PF_UART1_TXD, | ||
32 | PE13_PF_UART1_RXD, | ||
33 | PE14_PF_UART1_CTS, | ||
34 | PE15_PF_UART1_RTS, | ||
35 | /* FEC */ | ||
36 | PD0_AIN_FEC_TXD0, | ||
37 | PD1_AIN_FEC_TXD1, | ||
38 | PD2_AIN_FEC_TXD2, | ||
39 | PD3_AIN_FEC_TXD3, | ||
40 | PD4_AOUT_FEC_RX_ER, | ||
41 | PD5_AOUT_FEC_RXD1, | ||
42 | PD6_AOUT_FEC_RXD2, | ||
43 | PD7_AOUT_FEC_RXD3, | ||
44 | PD8_AF_FEC_MDIO, | ||
45 | PD9_AIN_FEC_MDC, | ||
46 | PD10_AOUT_FEC_CRS, | ||
47 | PD11_AOUT_FEC_TX_CLK, | ||
48 | PD12_AOUT_FEC_RXD0, | ||
49 | PD13_AOUT_FEC_RX_DV, | ||
50 | PD14_AOUT_FEC_RX_CLK, | ||
51 | PD15_AOUT_FEC_COL, | ||
52 | PD16_AIN_FEC_TX_ER, | ||
53 | PF23_AIN_FEC_TX_EN, | ||
54 | }; | ||
55 | |||
56 | static const struct imxuart_platform_data uart_pdata __initconst = { | ||
57 | .flags = IMXUART_HAVE_RTSCTS, | ||
58 | }; | ||
59 | |||
60 | static void __init mx27lite_init(void) | ||
61 | { | ||
62 | imx27_soc_init(); | ||
63 | |||
64 | mxc_gpio_setup_multiple_pins(mx27lite_pins, ARRAY_SIZE(mx27lite_pins), | ||
65 | "imx27lite"); | ||
66 | imx27_add_imx_uart0(&uart_pdata); | ||
67 | imx27_add_fec(NULL); | ||
68 | } | ||
69 | |||
70 | static void __init mx27lite_timer_init(void) | ||
71 | { | ||
72 | mx27_clocks_init(26000000); | ||
73 | } | ||
74 | |||
75 | MACHINE_START(IMX27LITE, "LogicPD i.MX27LITE") | ||
76 | .atag_offset = 0x100, | ||
77 | .map_io = mx27_map_io, | ||
78 | .init_early = imx27_init_early, | ||
79 | .init_irq = mx27_init_irq, | ||
80 | .init_time = mx27lite_timer_init, | ||
81 | .init_machine = mx27lite_init, | ||
82 | .restart = mxc_restart, | ||
83 | MACHINE_END | ||
diff --git a/arch/arm/mach-imx/mach-imx50.c b/arch/arm/mach-imx/mach-imx50.c index b899c0b59afd..b1e56a94a382 100644 --- a/arch/arm/mach-imx/mach-imx50.c +++ b/arch/arm/mach-imx/mach-imx50.c | |||
@@ -23,14 +23,13 @@ static void __init imx50_dt_init(void) | |||
23 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | 23 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
24 | } | 24 | } |
25 | 25 | ||
26 | static const char *imx50_dt_board_compat[] __initconst = { | 26 | static const char * const imx50_dt_board_compat[] __initconst = { |
27 | "fsl,imx50", | 27 | "fsl,imx50", |
28 | NULL | 28 | NULL |
29 | }; | 29 | }; |
30 | 30 | ||
31 | DT_MACHINE_START(IMX50_DT, "Freescale i.MX50 (Device Tree Support)") | 31 | DT_MACHINE_START(IMX50_DT, "Freescale i.MX50 (Device Tree Support)") |
32 | .map_io = mx53_map_io, | 32 | .init_irq = tzic_init_irq, |
33 | .init_irq = mx53_init_irq, | ||
34 | .init_machine = imx50_dt_init, | 33 | .init_machine = imx50_dt_init, |
35 | .dt_compat = imx50_dt_board_compat, | 34 | .dt_compat = imx50_dt_board_compat, |
36 | .restart = mxc_restart, | 35 | .restart = mxc_restart, |
diff --git a/arch/arm/mach-imx/imx51-dt.c b/arch/arm/mach-imx/mach-imx51.c index b8cd968faa52..c77deb3f0893 100644 --- a/arch/arm/mach-imx/imx51-dt.c +++ b/arch/arm/mach-imx/mach-imx51.c | |||
@@ -10,6 +10,7 @@ | |||
10 | * http://www.gnu.org/copyleft/gpl.html | 10 | * http://www.gnu.org/copyleft/gpl.html |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/io.h> | ||
13 | #include <linux/irq.h> | 14 | #include <linux/irq.h> |
14 | #include <linux/of_irq.h> | 15 | #include <linux/of_irq.h> |
15 | #include <linux/of_platform.h> | 16 | #include <linux/of_platform.h> |
@@ -17,27 +18,63 @@ | |||
17 | #include <asm/mach/time.h> | 18 | #include <asm/mach/time.h> |
18 | 19 | ||
19 | #include "common.h" | 20 | #include "common.h" |
20 | #include "mx51.h" | 21 | #include "hardware.h" |
22 | |||
23 | static void __init imx51_init_early(void) | ||
24 | { | ||
25 | mxc_set_cpu_type(MXC_CPU_MX51); | ||
26 | } | ||
27 | |||
28 | /* | ||
29 | * The MIPI HSC unit has been removed from the i.MX51 Reference Manual by | ||
30 | * the Freescale marketing division. However this did not remove the | ||
31 | * hardware from the chip which still needs to be configured for proper | ||
32 | * IPU support. | ||
33 | */ | ||
34 | #define MX51_MIPI_HSC_BASE 0x83fdc000 | ||
35 | static void __init imx51_ipu_mipi_setup(void) | ||
36 | { | ||
37 | void __iomem *hsc_addr; | ||
38 | |||
39 | hsc_addr = ioremap(MX51_MIPI_HSC_BASE, SZ_16K); | ||
40 | WARN_ON(!hsc_addr); | ||
41 | |||
42 | /* setup MIPI module to legacy mode */ | ||
43 | __raw_writel(0xf00, hsc_addr); | ||
44 | |||
45 | /* CSI mode: reserved; DI control mode: legacy (from Freescale BSP) */ | ||
46 | __raw_writel(__raw_readl(hsc_addr + 0x800) | 0x30ff, | ||
47 | hsc_addr + 0x800); | ||
48 | |||
49 | iounmap(hsc_addr); | ||
50 | } | ||
21 | 51 | ||
22 | static void __init imx51_dt_init(void) | 52 | static void __init imx51_dt_init(void) |
23 | { | 53 | { |
24 | struct platform_device_info devinfo = { .name = "cpufreq-cpu0", }; | 54 | struct platform_device_info devinfo = { .name = "cpufreq-cpu0", }; |
25 | 55 | ||
26 | mxc_arch_reset_init_dt(); | 56 | mxc_arch_reset_init_dt(); |
57 | imx51_ipu_mipi_setup(); | ||
58 | imx_src_init(); | ||
27 | 59 | ||
28 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | 60 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
29 | platform_device_register_full(&devinfo); | 61 | platform_device_register_full(&devinfo); |
30 | } | 62 | } |
31 | 63 | ||
32 | static const char *imx51_dt_board_compat[] __initconst = { | 64 | static void __init imx51_init_late(void) |
65 | { | ||
66 | mx51_neon_fixup(); | ||
67 | imx51_pm_init(); | ||
68 | } | ||
69 | |||
70 | static const char * const imx51_dt_board_compat[] __initconst = { | ||
33 | "fsl,imx51", | 71 | "fsl,imx51", |
34 | NULL | 72 | NULL |
35 | }; | 73 | }; |
36 | 74 | ||
37 | DT_MACHINE_START(IMX51_DT, "Freescale i.MX51 (Device Tree Support)") | 75 | DT_MACHINE_START(IMX51_DT, "Freescale i.MX51 (Device Tree Support)") |
38 | .map_io = mx51_map_io, | ||
39 | .init_early = imx51_init_early, | 76 | .init_early = imx51_init_early, |
40 | .init_irq = mx51_init_irq, | 77 | .init_irq = tzic_init_irq, |
41 | .init_machine = imx51_dt_init, | 78 | .init_machine = imx51_dt_init, |
42 | .init_late = imx51_init_late, | 79 | .init_late = imx51_init_late, |
43 | .dt_compat = imx51_dt_board_compat, | 80 | .dt_compat = imx51_dt_board_compat, |
diff --git a/arch/arm/mach-imx/mach-imx53.c b/arch/arm/mach-imx/mach-imx53.c index 2bad387956c0..03dd6ea13acc 100644 --- a/arch/arm/mach-imx/mach-imx53.c +++ b/arch/arm/mach-imx/mach-imx53.c | |||
@@ -22,24 +22,35 @@ | |||
22 | 22 | ||
23 | #include "common.h" | 23 | #include "common.h" |
24 | #include "hardware.h" | 24 | #include "hardware.h" |
25 | #include "mx53.h" | 25 | |
26 | static void __init imx53_init_early(void) | ||
27 | { | ||
28 | mxc_set_cpu_type(MXC_CPU_MX53); | ||
29 | } | ||
26 | 30 | ||
27 | static void __init imx53_dt_init(void) | 31 | static void __init imx53_dt_init(void) |
28 | { | 32 | { |
29 | mxc_arch_reset_init_dt(); | 33 | mxc_arch_reset_init_dt(); |
34 | imx_src_init(); | ||
30 | 35 | ||
31 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | 36 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
37 | |||
38 | imx_aips_allow_unprivileged_access("fsl,imx53-aipstz"); | ||
39 | } | ||
40 | |||
41 | static void __init imx53_init_late(void) | ||
42 | { | ||
43 | imx53_pm_init(); | ||
32 | } | 44 | } |
33 | 45 | ||
34 | static const char *imx53_dt_board_compat[] __initconst = { | 46 | static const char * const imx53_dt_board_compat[] __initconst = { |
35 | "fsl,imx53", | 47 | "fsl,imx53", |
36 | NULL | 48 | NULL |
37 | }; | 49 | }; |
38 | 50 | ||
39 | DT_MACHINE_START(IMX53_DT, "Freescale i.MX53 (Device Tree Support)") | 51 | DT_MACHINE_START(IMX53_DT, "Freescale i.MX53 (Device Tree Support)") |
40 | .map_io = mx53_map_io, | ||
41 | .init_early = imx53_init_early, | 52 | .init_early = imx53_init_early, |
42 | .init_irq = mx53_init_irq, | 53 | .init_irq = tzic_init_irq, |
43 | .init_machine = imx53_dt_init, | 54 | .init_machine = imx53_dt_init, |
44 | .init_late = imx53_init_late, | 55 | .init_late = imx53_init_late, |
45 | .dt_compat = imx53_dt_board_compat, | 56 | .dt_compat = imx53_dt_board_compat, |
diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c index e60456d85c9d..d51c6e99a2e9 100644 --- a/arch/arm/mach-imx/mach-imx6q.c +++ b/arch/arm/mach-imx/mach-imx6q.c | |||
@@ -320,7 +320,7 @@ static void __init imx6q_opp_check_speed_grading(struct device *cpu_dev) | |||
320 | val >>= OCOTP_CFG3_SPEED_SHIFT; | 320 | val >>= OCOTP_CFG3_SPEED_SHIFT; |
321 | val &= 0x3; | 321 | val &= 0x3; |
322 | 322 | ||
323 | if (val != OCOTP_CFG3_SPEED_1P2GHZ) | 323 | if ((val != OCOTP_CFG3_SPEED_1P2GHZ) && cpu_is_imx6q()) |
324 | if (dev_pm_opp_disable(cpu_dev, 1200000000)) | 324 | if (dev_pm_opp_disable(cpu_dev, 1200000000)) |
325 | pr_warn("failed to disable 1.2 GHz OPP\n"); | 325 | pr_warn("failed to disable 1.2 GHz OPP\n"); |
326 | if (val < OCOTP_CFG3_SPEED_996MHZ) | 326 | if (val < OCOTP_CFG3_SPEED_996MHZ) |
@@ -396,7 +396,7 @@ static void __init imx6q_init_irq(void) | |||
396 | irqchip_init(); | 396 | irqchip_init(); |
397 | } | 397 | } |
398 | 398 | ||
399 | static const char *imx6q_dt_compat[] __initconst = { | 399 | static const char * const imx6q_dt_compat[] __initconst = { |
400 | "fsl,imx6dl", | 400 | "fsl,imx6dl", |
401 | "fsl,imx6q", | 401 | "fsl,imx6q", |
402 | NULL, | 402 | NULL, |
diff --git a/arch/arm/mach-imx/mach-imx6sl.c b/arch/arm/mach-imx/mach-imx6sl.c index ad323385115c..ed263a21d928 100644 --- a/arch/arm/mach-imx/mach-imx6sl.c +++ b/arch/arm/mach-imx/mach-imx6sl.c | |||
@@ -70,7 +70,7 @@ static void __init imx6sl_init_irq(void) | |||
70 | irqchip_init(); | 70 | irqchip_init(); |
71 | } | 71 | } |
72 | 72 | ||
73 | static const char *imx6sl_dt_compat[] __initconst = { | 73 | static const char * const imx6sl_dt_compat[] __initconst = { |
74 | "fsl,imx6sl", | 74 | "fsl,imx6sl", |
75 | NULL, | 75 | NULL, |
76 | }; | 76 | }; |
diff --git a/arch/arm/mach-imx/mach-imx6sx.c b/arch/arm/mach-imx/mach-imx6sx.c index 02fccf6033ac..673a734165ba 100644 --- a/arch/arm/mach-imx/mach-imx6sx.c +++ b/arch/arm/mach-imx/mach-imx6sx.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <asm/mach/map.h> | 12 | #include <asm/mach/map.h> |
13 | 13 | ||
14 | #include "common.h" | 14 | #include "common.h" |
15 | #include "cpuidle.h" | ||
15 | 16 | ||
16 | static void __init imx6sx_init_machine(void) | 17 | static void __init imx6sx_init_machine(void) |
17 | { | 18 | { |
@@ -26,6 +27,7 @@ static void __init imx6sx_init_machine(void) | |||
26 | of_platform_populate(NULL, of_default_bus_match_table, NULL, parent); | 27 | of_platform_populate(NULL, of_default_bus_match_table, NULL, parent); |
27 | 28 | ||
28 | imx_anatop_init(); | 29 | imx_anatop_init(); |
30 | imx6sx_pm_init(); | ||
29 | } | 31 | } |
30 | 32 | ||
31 | static void __init imx6sx_init_irq(void) | 33 | static void __init imx6sx_init_irq(void) |
@@ -37,7 +39,12 @@ static void __init imx6sx_init_irq(void) | |||
37 | irqchip_init(); | 39 | irqchip_init(); |
38 | } | 40 | } |
39 | 41 | ||
40 | static const char *imx6sx_dt_compat[] __initconst = { | 42 | static void __init imx6sx_init_late(void) |
43 | { | ||
44 | imx6q_cpuidle_init(); | ||
45 | } | ||
46 | |||
47 | static const char * const imx6sx_dt_compat[] __initconst = { | ||
41 | "fsl,imx6sx", | 48 | "fsl,imx6sx", |
42 | NULL, | 49 | NULL, |
43 | }; | 50 | }; |
@@ -47,5 +54,6 @@ DT_MACHINE_START(IMX6SX, "Freescale i.MX6 SoloX (Device Tree)") | |||
47 | .init_irq = imx6sx_init_irq, | 54 | .init_irq = imx6sx_init_irq, |
48 | .init_machine = imx6sx_init_machine, | 55 | .init_machine = imx6sx_init_machine, |
49 | .dt_compat = imx6sx_dt_compat, | 56 | .dt_compat = imx6sx_dt_compat, |
57 | .init_late = imx6sx_init_late, | ||
50 | .restart = mxc_restart, | 58 | .restart = mxc_restart, |
51 | MACHINE_END | 59 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-mx25_3ds.c b/arch/arm/mach-imx/mach-mx25_3ds.c index ea1fa199c148..0d01e367b062 100644 --- a/arch/arm/mach-imx/mach-mx25_3ds.c +++ b/arch/arm/mach-imx/mach-mx25_3ds.c | |||
@@ -39,6 +39,7 @@ | |||
39 | 39 | ||
40 | #include "common.h" | 40 | #include "common.h" |
41 | #include "devices-imx25.h" | 41 | #include "devices-imx25.h" |
42 | #include "ehci.h" | ||
42 | #include "hardware.h" | 43 | #include "hardware.h" |
43 | #include "iomux-mx25.h" | 44 | #include "iomux-mx25.h" |
44 | #include "mx25.h" | 45 | #include "mx25.h" |
diff --git a/arch/arm/mach-imx/mach-mx27_3ds.c b/arch/arm/mach-imx/mach-mx27_3ds.c index 435a5428a678..9ef4640f3660 100644 --- a/arch/arm/mach-imx/mach-mx27_3ds.c +++ b/arch/arm/mach-imx/mach-mx27_3ds.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include "3ds_debugboard.h" | 40 | #include "3ds_debugboard.h" |
41 | #include "common.h" | 41 | #include "common.h" |
42 | #include "devices-imx27.h" | 42 | #include "devices-imx27.h" |
43 | #include "ehci.h" | ||
43 | #include "hardware.h" | 44 | #include "hardware.h" |
44 | #include "iomux-mx27.h" | 45 | #include "iomux-mx27.h" |
45 | #include "ulpi.h" | 46 | #include "ulpi.h" |
diff --git a/arch/arm/mach-imx/mach-mx31_3ds.c b/arch/arm/mach-imx/mach-mx31_3ds.c index 4217871a9653..453f41a2c5a9 100644 --- a/arch/arm/mach-imx/mach-mx31_3ds.c +++ b/arch/arm/mach-imx/mach-mx31_3ds.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include "3ds_debugboard.h" | 40 | #include "3ds_debugboard.h" |
41 | #include "common.h" | 41 | #include "common.h" |
42 | #include "devices-imx31.h" | 42 | #include "devices-imx31.h" |
43 | #include "ehci.h" | ||
43 | #include "hardware.h" | 44 | #include "hardware.h" |
44 | #include "iomux-mx3.h" | 45 | #include "iomux-mx3.h" |
45 | #include "ulpi.h" | 46 | #include "ulpi.h" |
diff --git a/arch/arm/mach-imx/mach-mx31lilly.c b/arch/arm/mach-imx/mach-mx31lilly.c index eee042fa2768..e9549a3c0223 100644 --- a/arch/arm/mach-imx/mach-mx31lilly.c +++ b/arch/arm/mach-imx/mach-mx31lilly.c | |||
@@ -45,6 +45,7 @@ | |||
45 | #include "board-mx31lilly.h" | 45 | #include "board-mx31lilly.h" |
46 | #include "common.h" | 46 | #include "common.h" |
47 | #include "devices-imx31.h" | 47 | #include "devices-imx31.h" |
48 | #include "ehci.h" | ||
48 | #include "hardware.h" | 49 | #include "hardware.h" |
49 | #include "iomux-mx3.h" | 50 | #include "iomux-mx3.h" |
50 | #include "ulpi.h" | 51 | #include "ulpi.h" |
diff --git a/arch/arm/mach-imx/mach-mx31lite.c b/arch/arm/mach-imx/mach-mx31lite.c index fa15d0b6118d..57eac6f45fab 100644 --- a/arch/arm/mach-imx/mach-mx31lite.c +++ b/arch/arm/mach-imx/mach-mx31lite.c | |||
@@ -42,6 +42,7 @@ | |||
42 | #include "board-mx31lite.h" | 42 | #include "board-mx31lite.h" |
43 | #include "common.h" | 43 | #include "common.h" |
44 | #include "devices-imx31.h" | 44 | #include "devices-imx31.h" |
45 | #include "ehci.h" | ||
45 | #include "hardware.h" | 46 | #include "hardware.h" |
46 | #include "iomux-mx3.h" | 47 | #include "iomux-mx3.h" |
47 | #include "ulpi.h" | 48 | #include "ulpi.h" |
diff --git a/arch/arm/mach-imx/mach-mx31moboard.c b/arch/arm/mach-imx/mach-mx31moboard.c index 08730f238449..bb6f8a52a6b8 100644 --- a/arch/arm/mach-imx/mach-mx31moboard.c +++ b/arch/arm/mach-imx/mach-mx31moboard.c | |||
@@ -47,6 +47,7 @@ | |||
47 | #include "board-mx31moboard.h" | 47 | #include "board-mx31moboard.h" |
48 | #include "common.h" | 48 | #include "common.h" |
49 | #include "devices-imx31.h" | 49 | #include "devices-imx31.h" |
50 | #include "ehci.h" | ||
50 | #include "hardware.h" | 51 | #include "hardware.h" |
51 | #include "iomux-mx3.h" | 52 | #include "iomux-mx3.h" |
52 | #include "ulpi.h" | 53 | #include "ulpi.h" |
@@ -434,10 +435,8 @@ static int __init moboard_usbh2_init(void) | |||
434 | return -ENODEV; | 435 | return -ENODEV; |
435 | 436 | ||
436 | pdev = imx31_add_mxc_ehci_hs(2, &usbh2_pdata); | 437 | pdev = imx31_add_mxc_ehci_hs(2, &usbh2_pdata); |
437 | if (IS_ERR(pdev)) | ||
438 | return PTR_ERR(pdev); | ||
439 | 438 | ||
440 | return 0; | 439 | return PTR_ERR_OR_ZERO(pdev); |
441 | } | 440 | } |
442 | 441 | ||
443 | static const struct gpio_led mx31moboard_leds[] __initconst = { | 442 | static const struct gpio_led mx31moboard_leds[] __initconst = { |
diff --git a/arch/arm/mach-imx/mach-mx35_3ds.c b/arch/arm/mach-imx/mach-mx35_3ds.c index 4e8b184d773b..72cd77d21f63 100644 --- a/arch/arm/mach-imx/mach-mx35_3ds.c +++ b/arch/arm/mach-imx/mach-mx35_3ds.c | |||
@@ -50,6 +50,7 @@ | |||
50 | #include "3ds_debugboard.h" | 50 | #include "3ds_debugboard.h" |
51 | #include "common.h" | 51 | #include "common.h" |
52 | #include "devices-imx35.h" | 52 | #include "devices-imx35.h" |
53 | #include "ehci.h" | ||
53 | #include "hardware.h" | 54 | #include "hardware.h" |
54 | #include "iomux-mx35.h" | 55 | #include "iomux-mx35.h" |
55 | 56 | ||
diff --git a/arch/arm/mach-imx/mach-pca100.c b/arch/arm/mach-imx/mach-pca100.c index 12212378c672..2d1c50bd8bdf 100644 --- a/arch/arm/mach-imx/mach-pca100.c +++ b/arch/arm/mach-imx/mach-pca100.c | |||
@@ -36,6 +36,7 @@ | |||
36 | 36 | ||
37 | #include "common.h" | 37 | #include "common.h" |
38 | #include "devices-imx27.h" | 38 | #include "devices-imx27.h" |
39 | #include "ehci.h" | ||
39 | #include "hardware.h" | 40 | #include "hardware.h" |
40 | #include "iomux-mx27.h" | 41 | #include "iomux-mx27.h" |
41 | #include "ulpi.h" | 42 | #include "ulpi.h" |
diff --git a/arch/arm/mach-imx/mach-pcm037.c b/arch/arm/mach-imx/mach-pcm037.c index 81b8affb9448..8eb1570f7851 100644 --- a/arch/arm/mach-imx/mach-pcm037.c +++ b/arch/arm/mach-imx/mach-pcm037.c | |||
@@ -45,6 +45,7 @@ | |||
45 | 45 | ||
46 | #include "common.h" | 46 | #include "common.h" |
47 | #include "devices-imx31.h" | 47 | #include "devices-imx31.h" |
48 | #include "ehci.h" | ||
48 | #include "hardware.h" | 49 | #include "hardware.h" |
49 | #include "iomux-mx3.h" | 50 | #include "iomux-mx3.h" |
50 | #include "pcm037.h" | 51 | #include "pcm037.h" |
diff --git a/arch/arm/mach-imx/mach-pcm038.c b/arch/arm/mach-imx/mach-pcm038.c index 6c56fb5553c7..ee862ad6b6fc 100644 --- a/arch/arm/mach-imx/mach-pcm038.c +++ b/arch/arm/mach-imx/mach-pcm038.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include "board-pcm038.h" | 36 | #include "board-pcm038.h" |
37 | #include "common.h" | 37 | #include "common.h" |
38 | #include "devices-imx27.h" | 38 | #include "devices-imx27.h" |
39 | #include "ehci.h" | ||
39 | #include "hardware.h" | 40 | #include "hardware.h" |
40 | #include "iomux-mx27.h" | 41 | #include "iomux-mx27.h" |
41 | #include "ulpi.h" | 42 | #include "ulpi.h" |
diff --git a/arch/arm/mach-imx/mach-pcm043.c b/arch/arm/mach-imx/mach-pcm043.c index c62b5d261345..b623bcaca76c 100644 --- a/arch/arm/mach-imx/mach-pcm043.c +++ b/arch/arm/mach-imx/mach-pcm043.c | |||
@@ -35,6 +35,7 @@ | |||
35 | 35 | ||
36 | #include "common.h" | 36 | #include "common.h" |
37 | #include "devices-imx35.h" | 37 | #include "devices-imx35.h" |
38 | #include "ehci.h" | ||
38 | #include "hardware.h" | 39 | #include "hardware.h" |
39 | #include "iomux-mx35.h" | 40 | #include "iomux-mx35.h" |
40 | #include "ulpi.h" | 41 | #include "ulpi.h" |
diff --git a/arch/arm/mach-imx/mach-vf610.c b/arch/arm/mach-imx/mach-vf610.c index c44602758120..ee7e57b752a7 100644 --- a/arch/arm/mach-imx/mach-vf610.c +++ b/arch/arm/mach-imx/mach-vf610.c | |||
@@ -20,7 +20,7 @@ static void __init vf610_init_machine(void) | |||
20 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | 20 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
21 | } | 21 | } |
22 | 22 | ||
23 | static const char *vf610_dt_compat[] __initconst = { | 23 | static const char * const vf610_dt_compat[] __initconst = { |
24 | "fsl,vf610", | 24 | "fsl,vf610", |
25 | NULL, | 25 | NULL, |
26 | }; | 26 | }; |
diff --git a/arch/arm/mach-imx/mach-vpr200.c b/arch/arm/mach-imx/mach-vpr200.c index 872b3c6ba408..97836e94451c 100644 --- a/arch/arm/mach-imx/mach-vpr200.c +++ b/arch/arm/mach-imx/mach-vpr200.c | |||
@@ -34,6 +34,7 @@ | |||
34 | 34 | ||
35 | #include "common.h" | 35 | #include "common.h" |
36 | #include "devices-imx35.h" | 36 | #include "devices-imx35.h" |
37 | #include "ehci.h" | ||
37 | #include "hardware.h" | 38 | #include "hardware.h" |
38 | #include "iomux-mx35.h" | 39 | #include "iomux-mx35.h" |
39 | 40 | ||
diff --git a/arch/arm/mach-imx/mm-imx5.c b/arch/arm/mach-imx/mm-imx5.c deleted file mode 100644 index 4c112021aa4e..000000000000 --- a/arch/arm/mach-imx/mm-imx5.c +++ /dev/null | |||
@@ -1,155 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2008-2010 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | * | ||
4 | * The code contained herein is licensed under the GNU General Public | ||
5 | * License. You may obtain a copy of the GNU General Public License | ||
6 | * Version 2 or later at the following locations: | ||
7 | * | ||
8 | * http://www.opensource.org/licenses/gpl-license.html | ||
9 | * http://www.gnu.org/copyleft/gpl.html | ||
10 | * | ||
11 | * Create static mapping between physical to virtual memory. | ||
12 | */ | ||
13 | |||
14 | #include <linux/mm.h> | ||
15 | #include <linux/init.h> | ||
16 | #include <linux/clk.h> | ||
17 | #include <linux/pinctrl/machine.h> | ||
18 | #include <linux/of_address.h> | ||
19 | |||
20 | #include <asm/mach/map.h> | ||
21 | |||
22 | #include "common.h" | ||
23 | #include "devices/devices-common.h" | ||
24 | #include "hardware.h" | ||
25 | #include "iomux-v3.h" | ||
26 | |||
27 | /* | ||
28 | * Define the MX51 memory map. | ||
29 | */ | ||
30 | static struct map_desc mx51_io_desc[] __initdata = { | ||
31 | imx_map_entry(MX51, TZIC, MT_DEVICE), | ||
32 | imx_map_entry(MX51, IRAM, MT_DEVICE), | ||
33 | imx_map_entry(MX51, AIPS1, MT_DEVICE), | ||
34 | imx_map_entry(MX51, SPBA0, MT_DEVICE), | ||
35 | imx_map_entry(MX51, AIPS2, MT_DEVICE), | ||
36 | }; | ||
37 | |||
38 | /* | ||
39 | * Define the MX53 memory map. | ||
40 | */ | ||
41 | static struct map_desc mx53_io_desc[] __initdata = { | ||
42 | imx_map_entry(MX53, TZIC, MT_DEVICE), | ||
43 | imx_map_entry(MX53, AIPS1, MT_DEVICE), | ||
44 | imx_map_entry(MX53, SPBA0, MT_DEVICE), | ||
45 | imx_map_entry(MX53, AIPS2, MT_DEVICE), | ||
46 | }; | ||
47 | |||
48 | /* | ||
49 | * This function initializes the memory map. It is called during the | ||
50 | * system startup to create static physical to virtual memory mappings | ||
51 | * for the IO modules. | ||
52 | */ | ||
53 | void __init mx51_map_io(void) | ||
54 | { | ||
55 | iotable_init(mx51_io_desc, ARRAY_SIZE(mx51_io_desc)); | ||
56 | } | ||
57 | |||
58 | void __init mx53_map_io(void) | ||
59 | { | ||
60 | iotable_init(mx53_io_desc, ARRAY_SIZE(mx53_io_desc)); | ||
61 | } | ||
62 | |||
63 | /* | ||
64 | * The MIPI HSC unit has been removed from the i.MX51 Reference Manual by | ||
65 | * the Freescale marketing division. However this did not remove the | ||
66 | * hardware from the chip which still needs to be configured for proper | ||
67 | * IPU support. | ||
68 | */ | ||
69 | static void __init imx51_ipu_mipi_setup(void) | ||
70 | { | ||
71 | void __iomem *hsc_addr; | ||
72 | hsc_addr = MX51_IO_ADDRESS(MX51_MIPI_HSC_BASE_ADDR); | ||
73 | |||
74 | /* setup MIPI module to legacy mode */ | ||
75 | __raw_writel(0xf00, hsc_addr); | ||
76 | |||
77 | /* CSI mode: reserved; DI control mode: legacy (from Freescale BSP) */ | ||
78 | __raw_writel(__raw_readl(hsc_addr + 0x800) | 0x30ff, | ||
79 | hsc_addr + 0x800); | ||
80 | } | ||
81 | |||
82 | void __init imx51_init_early(void) | ||
83 | { | ||
84 | imx51_ipu_mipi_setup(); | ||
85 | mxc_set_cpu_type(MXC_CPU_MX51); | ||
86 | mxc_iomux_v3_init(MX51_IO_ADDRESS(MX51_IOMUXC_BASE_ADDR)); | ||
87 | imx_src_init(); | ||
88 | } | ||
89 | |||
90 | void __init imx53_init_early(void) | ||
91 | { | ||
92 | mxc_set_cpu_type(MXC_CPU_MX53); | ||
93 | imx_src_init(); | ||
94 | } | ||
95 | |||
96 | void __init mx51_init_irq(void) | ||
97 | { | ||
98 | tzic_init_irq(MX51_IO_ADDRESS(MX51_TZIC_BASE_ADDR)); | ||
99 | } | ||
100 | |||
101 | void __init mx53_init_irq(void) | ||
102 | { | ||
103 | struct device_node *np; | ||
104 | void __iomem *base; | ||
105 | |||
106 | np = of_find_compatible_node(NULL, NULL, "fsl,imx53-tzic"); | ||
107 | base = of_iomap(np, 0); | ||
108 | WARN_ON(!base); | ||
109 | |||
110 | tzic_init_irq(base); | ||
111 | } | ||
112 | |||
113 | static struct sdma_platform_data imx51_sdma_pdata __initdata = { | ||
114 | .fw_name = "sdma-imx51.bin", | ||
115 | }; | ||
116 | |||
117 | static const struct resource imx51_audmux_res[] __initconst = { | ||
118 | DEFINE_RES_MEM(MX51_AUDMUX_BASE_ADDR, SZ_16K), | ||
119 | }; | ||
120 | |||
121 | void __init imx51_soc_init(void) | ||
122 | { | ||
123 | mxc_arch_reset_init(MX51_IO_ADDRESS(MX51_WDOG1_BASE_ADDR)); | ||
124 | mxc_device_init(); | ||
125 | |||
126 | /* i.mx51 has the i.mx35 type gpio */ | ||
127 | mxc_register_gpio("imx35-gpio", 0, MX51_GPIO1_BASE_ADDR, SZ_16K, MX51_INT_GPIO1_LOW, MX51_INT_GPIO1_HIGH); | ||
128 | mxc_register_gpio("imx35-gpio", 1, MX51_GPIO2_BASE_ADDR, SZ_16K, MX51_INT_GPIO2_LOW, MX51_INT_GPIO2_HIGH); | ||
129 | mxc_register_gpio("imx35-gpio", 2, MX51_GPIO3_BASE_ADDR, SZ_16K, MX51_INT_GPIO3_LOW, MX51_INT_GPIO3_HIGH); | ||
130 | mxc_register_gpio("imx35-gpio", 3, MX51_GPIO4_BASE_ADDR, SZ_16K, MX51_INT_GPIO4_LOW, MX51_INT_GPIO4_HIGH); | ||
131 | |||
132 | pinctrl_provide_dummies(); | ||
133 | |||
134 | /* i.mx51 has the i.mx35 type sdma */ | ||
135 | imx_add_imx_sdma("imx35-sdma", MX51_SDMA_BASE_ADDR, MX51_INT_SDMA, &imx51_sdma_pdata); | ||
136 | |||
137 | /* Setup AIPS registers */ | ||
138 | imx_set_aips(MX51_IO_ADDRESS(MX51_AIPS1_BASE_ADDR)); | ||
139 | imx_set_aips(MX51_IO_ADDRESS(MX51_AIPS2_BASE_ADDR)); | ||
140 | |||
141 | /* i.mx51 has the i.mx31 type audmux */ | ||
142 | platform_device_register_simple("imx31-audmux", 0, imx51_audmux_res, | ||
143 | ARRAY_SIZE(imx51_audmux_res)); | ||
144 | } | ||
145 | |||
146 | void __init imx51_init_late(void) | ||
147 | { | ||
148 | mx51_neon_fixup(); | ||
149 | imx5_pm_init(); | ||
150 | } | ||
151 | |||
152 | void __init imx53_init_late(void) | ||
153 | { | ||
154 | imx5_pm_init(); | ||
155 | } | ||
diff --git a/arch/arm/mach-imx/mx1-camera-fiq-ksym.c b/arch/arm/mach-imx/mx1-camera-fiq-ksym.c deleted file mode 100644 index fb38436ca67f..000000000000 --- a/arch/arm/mach-imx/mx1-camera-fiq-ksym.c +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | /* | ||
2 | * Exported ksyms of ARCH_MX1 | ||
3 | * | ||
4 | * Copyright (C) 2008, Darius Augulis <augulis.darius@gmail.com> | ||
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 version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | #include <linux/platform_device.h> | ||
12 | #include <linux/module.h> | ||
13 | |||
14 | #include <linux/platform_data/camera-mx1.h> | ||
15 | |||
16 | /* IMX camera FIQ handler */ | ||
17 | EXPORT_SYMBOL(mx1_camera_sof_fiq_start); | ||
18 | EXPORT_SYMBOL(mx1_camera_sof_fiq_end); | ||
diff --git a/arch/arm/mach-imx/mx1-camera-fiq.S b/arch/arm/mach-imx/mx1-camera-fiq.S deleted file mode 100644 index 9c69aa65bf17..000000000000 --- a/arch/arm/mach-imx/mx1-camera-fiq.S +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2008 Paulius Zaleckas <paulius.zaleckas@teltonika.lt> | ||
3 | * | ||
4 | * Based on linux/arch/arm/lib/floppydma.S | ||
5 | * Copyright (C) 1995, 1996 Russell King | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | */ | ||
11 | #include <linux/linkage.h> | ||
12 | #include <asm/assembler.h> | ||
13 | |||
14 | .text | ||
15 | .global mx1_camera_sof_fiq_end | ||
16 | .global mx1_camera_sof_fiq_start | ||
17 | mx1_camera_sof_fiq_start: | ||
18 | @ enable dma | ||
19 | ldr r12, [r9] | ||
20 | orr r12, r12, #0x00000001 | ||
21 | str r12, [r9] | ||
22 | @ unmask DMA interrupt | ||
23 | ldr r12, [r8] | ||
24 | bic r12, r12, r13 | ||
25 | str r12, [r8] | ||
26 | @ disable SOF interrupt | ||
27 | ldr r12, [r10] | ||
28 | bic r12, r12, #0x00010000 | ||
29 | str r12, [r10] | ||
30 | @ clear SOF flag | ||
31 | mov r12, #0x00010000 | ||
32 | str r12, [r11] | ||
33 | @ return from FIQ | ||
34 | subs pc, lr, #4 | ||
35 | mx1_camera_sof_fiq_end: | ||
diff --git a/arch/arm/mach-imx/mx31moboard-devboard.c b/arch/arm/mach-imx/mx31moboard-devboard.c index 52d5b1574721..1e91a0918e83 100644 --- a/arch/arm/mach-imx/mx31moboard-devboard.c +++ b/arch/arm/mach-imx/mx31moboard-devboard.c | |||
@@ -24,6 +24,7 @@ | |||
24 | 24 | ||
25 | #include "common.h" | 25 | #include "common.h" |
26 | #include "devices-imx31.h" | 26 | #include "devices-imx31.h" |
27 | #include "ehci.h" | ||
27 | #include "hardware.h" | 28 | #include "hardware.h" |
28 | #include "iomux-mx3.h" | 29 | #include "iomux-mx3.h" |
29 | #include "ulpi.h" | 30 | #include "ulpi.h" |
@@ -213,10 +214,8 @@ static int __init devboard_usbh1_init(void) | |||
213 | usbh1_pdata.otg = phy; | 214 | usbh1_pdata.otg = phy; |
214 | 215 | ||
215 | pdev = imx31_add_mxc_ehci_hs(1, &usbh1_pdata); | 216 | pdev = imx31_add_mxc_ehci_hs(1, &usbh1_pdata); |
216 | if (IS_ERR(pdev)) | ||
217 | return PTR_ERR(pdev); | ||
218 | 217 | ||
219 | return 0; | 218 | return PTR_ERR_OR_ZERO(pdev); |
220 | } | 219 | } |
221 | 220 | ||
222 | 221 | ||
diff --git a/arch/arm/mach-imx/mx31moboard-marxbot.c b/arch/arm/mach-imx/mx31moboard-marxbot.c index a4f43e90f3c1..2e895a82a6eb 100644 --- a/arch/arm/mach-imx/mx31moboard-marxbot.c +++ b/arch/arm/mach-imx/mx31moboard-marxbot.c | |||
@@ -28,6 +28,7 @@ | |||
28 | 28 | ||
29 | #include "common.h" | 29 | #include "common.h" |
30 | #include "devices-imx31.h" | 30 | #include "devices-imx31.h" |
31 | #include "ehci.h" | ||
31 | #include "hardware.h" | 32 | #include "hardware.h" |
32 | #include "iomux-mx3.h" | 33 | #include "iomux-mx3.h" |
33 | #include "ulpi.h" | 34 | #include "ulpi.h" |
@@ -327,10 +328,8 @@ static int __init marxbot_usbh1_init(void) | |||
327 | usbh1_pdata.otg = phy; | 328 | usbh1_pdata.otg = phy; |
328 | 329 | ||
329 | pdev = imx31_add_mxc_ehci_hs(1, &usbh1_pdata); | 330 | pdev = imx31_add_mxc_ehci_hs(1, &usbh1_pdata); |
330 | if (IS_ERR(pdev)) | ||
331 | return PTR_ERR(pdev); | ||
332 | 331 | ||
333 | return 0; | 332 | return PTR_ERR_OR_ZERO(pdev); |
334 | } | 333 | } |
335 | 334 | ||
336 | static const struct fsl_usb2_platform_data usb_pdata __initconst = { | 335 | static const struct fsl_usb2_platform_data usb_pdata __initconst = { |
diff --git a/arch/arm/mach-imx/mx31moboard-smartbot.c b/arch/arm/mach-imx/mx31moboard-smartbot.c index 04ae45dbfaa7..89fc35a64448 100644 --- a/arch/arm/mach-imx/mx31moboard-smartbot.c +++ b/arch/arm/mach-imx/mx31moboard-smartbot.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include "board-mx31moboard.h" | 28 | #include "board-mx31moboard.h" |
29 | #include "common.h" | 29 | #include "common.h" |
30 | #include "devices-imx31.h" | 30 | #include "devices-imx31.h" |
31 | #include "ehci.h" | ||
31 | #include "hardware.h" | 32 | #include "hardware.h" |
32 | #include "iomux-mx3.h" | 33 | #include "iomux-mx3.h" |
33 | #include "ulpi.h" | 34 | #include "ulpi.h" |
@@ -141,10 +142,8 @@ static int __init smartbot_otg_host_init(void) | |||
141 | return -ENODEV; | 142 | return -ENODEV; |
142 | 143 | ||
143 | pdev = imx31_add_mxc_ehci_otg(&otg_host_pdata); | 144 | pdev = imx31_add_mxc_ehci_otg(&otg_host_pdata); |
144 | if (IS_ERR(pdev)) | ||
145 | return PTR_ERR(pdev); | ||
146 | 145 | ||
147 | return 0; | 146 | return PTR_ERR_OR_ZERO(pdev); |
148 | } | 147 | } |
149 | #else | 148 | #else |
150 | static inline int smartbot_otg_host_init(void) { return 0; } | 149 | static inline int smartbot_otg_host_init(void) { return 0; } |
diff --git a/arch/arm/mach-imx/mx51.h b/arch/arm/mach-imx/mx51.h deleted file mode 100644 index af844f76261a..000000000000 --- a/arch/arm/mach-imx/mx51.h +++ /dev/null | |||
@@ -1,346 +0,0 @@ | |||
1 | #ifndef __MACH_MX51_H__ | ||
2 | #define __MACH_MX51_H__ | ||
3 | |||
4 | /* | ||
5 | * IROM | ||
6 | */ | ||
7 | #define MX51_IROM_BASE_ADDR 0x0 | ||
8 | #define MX51_IROM_SIZE SZ_64K | ||
9 | |||
10 | /* | ||
11 | * IRAM | ||
12 | */ | ||
13 | #define MX51_IRAM_BASE_ADDR 0x1ffe0000 /* internal ram */ | ||
14 | #define MX51_IRAM_PARTITIONS 16 | ||
15 | #define MX51_IRAM_SIZE (MX51_IRAM_PARTITIONS * SZ_8K) /* 128KB */ | ||
16 | |||
17 | #define MX51_GPU_BASE_ADDR 0x20000000 | ||
18 | #define MX51_GPU_CTRL_BASE_ADDR 0x30000000 | ||
19 | #define MX51_IPU_CTRL_BASE_ADDR 0x40000000 | ||
20 | |||
21 | /* | ||
22 | * SPBA global module enabled #0 | ||
23 | */ | ||
24 | #define MX51_SPBA0_BASE_ADDR 0x70000000 | ||
25 | #define MX51_SPBA0_SIZE SZ_1M | ||
26 | |||
27 | #define MX51_ESDHC1_BASE_ADDR (MX51_SPBA0_BASE_ADDR + 0x04000) | ||
28 | #define MX51_ESDHC2_BASE_ADDR (MX51_SPBA0_BASE_ADDR + 0x08000) | ||
29 | #define MX51_UART3_BASE_ADDR (MX51_SPBA0_BASE_ADDR + 0x0c000) | ||
30 | #define MX51_ECSPI1_BASE_ADDR (MX51_SPBA0_BASE_ADDR + 0x10000) | ||
31 | #define MX51_SSI2_BASE_ADDR (MX51_SPBA0_BASE_ADDR + 0x14000) | ||
32 | #define MX51_ESDHC3_BASE_ADDR (MX51_SPBA0_BASE_ADDR + 0x20000) | ||
33 | #define MX51_ESDHC4_BASE_ADDR (MX51_SPBA0_BASE_ADDR + 0x24000) | ||
34 | #define MX51_SPDIF_BASE_ADDR (MX51_SPBA0_BASE_ADDR + 0x28000) | ||
35 | #define MX51_ATA_DMA_BASE_ADDR (MX51_SPBA0_BASE_ADDR + 0x30000) | ||
36 | #define MX51_SLIM_DMA_BASE_ADDR (MX51_SPBA0_BASE_ADDR + 0x34000) | ||
37 | #define MX51_HSI2C_DMA_BASE_ADDR (MX51_SPBA0_BASE_ADDR + 0x38000) | ||
38 | #define MX51_SPBA_CTRL_BASE_ADDR (MX51_SPBA0_BASE_ADDR + 0x3c000) | ||
39 | |||
40 | /* | ||
41 | * AIPS 1 | ||
42 | */ | ||
43 | #define MX51_AIPS1_BASE_ADDR 0x73f00000 | ||
44 | #define MX51_AIPS1_SIZE SZ_1M | ||
45 | |||
46 | #define MX51_USB_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0x80000) | ||
47 | #define MX51_USB_OTG_BASE_ADDR (MX51_USB_BASE_ADDR + 0x0000) | ||
48 | #define MX51_USB_HS1_BASE_ADDR (MX51_USB_BASE_ADDR + 0x0200) | ||
49 | #define MX51_USB_HS2_BASE_ADDR (MX51_USB_BASE_ADDR + 0x0400) | ||
50 | #define MX51_GPIO1_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0x84000) | ||
51 | #define MX51_GPIO2_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0x88000) | ||
52 | #define MX51_GPIO3_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0x8c000) | ||
53 | #define MX51_GPIO4_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0x90000) | ||
54 | #define MX51_KPP_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0x94000) | ||
55 | #define MX51_WDOG1_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0x98000) | ||
56 | #define MX51_WDOG2_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0x9c000) | ||
57 | #define MX51_GPT1_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0xa0000) | ||
58 | #define MX51_SRTC_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0xa4000) | ||
59 | #define MX51_IOMUXC_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0xa8000) | ||
60 | #define MX51_EPIT1_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0xac000) | ||
61 | #define MX51_EPIT2_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0xb0000) | ||
62 | #define MX51_PWM1_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0xb4000) | ||
63 | #define MX51_PWM2_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0xb8000) | ||
64 | #define MX51_UART1_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0xbc000) | ||
65 | #define MX51_UART2_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0xc0000) | ||
66 | #define MX51_SRC_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0xd0000) | ||
67 | #define MX51_CCM_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0xd4000) | ||
68 | #define MX51_GPC_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0xd8000) | ||
69 | |||
70 | /* | ||
71 | * AIPS 2 | ||
72 | */ | ||
73 | #define MX51_AIPS2_BASE_ADDR 0x83f00000 | ||
74 | #define MX51_AIPS2_SIZE SZ_1M | ||
75 | |||
76 | #define MX51_PLL1_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x80000) | ||
77 | #define MX51_PLL2_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x84000) | ||
78 | #define MX51_PLL3_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x88000) | ||
79 | #define MX51_AHBMAX_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x94000) | ||
80 | #define MX51_IIM_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x98000) | ||
81 | #define MX51_CSU_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x9c000) | ||
82 | #define MX51_ARM_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xa0000) | ||
83 | #define MX51_OWIRE_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xa4000) | ||
84 | #define MX51_FIRI_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xa8000) | ||
85 | #define MX51_ECSPI2_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xac000) | ||
86 | #define MX51_SDMA_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xb0000) | ||
87 | #define MX51_SCC_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xb4000) | ||
88 | #define MX51_ROMCP_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xb8000) | ||
89 | #define MX51_RTIC_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xbc000) | ||
90 | #define MX51_CSPI_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xc0000) | ||
91 | #define MX51_I2C2_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xc4000) | ||
92 | #define MX51_I2C1_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xc8000) | ||
93 | #define MX51_SSI1_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xcc000) | ||
94 | #define MX51_AUDMUX_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xd0000) | ||
95 | #define MX51_M4IF_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xd8000) | ||
96 | #define MX51_ESDCTL_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xd9000) | ||
97 | #define MX51_WEIM_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xda000) | ||
98 | #define MX51_NFC_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xdb000) | ||
99 | #define MX51_EMI_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xdbf00) | ||
100 | #define MX51_MIPI_HSC_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xdc000) | ||
101 | #define MX51_ATA_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xe0000) | ||
102 | #define MX51_SIM_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xe4000) | ||
103 | #define MX51_SSI3_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xe8000) | ||
104 | #define MX51_FEC_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xec000) | ||
105 | #define MX51_TVE_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xf0000) | ||
106 | #define MX51_VPU_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xf4000) | ||
107 | #define MX51_SAHARA_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xf8000) | ||
108 | |||
109 | #define MX51_CSD0_BASE_ADDR 0x90000000 | ||
110 | #define MX51_CSD1_BASE_ADDR 0xa0000000 | ||
111 | #define MX51_CS0_BASE_ADDR 0xb0000000 | ||
112 | #define MX51_CS1_BASE_ADDR 0xb8000000 | ||
113 | #define MX51_CS2_BASE_ADDR 0xc0000000 | ||
114 | #define MX51_CS3_BASE_ADDR 0xc8000000 | ||
115 | #define MX51_CS4_BASE_ADDR 0xcc000000 | ||
116 | #define MX51_CS5_BASE_ADDR 0xce000000 | ||
117 | |||
118 | /* | ||
119 | * NFC | ||
120 | */ | ||
121 | #define MX51_NFC_AXI_BASE_ADDR 0xcfff0000 /* NAND flash AXI */ | ||
122 | #define MX51_NFC_AXI_SIZE SZ_64K | ||
123 | |||
124 | #define MX51_GPU2D_BASE_ADDR 0xd0000000 | ||
125 | #define MX51_TZIC_BASE_ADDR 0xe0000000 | ||
126 | #define MX51_TZIC_SIZE SZ_16K | ||
127 | |||
128 | #define MX51_IO_P2V(x) IMX_IO_P2V(x) | ||
129 | #define MX51_IO_ADDRESS(x) IOMEM(MX51_IO_P2V(x)) | ||
130 | |||
131 | /* | ||
132 | * defines for SPBA modules | ||
133 | */ | ||
134 | #define MX51_SPBA_SDHC1 0x04 | ||
135 | #define MX51_SPBA_SDHC2 0x08 | ||
136 | #define MX51_SPBA_UART3 0x0c | ||
137 | #define MX51_SPBA_CSPI1 0x10 | ||
138 | #define MX51_SPBA_SSI2 0x14 | ||
139 | #define MX51_SPBA_SDHC3 0x20 | ||
140 | #define MX51_SPBA_SDHC4 0x24 | ||
141 | #define MX51_SPBA_SPDIF 0x28 | ||
142 | #define MX51_SPBA_ATA 0x30 | ||
143 | #define MX51_SPBA_SLIM 0x34 | ||
144 | #define MX51_SPBA_HSI2C 0x38 | ||
145 | #define MX51_SPBA_CTRL 0x3c | ||
146 | |||
147 | /* | ||
148 | * Defines for modules using static and dynamic DMA channels | ||
149 | */ | ||
150 | #define MX51_MXC_DMA_CHANNEL_IRAM 30 | ||
151 | #define MX51_MXC_DMA_CHANNEL_SPDIF_TX MXC_DMA_DYNAMIC_CHANNEL | ||
152 | #define MX51_MXC_DMA_CHANNEL_UART1_RX MXC_DMA_DYNAMIC_CHANNEL | ||
153 | #define MX51_MXC_DMA_CHANNEL_UART1_TX MXC_DMA_DYNAMIC_CHANNEL | ||
154 | #define MX51_MXC_DMA_CHANNEL_UART2_RX MXC_DMA_DYNAMIC_CHANNEL | ||
155 | #define MX51_MXC_DMA_CHANNEL_UART2_TX MXC_DMA_DYNAMIC_CHANNEL | ||
156 | #define MX51_MXC_DMA_CHANNEL_UART3_RX MXC_DMA_DYNAMIC_CHANNEL | ||
157 | #define MX51_MXC_DMA_CHANNEL_UART3_TX MXC_DMA_DYNAMIC_CHANNEL | ||
158 | #define MX51_MXC_DMA_CHANNEL_MMC1 MXC_DMA_DYNAMIC_CHANNEL | ||
159 | #define MX51_MXC_DMA_CHANNEL_MMC2 MXC_DMA_DYNAMIC_CHANNEL | ||
160 | #define MX51_MXC_DMA_CHANNEL_SSI1_RX MXC_DMA_DYNAMIC_CHANNEL | ||
161 | #define MX51_MXC_DMA_CHANNEL_SSI1_TX MXC_DMA_DYNAMIC_CHANNEL | ||
162 | #define MX51_MXC_DMA_CHANNEL_SSI2_RX MXC_DMA_DYNAMIC_CHANNEL | ||
163 | #ifdef CONFIG_SDMA_IRAM | ||
164 | #define MX51_MXC_DMA_CHANNEL_SSI2_TX (MX51_MXC_DMA_CHANNEL_IRAM + 1) | ||
165 | #else /*CONFIG_SDMA_IRAM */ | ||
166 | #define MX51_MXC_DMA_CHANNEL_SSI2_TX MXC_DMA_DYNAMIC_CHANNEL | ||
167 | #endif /*CONFIG_SDMA_IRAM */ | ||
168 | #define MX51_MXC_DMA_CHANNEL_CSPI1_RX MXC_DMA_DYNAMIC_CHANNEL | ||
169 | #define MX51_MXC_DMA_CHANNEL_CSPI1_TX MXC_DMA_DYNAMIC_CHANNEL | ||
170 | #define MX51_MXC_DMA_CHANNEL_CSPI2_RX MXC_DMA_DYNAMIC_CHANNEL | ||
171 | #define MX51_MXC_DMA_CHANNEL_CSPI2_TX MXC_DMA_DYNAMIC_CHANNEL | ||
172 | #define MX51_MXC_DMA_CHANNEL_CSPI3_RX MXC_DMA_DYNAMIC_CHANNEL | ||
173 | #define MX51_MXC_DMA_CHANNEL_CSPI3_TX MXC_DMA_DYNAMIC_CHANNEL | ||
174 | #define MX51_MXC_DMA_CHANNEL_ATA_RX MXC_DMA_DYNAMIC_CHANNEL | ||
175 | #define MX51_MXC_DMA_CHANNEL_ATA_TX MXC_DMA_DYNAMIC_CHANNEL | ||
176 | #define MX51_MXC_DMA_CHANNEL_MEMORY MXC_DMA_DYNAMIC_CHANNEL | ||
177 | |||
178 | #define MX51_IS_MEM_DEVICE_NONSHARED(x) 0 | ||
179 | |||
180 | /* | ||
181 | * DMA request assignments | ||
182 | */ | ||
183 | #define MX51_DMA_REQ_VPU 0 | ||
184 | #define MX51_DMA_REQ_GPC 1 | ||
185 | #define MX51_DMA_REQ_ATA_RX 2 | ||
186 | #define MX51_DMA_REQ_ATA_TX 3 | ||
187 | #define MX51_DMA_REQ_ATA_TX_END 4 | ||
188 | #define MX51_DMA_REQ_SLIM_B 5 | ||
189 | #define MX51_DMA_REQ_CSPI1_RX 6 | ||
190 | #define MX51_DMA_REQ_CSPI1_TX 7 | ||
191 | #define MX51_DMA_REQ_CSPI2_RX 8 | ||
192 | #define MX51_DMA_REQ_CSPI2_TX 9 | ||
193 | #define MX51_DMA_REQ_HS_I2C_TX 10 | ||
194 | #define MX51_DMA_REQ_HS_I2C_RX 11 | ||
195 | #define MX51_DMA_REQ_FIRI_RX 12 | ||
196 | #define MX51_DMA_REQ_FIRI_TX 13 | ||
197 | #define MX51_DMA_REQ_EXTREQ1 14 | ||
198 | #define MX51_DMA_REQ_GPU 15 | ||
199 | #define MX51_DMA_REQ_UART2_RX 16 | ||
200 | #define MX51_DMA_REQ_UART2_TX 17 | ||
201 | #define MX51_DMA_REQ_UART1_RX 18 | ||
202 | #define MX51_DMA_REQ_UART1_TX 19 | ||
203 | #define MX51_DMA_REQ_SDHC1 20 | ||
204 | #define MX51_DMA_REQ_SDHC2 21 | ||
205 | #define MX51_DMA_REQ_SSI2_RX1 22 | ||
206 | #define MX51_DMA_REQ_SSI2_TX1 23 | ||
207 | #define MX51_DMA_REQ_SSI2_RX0 24 | ||
208 | #define MX51_DMA_REQ_SSI2_TX0 25 | ||
209 | #define MX51_DMA_REQ_SSI1_RX1 26 | ||
210 | #define MX51_DMA_REQ_SSI1_TX1 27 | ||
211 | #define MX51_DMA_REQ_SSI1_RX0 28 | ||
212 | #define MX51_DMA_REQ_SSI1_TX0 29 | ||
213 | #define MX51_DMA_REQ_EMI_RD 30 | ||
214 | #define MX51_DMA_REQ_CTI2_0 31 | ||
215 | #define MX51_DMA_REQ_EMI_WR 32 | ||
216 | #define MX51_DMA_REQ_CTI2_1 33 | ||
217 | #define MX51_DMA_REQ_EPIT2 34 | ||
218 | #define MX51_DMA_REQ_SSI3_RX1 35 | ||
219 | #define MX51_DMA_REQ_IPU 36 | ||
220 | #define MX51_DMA_REQ_SSI3_TX1 37 | ||
221 | #define MX51_DMA_REQ_CSPI_RX 38 | ||
222 | #define MX51_DMA_REQ_CSPI_TX 39 | ||
223 | #define MX51_DMA_REQ_SDHC3 40 | ||
224 | #define MX51_DMA_REQ_SDHC4 41 | ||
225 | #define MX51_DMA_REQ_SLIM_B_TX 42 | ||
226 | #define MX51_DMA_REQ_UART3_RX 43 | ||
227 | #define MX51_DMA_REQ_UART3_TX 44 | ||
228 | #define MX51_DMA_REQ_SPDIF 45 | ||
229 | #define MX51_DMA_REQ_SSI3_RX0 46 | ||
230 | #define MX51_DMA_REQ_SSI3_TX0 47 | ||
231 | |||
232 | /* | ||
233 | * Interrupt numbers | ||
234 | */ | ||
235 | #include <asm/irq.h> | ||
236 | #define MX51_INT_BASE (NR_IRQS_LEGACY + 0) | ||
237 | #define MX51_INT_RESV0 (NR_IRQS_LEGACY + 0) | ||
238 | #define MX51_INT_ESDHC1 (NR_IRQS_LEGACY + 1) | ||
239 | #define MX51_INT_ESDHC2 (NR_IRQS_LEGACY + 2) | ||
240 | #define MX51_INT_ESDHC3 (NR_IRQS_LEGACY + 3) | ||
241 | #define MX51_INT_ESDHC4 (NR_IRQS_LEGACY + 4) | ||
242 | #define MX51_INT_RESV5 (NR_IRQS_LEGACY + 5) | ||
243 | #define MX51_INT_SDMA (NR_IRQS_LEGACY + 6) | ||
244 | #define MX51_INT_IOMUX (NR_IRQS_LEGACY + 7) | ||
245 | #define MX51_INT_NFC (NR_IRQS_LEGACY + 8) | ||
246 | #define MX51_INT_VPU (NR_IRQS_LEGACY + 9) | ||
247 | #define MX51_INT_IPU_ERR (NR_IRQS_LEGACY + 10) | ||
248 | #define MX51_INT_IPU_SYN (NR_IRQS_LEGACY + 11) | ||
249 | #define MX51_INT_GPU (NR_IRQS_LEGACY + 12) | ||
250 | #define MX51_INT_RESV13 (NR_IRQS_LEGACY + 13) | ||
251 | #define MX51_INT_USB_HS1 (NR_IRQS_LEGACY + 14) | ||
252 | #define MX51_INT_EMI (NR_IRQS_LEGACY + 15) | ||
253 | #define MX51_INT_USB_HS2 (NR_IRQS_LEGACY + 16) | ||
254 | #define MX51_INT_USB_HS3 (NR_IRQS_LEGACY + 17) | ||
255 | #define MX51_INT_USB_OTG (NR_IRQS_LEGACY + 18) | ||
256 | #define MX51_INT_SAHARA_H0 (NR_IRQS_LEGACY + 19) | ||
257 | #define MX51_INT_SAHARA_H1 (NR_IRQS_LEGACY + 20) | ||
258 | #define MX51_INT_SCC_SMN (NR_IRQS_LEGACY + 21) | ||
259 | #define MX51_INT_SCC_STZ (NR_IRQS_LEGACY + 22) | ||
260 | #define MX51_INT_SCC_SCM (NR_IRQS_LEGACY + 23) | ||
261 | #define MX51_INT_SRTC_NTZ (NR_IRQS_LEGACY + 24) | ||
262 | #define MX51_INT_SRTC_TZ (NR_IRQS_LEGACY + 25) | ||
263 | #define MX51_INT_RTIC (NR_IRQS_LEGACY + 26) | ||
264 | #define MX51_INT_CSU (NR_IRQS_LEGACY + 27) | ||
265 | #define MX51_INT_SLIM_B (NR_IRQS_LEGACY + 28) | ||
266 | #define MX51_INT_SSI1 (NR_IRQS_LEGACY + 29) | ||
267 | #define MX51_INT_SSI2 (NR_IRQS_LEGACY + 30) | ||
268 | #define MX51_INT_UART1 (NR_IRQS_LEGACY + 31) | ||
269 | #define MX51_INT_UART2 (NR_IRQS_LEGACY + 32) | ||
270 | #define MX51_INT_UART3 (NR_IRQS_LEGACY + 33) | ||
271 | #define MX51_INT_RESV34 (NR_IRQS_LEGACY + 34) | ||
272 | #define MX51_INT_RESV35 (NR_IRQS_LEGACY + 35) | ||
273 | #define MX51_INT_ECSPI1 (NR_IRQS_LEGACY + 36) | ||
274 | #define MX51_INT_ECSPI2 (NR_IRQS_LEGACY + 37) | ||
275 | #define MX51_INT_CSPI (NR_IRQS_LEGACY + 38) | ||
276 | #define MX51_INT_GPT (NR_IRQS_LEGACY + 39) | ||
277 | #define MX51_INT_EPIT1 (NR_IRQS_LEGACY + 40) | ||
278 | #define MX51_INT_EPIT2 (NR_IRQS_LEGACY + 41) | ||
279 | #define MX51_INT_GPIO1_INT7 (NR_IRQS_LEGACY + 42) | ||
280 | #define MX51_INT_GPIO1_INT6 (NR_IRQS_LEGACY + 43) | ||
281 | #define MX51_INT_GPIO1_INT5 (NR_IRQS_LEGACY + 44) | ||
282 | #define MX51_INT_GPIO1_INT4 (NR_IRQS_LEGACY + 45) | ||
283 | #define MX51_INT_GPIO1_INT3 (NR_IRQS_LEGACY + 46) | ||
284 | #define MX51_INT_GPIO1_INT2 (NR_IRQS_LEGACY + 47) | ||
285 | #define MX51_INT_GPIO1_INT1 (NR_IRQS_LEGACY + 48) | ||
286 | #define MX51_INT_GPIO1_INT0 (NR_IRQS_LEGACY + 49) | ||
287 | #define MX51_INT_GPIO1_LOW (NR_IRQS_LEGACY + 50) | ||
288 | #define MX51_INT_GPIO1_HIGH (NR_IRQS_LEGACY + 51) | ||
289 | #define MX51_INT_GPIO2_LOW (NR_IRQS_LEGACY + 52) | ||
290 | #define MX51_INT_GPIO2_HIGH (NR_IRQS_LEGACY + 53) | ||
291 | #define MX51_INT_GPIO3_LOW (NR_IRQS_LEGACY + 54) | ||
292 | #define MX51_INT_GPIO3_HIGH (NR_IRQS_LEGACY + 55) | ||
293 | #define MX51_INT_GPIO4_LOW (NR_IRQS_LEGACY + 56) | ||
294 | #define MX51_INT_GPIO4_HIGH (NR_IRQS_LEGACY + 57) | ||
295 | #define MX51_INT_WDOG1 (NR_IRQS_LEGACY + 58) | ||
296 | #define MX51_INT_WDOG2 (NR_IRQS_LEGACY + 59) | ||
297 | #define MX51_INT_KPP (NR_IRQS_LEGACY + 60) | ||
298 | #define MX51_INT_PWM1 (NR_IRQS_LEGACY + 61) | ||
299 | #define MX51_INT_I2C1 (NR_IRQS_LEGACY + 62) | ||
300 | #define MX51_INT_I2C2 (NR_IRQS_LEGACY + 63) | ||
301 | #define MX51_INT_HS_I2C (NR_IRQS_LEGACY + 64) | ||
302 | #define MX51_INT_RESV65 (NR_IRQS_LEGACY + 65) | ||
303 | #define MX51_INT_RESV66 (NR_IRQS_LEGACY + 66) | ||
304 | #define MX51_INT_SIM_IPB (NR_IRQS_LEGACY + 67) | ||
305 | #define MX51_INT_SIM_DAT (NR_IRQS_LEGACY + 68) | ||
306 | #define MX51_INT_IIM (NR_IRQS_LEGACY + 69) | ||
307 | #define MX51_INT_ATA (NR_IRQS_LEGACY + 70) | ||
308 | #define MX51_INT_CCM1 (NR_IRQS_LEGACY + 71) | ||
309 | #define MX51_INT_CCM2 (NR_IRQS_LEGACY + 72) | ||
310 | #define MX51_INT_GPC1 (NR_IRQS_LEGACY + 73) | ||
311 | #define MX51_INT_GPC2 (NR_IRQS_LEGACY + 74) | ||
312 | #define MX51_INT_SRC (NR_IRQS_LEGACY + 75) | ||
313 | #define MX51_INT_NM (NR_IRQS_LEGACY + 76) | ||
314 | #define MX51_INT_PMU (NR_IRQS_LEGACY + 77) | ||
315 | #define MX51_INT_CTI_IRQ (NR_IRQS_LEGACY + 78) | ||
316 | #define MX51_INT_CTI1_TG0 (NR_IRQS_LEGACY + 79) | ||
317 | #define MX51_INT_CTI1_TG1 (NR_IRQS_LEGACY + 80) | ||
318 | #define MX51_INT_MCG_ERR (NR_IRQS_LEGACY + 81) | ||
319 | #define MX51_INT_MCG_TMR (NR_IRQS_LEGACY + 82) | ||
320 | #define MX51_INT_MCG_FUNC (NR_IRQS_LEGACY + 83) | ||
321 | #define MX51_INT_GPU2_IRQ (NR_IRQS_LEGACY + 84) | ||
322 | #define MX51_INT_GPU2_BUSY (NR_IRQS_LEGACY + 85) | ||
323 | #define MX51_INT_RESV86 (NR_IRQS_LEGACY + 86) | ||
324 | #define MX51_INT_FEC (NR_IRQS_LEGACY + 87) | ||
325 | #define MX51_INT_OWIRE (NR_IRQS_LEGACY + 88) | ||
326 | #define MX51_INT_CTI1_TG2 (NR_IRQS_LEGACY + 89) | ||
327 | #define MX51_INT_SJC (NR_IRQS_LEGACY + 90) | ||
328 | #define MX51_INT_SPDIF (NR_IRQS_LEGACY + 91) | ||
329 | #define MX51_INT_TVE (NR_IRQS_LEGACY + 92) | ||
330 | #define MX51_INT_FIRI (NR_IRQS_LEGACY + 93) | ||
331 | #define MX51_INT_PWM2 (NR_IRQS_LEGACY + 94) | ||
332 | #define MX51_INT_SLIM_EXP (NR_IRQS_LEGACY + 95) | ||
333 | #define MX51_INT_SSI3 (NR_IRQS_LEGACY + 96) | ||
334 | #define MX51_INT_EMI_BOOT (NR_IRQS_LEGACY + 97) | ||
335 | #define MX51_INT_CTI1_TG3 (NR_IRQS_LEGACY + 98) | ||
336 | #define MX51_INT_SMC_RX (NR_IRQS_LEGACY + 99) | ||
337 | #define MX51_INT_VPU_IDLE (NR_IRQS_LEGACY + 100) | ||
338 | #define MX51_INT_EMI_NFC (NR_IRQS_LEGACY + 101) | ||
339 | #define MX51_INT_GPU_IDLE (NR_IRQS_LEGACY + 102) | ||
340 | |||
341 | #if !defined(__ASSEMBLY__) && !defined(__MXC_BOOT_UNCOMPRESS) | ||
342 | extern int mx51_revision(void); | ||
343 | extern void mx51_display_revision(void); | ||
344 | #endif | ||
345 | |||
346 | #endif /* ifndef __MACH_MX51_H__ */ | ||
diff --git a/arch/arm/mach-imx/mx53.h b/arch/arm/mach-imx/mx53.h deleted file mode 100644 index f829d1c22501..000000000000 --- a/arch/arm/mach-imx/mx53.h +++ /dev/null | |||
@@ -1,342 +0,0 @@ | |||
1 | #ifndef __MACH_MX53_H__ | ||
2 | #define __MACH_MX53_H__ | ||
3 | |||
4 | /* | ||
5 | * IROM | ||
6 | */ | ||
7 | #define MX53_IROM_BASE_ADDR 0x0 | ||
8 | #define MX53_IROM_SIZE SZ_64K | ||
9 | |||
10 | /* TZIC */ | ||
11 | #define MX53_TZIC_BASE_ADDR 0x0FFFC000 | ||
12 | #define MX53_TZIC_SIZE SZ_16K | ||
13 | |||
14 | /* | ||
15 | * AHCI SATA | ||
16 | */ | ||
17 | #define MX53_SATA_BASE_ADDR 0x10000000 | ||
18 | |||
19 | /* | ||
20 | * NFC | ||
21 | */ | ||
22 | #define MX53_NFC_AXI_BASE_ADDR 0xF7FF0000 /* NAND flash AXI */ | ||
23 | #define MX53_NFC_AXI_SIZE SZ_64K | ||
24 | |||
25 | /* | ||
26 | * IRAM | ||
27 | */ | ||
28 | #define MX53_IRAM_BASE_ADDR 0xF8000000 /* internal ram */ | ||
29 | #define MX53_IRAM_PARTITIONS 16 | ||
30 | #define MX53_IRAM_SIZE (MX53_IRAM_PARTITIONS * SZ_8K) /* 128KB */ | ||
31 | |||
32 | /* | ||
33 | * Graphics Memory of GPU | ||
34 | */ | ||
35 | #define MX53_IPU_CTRL_BASE_ADDR 0x18000000 | ||
36 | #define MX53_GPU2D_BASE_ADDR 0x20000000 | ||
37 | #define MX53_GPU_BASE_ADDR 0x30000000 | ||
38 | #define MX53_GPU_GMEM_BASE_ADDR 0xF8020000 | ||
39 | |||
40 | #define MX53_DEBUG_BASE_ADDR 0x40000000 | ||
41 | #define MX53_DEBUG_SIZE SZ_1M | ||
42 | #define MX53_ETB_BASE_ADDR (MX53_DEBUG_BASE_ADDR + 0x00001000) | ||
43 | #define MX53_ETM_BASE_ADDR (MX53_DEBUG_BASE_ADDR + 0x00002000) | ||
44 | #define MX53_TPIU_BASE_ADDR (MX53_DEBUG_BASE_ADDR + 0x00003000) | ||
45 | #define MX53_CTI0_BASE_ADDR (MX53_DEBUG_BASE_ADDR + 0x00004000) | ||
46 | #define MX53_CTI1_BASE_ADDR (MX53_DEBUG_BASE_ADDR + 0x00005000) | ||
47 | #define MX53_CTI2_BASE_ADDR (MX53_DEBUG_BASE_ADDR + 0x00006000) | ||
48 | #define MX53_CTI3_BASE_ADDR (MX53_DEBUG_BASE_ADDR + 0x00007000) | ||
49 | #define MX53_CORTEX_DBG_BASE_ADDR (MX53_DEBUG_BASE_ADDR + 0x00008000) | ||
50 | |||
51 | /* | ||
52 | * SPBA global module enabled #0 | ||
53 | */ | ||
54 | #define MX53_SPBA0_BASE_ADDR 0x50000000 | ||
55 | #define MX53_SPBA0_SIZE SZ_1M | ||
56 | |||
57 | #define MX53_ESDHC1_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00004000) | ||
58 | #define MX53_ESDHC2_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00008000) | ||
59 | #define MX53_UART3_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x0000C000) | ||
60 | #define MX53_ECSPI1_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00010000) | ||
61 | #define MX53_SSI2_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00014000) | ||
62 | #define MX53_ESDHC3_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00020000) | ||
63 | #define MX53_ESDHC4_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00024000) | ||
64 | #define MX53_SPDIF_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00028000) | ||
65 | #define MX53_ASRC_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x0002C000) | ||
66 | #define MX53_ATA_DMA_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00030000) | ||
67 | #define MX53_SLIM_DMA_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00034000) | ||
68 | #define MX53_HSI2C_DMA_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00038000) | ||
69 | #define MX53_SPBA_CTRL_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x0003C000) | ||
70 | |||
71 | /* | ||
72 | * AIPS 1 | ||
73 | */ | ||
74 | #define MX53_AIPS1_BASE_ADDR 0x53F00000 | ||
75 | #define MX53_AIPS1_SIZE SZ_1M | ||
76 | |||
77 | #define MX53_OTG_BASE_ADDR (MX53_AIPS1_BASE_ADDR + 0x00080000) | ||
78 | #define MX53_GPIO1_BASE_ADDR (MX53_AIPS1_BASE_ADDR + 0x00084000) | ||
79 | #define MX53_GPIO2_BASE_ADDR (MX53_AIPS1_BASE_ADDR + 0x00088000) | ||
80 | #define MX53_GPIO3_BASE_ADDR (MX53_AIPS1_BASE_ADDR + 0x0008C000) | ||
81 | #define MX53_GPIO4_BASE_ADDR (MX53_AIPS1_BASE_ADDR + 0x00090000) | ||
82 | #define MX53_KPP_BASE_ADDR (MX53_AIPS1_BASE_ADDR + 0x00094000) | ||
83 | #define MX53_WDOG1_BASE_ADDR (MX53_AIPS1_BASE_ADDR + 0x00098000) | ||
84 | #define MX53_WDOG2_BASE_ADDR (MX53_AIPS1_BASE_ADDR + 0x0009C000) | ||
85 | #define MX53_GPT1_BASE_ADDR (MX53_AIPS1_BASE_ADDR + 0x000A0000) | ||
86 | #define MX53_SRTC_BASE_ADDR (MX53_AIPS1_BASE_ADDR + 0x000A4000) | ||
87 | #define MX53_IOMUXC_BASE_ADDR (MX53_AIPS1_BASE_ADDR + 0x000A8000) | ||
88 | #define MX53_EPIT1_BASE_ADDR (MX53_AIPS1_BASE_ADDR + 0x000AC000) | ||
89 | #define MX53_EPIT2_BASE_ADDR (MX53_AIPS1_BASE_ADDR + 0x000B0000) | ||
90 | #define MX53_PWM1_BASE_ADDR (MX53_AIPS1_BASE_ADDR + 0x000B4000) | ||
91 | #define MX53_PWM2_BASE_ADDR (MX53_AIPS1_BASE_ADDR + 0x000B8000) | ||
92 | #define MX53_UART1_BASE_ADDR (MX53_AIPS1_BASE_ADDR + 0x000BC000) | ||
93 | #define MX53_UART2_BASE_ADDR (MX53_AIPS1_BASE_ADDR + 0x000C0000) | ||
94 | #define MX53_SRC_BASE_ADDR (MX53_AIPS1_BASE_ADDR + 0x000D0000) | ||
95 | #define MX53_CCM_BASE_ADDR (MX53_AIPS1_BASE_ADDR + 0x000D4000) | ||
96 | #define MX53_GPC_BASE_ADDR (MX53_AIPS1_BASE_ADDR + 0x000D8000) | ||
97 | #define MX53_GPIO5_BASE_ADDR (MX53_AIPS1_BASE_ADDR + 0x000DC000) | ||
98 | #define MX53_GPIO6_BASE_ADDR (MX53_AIPS1_BASE_ADDR + 0x000E0000) | ||
99 | #define MX53_GPIO7_BASE_ADDR (MX53_AIPS1_BASE_ADDR + 0x000E4000) | ||
100 | #define MX53_ATA_BASE_ADDR (MX53_AIPS1_BASE_ADDR + 0x000E8000) | ||
101 | #define MX53_I2C3_BASE_ADDR (MX53_AIPS1_BASE_ADDR + 0x000EC000) | ||
102 | #define MX53_UART4_BASE_ADDR (MX53_AIPS1_BASE_ADDR + 0x000F0000) | ||
103 | |||
104 | /* | ||
105 | * AIPS 2 | ||
106 | */ | ||
107 | #define MX53_AIPS2_BASE_ADDR 0x63F00000 | ||
108 | #define MX53_AIPS2_SIZE SZ_1M | ||
109 | |||
110 | #define MX53_PLL1_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x00080000) | ||
111 | #define MX53_PLL2_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x00084000) | ||
112 | #define MX53_PLL3_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x00088000) | ||
113 | #define MX53_PLL4_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x0008C000) | ||
114 | #define MX53_UART5_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x00090000) | ||
115 | #define MX53_AHBMAX_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x00094000) | ||
116 | #define MX53_IIM_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x00098000) | ||
117 | #define MX53_CSU_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x0009C000) | ||
118 | #define MX53_ARM_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000A0000) | ||
119 | #define MX53_OWIRE_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000A4000) | ||
120 | #define MX53_FIRI_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000A8000) | ||
121 | #define MX53_ECSPI2_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000AC000) | ||
122 | #define MX53_SDMA_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000B0000) | ||
123 | #define MX53_SCC_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000B4000) | ||
124 | #define MX53_ROMCP_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000B8000) | ||
125 | #define MX53_RTIC_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000BC000) | ||
126 | #define MX53_CSPI_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000C0000) | ||
127 | #define MX53_I2C2_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000C4000) | ||
128 | #define MX53_I2C1_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000C8000) | ||
129 | #define MX53_SSI1_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000CC000) | ||
130 | #define MX53_AUDMUX_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000D0000) | ||
131 | #define MX53_RTC_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000D4000) | ||
132 | #define MX53_M4IF_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000D8000) | ||
133 | #define MX53_ESDCTL_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000D9000) | ||
134 | #define MX53_WEIM_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000DA000) | ||
135 | #define MX53_NFC_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000DB000) | ||
136 | #define MX53_EMI_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000DBF00) | ||
137 | #define MX53_MIPI_HSC_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000DC000) | ||
138 | #define MX53_MLB_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000E4000) | ||
139 | #define MX53_SSI3_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000E8000) | ||
140 | #define MX53_FEC_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000EC000) | ||
141 | #define MX53_TVE_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000F0000) | ||
142 | #define MX53_VPU_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000F4000) | ||
143 | #define MX53_SAHARA_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000F8000) | ||
144 | #define MX53_PTP_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000FC000) | ||
145 | |||
146 | /* | ||
147 | * Memory regions and CS | ||
148 | */ | ||
149 | #define MX53_CSD0_BASE_ADDR 0x70000000 | ||
150 | #define MX53_CSD1_BASE_ADDR 0xB0000000 | ||
151 | #define MX53_CS0_BASE_ADDR 0xF0000000 | ||
152 | #define MX53_CS1_32MB_BASE_ADDR 0xF2000000 | ||
153 | #define MX53_CS1_64MB_BASE_ADDR 0xF4000000 | ||
154 | #define MX53_CS2_64MB_BASE_ADDR 0xF4000000 | ||
155 | #define MX53_CS2_96MB_BASE_ADDR 0xF6000000 | ||
156 | #define MX53_CS3_BASE_ADDR 0xF6000000 | ||
157 | |||
158 | #define MX53_IO_P2V(x) IMX_IO_P2V(x) | ||
159 | #define MX53_IO_ADDRESS(x) IOMEM(MX53_IO_P2V(x)) | ||
160 | |||
161 | /* | ||
162 | * defines for SPBA modules | ||
163 | */ | ||
164 | #define MX53_SPBA_SDHC1 0x04 | ||
165 | #define MX53_SPBA_SDHC2 0x08 | ||
166 | #define MX53_SPBA_UART3 0x0C | ||
167 | #define MX53_SPBA_CSPI1 0x10 | ||
168 | #define MX53_SPBA_SSI2 0x14 | ||
169 | #define MX53_SPBA_SDHC3 0x20 | ||
170 | #define MX53_SPBA_SDHC4 0x24 | ||
171 | #define MX53_SPBA_SPDIF 0x28 | ||
172 | #define MX53_SPBA_ATA 0x30 | ||
173 | #define MX53_SPBA_SLIM 0x34 | ||
174 | #define MX53_SPBA_HSI2C 0x38 | ||
175 | #define MX53_SPBA_CTRL 0x3C | ||
176 | |||
177 | /* | ||
178 | * DMA request assignments | ||
179 | */ | ||
180 | #define MX53_DMA_REQ_SSI3_TX0 47 | ||
181 | #define MX53_DMA_REQ_SSI3_RX0 46 | ||
182 | #define MX53_DMA_REQ_SSI3_TX1 45 | ||
183 | #define MX53_DMA_REQ_SSI3_RX1 44 | ||
184 | #define MX53_DMA_REQ_UART3_TX 43 | ||
185 | #define MX53_DMA_REQ_UART3_RX 42 | ||
186 | #define MX53_DMA_REQ_ESAI_TX 41 | ||
187 | #define MX53_DMA_REQ_ESAI_RX 40 | ||
188 | #define MX53_DMA_REQ_CSPI_TX 39 | ||
189 | #define MX53_DMA_REQ_CSPI_RX 38 | ||
190 | #define MX53_DMA_REQ_ASRC_DMA6 37 | ||
191 | #define MX53_DMA_REQ_ASRC_DMA5 36 | ||
192 | #define MX53_DMA_REQ_ASRC_DMA4 35 | ||
193 | #define MX53_DMA_REQ_ASRC_DMA3 34 | ||
194 | #define MX53_DMA_REQ_ASRC_DMA2 33 | ||
195 | #define MX53_DMA_REQ_ASRC_DMA1 32 | ||
196 | #define MX53_DMA_REQ_EMI_WR 31 | ||
197 | #define MX53_DMA_REQ_EMI_RD 30 | ||
198 | #define MX53_DMA_REQ_SSI1_TX0 29 | ||
199 | #define MX53_DMA_REQ_SSI1_RX0 28 | ||
200 | #define MX53_DMA_REQ_SSI1_TX1 27 | ||
201 | #define MX53_DMA_REQ_SSI1_RX1 26 | ||
202 | #define MX53_DMA_REQ_SSI2_TX0 25 | ||
203 | #define MX53_DMA_REQ_SSI2_RX0 24 | ||
204 | #define MX53_DMA_REQ_SSI2_TX1 23 | ||
205 | #define MX53_DMA_REQ_SSI2_RX1 22 | ||
206 | #define MX53_DMA_REQ_I2C2_SDHC2 21 | ||
207 | #define MX53_DMA_REQ_I2C1_SDHC1 20 | ||
208 | #define MX53_DMA_REQ_UART1_TX 19 | ||
209 | #define MX53_DMA_REQ_UART1_RX 18 | ||
210 | #define MX53_DMA_REQ_UART5_TX 17 | ||
211 | #define MX53_DMA_REQ_UART5_RX 16 | ||
212 | #define MX53_DMA_REQ_SPDIF_TX 15 | ||
213 | #define MX53_DMA_REQ_SPDIF_RX 14 | ||
214 | #define MX53_DMA_REQ_UART2_FIRI_TX 13 | ||
215 | #define MX53_DMA_REQ_UART2_FIRI_RX 12 | ||
216 | #define MX53_DMA_REQ_SDHC4 11 | ||
217 | #define MX53_DMA_REQ_I2C3_SDHC3 10 | ||
218 | #define MX53_DMA_REQ_CSPI2_TX 9 | ||
219 | #define MX53_DMA_REQ_CSPI2_RX 8 | ||
220 | #define MX53_DMA_REQ_CSPI1_TX 7 | ||
221 | #define MX53_DMA_REQ_CSPI1_RX 6 | ||
222 | #define MX53_DMA_REQ_IPU 5 | ||
223 | #define MX53_DMA_REQ_ATA_TX_END 4 | ||
224 | #define MX53_DMA_REQ_ATA_UART4_TX 3 | ||
225 | #define MX53_DMA_REQ_ATA_UART4_RX 2 | ||
226 | #define MX53_DMA_REQ_GPC 1 | ||
227 | #define MX53_DMA_REQ_VPU 0 | ||
228 | |||
229 | /* | ||
230 | * Interrupt numbers | ||
231 | */ | ||
232 | #include <asm/irq.h> | ||
233 | #define MX53_INT_RESV0 (NR_IRQS_LEGACY + 0) | ||
234 | #define MX53_INT_ESDHC1 (NR_IRQS_LEGACY + 1) | ||
235 | #define MX53_INT_ESDHC2 (NR_IRQS_LEGACY + 2) | ||
236 | #define MX53_INT_ESDHC3 (NR_IRQS_LEGACY + 3) | ||
237 | #define MX53_INT_ESDHC4 (NR_IRQS_LEGACY + 4) | ||
238 | #define MX53_INT_DAP (NR_IRQS_LEGACY + 5) | ||
239 | #define MX53_INT_SDMA (NR_IRQS_LEGACY + 6) | ||
240 | #define MX53_INT_IOMUX (NR_IRQS_LEGACY + 7) | ||
241 | #define MX53_INT_NFC (NR_IRQS_LEGACY + 8) | ||
242 | #define MX53_INT_VPU (NR_IRQS_LEGACY + 9) | ||
243 | #define MX53_INT_IPU_ERR (NR_IRQS_LEGACY + 10) | ||
244 | #define MX53_INT_IPU_SYN (NR_IRQS_LEGACY + 11) | ||
245 | #define MX53_INT_GPU (NR_IRQS_LEGACY + 12) | ||
246 | #define MX53_INT_UART4 (NR_IRQS_LEGACY + 13) | ||
247 | #define MX53_INT_USB_H1 (NR_IRQS_LEGACY + 14) | ||
248 | #define MX53_INT_EMI (NR_IRQS_LEGACY + 15) | ||
249 | #define MX53_INT_USB_H2 (NR_IRQS_LEGACY + 16) | ||
250 | #define MX53_INT_USB_H3 (NR_IRQS_LEGACY + 17) | ||
251 | #define MX53_INT_USB_OTG (NR_IRQS_LEGACY + 18) | ||
252 | #define MX53_INT_SAHARA_H0 (NR_IRQS_LEGACY + 19) | ||
253 | #define MX53_INT_SAHARA_H1 (NR_IRQS_LEGACY + 20) | ||
254 | #define MX53_INT_SCC_SMN (NR_IRQS_LEGACY + 21) | ||
255 | #define MX53_INT_SCC_STZ (NR_IRQS_LEGACY + 22) | ||
256 | #define MX53_INT_SCC_SCM (NR_IRQS_LEGACY + 23) | ||
257 | #define MX53_INT_SRTC_NTZ (NR_IRQS_LEGACY + 24) | ||
258 | #define MX53_INT_SRTC_TZ (NR_IRQS_LEGACY + 25) | ||
259 | #define MX53_INT_RTIC (NR_IRQS_LEGACY + 26) | ||
260 | #define MX53_INT_CSU (NR_IRQS_LEGACY + 27) | ||
261 | #define MX53_INT_SATA (NR_IRQS_LEGACY + 28) | ||
262 | #define MX53_INT_SSI1 (NR_IRQS_LEGACY + 29) | ||
263 | #define MX53_INT_SSI2 (NR_IRQS_LEGACY + 30) | ||
264 | #define MX53_INT_UART1 (NR_IRQS_LEGACY + 31) | ||
265 | #define MX53_INT_UART2 (NR_IRQS_LEGACY + 32) | ||
266 | #define MX53_INT_UART3 (NR_IRQS_LEGACY + 33) | ||
267 | #define MX53_INT_RTC (NR_IRQS_LEGACY + 34) | ||
268 | #define MX53_INT_PTP (NR_IRQS_LEGACY + 35) | ||
269 | #define MX53_INT_ECSPI1 (NR_IRQS_LEGACY + 36) | ||
270 | #define MX53_INT_ECSPI2 (NR_IRQS_LEGACY + 37) | ||
271 | #define MX53_INT_CSPI (NR_IRQS_LEGACY + 38) | ||
272 | #define MX53_INT_GPT (NR_IRQS_LEGACY + 39) | ||
273 | #define MX53_INT_EPIT1 (NR_IRQS_LEGACY + 40) | ||
274 | #define MX53_INT_EPIT2 (NR_IRQS_LEGACY + 41) | ||
275 | #define MX53_INT_GPIO1_INT7 (NR_IRQS_LEGACY + 42) | ||
276 | #define MX53_INT_GPIO1_INT6 (NR_IRQS_LEGACY + 43) | ||
277 | #define MX53_INT_GPIO1_INT5 (NR_IRQS_LEGACY + 44) | ||
278 | #define MX53_INT_GPIO1_INT4 (NR_IRQS_LEGACY + 45) | ||
279 | #define MX53_INT_GPIO1_INT3 (NR_IRQS_LEGACY + 46) | ||
280 | #define MX53_INT_GPIO1_INT2 (NR_IRQS_LEGACY + 47) | ||
281 | #define MX53_INT_GPIO1_INT1 (NR_IRQS_LEGACY + 48) | ||
282 | #define MX53_INT_GPIO1_INT0 (NR_IRQS_LEGACY + 49) | ||
283 | #define MX53_INT_GPIO1_LOW (NR_IRQS_LEGACY + 50) | ||
284 | #define MX53_INT_GPIO1_HIGH (NR_IRQS_LEGACY + 51) | ||
285 | #define MX53_INT_GPIO2_LOW (NR_IRQS_LEGACY + 52) | ||
286 | #define MX53_INT_GPIO2_HIGH (NR_IRQS_LEGACY + 53) | ||
287 | #define MX53_INT_GPIO3_LOW (NR_IRQS_LEGACY + 54) | ||
288 | #define MX53_INT_GPIO3_HIGH (NR_IRQS_LEGACY + 55) | ||
289 | #define MX53_INT_GPIO4_LOW (NR_IRQS_LEGACY + 56) | ||
290 | #define MX53_INT_GPIO4_HIGH (NR_IRQS_LEGACY + 57) | ||
291 | #define MX53_INT_WDOG1 (NR_IRQS_LEGACY + 58) | ||
292 | #define MX53_INT_WDOG2 (NR_IRQS_LEGACY + 59) | ||
293 | #define MX53_INT_KPP (NR_IRQS_LEGACY + 60) | ||
294 | #define MX53_INT_PWM1 (NR_IRQS_LEGACY + 61) | ||
295 | #define MX53_INT_I2C1 (NR_IRQS_LEGACY + 62) | ||
296 | #define MX53_INT_I2C2 (NR_IRQS_LEGACY + 63) | ||
297 | #define MX53_INT_I2C3 (NR_IRQS_LEGACY + 64) | ||
298 | #define MX53_INT_MLB (NR_IRQS_LEGACY + 65) | ||
299 | #define MX53_INT_ASRC (NR_IRQS_LEGACY + 66) | ||
300 | #define MX53_INT_SPDIF (NR_IRQS_LEGACY + 67) | ||
301 | #define MX53_INT_SIM_DAT (NR_IRQS_LEGACY + 68) | ||
302 | #define MX53_INT_IIM (NR_IRQS_LEGACY + 69) | ||
303 | #define MX53_INT_ATA (NR_IRQS_LEGACY + 70) | ||
304 | #define MX53_INT_CCM1 (NR_IRQS_LEGACY + 71) | ||
305 | #define MX53_INT_CCM2 (NR_IRQS_LEGACY + 72) | ||
306 | #define MX53_INT_GPC1 (NR_IRQS_LEGACY + 73) | ||
307 | #define MX53_INT_GPC2 (NR_IRQS_LEGACY + 74) | ||
308 | #define MX53_INT_SRC (NR_IRQS_LEGACY + 75) | ||
309 | #define MX53_INT_NM (NR_IRQS_LEGACY + 76) | ||
310 | #define MX53_INT_PMU (NR_IRQS_LEGACY + 77) | ||
311 | #define MX53_INT_CTI_IRQ (NR_IRQS_LEGACY + 78) | ||
312 | #define MX53_INT_CTI1_TG0 (NR_IRQS_LEGACY + 79) | ||
313 | #define MX53_INT_CTI1_TG1 (NR_IRQS_LEGACY + 80) | ||
314 | #define MX53_INT_ESAI (NR_IRQS_LEGACY + 81) | ||
315 | #define MX53_INT_CAN1 (NR_IRQS_LEGACY + 82) | ||
316 | #define MX53_INT_CAN2 (NR_IRQS_LEGACY + 83) | ||
317 | #define MX53_INT_GPU2_IRQ (NR_IRQS_LEGACY + 84) | ||
318 | #define MX53_INT_GPU2_BUSY (NR_IRQS_LEGACY + 85) | ||
319 | #define MX53_INT_UART5 (NR_IRQS_LEGACY + 86) | ||
320 | #define MX53_INT_FEC (NR_IRQS_LEGACY + 87) | ||
321 | #define MX53_INT_OWIRE (NR_IRQS_LEGACY + 88) | ||
322 | #define MX53_INT_CTI1_TG2 (NR_IRQS_LEGACY + 89) | ||
323 | #define MX53_INT_SJC (NR_IRQS_LEGACY + 90) | ||
324 | #define MX53_INT_TVE (NR_IRQS_LEGACY + 92) | ||
325 | #define MX53_INT_FIRI (NR_IRQS_LEGACY + 93) | ||
326 | #define MX53_INT_PWM2 (NR_IRQS_LEGACY + 94) | ||
327 | #define MX53_INT_SLIM_EXP (NR_IRQS_LEGACY + 95) | ||
328 | #define MX53_INT_SSI3 (NR_IRQS_LEGACY + 96) | ||
329 | #define MX53_INT_EMI_BOOT (NR_IRQS_LEGACY + 97) | ||
330 | #define MX53_INT_CTI1_TG3 (NR_IRQS_LEGACY + 98) | ||
331 | #define MX53_INT_SMC_RX (NR_IRQS_LEGACY + 99) | ||
332 | #define MX53_INT_VPU_IDLE (NR_IRQS_LEGACY + 100) | ||
333 | #define MX53_INT_EMI_NFC (NR_IRQS_LEGACY + 101) | ||
334 | #define MX53_INT_GPU_IDLE (NR_IRQS_LEGACY + 102) | ||
335 | #define MX53_INT_GPIO5_LOW (NR_IRQS_LEGACY + 103) | ||
336 | #define MX53_INT_GPIO5_HIGH (NR_IRQS_LEGACY + 104) | ||
337 | #define MX53_INT_GPIO6_LOW (NR_IRQS_LEGACY + 105) | ||
338 | #define MX53_INT_GPIO6_HIGH (NR_IRQS_LEGACY + 106) | ||
339 | #define MX53_INT_GPIO7_LOW (NR_IRQS_LEGACY + 107) | ||
340 | #define MX53_INT_GPIO7_HIGH (NR_IRQS_LEGACY + 108) | ||
341 | |||
342 | #endif /* ifndef __MACH_MX53_H__ */ | ||
diff --git a/arch/arm/mach-imx/mxc.h b/arch/arm/mach-imx/mxc.h index 75d6a37e1ae4..a39b69ef4301 100644 --- a/arch/arm/mach-imx/mxc.h +++ b/arch/arm/mach-imx/mxc.h | |||
@@ -154,10 +154,17 @@ extern unsigned int __mxc_cpu_type; | |||
154 | #endif | 154 | #endif |
155 | 155 | ||
156 | #ifndef __ASSEMBLY__ | 156 | #ifndef __ASSEMBLY__ |
157 | #ifdef CONFIG_SOC_IMX6SL | ||
157 | static inline bool cpu_is_imx6sl(void) | 158 | static inline bool cpu_is_imx6sl(void) |
158 | { | 159 | { |
159 | return __mxc_cpu_type == MXC_CPU_IMX6SL; | 160 | return __mxc_cpu_type == MXC_CPU_IMX6SL; |
160 | } | 161 | } |
162 | #else | ||
163 | static inline bool cpu_is_imx6sl(void) | ||
164 | { | ||
165 | return false; | ||
166 | } | ||
167 | #endif | ||
161 | 168 | ||
162 | static inline bool cpu_is_imx6dl(void) | 169 | static inline bool cpu_is_imx6dl(void) |
163 | { | 170 | { |
diff --git a/arch/arm/mach-imx/pm-imx5.c b/arch/arm/mach-imx/pm-imx5.c index 58aeaf5baaf6..f1f80ab73e69 100644 --- a/arch/arm/mach-imx/pm-imx5.c +++ b/arch/arm/mach-imx/pm-imx5.c | |||
@@ -19,9 +19,26 @@ | |||
19 | 19 | ||
20 | #include "common.h" | 20 | #include "common.h" |
21 | #include "cpuidle.h" | 21 | #include "cpuidle.h" |
22 | #include "crm-regs-imx5.h" | ||
23 | #include "hardware.h" | 22 | #include "hardware.h" |
24 | 23 | ||
24 | #define MXC_CCM_CLPCR 0x54 | ||
25 | #define MXC_CCM_CLPCR_LPM_OFFSET 0 | ||
26 | #define MXC_CCM_CLPCR_LPM_MASK 0x3 | ||
27 | #define MXC_CCM_CLPCR_STBY_COUNT_OFFSET 9 | ||
28 | #define MXC_CCM_CLPCR_VSTBY (0x1 << 8) | ||
29 | #define MXC_CCM_CLPCR_SBYOS (0x1 << 6) | ||
30 | |||
31 | #define MXC_CORTEXA8_PLAT_LPC 0xc | ||
32 | #define MXC_CORTEXA8_PLAT_LPC_DSM (1 << 0) | ||
33 | #define MXC_CORTEXA8_PLAT_LPC_DBG_DSM (1 << 1) | ||
34 | |||
35 | #define MXC_SRPG_NEON_SRPGCR 0x280 | ||
36 | #define MXC_SRPG_ARM_SRPGCR 0x2a0 | ||
37 | #define MXC_SRPG_EMPGC0_SRPGCR 0x2c0 | ||
38 | #define MXC_SRPG_EMPGC1_SRPGCR 0x2d0 | ||
39 | |||
40 | #define MXC_SRPGCR_PCR 1 | ||
41 | |||
25 | /* | 42 | /* |
26 | * The WAIT_UNCLOCKED_POWER_OFF state only requires <= 500ns to exit. | 43 | * The WAIT_UNCLOCKED_POWER_OFF state only requires <= 500ns to exit. |
27 | * This is also the lowest power state possible without affecting | 44 | * This is also the lowest power state possible without affecting |
@@ -32,6 +49,30 @@ | |||
32 | */ | 49 | */ |
33 | #define IMX5_DEFAULT_CPU_IDLE_STATE WAIT_UNCLOCKED_POWER_OFF | 50 | #define IMX5_DEFAULT_CPU_IDLE_STATE WAIT_UNCLOCKED_POWER_OFF |
34 | 51 | ||
52 | struct imx5_pm_data { | ||
53 | phys_addr_t cortex_addr; | ||
54 | phys_addr_t gpc_addr; | ||
55 | }; | ||
56 | |||
57 | static const struct imx5_pm_data imx51_pm_data __initconst = { | ||
58 | .cortex_addr = 0x83fa0000, | ||
59 | .gpc_addr = 0x73fd8000, | ||
60 | }; | ||
61 | |||
62 | static const struct imx5_pm_data imx53_pm_data __initconst = { | ||
63 | .cortex_addr = 0x63fa0000, | ||
64 | .gpc_addr = 0x53fd8000, | ||
65 | }; | ||
66 | |||
67 | static void __iomem *ccm_base; | ||
68 | static void __iomem *cortex_base; | ||
69 | static void __iomem *gpc_base; | ||
70 | |||
71 | void __init imx5_pm_set_ccm_base(void __iomem *base) | ||
72 | { | ||
73 | ccm_base = base; | ||
74 | } | ||
75 | |||
35 | /* | 76 | /* |
36 | * set cpu low power mode before WFI instruction. This function is called | 77 | * set cpu low power mode before WFI instruction. This function is called |
37 | * mx5 because it can be used for mx51, and mx53. | 78 | * mx5 because it can be used for mx51, and mx53. |
@@ -43,12 +84,16 @@ static void mx5_cpu_lp_set(enum mxc_cpu_pwr_mode mode) | |||
43 | int stop_mode = 0; | 84 | int stop_mode = 0; |
44 | 85 | ||
45 | /* always allow platform to issue a deep sleep mode request */ | 86 | /* always allow platform to issue a deep sleep mode request */ |
46 | plat_lpc = __raw_readl(MXC_CORTEXA8_PLAT_LPC) & | 87 | plat_lpc = __raw_readl(cortex_base + MXC_CORTEXA8_PLAT_LPC) & |
47 | ~(MXC_CORTEXA8_PLAT_LPC_DSM); | 88 | ~(MXC_CORTEXA8_PLAT_LPC_DSM); |
48 | ccm_clpcr = __raw_readl(MXC_CCM_CLPCR) & ~(MXC_CCM_CLPCR_LPM_MASK); | 89 | ccm_clpcr = __raw_readl(ccm_base + MXC_CCM_CLPCR) & |
49 | arm_srpgcr = __raw_readl(MXC_SRPG_ARM_SRPGCR) & ~(MXC_SRPGCR_PCR); | 90 | ~(MXC_CCM_CLPCR_LPM_MASK); |
50 | empgc0 = __raw_readl(MXC_SRPG_EMPGC0_SRPGCR) & ~(MXC_SRPGCR_PCR); | 91 | arm_srpgcr = __raw_readl(gpc_base + MXC_SRPG_ARM_SRPGCR) & |
51 | empgc1 = __raw_readl(MXC_SRPG_EMPGC1_SRPGCR) & ~(MXC_SRPGCR_PCR); | 92 | ~(MXC_SRPGCR_PCR); |
93 | empgc0 = __raw_readl(gpc_base + MXC_SRPG_EMPGC0_SRPGCR) & | ||
94 | ~(MXC_SRPGCR_PCR); | ||
95 | empgc1 = __raw_readl(gpc_base + MXC_SRPG_EMPGC1_SRPGCR) & | ||
96 | ~(MXC_SRPGCR_PCR); | ||
52 | 97 | ||
53 | switch (mode) { | 98 | switch (mode) { |
54 | case WAIT_CLOCKED: | 99 | case WAIT_CLOCKED: |
@@ -82,17 +127,17 @@ static void mx5_cpu_lp_set(enum mxc_cpu_pwr_mode mode) | |||
82 | return; | 127 | return; |
83 | } | 128 | } |
84 | 129 | ||
85 | __raw_writel(plat_lpc, MXC_CORTEXA8_PLAT_LPC); | 130 | __raw_writel(plat_lpc, cortex_base + MXC_CORTEXA8_PLAT_LPC); |
86 | __raw_writel(ccm_clpcr, MXC_CCM_CLPCR); | 131 | __raw_writel(ccm_clpcr, ccm_base + MXC_CCM_CLPCR); |
87 | __raw_writel(arm_srpgcr, MXC_SRPG_ARM_SRPGCR); | 132 | __raw_writel(arm_srpgcr, gpc_base + MXC_SRPG_ARM_SRPGCR); |
88 | __raw_writel(arm_srpgcr, MXC_SRPG_NEON_SRPGCR); | 133 | __raw_writel(arm_srpgcr, gpc_base + MXC_SRPG_NEON_SRPGCR); |
89 | 134 | ||
90 | if (stop_mode) { | 135 | if (stop_mode) { |
91 | empgc0 |= MXC_SRPGCR_PCR; | 136 | empgc0 |= MXC_SRPGCR_PCR; |
92 | empgc1 |= MXC_SRPGCR_PCR; | 137 | empgc1 |= MXC_SRPGCR_PCR; |
93 | 138 | ||
94 | __raw_writel(empgc0, MXC_SRPG_EMPGC0_SRPGCR); | 139 | __raw_writel(empgc0, gpc_base + MXC_SRPG_EMPGC0_SRPGCR); |
95 | __raw_writel(empgc1, MXC_SRPG_EMPGC1_SRPGCR); | 140 | __raw_writel(empgc1, gpc_base + MXC_SRPG_EMPGC1_SRPGCR); |
96 | } | 141 | } |
97 | } | 142 | } |
98 | 143 | ||
@@ -114,8 +159,8 @@ static int mx5_suspend_enter(suspend_state_t state) | |||
114 | flush_cache_all(); | 159 | flush_cache_all(); |
115 | 160 | ||
116 | /*clear the EMPGC0/1 bits */ | 161 | /*clear the EMPGC0/1 bits */ |
117 | __raw_writel(0, MXC_SRPG_EMPGC0_SRPGCR); | 162 | __raw_writel(0, gpc_base + MXC_SRPG_EMPGC0_SRPGCR); |
118 | __raw_writel(0, MXC_SRPG_EMPGC1_SRPGCR); | 163 | __raw_writel(0, gpc_base + MXC_SRPG_EMPGC1_SRPGCR); |
119 | } | 164 | } |
120 | cpu_do_idle(); | 165 | cpu_do_idle(); |
121 | 166 | ||
@@ -149,7 +194,7 @@ static void imx5_pm_idle(void) | |||
149 | imx5_cpu_do_idle(); | 194 | imx5_cpu_do_idle(); |
150 | } | 195 | } |
151 | 196 | ||
152 | static int __init imx5_pm_common_init(void) | 197 | static int __init imx5_pm_common_init(const struct imx5_pm_data *data) |
153 | { | 198 | { |
154 | int ret; | 199 | int ret; |
155 | struct clk *gpc_dvfs_clk = clk_get(NULL, "gpc_dvfs"); | 200 | struct clk *gpc_dvfs_clk = clk_get(NULL, "gpc_dvfs"); |
@@ -163,15 +208,28 @@ static int __init imx5_pm_common_init(void) | |||
163 | 208 | ||
164 | arm_pm_idle = imx5_pm_idle; | 209 | arm_pm_idle = imx5_pm_idle; |
165 | 210 | ||
211 | cortex_base = ioremap(data->cortex_addr, SZ_16K); | ||
212 | gpc_base = ioremap(data->gpc_addr, SZ_16K); | ||
213 | WARN_ON(!ccm_base || !cortex_base || !gpc_base); | ||
214 | |||
166 | /* Set the registers to the default cpu idle state. */ | 215 | /* Set the registers to the default cpu idle state. */ |
167 | mx5_cpu_lp_set(IMX5_DEFAULT_CPU_IDLE_STATE); | 216 | mx5_cpu_lp_set(IMX5_DEFAULT_CPU_IDLE_STATE); |
168 | 217 | ||
169 | return imx5_cpuidle_init(); | 218 | ret = imx5_cpuidle_init(); |
219 | if (ret) | ||
220 | pr_warn("%s: cpuidle init failed %d\n", __func__, ret); | ||
221 | |||
222 | suspend_set_ops(&mx5_suspend_ops); | ||
223 | |||
224 | return 0; | ||
225 | } | ||
226 | |||
227 | void __init imx51_pm_init(void) | ||
228 | { | ||
229 | imx5_pm_common_init(&imx51_pm_data); | ||
170 | } | 230 | } |
171 | 231 | ||
172 | void __init imx5_pm_init(void) | 232 | void __init imx53_pm_init(void) |
173 | { | 233 | { |
174 | int ret = imx5_pm_common_init(); | 234 | imx5_pm_common_init(&imx53_pm_data); |
175 | if (!ret) | ||
176 | suspend_set_ops(&mx5_suspend_ops); | ||
177 | } | 235 | } |
diff --git a/arch/arm/mach-imx/pm-imx6.c b/arch/arm/mach-imx/pm-imx6.c index 9392a8f4ef24..5c3af8f993d0 100644 --- a/arch/arm/mach-imx/pm-imx6.c +++ b/arch/arm/mach-imx/pm-imx6.c | |||
@@ -129,6 +129,14 @@ static const u32 imx6sl_mmdc_io_offset[] __initconst = { | |||
129 | 0x330, 0x334, 0x320, /* SDCKE0, SDCKE1, RESET */ | 129 | 0x330, 0x334, 0x320, /* SDCKE0, SDCKE1, RESET */ |
130 | }; | 130 | }; |
131 | 131 | ||
132 | static const u32 imx6sx_mmdc_io_offset[] __initconst = { | ||
133 | 0x2ec, 0x2f0, 0x2f4, 0x2f8, /* DQM0 ~ DQM3 */ | ||
134 | 0x60c, 0x610, 0x61c, 0x620, /* GPR_B0DS ~ GPR_B3DS */ | ||
135 | 0x300, 0x2fc, 0x32c, 0x5f4, /* CAS, RAS, SDCLK_0, GPR_ADDS */ | ||
136 | 0x310, 0x314, 0x5f8, 0x608, /* SODT0, SODT1, MODE_CTL, MODE */ | ||
137 | 0x330, 0x334, 0x338, 0x33c, /* SDQS0 ~ SDQS3 */ | ||
138 | }; | ||
139 | |||
132 | static const struct imx6_pm_socdata imx6q_pm_data __initconst = { | 140 | static const struct imx6_pm_socdata imx6q_pm_data __initconst = { |
133 | .cpu_type = MXC_CPU_IMX6Q, | 141 | .cpu_type = MXC_CPU_IMX6Q, |
134 | .mmdc_compat = "fsl,imx6q-mmdc", | 142 | .mmdc_compat = "fsl,imx6q-mmdc", |
@@ -159,6 +167,16 @@ static const struct imx6_pm_socdata imx6sl_pm_data __initconst = { | |||
159 | .mmdc_io_offset = imx6sl_mmdc_io_offset, | 167 | .mmdc_io_offset = imx6sl_mmdc_io_offset, |
160 | }; | 168 | }; |
161 | 169 | ||
170 | static const struct imx6_pm_socdata imx6sx_pm_data __initconst = { | ||
171 | .cpu_type = MXC_CPU_IMX6SX, | ||
172 | .mmdc_compat = "fsl,imx6sx-mmdc", | ||
173 | .src_compat = "fsl,imx6sx-src", | ||
174 | .iomuxc_compat = "fsl,imx6sx-iomuxc", | ||
175 | .gpc_compat = "fsl,imx6sx-gpc", | ||
176 | .mmdc_io_num = ARRAY_SIZE(imx6sx_mmdc_io_offset), | ||
177 | .mmdc_io_offset = imx6sx_mmdc_io_offset, | ||
178 | }; | ||
179 | |||
162 | /* | 180 | /* |
163 | * This structure is for passing necessary data for low level ocram | 181 | * This structure is for passing necessary data for low level ocram |
164 | * suspend code(arch/arm/mach-imx/suspend-imx6.S), if this struct | 182 | * suspend code(arch/arm/mach-imx/suspend-imx6.S), if this struct |
@@ -181,11 +199,13 @@ struct imx6_cpu_pm_info { | |||
181 | u32 mmdc_io_val[MX6_MAX_MMDC_IO_NUM][2]; /* To save offset and value */ | 199 | u32 mmdc_io_val[MX6_MAX_MMDC_IO_NUM][2]; /* To save offset and value */ |
182 | } __aligned(8); | 200 | } __aligned(8); |
183 | 201 | ||
184 | void imx6q_set_int_mem_clk_lpm(void) | 202 | void imx6q_set_int_mem_clk_lpm(bool enable) |
185 | { | 203 | { |
186 | u32 val = readl_relaxed(ccm_base + CGPR); | 204 | u32 val = readl_relaxed(ccm_base + CGPR); |
187 | 205 | ||
188 | val |= BM_CGPR_INT_MEM_CLK_LPM; | 206 | val &= ~BM_CGPR_INT_MEM_CLK_LPM; |
207 | if (enable) | ||
208 | val |= BM_CGPR_INT_MEM_CLK_LPM; | ||
189 | writel_relaxed(val, ccm_base + CGPR); | 209 | writel_relaxed(val, ccm_base + CGPR); |
190 | } | 210 | } |
191 | 211 | ||
@@ -254,6 +274,14 @@ int imx6q_set_lpm(enum mxc_cpu_pwr_mode mode) | |||
254 | break; | 274 | break; |
255 | case STOP_POWER_ON: | 275 | case STOP_POWER_ON: |
256 | val |= 0x2 << BP_CLPCR_LPM; | 276 | val |= 0x2 << BP_CLPCR_LPM; |
277 | val &= ~BM_CLPCR_VSTBY; | ||
278 | val &= ~BM_CLPCR_SBYOS; | ||
279 | if (cpu_is_imx6sl()) | ||
280 | val |= BM_CLPCR_BYPASS_PMIC_READY; | ||
281 | if (cpu_is_imx6sl() || cpu_is_imx6sx()) | ||
282 | val |= BM_CLPCR_BYP_MMDC_CH0_LPM_HS; | ||
283 | else | ||
284 | val |= BM_CLPCR_BYP_MMDC_CH1_LPM_HS; | ||
257 | break; | 285 | break; |
258 | case WAIT_UNCLOCKED_POWER_OFF: | 286 | case WAIT_UNCLOCKED_POWER_OFF: |
259 | val |= 0x1 << BP_CLPCR_LPM; | 287 | val |= 0x1 << BP_CLPCR_LPM; |
@@ -265,12 +293,12 @@ int imx6q_set_lpm(enum mxc_cpu_pwr_mode mode) | |||
265 | val |= 0x3 << BP_CLPCR_STBY_COUNT; | 293 | val |= 0x3 << BP_CLPCR_STBY_COUNT; |
266 | val |= BM_CLPCR_VSTBY; | 294 | val |= BM_CLPCR_VSTBY; |
267 | val |= BM_CLPCR_SBYOS; | 295 | val |= BM_CLPCR_SBYOS; |
268 | if (cpu_is_imx6sl()) { | 296 | if (cpu_is_imx6sl()) |
269 | val |= BM_CLPCR_BYPASS_PMIC_READY; | 297 | val |= BM_CLPCR_BYPASS_PMIC_READY; |
298 | if (cpu_is_imx6sl() || cpu_is_imx6sx()) | ||
270 | val |= BM_CLPCR_BYP_MMDC_CH0_LPM_HS; | 299 | val |= BM_CLPCR_BYP_MMDC_CH0_LPM_HS; |
271 | } else { | 300 | else |
272 | val |= BM_CLPCR_BYP_MMDC_CH1_LPM_HS; | 301 | val |= BM_CLPCR_BYP_MMDC_CH1_LPM_HS; |
273 | } | ||
274 | break; | 302 | break; |
275 | default: | 303 | default: |
276 | return -EINVAL; | 304 | return -EINVAL; |
@@ -314,8 +342,22 @@ static int imx6q_suspend_finish(unsigned long val) | |||
314 | static int imx6q_pm_enter(suspend_state_t state) | 342 | static int imx6q_pm_enter(suspend_state_t state) |
315 | { | 343 | { |
316 | switch (state) { | 344 | switch (state) { |
345 | case PM_SUSPEND_STANDBY: | ||
346 | imx6q_set_lpm(STOP_POWER_ON); | ||
347 | imx6q_set_int_mem_clk_lpm(true); | ||
348 | imx_gpc_pre_suspend(false); | ||
349 | if (cpu_is_imx6sl()) | ||
350 | imx6sl_set_wait_clk(true); | ||
351 | /* Zzz ... */ | ||
352 | cpu_do_idle(); | ||
353 | if (cpu_is_imx6sl()) | ||
354 | imx6sl_set_wait_clk(false); | ||
355 | imx_gpc_post_resume(); | ||
356 | imx6q_set_lpm(WAIT_CLOCKED); | ||
357 | break; | ||
317 | case PM_SUSPEND_MEM: | 358 | case PM_SUSPEND_MEM: |
318 | imx6q_set_lpm(STOP_POWER_OFF); | 359 | imx6q_set_lpm(STOP_POWER_OFF); |
360 | imx6q_set_int_mem_clk_lpm(false); | ||
319 | imx6q_enable_wb(true); | 361 | imx6q_enable_wb(true); |
320 | /* | 362 | /* |
321 | * For suspend into ocram, asm code already take care of | 363 | * For suspend into ocram, asm code already take care of |
@@ -323,7 +365,7 @@ static int imx6q_pm_enter(suspend_state_t state) | |||
323 | */ | 365 | */ |
324 | if (!imx6_suspend_in_ocram_fn) | 366 | if (!imx6_suspend_in_ocram_fn) |
325 | imx6q_enable_rbc(true); | 367 | imx6q_enable_rbc(true); |
326 | imx_gpc_pre_suspend(); | 368 | imx_gpc_pre_suspend(true); |
327 | imx_anatop_pre_suspend(); | 369 | imx_anatop_pre_suspend(); |
328 | imx_set_cpu_jump(0, v7_cpu_resume); | 370 | imx_set_cpu_jump(0, v7_cpu_resume); |
329 | /* Zzz ... */ | 371 | /* Zzz ... */ |
@@ -334,6 +376,7 @@ static int imx6q_pm_enter(suspend_state_t state) | |||
334 | imx_gpc_post_resume(); | 376 | imx_gpc_post_resume(); |
335 | imx6q_enable_rbc(false); | 377 | imx6q_enable_rbc(false); |
336 | imx6q_enable_wb(false); | 378 | imx6q_enable_wb(false); |
379 | imx6q_set_int_mem_clk_lpm(true); | ||
337 | imx6q_set_lpm(WAIT_CLOCKED); | 380 | imx6q_set_lpm(WAIT_CLOCKED); |
338 | break; | 381 | break; |
339 | default: | 382 | default: |
@@ -343,9 +386,14 @@ static int imx6q_pm_enter(suspend_state_t state) | |||
343 | return 0; | 386 | return 0; |
344 | } | 387 | } |
345 | 388 | ||
389 | static int imx6q_pm_valid(suspend_state_t state) | ||
390 | { | ||
391 | return (state == PM_SUSPEND_STANDBY || state == PM_SUSPEND_MEM); | ||
392 | } | ||
393 | |||
346 | static const struct platform_suspend_ops imx6q_pm_ops = { | 394 | static const struct platform_suspend_ops imx6q_pm_ops = { |
347 | .enter = imx6q_pm_enter, | 395 | .enter = imx6q_pm_enter, |
348 | .valid = suspend_valid_only_mem, | 396 | .valid = imx6q_pm_valid, |
349 | }; | 397 | }; |
350 | 398 | ||
351 | void __init imx6q_pm_set_ccm_base(void __iomem *base) | 399 | void __init imx6q_pm_set_ccm_base(void __iomem *base) |
@@ -549,3 +597,8 @@ void __init imx6sl_pm_init(void) | |||
549 | { | 597 | { |
550 | imx6_pm_common_init(&imx6sl_pm_data); | 598 | imx6_pm_common_init(&imx6sl_pm_data); |
551 | } | 599 | } |
600 | |||
601 | void __init imx6sx_pm_init(void) | ||
602 | { | ||
603 | imx6_pm_common_init(&imx6sx_pm_data); | ||
604 | } | ||
diff --git a/arch/arm/mach-imx/system.c b/arch/arm/mach-imx/system.c index 3b0733edb68c..d14c33fd6b03 100644 --- a/arch/arm/mach-imx/system.c +++ b/arch/arm/mach-imx/system.c | |||
@@ -42,7 +42,10 @@ void mxc_restart(enum reboot_mode mode, const char *cmd) | |||
42 | { | 42 | { |
43 | unsigned int wcr_enable; | 43 | unsigned int wcr_enable; |
44 | 44 | ||
45 | if (wdog_clk) | 45 | if (!wdog_base) |
46 | goto reset_fallback; | ||
47 | |||
48 | if (!IS_ERR(wdog_clk)) | ||
46 | clk_enable(wdog_clk); | 49 | clk_enable(wdog_clk); |
47 | 50 | ||
48 | if (cpu_is_mx1()) | 51 | if (cpu_is_mx1()) |
@@ -70,6 +73,7 @@ void mxc_restart(enum reboot_mode mode, const char *cmd) | |||
70 | /* delay to allow the serial port to show the message */ | 73 | /* delay to allow the serial port to show the message */ |
71 | mdelay(50); | 74 | mdelay(50); |
72 | 75 | ||
76 | reset_fallback: | ||
73 | /* we'll take a jump through zero as a poor second */ | 77 | /* we'll take a jump through zero as a poor second */ |
74 | soft_restart(0); | 78 | soft_restart(0); |
75 | } | 79 | } |
@@ -79,13 +83,10 @@ void __init mxc_arch_reset_init(void __iomem *base) | |||
79 | wdog_base = base; | 83 | wdog_base = base; |
80 | 84 | ||
81 | wdog_clk = clk_get_sys("imx2-wdt.0", NULL); | 85 | wdog_clk = clk_get_sys("imx2-wdt.0", NULL); |
82 | if (IS_ERR(wdog_clk)) { | 86 | if (IS_ERR(wdog_clk)) |
83 | pr_warn("%s: failed to get wdog clock\n", __func__); | 87 | pr_warn("%s: failed to get wdog clock\n", __func__); |
84 | wdog_clk = NULL; | 88 | else |
85 | return; | 89 | clk_prepare(wdog_clk); |
86 | } | ||
87 | |||
88 | clk_prepare(wdog_clk); | ||
89 | } | 90 | } |
90 | 91 | ||
91 | void __init mxc_arch_reset_init_dt(void) | 92 | void __init mxc_arch_reset_init_dt(void) |
@@ -97,13 +98,10 @@ void __init mxc_arch_reset_init_dt(void) | |||
97 | WARN_ON(!wdog_base); | 98 | WARN_ON(!wdog_base); |
98 | 99 | ||
99 | wdog_clk = of_clk_get(np, 0); | 100 | wdog_clk = of_clk_get(np, 0); |
100 | if (IS_ERR(wdog_clk)) { | 101 | if (IS_ERR(wdog_clk)) |
101 | pr_warn("%s: failed to get wdog clock\n", __func__); | 102 | pr_warn("%s: failed to get wdog clock\n", __func__); |
102 | wdog_clk = NULL; | 103 | else |
103 | return; | 104 | clk_prepare(wdog_clk); |
104 | } | ||
105 | |||
106 | clk_prepare(wdog_clk); | ||
107 | } | 105 | } |
108 | 106 | ||
109 | #ifdef CONFIG_CACHE_L2X0 | 107 | #ifdef CONFIG_CACHE_L2X0 |
diff --git a/arch/arm/mach-imx/time.c b/arch/arm/mach-imx/time.c index bed081e58262..bf92e5a351c0 100644 --- a/arch/arm/mach-imx/time.c +++ b/arch/arm/mach-imx/time.c | |||
@@ -290,25 +290,20 @@ static int __init mxc_clockevent_init(struct clk *timer_clk) | |||
290 | return 0; | 290 | return 0; |
291 | } | 291 | } |
292 | 292 | ||
293 | void __init mxc_timer_init(void __iomem *base, int irq) | 293 | static void __init _mxc_timer_init(int irq, |
294 | struct clk *clk_per, struct clk *clk_ipg) | ||
294 | { | 295 | { |
295 | uint32_t tctl_val; | 296 | uint32_t tctl_val; |
296 | struct clk *timer_clk; | ||
297 | struct clk *timer_ipg_clk; | ||
298 | 297 | ||
299 | timer_clk = clk_get_sys("imx-gpt.0", "per"); | 298 | if (IS_ERR(clk_per)) { |
300 | if (IS_ERR(timer_clk)) { | ||
301 | pr_err("i.MX timer: unable to get clk\n"); | 299 | pr_err("i.MX timer: unable to get clk\n"); |
302 | return; | 300 | return; |
303 | } | 301 | } |
304 | 302 | ||
305 | timer_ipg_clk = clk_get_sys("imx-gpt.0", "ipg"); | 303 | if (!IS_ERR(clk_ipg)) |
306 | if (!IS_ERR(timer_ipg_clk)) | 304 | clk_prepare_enable(clk_ipg); |
307 | clk_prepare_enable(timer_ipg_clk); | ||
308 | |||
309 | clk_prepare_enable(timer_clk); | ||
310 | 305 | ||
311 | timer_base = base; | 306 | clk_prepare_enable(clk_per); |
312 | 307 | ||
313 | /* | 308 | /* |
314 | * Initialise to a known state (all timers off, and timing reset) | 309 | * Initialise to a known state (all timers off, and timing reset) |
@@ -325,21 +320,45 @@ void __init mxc_timer_init(void __iomem *base, int irq) | |||
325 | __raw_writel(tctl_val, timer_base + MXC_TCTL); | 320 | __raw_writel(tctl_val, timer_base + MXC_TCTL); |
326 | 321 | ||
327 | /* init and register the timer to the framework */ | 322 | /* init and register the timer to the framework */ |
328 | mxc_clocksource_init(timer_clk); | 323 | mxc_clocksource_init(clk_per); |
329 | mxc_clockevent_init(timer_clk); | 324 | mxc_clockevent_init(clk_per); |
330 | 325 | ||
331 | /* Make irqs happen */ | 326 | /* Make irqs happen */ |
332 | setup_irq(irq, &mxc_timer_irq); | 327 | setup_irq(irq, &mxc_timer_irq); |
333 | } | 328 | } |
334 | 329 | ||
335 | void __init mxc_timer_init_dt(struct device_node *np) | 330 | void __init mxc_timer_init(void __iomem *base, int irq) |
336 | { | 331 | { |
337 | void __iomem *base; | 332 | struct clk *clk_per = clk_get_sys("imx-gpt.0", "per"); |
333 | struct clk *clk_ipg = clk_get_sys("imx-gpt.0", "ipg"); | ||
334 | |||
335 | timer_base = base; | ||
336 | |||
337 | _mxc_timer_init(irq, clk_per, clk_ipg); | ||
338 | } | ||
339 | |||
340 | static void __init mxc_timer_init_dt(struct device_node *np) | ||
341 | { | ||
342 | struct clk *clk_per, *clk_ipg; | ||
338 | int irq; | 343 | int irq; |
339 | 344 | ||
340 | base = of_iomap(np, 0); | 345 | if (timer_base) |
341 | WARN_ON(!base); | 346 | return; |
347 | |||
348 | timer_base = of_iomap(np, 0); | ||
349 | WARN_ON(!timer_base); | ||
342 | irq = irq_of_parse_and_map(np, 0); | 350 | irq = irq_of_parse_and_map(np, 0); |
343 | 351 | ||
344 | mxc_timer_init(base, irq); | 352 | clk_per = of_clk_get_by_name(np, "per"); |
353 | clk_ipg = of_clk_get_by_name(np, "ipg"); | ||
354 | |||
355 | _mxc_timer_init(irq, clk_per, clk_ipg); | ||
345 | } | 356 | } |
357 | CLOCKSOURCE_OF_DECLARE(mx1_timer, "fsl,imx1-gpt", mxc_timer_init_dt); | ||
358 | CLOCKSOURCE_OF_DECLARE(mx25_timer, "fsl,imx25-gpt", mxc_timer_init_dt); | ||
359 | CLOCKSOURCE_OF_DECLARE(mx50_timer, "fsl,imx50-gpt", mxc_timer_init_dt); | ||
360 | CLOCKSOURCE_OF_DECLARE(mx51_timer, "fsl,imx51-gpt", mxc_timer_init_dt); | ||
361 | CLOCKSOURCE_OF_DECLARE(mx53_timer, "fsl,imx53-gpt", mxc_timer_init_dt); | ||
362 | CLOCKSOURCE_OF_DECLARE(mx6q_timer, "fsl,imx6q-gpt", mxc_timer_init_dt); | ||
363 | CLOCKSOURCE_OF_DECLARE(mx6sl_timer, "fsl,imx6sl-gpt", mxc_timer_init_dt); | ||
364 | CLOCKSOURCE_OF_DECLARE(mx6sx_timer, "fsl,imx6sx-gpt", mxc_timer_init_dt); | ||
diff --git a/arch/arm/mach-imx/tzic.c b/arch/arm/mach-imx/tzic.c index 7828af4b2022..1d4f384ca773 100644 --- a/arch/arm/mach-imx/tzic.c +++ b/arch/arm/mach-imx/tzic.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/io.h> | 17 | #include <linux/io.h> |
18 | #include <linux/irqdomain.h> | 18 | #include <linux/irqdomain.h> |
19 | #include <linux/of.h> | 19 | #include <linux/of.h> |
20 | #include <linux/of_address.h> | ||
20 | 21 | ||
21 | #include <asm/mach/irq.h> | 22 | #include <asm/mach/irq.h> |
22 | #include <asm/exception.h> | 23 | #include <asm/exception.h> |
@@ -153,13 +154,16 @@ static void __exception_irq_entry tzic_handle_irq(struct pt_regs *regs) | |||
153 | * interrupts. It registers the interrupt enable and disable functions | 154 | * interrupts. It registers the interrupt enable and disable functions |
154 | * to the kernel for each interrupt source. | 155 | * to the kernel for each interrupt source. |
155 | */ | 156 | */ |
156 | void __init tzic_init_irq(void __iomem *irqbase) | 157 | void __init tzic_init_irq(void) |
157 | { | 158 | { |
158 | struct device_node *np; | 159 | struct device_node *np; |
159 | int irq_base; | 160 | int irq_base; |
160 | int i; | 161 | int i; |
161 | 162 | ||
162 | tzic_base = irqbase; | 163 | np = of_find_compatible_node(NULL, NULL, "fsl,tzic"); |
164 | tzic_base = of_iomap(np, 0); | ||
165 | WARN_ON(!tzic_base); | ||
166 | |||
163 | /* put the TZIC into the reset value with | 167 | /* put the TZIC into the reset value with |
164 | * all interrupts disabled | 168 | * all interrupts disabled |
165 | */ | 169 | */ |
@@ -181,7 +185,6 @@ void __init tzic_init_irq(void __iomem *irqbase) | |||
181 | irq_base = irq_alloc_descs(-1, 0, TZIC_NUM_IRQS, numa_node_id()); | 185 | irq_base = irq_alloc_descs(-1, 0, TZIC_NUM_IRQS, numa_node_id()); |
182 | WARN_ON(irq_base < 0); | 186 | WARN_ON(irq_base < 0); |
183 | 187 | ||
184 | np = of_find_compatible_node(NULL, NULL, "fsl,tzic"); | ||
185 | domain = irq_domain_add_legacy(np, TZIC_NUM_IRQS, irq_base, 0, | 188 | domain = irq_domain_add_legacy(np, TZIC_NUM_IRQS, irq_base, 0, |
186 | &irq_domain_simple_ops, NULL); | 189 | &irq_domain_simple_ops, NULL); |
187 | WARN_ON(!domain); | 190 | WARN_ON(!domain); |
diff --git a/arch/arm/mach-integrator/Kconfig b/arch/arm/mach-integrator/Kconfig index ba43321001d8..64f8e2564a37 100644 --- a/arch/arm/mach-integrator/Kconfig +++ b/arch/arm/mach-integrator/Kconfig | |||
@@ -28,7 +28,7 @@ config ARCH_CINTEGRATOR | |||
28 | bool | 28 | bool |
29 | 29 | ||
30 | config INTEGRATOR_IMPD1 | 30 | config INTEGRATOR_IMPD1 |
31 | tristate "Include support for Integrator/IM-PD1" | 31 | bool "Include support for Integrator/IM-PD1" |
32 | depends on ARCH_INTEGRATOR_AP | 32 | depends on ARCH_INTEGRATOR_AP |
33 | select ARCH_REQUIRE_GPIOLIB | 33 | select ARCH_REQUIRE_GPIOLIB |
34 | select ARM_VIC | 34 | select ARM_VIC |
diff --git a/arch/arm/mach-integrator/impd1.c b/arch/arm/mach-integrator/impd1.c index 0e870ea818c4..3ce880729cff 100644 --- a/arch/arm/mach-integrator/impd1.c +++ b/arch/arm/mach-integrator/impd1.c | |||
@@ -308,7 +308,12 @@ static struct impd1_device impd1_devs[] = { | |||
308 | */ | 308 | */ |
309 | #define IMPD1_VALID_IRQS 0x00000bffU | 309 | #define IMPD1_VALID_IRQS 0x00000bffU |
310 | 310 | ||
311 | static int __init impd1_probe(struct lm_device *dev) | 311 | /* |
312 | * As this module is bool, it is OK to have this as __init_refok() - no | ||
313 | * probe calls will be done after the initial system bootup, as devices | ||
314 | * are discovered as part of the machine startup. | ||
315 | */ | ||
316 | static int __init_refok impd1_probe(struct lm_device *dev) | ||
312 | { | 317 | { |
313 | struct impd1_module *impd1; | 318 | struct impd1_module *impd1; |
314 | int irq_base; | 319 | int irq_base; |
@@ -397,6 +402,11 @@ static void impd1_remove(struct lm_device *dev) | |||
397 | static struct lm_driver impd1_driver = { | 402 | static struct lm_driver impd1_driver = { |
398 | .drv = { | 403 | .drv = { |
399 | .name = "impd1", | 404 | .name = "impd1", |
405 | /* | ||
406 | * As we're dropping the probe() function, suppress driver | ||
407 | * binding from sysfs. | ||
408 | */ | ||
409 | .suppress_bind_attrs = true, | ||
400 | }, | 410 | }, |
401 | .probe = impd1_probe, | 411 | .probe = impd1_probe, |
402 | .remove = impd1_remove, | 412 | .remove = impd1_remove, |
diff --git a/arch/arm/mach-integrator/integrator_ap.c b/arch/arm/mach-integrator/integrator_ap.c index dd0cc677d596..8ca290b479b1 100644 --- a/arch/arm/mach-integrator/integrator_ap.c +++ b/arch/arm/mach-integrator/integrator_ap.c | |||
@@ -31,7 +31,7 @@ | |||
31 | #include <linux/clockchips.h> | 31 | #include <linux/clockchips.h> |
32 | #include <linux/interrupt.h> | 32 | #include <linux/interrupt.h> |
33 | #include <linux/io.h> | 33 | #include <linux/io.h> |
34 | #include <linux/irqchip/versatile-fpga.h> | 34 | #include <linux/irqchip.h> |
35 | #include <linux/mtd/physmap.h> | 35 | #include <linux/mtd/physmap.h> |
36 | #include <linux/clk.h> | 36 | #include <linux/clk.h> |
37 | #include <linux/platform_data/clk-integrator.h> | 37 | #include <linux/platform_data/clk-integrator.h> |
@@ -439,15 +439,10 @@ static void __init ap_of_timer_init(void) | |||
439 | integrator_clockevent_init(rate, base, irq); | 439 | integrator_clockevent_init(rate, base, irq); |
440 | } | 440 | } |
441 | 441 | ||
442 | static const struct of_device_id fpga_irq_of_match[] __initconst = { | ||
443 | { .compatible = "arm,versatile-fpga-irq", .data = fpga_irq_of_init, }, | ||
444 | { /* Sentinel */ } | ||
445 | }; | ||
446 | |||
447 | static void __init ap_init_irq_of(void) | 442 | static void __init ap_init_irq_of(void) |
448 | { | 443 | { |
449 | cm_init(); | 444 | cm_init(); |
450 | of_irq_init(fpga_irq_of_match); | 445 | irqchip_init(); |
451 | } | 446 | } |
452 | 447 | ||
453 | /* For the Device Tree, add in the UART callbacks as AUXDATA */ | 448 | /* For the Device Tree, add in the UART callbacks as AUXDATA */ |
@@ -480,25 +475,18 @@ static const struct of_device_id ebi_match[] = { | |||
480 | static void __init ap_init_of(void) | 475 | static void __init ap_init_of(void) |
481 | { | 476 | { |
482 | unsigned long sc_dec; | 477 | unsigned long sc_dec; |
483 | struct device_node *root; | ||
484 | struct device_node *syscon; | 478 | struct device_node *syscon; |
485 | struct device_node *ebi; | 479 | struct device_node *ebi; |
486 | struct device *parent; | 480 | struct device *parent; |
487 | struct soc_device *soc_dev; | 481 | struct soc_device *soc_dev; |
488 | struct soc_device_attribute *soc_dev_attr; | 482 | struct soc_device_attribute *soc_dev_attr; |
489 | u32 ap_sc_id; | 483 | u32 ap_sc_id; |
490 | int err; | ||
491 | int i; | 484 | int i; |
492 | 485 | ||
493 | /* Here we create an SoC device for the root node */ | 486 | syscon = of_find_matching_node(NULL, ap_syscon_match); |
494 | root = of_find_node_by_path("/"); | ||
495 | if (!root) | ||
496 | return; | ||
497 | |||
498 | syscon = of_find_matching_node(root, ap_syscon_match); | ||
499 | if (!syscon) | 487 | if (!syscon) |
500 | return; | 488 | return; |
501 | ebi = of_find_matching_node(root, ebi_match); | 489 | ebi = of_find_matching_node(NULL, ebi_match); |
502 | if (!ebi) | 490 | if (!ebi) |
503 | return; | 491 | return; |
504 | 492 | ||
@@ -509,19 +497,17 @@ static void __init ap_init_of(void) | |||
509 | if (!ebi_base) | 497 | if (!ebi_base) |
510 | return; | 498 | return; |
511 | 499 | ||
500 | of_platform_populate(NULL, of_default_bus_match_table, | ||
501 | ap_auxdata_lookup, NULL); | ||
502 | |||
512 | ap_sc_id = readl(ap_syscon_base); | 503 | ap_sc_id = readl(ap_syscon_base); |
513 | 504 | ||
514 | soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL); | 505 | soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL); |
515 | if (!soc_dev_attr) | 506 | if (!soc_dev_attr) |
516 | return; | 507 | return; |
517 | 508 | ||
518 | err = of_property_read_string(root, "compatible", | 509 | soc_dev_attr->soc_id = "XVC"; |
519 | &soc_dev_attr->soc_id); | 510 | soc_dev_attr->machine = "Integrator/AP"; |
520 | if (err) | ||
521 | return; | ||
522 | err = of_property_read_string(root, "model", &soc_dev_attr->machine); | ||
523 | if (err) | ||
524 | return; | ||
525 | soc_dev_attr->family = "Integrator"; | 511 | soc_dev_attr->family = "Integrator"; |
526 | soc_dev_attr->revision = kasprintf(GFP_KERNEL, "%c", | 512 | soc_dev_attr->revision = kasprintf(GFP_KERNEL, "%c", |
527 | 'A' + (ap_sc_id & 0x0f)); | 513 | 'A' + (ap_sc_id & 0x0f)); |
@@ -536,9 +522,6 @@ static void __init ap_init_of(void) | |||
536 | parent = soc_device_to_device(soc_dev); | 522 | parent = soc_device_to_device(soc_dev); |
537 | integrator_init_sysfs(parent, ap_sc_id); | 523 | integrator_init_sysfs(parent, ap_sc_id); |
538 | 524 | ||
539 | of_platform_populate(root, of_default_bus_match_table, | ||
540 | ap_auxdata_lookup, parent); | ||
541 | |||
542 | sc_dec = readl(ap_syscon_base + INTEGRATOR_SC_DEC_OFFSET); | 525 | sc_dec = readl(ap_syscon_base + INTEGRATOR_SC_DEC_OFFSET); |
543 | for (i = 0; i < 4; i++) { | 526 | for (i = 0; i < 4; i++) { |
544 | struct lm_device *lmdev; | 527 | struct lm_device *lmdev; |
@@ -570,7 +553,6 @@ DT_MACHINE_START(INTEGRATOR_AP_DT, "ARM Integrator/AP (Device Tree)") | |||
570 | .map_io = ap_map_io, | 553 | .map_io = ap_map_io, |
571 | .init_early = ap_init_early, | 554 | .init_early = ap_init_early, |
572 | .init_irq = ap_init_irq_of, | 555 | .init_irq = ap_init_irq_of, |
573 | .handle_irq = fpga_handle_irq, | ||
574 | .init_time = ap_of_timer_init, | 556 | .init_time = ap_of_timer_init, |
575 | .init_machine = ap_init_of, | 557 | .init_machine = ap_init_of, |
576 | .restart = integrator_restart, | 558 | .restart = integrator_restart, |
diff --git a/arch/arm/mach-integrator/integrator_cp.c b/arch/arm/mach-integrator/integrator_cp.c index a938242b0c95..5236ebee249c 100644 --- a/arch/arm/mach-integrator/integrator_cp.c +++ b/arch/arm/mach-integrator/integrator_cp.c | |||
@@ -20,7 +20,7 @@ | |||
20 | #include <linux/amba/clcd.h> | 20 | #include <linux/amba/clcd.h> |
21 | #include <linux/amba/mmci.h> | 21 | #include <linux/amba/mmci.h> |
22 | #include <linux/io.h> | 22 | #include <linux/io.h> |
23 | #include <linux/irqchip/versatile-fpga.h> | 23 | #include <linux/irqchip.h> |
24 | #include <linux/gfp.h> | 24 | #include <linux/gfp.h> |
25 | #include <linux/mtd/physmap.h> | 25 | #include <linux/mtd/physmap.h> |
26 | #include <linux/of_irq.h> | 26 | #include <linux/of_irq.h> |
@@ -235,15 +235,10 @@ static void __init intcp_init_early(void) | |||
235 | sched_clock_register(intcp_read_sched_clock, 32, 24000000); | 235 | sched_clock_register(intcp_read_sched_clock, 32, 24000000); |
236 | } | 236 | } |
237 | 237 | ||
238 | static const struct of_device_id fpga_irq_of_match[] __initconst = { | ||
239 | { .compatible = "arm,versatile-fpga-irq", .data = fpga_irq_of_init, }, | ||
240 | { /* Sentinel */ } | ||
241 | }; | ||
242 | |||
243 | static void __init intcp_init_irq_of(void) | 238 | static void __init intcp_init_irq_of(void) |
244 | { | 239 | { |
245 | cm_init(); | 240 | cm_init(); |
246 | of_irq_init(fpga_irq_of_match); | 241 | irqchip_init(); |
247 | } | 242 | } |
248 | 243 | ||
249 | /* | 244 | /* |
@@ -279,20 +274,13 @@ static const struct of_device_id intcp_syscon_match[] = { | |||
279 | 274 | ||
280 | static void __init intcp_init_of(void) | 275 | static void __init intcp_init_of(void) |
281 | { | 276 | { |
282 | struct device_node *root; | ||
283 | struct device_node *cpcon; | 277 | struct device_node *cpcon; |
284 | struct device *parent; | 278 | struct device *parent; |
285 | struct soc_device *soc_dev; | 279 | struct soc_device *soc_dev; |
286 | struct soc_device_attribute *soc_dev_attr; | 280 | struct soc_device_attribute *soc_dev_attr; |
287 | u32 intcp_sc_id; | 281 | u32 intcp_sc_id; |
288 | int err; | ||
289 | |||
290 | /* Here we create an SoC device for the root node */ | ||
291 | root = of_find_node_by_path("/"); | ||
292 | if (!root) | ||
293 | return; | ||
294 | 282 | ||
295 | cpcon = of_find_matching_node(root, intcp_syscon_match); | 283 | cpcon = of_find_matching_node(NULL, intcp_syscon_match); |
296 | if (!cpcon) | 284 | if (!cpcon) |
297 | return; | 285 | return; |
298 | 286 | ||
@@ -300,19 +288,17 @@ static void __init intcp_init_of(void) | |||
300 | if (!intcp_con_base) | 288 | if (!intcp_con_base) |
301 | return; | 289 | return; |
302 | 290 | ||
291 | of_platform_populate(NULL, of_default_bus_match_table, | ||
292 | intcp_auxdata_lookup, NULL); | ||
293 | |||
303 | intcp_sc_id = readl(intcp_con_base); | 294 | intcp_sc_id = readl(intcp_con_base); |
304 | 295 | ||
305 | soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL); | 296 | soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL); |
306 | if (!soc_dev_attr) | 297 | if (!soc_dev_attr) |
307 | return; | 298 | return; |
308 | 299 | ||
309 | err = of_property_read_string(root, "compatible", | 300 | soc_dev_attr->soc_id = "XCV"; |
310 | &soc_dev_attr->soc_id); | 301 | soc_dev_attr->machine = "Integrator/CP"; |
311 | if (err) | ||
312 | return; | ||
313 | err = of_property_read_string(root, "model", &soc_dev_attr->machine); | ||
314 | if (err) | ||
315 | return; | ||
316 | soc_dev_attr->family = "Integrator"; | 302 | soc_dev_attr->family = "Integrator"; |
317 | soc_dev_attr->revision = kasprintf(GFP_KERNEL, "%c", | 303 | soc_dev_attr->revision = kasprintf(GFP_KERNEL, "%c", |
318 | 'A' + (intcp_sc_id & 0x0f)); | 304 | 'A' + (intcp_sc_id & 0x0f)); |
@@ -326,8 +312,6 @@ static void __init intcp_init_of(void) | |||
326 | 312 | ||
327 | parent = soc_device_to_device(soc_dev); | 313 | parent = soc_device_to_device(soc_dev); |
328 | integrator_init_sysfs(parent, intcp_sc_id); | 314 | integrator_init_sysfs(parent, intcp_sc_id); |
329 | of_platform_populate(root, of_default_bus_match_table, | ||
330 | intcp_auxdata_lookup, parent); | ||
331 | } | 315 | } |
332 | 316 | ||
333 | static const char * intcp_dt_board_compat[] = { | 317 | static const char * intcp_dt_board_compat[] = { |
@@ -340,7 +324,6 @@ DT_MACHINE_START(INTEGRATOR_CP_DT, "ARM Integrator/CP (Device Tree)") | |||
340 | .map_io = intcp_map_io, | 324 | .map_io = intcp_map_io, |
341 | .init_early = intcp_init_early, | 325 | .init_early = intcp_init_early, |
342 | .init_irq = intcp_init_irq_of, | 326 | .init_irq = intcp_init_irq_of, |
343 | .handle_irq = fpga_handle_irq, | ||
344 | .init_machine = intcp_init_of, | 327 | .init_machine = intcp_init_of, |
345 | .restart = integrator_restart, | 328 | .restart = integrator_restart, |
346 | .dt_compat = intcp_dt_board_compat, | 329 | .dt_compat = intcp_dt_board_compat, |
diff --git a/arch/arm/mach-keystone/Kconfig b/arch/arm/mach-keystone/Kconfig index f50bc936cb84..98a156afaa94 100644 --- a/arch/arm/mach-keystone/Kconfig +++ b/arch/arm/mach-keystone/Kconfig | |||
@@ -1,6 +1,7 @@ | |||
1 | config ARCH_KEYSTONE | 1 | config ARCH_KEYSTONE |
2 | bool "Texas Instruments Keystone Devices" | 2 | bool "Texas Instruments Keystone Devices" |
3 | depends on ARCH_MULTI_V7 | 3 | depends on ARCH_MULTI_V7 |
4 | depends on ARM_PATCH_PHYS_VIRT | ||
4 | select ARM_GIC | 5 | select ARM_GIC |
5 | select HAVE_ARM_ARCH_TIMER | 6 | select HAVE_ARM_ARCH_TIMER |
6 | select CLKSRC_MMIO | 7 | select CLKSRC_MMIO |
diff --git a/arch/arm/mach-moxart/Kconfig b/arch/arm/mach-moxart/Kconfig index 82a4ba8578a2..f49328c39bef 100644 --- a/arch/arm/mach-moxart/Kconfig +++ b/arch/arm/mach-moxart/Kconfig | |||
@@ -1,4 +1,4 @@ | |||
1 | config ARCH_MOXART | 1 | menuconfig ARCH_MOXART |
2 | bool "MOXA ART SoC" if ARCH_MULTI_V4 | 2 | bool "MOXA ART SoC" if ARCH_MULTI_V4 |
3 | select CPU_FA526 | 3 | select CPU_FA526 |
4 | select ARM_DMA_MEM_BUFFERABLE | 4 | select ARM_DMA_MEM_BUFFERABLE |
diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig index 6090b9eb00c8..955d4a3afabd 100644 --- a/arch/arm/mach-mvebu/Kconfig +++ b/arch/arm/mach-mvebu/Kconfig | |||
@@ -1,4 +1,4 @@ | |||
1 | config ARCH_MVEBU | 1 | menuconfig ARCH_MVEBU |
2 | bool "Marvell Engineering Business Unit (MVEBU) SoCs" if (ARCH_MULTI_V7 || ARCH_MULTI_V5) | 2 | bool "Marvell Engineering Business Unit (MVEBU) SoCs" if (ARCH_MULTI_V7 || ARCH_MULTI_V5) |
3 | select ARCH_SUPPORTS_BIG_ENDIAN | 3 | select ARCH_SUPPORTS_BIG_ENDIAN |
4 | select CLKSRC_MMIO | 4 | select CLKSRC_MMIO |
@@ -10,15 +10,15 @@ config ARCH_MVEBU | |||
10 | select ZONE_DMA if ARM_LPAE | 10 | select ZONE_DMA if ARM_LPAE |
11 | select ARCH_REQUIRE_GPIOLIB | 11 | select ARCH_REQUIRE_GPIOLIB |
12 | select PCI_QUIRKS if PCI | 12 | select PCI_QUIRKS if PCI |
13 | select OF_ADDRESS_PCI | ||
13 | 14 | ||
14 | if ARCH_MVEBU | 15 | if ARCH_MVEBU |
15 | 16 | ||
16 | menu "Marvell EBU SoC variants" | ||
17 | |||
18 | config MACH_MVEBU_V7 | 17 | config MACH_MVEBU_V7 |
19 | bool | 18 | bool |
20 | select ARMADA_370_XP_TIMER | 19 | select ARMADA_370_XP_TIMER |
21 | select CACHE_L2X0 | 20 | select CACHE_L2X0 |
21 | select ARM_CPU_SUSPEND | ||
22 | 22 | ||
23 | config MACH_ARMADA_370 | 23 | config MACH_ARMADA_370 |
24 | bool "Marvell Armada 370 boards" if ARCH_MULTI_V7 | 24 | bool "Marvell Armada 370 boards" if ARCH_MULTI_V7 |
@@ -84,7 +84,6 @@ config MACH_DOVE | |||
84 | 84 | ||
85 | config MACH_KIRKWOOD | 85 | config MACH_KIRKWOOD |
86 | bool "Marvell Kirkwood boards" if ARCH_MULTI_V5 | 86 | bool "Marvell Kirkwood boards" if ARCH_MULTI_V5 |
87 | select ARCH_HAS_CPUFREQ | ||
88 | select ARCH_REQUIRE_GPIOLIB | 87 | select ARCH_REQUIRE_GPIOLIB |
89 | select CPU_FEROCEON | 88 | select CPU_FEROCEON |
90 | select KIRKWOOD_CLK | 89 | select KIRKWOOD_CLK |
@@ -97,6 +96,11 @@ config MACH_KIRKWOOD | |||
97 | Say 'Y' here if you want your kernel to support boards based | 96 | Say 'Y' here if you want your kernel to support boards based |
98 | on the Marvell Kirkwood device tree. | 97 | on the Marvell Kirkwood device tree. |
99 | 98 | ||
100 | endmenu | 99 | config MACH_NETXBIG |
100 | bool "LaCie 2Big and 5Big Network v2" | ||
101 | depends on MACH_KIRKWOOD | ||
102 | help | ||
103 | Say 'Y' here if you want your kernel to support the | ||
104 | LaCie 2Big and 5Big Network v2 | ||
101 | 105 | ||
102 | endif | 106 | endif |
diff --git a/arch/arm/mach-mvebu/Makefile b/arch/arm/mach-mvebu/Makefile index 2ecb828e4a8b..90bcd5327312 100644 --- a/arch/arm/mach-mvebu/Makefile +++ b/arch/arm/mach-mvebu/Makefile | |||
@@ -9,8 +9,8 @@ obj-y += system-controller.o mvebu-soc-id.o | |||
9 | ifeq ($(CONFIG_MACH_MVEBU_V7),y) | 9 | ifeq ($(CONFIG_MACH_MVEBU_V7),y) |
10 | obj-y += cpu-reset.o board-v7.o coherency.o coherency_ll.o pmsu.o | 10 | obj-y += cpu-reset.o board-v7.o coherency.o coherency_ll.o pmsu.o |
11 | obj-$(CONFIG_SMP) += platsmp.o headsmp.o platsmp-a9.o headsmp-a9.o | 11 | obj-$(CONFIG_SMP) += platsmp.o headsmp.o platsmp-a9.o headsmp-a9.o |
12 | obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o | ||
13 | endif | 12 | endif |
14 | 13 | ||
15 | obj-$(CONFIG_MACH_DOVE) += dove.o | 14 | obj-$(CONFIG_MACH_DOVE) += dove.o |
16 | obj-$(CONFIG_MACH_KIRKWOOD) += kirkwood.o kirkwood-pm.o | 15 | obj-$(CONFIG_MACH_KIRKWOOD) += kirkwood.o kirkwood-pm.o |
16 | obj-$(CONFIG_MACH_NETXBIG) += netxbig.o | ||
diff --git a/arch/arm/mach-mvebu/armada-370-xp.h b/arch/arm/mach-mvebu/armada-370-xp.h index c3465f5b1250..52c1603a4f92 100644 --- a/arch/arm/mach-mvebu/armada-370-xp.h +++ b/arch/arm/mach-mvebu/armada-370-xp.h | |||
@@ -24,4 +24,7 @@ void armada_xp_secondary_startup(void); | |||
24 | extern struct smp_operations armada_xp_smp_ops; | 24 | extern struct smp_operations armada_xp_smp_ops; |
25 | #endif | 25 | #endif |
26 | 26 | ||
27 | int armada_370_xp_pmsu_idle_enter(unsigned long deepidle); | ||
28 | void armada_370_xp_pmsu_idle_exit(void); | ||
29 | |||
27 | #endif /* __MACH_ARMADA_370_XP_H */ | 30 | #endif /* __MACH_ARMADA_370_XP_H */ |
diff --git a/arch/arm/mach-mvebu/board-v7.c b/arch/arm/mach-mvebu/board-v7.c index 8bb742fdf5ca..a04675e2ec99 100644 --- a/arch/arm/mach-mvebu/board-v7.c +++ b/arch/arm/mach-mvebu/board-v7.c | |||
@@ -118,8 +118,16 @@ static void __init thermal_quirk(void) | |||
118 | { | 118 | { |
119 | struct device_node *np; | 119 | struct device_node *np; |
120 | u32 dev, rev; | 120 | u32 dev, rev; |
121 | int res; | ||
121 | 122 | ||
122 | if (mvebu_get_soc_id(&dev, &rev) == 0 && rev > ARMADA_375_Z1_REV) | 123 | /* |
124 | * The early SoC Z1 revision needs a quirk to be applied in order | ||
125 | * for the thermal controller to work properly. This quirk breaks | ||
126 | * the thermal support if applied on a SoC that doesn't need it, | ||
127 | * so we enforce the SoC revision to be known. | ||
128 | */ | ||
129 | res = mvebu_get_soc_id(&dev, &rev); | ||
130 | if (res < 0 || (res == 0 && rev > ARMADA_375_Z1_REV)) | ||
123 | return; | 131 | return; |
124 | 132 | ||
125 | for_each_compatible_node(np, NULL, "marvell,armada375-thermal") { | 133 | for_each_compatible_node(np, NULL, "marvell,armada375-thermal") { |
@@ -153,7 +161,8 @@ static void __init thermal_quirk(void) | |||
153 | 161 | ||
154 | /* | 162 | /* |
155 | * The thermal controller needs some quirk too, so let's change | 163 | * The thermal controller needs some quirk too, so let's change |
156 | * the compatible string to reflect this. | 164 | * the compatible string to reflect this and allow the driver |
165 | * the take the necessary action. | ||
157 | */ | 166 | */ |
158 | prop = kzalloc(sizeof(*prop), GFP_KERNEL); | 167 | prop = kzalloc(sizeof(*prop), GFP_KERNEL); |
159 | prop->name = kstrdup("compatible", GFP_KERNEL); | 168 | prop->name = kstrdup("compatible", GFP_KERNEL); |
diff --git a/arch/arm/mach-mvebu/board.h b/arch/arm/mach-mvebu/board.h index 9c7bb4386f8b..98e32cc2ef3d 100644 --- a/arch/arm/mach-mvebu/board.h +++ b/arch/arm/mach-mvebu/board.h | |||
@@ -13,4 +13,9 @@ | |||
13 | #ifndef __ARCH_MVEBU_BOARD_H | 13 | #ifndef __ARCH_MVEBU_BOARD_H |
14 | #define __ARCH_MVEBU_BOARD_H | 14 | #define __ARCH_MVEBU_BOARD_H |
15 | 15 | ||
16 | #ifdef CONFIG_MACH_NETXBIG | ||
17 | void netxbig_init(void); | ||
18 | #else | ||
19 | static inline void netxbig_init(void) {}; | ||
20 | #endif | ||
16 | #endif | 21 | #endif |
diff --git a/arch/arm/mach-mvebu/common.h b/arch/arm/mach-mvebu/common.h index b67fb7a10d8b..a97778e28bf6 100644 --- a/arch/arm/mach-mvebu/common.h +++ b/arch/arm/mach-mvebu/common.h | |||
@@ -21,7 +21,6 @@ void mvebu_restart(enum reboot_mode mode, const char *cmd); | |||
21 | int mvebu_cpu_reset_deassert(int cpu); | 21 | int mvebu_cpu_reset_deassert(int cpu); |
22 | void mvebu_pmsu_set_cpu_boot_addr(int hw_cpu, void *boot_addr); | 22 | void mvebu_pmsu_set_cpu_boot_addr(int hw_cpu, void *boot_addr); |
23 | void mvebu_system_controller_set_cpu_boot_addr(void *boot_addr); | 23 | void mvebu_system_controller_set_cpu_boot_addr(void *boot_addr); |
24 | 24 | int mvebu_system_controller_get_soc_id(u32 *dev, u32 *rev); | |
25 | void armada_xp_cpu_die(unsigned int cpu); | ||
26 | 25 | ||
27 | #endif | 26 | #endif |
diff --git a/arch/arm/mach-mvebu/cpu-reset.c b/arch/arm/mach-mvebu/cpu-reset.c index 4a8f9eebebea..60fb53787004 100644 --- a/arch/arm/mach-mvebu/cpu-reset.c +++ b/arch/arm/mach-mvebu/cpu-reset.c | |||
@@ -67,7 +67,7 @@ static int mvebu_cpu_reset_map(struct device_node *np, int res_idx) | |||
67 | return 0; | 67 | return 0; |
68 | } | 68 | } |
69 | 69 | ||
70 | int __init mvebu_cpu_reset_init(void) | 70 | static int __init mvebu_cpu_reset_init(void) |
71 | { | 71 | { |
72 | struct device_node *np; | 72 | struct device_node *np; |
73 | int res_idx; | 73 | int res_idx; |
diff --git a/arch/arm/mach-mvebu/hotplug.c b/arch/arm/mach-mvebu/hotplug.c deleted file mode 100644 index d95e91047168..000000000000 --- a/arch/arm/mach-mvebu/hotplug.c +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | /* | ||
2 | * Symmetric Multi Processing (SMP) support for Armada XP | ||
3 | * | ||
4 | * Copyright (C) 2012 Marvell | ||
5 | * | ||
6 | * Lior Amsalem <alior@marvell.com> | ||
7 | * Gregory CLEMENT <gregory.clement@free-electrons.com> | ||
8 | * Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | ||
9 | * | ||
10 | * This file is licensed under the terms of the GNU General Public | ||
11 | * License version 2. This program is licensed "as is" without any | ||
12 | * warranty of any kind, whether express or implied. | ||
13 | */ | ||
14 | #include <linux/kernel.h> | ||
15 | #include <linux/errno.h> | ||
16 | #include <linux/smp.h> | ||
17 | #include <asm/proc-fns.h> | ||
18 | #include "common.h" | ||
19 | |||
20 | /* | ||
21 | * platform-specific code to shutdown a CPU | ||
22 | * | ||
23 | * Called with IRQs disabled | ||
24 | */ | ||
25 | void __ref armada_xp_cpu_die(unsigned int cpu) | ||
26 | { | ||
27 | cpu_do_idle(); | ||
28 | |||
29 | /* We should never return from idle */ | ||
30 | panic("mvebu: cpu %d unexpectedly exit from shutdown\n", cpu); | ||
31 | } | ||
diff --git a/arch/arm/mach-mvebu/kirkwood.c b/arch/arm/mach-mvebu/kirkwood.c index 46f105913c84..6b5310828eb2 100644 --- a/arch/arm/mach-mvebu/kirkwood.c +++ b/arch/arm/mach-mvebu/kirkwood.c | |||
@@ -180,6 +180,9 @@ static void __init kirkwood_dt_init(void) | |||
180 | kirkwood_pm_init(); | 180 | kirkwood_pm_init(); |
181 | kirkwood_dt_eth_fixup(); | 181 | kirkwood_dt_eth_fixup(); |
182 | 182 | ||
183 | if (of_machine_is_compatible("lacie,netxbig")) | ||
184 | netxbig_init(); | ||
185 | |||
183 | of_platform_populate(NULL, of_default_bus_match_table, auxdata, NULL); | 186 | of_platform_populate(NULL, of_default_bus_match_table, auxdata, NULL); |
184 | } | 187 | } |
185 | 188 | ||
diff --git a/arch/arm/mach-mvebu/mvebu-soc-id.c b/arch/arm/mach-mvebu/mvebu-soc-id.c index d0f35b4d4a23..a99434bcee84 100644 --- a/arch/arm/mach-mvebu/mvebu-soc-id.c +++ b/arch/arm/mach-mvebu/mvebu-soc-id.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/of_address.h> | 25 | #include <linux/of_address.h> |
26 | #include <linux/slab.h> | 26 | #include <linux/slab.h> |
27 | #include <linux/sys_soc.h> | 27 | #include <linux/sys_soc.h> |
28 | #include "common.h" | ||
28 | #include "mvebu-soc-id.h" | 29 | #include "mvebu-soc-id.h" |
29 | 30 | ||
30 | #define PCIE_DEV_ID_OFF 0x0 | 31 | #define PCIE_DEV_ID_OFF 0x0 |
@@ -51,10 +52,10 @@ int mvebu_get_soc_id(u32 *dev, u32 *rev) | |||
51 | *rev = soc_rev; | 52 | *rev = soc_rev; |
52 | return 0; | 53 | return 0; |
53 | } else | 54 | } else |
54 | return -1; | 55 | return -ENODEV; |
55 | } | 56 | } |
56 | 57 | ||
57 | static int __init mvebu_soc_id_init(void) | 58 | static int __init get_soc_id_by_pci(void) |
58 | { | 59 | { |
59 | struct device_node *np; | 60 | struct device_node *np; |
60 | int ret = 0; | 61 | int ret = 0; |
@@ -129,6 +130,22 @@ clk_err: | |||
129 | 130 | ||
130 | return ret; | 131 | return ret; |
131 | } | 132 | } |
133 | |||
134 | static int __init mvebu_soc_id_init(void) | ||
135 | { | ||
136 | |||
137 | /* | ||
138 | * First try to get the ID and the revision by the system | ||
139 | * register and use PCI registers only if it is not possible | ||
140 | */ | ||
141 | if (!mvebu_system_controller_get_soc_id(&soc_dev_id, &soc_rev)) { | ||
142 | is_id_valid = true; | ||
143 | pr_info("MVEBU SoC ID=0x%X, Rev=0x%X\n", soc_dev_id, soc_rev); | ||
144 | return 0; | ||
145 | } | ||
146 | |||
147 | return get_soc_id_by_pci(); | ||
148 | } | ||
132 | early_initcall(mvebu_soc_id_init); | 149 | early_initcall(mvebu_soc_id_init); |
133 | 150 | ||
134 | static int __init mvebu_soc_device(void) | 151 | static int __init mvebu_soc_device(void) |
diff --git a/arch/arm/mach-mvebu/netxbig.c b/arch/arm/mach-mvebu/netxbig.c new file mode 100644 index 000000000000..94b11b6585a4 --- /dev/null +++ b/arch/arm/mach-mvebu/netxbig.c | |||
@@ -0,0 +1,191 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-mvbu/board-netxbig.c | ||
3 | * | ||
4 | * LaCie 2Big and 5Big Network v2 board setup | ||
5 | * | ||
6 | * Copyright (C) 2010 Simon Guinot <sguinot@lacie.com> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | */ | ||
18 | |||
19 | #include <linux/kernel.h> | ||
20 | #include <linux/of.h> | ||
21 | #include <linux/platform_device.h> | ||
22 | #include <linux/platform_data/leds-kirkwood-netxbig.h> | ||
23 | #include "common.h" | ||
24 | |||
25 | /***************************************************************************** | ||
26 | * GPIO extension LEDs | ||
27 | ****************************************************************************/ | ||
28 | |||
29 | /* | ||
30 | * The LEDs are controlled by a CPLD and can be configured through a GPIO | ||
31 | * extension bus: | ||
32 | * | ||
33 | * - address register : bit [0-2] -> GPIO [47-49] | ||
34 | * - data register : bit [0-2] -> GPIO [44-46] | ||
35 | * - enable register : GPIO 29 | ||
36 | */ | ||
37 | |||
38 | static int netxbig_v2_gpio_ext_addr[] = { 47, 48, 49 }; | ||
39 | static int netxbig_v2_gpio_ext_data[] = { 44, 45, 46 }; | ||
40 | |||
41 | static struct netxbig_gpio_ext netxbig_v2_gpio_ext = { | ||
42 | .addr = netxbig_v2_gpio_ext_addr, | ||
43 | .num_addr = ARRAY_SIZE(netxbig_v2_gpio_ext_addr), | ||
44 | .data = netxbig_v2_gpio_ext_data, | ||
45 | .num_data = ARRAY_SIZE(netxbig_v2_gpio_ext_data), | ||
46 | .enable = 29, | ||
47 | }; | ||
48 | |||
49 | /* | ||
50 | * Address register selection: | ||
51 | * | ||
52 | * addr | register | ||
53 | * ---------------------------- | ||
54 | * 0 | front LED | ||
55 | * 1 | front LED brightness | ||
56 | * 2 | SATA LED brightness | ||
57 | * 3 | SATA0 LED | ||
58 | * 4 | SATA1 LED | ||
59 | * 5 | SATA2 LED | ||
60 | * 6 | SATA3 LED | ||
61 | * 7 | SATA4 LED | ||
62 | * | ||
63 | * Data register configuration: | ||
64 | * | ||
65 | * data | LED brightness | ||
66 | * ------------------------------------------------- | ||
67 | * 0 | min (off) | ||
68 | * - | - | ||
69 | * 7 | max | ||
70 | * | ||
71 | * data | front LED mode | ||
72 | * ------------------------------------------------- | ||
73 | * 0 | fix off | ||
74 | * 1 | fix blue on | ||
75 | * 2 | fix red on | ||
76 | * 3 | blink blue on=1 sec and blue off=1 sec | ||
77 | * 4 | blink red on=1 sec and red off=1 sec | ||
78 | * 5 | blink blue on=2.5 sec and red on=0.5 sec | ||
79 | * 6 | blink blue on=1 sec and red on=1 sec | ||
80 | * 7 | blink blue on=0.5 sec and blue off=2.5 sec | ||
81 | * | ||
82 | * data | SATA LED mode | ||
83 | * ------------------------------------------------- | ||
84 | * 0 | fix off | ||
85 | * 1 | SATA activity blink | ||
86 | * 2 | fix red on | ||
87 | * 3 | blink blue on=1 sec and blue off=1 sec | ||
88 | * 4 | blink red on=1 sec and red off=1 sec | ||
89 | * 5 | blink blue on=2.5 sec and red on=0.5 sec | ||
90 | * 6 | blink blue on=1 sec and red on=1 sec | ||
91 | * 7 | fix blue on | ||
92 | */ | ||
93 | |||
94 | static int netxbig_v2_red_mled[NETXBIG_LED_MODE_NUM] = { | ||
95 | [NETXBIG_LED_OFF] = 0, | ||
96 | [NETXBIG_LED_ON] = 2, | ||
97 | [NETXBIG_LED_SATA] = NETXBIG_LED_INVALID_MODE, | ||
98 | [NETXBIG_LED_TIMER1] = 4, | ||
99 | [NETXBIG_LED_TIMER2] = NETXBIG_LED_INVALID_MODE, | ||
100 | }; | ||
101 | |||
102 | static int netxbig_v2_blue_pwr_mled[NETXBIG_LED_MODE_NUM] = { | ||
103 | [NETXBIG_LED_OFF] = 0, | ||
104 | [NETXBIG_LED_ON] = 1, | ||
105 | [NETXBIG_LED_SATA] = NETXBIG_LED_INVALID_MODE, | ||
106 | [NETXBIG_LED_TIMER1] = 3, | ||
107 | [NETXBIG_LED_TIMER2] = 7, | ||
108 | }; | ||
109 | |||
110 | static int netxbig_v2_blue_sata_mled[NETXBIG_LED_MODE_NUM] = { | ||
111 | [NETXBIG_LED_OFF] = 0, | ||
112 | [NETXBIG_LED_ON] = 7, | ||
113 | [NETXBIG_LED_SATA] = 1, | ||
114 | [NETXBIG_LED_TIMER1] = 3, | ||
115 | [NETXBIG_LED_TIMER2] = NETXBIG_LED_INVALID_MODE, | ||
116 | }; | ||
117 | |||
118 | static struct netxbig_led_timer netxbig_v2_led_timer[] = { | ||
119 | [0] = { | ||
120 | .delay_on = 500, | ||
121 | .delay_off = 500, | ||
122 | .mode = NETXBIG_LED_TIMER1, | ||
123 | }, | ||
124 | [1] = { | ||
125 | .delay_on = 500, | ||
126 | .delay_off = 1000, | ||
127 | .mode = NETXBIG_LED_TIMER2, | ||
128 | }, | ||
129 | }; | ||
130 | |||
131 | #define NETXBIG_LED(_name, maddr, mval, baddr) \ | ||
132 | { .name = _name, \ | ||
133 | .mode_addr = maddr, \ | ||
134 | .mode_val = mval, \ | ||
135 | .bright_addr = baddr } | ||
136 | |||
137 | static struct netxbig_led net2big_v2_leds_ctrl[] = { | ||
138 | NETXBIG_LED("net2big-v2:blue:power", 0, netxbig_v2_blue_pwr_mled, 1), | ||
139 | NETXBIG_LED("net2big-v2:red:power", 0, netxbig_v2_red_mled, 1), | ||
140 | NETXBIG_LED("net2big-v2:blue:sata0", 3, netxbig_v2_blue_sata_mled, 2), | ||
141 | NETXBIG_LED("net2big-v2:red:sata0", 3, netxbig_v2_red_mled, 2), | ||
142 | NETXBIG_LED("net2big-v2:blue:sata1", 4, netxbig_v2_blue_sata_mled, 2), | ||
143 | NETXBIG_LED("net2big-v2:red:sata1", 4, netxbig_v2_red_mled, 2), | ||
144 | }; | ||
145 | |||
146 | static struct netxbig_led_platform_data net2big_v2_leds_data = { | ||
147 | .gpio_ext = &netxbig_v2_gpio_ext, | ||
148 | .timer = netxbig_v2_led_timer, | ||
149 | .num_timer = ARRAY_SIZE(netxbig_v2_led_timer), | ||
150 | .leds = net2big_v2_leds_ctrl, | ||
151 | .num_leds = ARRAY_SIZE(net2big_v2_leds_ctrl), | ||
152 | }; | ||
153 | |||
154 | static struct netxbig_led net5big_v2_leds_ctrl[] = { | ||
155 | NETXBIG_LED("net5big-v2:blue:power", 0, netxbig_v2_blue_pwr_mled, 1), | ||
156 | NETXBIG_LED("net5big-v2:red:power", 0, netxbig_v2_red_mled, 1), | ||
157 | NETXBIG_LED("net5big-v2:blue:sata0", 3, netxbig_v2_blue_sata_mled, 2), | ||
158 | NETXBIG_LED("net5big-v2:red:sata0", 3, netxbig_v2_red_mled, 2), | ||
159 | NETXBIG_LED("net5big-v2:blue:sata1", 4, netxbig_v2_blue_sata_mled, 2), | ||
160 | NETXBIG_LED("net5big-v2:red:sata1", 4, netxbig_v2_red_mled, 2), | ||
161 | NETXBIG_LED("net5big-v2:blue:sata2", 5, netxbig_v2_blue_sata_mled, 2), | ||
162 | NETXBIG_LED("net5big-v2:red:sata2", 5, netxbig_v2_red_mled, 2), | ||
163 | NETXBIG_LED("net5big-v2:blue:sata3", 6, netxbig_v2_blue_sata_mled, 2), | ||
164 | NETXBIG_LED("net5big-v2:red:sata3", 6, netxbig_v2_red_mled, 2), | ||
165 | NETXBIG_LED("net5big-v2:blue:sata4", 7, netxbig_v2_blue_sata_mled, 2), | ||
166 | NETXBIG_LED("net5big-v2:red:sata4", 7, netxbig_v2_red_mled, 2), | ||
167 | }; | ||
168 | |||
169 | static struct netxbig_led_platform_data net5big_v2_leds_data = { | ||
170 | .gpio_ext = &netxbig_v2_gpio_ext, | ||
171 | .timer = netxbig_v2_led_timer, | ||
172 | .num_timer = ARRAY_SIZE(netxbig_v2_led_timer), | ||
173 | .leds = net5big_v2_leds_ctrl, | ||
174 | .num_leds = ARRAY_SIZE(net5big_v2_leds_ctrl), | ||
175 | }; | ||
176 | |||
177 | static struct platform_device netxbig_v2_leds = { | ||
178 | .name = "leds-netxbig", | ||
179 | .id = -1, | ||
180 | .dev = { | ||
181 | .platform_data = &net2big_v2_leds_data, | ||
182 | }, | ||
183 | }; | ||
184 | |||
185 | void __init netxbig_init(void) | ||
186 | { | ||
187 | |||
188 | if (of_machine_is_compatible("lacie,net5big_v2")) | ||
189 | netxbig_v2_leds.dev.platform_data = &net5big_v2_leds_data; | ||
190 | platform_device_register(&netxbig_v2_leds); | ||
191 | } | ||
diff --git a/arch/arm/mach-mvebu/platsmp-a9.c b/arch/arm/mach-mvebu/platsmp-a9.c index 96c2c59e34b6..43aaf3fa75ee 100644 --- a/arch/arm/mach-mvebu/platsmp-a9.c +++ b/arch/arm/mach-mvebu/platsmp-a9.c | |||
@@ -33,7 +33,7 @@ | |||
33 | extern unsigned char armada_375_smp_cpu1_enable_code_end; | 33 | extern unsigned char armada_375_smp_cpu1_enable_code_end; |
34 | extern unsigned char armada_375_smp_cpu1_enable_code_start; | 34 | extern unsigned char armada_375_smp_cpu1_enable_code_start; |
35 | 35 | ||
36 | void armada_375_smp_cpu1_enable_wa(void) | 36 | static void armada_375_smp_cpu1_enable_wa(void) |
37 | { | 37 | { |
38 | void __iomem *sram_virt_base; | 38 | void __iomem *sram_virt_base; |
39 | 39 | ||
@@ -91,9 +91,6 @@ static int __cpuinit mvebu_cortex_a9_boot_secondary(unsigned int cpu, | |||
91 | 91 | ||
92 | static struct smp_operations mvebu_cortex_a9_smp_ops __initdata = { | 92 | static struct smp_operations mvebu_cortex_a9_smp_ops __initdata = { |
93 | .smp_boot_secondary = mvebu_cortex_a9_boot_secondary, | 93 | .smp_boot_secondary = mvebu_cortex_a9_boot_secondary, |
94 | #ifdef CONFIG_HOTPLUG_CPU | ||
95 | .cpu_die = armada_xp_cpu_die, | ||
96 | #endif | ||
97 | }; | 94 | }; |
98 | 95 | ||
99 | CPU_METHOD_OF_DECLARE(mvebu_armada_375_smp, "marvell,armada-375-smp", | 96 | CPU_METHOD_OF_DECLARE(mvebu_armada_375_smp, "marvell,armada-375-smp", |
diff --git a/arch/arm/mach-mvebu/platsmp.c b/arch/arm/mach-mvebu/platsmp.c index 88b976b31719..b6fa9f0c98b8 100644 --- a/arch/arm/mach-mvebu/platsmp.c +++ b/arch/arm/mach-mvebu/platsmp.c | |||
@@ -78,6 +78,17 @@ static int armada_xp_boot_secondary(unsigned int cpu, struct task_struct *idle) | |||
78 | 78 | ||
79 | hw_cpu = cpu_logical_map(cpu); | 79 | hw_cpu = cpu_logical_map(cpu); |
80 | mvebu_pmsu_set_cpu_boot_addr(hw_cpu, armada_xp_secondary_startup); | 80 | mvebu_pmsu_set_cpu_boot_addr(hw_cpu, armada_xp_secondary_startup); |
81 | |||
82 | /* | ||
83 | * This is needed to wake up CPUs in the offline state after | ||
84 | * using CPU hotplug. | ||
85 | */ | ||
86 | arch_send_wakeup_ipi_mask(cpumask_of(cpu)); | ||
87 | |||
88 | /* | ||
89 | * This is needed to take secondary CPUs out of reset on the | ||
90 | * initial boot. | ||
91 | */ | ||
81 | ret = mvebu_cpu_reset_deassert(hw_cpu); | 92 | ret = mvebu_cpu_reset_deassert(hw_cpu); |
82 | if (ret) { | 93 | if (ret) { |
83 | pr_warn("unable to boot CPU: %d\n", ret); | 94 | pr_warn("unable to boot CPU: %d\n", ret); |
@@ -87,6 +98,19 @@ static int armada_xp_boot_secondary(unsigned int cpu, struct task_struct *idle) | |||
87 | return 0; | 98 | return 0; |
88 | } | 99 | } |
89 | 100 | ||
101 | /* | ||
102 | * When a CPU is brought back online, either through CPU hotplug, or | ||
103 | * because of the boot of a kexec'ed kernel, the PMSU configuration | ||
104 | * for this CPU might be in the deep idle state, preventing this CPU | ||
105 | * from receiving interrupts. Here, we therefore take out the current | ||
106 | * CPU from this state, which was entered by armada_xp_cpu_die() | ||
107 | * below. | ||
108 | */ | ||
109 | static void armada_xp_secondary_init(unsigned int cpu) | ||
110 | { | ||
111 | armada_370_xp_pmsu_idle_exit(); | ||
112 | } | ||
113 | |||
90 | static void __init armada_xp_smp_init_cpus(void) | 114 | static void __init armada_xp_smp_init_cpus(void) |
91 | { | 115 | { |
92 | unsigned int ncores = num_possible_cpus(); | 116 | unsigned int ncores = num_possible_cpus(); |
@@ -122,12 +146,36 @@ static void __init armada_xp_smp_prepare_cpus(unsigned int max_cpus) | |||
122 | panic("The address for the BootROM is incorrect"); | 146 | panic("The address for the BootROM is incorrect"); |
123 | } | 147 | } |
124 | 148 | ||
149 | #ifdef CONFIG_HOTPLUG_CPU | ||
150 | static void armada_xp_cpu_die(unsigned int cpu) | ||
151 | { | ||
152 | /* | ||
153 | * CPU hotplug is implemented by putting offline CPUs into the | ||
154 | * deep idle sleep state. | ||
155 | */ | ||
156 | armada_370_xp_pmsu_idle_enter(true); | ||
157 | } | ||
158 | |||
159 | /* | ||
160 | * We need a dummy function, so that platform_can_cpu_hotplug() knows | ||
161 | * we support CPU hotplug. However, the function does not need to do | ||
162 | * anything, because CPUs going offline can enter the deep idle state | ||
163 | * by themselves, without any help from a still alive CPU. | ||
164 | */ | ||
165 | static int armada_xp_cpu_kill(unsigned int cpu) | ||
166 | { | ||
167 | return 1; | ||
168 | } | ||
169 | #endif | ||
170 | |||
125 | struct smp_operations armada_xp_smp_ops __initdata = { | 171 | struct smp_operations armada_xp_smp_ops __initdata = { |
126 | .smp_init_cpus = armada_xp_smp_init_cpus, | 172 | .smp_init_cpus = armada_xp_smp_init_cpus, |
127 | .smp_prepare_cpus = armada_xp_smp_prepare_cpus, | 173 | .smp_prepare_cpus = armada_xp_smp_prepare_cpus, |
128 | .smp_boot_secondary = armada_xp_boot_secondary, | 174 | .smp_boot_secondary = armada_xp_boot_secondary, |
175 | .smp_secondary_init = armada_xp_secondary_init, | ||
129 | #ifdef CONFIG_HOTPLUG_CPU | 176 | #ifdef CONFIG_HOTPLUG_CPU |
130 | .cpu_die = armada_xp_cpu_die, | 177 | .cpu_die = armada_xp_cpu_die, |
178 | .cpu_kill = armada_xp_cpu_kill, | ||
131 | #endif | 179 | #endif |
132 | }; | 180 | }; |
133 | 181 | ||
diff --git a/arch/arm/mach-mvebu/pmsu.c b/arch/arm/mach-mvebu/pmsu.c index 53a55c8520bf..9c819d65b337 100644 --- a/arch/arm/mach-mvebu/pmsu.c +++ b/arch/arm/mach-mvebu/pmsu.c | |||
@@ -148,13 +148,13 @@ static void armada_370_xp_cpu_resume(void) | |||
148 | } | 148 | } |
149 | 149 | ||
150 | /* No locking is needed because we only access per-CPU registers */ | 150 | /* No locking is needed because we only access per-CPU registers */ |
151 | void armada_370_xp_pmsu_idle_prepare(bool deepidle) | 151 | int armada_370_xp_pmsu_idle_enter(unsigned long deepidle) |
152 | { | 152 | { |
153 | unsigned int hw_cpu = cpu_logical_map(smp_processor_id()); | 153 | unsigned int hw_cpu = cpu_logical_map(smp_processor_id()); |
154 | u32 reg; | 154 | u32 reg; |
155 | 155 | ||
156 | if (pmsu_mp_base == NULL) | 156 | if (pmsu_mp_base == NULL) |
157 | return; | 157 | return -EINVAL; |
158 | 158 | ||
159 | /* | 159 | /* |
160 | * Adjust the PMSU configuration to wait for WFI signal, enable | 160 | * Adjust the PMSU configuration to wait for WFI signal, enable |
@@ -183,11 +183,6 @@ void armada_370_xp_pmsu_idle_prepare(bool deepidle) | |||
183 | reg = readl(pmsu_mp_base + PMSU_CPU_POWER_DOWN_CONTROL(hw_cpu)); | 183 | reg = readl(pmsu_mp_base + PMSU_CPU_POWER_DOWN_CONTROL(hw_cpu)); |
184 | reg |= PMSU_CPU_POWER_DOWN_DIS_SNP_Q_SKIP; | 184 | reg |= PMSU_CPU_POWER_DOWN_DIS_SNP_Q_SKIP; |
185 | writel(reg, pmsu_mp_base + PMSU_CPU_POWER_DOWN_CONTROL(hw_cpu)); | 185 | writel(reg, pmsu_mp_base + PMSU_CPU_POWER_DOWN_CONTROL(hw_cpu)); |
186 | } | ||
187 | |||
188 | static noinline int do_armada_370_xp_cpu_suspend(unsigned long deepidle) | ||
189 | { | ||
190 | armada_370_xp_pmsu_idle_prepare(deepidle); | ||
191 | 186 | ||
192 | v7_exit_coherency_flush(all); | 187 | v7_exit_coherency_flush(all); |
193 | 188 | ||
@@ -220,11 +215,11 @@ static noinline int do_armada_370_xp_cpu_suspend(unsigned long deepidle) | |||
220 | 215 | ||
221 | static int armada_370_xp_cpu_suspend(unsigned long deepidle) | 216 | static int armada_370_xp_cpu_suspend(unsigned long deepidle) |
222 | { | 217 | { |
223 | return cpu_suspend(deepidle, do_armada_370_xp_cpu_suspend); | 218 | return cpu_suspend(deepidle, armada_370_xp_pmsu_idle_enter); |
224 | } | 219 | } |
225 | 220 | ||
226 | /* No locking is needed because we only access per-CPU registers */ | 221 | /* No locking is needed because we only access per-CPU registers */ |
227 | static noinline void armada_370_xp_pmsu_idle_restore(void) | 222 | void armada_370_xp_pmsu_idle_exit(void) |
228 | { | 223 | { |
229 | unsigned int hw_cpu = cpu_logical_map(smp_processor_id()); | 224 | unsigned int hw_cpu = cpu_logical_map(smp_processor_id()); |
230 | u32 reg; | 225 | u32 reg; |
@@ -253,7 +248,7 @@ static int armada_370_xp_cpu_pm_notify(struct notifier_block *self, | |||
253 | unsigned int hw_cpu = cpu_logical_map(smp_processor_id()); | 248 | unsigned int hw_cpu = cpu_logical_map(smp_processor_id()); |
254 | mvebu_pmsu_set_cpu_boot_addr(hw_cpu, armada_370_xp_cpu_resume); | 249 | mvebu_pmsu_set_cpu_boot_addr(hw_cpu, armada_370_xp_cpu_resume); |
255 | } else if (action == CPU_PM_EXIT) { | 250 | } else if (action == CPU_PM_EXIT) { |
256 | armada_370_xp_pmsu_idle_restore(); | 251 | armada_370_xp_pmsu_idle_exit(); |
257 | } | 252 | } |
258 | 253 | ||
259 | return NOTIFY_OK; | 254 | return NOTIFY_OK; |
@@ -263,7 +258,7 @@ static struct notifier_block armada_370_xp_cpu_pm_notifier = { | |||
263 | .notifier_call = armada_370_xp_cpu_pm_notify, | 258 | .notifier_call = armada_370_xp_cpu_pm_notify, |
264 | }; | 259 | }; |
265 | 260 | ||
266 | int __init armada_370_xp_cpu_pm_init(void) | 261 | static int __init armada_370_xp_cpu_pm_init(void) |
267 | { | 262 | { |
268 | struct device_node *np; | 263 | struct device_node *np; |
269 | 264 | ||
diff --git a/arch/arm/mach-mvebu/system-controller.c b/arch/arm/mach-mvebu/system-controller.c index 0c5524ac75b7..b2b4e3d6558c 100644 --- a/arch/arm/mach-mvebu/system-controller.c +++ b/arch/arm/mach-mvebu/system-controller.c | |||
@@ -39,6 +39,9 @@ struct mvebu_system_controller { | |||
39 | u32 system_soft_reset; | 39 | u32 system_soft_reset; |
40 | 40 | ||
41 | u32 resume_boot_addr; | 41 | u32 resume_boot_addr; |
42 | |||
43 | u32 dev_id; | ||
44 | u32 rev_id; | ||
42 | }; | 45 | }; |
43 | static struct mvebu_system_controller *mvebu_sc; | 46 | static struct mvebu_system_controller *mvebu_sc; |
44 | 47 | ||
@@ -47,6 +50,8 @@ static const struct mvebu_system_controller armada_370_xp_system_controller = { | |||
47 | .system_soft_reset_offset = 0x64, | 50 | .system_soft_reset_offset = 0x64, |
48 | .rstoutn_mask_reset_out_en = 0x1, | 51 | .rstoutn_mask_reset_out_en = 0x1, |
49 | .system_soft_reset = 0x1, | 52 | .system_soft_reset = 0x1, |
53 | .dev_id = 0x38, | ||
54 | .rev_id = 0x3c, | ||
50 | }; | 55 | }; |
51 | 56 | ||
52 | static const struct mvebu_system_controller armada_375_system_controller = { | 57 | static const struct mvebu_system_controller armada_375_system_controller = { |
@@ -55,6 +60,8 @@ static const struct mvebu_system_controller armada_375_system_controller = { | |||
55 | .rstoutn_mask_reset_out_en = 0x1, | 60 | .rstoutn_mask_reset_out_en = 0x1, |
56 | .system_soft_reset = 0x1, | 61 | .system_soft_reset = 0x1, |
57 | .resume_boot_addr = 0xd4, | 62 | .resume_boot_addr = 0xd4, |
63 | .dev_id = 0x38, | ||
64 | .rev_id = 0x3c, | ||
58 | }; | 65 | }; |
59 | 66 | ||
60 | static const struct mvebu_system_controller orion_system_controller = { | 67 | static const struct mvebu_system_controller orion_system_controller = { |
@@ -101,6 +108,18 @@ void mvebu_restart(enum reboot_mode mode, const char *cmd) | |||
101 | ; | 108 | ; |
102 | } | 109 | } |
103 | 110 | ||
111 | int mvebu_system_controller_get_soc_id(u32 *dev, u32 *rev) | ||
112 | { | ||
113 | if (of_machine_is_compatible("marvell,armada380") && | ||
114 | system_controller_base) { | ||
115 | *dev = readl(system_controller_base + mvebu_sc->dev_id) >> 16; | ||
116 | *rev = (readl(system_controller_base + mvebu_sc->rev_id) >> 8) | ||
117 | & 0xF; | ||
118 | return 0; | ||
119 | } else | ||
120 | return -ENODEV; | ||
121 | } | ||
122 | |||
104 | #ifdef CONFIG_SMP | 123 | #ifdef CONFIG_SMP |
105 | void mvebu_system_controller_set_cpu_boot_addr(void *boot_addr) | 124 | void mvebu_system_controller_set_cpu_boot_addr(void *boot_addr) |
106 | { | 125 | { |
diff --git a/arch/arm/mach-nomadik/Kconfig b/arch/arm/mach-nomadik/Kconfig index 486d301f43fd..3c61096c8627 100644 --- a/arch/arm/mach-nomadik/Kconfig +++ b/arch/arm/mach-nomadik/Kconfig | |||
@@ -1,4 +1,4 @@ | |||
1 | config ARCH_NOMADIK | 1 | menuconfig ARCH_NOMADIK |
2 | bool "ST-Ericsson Nomadik" | 2 | bool "ST-Ericsson Nomadik" |
3 | depends on ARCH_MULTI_V5 | 3 | depends on ARCH_MULTI_V5 |
4 | select ARCH_REQUIRE_GPIOLIB | 4 | select ARCH_REQUIRE_GPIOLIB |
@@ -15,7 +15,6 @@ config ARCH_NOMADIK | |||
15 | Support for the Nomadik platform by ST-Ericsson | 15 | Support for the Nomadik platform by ST-Ericsson |
16 | 16 | ||
17 | if ARCH_NOMADIK | 17 | if ARCH_NOMADIK |
18 | menu "Nomadik boards" | ||
19 | 18 | ||
20 | config MACH_NOMADIK_8815NHK | 19 | config MACH_NOMADIK_8815NHK |
21 | bool "ST 8815 Nomadik Hardware Kit (evaluation board)" | 20 | bool "ST 8815 Nomadik Hardware Kit (evaluation board)" |
@@ -24,7 +23,6 @@ config MACH_NOMADIK_8815NHK | |||
24 | select I2C_ALGOBIT | 23 | select I2C_ALGOBIT |
25 | select I2C_NOMADIK | 24 | select I2C_NOMADIK |
26 | 25 | ||
27 | endmenu | ||
28 | endif | 26 | endif |
29 | 27 | ||
30 | config NOMADIK_8815 | 28 | config NOMADIK_8815 |
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index 0ba482638ebf..1c1ed737f7ab 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig | |||
@@ -1,3 +1,6 @@ | |||
1 | menu "TI OMAP/AM/DM/DRA Family" | ||
2 | depends on ARCH_MULTI_V6 || ARCH_MULTI_V7 | ||
3 | |||
1 | config ARCH_OMAP | 4 | config ARCH_OMAP |
2 | bool | 5 | bool |
3 | 6 | ||
@@ -28,12 +31,11 @@ config ARCH_OMAP4 | |||
28 | select ARM_CPU_SUSPEND if PM | 31 | select ARM_CPU_SUSPEND if PM |
29 | select ARM_ERRATA_720789 | 32 | select ARM_ERRATA_720789 |
30 | select ARM_GIC | 33 | select ARM_GIC |
31 | select CACHE_L2X0 | ||
32 | select HAVE_ARM_SCU if SMP | 34 | select HAVE_ARM_SCU if SMP |
33 | select HAVE_ARM_TWD if SMP | 35 | select HAVE_ARM_TWD if SMP |
34 | select OMAP_INTERCONNECT | 36 | select OMAP_INTERCONNECT |
35 | select PL310_ERRATA_588369 | 37 | select PL310_ERRATA_588369 if CACHE_L2X0 |
36 | select PL310_ERRATA_727915 | 38 | select PL310_ERRATA_727915 if CACHE_L2X0 |
37 | select PM_OPP if PM | 39 | select PM_OPP if PM |
38 | select PM_RUNTIME if CPU_IDLE | 40 | select PM_RUNTIME if CPU_IDLE |
39 | select ARM_ERRATA_754322 | 41 | select ARM_ERRATA_754322 |
@@ -80,7 +82,6 @@ config SOC_DRA7XX | |||
80 | config ARCH_OMAP2PLUS | 82 | config ARCH_OMAP2PLUS |
81 | bool | 83 | bool |
82 | select ARCH_HAS_BANDGAP | 84 | select ARCH_HAS_BANDGAP |
83 | select ARCH_HAS_CPUFREQ | ||
84 | select ARCH_HAS_HOLES_MEMORYMODEL | 85 | select ARCH_HAS_HOLES_MEMORYMODEL |
85 | select ARCH_OMAP | 86 | select ARCH_OMAP |
86 | select ARCH_REQUIRE_GPIOLIB | 87 | select ARCH_REQUIRE_GPIOLIB |
@@ -343,3 +344,5 @@ config OMAP4_ERRATA_I688 | |||
343 | endmenu | 344 | endmenu |
344 | 345 | ||
345 | endif | 346 | endif |
347 | |||
348 | endmenu | ||
diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h index ff029737c8f0..a373d508799a 100644 --- a/arch/arm/mach-omap2/common.h +++ b/arch/arm/mach-omap2/common.h | |||
@@ -91,7 +91,14 @@ extern void omap3_sync32k_timer_init(void); | |||
91 | extern void omap3_secure_sync32k_timer_init(void); | 91 | extern void omap3_secure_sync32k_timer_init(void); |
92 | extern void omap3_gptimer_timer_init(void); | 92 | extern void omap3_gptimer_timer_init(void); |
93 | extern void omap4_local_timer_init(void); | 93 | extern void omap4_local_timer_init(void); |
94 | #ifdef CONFIG_CACHE_L2X0 | ||
94 | int omap_l2_cache_init(void); | 95 | int omap_l2_cache_init(void); |
96 | #else | ||
97 | static inline int omap_l2_cache_init(void) | ||
98 | { | ||
99 | return 0; | ||
100 | } | ||
101 | #endif | ||
95 | extern void omap5_realtime_timer_init(void); | 102 | extern void omap5_realtime_timer_init(void); |
96 | 103 | ||
97 | void omap2420_init_early(void); | 104 | void omap2420_init_early(void); |
diff --git a/arch/arm/mach-prima2/Kconfig b/arch/arm/mach-prima2/Kconfig index e4e505f52ba0..042f693ef423 100644 --- a/arch/arm/mach-prima2/Kconfig +++ b/arch/arm/mach-prima2/Kconfig | |||
@@ -1,4 +1,4 @@ | |||
1 | config ARCH_SIRF | 1 | menuconfig ARCH_SIRF |
2 | bool "CSR SiRF" if ARCH_MULTI_V7 | 2 | bool "CSR SiRF" if ARCH_MULTI_V7 |
3 | select ARCH_HAS_RESET_CONTROLLER | 3 | select ARCH_HAS_RESET_CONTROLLER |
4 | select ARCH_REQUIRE_GPIOLIB | 4 | select ARCH_REQUIRE_GPIOLIB |
@@ -11,7 +11,7 @@ config ARCH_SIRF | |||
11 | 11 | ||
12 | if ARCH_SIRF | 12 | if ARCH_SIRF |
13 | 13 | ||
14 | menu "CSR SiRF atlas6/primaII/Marco/Polo Specific Features" | 14 | comment "CSR SiRF atlas6/primaII/Marco/Polo Specific Features" |
15 | 15 | ||
16 | config ARCH_ATLAS6 | 16 | config ARCH_ATLAS6 |
17 | bool "CSR SiRFSoC ATLAS6 ARM Cortex A9 Platform" | 17 | bool "CSR SiRFSoC ATLAS6 ARM Cortex A9 Platform" |
@@ -37,8 +37,6 @@ config ARCH_MARCO | |||
37 | help | 37 | help |
38 | Support for CSR SiRFSoC ARM Cortex A9 Platform | 38 | Support for CSR SiRFSoC ARM Cortex A9 Platform |
39 | 39 | ||
40 | endmenu | ||
41 | |||
42 | config SIRF_IRQ | 40 | config SIRF_IRQ |
43 | bool | 41 | bool |
44 | 42 | ||
diff --git a/arch/arm/mach-qcom/Kconfig b/arch/arm/mach-qcom/Kconfig index fd2b99dceb89..ee5697ba05bc 100644 --- a/arch/arm/mach-qcom/Kconfig +++ b/arch/arm/mach-qcom/Kconfig | |||
@@ -1,4 +1,4 @@ | |||
1 | config ARCH_QCOM | 1 | menuconfig ARCH_QCOM |
2 | bool "Qualcomm Support" if ARCH_MULTI_V7 | 2 | bool "Qualcomm Support" if ARCH_MULTI_V7 |
3 | select ARCH_REQUIRE_GPIOLIB | 3 | select ARCH_REQUIRE_GPIOLIB |
4 | select ARM_GIC | 4 | select ARM_GIC |
@@ -11,8 +11,6 @@ config ARCH_QCOM | |||
11 | 11 | ||
12 | if ARCH_QCOM | 12 | if ARCH_QCOM |
13 | 13 | ||
14 | menu "Qualcomm SoC Selection" | ||
15 | |||
16 | config ARCH_MSM8X60 | 14 | config ARCH_MSM8X60 |
17 | bool "Enable support for MSM8X60" | 15 | bool "Enable support for MSM8X60" |
18 | select CLKSRC_QCOM | 16 | select CLKSRC_QCOM |
@@ -25,8 +23,6 @@ config ARCH_MSM8974 | |||
25 | bool "Enable support for MSM8974" | 23 | bool "Enable support for MSM8974" |
26 | select HAVE_ARM_ARCH_TIMER | 24 | select HAVE_ARM_ARCH_TIMER |
27 | 25 | ||
28 | endmenu | ||
29 | |||
30 | config QCOM_SCM | 26 | config QCOM_SCM |
31 | bool | 27 | bool |
32 | 28 | ||
diff --git a/arch/arm/mach-s3c24xx/Kconfig b/arch/arm/mach-s3c24xx/Kconfig index 04284de7aca5..ad5316ae524e 100644 --- a/arch/arm/mach-s3c24xx/Kconfig +++ b/arch/arm/mach-s3c24xx/Kconfig | |||
@@ -117,7 +117,7 @@ config S3C24XX_SETUP_TS | |||
117 | Compile in platform device definition for Samsung TouchScreen. | 117 | Compile in platform device definition for Samsung TouchScreen. |
118 | 118 | ||
119 | config S3C24XX_DMA | 119 | config S3C24XX_DMA |
120 | bool "S3C2410 DMA support" | 120 | bool "S3C2410 DMA support (deprecated)" |
121 | select S3C_DMA | 121 | select S3C_DMA |
122 | help | 122 | help |
123 | S3C2410 DMA support. This is needed for drivers like sound which | 123 | S3C2410 DMA support. This is needed for drivers like sound which |
diff --git a/arch/arm/mach-s3c64xx/Kconfig b/arch/arm/mach-s3c64xx/Kconfig index 3136d86b0d6e..26ca2427e53d 100644 --- a/arch/arm/mach-s3c64xx/Kconfig +++ b/arch/arm/mach-s3c64xx/Kconfig | |||
@@ -18,9 +18,9 @@ config CPU_S3C6410 | |||
18 | Enable S3C6410 CPU support | 18 | Enable S3C6410 CPU support |
19 | 19 | ||
20 | config S3C64XX_PL080 | 20 | config S3C64XX_PL080 |
21 | bool "S3C64XX DMA using generic PL08x driver" | 21 | def_bool DMADEVICES |
22 | select ARM_AMBA | ||
22 | select AMBA_PL08X | 23 | select AMBA_PL08X |
23 | select SAMSUNG_DMADEV | ||
24 | 24 | ||
25 | config S3C64XX_SETUP_SDHCI | 25 | config S3C64XX_SETUP_SDHCI |
26 | bool | 26 | bool |
diff --git a/arch/arm/mach-s5p64x0/Kconfig b/arch/arm/mach-s5p64x0/Kconfig index bb2111b3751e..26003e23796d 100644 --- a/arch/arm/mach-s5p64x0/Kconfig +++ b/arch/arm/mach-s5p64x0/Kconfig | |||
@@ -9,16 +9,18 @@ if ARCH_S5P64X0 | |||
9 | 9 | ||
10 | config CPU_S5P6440 | 10 | config CPU_S5P6440 |
11 | bool | 11 | bool |
12 | select ARM_AMBA | ||
13 | select PL330_DMA if DMADEVICES | ||
12 | select S5P_SLEEP if PM | 14 | select S5P_SLEEP if PM |
13 | select SAMSUNG_DMADEV | ||
14 | select SAMSUNG_WAKEMASK if PM | 15 | select SAMSUNG_WAKEMASK if PM |
15 | help | 16 | help |
16 | Enable S5P6440 CPU support | 17 | Enable S5P6440 CPU support |
17 | 18 | ||
18 | config CPU_S5P6450 | 19 | config CPU_S5P6450 |
19 | bool | 20 | bool |
21 | select ARM_AMBA | ||
22 | select PL330_DMA if DMADEVICES | ||
20 | select S5P_SLEEP if PM | 23 | select S5P_SLEEP if PM |
21 | select SAMSUNG_DMADEV | ||
22 | select SAMSUNG_WAKEMASK if PM | 24 | select SAMSUNG_WAKEMASK if PM |
23 | help | 25 | help |
24 | Enable S5P6450 CPU support | 26 | Enable S5P6450 CPU support |
diff --git a/arch/arm/mach-s5pc100/Kconfig b/arch/arm/mach-s5pc100/Kconfig index 15170be97a74..c5e3a969b063 100644 --- a/arch/arm/mach-s5pc100/Kconfig +++ b/arch/arm/mach-s5pc100/Kconfig | |||
@@ -9,8 +9,9 @@ if ARCH_S5PC100 | |||
9 | 9 | ||
10 | config CPU_S5PC100 | 10 | config CPU_S5PC100 |
11 | bool | 11 | bool |
12 | select ARM_AMBA | ||
13 | select PL330_DMA if DMADEVICES | ||
12 | select S5P_EXT_INT | 14 | select S5P_EXT_INT |
13 | select SAMSUNG_DMADEV | ||
14 | help | 15 | help |
15 | Enable S5PC100 CPU support | 16 | Enable S5PC100 CPU support |
16 | 17 | ||
diff --git a/arch/arm/mach-s5pv210/Kconfig b/arch/arm/mach-s5pv210/Kconfig index 8c3abe521757..f60f2862856d 100644 --- a/arch/arm/mach-s5pv210/Kconfig +++ b/arch/arm/mach-s5pv210/Kconfig | |||
@@ -11,10 +11,11 @@ if ARCH_S5PV210 | |||
11 | 11 | ||
12 | config CPU_S5PV210 | 12 | config CPU_S5PV210 |
13 | bool | 13 | bool |
14 | select ARM_AMBA | ||
15 | select PL330_DMA if DMADEVICES | ||
14 | select S5P_EXT_INT | 16 | select S5P_EXT_INT |
15 | select S5P_PM if PM | 17 | select S5P_PM if PM |
16 | select S5P_SLEEP if PM | 18 | select S5P_SLEEP if PM |
17 | select SAMSUNG_DMADEV | ||
18 | help | 19 | help |
19 | Enable S5PV210 CPU support | 20 | Enable S5PV210 CPU support |
20 | 21 | ||
diff --git a/arch/arm/mach-sa1100/collie.c b/arch/arm/mach-sa1100/collie.c index f9874ba60cc8..108939f8d053 100644 --- a/arch/arm/mach-sa1100/collie.c +++ b/arch/arm/mach-sa1100/collie.c | |||
@@ -329,6 +329,11 @@ static struct mtd_partition collie_partitions[] = { | |||
329 | .name = "rootfs", | 329 | .name = "rootfs", |
330 | .offset = MTDPART_OFS_APPEND, | 330 | .offset = MTDPART_OFS_APPEND, |
331 | .size = 0x00e20000, | 331 | .size = 0x00e20000, |
332 | }, { | ||
333 | .name = "bootblock", | ||
334 | .offset = MTDPART_OFS_APPEND, | ||
335 | .size = 0x00020000, | ||
336 | .mask_flags = MTD_WRITEABLE | ||
332 | } | 337 | } |
333 | }; | 338 | }; |
334 | 339 | ||
@@ -356,7 +361,7 @@ static void collie_flash_exit(void) | |||
356 | } | 361 | } |
357 | 362 | ||
358 | static struct flash_platform_data collie_flash_data = { | 363 | static struct flash_platform_data collie_flash_data = { |
359 | .map_name = "jedec_probe", | 364 | .map_name = "cfi_probe", |
360 | .init = collie_flash_init, | 365 | .init = collie_flash_init, |
361 | .set_vpp = collie_set_vpp, | 366 | .set_vpp = collie_set_vpp, |
362 | .exit = collie_flash_exit, | 367 | .exit = collie_flash_exit, |
diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig index dbd954e61aa7..4508643cca32 100644 --- a/arch/arm/mach-shmobile/Kconfig +++ b/arch/arm/mach-shmobile/Kconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | config ARCH_SHMOBILE | 1 | config ARCH_SHMOBILE |
2 | bool | 2 | bool |
3 | 3 | ||
4 | config ARCH_SHMOBILE_MULTI | 4 | menuconfig ARCH_SHMOBILE_MULTI |
5 | bool "Renesas ARM SoCs" if ARCH_MULTI_V7 | 5 | bool "Renesas ARM SoCs" if ARCH_MULTI_V7 |
6 | depends on MMU | 6 | depends on MMU |
7 | select ARCH_SHMOBILE | 7 | select ARCH_SHMOBILE |
@@ -12,10 +12,11 @@ config ARCH_SHMOBILE_MULTI | |||
12 | select NO_IOPORT_MAP | 12 | select NO_IOPORT_MAP |
13 | select PINCTRL | 13 | select PINCTRL |
14 | select ARCH_REQUIRE_GPIOLIB | 14 | select ARCH_REQUIRE_GPIOLIB |
15 | select ARCH_HAS_OPP | ||
15 | 16 | ||
16 | if ARCH_SHMOBILE_MULTI | 17 | if ARCH_SHMOBILE_MULTI |
17 | 18 | ||
18 | comment "Renesas ARM SoCs System Type" | 19 | #comment "Renesas ARM SoCs System Type" |
19 | 20 | ||
20 | config ARCH_EMEV2 | 21 | config ARCH_EMEV2 |
21 | bool "Emma Mobile EV2" | 22 | bool "Emma Mobile EV2" |
@@ -25,6 +26,11 @@ config ARCH_R7S72100 | |||
25 | bool "RZ/A1H (R7S72100)" | 26 | bool "RZ/A1H (R7S72100)" |
26 | select SYS_SUPPORTS_SH_MTU2 | 27 | select SYS_SUPPORTS_SH_MTU2 |
27 | 28 | ||
29 | config ARCH_R8A7779 | ||
30 | bool "R-Car H1 (R8A77790)" | ||
31 | select RENESAS_INTC_IRQPIN | ||
32 | select SYS_SUPPORTS_SH_TMU | ||
33 | |||
28 | config ARCH_R8A7790 | 34 | config ARCH_R8A7790 |
29 | bool "R-Car H2 (R8A77900)" | 35 | bool "R-Car H2 (R8A77900)" |
30 | select RENESAS_IRQC | 36 | select RENESAS_IRQC |
@@ -51,6 +57,11 @@ config MACH_LAGER | |||
51 | depends on ARCH_R8A7790 | 57 | depends on ARCH_R8A7790 |
52 | select MICREL_PHY if SH_ETH | 58 | select MICREL_PHY if SH_ETH |
53 | 59 | ||
60 | config MACH_MARZEN | ||
61 | bool "MARZEN board" | ||
62 | depends on ARCH_R8A7779 | ||
63 | select REGULATOR_FIXED_VOLTAGE if REGULATOR | ||
64 | |||
54 | comment "Renesas ARM SoCs System Configuration" | 65 | comment "Renesas ARM SoCs System Configuration" |
55 | endif | 66 | endif |
56 | 67 | ||
@@ -85,7 +96,6 @@ config ARCH_R8A73A4 | |||
85 | select CPU_V7 | 96 | select CPU_V7 |
86 | select SH_CLK_CPG | 97 | select SH_CLK_CPG |
87 | select RENESAS_IRQC | 98 | select RENESAS_IRQC |
88 | select ARCH_HAS_CPUFREQ | ||
89 | select ARCH_HAS_OPP | 99 | select ARCH_HAS_OPP |
90 | select SYS_SUPPORTS_SH_CMT | 100 | select SYS_SUPPORTS_SH_CMT |
91 | select SYS_SUPPORTS_SH_TMU | 101 | select SYS_SUPPORTS_SH_TMU |
@@ -235,19 +245,6 @@ config MACH_MARZEN | |||
235 | select REGULATOR_FIXED_VOLTAGE if REGULATOR | 245 | select REGULATOR_FIXED_VOLTAGE if REGULATOR |
236 | select USE_OF | 246 | select USE_OF |
237 | 247 | ||
238 | config MACH_MARZEN_REFERENCE | ||
239 | bool "MARZEN board - Reference Device Tree Implementation" | ||
240 | depends on ARCH_R8A7779 | ||
241 | select ARCH_REQUIRE_GPIOLIB | ||
242 | select REGULATOR_FIXED_VOLTAGE if REGULATOR | ||
243 | select USE_OF | ||
244 | ---help--- | ||
245 | Use reference implementation of Marzen board support | ||
246 | which makes use of device tree at the expense | ||
247 | of not supporting a number of devices. | ||
248 | |||
249 | This is intended to aid developers | ||
250 | |||
251 | config MACH_LAGER | 248 | config MACH_LAGER |
252 | bool "Lager board" | 249 | bool "Lager board" |
253 | depends on ARCH_R8A7790 | 250 | depends on ARCH_R8A7790 |
@@ -264,7 +261,6 @@ config MACH_KOELSCH | |||
264 | config MACH_KZM9G | 261 | config MACH_KZM9G |
265 | bool "KZM-A9-GT board" | 262 | bool "KZM-A9-GT board" |
266 | depends on ARCH_SH73A0 | 263 | depends on ARCH_SH73A0 |
267 | select ARCH_HAS_CPUFREQ | ||
268 | select ARCH_HAS_OPP | 264 | select ARCH_HAS_OPP |
269 | select ARCH_REQUIRE_GPIOLIB | 265 | select ARCH_REQUIRE_GPIOLIB |
270 | select REGULATOR_FIXED_VOLTAGE if REGULATOR | 266 | select REGULATOR_FIXED_VOLTAGE if REGULATOR |
diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile index 38d5fe825e93..fe3878a1a69a 100644 --- a/arch/arm/mach-shmobile/Makefile +++ b/arch/arm/mach-shmobile/Makefile | |||
@@ -34,31 +34,39 @@ obj-$(CONFIG_ARCH_R8A7791) += clock-r8a7791.o | |||
34 | obj-$(CONFIG_ARCH_R7S72100) += clock-r7s72100.o | 34 | obj-$(CONFIG_ARCH_R7S72100) += clock-r7s72100.o |
35 | endif | 35 | endif |
36 | 36 | ||
37 | # CPU reset vector handling objects | ||
38 | cpu-y := platsmp.o headsmp.o | ||
39 | cpu-$(CONFIG_ARCH_R8A7790) += platsmp-apmu.o | ||
40 | cpu-$(CONFIG_ARCH_R8A7791) += platsmp-apmu.o | ||
41 | |||
37 | # SMP objects | 42 | # SMP objects |
38 | smp-y := platsmp.o headsmp.o | 43 | smp-y := $(cpu-y) |
39 | smp-$(CONFIG_ARCH_SH73A0) += smp-sh73a0.o headsmp-scu.o platsmp-scu.o | 44 | smp-$(CONFIG_ARCH_SH73A0) += smp-sh73a0.o headsmp-scu.o platsmp-scu.o |
40 | smp-$(CONFIG_ARCH_R8A7779) += smp-r8a7779.o headsmp-scu.o platsmp-scu.o | 45 | smp-$(CONFIG_ARCH_R8A7779) += smp-r8a7779.o headsmp-scu.o platsmp-scu.o |
41 | smp-$(CONFIG_ARCH_R8A7790) += smp-r8a7790.o platsmp-apmu.o | 46 | smp-$(CONFIG_ARCH_R8A7790) += smp-r8a7790.o |
42 | smp-$(CONFIG_ARCH_R8A7791) += smp-r8a7791.o platsmp-apmu.o | 47 | smp-$(CONFIG_ARCH_R8A7791) += smp-r8a7791.o |
43 | smp-$(CONFIG_ARCH_EMEV2) += smp-emev2.o headsmp-scu.o platsmp-scu.o | 48 | smp-$(CONFIG_ARCH_EMEV2) += smp-emev2.o headsmp-scu.o platsmp-scu.o |
44 | 49 | ||
45 | # IRQ objects | ||
46 | obj-$(CONFIG_ARCH_SH7372) += entry-intc.o | ||
47 | |||
48 | # PM objects | 50 | # PM objects |
49 | obj-$(CONFIG_SUSPEND) += suspend.o | 51 | obj-$(CONFIG_SUSPEND) += suspend.o |
50 | obj-$(CONFIG_CPU_IDLE) += cpuidle.o | 52 | obj-$(CONFIG_CPU_IDLE) += cpuidle.o |
53 | obj-$(CONFIG_CPU_FREQ) += cpufreq.o | ||
51 | obj-$(CONFIG_ARCH_SH7372) += pm-sh7372.o sleep-sh7372.o pm-rmobile.o | 54 | obj-$(CONFIG_ARCH_SH7372) += pm-sh7372.o sleep-sh7372.o pm-rmobile.o |
52 | obj-$(CONFIG_ARCH_SH73A0) += pm-sh73a0.o | 55 | obj-$(CONFIG_ARCH_SH73A0) += pm-sh73a0.o |
53 | obj-$(CONFIG_ARCH_R8A7740) += pm-r8a7740.o pm-rmobile.o | 56 | obj-$(CONFIG_ARCH_R8A7740) += pm-r8a7740.o pm-rmobile.o |
54 | obj-$(CONFIG_ARCH_R8A7779) += pm-r8a7779.o pm-rcar.o | 57 | obj-$(CONFIG_ARCH_R8A7779) += pm-r8a7779.o pm-rcar.o |
55 | obj-$(CONFIG_ARCH_R8A7790) += pm-r8a7790.o pm-rcar.o | 58 | obj-$(CONFIG_ARCH_R8A7790) += pm-r8a7790.o pm-rcar.o $(cpu-y) |
59 | obj-$(CONFIG_ARCH_R8A7791) += pm-r8a7791.o pm-rcar.o $(cpu-y) | ||
60 | |||
61 | # IRQ objects | ||
62 | obj-$(CONFIG_ARCH_SH7372) += entry-intc.o | ||
56 | 63 | ||
57 | # Board objects | 64 | # Board objects |
58 | ifdef CONFIG_ARCH_SHMOBILE_MULTI | 65 | ifdef CONFIG_ARCH_SHMOBILE_MULTI |
59 | obj-$(CONFIG_MACH_GENMAI) += board-genmai-reference.o | 66 | obj-$(CONFIG_MACH_GENMAI) += board-genmai-reference.o |
60 | obj-$(CONFIG_MACH_KOELSCH) += board-koelsch-reference.o | 67 | obj-$(CONFIG_MACH_KOELSCH) += board-koelsch-reference.o |
61 | obj-$(CONFIG_MACH_LAGER) += board-lager-reference.o | 68 | obj-$(CONFIG_MACH_LAGER) += board-lager-reference.o |
69 | obj-$(CONFIG_MACH_MARZEN) += board-marzen-reference.o | ||
62 | else | 70 | else |
63 | obj-$(CONFIG_MACH_APE6EVM) += board-ape6evm.o | 71 | obj-$(CONFIG_MACH_APE6EVM) += board-ape6evm.o |
64 | obj-$(CONFIG_MACH_APE6EVM_REFERENCE) += board-ape6evm-reference.o | 72 | obj-$(CONFIG_MACH_APE6EVM_REFERENCE) += board-ape6evm-reference.o |
@@ -67,7 +75,6 @@ obj-$(CONFIG_MACH_BOCKW) += board-bockw.o | |||
67 | obj-$(CONFIG_MACH_BOCKW_REFERENCE) += board-bockw-reference.o | 75 | obj-$(CONFIG_MACH_BOCKW_REFERENCE) += board-bockw-reference.o |
68 | obj-$(CONFIG_MACH_GENMAI) += board-genmai.o | 76 | obj-$(CONFIG_MACH_GENMAI) += board-genmai.o |
69 | obj-$(CONFIG_MACH_MARZEN) += board-marzen.o | 77 | obj-$(CONFIG_MACH_MARZEN) += board-marzen.o |
70 | obj-$(CONFIG_MACH_MARZEN_REFERENCE) += board-marzen-reference.o | ||
71 | obj-$(CONFIG_MACH_LAGER) += board-lager.o | 78 | obj-$(CONFIG_MACH_LAGER) += board-lager.o |
72 | obj-$(CONFIG_MACH_ARMADILLO800EVA) += board-armadillo800eva.o | 79 | obj-$(CONFIG_MACH_ARMADILLO800EVA) += board-armadillo800eva.o |
73 | obj-$(CONFIG_MACH_ARMADILLO800EVA_REFERENCE) += board-armadillo800eva-reference.o | 80 | obj-$(CONFIG_MACH_ARMADILLO800EVA_REFERENCE) += board-armadillo800eva-reference.o |
diff --git a/arch/arm/mach-shmobile/Makefile.boot b/arch/arm/mach-shmobile/Makefile.boot index 918fccffa1b6..ebf97d4bcfd8 100644 --- a/arch/arm/mach-shmobile/Makefile.boot +++ b/arch/arm/mach-shmobile/Makefile.boot | |||
@@ -13,7 +13,6 @@ loadaddr-$(CONFIG_MACH_KZM9G_REFERENCE) += 0x41008000 | |||
13 | loadaddr-$(CONFIG_MACH_LAGER) += 0x40008000 | 13 | loadaddr-$(CONFIG_MACH_LAGER) += 0x40008000 |
14 | loadaddr-$(CONFIG_MACH_MACKEREL) += 0x40008000 | 14 | loadaddr-$(CONFIG_MACH_MACKEREL) += 0x40008000 |
15 | loadaddr-$(CONFIG_MACH_MARZEN) += 0x60008000 | 15 | loadaddr-$(CONFIG_MACH_MARZEN) += 0x60008000 |
16 | loadaddr-$(CONFIG_MACH_MARZEN_REFERENCE) += 0x60008000 | ||
17 | 16 | ||
18 | __ZRELADDR := $(sort $(loadaddr-y)) | 17 | __ZRELADDR := $(sort $(loadaddr-y)) |
19 | zreladdr-y += $(__ZRELADDR) | 18 | zreladdr-y += $(__ZRELADDR) |
diff --git a/arch/arm/mach-shmobile/board-ape6evm-reference.c b/arch/arm/mach-shmobile/board-ape6evm-reference.c index 3276afcf3cc9..2f7723e5fe91 100644 --- a/arch/arm/mach-shmobile/board-ape6evm-reference.c +++ b/arch/arm/mach-shmobile/board-ape6evm-reference.c | |||
@@ -24,11 +24,13 @@ | |||
24 | #include <linux/pinctrl/machine.h> | 24 | #include <linux/pinctrl/machine.h> |
25 | #include <linux/platform_device.h> | 25 | #include <linux/platform_device.h> |
26 | #include <linux/sh_clk.h> | 26 | #include <linux/sh_clk.h> |
27 | #include <mach/common.h> | 27 | |
28 | #include <mach/r8a73a4.h> | ||
29 | #include <asm/mach-types.h> | 28 | #include <asm/mach-types.h> |
30 | #include <asm/mach/arch.h> | 29 | #include <asm/mach/arch.h> |
31 | 30 | ||
31 | #include "common.h" | ||
32 | #include "r8a73a4.h" | ||
33 | |||
32 | static void __init ape6evm_add_standard_devices(void) | 34 | static void __init ape6evm_add_standard_devices(void) |
33 | { | 35 | { |
34 | 36 | ||
diff --git a/arch/arm/mach-shmobile/board-ape6evm.c b/arch/arm/mach-shmobile/board-ape6evm.c index fe071a9130b7..485567876d39 100644 --- a/arch/arm/mach-shmobile/board-ape6evm.c +++ b/arch/arm/mach-shmobile/board-ape6evm.c | |||
@@ -33,12 +33,14 @@ | |||
33 | #include <linux/regulator/machine.h> | 33 | #include <linux/regulator/machine.h> |
34 | #include <linux/sh_clk.h> | 34 | #include <linux/sh_clk.h> |
35 | #include <linux/smsc911x.h> | 35 | #include <linux/smsc911x.h> |
36 | #include <mach/common.h> | 36 | |
37 | #include <mach/irqs.h> | ||
38 | #include <mach/r8a73a4.h> | ||
39 | #include <asm/mach-types.h> | 37 | #include <asm/mach-types.h> |
40 | #include <asm/mach/arch.h> | 38 | #include <asm/mach/arch.h> |
41 | 39 | ||
40 | #include "common.h" | ||
41 | #include "irqs.h" | ||
42 | #include "r8a73a4.h" | ||
43 | |||
42 | /* LEDS */ | 44 | /* LEDS */ |
43 | static struct gpio_led ape6evm_leds[] = { | 45 | static struct gpio_led ape6evm_leds[] = { |
44 | { | 46 | { |
diff --git a/arch/arm/mach-shmobile/board-armadillo800eva-reference.c b/arch/arm/mach-shmobile/board-armadillo800eva-reference.c index f660fbb96e0b..208576667b22 100644 --- a/arch/arm/mach-shmobile/board-armadillo800eva-reference.c +++ b/arch/arm/mach-shmobile/board-armadillo800eva-reference.c | |||
@@ -24,11 +24,13 @@ | |||
24 | #include <linux/kernel.h> | 24 | #include <linux/kernel.h> |
25 | #include <linux/gpio.h> | 25 | #include <linux/gpio.h> |
26 | #include <linux/io.h> | 26 | #include <linux/io.h> |
27 | #include <mach/common.h> | 27 | |
28 | #include <mach/r8a7740.h> | ||
29 | #include <asm/mach/arch.h> | 28 | #include <asm/mach/arch.h> |
30 | #include <asm/hardware/cache-l2x0.h> | 29 | #include <asm/hardware/cache-l2x0.h> |
31 | 30 | ||
31 | #include "common.h" | ||
32 | #include "r8a7740.h" | ||
33 | |||
32 | /* | 34 | /* |
33 | * CON1 Camera Module | 35 | * CON1 Camera Module |
34 | * CON2 Extension Bus | 36 | * CON2 Extension Bus |
diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c index 30fcac73a540..32339cf6ee7b 100644 --- a/arch/arm/mach-shmobile/board-armadillo800eva.c +++ b/arch/arm/mach-shmobile/board-armadillo800eva.c | |||
@@ -45,9 +45,7 @@ | |||
45 | #include <linux/mmc/sh_mobile_sdhi.h> | 45 | #include <linux/mmc/sh_mobile_sdhi.h> |
46 | #include <linux/i2c-gpio.h> | 46 | #include <linux/i2c-gpio.h> |
47 | #include <linux/reboot.h> | 47 | #include <linux/reboot.h> |
48 | #include <mach/common.h> | 48 | |
49 | #include <mach/irqs.h> | ||
50 | #include <mach/r8a7740.h> | ||
51 | #include <media/mt9t112.h> | 49 | #include <media/mt9t112.h> |
52 | #include <media/sh_mobile_ceu.h> | 50 | #include <media/sh_mobile_ceu.h> |
53 | #include <media/soc_camera.h> | 51 | #include <media/soc_camera.h> |
@@ -62,6 +60,10 @@ | |||
62 | #include <sound/sh_fsi.h> | 60 | #include <sound/sh_fsi.h> |
63 | #include <sound/simple_card.h> | 61 | #include <sound/simple_card.h> |
64 | 62 | ||
63 | #include "common.h" | ||
64 | #include "irqs.h" | ||
65 | #include "pm-rmobile.h" | ||
66 | #include "r8a7740.h" | ||
65 | #include "sh-gpio.h" | 67 | #include "sh-gpio.h" |
66 | 68 | ||
67 | /* | 69 | /* |
diff --git a/arch/arm/mach-shmobile/board-bockw-reference.c b/arch/arm/mach-shmobile/board-bockw-reference.c index 027373f8de82..ba840cd333b9 100644 --- a/arch/arm/mach-shmobile/board-bockw-reference.c +++ b/arch/arm/mach-shmobile/board-bockw-reference.c | |||
@@ -19,10 +19,12 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/of_platform.h> | 21 | #include <linux/of_platform.h> |
22 | #include <mach/common.h> | 22 | |
23 | #include <mach/r8a7778.h> | ||
24 | #include <asm/mach/arch.h> | 23 | #include <asm/mach/arch.h> |
25 | 24 | ||
25 | #include "common.h" | ||
26 | #include "r8a7778.h" | ||
27 | |||
26 | /* | 28 | /* |
27 | * see board-bock.c for checking detail of dip-switch | 29 | * see board-bock.c for checking detail of dip-switch |
28 | */ | 30 | */ |
diff --git a/arch/arm/mach-shmobile/board-bockw.c b/arch/arm/mach-shmobile/board-bockw.c index f444be2f241e..b4e4789017bc 100644 --- a/arch/arm/mach-shmobile/board-bockw.c +++ b/arch/arm/mach-shmobile/board-bockw.c | |||
@@ -34,14 +34,16 @@ | |||
34 | #include <linux/spi/spi.h> | 34 | #include <linux/spi/spi.h> |
35 | #include <linux/spi/flash.h> | 35 | #include <linux/spi/flash.h> |
36 | #include <linux/usb/renesas_usbhs.h> | 36 | #include <linux/usb/renesas_usbhs.h> |
37 | |||
37 | #include <media/soc_camera.h> | 38 | #include <media/soc_camera.h> |
38 | #include <mach/common.h> | ||
39 | #include <mach/irqs.h> | ||
40 | #include <mach/r8a7778.h> | ||
41 | #include <asm/mach/arch.h> | 39 | #include <asm/mach/arch.h> |
42 | #include <sound/rcar_snd.h> | 40 | #include <sound/rcar_snd.h> |
43 | #include <sound/simple_card.h> | 41 | #include <sound/simple_card.h> |
44 | 42 | ||
43 | #include "common.h" | ||
44 | #include "irqs.h" | ||
45 | #include "r8a7778.h" | ||
46 | |||
45 | #define FPGA 0x18200000 | 47 | #define FPGA 0x18200000 |
46 | #define IRQ0MR 0x30 | 48 | #define IRQ0MR 0x30 |
47 | #define COMCTLR 0x101c | 49 | #define COMCTLR 0x101c |
diff --git a/arch/arm/mach-shmobile/board-genmai-reference.c b/arch/arm/mach-shmobile/board-genmai-reference.c index 2ff6ad6e608e..e5448f7b868a 100644 --- a/arch/arm/mach-shmobile/board-genmai-reference.c +++ b/arch/arm/mach-shmobile/board-genmai-reference.c | |||
@@ -20,12 +20,14 @@ | |||
20 | 20 | ||
21 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
22 | #include <linux/of_platform.h> | 22 | #include <linux/of_platform.h> |
23 | #include <mach/clock.h> | 23 | |
24 | #include <mach/common.h> | ||
25 | #include <mach/r7s72100.h> | ||
26 | #include <asm/mach-types.h> | 24 | #include <asm/mach-types.h> |
27 | #include <asm/mach/arch.h> | 25 | #include <asm/mach/arch.h> |
28 | 26 | ||
27 | #include "clock.h" | ||
28 | #include "common.h" | ||
29 | #include "r7s72100.h" | ||
30 | |||
29 | /* | 31 | /* |
30 | * This is a really crude hack to provide clkdev support to platform | 32 | * This is a really crude hack to provide clkdev support to platform |
31 | * devices until they get moved to DT. | 33 | * devices until they get moved to DT. |
@@ -47,7 +49,7 @@ static const char * const genmai_boards_compat_dt[] __initconst = { | |||
47 | }; | 49 | }; |
48 | 50 | ||
49 | DT_MACHINE_START(GENMAI_DT, "genmai") | 51 | DT_MACHINE_START(GENMAI_DT, "genmai") |
50 | .init_early = r7s72100_init_early, | 52 | .init_early = shmobile_init_delay, |
51 | .init_machine = genmai_add_standard_devices, | 53 | .init_machine = genmai_add_standard_devices, |
52 | .dt_compat = genmai_boards_compat_dt, | 54 | .dt_compat = genmai_boards_compat_dt, |
53 | MACHINE_END | 55 | MACHINE_END |
diff --git a/arch/arm/mach-shmobile/board-genmai.c b/arch/arm/mach-shmobile/board-genmai.c index c94201ee8596..e2a3ba4871c3 100644 --- a/arch/arm/mach-shmobile/board-genmai.c +++ b/arch/arm/mach-shmobile/board-genmai.c | |||
@@ -25,12 +25,14 @@ | |||
25 | #include <linux/sh_eth.h> | 25 | #include <linux/sh_eth.h> |
26 | #include <linux/spi/rspi.h> | 26 | #include <linux/spi/rspi.h> |
27 | #include <linux/spi/spi.h> | 27 | #include <linux/spi/spi.h> |
28 | #include <mach/common.h> | 28 | |
29 | #include <mach/irqs.h> | ||
30 | #include <mach/r7s72100.h> | ||
31 | #include <asm/mach-types.h> | 29 | #include <asm/mach-types.h> |
32 | #include <asm/mach/arch.h> | 30 | #include <asm/mach/arch.h> |
33 | 31 | ||
32 | #include "common.h" | ||
33 | #include "irqs.h" | ||
34 | #include "r7s72100.h" | ||
35 | |||
34 | /* Ether */ | 36 | /* Ether */ |
35 | static const struct sh_eth_plat_data ether_pdata __initconst = { | 37 | static const struct sh_eth_plat_data ether_pdata __initconst = { |
36 | .phy = 0x00, /* PD60610 */ | 38 | .phy = 0x00, /* PD60610 */ |
@@ -154,7 +156,7 @@ static const char * const genmai_boards_compat_dt[] __initconst = { | |||
154 | }; | 156 | }; |
155 | 157 | ||
156 | DT_MACHINE_START(GENMAI_DT, "genmai") | 158 | DT_MACHINE_START(GENMAI_DT, "genmai") |
157 | .init_early = r7s72100_init_early, | 159 | .init_early = shmobile_init_delay, |
158 | .init_machine = genmai_add_standard_devices, | 160 | .init_machine = genmai_add_standard_devices, |
159 | .dt_compat = genmai_boards_compat_dt, | 161 | .dt_compat = genmai_boards_compat_dt, |
160 | MACHINE_END | 162 | MACHINE_END |
diff --git a/arch/arm/mach-shmobile/board-koelsch-reference.c b/arch/arm/mach-shmobile/board-koelsch-reference.c index d322a162b4b0..0b1fb2345aa1 100644 --- a/arch/arm/mach-shmobile/board-koelsch-reference.c +++ b/arch/arm/mach-shmobile/board-koelsch-reference.c | |||
@@ -23,13 +23,15 @@ | |||
23 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
24 | #include <linux/of_platform.h> | 24 | #include <linux/of_platform.h> |
25 | #include <linux/platform_data/rcar-du.h> | 25 | #include <linux/platform_data/rcar-du.h> |
26 | #include <mach/clock.h> | 26 | |
27 | #include <mach/common.h> | ||
28 | #include <mach/irqs.h> | ||
29 | #include <mach/rcar-gen2.h> | ||
30 | #include <mach/r8a7791.h> | ||
31 | #include <asm/mach/arch.h> | 27 | #include <asm/mach/arch.h> |
32 | 28 | ||
29 | #include "clock.h" | ||
30 | #include "common.h" | ||
31 | #include "irqs.h" | ||
32 | #include "r8a7791.h" | ||
33 | #include "rcar-gen2.h" | ||
34 | |||
33 | /* DU */ | 35 | /* DU */ |
34 | static struct rcar_du_encoder_data koelsch_du_encoders[] = { | 36 | static struct rcar_du_encoder_data koelsch_du_encoders[] = { |
35 | { | 37 | { |
diff --git a/arch/arm/mach-shmobile/board-koelsch.c b/arch/arm/mach-shmobile/board-koelsch.c index c6c68892caa3..e698b90ae761 100644 --- a/arch/arm/mach-shmobile/board-koelsch.c +++ b/arch/arm/mach-shmobile/board-koelsch.c | |||
@@ -45,13 +45,15 @@ | |||
45 | #include <linux/spi/flash.h> | 45 | #include <linux/spi/flash.h> |
46 | #include <linux/spi/rspi.h> | 46 | #include <linux/spi/rspi.h> |
47 | #include <linux/spi/spi.h> | 47 | #include <linux/spi/spi.h> |
48 | #include <mach/common.h> | 48 | |
49 | #include <mach/irqs.h> | ||
50 | #include <mach/r8a7791.h> | ||
51 | #include <mach/rcar-gen2.h> | ||
52 | #include <asm/mach-types.h> | 49 | #include <asm/mach-types.h> |
53 | #include <asm/mach/arch.h> | 50 | #include <asm/mach/arch.h> |
54 | 51 | ||
52 | #include "common.h" | ||
53 | #include "irqs.h" | ||
54 | #include "r8a7791.h" | ||
55 | #include "rcar-gen2.h" | ||
56 | |||
55 | /* DU */ | 57 | /* DU */ |
56 | static struct rcar_du_encoder_data koelsch_du_encoders[] = { | 58 | static struct rcar_du_encoder_data koelsch_du_encoders[] = { |
57 | { | 59 | { |
diff --git a/arch/arm/mach-shmobile/board-kzm9g-reference.c b/arch/arm/mach-shmobile/board-kzm9g-reference.c index a735a1d80c28..5d2621f202d1 100644 --- a/arch/arm/mach-shmobile/board-kzm9g-reference.c +++ b/arch/arm/mach-shmobile/board-kzm9g-reference.c | |||
@@ -25,12 +25,14 @@ | |||
25 | #include <linux/irq.h> | 25 | #include <linux/irq.h> |
26 | #include <linux/input.h> | 26 | #include <linux/input.h> |
27 | #include <linux/of_platform.h> | 27 | #include <linux/of_platform.h> |
28 | #include <mach/sh73a0.h> | 28 | |
29 | #include <mach/common.h> | ||
30 | #include <asm/hardware/cache-l2x0.h> | 29 | #include <asm/hardware/cache-l2x0.h> |
31 | #include <asm/mach-types.h> | 30 | #include <asm/mach-types.h> |
32 | #include <asm/mach/arch.h> | 31 | #include <asm/mach/arch.h> |
33 | 32 | ||
33 | #include "common.h" | ||
34 | #include "sh73a0.h" | ||
35 | |||
34 | static void __init kzm_init(void) | 36 | static void __init kzm_init(void) |
35 | { | 37 | { |
36 | sh73a0_add_standard_devices_dt(); | 38 | sh73a0_add_standard_devices_dt(); |
diff --git a/arch/arm/mach-shmobile/board-kzm9g.c b/arch/arm/mach-shmobile/board-kzm9g.c index f94ec8ca42c1..1320e9d063b1 100644 --- a/arch/arm/mach-shmobile/board-kzm9g.c +++ b/arch/arm/mach-shmobile/board-kzm9g.c | |||
@@ -41,16 +41,18 @@ | |||
41 | #include <linux/usb/r8a66597.h> | 41 | #include <linux/usb/r8a66597.h> |
42 | #include <linux/usb/renesas_usbhs.h> | 42 | #include <linux/usb/renesas_usbhs.h> |
43 | #include <linux/videodev2.h> | 43 | #include <linux/videodev2.h> |
44 | |||
44 | #include <sound/sh_fsi.h> | 45 | #include <sound/sh_fsi.h> |
45 | #include <sound/simple_card.h> | 46 | #include <sound/simple_card.h> |
46 | #include <mach/irqs.h> | ||
47 | #include <mach/sh73a0.h> | ||
48 | #include <mach/common.h> | ||
49 | #include <asm/hardware/cache-l2x0.h> | 47 | #include <asm/hardware/cache-l2x0.h> |
50 | #include <asm/mach-types.h> | 48 | #include <asm/mach-types.h> |
51 | #include <asm/mach/arch.h> | 49 | #include <asm/mach/arch.h> |
52 | #include <video/sh_mobile_lcdc.h> | 50 | #include <video/sh_mobile_lcdc.h> |
53 | 51 | ||
52 | #include "common.h" | ||
53 | #include "irqs.h" | ||
54 | #include "sh73a0.h" | ||
55 | |||
54 | /* | 56 | /* |
55 | * external GPIO | 57 | * external GPIO |
56 | */ | 58 | */ |
diff --git a/arch/arm/mach-shmobile/board-lager-reference.c b/arch/arm/mach-shmobile/board-lager-reference.c index 749832e3f33c..8dcff51a8f45 100644 --- a/arch/arm/mach-shmobile/board-lager-reference.c +++ b/arch/arm/mach-shmobile/board-lager-reference.c | |||
@@ -22,13 +22,15 @@ | |||
22 | #include <linux/init.h> | 22 | #include <linux/init.h> |
23 | #include <linux/of_platform.h> | 23 | #include <linux/of_platform.h> |
24 | #include <linux/platform_data/rcar-du.h> | 24 | #include <linux/platform_data/rcar-du.h> |
25 | #include <mach/clock.h> | 25 | |
26 | #include <mach/common.h> | ||
27 | #include <mach/irqs.h> | ||
28 | #include <mach/rcar-gen2.h> | ||
29 | #include <mach/r8a7790.h> | ||
30 | #include <asm/mach/arch.h> | 26 | #include <asm/mach/arch.h> |
31 | 27 | ||
28 | #include "clock.h" | ||
29 | #include "common.h" | ||
30 | #include "irqs.h" | ||
31 | #include "r8a7790.h" | ||
32 | #include "rcar-gen2.h" | ||
33 | |||
32 | /* DU */ | 34 | /* DU */ |
33 | static struct rcar_du_encoder_data lager_du_encoders[] = { | 35 | static struct rcar_du_encoder_data lager_du_encoders[] = { |
34 | { | 36 | { |
@@ -129,7 +131,7 @@ static const char *lager_boards_compat_dt[] __initdata = { | |||
129 | 131 | ||
130 | DT_MACHINE_START(LAGER_DT, "lager") | 132 | DT_MACHINE_START(LAGER_DT, "lager") |
131 | .smp = smp_ops(r8a7790_smp_ops), | 133 | .smp = smp_ops(r8a7790_smp_ops), |
132 | .init_early = r8a7790_init_early, | 134 | .init_early = shmobile_init_delay, |
133 | .init_time = rcar_gen2_timer_init, | 135 | .init_time = rcar_gen2_timer_init, |
134 | .init_machine = lager_add_standard_devices, | 136 | .init_machine = lager_add_standard_devices, |
135 | .init_late = shmobile_init_late, | 137 | .init_late = shmobile_init_late, |
diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c index f8b1e05463cc..bfd9e4846fc9 100644 --- a/arch/arm/mach-shmobile/board-lager.c +++ b/arch/arm/mach-shmobile/board-lager.c | |||
@@ -31,6 +31,8 @@ | |||
31 | #include <linux/mmc/host.h> | 31 | #include <linux/mmc/host.h> |
32 | #include <linux/mmc/sh_mmcif.h> | 32 | #include <linux/mmc/sh_mmcif.h> |
33 | #include <linux/mmc/sh_mobile_sdhi.h> | 33 | #include <linux/mmc/sh_mobile_sdhi.h> |
34 | #include <linux/mtd/partitions.h> | ||
35 | #include <linux/mtd/mtd.h> | ||
34 | #include <linux/pinctrl/machine.h> | 36 | #include <linux/pinctrl/machine.h> |
35 | #include <linux/platform_data/camera-rcar.h> | 37 | #include <linux/platform_data/camera-rcar.h> |
36 | #include <linux/platform_data/gpio-rcar.h> | 38 | #include <linux/platform_data/gpio-rcar.h> |
@@ -43,22 +45,23 @@ | |||
43 | #include <linux/regulator/gpio-regulator.h> | 45 | #include <linux/regulator/gpio-regulator.h> |
44 | #include <linux/regulator/machine.h> | 46 | #include <linux/regulator/machine.h> |
45 | #include <linux/sh_eth.h> | 47 | #include <linux/sh_eth.h> |
48 | #include <linux/spi/flash.h> | ||
49 | #include <linux/spi/rspi.h> | ||
50 | #include <linux/spi/spi.h> | ||
46 | #include <linux/usb/phy.h> | 51 | #include <linux/usb/phy.h> |
47 | #include <linux/usb/renesas_usbhs.h> | 52 | #include <linux/usb/renesas_usbhs.h> |
48 | #include <mach/common.h> | 53 | |
49 | #include <mach/irqs.h> | ||
50 | #include <mach/r8a7790.h> | ||
51 | #include <media/soc_camera.h> | 54 | #include <media/soc_camera.h> |
52 | #include <asm/mach-types.h> | 55 | #include <asm/mach-types.h> |
53 | #include <asm/mach/arch.h> | 56 | #include <asm/mach/arch.h> |
54 | #include <linux/mtd/partitions.h> | ||
55 | #include <linux/mtd/mtd.h> | ||
56 | #include <linux/spi/flash.h> | ||
57 | #include <linux/spi/rspi.h> | ||
58 | #include <linux/spi/spi.h> | ||
59 | #include <sound/rcar_snd.h> | 57 | #include <sound/rcar_snd.h> |
60 | #include <sound/simple_card.h> | 58 | #include <sound/simple_card.h> |
61 | 59 | ||
60 | #include "common.h" | ||
61 | #include "irqs.h" | ||
62 | #include "r8a7790.h" | ||
63 | #include "rcar-gen2.h" | ||
64 | |||
62 | /* | 65 | /* |
63 | * SSI-AK4643 | 66 | * SSI-AK4643 |
64 | * | 67 | * |
@@ -886,7 +889,7 @@ static const char * const lager_boards_compat_dt[] __initconst = { | |||
886 | 889 | ||
887 | DT_MACHINE_START(LAGER_DT, "lager") | 890 | DT_MACHINE_START(LAGER_DT, "lager") |
888 | .smp = smp_ops(r8a7790_smp_ops), | 891 | .smp = smp_ops(r8a7790_smp_ops), |
889 | .init_early = r8a7790_init_early, | 892 | .init_early = shmobile_init_delay, |
890 | .init_time = rcar_gen2_timer_init, | 893 | .init_time = rcar_gen2_timer_init, |
891 | .init_machine = lager_init, | 894 | .init_machine = lager_init, |
892 | .init_late = shmobile_init_late, | 895 | .init_late = shmobile_init_late, |
diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c index 0ff4d8e45cf7..304b76f3bf4a 100644 --- a/arch/arm/mach-shmobile/board-mackerel.c +++ b/arch/arm/mach-shmobile/board-mackerel.c | |||
@@ -47,10 +47,11 @@ | |||
47 | #include <linux/regulator/fixed.h> | 47 | #include <linux/regulator/fixed.h> |
48 | #include <linux/regulator/machine.h> | 48 | #include <linux/regulator/machine.h> |
49 | #include <linux/smsc911x.h> | 49 | #include <linux/smsc911x.h> |
50 | #include <linux/sh_intc.h> | 50 | #include <linux/sh_clk.h> |
51 | #include <linux/tca6416_keypad.h> | 51 | #include <linux/tca6416_keypad.h> |
52 | #include <linux/usb/renesas_usbhs.h> | 52 | #include <linux/usb/renesas_usbhs.h> |
53 | #include <linux/dma-mapping.h> | 53 | #include <linux/dma-mapping.h> |
54 | |||
54 | #include <video/sh_mobile_hdmi.h> | 55 | #include <video/sh_mobile_hdmi.h> |
55 | #include <video/sh_mobile_lcdc.h> | 56 | #include <video/sh_mobile_lcdc.h> |
56 | #include <media/sh_mobile_ceu.h> | 57 | #include <media/sh_mobile_ceu.h> |
@@ -58,15 +59,14 @@ | |||
58 | #include <media/soc_camera_platform.h> | 59 | #include <media/soc_camera_platform.h> |
59 | #include <sound/sh_fsi.h> | 60 | #include <sound/sh_fsi.h> |
60 | #include <sound/simple_card.h> | 61 | #include <sound/simple_card.h> |
61 | |||
62 | #include <mach/common.h> | ||
63 | #include <mach/irqs.h> | ||
64 | #include <mach/sh7372.h> | ||
65 | |||
66 | #include <asm/mach/arch.h> | 62 | #include <asm/mach/arch.h> |
67 | #include <asm/mach-types.h> | 63 | #include <asm/mach-types.h> |
68 | 64 | ||
65 | #include "common.h" | ||
66 | #include "irqs.h" | ||
67 | #include "pm-rmobile.h" | ||
69 | #include "sh-gpio.h" | 68 | #include "sh-gpio.h" |
69 | #include "sh7372.h" | ||
70 | 70 | ||
71 | /* | 71 | /* |
72 | * Address Interface BusWidth note | 72 | * Address Interface BusWidth note |
diff --git a/arch/arm/mach-shmobile/board-marzen-reference.c b/arch/arm/mach-shmobile/board-marzen-reference.c index 2773936bf7dc..21b3e1ca2261 100644 --- a/arch/arm/mach-shmobile/board-marzen-reference.c +++ b/arch/arm/mach-shmobile/board-marzen-reference.c | |||
@@ -19,19 +19,42 @@ | |||
19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | 19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <mach/r8a7779.h> | 22 | #include <linux/clk/shmobile.h> |
23 | #include <mach/common.h> | 23 | #include <linux/clocksource.h> |
24 | #include <mach/irqs.h> | 24 | #include <linux/of_platform.h> |
25 | |||
25 | #include <asm/irq.h> | 26 | #include <asm/irq.h> |
26 | #include <asm/mach/arch.h> | 27 | #include <asm/mach/arch.h> |
27 | 28 | ||
29 | #include "clock.h" | ||
30 | #include "common.h" | ||
31 | #include "irqs.h" | ||
32 | #include "r8a7779.h" | ||
33 | |||
34 | static void __init marzen_init_timer(void) | ||
35 | { | ||
36 | r8a7779_clocks_init(r8a7779_read_mode_pins()); | ||
37 | clocksource_of_init(); | ||
38 | } | ||
39 | |||
40 | /* | ||
41 | * This is a really crude hack to provide clkdev support to platform | ||
42 | * devices until they get moved to DT. | ||
43 | */ | ||
44 | static const struct clk_name clk_names[] __initconst = { | ||
45 | { "tmu0", "fck", "sh-tmu.0" }, | ||
46 | }; | ||
47 | |||
28 | static void __init marzen_init(void) | 48 | static void __init marzen_init(void) |
29 | { | 49 | { |
50 | shmobile_clk_workaround(clk_names, ARRAY_SIZE(clk_names), false); | ||
30 | r8a7779_add_standard_devices_dt(); | 51 | r8a7779_add_standard_devices_dt(); |
52 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | ||
31 | r8a7779_init_irq_extpin_dt(1); /* IRQ1 as individual interrupt */ | 53 | r8a7779_init_irq_extpin_dt(1); /* IRQ1 as individual interrupt */ |
32 | } | 54 | } |
33 | 55 | ||
34 | static const char *marzen_boards_compat_dt[] __initdata = { | 56 | static const char *marzen_boards_compat_dt[] __initdata = { |
57 | "renesas,marzen", | ||
35 | "renesas,marzen-reference", | 58 | "renesas,marzen-reference", |
36 | NULL, | 59 | NULL, |
37 | }; | 60 | }; |
@@ -39,7 +62,8 @@ static const char *marzen_boards_compat_dt[] __initdata = { | |||
39 | DT_MACHINE_START(MARZEN, "marzen") | 62 | DT_MACHINE_START(MARZEN, "marzen") |
40 | .smp = smp_ops(r8a7779_smp_ops), | 63 | .smp = smp_ops(r8a7779_smp_ops), |
41 | .map_io = r8a7779_map_io, | 64 | .map_io = r8a7779_map_io, |
42 | .init_early = r8a7779_init_delay, | 65 | .init_early = shmobile_init_delay, |
66 | .init_time = marzen_init_timer, | ||
43 | .nr_irqs = NR_IRQS_LEGACY, | 67 | .nr_irqs = NR_IRQS_LEGACY, |
44 | .init_irq = r8a7779_init_irq_dt, | 68 | .init_irq = r8a7779_init_irq_dt, |
45 | .init_machine = marzen_init, | 69 | .init_machine = marzen_init, |
diff --git a/arch/arm/mach-shmobile/board-marzen.c b/arch/arm/mach-shmobile/board-marzen.c index d832a4477b4b..25a1037e289d 100644 --- a/arch/arm/mach-shmobile/board-marzen.c +++ b/arch/arm/mach-shmobile/board-marzen.c | |||
@@ -41,14 +41,16 @@ | |||
41 | #include <linux/mmc/host.h> | 41 | #include <linux/mmc/host.h> |
42 | #include <linux/mmc/sh_mobile_sdhi.h> | 42 | #include <linux/mmc/sh_mobile_sdhi.h> |
43 | #include <linux/mfd/tmio.h> | 43 | #include <linux/mfd/tmio.h> |
44 | |||
44 | #include <media/soc_camera.h> | 45 | #include <media/soc_camera.h> |
45 | #include <mach/r8a7779.h> | ||
46 | #include <mach/common.h> | ||
47 | #include <mach/irqs.h> | ||
48 | #include <asm/mach-types.h> | 46 | #include <asm/mach-types.h> |
49 | #include <asm/mach/arch.h> | 47 | #include <asm/mach/arch.h> |
50 | #include <asm/traps.h> | 48 | #include <asm/traps.h> |
51 | 49 | ||
50 | #include "common.h" | ||
51 | #include "irqs.h" | ||
52 | #include "r8a7779.h" | ||
53 | |||
52 | /* Fixed 3.3V regulator to be used by SDHI0 */ | 54 | /* Fixed 3.3V regulator to be used by SDHI0 */ |
53 | static struct regulator_consumer_supply fixed3v3_power_consumers[] = { | 55 | static struct regulator_consumer_supply fixed3v3_power_consumers[] = { |
54 | REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.0"), | 56 | REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.0"), |
diff --git a/arch/arm/mach-shmobile/clock-r7s72100.c b/arch/arm/mach-shmobile/clock-r7s72100.c index df187484de5d..3eb2ec401e0c 100644 --- a/arch/arm/mach-shmobile/clock-r7s72100.c +++ b/arch/arm/mach-shmobile/clock-r7s72100.c | |||
@@ -19,8 +19,9 @@ | |||
19 | #include <linux/io.h> | 19 | #include <linux/io.h> |
20 | #include <linux/sh_clk.h> | 20 | #include <linux/sh_clk.h> |
21 | #include <linux/clkdev.h> | 21 | #include <linux/clkdev.h> |
22 | #include <mach/common.h> | 22 | |
23 | #include <mach/r7s72100.h> | 23 | #include "common.h" |
24 | #include "r7s72100.h" | ||
24 | 25 | ||
25 | /* Frequency Control Registers */ | 26 | /* Frequency Control Registers */ |
26 | #define FRQCR 0xfcfe0010 | 27 | #define FRQCR 0xfcfe0010 |
diff --git a/arch/arm/mach-shmobile/clock-r8a73a4.c b/arch/arm/mach-shmobile/clock-r8a73a4.c index b5bc22c6a858..49d139748aa6 100644 --- a/arch/arm/mach-shmobile/clock-r8a73a4.c +++ b/arch/arm/mach-shmobile/clock-r8a73a4.c | |||
@@ -22,8 +22,8 @@ | |||
22 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
23 | #include <linux/sh_clk.h> | 23 | #include <linux/sh_clk.h> |
24 | #include <linux/clkdev.h> | 24 | #include <linux/clkdev.h> |
25 | #include <mach/clock.h> | 25 | #include "common.h" |
26 | #include <mach/common.h> | 26 | #include "clock.h" |
27 | 27 | ||
28 | #define CPG_BASE 0xe6150000 | 28 | #define CPG_BASE 0xe6150000 |
29 | #define CPG_LEN 0x270 | 29 | #define CPG_LEN 0x270 |
@@ -574,11 +574,17 @@ static struct clk_lookup lookups[] = { | |||
574 | 574 | ||
575 | /* MSTP */ | 575 | /* MSTP */ |
576 | CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP204]), | 576 | CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP204]), |
577 | CLKDEV_DEV_ID("e6c40000.serial", &mstp_clks[MSTP204]), | ||
577 | CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP203]), | 578 | CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP203]), |
579 | CLKDEV_DEV_ID("e6c50000.serial", &mstp_clks[MSTP203]), | ||
578 | CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP206]), | 580 | CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP206]), |
581 | CLKDEV_DEV_ID("e6c20000.serial", &mstp_clks[MSTP206]), | ||
579 | CLKDEV_DEV_ID("sh-sci.3", &mstp_clks[MSTP207]), | 582 | CLKDEV_DEV_ID("sh-sci.3", &mstp_clks[MSTP207]), |
583 | CLKDEV_DEV_ID("e6c30000.serial", &mstp_clks[MSTP207]), | ||
580 | CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP216]), | 584 | CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP216]), |
585 | CLKDEV_DEV_ID("e6ce0000.serial", &mstp_clks[MSTP216]), | ||
581 | CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP217]), | 586 | CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP217]), |
587 | CLKDEV_DEV_ID("e6cf0000.serial", &mstp_clks[MSTP217]), | ||
582 | CLKDEV_DEV_ID("sh-dma-engine.0", &mstp_clks[MSTP218]), | 588 | CLKDEV_DEV_ID("sh-dma-engine.0", &mstp_clks[MSTP218]), |
583 | CLKDEV_DEV_ID("e6700020.dma-controller", &mstp_clks[MSTP218]), | 589 | CLKDEV_DEV_ID("e6700020.dma-controller", &mstp_clks[MSTP218]), |
584 | CLKDEV_DEV_ID("rcar_thermal", &mstp_clks[MSTP522]), | 590 | CLKDEV_DEV_ID("rcar_thermal", &mstp_clks[MSTP522]), |
diff --git a/arch/arm/mach-shmobile/clock-r8a7740.c b/arch/arm/mach-shmobile/clock-r8a7740.c index 50931e3c97c7..a60c324df64e 100644 --- a/arch/arm/mach-shmobile/clock-r8a7740.c +++ b/arch/arm/mach-shmobile/clock-r8a7740.c | |||
@@ -22,9 +22,10 @@ | |||
22 | #include <linux/io.h> | 22 | #include <linux/io.h> |
23 | #include <linux/sh_clk.h> | 23 | #include <linux/sh_clk.h> |
24 | #include <linux/clkdev.h> | 24 | #include <linux/clkdev.h> |
25 | #include <mach/clock.h> | 25 | |
26 | #include <mach/common.h> | 26 | #include "clock.h" |
27 | #include <mach/r8a7740.h> | 27 | #include "common.h" |
28 | #include "r8a7740.h" | ||
28 | 29 | ||
29 | /* | 30 | /* |
30 | * | MDx | XTAL1/EXTAL1 | System | EXTALR | | 31 | * | MDx | XTAL1/EXTAL1 | System | EXTALR | |
@@ -555,27 +556,27 @@ static struct clk_lookup lookups[] = { | |||
555 | CLKDEV_DEV_ID("sh_mobile_ceu.1", &mstp_clks[MSTP128]), | 556 | CLKDEV_DEV_ID("sh_mobile_ceu.1", &mstp_clks[MSTP128]), |
556 | 557 | ||
557 | CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP200]), | 558 | CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP200]), |
558 | CLKDEV_DEV_ID("e6c80000.sci", &mstp_clks[MSTP200]), | 559 | CLKDEV_DEV_ID("e6c80000.serial", &mstp_clks[MSTP200]), |
559 | CLKDEV_DEV_ID("sh-sci.3", &mstp_clks[MSTP201]), | 560 | CLKDEV_DEV_ID("sh-sci.3", &mstp_clks[MSTP201]), |
560 | CLKDEV_DEV_ID("e6c70000.sci", &mstp_clks[MSTP201]), | 561 | CLKDEV_DEV_ID("e6c70000.serial", &mstp_clks[MSTP201]), |
561 | CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP202]), | 562 | CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP202]), |
562 | CLKDEV_DEV_ID("e6c60000.sci", &mstp_clks[MSTP202]), | 563 | CLKDEV_DEV_ID("e6c60000.serial", &mstp_clks[MSTP202]), |
563 | CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP203]), | 564 | CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP203]), |
564 | CLKDEV_DEV_ID("e6c50000.sci", &mstp_clks[MSTP203]), | 565 | CLKDEV_DEV_ID("e6c50000.serial", &mstp_clks[MSTP203]), |
565 | CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP204]), | 566 | CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP204]), |
566 | CLKDEV_DEV_ID("e6c40000.sci", &mstp_clks[MSTP204]), | 567 | CLKDEV_DEV_ID("e6c40000.serial", &mstp_clks[MSTP204]), |
567 | CLKDEV_DEV_ID("sh-sci.8", &mstp_clks[MSTP206]), | 568 | CLKDEV_DEV_ID("sh-sci.8", &mstp_clks[MSTP206]), |
568 | CLKDEV_DEV_ID("e6c30000.sci", &mstp_clks[MSTP206]), | 569 | CLKDEV_DEV_ID("e6c30000.serial", &mstp_clks[MSTP206]), |
569 | CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP207]), | 570 | CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP207]), |
570 | CLKDEV_DEV_ID("e6cb0000.sci", &mstp_clks[MSTP207]), | 571 | CLKDEV_DEV_ID("e6cb0000.serial", &mstp_clks[MSTP207]), |
571 | CLKDEV_DEV_ID("sh-dma-engine.3", &mstp_clks[MSTP214]), | 572 | CLKDEV_DEV_ID("sh-dma-engine.3", &mstp_clks[MSTP214]), |
572 | CLKDEV_DEV_ID("sh-dma-engine.2", &mstp_clks[MSTP216]), | 573 | CLKDEV_DEV_ID("sh-dma-engine.2", &mstp_clks[MSTP216]), |
573 | CLKDEV_DEV_ID("sh-dma-engine.1", &mstp_clks[MSTP217]), | 574 | CLKDEV_DEV_ID("sh-dma-engine.1", &mstp_clks[MSTP217]), |
574 | CLKDEV_DEV_ID("sh-dma-engine.0", &mstp_clks[MSTP218]), | 575 | CLKDEV_DEV_ID("sh-dma-engine.0", &mstp_clks[MSTP218]), |
575 | CLKDEV_DEV_ID("sh-sci.7", &mstp_clks[MSTP222]), | 576 | CLKDEV_DEV_ID("sh-sci.7", &mstp_clks[MSTP222]), |
576 | CLKDEV_DEV_ID("e6cd0000.sci", &mstp_clks[MSTP222]), | 577 | CLKDEV_DEV_ID("e6cd0000.serial", &mstp_clks[MSTP222]), |
577 | CLKDEV_DEV_ID("sh-sci.6", &mstp_clks[MSTP230]), | 578 | CLKDEV_DEV_ID("sh-sci.6", &mstp_clks[MSTP230]), |
578 | CLKDEV_DEV_ID("e6cc0000.sci", &mstp_clks[MSTP230]), | 579 | CLKDEV_DEV_ID("e6cc0000.serial", &mstp_clks[MSTP230]), |
579 | 580 | ||
580 | CLKDEV_DEV_ID("sh_fsi2", &mstp_clks[MSTP328]), | 581 | CLKDEV_DEV_ID("sh_fsi2", &mstp_clks[MSTP328]), |
581 | CLKDEV_DEV_ID("fe1f0000.sound", &mstp_clks[MSTP328]), | 582 | CLKDEV_DEV_ID("fe1f0000.sound", &mstp_clks[MSTP328]), |
diff --git a/arch/arm/mach-shmobile/clock-r8a7778.c b/arch/arm/mach-shmobile/clock-r8a7778.c index 13f8f3ab8840..95579073cfce 100644 --- a/arch/arm/mach-shmobile/clock-r8a7778.c +++ b/arch/arm/mach-shmobile/clock-r8a7778.c | |||
@@ -39,8 +39,8 @@ | |||
39 | #include <linux/io.h> | 39 | #include <linux/io.h> |
40 | #include <linux/sh_clk.h> | 40 | #include <linux/sh_clk.h> |
41 | #include <linux/clkdev.h> | 41 | #include <linux/clkdev.h> |
42 | #include <mach/clock.h> | 42 | #include "clock.h" |
43 | #include <mach/common.h> | 43 | #include "common.h" |
44 | 44 | ||
45 | #define MSTPCR0 IOMEM(0xffc80030) | 45 | #define MSTPCR0 IOMEM(0xffc80030) |
46 | #define MSTPCR1 IOMEM(0xffc80034) | 46 | #define MSTPCR1 IOMEM(0xffc80034) |
@@ -202,11 +202,17 @@ static struct clk_lookup lookups[] = { | |||
202 | CLKDEV_DEV_ID("i2c-rcar.3", &mstp_clks[MSTP027]), /* I2C3 */ | 202 | CLKDEV_DEV_ID("i2c-rcar.3", &mstp_clks[MSTP027]), /* I2C3 */ |
203 | CLKDEV_DEV_ID("ffc73000.i2c", &mstp_clks[MSTP027]), /* I2C3 */ | 203 | CLKDEV_DEV_ID("ffc73000.i2c", &mstp_clks[MSTP027]), /* I2C3 */ |
204 | CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP026]), /* SCIF0 */ | 204 | CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP026]), /* SCIF0 */ |
205 | CLKDEV_DEV_ID("ffe40000.serial", &mstp_clks[MSTP026]), /* SCIF0 */ | ||
205 | CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP025]), /* SCIF1 */ | 206 | CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP025]), /* SCIF1 */ |
207 | CLKDEV_DEV_ID("ffe41000.serial", &mstp_clks[MSTP025]), /* SCIF1 */ | ||
206 | CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP024]), /* SCIF2 */ | 208 | CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP024]), /* SCIF2 */ |
209 | CLKDEV_DEV_ID("ffe42000.serial", &mstp_clks[MSTP024]), /* SCIF2 */ | ||
207 | CLKDEV_DEV_ID("sh-sci.3", &mstp_clks[MSTP023]), /* SCIF3 */ | 210 | CLKDEV_DEV_ID("sh-sci.3", &mstp_clks[MSTP023]), /* SCIF3 */ |
211 | CLKDEV_DEV_ID("ffe43000.serial", &mstp_clks[MSTP023]), /* SCIF3 */ | ||
208 | CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP022]), /* SCIF4 */ | 212 | CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP022]), /* SCIF4 */ |
213 | CLKDEV_DEV_ID("ffe44000.serial", &mstp_clks[MSTP022]), /* SCIF4 */ | ||
209 | CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP021]), /* SCIF6 */ | 214 | CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP021]), /* SCIF6 */ |
215 | CLKDEV_DEV_ID("ffe45000.serial", &mstp_clks[MSTP021]), /* SCIF5 */ | ||
210 | CLKDEV_DEV_ID("sh-hspi.0", &mstp_clks[MSTP007]), /* HSPI0 */ | 216 | CLKDEV_DEV_ID("sh-hspi.0", &mstp_clks[MSTP007]), /* HSPI0 */ |
211 | CLKDEV_DEV_ID("fffc7000.spi", &mstp_clks[MSTP007]), /* HSPI0 */ | 217 | CLKDEV_DEV_ID("fffc7000.spi", &mstp_clks[MSTP007]), /* HSPI0 */ |
212 | CLKDEV_DEV_ID("sh-hspi.1", &mstp_clks[MSTP007]), /* HSPI1 */ | 218 | CLKDEV_DEV_ID("sh-hspi.1", &mstp_clks[MSTP007]), /* HSPI1 */ |
diff --git a/arch/arm/mach-shmobile/clock-r8a7779.c b/arch/arm/mach-shmobile/clock-r8a7779.c index a13298bd37a8..c51f9db3f66f 100644 --- a/arch/arm/mach-shmobile/clock-r8a7779.c +++ b/arch/arm/mach-shmobile/clock-r8a7779.c | |||
@@ -23,8 +23,11 @@ | |||
23 | #include <linux/io.h> | 23 | #include <linux/io.h> |
24 | #include <linux/sh_clk.h> | 24 | #include <linux/sh_clk.h> |
25 | #include <linux/clkdev.h> | 25 | #include <linux/clkdev.h> |
26 | #include <mach/clock.h> | 26 | #include <linux/sh_timer.h> |
27 | #include <mach/common.h> | 27 | |
28 | #include "clock.h" | ||
29 | #include "common.h" | ||
30 | #include "r8a7779.h" | ||
28 | 31 | ||
29 | /* | 32 | /* |
30 | * MD1 = 1 MD1 = 0 | 33 | * MD1 = 1 MD1 = 0 |
@@ -52,9 +55,6 @@ | |||
52 | #define MSTPCR3 IOMEM(0xffc8003c) | 55 | #define MSTPCR3 IOMEM(0xffc8003c) |
53 | #define MSTPSR1 IOMEM(0xffc80044) | 56 | #define MSTPSR1 IOMEM(0xffc80044) |
54 | 57 | ||
55 | #define MODEMR 0xffcc0020 | ||
56 | |||
57 | |||
58 | /* ioremap() through clock mapping mandatory to avoid | 58 | /* ioremap() through clock mapping mandatory to avoid |
59 | * collision with ARM coherent DMA virtual memory range. | 59 | * collision with ARM coherent DMA virtual memory range. |
60 | */ | 60 | */ |
@@ -207,14 +207,9 @@ static struct clk_lookup lookups[] = { | |||
207 | 207 | ||
208 | void __init r8a7779_clock_init(void) | 208 | void __init r8a7779_clock_init(void) |
209 | { | 209 | { |
210 | void __iomem *modemr = ioremap_nocache(MODEMR, PAGE_SIZE); | 210 | u32 mode = r8a7779_read_mode_pins(); |
211 | u32 mode; | ||
212 | int k, ret = 0; | 211 | int k, ret = 0; |
213 | 212 | ||
214 | BUG_ON(!modemr); | ||
215 | mode = ioread32(modemr); | ||
216 | iounmap(modemr); | ||
217 | |||
218 | if (mode & MD(1)) { | 213 | if (mode & MD(1)) { |
219 | plla_clk.rate = 1500000000; | 214 | plla_clk.rate = 1500000000; |
220 | 215 | ||
@@ -268,3 +263,13 @@ void __init r8a7779_clock_init(void) | |||
268 | else | 263 | else |
269 | panic("failed to setup r8a7779 clocks\n"); | 264 | panic("failed to setup r8a7779 clocks\n"); |
270 | } | 265 | } |
266 | |||
267 | /* do nothing for !CONFIG_SMP or !CONFIG_HAVE_TWD */ | ||
268 | void __init __weak r8a7779_register_twd(void) { } | ||
269 | |||
270 | void __init r8a7779_earlytimer_init(void) | ||
271 | { | ||
272 | r8a7779_clock_init(); | ||
273 | r8a7779_register_twd(); | ||
274 | shmobile_earlytimer_init(); | ||
275 | } | ||
diff --git a/arch/arm/mach-shmobile/clock-r8a7790.c b/arch/arm/mach-shmobile/clock-r8a7790.c index 296a057109e4..17435c1aa2fe 100644 --- a/arch/arm/mach-shmobile/clock-r8a7790.c +++ b/arch/arm/mach-shmobile/clock-r8a7790.c | |||
@@ -22,9 +22,11 @@ | |||
22 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
23 | #include <linux/sh_clk.h> | 23 | #include <linux/sh_clk.h> |
24 | #include <linux/clkdev.h> | 24 | #include <linux/clkdev.h> |
25 | #include <mach/clock.h> | 25 | |
26 | #include <mach/common.h> | 26 | #include "clock.h" |
27 | #include <mach/r8a7790.h> | 27 | #include "common.h" |
28 | #include "r8a7790.h" | ||
29 | #include "rcar-gen2.h" | ||
28 | 30 | ||
29 | /* | 31 | /* |
30 | * MD EXTAL PLL0 PLL1 PLL3 | 32 | * MD EXTAL PLL0 PLL1 PLL3 |
diff --git a/arch/arm/mach-shmobile/clock-r8a7791.c b/arch/arm/mach-shmobile/clock-r8a7791.c index e2fdfcc14436..10e193d707f5 100644 --- a/arch/arm/mach-shmobile/clock-r8a7791.c +++ b/arch/arm/mach-shmobile/clock-r8a7791.c | |||
@@ -23,9 +23,9 @@ | |||
23 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
24 | #include <linux/sh_clk.h> | 24 | #include <linux/sh_clk.h> |
25 | #include <linux/clkdev.h> | 25 | #include <linux/clkdev.h> |
26 | #include <mach/clock.h> | 26 | #include "clock.h" |
27 | #include <mach/common.h> | 27 | #include "common.h" |
28 | #include <mach/rcar-gen2.h> | 28 | #include "rcar-gen2.h" |
29 | 29 | ||
30 | /* | 30 | /* |
31 | * MD EXTAL PLL0 PLL1 PLL3 | 31 | * MD EXTAL PLL0 PLL1 PLL3 |
diff --git a/arch/arm/mach-shmobile/clock-sh7372.c b/arch/arm/mach-shmobile/clock-sh7372.c index d16d9ca7f79e..7071676145c4 100644 --- a/arch/arm/mach-shmobile/clock-sh7372.c +++ b/arch/arm/mach-shmobile/clock-sh7372.c | |||
@@ -21,8 +21,8 @@ | |||
21 | #include <linux/io.h> | 21 | #include <linux/io.h> |
22 | #include <linux/sh_clk.h> | 22 | #include <linux/sh_clk.h> |
23 | #include <linux/clkdev.h> | 23 | #include <linux/clkdev.h> |
24 | #include <mach/clock.h> | 24 | #include "clock.h" |
25 | #include <mach/common.h> | 25 | #include "common.h" |
26 | 26 | ||
27 | /* SH7372 registers */ | 27 | /* SH7372 registers */ |
28 | #define FRQCRA IOMEM(0xe6150000) | 28 | #define FRQCRA IOMEM(0xe6150000) |
diff --git a/arch/arm/mach-shmobile/clock-sh73a0.c b/arch/arm/mach-shmobile/clock-sh73a0.c index 0d9cd1fe0212..9433a4e2c88e 100644 --- a/arch/arm/mach-shmobile/clock-sh73a0.c +++ b/arch/arm/mach-shmobile/clock-sh73a0.c | |||
@@ -22,8 +22,8 @@ | |||
22 | #include <linux/sh_clk.h> | 22 | #include <linux/sh_clk.h> |
23 | #include <linux/clkdev.h> | 23 | #include <linux/clkdev.h> |
24 | #include <asm/processor.h> | 24 | #include <asm/processor.h> |
25 | #include <mach/clock.h> | 25 | #include "clock.h" |
26 | #include <mach/common.h> | 26 | #include "common.h" |
27 | 27 | ||
28 | #define FRQCRA IOMEM(0xe6150000) | 28 | #define FRQCRA IOMEM(0xe6150000) |
29 | #define FRQCRB IOMEM(0xe6150004) | 29 | #define FRQCRB IOMEM(0xe6150004) |
@@ -638,16 +638,25 @@ static struct clk_lookup lookups[] = { | |||
638 | CLKDEV_DEV_ID("e6820000.i2c", &mstp_clks[MSTP116]), /* I2C0 */ | 638 | CLKDEV_DEV_ID("e6820000.i2c", &mstp_clks[MSTP116]), /* I2C0 */ |
639 | CLKDEV_DEV_ID("sh_mobile_lcdc_fb.0", &mstp_clks[MSTP100]), /* LCDC0 */ | 639 | CLKDEV_DEV_ID("sh_mobile_lcdc_fb.0", &mstp_clks[MSTP100]), /* LCDC0 */ |
640 | CLKDEV_DEV_ID("sh-sci.7", &mstp_clks[MSTP219]), /* SCIFA7 */ | 640 | CLKDEV_DEV_ID("sh-sci.7", &mstp_clks[MSTP219]), /* SCIFA7 */ |
641 | CLKDEV_DEV_ID("e6cd0000.serial", &mstp_clks[MSTP219]), /* SCIFA7 */ | ||
641 | CLKDEV_DEV_ID("sh-dma-engine.0", &mstp_clks[MSTP218]), /* SY-DMAC */ | 642 | CLKDEV_DEV_ID("sh-dma-engine.0", &mstp_clks[MSTP218]), /* SY-DMAC */ |
642 | CLKDEV_DEV_ID("sh-dma-engine.1", &mstp_clks[MSTP217]), /* MP-DMAC */ | 643 | CLKDEV_DEV_ID("sh-dma-engine.1", &mstp_clks[MSTP217]), /* MP-DMAC */ |
643 | CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP207]), /* SCIFA5 */ | 644 | CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP207]), /* SCIFA5 */ |
645 | CLKDEV_DEV_ID("e6cb0000.serial", &mstp_clks[MSTP207]), /* SCIFA5 */ | ||
644 | CLKDEV_DEV_ID("sh-sci.8", &mstp_clks[MSTP206]), /* SCIFB */ | 646 | CLKDEV_DEV_ID("sh-sci.8", &mstp_clks[MSTP206]), /* SCIFB */ |
647 | CLKDEV_DEV_ID("0xe6c3000.serial", &mstp_clks[MSTP206]), /* SCIFB */ | ||
645 | CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP204]), /* SCIFA0 */ | 648 | CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP204]), /* SCIFA0 */ |
649 | CLKDEV_DEV_ID("e6c40000.serial", &mstp_clks[MSTP204]), /* SCIFA0 */ | ||
646 | CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP203]), /* SCIFA1 */ | 650 | CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP203]), /* SCIFA1 */ |
651 | CLKDEV_DEV_ID("e6c50000.serial", &mstp_clks[MSTP203]), /* SCIFA1 */ | ||
647 | CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP202]), /* SCIFA2 */ | 652 | CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP202]), /* SCIFA2 */ |
653 | CLKDEV_DEV_ID("e6c60000.serial", &mstp_clks[MSTP202]), /* SCIFA2 */ | ||
648 | CLKDEV_DEV_ID("sh-sci.3", &mstp_clks[MSTP201]), /* SCIFA3 */ | 654 | CLKDEV_DEV_ID("sh-sci.3", &mstp_clks[MSTP201]), /* SCIFA3 */ |
655 | CLKDEV_DEV_ID("e6c70000.serial", &mstp_clks[MSTP201]), /* SCIFA3 */ | ||
649 | CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP200]), /* SCIFA4 */ | 656 | CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP200]), /* SCIFA4 */ |
657 | CLKDEV_DEV_ID("e6c80000.serial", &mstp_clks[MSTP200]), /* SCIFA4 */ | ||
650 | CLKDEV_DEV_ID("sh-sci.6", &mstp_clks[MSTP331]), /* SCIFA6 */ | 658 | CLKDEV_DEV_ID("sh-sci.6", &mstp_clks[MSTP331]), /* SCIFA6 */ |
659 | CLKDEV_DEV_ID("e6cc0000.serial", &mstp_clks[MSTP331]), /* SCIFA6 */ | ||
651 | CLKDEV_DEV_ID("sh_fsi2", &mstp_clks[MSTP328]), /* FSI */ | 660 | CLKDEV_DEV_ID("sh_fsi2", &mstp_clks[MSTP328]), /* FSI */ |
652 | CLKDEV_DEV_ID("ec230000.sound", &mstp_clks[MSTP328]), /* FSI */ | 661 | CLKDEV_DEV_ID("ec230000.sound", &mstp_clks[MSTP328]), /* FSI */ |
653 | CLKDEV_DEV_ID("sh_irda.0", &mstp_clks[MSTP325]), /* IrDA */ | 662 | CLKDEV_DEV_ID("sh_irda.0", &mstp_clks[MSTP325]), /* IrDA */ |
diff --git a/arch/arm/mach-shmobile/clock.c b/arch/arm/mach-shmobile/clock.c index e7232a0373b9..806f94038cc4 100644 --- a/arch/arm/mach-shmobile/clock.c +++ b/arch/arm/mach-shmobile/clock.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #ifdef CONFIG_COMMON_CLK | 25 | #ifdef CONFIG_COMMON_CLK |
26 | #include <linux/clk.h> | 26 | #include <linux/clk.h> |
27 | #include <linux/clkdev.h> | 27 | #include <linux/clkdev.h> |
28 | #include <mach/clock.h> | 28 | #include "clock.h" |
29 | 29 | ||
30 | void __init shmobile_clk_workaround(const struct clk_name *clks, | 30 | void __init shmobile_clk_workaround(const struct clk_name *clks, |
31 | int nr_clks, bool enable) | 31 | int nr_clks, bool enable) |
@@ -49,8 +49,8 @@ void __init shmobile_clk_workaround(const struct clk_name *clks, | |||
49 | #else /* CONFIG_COMMON_CLK */ | 49 | #else /* CONFIG_COMMON_CLK */ |
50 | #include <linux/sh_clk.h> | 50 | #include <linux/sh_clk.h> |
51 | #include <linux/export.h> | 51 | #include <linux/export.h> |
52 | #include <mach/clock.h> | 52 | #include "clock.h" |
53 | #include <mach/common.h> | 53 | #include "common.h" |
54 | 54 | ||
55 | unsigned long shmobile_fixed_ratio_clk_recalc(struct clk *clk) | 55 | unsigned long shmobile_fixed_ratio_clk_recalc(struct clk *clk) |
56 | { | 56 | { |
diff --git a/arch/arm/mach-shmobile/include/mach/clock.h b/arch/arm/mach-shmobile/clock.h index 31b6417463e6..31b6417463e6 100644 --- a/arch/arm/mach-shmobile/include/mach/clock.h +++ b/arch/arm/mach-shmobile/clock.h | |||
diff --git a/arch/arm/mach-shmobile/include/mach/common.h b/arch/arm/mach-shmobile/common.h index f7a360edcc35..98056081f0da 100644 --- a/arch/arm/mach-shmobile/include/mach/common.h +++ b/arch/arm/mach-shmobile/common.h | |||
@@ -35,8 +35,10 @@ extern void shmobile_cpuidle_set_driver(struct cpuidle_driver *drv); | |||
35 | 35 | ||
36 | #ifdef CONFIG_SUSPEND | 36 | #ifdef CONFIG_SUSPEND |
37 | int shmobile_suspend_init(void); | 37 | int shmobile_suspend_init(void); |
38 | void shmobile_smp_apmu_suspend_init(void); | ||
38 | #else | 39 | #else |
39 | static inline int shmobile_suspend_init(void) { return 0; } | 40 | static inline int shmobile_suspend_init(void) { return 0; } |
41 | static inline void shmobile_smp_apmu_suspend_init(void) { } | ||
40 | #endif | 42 | #endif |
41 | 43 | ||
42 | #ifdef CONFIG_CPU_IDLE | 44 | #ifdef CONFIG_CPU_IDLE |
@@ -45,12 +47,19 @@ int shmobile_cpuidle_init(void); | |||
45 | static inline int shmobile_cpuidle_init(void) { return 0; } | 47 | static inline int shmobile_cpuidle_init(void) { return 0; } |
46 | #endif | 48 | #endif |
47 | 49 | ||
50 | #ifdef CONFIG_CPU_FREQ | ||
51 | int shmobile_cpufreq_init(void); | ||
52 | #else | ||
53 | static inline int shmobile_cpufreq_init(void) { return 0; } | ||
54 | #endif | ||
55 | |||
48 | extern void __iomem *shmobile_scu_base; | 56 | extern void __iomem *shmobile_scu_base; |
49 | 57 | ||
50 | static inline void __init shmobile_init_late(void) | 58 | static inline void __init shmobile_init_late(void) |
51 | { | 59 | { |
52 | shmobile_suspend_init(); | 60 | shmobile_suspend_init(); |
53 | shmobile_cpuidle_init(); | 61 | shmobile_cpuidle_init(); |
62 | shmobile_cpufreq_init(); | ||
54 | } | 63 | } |
55 | 64 | ||
56 | #endif /* __ARCH_MACH_COMMON_H */ | 65 | #endif /* __ARCH_MACH_COMMON_H */ |
diff --git a/arch/arm/mach-shmobile/console.c b/arch/arm/mach-shmobile/console.c index 9411a5bf4fd6..f2e79f2376e1 100644 --- a/arch/arm/mach-shmobile/console.c +++ b/arch/arm/mach-shmobile/console.c | |||
@@ -19,8 +19,8 @@ | |||
19 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
22 | #include <mach/common.h> | ||
23 | #include <asm/mach/map.h> | 22 | #include <asm/mach/map.h> |
23 | #include "common.h" | ||
24 | 24 | ||
25 | void __init shmobile_setup_console(void) | 25 | void __init shmobile_setup_console(void) |
26 | { | 26 | { |
diff --git a/arch/arm/mach-shmobile/cpufreq.c b/arch/arm/mach-shmobile/cpufreq.c new file mode 100644 index 000000000000..8a24b2be46ae --- /dev/null +++ b/arch/arm/mach-shmobile/cpufreq.c | |||
@@ -0,0 +1,17 @@ | |||
1 | /* | ||
2 | * CPUFreq support code for SH-Mobile ARM | ||
3 | * | ||
4 | * Copyright (C) 2014 Gaku Inami | ||
5 | * | ||
6 | * This file is subject to the terms and conditions of the GNU General Public | ||
7 | * License. See the file "COPYING" in the main directory of this archive | ||
8 | * for more details. | ||
9 | */ | ||
10 | |||
11 | #include <linux/platform_device.h> | ||
12 | |||
13 | int __init shmobile_cpufreq_init(void) | ||
14 | { | ||
15 | platform_device_register_simple("cpufreq-cpu0", -1, NULL, 0); | ||
16 | return 0; | ||
17 | } | ||
diff --git a/arch/arm/mach-shmobile/include/mach/dma-register.h b/arch/arm/mach-shmobile/dma-register.h index 97c40bd9b94f..97c40bd9b94f 100644 --- a/arch/arm/mach-shmobile/include/mach/dma-register.h +++ b/arch/arm/mach-shmobile/dma-register.h | |||
diff --git a/arch/arm/mach-shmobile/headsmp.S b/arch/arm/mach-shmobile/headsmp.S index e5be5c88644b..faf82144a262 100644 --- a/arch/arm/mach-shmobile/headsmp.S +++ b/arch/arm/mach-shmobile/headsmp.S | |||
@@ -10,14 +10,17 @@ | |||
10 | * it under the terms of the GNU General Public License version 2 as | 10 | * it under the terms of the GNU General Public License version 2 as |
11 | * published by the Free Software Foundation. | 11 | * published by the Free Software Foundation. |
12 | */ | 12 | */ |
13 | #include <linux/linkage.h> | ||
14 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/linkage.h> | ||
15 | #include <linux/threads.h> | ||
15 | #include <asm/memory.h> | 16 | #include <asm/memory.h> |
16 | 17 | ||
18 | #ifdef CONFIG_SMP | ||
17 | ENTRY(shmobile_invalidate_start) | 19 | ENTRY(shmobile_invalidate_start) |
18 | bl v7_invalidate_l1 | 20 | bl v7_invalidate_l1 |
19 | b secondary_startup | 21 | b secondary_startup |
20 | ENDPROC(shmobile_invalidate_start) | 22 | ENDPROC(shmobile_invalidate_start) |
23 | #endif | ||
21 | 24 | ||
22 | /* | 25 | /* |
23 | * Reset vector for secondary CPUs. | 26 | * Reset vector for secondary CPUs. |
@@ -68,7 +71,7 @@ shmobile_smp_boot_find_mpidr: | |||
68 | 71 | ||
69 | shmobile_smp_boot_next: | 72 | shmobile_smp_boot_next: |
70 | add r1, r1, #1 | 73 | add r1, r1, #1 |
71 | cmp r1, #CONFIG_NR_CPUS | 74 | cmp r1, #NR_CPUS |
72 | blo shmobile_smp_boot_find_mpidr | 75 | blo shmobile_smp_boot_find_mpidr |
73 | 76 | ||
74 | b shmobile_smp_sleep | 77 | b shmobile_smp_sleep |
@@ -85,10 +88,10 @@ ENDPROC(shmobile_smp_sleep) | |||
85 | 88 | ||
86 | .globl shmobile_smp_mpidr | 89 | .globl shmobile_smp_mpidr |
87 | shmobile_smp_mpidr: | 90 | shmobile_smp_mpidr: |
88 | 1: .space CONFIG_NR_CPUS * 4 | 91 | 1: .space NR_CPUS * 4 |
89 | .globl shmobile_smp_fn | 92 | .globl shmobile_smp_fn |
90 | shmobile_smp_fn: | 93 | shmobile_smp_fn: |
91 | 2: .space CONFIG_NR_CPUS * 4 | 94 | 2: .space NR_CPUS * 4 |
92 | .globl shmobile_smp_arg | 95 | .globl shmobile_smp_arg |
93 | shmobile_smp_arg: | 96 | shmobile_smp_arg: |
94 | 3: .space CONFIG_NR_CPUS * 4 | 97 | 3: .space NR_CPUS * 4 |
diff --git a/arch/arm/mach-shmobile/include/mach/irqs.h b/arch/arm/mach-shmobile/include/mach/irqs.h index d241bfd6926d..5aee83f079e2 100644 --- a/arch/arm/mach-shmobile/include/mach/irqs.h +++ b/arch/arm/mach-shmobile/include/mach/irqs.h | |||
@@ -1,24 +1,10 @@ | |||
1 | #ifndef __ASM_MACH_IRQS_H | 1 | #ifndef __ASM_MACH_IRQS_H |
2 | #define __ASM_MACH_IRQS_H | 2 | #define __ASM_MACH_IRQS_H |
3 | 3 | ||
4 | #include <linux/sh_intc.h> | 4 | /* Stuck here until drivers/pinctl/sh-pfc gets rid of legacy code */ |
5 | |||
6 | /* GIC */ | ||
7 | #define gic_spi(nr) ((nr) + 32) | ||
8 | #define gic_iid(nr) (nr) /* ICCIAR / interrupt ID */ | ||
9 | |||
10 | /* INTCS */ | ||
11 | #define INTCS_VECT_BASE 0x3400 | ||
12 | #define INTCS_VECT(n, vect) INTC_VECT((n), INTCS_VECT_BASE + (vect)) | ||
13 | #define intcs_evt2irq(evt) evt2irq(INTCS_VECT_BASE + (evt)) | ||
14 | 5 | ||
15 | /* External IRQ pins */ | 6 | /* External IRQ pins */ |
16 | #define IRQPIN_BASE 2000 | 7 | #define IRQPIN_BASE 2000 |
17 | #define irq_pin(nr) ((nr) + IRQPIN_BASE) | 8 | #define irq_pin(nr) ((nr) + IRQPIN_BASE) |
18 | 9 | ||
19 | /* GPIO IRQ */ | ||
20 | #define _GPIO_IRQ_BASE 2500 | ||
21 | #define GPIO_IRQ_BASE(x) (_GPIO_IRQ_BASE + (32 * x)) | ||
22 | #define GPIO_IRQ(x, y) (_GPIO_IRQ_BASE + (32 * x) + y) | ||
23 | |||
24 | #endif /* __ASM_MACH_IRQS_H */ | 10 | #endif /* __ASM_MACH_IRQS_H */ |
diff --git a/arch/arm/mach-shmobile/intc-sh7372.c b/arch/arm/mach-shmobile/intc-sh7372.c index a91caad7db7c..e2af00b1bd9d 100644 --- a/arch/arm/mach-shmobile/intc-sh7372.c +++ b/arch/arm/mach-shmobile/intc-sh7372.c | |||
@@ -22,11 +22,10 @@ | |||
22 | #include <linux/module.h> | 22 | #include <linux/module.h> |
23 | #include <linux/irq.h> | 23 | #include <linux/irq.h> |
24 | #include <linux/io.h> | 24 | #include <linux/io.h> |
25 | #include <linux/sh_intc.h> | ||
26 | #include <mach/intc.h> | ||
27 | #include <mach/irqs.h> | ||
28 | #include <asm/mach-types.h> | 25 | #include <asm/mach-types.h> |
29 | #include <asm/mach/arch.h> | 26 | #include <asm/mach/arch.h> |
27 | #include "intc.h" | ||
28 | #include "irqs.h" | ||
30 | 29 | ||
31 | enum { | 30 | enum { |
32 | UNUSED_INTCA = 0, | 31 | UNUSED_INTCA = 0, |
diff --git a/arch/arm/mach-shmobile/intc-sh73a0.c b/arch/arm/mach-shmobile/intc-sh73a0.c index 19a26f4579b3..44457a94897b 100644 --- a/arch/arm/mach-shmobile/intc-sh73a0.c +++ b/arch/arm/mach-shmobile/intc-sh73a0.c | |||
@@ -22,15 +22,16 @@ | |||
22 | #include <linux/module.h> | 22 | #include <linux/module.h> |
23 | #include <linux/irq.h> | 23 | #include <linux/irq.h> |
24 | #include <linux/io.h> | 24 | #include <linux/io.h> |
25 | #include <linux/sh_intc.h> | ||
26 | #include <linux/irqchip.h> | 25 | #include <linux/irqchip.h> |
27 | #include <linux/irqchip/arm-gic.h> | 26 | #include <linux/irqchip/arm-gic.h> |
28 | #include <mach/intc.h> | 27 | |
29 | #include <mach/irqs.h> | ||
30 | #include <mach/sh73a0.h> | ||
31 | #include <asm/mach-types.h> | 28 | #include <asm/mach-types.h> |
32 | #include <asm/mach/arch.h> | 29 | #include <asm/mach/arch.h> |
33 | 30 | ||
31 | #include "intc.h" | ||
32 | #include "irqs.h" | ||
33 | #include "sh73a0.h" | ||
34 | |||
34 | enum { | 35 | enum { |
35 | UNUSED = 0, | 36 | UNUSED = 0, |
36 | 37 | ||
diff --git a/arch/arm/mach-shmobile/include/mach/intc.h b/arch/arm/mach-shmobile/intc.h index a5603c76cfe0..a5603c76cfe0 100644 --- a/arch/arm/mach-shmobile/include/mach/intc.h +++ b/arch/arm/mach-shmobile/intc.h | |||
diff --git a/arch/arm/mach-shmobile/irqs.h b/arch/arm/mach-shmobile/irqs.h new file mode 100644 index 000000000000..4ff2d2aa94f0 --- /dev/null +++ b/arch/arm/mach-shmobile/irqs.h | |||
@@ -0,0 +1,21 @@ | |||
1 | #ifndef __SHMOBILE_IRQS_H | ||
2 | #define __SHMOBILE_IRQS_H | ||
3 | |||
4 | #include <linux/sh_intc.h> | ||
5 | #include <mach/irqs.h> | ||
6 | |||
7 | /* GIC */ | ||
8 | #define gic_spi(nr) ((nr) + 32) | ||
9 | #define gic_iid(nr) (nr) /* ICCIAR / interrupt ID */ | ||
10 | |||
11 | /* INTCS */ | ||
12 | #define INTCS_VECT_BASE 0x3400 | ||
13 | #define INTCS_VECT(n, vect) INTC_VECT((n), INTCS_VECT_BASE + (vect)) | ||
14 | #define intcs_evt2irq(evt) evt2irq(INTCS_VECT_BASE + (evt)) | ||
15 | |||
16 | /* GPIO IRQ */ | ||
17 | #define _GPIO_IRQ_BASE 2500 | ||
18 | #define GPIO_IRQ_BASE(x) (_GPIO_IRQ_BASE + (32 * x)) | ||
19 | #define GPIO_IRQ(x, y) (_GPIO_IRQ_BASE + (32 * x) + y) | ||
20 | |||
21 | #endif /* __SHMOBILE_IRQS_H */ | ||
diff --git a/arch/arm/mach-shmobile/platsmp-apmu.c b/arch/arm/mach-shmobile/platsmp-apmu.c index 8cb641c00fdb..2c06810d3a70 100644 --- a/arch/arm/mach-shmobile/platsmp-apmu.c +++ b/arch/arm/mach-shmobile/platsmp-apmu.c | |||
@@ -7,27 +7,32 @@ | |||
7 | * it under the terms of the GNU General Public License version 2 as | 7 | * it under the terms of the GNU General Public License version 2 as |
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | */ | 9 | */ |
10 | #include <linux/cpu_pm.h> | ||
10 | #include <linux/delay.h> | 11 | #include <linux/delay.h> |
11 | #include <linux/init.h> | 12 | #include <linux/init.h> |
12 | #include <linux/io.h> | 13 | #include <linux/io.h> |
13 | #include <linux/ioport.h> | 14 | #include <linux/ioport.h> |
14 | #include <linux/of_address.h> | 15 | #include <linux/of_address.h> |
15 | #include <linux/smp.h> | 16 | #include <linux/smp.h> |
17 | #include <linux/suspend.h> | ||
18 | #include <linux/threads.h> | ||
16 | #include <asm/cacheflush.h> | 19 | #include <asm/cacheflush.h> |
17 | #include <asm/cp15.h> | 20 | #include <asm/cp15.h> |
21 | #include <asm/proc-fns.h> | ||
18 | #include <asm/smp_plat.h> | 22 | #include <asm/smp_plat.h> |
19 | #include <mach/common.h> | 23 | #include <asm/suspend.h> |
24 | #include "common.h" | ||
20 | 25 | ||
21 | static struct { | 26 | static struct { |
22 | void __iomem *iomem; | 27 | void __iomem *iomem; |
23 | int bit; | 28 | int bit; |
24 | } apmu_cpus[CONFIG_NR_CPUS]; | 29 | } apmu_cpus[NR_CPUS]; |
25 | 30 | ||
26 | #define WUPCR_OFFS 0x10 | 31 | #define WUPCR_OFFS 0x10 |
27 | #define PSTR_OFFS 0x40 | 32 | #define PSTR_OFFS 0x40 |
28 | #define CPUNCR_OFFS(n) (0x100 + (0x10 * (n))) | 33 | #define CPUNCR_OFFS(n) (0x100 + (0x10 * (n))) |
29 | 34 | ||
30 | static int apmu_power_on(void __iomem *p, int bit) | 35 | static int __maybe_unused apmu_power_on(void __iomem *p, int bit) |
31 | { | 36 | { |
32 | /* request power on */ | 37 | /* request power on */ |
33 | writel_relaxed(BIT(bit), p + WUPCR_OFFS); | 38 | writel_relaxed(BIT(bit), p + WUPCR_OFFS); |
@@ -46,7 +51,7 @@ static int apmu_power_off(void __iomem *p, int bit) | |||
46 | return 0; | 51 | return 0; |
47 | } | 52 | } |
48 | 53 | ||
49 | static int apmu_power_off_poll(void __iomem *p, int bit) | 54 | static int __maybe_unused apmu_power_off_poll(void __iomem *p, int bit) |
50 | { | 55 | { |
51 | int k; | 56 | int k; |
52 | 57 | ||
@@ -69,7 +74,7 @@ static int apmu_wrap(int cpu, int (*fn)(void __iomem *p, int cpu)) | |||
69 | 74 | ||
70 | static void apmu_init_cpu(struct resource *res, int cpu, int bit) | 75 | static void apmu_init_cpu(struct resource *res, int cpu, int bit) |
71 | { | 76 | { |
72 | if (apmu_cpus[cpu].iomem) | 77 | if ((cpu >= ARRAY_SIZE(apmu_cpus)) || apmu_cpus[cpu].iomem) |
73 | return; | 78 | return; |
74 | 79 | ||
75 | apmu_cpus[cpu].iomem = ioremap_nocache(res->start, resource_size(res)); | 80 | apmu_cpus[cpu].iomem = ioremap_nocache(res->start, resource_size(res)); |
@@ -133,6 +138,7 @@ void __init shmobile_smp_apmu_prepare_cpus(unsigned int max_cpus) | |||
133 | apmu_parse_cfg(apmu_init_cpu); | 138 | apmu_parse_cfg(apmu_init_cpu); |
134 | } | 139 | } |
135 | 140 | ||
141 | #ifdef CONFIG_SMP | ||
136 | int shmobile_smp_apmu_boot_secondary(unsigned int cpu, struct task_struct *idle) | 142 | int shmobile_smp_apmu_boot_secondary(unsigned int cpu, struct task_struct *idle) |
137 | { | 143 | { |
138 | /* For this particular CPU register boot vector */ | 144 | /* For this particular CPU register boot vector */ |
@@ -140,8 +146,9 @@ int shmobile_smp_apmu_boot_secondary(unsigned int cpu, struct task_struct *idle) | |||
140 | 146 | ||
141 | return apmu_wrap(cpu, apmu_power_on); | 147 | return apmu_wrap(cpu, apmu_power_on); |
142 | } | 148 | } |
149 | #endif | ||
143 | 150 | ||
144 | #ifdef CONFIG_HOTPLUG_CPU | 151 | #if defined(CONFIG_HOTPLUG_CPU) || defined(CONFIG_SUSPEND) |
145 | /* nicked from arch/arm/mach-exynos/hotplug.c */ | 152 | /* nicked from arch/arm/mach-exynos/hotplug.c */ |
146 | static inline void cpu_enter_lowpower_a15(void) | 153 | static inline void cpu_enter_lowpower_a15(void) |
147 | { | 154 | { |
@@ -172,16 +179,40 @@ static inline void cpu_enter_lowpower_a15(void) | |||
172 | dsb(); | 179 | dsb(); |
173 | } | 180 | } |
174 | 181 | ||
175 | void shmobile_smp_apmu_cpu_die(unsigned int cpu) | 182 | void shmobile_smp_apmu_cpu_shutdown(unsigned int cpu) |
176 | { | 183 | { |
177 | /* For this particular CPU deregister boot vector */ | ||
178 | shmobile_smp_hook(cpu, 0, 0); | ||
179 | 184 | ||
180 | /* Select next sleep mode using the APMU */ | 185 | /* Select next sleep mode using the APMU */ |
181 | apmu_wrap(cpu, apmu_power_off); | 186 | apmu_wrap(cpu, apmu_power_off); |
182 | 187 | ||
183 | /* Do ARM specific CPU shutdown */ | 188 | /* Do ARM specific CPU shutdown */ |
184 | cpu_enter_lowpower_a15(); | 189 | cpu_enter_lowpower_a15(); |
190 | } | ||
191 | |||
192 | static inline void cpu_leave_lowpower(void) | ||
193 | { | ||
194 | unsigned int v; | ||
195 | |||
196 | asm volatile("mrc p15, 0, %0, c1, c0, 0\n" | ||
197 | " orr %0, %0, %1\n" | ||
198 | " mcr p15, 0, %0, c1, c0, 0\n" | ||
199 | " mrc p15, 0, %0, c1, c0, 1\n" | ||
200 | " orr %0, %0, %2\n" | ||
201 | " mcr p15, 0, %0, c1, c0, 1\n" | ||
202 | : "=&r" (v) | ||
203 | : "Ir" (CR_C), "Ir" (0x40) | ||
204 | : "cc"); | ||
205 | } | ||
206 | #endif | ||
207 | |||
208 | #if defined(CONFIG_HOTPLUG_CPU) | ||
209 | void shmobile_smp_apmu_cpu_die(unsigned int cpu) | ||
210 | { | ||
211 | /* For this particular CPU deregister boot vector */ | ||
212 | shmobile_smp_hook(cpu, 0, 0); | ||
213 | |||
214 | /* Shutdown CPU core */ | ||
215 | shmobile_smp_apmu_cpu_shutdown(cpu); | ||
185 | 216 | ||
186 | /* jump to shared mach-shmobile sleep / reset code */ | 217 | /* jump to shared mach-shmobile sleep / reset code */ |
187 | shmobile_smp_sleep(); | 218 | shmobile_smp_sleep(); |
@@ -192,3 +223,25 @@ int shmobile_smp_apmu_cpu_kill(unsigned int cpu) | |||
192 | return apmu_wrap(cpu, apmu_power_off_poll); | 223 | return apmu_wrap(cpu, apmu_power_off_poll); |
193 | } | 224 | } |
194 | #endif | 225 | #endif |
226 | |||
227 | #if defined(CONFIG_SUSPEND) | ||
228 | static int shmobile_smp_apmu_do_suspend(unsigned long cpu) | ||
229 | { | ||
230 | shmobile_smp_hook(cpu, virt_to_phys(cpu_resume), 0); | ||
231 | shmobile_smp_apmu_cpu_shutdown(cpu); | ||
232 | cpu_do_idle(); /* WFI selects Core Standby */ | ||
233 | return 1; | ||
234 | } | ||
235 | |||
236 | static int shmobile_smp_apmu_enter_suspend(suspend_state_t state) | ||
237 | { | ||
238 | cpu_suspend(smp_processor_id(), shmobile_smp_apmu_do_suspend); | ||
239 | cpu_leave_lowpower(); | ||
240 | return 0; | ||
241 | } | ||
242 | |||
243 | void __init shmobile_smp_apmu_suspend_init(void) | ||
244 | { | ||
245 | shmobile_suspend_ops.enter = shmobile_smp_apmu_enter_suspend; | ||
246 | } | ||
247 | #endif | ||
diff --git a/arch/arm/mach-shmobile/platsmp-scu.c b/arch/arm/mach-shmobile/platsmp-scu.c index 673ad6e80869..64663110ab6c 100644 --- a/arch/arm/mach-shmobile/platsmp-scu.c +++ b/arch/arm/mach-shmobile/platsmp-scu.c | |||
@@ -15,7 +15,7 @@ | |||
15 | #include <asm/cacheflush.h> | 15 | #include <asm/cacheflush.h> |
16 | #include <asm/smp_plat.h> | 16 | #include <asm/smp_plat.h> |
17 | #include <asm/smp_scu.h> | 17 | #include <asm/smp_scu.h> |
18 | #include <mach/common.h> | 18 | #include "common.h" |
19 | 19 | ||
20 | static int shmobile_smp_scu_notifier_call(struct notifier_block *nfb, | 20 | static int shmobile_smp_scu_notifier_call(struct notifier_block *nfb, |
21 | unsigned long action, void *hcpu) | 21 | unsigned long action, void *hcpu) |
diff --git a/arch/arm/mach-shmobile/platsmp.c b/arch/arm/mach-shmobile/platsmp.c index 9ebc246b8d7d..3923e09e966d 100644 --- a/arch/arm/mach-shmobile/platsmp.c +++ b/arch/arm/mach-shmobile/platsmp.c | |||
@@ -13,7 +13,7 @@ | |||
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <asm/cacheflush.h> | 14 | #include <asm/cacheflush.h> |
15 | #include <asm/smp_plat.h> | 15 | #include <asm/smp_plat.h> |
16 | #include <mach/common.h> | 16 | #include "common.h" |
17 | 17 | ||
18 | extern unsigned long shmobile_smp_fn[]; | 18 | extern unsigned long shmobile_smp_fn[]; |
19 | extern unsigned long shmobile_smp_arg[]; | 19 | extern unsigned long shmobile_smp_arg[]; |
diff --git a/arch/arm/mach-shmobile/pm-r8a7740.c b/arch/arm/mach-shmobile/pm-r8a7740.c index 40b87aa1d448..a0d44d537fa0 100644 --- a/arch/arm/mach-shmobile/pm-r8a7740.c +++ b/arch/arm/mach-shmobile/pm-r8a7740.c | |||
@@ -10,8 +10,8 @@ | |||
10 | */ | 10 | */ |
11 | #include <linux/console.h> | 11 | #include <linux/console.h> |
12 | #include <linux/suspend.h> | 12 | #include <linux/suspend.h> |
13 | #include <mach/pm-rmobile.h> | 13 | #include "common.h" |
14 | #include <mach/common.h> | 14 | #include "pm-rmobile.h" |
15 | 15 | ||
16 | #ifdef CONFIG_PM | 16 | #ifdef CONFIG_PM |
17 | static int r8a7740_pd_a4s_suspend(void) | 17 | static int r8a7740_pd_a4s_suspend(void) |
diff --git a/arch/arm/mach-shmobile/pm-r8a7779.c b/arch/arm/mach-shmobile/pm-r8a7779.c index d6fe189b2df6..69f70b7f7fb2 100644 --- a/arch/arm/mach-shmobile/pm-r8a7779.c +++ b/arch/arm/mach-shmobile/pm-r8a7779.c | |||
@@ -13,20 +13,33 @@ | |||
13 | #include <linux/suspend.h> | 13 | #include <linux/suspend.h> |
14 | #include <linux/err.h> | 14 | #include <linux/err.h> |
15 | #include <linux/pm_clock.h> | 15 | #include <linux/pm_clock.h> |
16 | #include <linux/pm_domain.h> | ||
16 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
17 | #include <linux/delay.h> | 18 | #include <linux/delay.h> |
18 | #include <linux/irq.h> | 19 | #include <linux/irq.h> |
19 | #include <linux/interrupt.h> | 20 | #include <linux/interrupt.h> |
20 | #include <linux/console.h> | 21 | #include <linux/console.h> |
22 | |||
21 | #include <asm/io.h> | 23 | #include <asm/io.h> |
22 | #include <mach/common.h> | 24 | |
23 | #include <mach/pm-rcar.h> | 25 | #include "common.h" |
24 | #include <mach/r8a7779.h> | 26 | #include "pm-rcar.h" |
27 | #include "r8a7779.h" | ||
25 | 28 | ||
26 | /* SYSC */ | 29 | /* SYSC */ |
27 | #define SYSCIER 0x0c | 30 | #define SYSCIER 0x0c |
28 | #define SYSCIMR 0x10 | 31 | #define SYSCIMR 0x10 |
29 | 32 | ||
33 | struct r8a7779_pm_domain { | ||
34 | struct generic_pm_domain genpd; | ||
35 | struct rcar_sysc_ch ch; | ||
36 | }; | ||
37 | |||
38 | static inline struct rcar_sysc_ch *to_r8a7779_ch(struct generic_pm_domain *d) | ||
39 | { | ||
40 | return &container_of(d, struct r8a7779_pm_domain, genpd)->ch; | ||
41 | } | ||
42 | |||
30 | #if defined(CONFIG_PM) || defined(CONFIG_SMP) | 43 | #if defined(CONFIG_PM) || defined(CONFIG_SMP) |
31 | 44 | ||
32 | static void __init r8a7779_sysc_init(void) | 45 | static void __init r8a7779_sysc_init(void) |
diff --git a/arch/arm/mach-shmobile/pm-r8a7790.c b/arch/arm/mach-shmobile/pm-r8a7790.c index fc82839e2c2a..80e8d95e54d3 100644 --- a/arch/arm/mach-shmobile/pm-r8a7790.c +++ b/arch/arm/mach-shmobile/pm-r8a7790.c | |||
@@ -11,9 +11,21 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/smp.h> | ||
14 | #include <asm/io.h> | 15 | #include <asm/io.h> |
15 | #include <mach/pm-rcar.h> | 16 | #include "common.h" |
16 | #include <mach/r8a7790.h> | 17 | #include "pm-rcar.h" |
18 | #include "r8a7790.h" | ||
19 | |||
20 | /* RST */ | ||
21 | #define RST 0xe6160000 | ||
22 | #define CA15BAR 0x0020 | ||
23 | #define CA7BAR 0x0030 | ||
24 | #define CA15RESCNT 0x0040 | ||
25 | #define CA7RESCNT 0x0044 | ||
26 | |||
27 | /* On-chip RAM */ | ||
28 | #define MERAM 0xe8080000 | ||
17 | 29 | ||
18 | /* SYSC */ | 30 | /* SYSC */ |
19 | #define SYSCIER 0x0c | 31 | #define SYSCIER 0x0c |
@@ -38,8 +50,33 @@ static inline void r8a7790_sysc_init(void) {} | |||
38 | 50 | ||
39 | void __init r8a7790_pm_init(void) | 51 | void __init r8a7790_pm_init(void) |
40 | { | 52 | { |
53 | void __iomem *p; | ||
54 | u32 bar; | ||
41 | static int once; | 55 | static int once; |
42 | 56 | ||
43 | if (!once++) | 57 | if (once++) |
44 | r8a7790_sysc_init(); | 58 | return; |
59 | |||
60 | /* MERAM for jump stub, because BAR requires 256KB aligned address */ | ||
61 | p = ioremap_nocache(MERAM, shmobile_boot_size); | ||
62 | memcpy_toio(p, shmobile_boot_vector, shmobile_boot_size); | ||
63 | iounmap(p); | ||
64 | |||
65 | /* setup reset vectors */ | ||
66 | p = ioremap_nocache(RST, 0x63); | ||
67 | bar = (MERAM >> 8) & 0xfffffc00; | ||
68 | writel_relaxed(bar, p + CA15BAR); | ||
69 | writel_relaxed(bar, p + CA7BAR); | ||
70 | writel_relaxed(bar | 0x10, p + CA15BAR); | ||
71 | writel_relaxed(bar | 0x10, p + CA7BAR); | ||
72 | |||
73 | /* de-assert reset for all CPUs */ | ||
74 | writel_relaxed((readl_relaxed(p + CA15RESCNT) & ~0x0f) | 0xa5a50000, | ||
75 | p + CA15RESCNT); | ||
76 | writel_relaxed((readl_relaxed(p + CA7RESCNT) & ~0x0f) | 0x5a5a0000, | ||
77 | p + CA7RESCNT); | ||
78 | iounmap(p); | ||
79 | |||
80 | r8a7790_sysc_init(); | ||
81 | shmobile_smp_apmu_suspend_init(); | ||
45 | } | 82 | } |
diff --git a/arch/arm/mach-shmobile/pm-r8a7791.c b/arch/arm/mach-shmobile/pm-r8a7791.c new file mode 100644 index 000000000000..25f107bb3657 --- /dev/null +++ b/arch/arm/mach-shmobile/pm-r8a7791.c | |||
@@ -0,0 +1,73 @@ | |||
1 | /* | ||
2 | * r8a7791 Power management support | ||
3 | * | ||
4 | * Copyright (C) 2014 Renesas Electronics Corporation | ||
5 | * Copyright (C) 2011 Renesas Solutions Corp. | ||
6 | * Copyright (C) 2011 Magnus Damm | ||
7 | * | ||
8 | * This file is subject to the terms and conditions of the GNU General Public | ||
9 | * License. See the file "COPYING" in the main directory of this archive | ||
10 | * for more details. | ||
11 | */ | ||
12 | |||
13 | #include <linux/kernel.h> | ||
14 | #include <linux/smp.h> | ||
15 | #include <asm/io.h> | ||
16 | #include "common.h" | ||
17 | #include "pm-rcar.h" | ||
18 | #include "r8a7791.h" | ||
19 | |||
20 | #define RST 0xe6160000 | ||
21 | #define CA15BAR 0x0020 | ||
22 | #define CA15RESCNT 0x0040 | ||
23 | #define RAM 0xe6300000 | ||
24 | |||
25 | /* SYSC */ | ||
26 | #define SYSCIER 0x0c | ||
27 | #define SYSCIMR 0x10 | ||
28 | |||
29 | #if defined(CONFIG_SMP) | ||
30 | |||
31 | static void __init r8a7791_sysc_init(void) | ||
32 | { | ||
33 | void __iomem *base = rcar_sysc_init(0xe6180000); | ||
34 | |||
35 | /* enable all interrupt sources, but do not use interrupt handler */ | ||
36 | iowrite32(0x0131000e, base + SYSCIER); | ||
37 | iowrite32(0, base + SYSCIMR); | ||
38 | } | ||
39 | |||
40 | #else /* CONFIG_SMP */ | ||
41 | |||
42 | static inline void r8a7791_sysc_init(void) {} | ||
43 | |||
44 | #endif /* CONFIG_SMP */ | ||
45 | |||
46 | void __init r8a7791_pm_init(void) | ||
47 | { | ||
48 | void __iomem *p; | ||
49 | u32 bar; | ||
50 | static int once; | ||
51 | |||
52 | if (once++) | ||
53 | return; | ||
54 | |||
55 | /* RAM for jump stub, because BAR requires 256KB aligned address */ | ||
56 | p = ioremap_nocache(RAM, shmobile_boot_size); | ||
57 | memcpy_toio(p, shmobile_boot_vector, shmobile_boot_size); | ||
58 | iounmap(p); | ||
59 | |||
60 | /* setup reset vectors */ | ||
61 | p = ioremap_nocache(RST, 0x63); | ||
62 | bar = (RAM >> 8) & 0xfffffc00; | ||
63 | writel_relaxed(bar, p + CA15BAR); | ||
64 | writel_relaxed(bar | 0x10, p + CA15BAR); | ||
65 | |||
66 | /* enable clocks to all CPUs */ | ||
67 | writel_relaxed((readl_relaxed(p + CA15RESCNT) & ~0x0f) | 0xa5a50000, | ||
68 | p + CA15RESCNT); | ||
69 | iounmap(p); | ||
70 | |||
71 | r8a7791_sysc_init(); | ||
72 | shmobile_smp_apmu_suspend_init(); | ||
73 | } | ||
diff --git a/arch/arm/mach-shmobile/pm-rcar.c b/arch/arm/mach-shmobile/pm-rcar.c index 1f465a12d1b1..34b8a5674f85 100644 --- a/arch/arm/mach-shmobile/pm-rcar.c +++ b/arch/arm/mach-shmobile/pm-rcar.c | |||
@@ -13,7 +13,7 @@ | |||
13 | #include <linux/mm.h> | 13 | #include <linux/mm.h> |
14 | #include <linux/spinlock.h> | 14 | #include <linux/spinlock.h> |
15 | #include <asm/io.h> | 15 | #include <asm/io.h> |
16 | #include <mach/pm-rcar.h> | 16 | #include "pm-rcar.h" |
17 | 17 | ||
18 | /* SYSC */ | 18 | /* SYSC */ |
19 | #define SYSCSR 0x00 | 19 | #define SYSCSR 0x00 |
diff --git a/arch/arm/mach-shmobile/include/mach/pm-rcar.h b/arch/arm/mach-shmobile/pm-rcar.h index ef3a1ef628f1..ef3a1ef628f1 100644 --- a/arch/arm/mach-shmobile/include/mach/pm-rcar.h +++ b/arch/arm/mach-shmobile/pm-rcar.h | |||
diff --git a/arch/arm/mach-shmobile/pm-rmobile.c b/arch/arm/mach-shmobile/pm-rmobile.c index f710235aff2f..ebdd16e94a84 100644 --- a/arch/arm/mach-shmobile/pm-rmobile.c +++ b/arch/arm/mach-shmobile/pm-rmobile.c | |||
@@ -17,7 +17,7 @@ | |||
17 | #include <linux/pm.h> | 17 | #include <linux/pm.h> |
18 | #include <linux/pm_clock.h> | 18 | #include <linux/pm_clock.h> |
19 | #include <asm/io.h> | 19 | #include <asm/io.h> |
20 | #include <mach/pm-rmobile.h> | 20 | #include "pm-rmobile.h" |
21 | 21 | ||
22 | /* SYSC */ | 22 | /* SYSC */ |
23 | #define SPDCR IOMEM(0xe6180008) | 23 | #define SPDCR IOMEM(0xe6180008) |
diff --git a/arch/arm/mach-shmobile/include/mach/pm-rmobile.h b/arch/arm/mach-shmobile/pm-rmobile.h index 690553a06887..690553a06887 100644 --- a/arch/arm/mach-shmobile/include/mach/pm-rmobile.h +++ b/arch/arm/mach-shmobile/pm-rmobile.h | |||
diff --git a/arch/arm/mach-shmobile/pm-sh7372.c b/arch/arm/mach-shmobile/pm-sh7372.c index 0de75fd394b9..7e5c2676c489 100644 --- a/arch/arm/mach-shmobile/pm-sh7372.c +++ b/arch/arm/mach-shmobile/pm-sh7372.c | |||
@@ -21,13 +21,15 @@ | |||
21 | #include <linux/irq.h> | 21 | #include <linux/irq.h> |
22 | #include <linux/bitrev.h> | 22 | #include <linux/bitrev.h> |
23 | #include <linux/console.h> | 23 | #include <linux/console.h> |
24 | |||
24 | #include <asm/cpuidle.h> | 25 | #include <asm/cpuidle.h> |
25 | #include <asm/io.h> | 26 | #include <asm/io.h> |
26 | #include <asm/tlbflush.h> | 27 | #include <asm/tlbflush.h> |
27 | #include <asm/suspend.h> | 28 | #include <asm/suspend.h> |
28 | #include <mach/common.h> | 29 | |
29 | #include <mach/sh7372.h> | 30 | #include "common.h" |
30 | #include <mach/pm-rmobile.h> | 31 | #include "pm-rmobile.h" |
32 | #include "sh7372.h" | ||
31 | 33 | ||
32 | /* DBG */ | 34 | /* DBG */ |
33 | #define DBGREG1 IOMEM(0xe6100020) | 35 | #define DBGREG1 IOMEM(0xe6100020) |
diff --git a/arch/arm/mach-shmobile/pm-sh73a0.c b/arch/arm/mach-shmobile/pm-sh73a0.c index 99086e98fbbc..a7e466817965 100644 --- a/arch/arm/mach-shmobile/pm-sh73a0.c +++ b/arch/arm/mach-shmobile/pm-sh73a0.c | |||
@@ -9,7 +9,7 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/suspend.h> | 11 | #include <linux/suspend.h> |
12 | #include <mach/common.h> | 12 | #include "common.h" |
13 | 13 | ||
14 | #ifdef CONFIG_SUSPEND | 14 | #ifdef CONFIG_SUSPEND |
15 | static int sh73a0_enter_suspend(suspend_state_t suspend_state) | 15 | static int sh73a0_enter_suspend(suspend_state_t suspend_state) |
diff --git a/arch/arm/mach-shmobile/include/mach/r7s72100.h b/arch/arm/mach-shmobile/r7s72100.h index 5f34b20ecd4a..efb723c88dd0 100644 --- a/arch/arm/mach-shmobile/include/mach/r7s72100.h +++ b/arch/arm/mach-shmobile/r7s72100.h | |||
@@ -3,6 +3,5 @@ | |||
3 | 3 | ||
4 | void r7s72100_add_dt_devices(void); | 4 | void r7s72100_add_dt_devices(void); |
5 | void r7s72100_clock_init(void); | 5 | void r7s72100_clock_init(void); |
6 | void r7s72100_init_early(void); | ||
7 | 6 | ||
8 | #endif /* __ASM_R7S72100_H__ */ | 7 | #endif /* __ASM_R7S72100_H__ */ |
diff --git a/arch/arm/mach-shmobile/include/mach/r8a73a4.h b/arch/arm/mach-shmobile/r8a73a4.h index ce8bdd1d8a8a..ce8bdd1d8a8a 100644 --- a/arch/arm/mach-shmobile/include/mach/r8a73a4.h +++ b/arch/arm/mach-shmobile/r8a73a4.h | |||
diff --git a/arch/arm/mach-shmobile/include/mach/r8a7740.h b/arch/arm/mach-shmobile/r8a7740.h index 5e3c9ec06303..1d1a5fd78b6b 100644 --- a/arch/arm/mach-shmobile/include/mach/r8a7740.h +++ b/arch/arm/mach-shmobile/r8a7740.h | |||
@@ -19,8 +19,6 @@ | |||
19 | #ifndef __ASM_R8A7740_H__ | 19 | #ifndef __ASM_R8A7740_H__ |
20 | #define __ASM_R8A7740_H__ | 20 | #define __ASM_R8A7740_H__ |
21 | 21 | ||
22 | #include <mach/pm-rmobile.h> | ||
23 | |||
24 | /* | 22 | /* |
25 | * MD_CKx pin | 23 | * MD_CKx pin |
26 | */ | 24 | */ |
diff --git a/arch/arm/mach-shmobile/include/mach/r8a7778.h b/arch/arm/mach-shmobile/r8a7778.h index f4076a50e970..f4076a50e970 100644 --- a/arch/arm/mach-shmobile/include/mach/r8a7778.h +++ b/arch/arm/mach-shmobile/r8a7778.h | |||
diff --git a/arch/arm/mach-shmobile/include/mach/r8a7779.h b/arch/arm/mach-shmobile/r8a7779.h index 88eeceaf1088..5415c719dc19 100644 --- a/arch/arm/mach-shmobile/include/mach/r8a7779.h +++ b/arch/arm/mach-shmobile/r8a7779.h | |||
@@ -2,8 +2,6 @@ | |||
2 | #define __ASM_R8A7779_H__ | 2 | #define __ASM_R8A7779_H__ |
3 | 3 | ||
4 | #include <linux/sh_clk.h> | 4 | #include <linux/sh_clk.h> |
5 | #include <linux/pm_domain.h> | ||
6 | #include <mach/pm-rcar.h> | ||
7 | 5 | ||
8 | /* HPB-DMA slave IDs */ | 6 | /* HPB-DMA slave IDs */ |
9 | enum { | 7 | enum { |
@@ -12,17 +10,6 @@ enum { | |||
12 | HPBDMA_SLAVE_SDHI0_RX, | 10 | HPBDMA_SLAVE_SDHI0_RX, |
13 | }; | 11 | }; |
14 | 12 | ||
15 | struct r8a7779_pm_domain { | ||
16 | struct generic_pm_domain genpd; | ||
17 | struct rcar_sysc_ch ch; | ||
18 | }; | ||
19 | |||
20 | static inline struct rcar_sysc_ch *to_r8a7779_ch(struct generic_pm_domain *d) | ||
21 | { | ||
22 | return &container_of(d, struct r8a7779_pm_domain, genpd)->ch; | ||
23 | } | ||
24 | |||
25 | extern void r8a7779_init_delay(void); | ||
26 | extern void r8a7779_init_irq_extpin(int irlm); | 13 | extern void r8a7779_init_irq_extpin(int irlm); |
27 | extern void r8a7779_init_irq_extpin_dt(int irlm); | 14 | extern void r8a7779_init_irq_extpin_dt(int irlm); |
28 | extern void r8a7779_init_irq_dt(void); | 15 | extern void r8a7779_init_irq_dt(void); |
@@ -32,6 +19,7 @@ extern void r8a7779_add_early_devices(void); | |||
32 | extern void r8a7779_add_standard_devices(void); | 19 | extern void r8a7779_add_standard_devices(void); |
33 | extern void r8a7779_add_standard_devices_dt(void); | 20 | extern void r8a7779_add_standard_devices_dt(void); |
34 | extern void r8a7779_init_late(void); | 21 | extern void r8a7779_init_late(void); |
22 | extern u32 r8a7779_read_mode_pins(void); | ||
35 | extern void r8a7779_clock_init(void); | 23 | extern void r8a7779_clock_init(void); |
36 | extern void r8a7779_pinmux_init(void); | 24 | extern void r8a7779_pinmux_init(void); |
37 | extern void r8a7779_pm_init(void); | 25 | extern void r8a7779_pm_init(void); |
diff --git a/arch/arm/mach-shmobile/include/mach/r8a7790.h b/arch/arm/mach-shmobile/r8a7790.h index 0b95babe84ba..459827f1369b 100644 --- a/arch/arm/mach-shmobile/include/mach/r8a7790.h +++ b/arch/arm/mach-shmobile/r8a7790.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef __ASM_R8A7790_H__ | 1 | #ifndef __ASM_R8A7790_H__ |
2 | #define __ASM_R8A7790_H__ | 2 | #define __ASM_R8A7790_H__ |
3 | 3 | ||
4 | #include <mach/rcar-gen2.h> | ||
5 | |||
6 | /* DMA slave IDs */ | 4 | /* DMA slave IDs */ |
7 | enum { | 5 | enum { |
8 | RCAR_DMA_SLAVE_INVALID, | 6 | RCAR_DMA_SLAVE_INVALID, |
@@ -33,7 +31,6 @@ void r8a7790_add_dt_devices(void); | |||
33 | void r8a7790_clock_init(void); | 31 | void r8a7790_clock_init(void); |
34 | void r8a7790_pinmux_init(void); | 32 | void r8a7790_pinmux_init(void); |
35 | void r8a7790_pm_init(void); | 33 | void r8a7790_pm_init(void); |
36 | void r8a7790_init_early(void); | ||
37 | extern struct smp_operations r8a7790_smp_ops; | 34 | extern struct smp_operations r8a7790_smp_ops; |
38 | 35 | ||
39 | #endif /* __ASM_R8A7790_H__ */ | 36 | #endif /* __ASM_R8A7790_H__ */ |
diff --git a/arch/arm/mach-shmobile/include/mach/r8a7791.h b/arch/arm/mach-shmobile/r8a7791.h index 664274cc4b64..86eae7bceb6f 100644 --- a/arch/arm/mach-shmobile/include/mach/r8a7791.h +++ b/arch/arm/mach-shmobile/r8a7791.h | |||
@@ -5,6 +5,7 @@ void r8a7791_add_standard_devices(void); | |||
5 | void r8a7791_add_dt_devices(void); | 5 | void r8a7791_add_dt_devices(void); |
6 | void r8a7791_clock_init(void); | 6 | void r8a7791_clock_init(void); |
7 | void r8a7791_pinmux_init(void); | 7 | void r8a7791_pinmux_init(void); |
8 | void r8a7791_pm_init(void); | ||
8 | extern struct smp_operations r8a7791_smp_ops; | 9 | extern struct smp_operations r8a7791_smp_ops; |
9 | 10 | ||
10 | #endif /* __ASM_R8A7791_H__ */ | 11 | #endif /* __ASM_R8A7791_H__ */ |
diff --git a/arch/arm/mach-shmobile/include/mach/rcar-gen2.h b/arch/arm/mach-shmobile/rcar-gen2.h index 43f606eb2d82..ce53cb5f53a1 100644 --- a/arch/arm/mach-shmobile/include/mach/rcar-gen2.h +++ b/arch/arm/mach-shmobile/rcar-gen2.h | |||
@@ -4,5 +4,6 @@ | |||
4 | void rcar_gen2_timer_init(void); | 4 | void rcar_gen2_timer_init(void); |
5 | #define MD(nr) BIT(nr) | 5 | #define MD(nr) BIT(nr) |
6 | u32 rcar_gen2_read_mode_pins(void); | 6 | u32 rcar_gen2_read_mode_pins(void); |
7 | void rcar_gen2_reserve(void); | ||
7 | 8 | ||
8 | #endif /* __ASM_RCAR_GEN2_H__ */ | 9 | #endif /* __ASM_RCAR_GEN2_H__ */ |
diff --git a/arch/arm/mach-shmobile/setup-emev2.c b/arch/arm/mach-shmobile/setup-emev2.c index d953ff6e78a2..b06a9e8f59a5 100644 --- a/arch/arm/mach-shmobile/setup-emev2.c +++ b/arch/arm/mach-shmobile/setup-emev2.c | |||
@@ -16,14 +16,13 @@ | |||
16 | * along with this program; if not, write to the Free Software | 16 | * along with this program; if not, write to the Free Software |
17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | 17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
18 | */ | 18 | */ |
19 | #include <linux/clk-provider.h> | ||
20 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
21 | #include <linux/init.h> | 20 | #include <linux/init.h> |
22 | #include <linux/of_platform.h> | 21 | #include <linux/mm.h> |
23 | #include <mach/common.h> | ||
24 | #include <asm/mach-types.h> | 22 | #include <asm/mach-types.h> |
25 | #include <asm/mach/arch.h> | 23 | #include <asm/mach/arch.h> |
26 | #include <asm/mach/map.h> | 24 | #include <asm/mach/map.h> |
25 | #include "common.h" | ||
27 | 26 | ||
28 | static struct map_desc emev2_io_desc[] __initdata = { | 27 | static struct map_desc emev2_io_desc[] __initdata = { |
29 | #ifdef CONFIG_SMP | 28 | #ifdef CONFIG_SMP |
@@ -42,17 +41,6 @@ static void __init emev2_map_io(void) | |||
42 | iotable_init(emev2_io_desc, ARRAY_SIZE(emev2_io_desc)); | 41 | iotable_init(emev2_io_desc, ARRAY_SIZE(emev2_io_desc)); |
43 | } | 42 | } |
44 | 43 | ||
45 | static void __init emev2_init_delay(void) | ||
46 | { | ||
47 | shmobile_setup_delay(533, 1, 3); /* Cortex-A9 @ 533MHz */ | ||
48 | } | ||
49 | |||
50 | static void __init emev2_add_standard_devices_dt(void) | ||
51 | { | ||
52 | of_clk_init(NULL); | ||
53 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | ||
54 | } | ||
55 | |||
56 | static const char *emev2_boards_compat_dt[] __initconst = { | 44 | static const char *emev2_boards_compat_dt[] __initconst = { |
57 | "renesas,emev2", | 45 | "renesas,emev2", |
58 | NULL, | 46 | NULL, |
@@ -63,8 +51,7 @@ extern struct smp_operations emev2_smp_ops; | |||
63 | DT_MACHINE_START(EMEV2_DT, "Generic Emma Mobile EV2 (Flattened Device Tree)") | 51 | DT_MACHINE_START(EMEV2_DT, "Generic Emma Mobile EV2 (Flattened Device Tree)") |
64 | .smp = smp_ops(emev2_smp_ops), | 52 | .smp = smp_ops(emev2_smp_ops), |
65 | .map_io = emev2_map_io, | 53 | .map_io = emev2_map_io, |
66 | .init_early = emev2_init_delay, | 54 | .init_early = shmobile_init_delay, |
67 | .init_machine = emev2_add_standard_devices_dt, | ||
68 | .init_late = shmobile_init_late, | 55 | .init_late = shmobile_init_late, |
69 | .dt_compat = emev2_boards_compat_dt, | 56 | .dt_compat = emev2_boards_compat_dt, |
70 | MACHINE_END | 57 | MACHINE_END |
diff --git a/arch/arm/mach-shmobile/setup-r7s72100.c b/arch/arm/mach-shmobile/setup-r7s72100.c index 412e179429cd..4a98b232d316 100644 --- a/arch/arm/mach-shmobile/setup-r7s72100.c +++ b/arch/arm/mach-shmobile/setup-r7s72100.c | |||
@@ -22,11 +22,13 @@ | |||
22 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
23 | #include <linux/of_platform.h> | 23 | #include <linux/of_platform.h> |
24 | #include <linux/sh_timer.h> | 24 | #include <linux/sh_timer.h> |
25 | #include <mach/common.h> | 25 | |
26 | #include <mach/irqs.h> | ||
27 | #include <mach/r7s72100.h> | ||
28 | #include <asm/mach/arch.h> | 26 | #include <asm/mach/arch.h> |
29 | 27 | ||
28 | #include "common.h" | ||
29 | #include "irqs.h" | ||
30 | #include "r7s72100.h" | ||
31 | |||
30 | static struct resource mtu2_resources[] __initdata = { | 32 | static struct resource mtu2_resources[] __initdata = { |
31 | DEFINE_RES_MEM(0xfcff0000, 0x400), | 33 | DEFINE_RES_MEM(0xfcff0000, 0x400), |
32 | DEFINE_RES_IRQ_NAMED(gic_iid(139), "tgi0a"), | 34 | DEFINE_RES_IRQ_NAMED(gic_iid(139), "tgi0a"), |
@@ -43,11 +45,6 @@ void __init r7s72100_add_dt_devices(void) | |||
43 | r7s72100_register_mtu2(); | 45 | r7s72100_register_mtu2(); |
44 | } | 46 | } |
45 | 47 | ||
46 | void __init r7s72100_init_early(void) | ||
47 | { | ||
48 | shmobile_setup_delay(400, 1, 3); /* Cortex-A9 @ 400MHz */ | ||
49 | } | ||
50 | |||
51 | #ifdef CONFIG_USE_OF | 48 | #ifdef CONFIG_USE_OF |
52 | static const char *r7s72100_boards_compat_dt[] __initdata = { | 49 | static const char *r7s72100_boards_compat_dt[] __initdata = { |
53 | "renesas,r7s72100", | 50 | "renesas,r7s72100", |
@@ -55,7 +52,7 @@ static const char *r7s72100_boards_compat_dt[] __initdata = { | |||
55 | }; | 52 | }; |
56 | 53 | ||
57 | DT_MACHINE_START(R7S72100_DT, "Generic R7S72100 (Flattened Device Tree)") | 54 | DT_MACHINE_START(R7S72100_DT, "Generic R7S72100 (Flattened Device Tree)") |
58 | .init_early = r7s72100_init_early, | 55 | .init_early = shmobile_init_delay, |
59 | .dt_compat = r7s72100_boards_compat_dt, | 56 | .dt_compat = r7s72100_boards_compat_dt, |
60 | MACHINE_END | 57 | MACHINE_END |
61 | #endif /* CONFIG_USE_OF */ | 58 | #endif /* CONFIG_USE_OF */ |
diff --git a/arch/arm/mach-shmobile/setup-r8a73a4.c b/arch/arm/mach-shmobile/setup-r8a73a4.c index 9333770cfac2..f470b3cc0b7b 100644 --- a/arch/arm/mach-shmobile/setup-r8a73a4.c +++ b/arch/arm/mach-shmobile/setup-r8a73a4.c | |||
@@ -24,12 +24,14 @@ | |||
24 | #include <linux/serial_sci.h> | 24 | #include <linux/serial_sci.h> |
25 | #include <linux/sh_dma.h> | 25 | #include <linux/sh_dma.h> |
26 | #include <linux/sh_timer.h> | 26 | #include <linux/sh_timer.h> |
27 | #include <mach/common.h> | 27 | |
28 | #include <mach/dma-register.h> | ||
29 | #include <mach/irqs.h> | ||
30 | #include <mach/r8a73a4.h> | ||
31 | #include <asm/mach/arch.h> | 28 | #include <asm/mach/arch.h> |
32 | 29 | ||
30 | #include "common.h" | ||
31 | #include "dma-register.h" | ||
32 | #include "irqs.h" | ||
33 | #include "r8a73a4.h" | ||
34 | |||
33 | static const struct resource pfc_resources[] = { | 35 | static const struct resource pfc_resources[] = { |
34 | DEFINE_RES_MEM(0xe6050000, 0x9000), | 36 | DEFINE_RES_MEM(0xe6050000, 0x9000), |
35 | }; | 37 | }; |
diff --git a/arch/arm/mach-shmobile/setup-r8a7740.c b/arch/arm/mach-shmobile/setup-r8a7740.c index 35dec233301e..348af358a239 100644 --- a/arch/arm/mach-shmobile/setup-r8a7740.c +++ b/arch/arm/mach-shmobile/setup-r8a7740.c | |||
@@ -31,16 +31,18 @@ | |||
31 | #include <linux/sh_dma.h> | 31 | #include <linux/sh_dma.h> |
32 | #include <linux/sh_timer.h> | 32 | #include <linux/sh_timer.h> |
33 | #include <linux/platform_data/sh_ipmmu.h> | 33 | #include <linux/platform_data/sh_ipmmu.h> |
34 | #include <mach/dma-register.h> | 34 | |
35 | #include <mach/r8a7740.h> | ||
36 | #include <mach/pm-rmobile.h> | ||
37 | #include <mach/common.h> | ||
38 | #include <mach/irqs.h> | ||
39 | #include <asm/mach-types.h> | 35 | #include <asm/mach-types.h> |
40 | #include <asm/mach/map.h> | 36 | #include <asm/mach/map.h> |
41 | #include <asm/mach/arch.h> | 37 | #include <asm/mach/arch.h> |
42 | #include <asm/mach/time.h> | 38 | #include <asm/mach/time.h> |
43 | 39 | ||
40 | #include "common.h" | ||
41 | #include "dma-register.h" | ||
42 | #include "irqs.h" | ||
43 | #include "pm-rmobile.h" | ||
44 | #include "r8a7740.h" | ||
45 | |||
44 | static struct map_desc r8a7740_io_desc[] __initdata = { | 46 | static struct map_desc r8a7740_io_desc[] __initdata = { |
45 | /* | 47 | /* |
46 | * for CPGA/INTC/PFC | 48 | * for CPGA/INTC/PFC |
diff --git a/arch/arm/mach-shmobile/setup-r8a7778.c b/arch/arm/mach-shmobile/setup-r8a7778.c index d311ef903b39..2ccc0128b469 100644 --- a/arch/arm/mach-shmobile/setup-r8a7778.c +++ b/arch/arm/mach-shmobile/setup-r8a7778.c | |||
@@ -37,12 +37,14 @@ | |||
37 | #include <linux/usb/ehci_pdriver.h> | 37 | #include <linux/usb/ehci_pdriver.h> |
38 | #include <linux/usb/ohci_pdriver.h> | 38 | #include <linux/usb/ohci_pdriver.h> |
39 | #include <linux/dma-mapping.h> | 39 | #include <linux/dma-mapping.h> |
40 | #include <mach/irqs.h> | 40 | |
41 | #include <mach/r8a7778.h> | ||
42 | #include <mach/common.h> | ||
43 | #include <asm/mach/arch.h> | 41 | #include <asm/mach/arch.h> |
44 | #include <asm/hardware/cache-l2x0.h> | 42 | #include <asm/hardware/cache-l2x0.h> |
45 | 43 | ||
44 | #include "common.h" | ||
45 | #include "irqs.h" | ||
46 | #include "r8a7778.h" | ||
47 | |||
46 | /* SCIF */ | 48 | /* SCIF */ |
47 | #define R8A7778_SCIF(index, baseaddr, irq) \ | 49 | #define R8A7778_SCIF(index, baseaddr, irq) \ |
48 | static struct plat_sci_port scif##index##_platform_data = { \ | 50 | static struct plat_sci_port scif##index##_platform_data = { \ |
diff --git a/arch/arm/mach-shmobile/setup-r8a7779.c b/arch/arm/mach-shmobile/setup-r8a7779.c index aba4ed652d54..8dbc407f4c8d 100644 --- a/arch/arm/mach-shmobile/setup-r8a7779.c +++ b/arch/arm/mach-shmobile/setup-r8a7779.c | |||
@@ -40,15 +40,17 @@ | |||
40 | #include <linux/usb/ehci_pdriver.h> | 40 | #include <linux/usb/ehci_pdriver.h> |
41 | #include <linux/usb/ohci_pdriver.h> | 41 | #include <linux/usb/ohci_pdriver.h> |
42 | #include <linux/pm_runtime.h> | 42 | #include <linux/pm_runtime.h> |
43 | #include <mach/irqs.h> | 43 | |
44 | #include <mach/r8a7779.h> | ||
45 | #include <mach/common.h> | ||
46 | #include <asm/mach-types.h> | 44 | #include <asm/mach-types.h> |
47 | #include <asm/mach/arch.h> | 45 | #include <asm/mach/arch.h> |
48 | #include <asm/mach/time.h> | 46 | #include <asm/mach/time.h> |
49 | #include <asm/mach/map.h> | 47 | #include <asm/mach/map.h> |
50 | #include <asm/hardware/cache-l2x0.h> | 48 | #include <asm/hardware/cache-l2x0.h> |
51 | 49 | ||
50 | #include "common.h" | ||
51 | #include "irqs.h" | ||
52 | #include "r8a7779.h" | ||
53 | |||
52 | static struct map_desc r8a7779_io_desc[] __initdata = { | 54 | static struct map_desc r8a7779_io_desc[] __initdata = { |
53 | /* 2M entity map for 0xf0000000 (MPCORE) */ | 55 | /* 2M entity map for 0xf0000000 (MPCORE) */ |
54 | { | 56 | { |
@@ -640,16 +642,16 @@ static void __init r8a7779_register_hpb_dmae(void) | |||
640 | } | 642 | } |
641 | 643 | ||
642 | static struct platform_device *r8a7779_devices_dt[] __initdata = { | 644 | static struct platform_device *r8a7779_devices_dt[] __initdata = { |
645 | &tmu0_device, | ||
646 | }; | ||
647 | |||
648 | static struct platform_device *r8a7779_standard_devices[] __initdata = { | ||
643 | &scif0_device, | 649 | &scif0_device, |
644 | &scif1_device, | 650 | &scif1_device, |
645 | &scif2_device, | 651 | &scif2_device, |
646 | &scif3_device, | 652 | &scif3_device, |
647 | &scif4_device, | 653 | &scif4_device, |
648 | &scif5_device, | 654 | &scif5_device, |
649 | &tmu0_device, | ||
650 | }; | ||
651 | |||
652 | static struct platform_device *r8a7779_standard_devices[] __initdata = { | ||
653 | &i2c0_device, | 655 | &i2c0_device, |
654 | &i2c1_device, | 656 | &i2c1_device, |
655 | &i2c2_device, | 657 | &i2c2_device, |
@@ -674,16 +676,6 @@ void __init r8a7779_add_standard_devices(void) | |||
674 | r8a7779_register_hpb_dmae(); | 676 | r8a7779_register_hpb_dmae(); |
675 | } | 677 | } |
676 | 678 | ||
677 | /* do nothing for !CONFIG_SMP or !CONFIG_HAVE_TWD */ | ||
678 | void __init __weak r8a7779_register_twd(void) { } | ||
679 | |||
680 | void __init r8a7779_earlytimer_init(void) | ||
681 | { | ||
682 | r8a7779_clock_init(); | ||
683 | r8a7779_register_twd(); | ||
684 | shmobile_earlytimer_init(); | ||
685 | } | ||
686 | |||
687 | void __init r8a7779_add_early_devices(void) | 679 | void __init r8a7779_add_early_devices(void) |
688 | { | 680 | { |
689 | early_platform_add_devices(r8a7779_devices_dt, | 681 | early_platform_add_devices(r8a7779_devices_dt, |
@@ -747,19 +739,28 @@ void __init r8a7779_init_irq_dt(void) | |||
747 | __raw_writel(0x003fee3f, INT2SMSKCR4); | 739 | __raw_writel(0x003fee3f, INT2SMSKCR4); |
748 | } | 740 | } |
749 | 741 | ||
750 | void __init r8a7779_init_delay(void) | 742 | void __init r8a7779_add_standard_devices_dt(void) |
751 | { | 743 | { |
752 | shmobile_setup_delay(1000, 2, 4); /* Cortex-A9 @ 1000MHz */ | 744 | platform_add_devices(r8a7779_devices_dt, |
745 | ARRAY_SIZE(r8a7779_devices_dt)); | ||
753 | } | 746 | } |
754 | 747 | ||
755 | void __init r8a7779_add_standard_devices_dt(void) | 748 | #define MODEMR 0xffcc0020 |
749 | |||
750 | u32 __init r8a7779_read_mode_pins(void) | ||
756 | { | 751 | { |
757 | /* clocks are setup late during boot in the case of DT */ | 752 | static u32 mode; |
758 | r8a7779_clock_init(); | 753 | static bool mode_valid; |
754 | |||
755 | if (!mode_valid) { | ||
756 | void __iomem *modemr = ioremap_nocache(MODEMR, PAGE_SIZE); | ||
757 | BUG_ON(!modemr); | ||
758 | mode = ioread32(modemr); | ||
759 | iounmap(modemr); | ||
760 | mode_valid = true; | ||
761 | } | ||
759 | 762 | ||
760 | platform_add_devices(r8a7779_devices_dt, | 763 | return mode; |
761 | ARRAY_SIZE(r8a7779_devices_dt)); | ||
762 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | ||
763 | } | 764 | } |
764 | 765 | ||
765 | static const char *r8a7779_compat_dt[] __initdata = { | 766 | static const char *r8a7779_compat_dt[] __initdata = { |
@@ -769,7 +770,7 @@ static const char *r8a7779_compat_dt[] __initdata = { | |||
769 | 770 | ||
770 | DT_MACHINE_START(R8A7779_DT, "Generic R8A7779 (Flattened Device Tree)") | 771 | DT_MACHINE_START(R8A7779_DT, "Generic R8A7779 (Flattened Device Tree)") |
771 | .map_io = r8a7779_map_io, | 772 | .map_io = r8a7779_map_io, |
772 | .init_early = r8a7779_init_delay, | 773 | .init_early = shmobile_init_delay, |
773 | .nr_irqs = NR_IRQS_LEGACY, | 774 | .nr_irqs = NR_IRQS_LEGACY, |
774 | .init_irq = r8a7779_init_irq_dt, | 775 | .init_irq = r8a7779_init_irq_dt, |
775 | .init_machine = r8a7779_add_standard_devices_dt, | 776 | .init_machine = r8a7779_add_standard_devices_dt, |
diff --git a/arch/arm/mach-shmobile/setup-r8a7790.c b/arch/arm/mach-shmobile/setup-r8a7790.c index 6bd08b127fa4..c37d82d38617 100644 --- a/arch/arm/mach-shmobile/setup-r8a7790.c +++ b/arch/arm/mach-shmobile/setup-r8a7790.c | |||
@@ -26,12 +26,15 @@ | |||
26 | #include <linux/serial_sci.h> | 26 | #include <linux/serial_sci.h> |
27 | #include <linux/sh_dma.h> | 27 | #include <linux/sh_dma.h> |
28 | #include <linux/sh_timer.h> | 28 | #include <linux/sh_timer.h> |
29 | #include <mach/common.h> | 29 | |
30 | #include <mach/dma-register.h> | ||
31 | #include <mach/irqs.h> | ||
32 | #include <mach/r8a7790.h> | ||
33 | #include <asm/mach/arch.h> | 30 | #include <asm/mach/arch.h> |
34 | 31 | ||
32 | #include "common.h" | ||
33 | #include "dma-register.h" | ||
34 | #include "irqs.h" | ||
35 | #include "r8a7790.h" | ||
36 | #include "rcar-gen2.h" | ||
37 | |||
35 | /* Audio-DMAC */ | 38 | /* Audio-DMAC */ |
36 | #define AUDIO_DMAC_SLAVE(_id, _addr, t, r) \ | 39 | #define AUDIO_DMAC_SLAVE(_id, _addr, t, r) \ |
37 | { \ | 40 | { \ |
@@ -307,13 +310,6 @@ void __init r8a7790_add_standard_devices(void) | |||
307 | r8a7790_register_audio_dmac(1); | 310 | r8a7790_register_audio_dmac(1); |
308 | } | 311 | } |
309 | 312 | ||
310 | void __init r8a7790_init_early(void) | ||
311 | { | ||
312 | #ifndef CONFIG_ARM_ARCH_TIMER | ||
313 | shmobile_setup_delay(1300, 2, 4); /* Cortex-A15 @ 1300MHz */ | ||
314 | #endif | ||
315 | } | ||
316 | |||
317 | #ifdef CONFIG_USE_OF | 313 | #ifdef CONFIG_USE_OF |
318 | 314 | ||
319 | static const char * const r8a7790_boards_compat_dt[] __initconst = { | 315 | static const char * const r8a7790_boards_compat_dt[] __initconst = { |
@@ -323,8 +319,10 @@ static const char * const r8a7790_boards_compat_dt[] __initconst = { | |||
323 | 319 | ||
324 | DT_MACHINE_START(R8A7790_DT, "Generic R8A7790 (Flattened Device Tree)") | 320 | DT_MACHINE_START(R8A7790_DT, "Generic R8A7790 (Flattened Device Tree)") |
325 | .smp = smp_ops(r8a7790_smp_ops), | 321 | .smp = smp_ops(r8a7790_smp_ops), |
326 | .init_early = r8a7790_init_early, | 322 | .init_early = shmobile_init_delay, |
327 | .init_time = rcar_gen2_timer_init, | 323 | .init_time = rcar_gen2_timer_init, |
324 | .init_late = shmobile_init_late, | ||
325 | .reserve = rcar_gen2_reserve, | ||
328 | .dt_compat = r8a7790_boards_compat_dt, | 326 | .dt_compat = r8a7790_boards_compat_dt, |
329 | MACHINE_END | 327 | MACHINE_END |
330 | #endif /* CONFIG_USE_OF */ | 328 | #endif /* CONFIG_USE_OF */ |
diff --git a/arch/arm/mach-shmobile/setup-r8a7791.c b/arch/arm/mach-shmobile/setup-r8a7791.c index 04a96ddb3224..8823324ac5a9 100644 --- a/arch/arm/mach-shmobile/setup-r8a7791.c +++ b/arch/arm/mach-shmobile/setup-r8a7791.c | |||
@@ -26,12 +26,14 @@ | |||
26 | #include <linux/platform_data/irq-renesas-irqc.h> | 26 | #include <linux/platform_data/irq-renesas-irqc.h> |
27 | #include <linux/serial_sci.h> | 27 | #include <linux/serial_sci.h> |
28 | #include <linux/sh_timer.h> | 28 | #include <linux/sh_timer.h> |
29 | #include <mach/common.h> | 29 | |
30 | #include <mach/irqs.h> | ||
31 | #include <mach/r8a7791.h> | ||
32 | #include <mach/rcar-gen2.h> | ||
33 | #include <asm/mach/arch.h> | 30 | #include <asm/mach/arch.h> |
34 | 31 | ||
32 | #include "common.h" | ||
33 | #include "irqs.h" | ||
34 | #include "r8a7791.h" | ||
35 | #include "rcar-gen2.h" | ||
36 | |||
35 | static const struct resource pfc_resources[] __initconst = { | 37 | static const struct resource pfc_resources[] __initconst = { |
36 | DEFINE_RES_MEM(0xe6060000, 0x250), | 38 | DEFINE_RES_MEM(0xe6060000, 0x250), |
37 | }; | 39 | }; |
@@ -217,6 +219,8 @@ DT_MACHINE_START(R8A7791_DT, "Generic R8A7791 (Flattened Device Tree)") | |||
217 | .smp = smp_ops(r8a7791_smp_ops), | 219 | .smp = smp_ops(r8a7791_smp_ops), |
218 | .init_early = shmobile_init_delay, | 220 | .init_early = shmobile_init_delay, |
219 | .init_time = rcar_gen2_timer_init, | 221 | .init_time = rcar_gen2_timer_init, |
222 | .init_late = shmobile_init_late, | ||
223 | .reserve = rcar_gen2_reserve, | ||
220 | .dt_compat = r8a7791_boards_compat_dt, | 224 | .dt_compat = r8a7791_boards_compat_dt, |
221 | MACHINE_END | 225 | MACHINE_END |
222 | #endif /* CONFIG_USE_OF */ | 226 | #endif /* CONFIG_USE_OF */ |
diff --git a/arch/arm/mach-shmobile/setup-rcar-gen2.c b/arch/arm/mach-shmobile/setup-rcar-gen2.c index 542c5a47173f..42d5b4308923 100644 --- a/arch/arm/mach-shmobile/setup-rcar-gen2.c +++ b/arch/arm/mach-shmobile/setup-rcar-gen2.c | |||
@@ -20,11 +20,14 @@ | |||
20 | 20 | ||
21 | #include <linux/clk/shmobile.h> | 21 | #include <linux/clk/shmobile.h> |
22 | #include <linux/clocksource.h> | 22 | #include <linux/clocksource.h> |
23 | #include <linux/device.h> | ||
24 | #include <linux/dma-contiguous.h> | ||
23 | #include <linux/io.h> | 25 | #include <linux/io.h> |
24 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
25 | #include <mach/common.h> | 27 | #include <linux/of_fdt.h> |
26 | #include <mach/rcar-gen2.h> | ||
27 | #include <asm/mach/arch.h> | 28 | #include <asm/mach/arch.h> |
29 | #include "common.h" | ||
30 | #include "rcar-gen2.h" | ||
28 | 31 | ||
29 | #define MODEMR 0xe6160060 | 32 | #define MODEMR 0xe6160060 |
30 | 33 | ||
@@ -110,3 +113,72 @@ void __init rcar_gen2_timer_init(void) | |||
110 | #endif | 113 | #endif |
111 | clocksource_of_init(); | 114 | clocksource_of_init(); |
112 | } | 115 | } |
116 | |||
117 | struct memory_reserve_config { | ||
118 | u64 reserved; | ||
119 | u64 base, size; | ||
120 | }; | ||
121 | |||
122 | static int __init rcar_gen2_scan_mem(unsigned long node, const char *uname, | ||
123 | int depth, void *data) | ||
124 | { | ||
125 | const char *type = of_get_flat_dt_prop(node, "device_type", NULL); | ||
126 | const __be32 *reg, *endp; | ||
127 | int l; | ||
128 | struct memory_reserve_config *mrc = data; | ||
129 | u64 lpae_start = 1ULL << 32; | ||
130 | |||
131 | /* We are scanning "memory" nodes only */ | ||
132 | if (type == NULL || strcmp(type, "memory")) | ||
133 | return 0; | ||
134 | |||
135 | reg = of_get_flat_dt_prop(node, "linux,usable-memory", &l); | ||
136 | if (reg == NULL) | ||
137 | reg = of_get_flat_dt_prop(node, "reg", &l); | ||
138 | if (reg == NULL) | ||
139 | return 0; | ||
140 | |||
141 | endp = reg + (l / sizeof(__be32)); | ||
142 | while ((endp - reg) >= (dt_root_addr_cells + dt_root_size_cells)) { | ||
143 | u64 base, size; | ||
144 | |||
145 | base = dt_mem_next_cell(dt_root_addr_cells, ®); | ||
146 | size = dt_mem_next_cell(dt_root_size_cells, ®); | ||
147 | |||
148 | if (base >= lpae_start) | ||
149 | continue; | ||
150 | |||
151 | if ((base + size) >= lpae_start) | ||
152 | size = lpae_start - base; | ||
153 | |||
154 | if (size < mrc->reserved) | ||
155 | continue; | ||
156 | |||
157 | if (base < mrc->base) | ||
158 | continue; | ||
159 | |||
160 | /* keep the area at top near the 32-bit legacy limit */ | ||
161 | mrc->base = base + size - mrc->reserved; | ||
162 | mrc->size = mrc->reserved; | ||
163 | } | ||
164 | |||
165 | return 0; | ||
166 | } | ||
167 | |||
168 | struct cma *rcar_gen2_dma_contiguous; | ||
169 | |||
170 | void __init rcar_gen2_reserve(void) | ||
171 | { | ||
172 | struct memory_reserve_config mrc; | ||
173 | |||
174 | /* reserve 256 MiB at the top of the physical legacy 32-bit space */ | ||
175 | memset(&mrc, 0, sizeof(mrc)); | ||
176 | mrc.reserved = SZ_256M; | ||
177 | |||
178 | of_scan_flat_dt(rcar_gen2_scan_mem, &mrc); | ||
179 | #ifdef CONFIG_DMA_CMA | ||
180 | if (mrc.size) | ||
181 | dma_contiguous_reserve_area(mrc.size, mrc.base, 0, | ||
182 | &rcar_gen2_dma_contiguous, true); | ||
183 | #endif | ||
184 | } | ||
diff --git a/arch/arm/mach-shmobile/setup-sh7372.c b/arch/arm/mach-shmobile/setup-sh7372.c index 2a8b9f2a2f54..9cdfcdfd38fc 100644 --- a/arch/arm/mach-shmobile/setup-sh7372.c +++ b/arch/arm/mach-shmobile/setup-sh7372.c | |||
@@ -29,20 +29,22 @@ | |||
29 | #include <linux/io.h> | 29 | #include <linux/io.h> |
30 | #include <linux/serial_sci.h> | 30 | #include <linux/serial_sci.h> |
31 | #include <linux/sh_dma.h> | 31 | #include <linux/sh_dma.h> |
32 | #include <linux/sh_intc.h> | ||
33 | #include <linux/sh_timer.h> | 32 | #include <linux/sh_timer.h> |
34 | #include <linux/pm_domain.h> | 33 | #include <linux/pm_domain.h> |
35 | #include <linux/dma-mapping.h> | 34 | #include <linux/dma-mapping.h> |
36 | #include <linux/platform_data/sh_ipmmu.h> | 35 | #include <linux/platform_data/sh_ipmmu.h> |
37 | #include <mach/dma-register.h> | 36 | |
38 | #include <mach/irqs.h> | ||
39 | #include <mach/sh7372.h> | ||
40 | #include <mach/common.h> | ||
41 | #include <asm/mach/map.h> | 37 | #include <asm/mach/map.h> |
42 | #include <asm/mach-types.h> | 38 | #include <asm/mach-types.h> |
43 | #include <asm/mach/arch.h> | 39 | #include <asm/mach/arch.h> |
44 | #include <asm/mach/time.h> | 40 | #include <asm/mach/time.h> |
45 | 41 | ||
42 | #include "common.h" | ||
43 | #include "dma-register.h" | ||
44 | #include "irqs.h" | ||
45 | #include "pm-rmobile.h" | ||
46 | #include "sh7372.h" | ||
47 | |||
46 | static struct map_desc sh7372_io_desc[] __initdata = { | 48 | static struct map_desc sh7372_io_desc[] __initdata = { |
47 | /* create a 1:1 entity map for 0xe6xxxxxx | 49 | /* create a 1:1 entity map for 0xe6xxxxxx |
48 | * used by CPGA, INTC and PFC. | 50 | * used by CPGA, INTC and PFC. |
diff --git a/arch/arm/mach-shmobile/setup-sh73a0.c b/arch/arm/mach-shmobile/setup-sh73a0.c index ad00724a2269..224882151667 100644 --- a/arch/arm/mach-shmobile/setup-sh73a0.c +++ b/arch/arm/mach-shmobile/setup-sh73a0.c | |||
@@ -29,19 +29,20 @@ | |||
29 | #include <linux/io.h> | 29 | #include <linux/io.h> |
30 | #include <linux/serial_sci.h> | 30 | #include <linux/serial_sci.h> |
31 | #include <linux/sh_dma.h> | 31 | #include <linux/sh_dma.h> |
32 | #include <linux/sh_intc.h> | ||
33 | #include <linux/sh_timer.h> | 32 | #include <linux/sh_timer.h> |
34 | #include <linux/platform_data/sh_ipmmu.h> | 33 | #include <linux/platform_data/sh_ipmmu.h> |
35 | #include <linux/platform_data/irq-renesas-intc-irqpin.h> | 34 | #include <linux/platform_data/irq-renesas-intc-irqpin.h> |
36 | #include <mach/dma-register.h> | 35 | |
37 | #include <mach/irqs.h> | ||
38 | #include <mach/sh73a0.h> | ||
39 | #include <mach/common.h> | ||
40 | #include <asm/mach-types.h> | 36 | #include <asm/mach-types.h> |
41 | #include <asm/mach/map.h> | 37 | #include <asm/mach/map.h> |
42 | #include <asm/mach/arch.h> | 38 | #include <asm/mach/arch.h> |
43 | #include <asm/mach/time.h> | 39 | #include <asm/mach/time.h> |
44 | 40 | ||
41 | #include "common.h" | ||
42 | #include "dma-register.h" | ||
43 | #include "irqs.h" | ||
44 | #include "sh73a0.h" | ||
45 | |||
45 | static struct map_desc sh73a0_io_desc[] __initdata = { | 46 | static struct map_desc sh73a0_io_desc[] __initdata = { |
46 | /* create a 1:1 entity map for 0xe6xxxxxx | 47 | /* create a 1:1 entity map for 0xe6xxxxxx |
47 | * used by CPGA, INTC and PFC. | 48 | * used by CPGA, INTC and PFC. |
diff --git a/arch/arm/mach-shmobile/include/mach/sh7372.h b/arch/arm/mach-shmobile/sh7372.h index 854a9f0ca040..4ad960d5075b 100644 --- a/arch/arm/mach-shmobile/include/mach/sh7372.h +++ b/arch/arm/mach-shmobile/sh7372.h | |||
@@ -11,10 +11,6 @@ | |||
11 | #ifndef __ASM_SH7372_H__ | 11 | #ifndef __ASM_SH7372_H__ |
12 | #define __ASM_SH7372_H__ | 12 | #define __ASM_SH7372_H__ |
13 | 13 | ||
14 | #include <linux/sh_clk.h> | ||
15 | #include <linux/pm_domain.h> | ||
16 | #include <mach/pm-rmobile.h> | ||
17 | |||
18 | /* DMA slave IDs */ | 14 | /* DMA slave IDs */ |
19 | enum { | 15 | enum { |
20 | SHDMA_SLAVE_INVALID, | 16 | SHDMA_SLAVE_INVALID, |
diff --git a/arch/arm/mach-shmobile/include/mach/sh73a0.h b/arch/arm/mach-shmobile/sh73a0.h index 359b582dc270..359b582dc270 100644 --- a/arch/arm/mach-shmobile/include/mach/sh73a0.h +++ b/arch/arm/mach-shmobile/sh73a0.h | |||
diff --git a/arch/arm/mach-shmobile/smp-emev2.c b/arch/arm/mach-shmobile/smp-emev2.c index 2dfd748da7f3..6ff1df1df9a7 100644 --- a/arch/arm/mach-shmobile/smp-emev2.c +++ b/arch/arm/mach-shmobile/smp-emev2.c | |||
@@ -23,9 +23,9 @@ | |||
23 | #include <linux/spinlock.h> | 23 | #include <linux/spinlock.h> |
24 | #include <linux/io.h> | 24 | #include <linux/io.h> |
25 | #include <linux/delay.h> | 25 | #include <linux/delay.h> |
26 | #include <mach/common.h> | ||
27 | #include <asm/smp_plat.h> | 26 | #include <asm/smp_plat.h> |
28 | #include <asm/smp_scu.h> | 27 | #include <asm/smp_scu.h> |
28 | #include "common.h" | ||
29 | 29 | ||
30 | #define EMEV2_SCU_BASE 0x1e000000 | 30 | #define EMEV2_SCU_BASE 0x1e000000 |
31 | #define EMEV2_SMU_BASE 0xe0110000 | 31 | #define EMEV2_SMU_BASE 0xe0110000 |
diff --git a/arch/arm/mach-shmobile/smp-r8a7779.c b/arch/arm/mach-shmobile/smp-r8a7779.c index e7a3201473d0..3100e355c3fd 100644 --- a/arch/arm/mach-shmobile/smp-r8a7779.c +++ b/arch/arm/mach-shmobile/smp-r8a7779.c | |||
@@ -23,14 +23,16 @@ | |||
23 | #include <linux/spinlock.h> | 23 | #include <linux/spinlock.h> |
24 | #include <linux/io.h> | 24 | #include <linux/io.h> |
25 | #include <linux/delay.h> | 25 | #include <linux/delay.h> |
26 | #include <mach/common.h> | 26 | |
27 | #include <mach/pm-rcar.h> | ||
28 | #include <mach/r8a7779.h> | ||
29 | #include <asm/cacheflush.h> | 27 | #include <asm/cacheflush.h> |
30 | #include <asm/smp_plat.h> | 28 | #include <asm/smp_plat.h> |
31 | #include <asm/smp_scu.h> | 29 | #include <asm/smp_scu.h> |
32 | #include <asm/smp_twd.h> | 30 | #include <asm/smp_twd.h> |
33 | 31 | ||
32 | #include "common.h" | ||
33 | #include "pm-rcar.h" | ||
34 | #include "r8a7779.h" | ||
35 | |||
34 | #define AVECR IOMEM(0xfe700040) | 36 | #define AVECR IOMEM(0xfe700040) |
35 | #define R8A7779_SCU_BASE 0xf0000000 | 37 | #define R8A7779_SCU_BASE 0xf0000000 |
36 | 38 | ||
diff --git a/arch/arm/mach-shmobile/smp-r8a7790.c b/arch/arm/mach-shmobile/smp-r8a7790.c index 591052799e8f..2311694636e1 100644 --- a/arch/arm/mach-shmobile/smp-r8a7790.c +++ b/arch/arm/mach-shmobile/smp-r8a7790.c | |||
@@ -17,17 +17,12 @@ | |||
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | #include <linux/smp.h> | 18 | #include <linux/smp.h> |
19 | #include <linux/io.h> | 19 | #include <linux/io.h> |
20 | |||
20 | #include <asm/smp_plat.h> | 21 | #include <asm/smp_plat.h> |
21 | #include <mach/common.h> | ||
22 | #include <mach/pm-rcar.h> | ||
23 | #include <mach/r8a7790.h> | ||
24 | 22 | ||
25 | #define RST 0xe6160000 | 23 | #include "common.h" |
26 | #define CA15BAR 0x0020 | 24 | #include "pm-rcar.h" |
27 | #define CA7BAR 0x0030 | 25 | #include "r8a7790.h" |
28 | #define CA15RESCNT 0x0040 | ||
29 | #define CA7RESCNT 0x0044 | ||
30 | #define MERAM 0xe8080000 | ||
31 | 26 | ||
32 | static struct rcar_sysc_ch r8a7790_ca15_scu = { | 27 | static struct rcar_sysc_ch r8a7790_ca15_scu = { |
33 | .chan_offs = 0x180, /* PWRSR5 .. PWRER5 */ | 28 | .chan_offs = 0x180, /* PWRSR5 .. PWRER5 */ |
@@ -41,32 +36,9 @@ static struct rcar_sysc_ch r8a7790_ca7_scu = { | |||
41 | 36 | ||
42 | static void __init r8a7790_smp_prepare_cpus(unsigned int max_cpus) | 37 | static void __init r8a7790_smp_prepare_cpus(unsigned int max_cpus) |
43 | { | 38 | { |
44 | void __iomem *p; | ||
45 | u32 bar; | ||
46 | |||
47 | /* let APMU code install data related to shmobile_boot_vector */ | 39 | /* let APMU code install data related to shmobile_boot_vector */ |
48 | shmobile_smp_apmu_prepare_cpus(max_cpus); | 40 | shmobile_smp_apmu_prepare_cpus(max_cpus); |
49 | 41 | ||
50 | /* MERAM for jump stub, because BAR requires 256KB aligned address */ | ||
51 | p = ioremap_nocache(MERAM, shmobile_boot_size); | ||
52 | memcpy_toio(p, shmobile_boot_vector, shmobile_boot_size); | ||
53 | iounmap(p); | ||
54 | |||
55 | /* setup reset vectors */ | ||
56 | p = ioremap_nocache(RST, 0x63); | ||
57 | bar = (MERAM >> 8) & 0xfffffc00; | ||
58 | writel_relaxed(bar, p + CA15BAR); | ||
59 | writel_relaxed(bar, p + CA7BAR); | ||
60 | writel_relaxed(bar | 0x10, p + CA15BAR); | ||
61 | writel_relaxed(bar | 0x10, p + CA7BAR); | ||
62 | |||
63 | /* enable clocks to all CPUs */ | ||
64 | writel_relaxed((readl_relaxed(p + CA15RESCNT) & ~0x0f) | 0xa5a50000, | ||
65 | p + CA15RESCNT); | ||
66 | writel_relaxed((readl_relaxed(p + CA7RESCNT) & ~0x0f) | 0x5a5a0000, | ||
67 | p + CA7RESCNT); | ||
68 | iounmap(p); | ||
69 | |||
70 | /* turn on power to SCU */ | 42 | /* turn on power to SCU */ |
71 | r8a7790_pm_init(); | 43 | r8a7790_pm_init(); |
72 | rcar_sysc_power_up(&r8a7790_ca15_scu); | 44 | rcar_sysc_power_up(&r8a7790_ca15_scu); |
diff --git a/arch/arm/mach-shmobile/smp-r8a7791.c b/arch/arm/mach-shmobile/smp-r8a7791.c index ec979529f30f..f743386166fb 100644 --- a/arch/arm/mach-shmobile/smp-r8a7791.c +++ b/arch/arm/mach-shmobile/smp-r8a7791.c | |||
@@ -17,39 +17,19 @@ | |||
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | #include <linux/smp.h> | 18 | #include <linux/smp.h> |
19 | #include <linux/io.h> | 19 | #include <linux/io.h> |
20 | |||
20 | #include <asm/smp_plat.h> | 21 | #include <asm/smp_plat.h> |
21 | #include <mach/common.h> | ||
22 | #include <mach/r8a7791.h> | ||
23 | #include <mach/rcar-gen2.h> | ||
24 | 22 | ||
25 | #define RST 0xe6160000 | 23 | #include "common.h" |
26 | #define CA15BAR 0x0020 | 24 | #include "r8a7791.h" |
27 | #define CA15RESCNT 0x0040 | 25 | #include "rcar-gen2.h" |
28 | #define RAM 0xe6300000 | ||
29 | 26 | ||
30 | static void __init r8a7791_smp_prepare_cpus(unsigned int max_cpus) | 27 | static void __init r8a7791_smp_prepare_cpus(unsigned int max_cpus) |
31 | { | 28 | { |
32 | void __iomem *p; | ||
33 | u32 bar; | ||
34 | |||
35 | /* let APMU code install data related to shmobile_boot_vector */ | 29 | /* let APMU code install data related to shmobile_boot_vector */ |
36 | shmobile_smp_apmu_prepare_cpus(max_cpus); | 30 | shmobile_smp_apmu_prepare_cpus(max_cpus); |
37 | 31 | ||
38 | /* RAM for jump stub, because BAR requires 256KB aligned address */ | 32 | r8a7791_pm_init(); |
39 | p = ioremap_nocache(RAM, shmobile_boot_size); | ||
40 | memcpy_toio(p, shmobile_boot_vector, shmobile_boot_size); | ||
41 | iounmap(p); | ||
42 | |||
43 | /* setup reset vectors */ | ||
44 | p = ioremap_nocache(RST, 0x63); | ||
45 | bar = (RAM >> 8) & 0xfffffc00; | ||
46 | writel_relaxed(bar, p + CA15BAR); | ||
47 | writel_relaxed(bar | 0x10, p + CA15BAR); | ||
48 | |||
49 | /* enable clocks to all CPUs */ | ||
50 | writel_relaxed((readl_relaxed(p + CA15RESCNT) & ~0x0f) | 0xa5a50000, | ||
51 | p + CA15RESCNT); | ||
52 | iounmap(p); | ||
53 | } | 33 | } |
54 | 34 | ||
55 | static int r8a7791_smp_boot_secondary(unsigned int cpu, | 35 | static int r8a7791_smp_boot_secondary(unsigned int cpu, |
diff --git a/arch/arm/mach-shmobile/smp-sh73a0.c b/arch/arm/mach-shmobile/smp-sh73a0.c index 13ba36a6831f..22d8f87b23e9 100644 --- a/arch/arm/mach-shmobile/smp-sh73a0.c +++ b/arch/arm/mach-shmobile/smp-sh73a0.c | |||
@@ -22,11 +22,13 @@ | |||
22 | #include <linux/smp.h> | 22 | #include <linux/smp.h> |
23 | #include <linux/io.h> | 23 | #include <linux/io.h> |
24 | #include <linux/delay.h> | 24 | #include <linux/delay.h> |
25 | #include <mach/common.h> | 25 | |
26 | #include <mach/sh73a0.h> | ||
27 | #include <asm/smp_plat.h> | 26 | #include <asm/smp_plat.h> |
28 | #include <asm/smp_twd.h> | 27 | #include <asm/smp_twd.h> |
29 | 28 | ||
29 | #include "common.h" | ||
30 | #include "sh73a0.h" | ||
31 | |||
30 | #define WUPCR IOMEM(0xe6151010) | 32 | #define WUPCR IOMEM(0xe6151010) |
31 | #define SRESCR IOMEM(0xe6151018) | 33 | #define SRESCR IOMEM(0xe6151018) |
32 | #define PSTR IOMEM(0xe6151040) | 34 | #define PSTR IOMEM(0xe6151040) |
diff --git a/arch/arm/mach-shmobile/timer.c b/arch/arm/mach-shmobile/timer.c index 68bc0b82226d..942efdc82a62 100644 --- a/arch/arm/mach-shmobile/timer.c +++ b/arch/arm/mach-shmobile/timer.c | |||
@@ -59,29 +59,37 @@ void __init shmobile_setup_delay(unsigned int max_cpu_core_mhz, | |||
59 | 59 | ||
60 | void __init shmobile_init_delay(void) | 60 | void __init shmobile_init_delay(void) |
61 | { | 61 | { |
62 | struct device_node *np, *parent; | 62 | struct device_node *np, *cpus; |
63 | u32 max_freq, freq; | 63 | bool is_a8_a9 = false; |
64 | 64 | bool is_a15 = false; | |
65 | max_freq = 0; | 65 | u32 max_freq = 0; |
66 | 66 | ||
67 | parent = of_find_node_by_path("/cpus"); | 67 | cpus = of_find_node_by_path("/cpus"); |
68 | if (parent) { | 68 | if (!cpus) |
69 | for_each_child_of_node(parent, np) { | 69 | return; |
70 | if (!of_property_read_u32(np, "clock-frequency", &freq)) | 70 | |
71 | max_freq = max(max_freq, freq); | 71 | for_each_child_of_node(cpus, np) { |
72 | } | 72 | u32 freq; |
73 | of_node_put(parent); | 73 | |
74 | } | 74 | if (!of_property_read_u32(np, "clock-frequency", &freq)) |
75 | max_freq = max(max_freq, freq); | ||
75 | 76 | ||
76 | if (max_freq) { | 77 | if (of_device_is_compatible(np, "arm,cortex-a8") || |
77 | if (of_find_compatible_node(NULL, NULL, "arm,cortex-a8")) | 78 | of_device_is_compatible(np, "arm,cortex-a9")) |
78 | shmobile_setup_delay_hz(max_freq, 1, 3); | 79 | is_a8_a9 = true; |
79 | else if (of_find_compatible_node(NULL, NULL, "arm,cortex-a9")) | 80 | else if (of_device_is_compatible(np, "arm,cortex-a15")) |
80 | shmobile_setup_delay_hz(max_freq, 1, 3); | 81 | is_a15 = true; |
81 | else if (of_find_compatible_node(NULL, NULL, "arm,cortex-a15")) | ||
82 | if (!IS_ENABLED(CONFIG_ARM_ARCH_TIMER)) | ||
83 | shmobile_setup_delay_hz(max_freq, 2, 4); | ||
84 | } | 82 | } |
83 | |||
84 | of_node_put(cpus); | ||
85 | |||
86 | if (!max_freq) | ||
87 | return; | ||
88 | |||
89 | if (is_a8_a9) | ||
90 | shmobile_setup_delay_hz(max_freq, 1, 3); | ||
91 | else if (is_a15 && !IS_ENABLED(CONFIG_ARM_ARCH_TIMER)) | ||
92 | shmobile_setup_delay_hz(max_freq, 2, 4); | ||
85 | } | 93 | } |
86 | 94 | ||
87 | static void __init shmobile_late_time_init(void) | 95 | static void __init shmobile_late_time_init(void) |
diff --git a/arch/arm/mach-spear/Kconfig b/arch/arm/mach-spear/Kconfig index 0786249b2832..90df2022276a 100644 --- a/arch/arm/mach-spear/Kconfig +++ b/arch/arm/mach-spear/Kconfig | |||
@@ -14,7 +14,6 @@ if PLAT_SPEAR | |||
14 | config ARCH_SPEAR13XX | 14 | config ARCH_SPEAR13XX |
15 | bool "ST SPEAr13xx" | 15 | bool "ST SPEAr13xx" |
16 | depends on ARCH_MULTI_V7 || PLAT_SPEAR_SINGLE | 16 | depends on ARCH_MULTI_V7 || PLAT_SPEAR_SINGLE |
17 | select ARCH_HAS_CPUFREQ | ||
18 | select ARM_GIC | 17 | select ARM_GIC |
19 | select GPIO_SPEAR_SPICS | 18 | select GPIO_SPEAR_SPICS |
20 | select HAVE_ARM_SCU if SMP | 19 | select HAVE_ARM_SCU if SMP |
diff --git a/arch/arm/mach-sti/Kconfig b/arch/arm/mach-sti/Kconfig index abf9ee9bbc3f..878e9ec97d0f 100644 --- a/arch/arm/mach-sti/Kconfig +++ b/arch/arm/mach-sti/Kconfig | |||
@@ -1,5 +1,5 @@ | |||
1 | menuconfig ARCH_STI | 1 | menuconfig ARCH_STI |
2 | bool "STMicroelectronics Consumer Electronics SOCs with Device Trees" if ARCH_MULTI_V7 | 2 | bool "STMicroelectronics Consumer Electronics SOCs" if ARCH_MULTI_V7 |
3 | select ARM_GIC | 3 | select ARM_GIC |
4 | select ARM_GLOBAL_TIMER | 4 | select ARM_GLOBAL_TIMER |
5 | select PINCTRL | 5 | select PINCTRL |
@@ -11,8 +11,8 @@ menuconfig ARCH_STI | |||
11 | select ARM_ERRATA_754322 | 11 | select ARM_ERRATA_754322 |
12 | select ARM_ERRATA_764369 if SMP | 12 | select ARM_ERRATA_764369 if SMP |
13 | select ARM_ERRATA_775420 | 13 | select ARM_ERRATA_775420 |
14 | select PL310_ERRATA_753970 if CACHE_PL310 | 14 | select PL310_ERRATA_753970 if CACHE_L2X0 |
15 | select PL310_ERRATA_769419 if CACHE_PL310 | 15 | select PL310_ERRATA_769419 if CACHE_L2X0 |
16 | help | 16 | help |
17 | Include support for STiH41x SOCs like STiH415/416 using the device tree | 17 | Include support for STiH41x SOCs like STiH415/416 using the device tree |
18 | for discovery | 18 | for discovery |
diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig index e16999e5b735..095399618ca5 100644 --- a/arch/arm/mach-tegra/Kconfig +++ b/arch/arm/mach-tegra/Kconfig | |||
@@ -1,6 +1,5 @@ | |||
1 | config ARCH_TEGRA | 1 | menuconfig ARCH_TEGRA |
2 | bool "NVIDIA Tegra" if ARCH_MULTI_V7 | 2 | bool "NVIDIA Tegra" if ARCH_MULTI_V7 |
3 | select ARCH_HAS_CPUFREQ | ||
4 | select ARCH_REQUIRE_GPIOLIB | 3 | select ARCH_REQUIRE_GPIOLIB |
5 | select ARCH_SUPPORTS_TRUSTED_FOUNDATIONS | 4 | select ARCH_SUPPORTS_TRUSTED_FOUNDATIONS |
6 | select ARM_GIC | 5 | select ARM_GIC |
@@ -16,8 +15,7 @@ config ARCH_TEGRA | |||
16 | help | 15 | help |
17 | This enables support for NVIDIA Tegra based systems. | 16 | This enables support for NVIDIA Tegra based systems. |
18 | 17 | ||
19 | menu "NVIDIA Tegra options" | 18 | if ARCH_TEGRA |
20 | depends on ARCH_TEGRA | ||
21 | 19 | ||
22 | config ARCH_TEGRA_2x_SOC | 20 | config ARCH_TEGRA_2x_SOC |
23 | bool "Enable support for Tegra20 family" | 21 | bool "Enable support for Tegra20 family" |
@@ -69,4 +67,4 @@ config TEGRA_AHB | |||
69 | which controls AHB bus master arbitration and some | 67 | which controls AHB bus master arbitration and some |
70 | performance parameters(priority, prefech size). | 68 | performance parameters(priority, prefech size). |
71 | 69 | ||
72 | endmenu | 70 | endif |
diff --git a/arch/arm/mach-u300/Kconfig b/arch/arm/mach-u300/Kconfig index e3a96d7302e9..bc51a71394af 100644 --- a/arch/arm/mach-u300/Kconfig +++ b/arch/arm/mach-u300/Kconfig | |||
@@ -1,4 +1,4 @@ | |||
1 | config ARCH_U300 | 1 | menuconfig ARCH_U300 |
2 | bool "ST-Ericsson U300 Series" if ARCH_MULTI_V5 | 2 | bool "ST-Ericsson U300 Series" if ARCH_MULTI_V5 |
3 | depends on MMU | 3 | depends on MMU |
4 | select ARCH_REQUIRE_GPIOLIB | 4 | select ARCH_REQUIRE_GPIOLIB |
@@ -16,8 +16,6 @@ config ARCH_U300 | |||
16 | 16 | ||
17 | if ARCH_U300 | 17 | if ARCH_U300 |
18 | 18 | ||
19 | menu "ST-Ericsson AB U300/U335 Platform" | ||
20 | |||
21 | config MACH_U300 | 19 | config MACH_U300 |
22 | depends on ARCH_U300 | 20 | depends on ARCH_U300 |
23 | bool "U300" | 21 | bool "U300" |
@@ -43,6 +41,4 @@ config MACH_U300_SPIDUMMY | |||
43 | you don't need it. Selecting this will activate the | 41 | you don't need it. Selecting this will activate the |
44 | SPI framework and ARM PL022 support. | 42 | SPI framework and ARM PL022 support. |
45 | 43 | ||
46 | endmenu | ||
47 | |||
48 | endif | 44 | endif |
diff --git a/arch/arm/mach-ux500/Kconfig b/arch/arm/mach-ux500/Kconfig index b41a42da1505..699e8601dbf0 100644 --- a/arch/arm/mach-ux500/Kconfig +++ b/arch/arm/mach-ux500/Kconfig | |||
@@ -1,9 +1,8 @@ | |||
1 | config ARCH_U8500 | 1 | menuconfig ARCH_U8500 |
2 | bool "ST-Ericsson U8500 Series" if ARCH_MULTI_V7 | 2 | bool "ST-Ericsson U8500 Series" if ARCH_MULTI_V7 |
3 | depends on MMU | 3 | depends on MMU |
4 | select AB8500_CORE | 4 | select AB8500_CORE |
5 | select ABX500_CORE | 5 | select ABX500_CORE |
6 | select ARCH_HAS_CPUFREQ | ||
7 | select ARCH_REQUIRE_GPIOLIB | 6 | select ARCH_REQUIRE_GPIOLIB |
8 | select ARM_AMBA | 7 | select ARM_AMBA |
9 | select ARM_ERRATA_754322 | 8 | select ARM_ERRATA_754322 |
@@ -16,7 +15,7 @@ config ARCH_U8500 | |||
16 | select PINCTRL | 15 | select PINCTRL |
17 | select PINCTRL_ABX500 | 16 | select PINCTRL_ABX500 |
18 | select PINCTRL_NOMADIK | 17 | select PINCTRL_NOMADIK |
19 | select PL310_ERRATA_753970 if CACHE_PL310 | 18 | select PL310_ERRATA_753970 if CACHE_L2X0 |
20 | help | 19 | help |
21 | Support for ST-Ericsson's Ux500 architecture | 20 | Support for ST-Ericsson's Ux500 architecture |
22 | 21 | ||
@@ -34,8 +33,6 @@ config UX500_SOC_DB8500 | |||
34 | select REGULATOR | 33 | select REGULATOR |
35 | select REGULATOR_DB8500_PRCMU | 34 | select REGULATOR_DB8500_PRCMU |
36 | 35 | ||
37 | menu "Ux500 target platform (boards)" | ||
38 | |||
39 | config MACH_MOP500 | 36 | config MACH_MOP500 |
40 | bool "U8500 Development platform, MOP500 versions" | 37 | bool "U8500 Development platform, MOP500 versions" |
41 | select I2C | 38 | select I2C |
@@ -68,8 +65,6 @@ config UX500_AUTO_PLATFORM | |||
68 | a working kernel. If everything else is disabled, this | 65 | a working kernel. If everything else is disabled, this |
69 | automatically enables MACH_MOP500. | 66 | automatically enables MACH_MOP500. |
70 | 67 | ||
71 | endmenu | ||
72 | |||
73 | config UX500_DEBUG_UART | 68 | config UX500_DEBUG_UART |
74 | int "Ux500 UART to use for low-level debug" | 69 | int "Ux500 UART to use for low-level debug" |
75 | default 2 | 70 | default 2 |
diff --git a/arch/arm/mach-versatile/versatile_dt.c b/arch/arm/mach-versatile/versatile_dt.c index 3621b000a0f6..9f9bc61ca64b 100644 --- a/arch/arm/mach-versatile/versatile_dt.c +++ b/arch/arm/mach-versatile/versatile_dt.c | |||
@@ -44,7 +44,6 @@ static const char *versatile_dt_match[] __initconst = { | |||
44 | DT_MACHINE_START(VERSATILE_PB, "ARM-Versatile (Device Tree Support)") | 44 | DT_MACHINE_START(VERSATILE_PB, "ARM-Versatile (Device Tree Support)") |
45 | .map_io = versatile_map_io, | 45 | .map_io = versatile_map_io, |
46 | .init_early = versatile_init_early, | 46 | .init_early = versatile_init_early, |
47 | .init_irq = versatile_init_irq, | ||
48 | .init_machine = versatile_dt_init, | 47 | .init_machine = versatile_dt_init, |
49 | .dt_compat = versatile_dt_match, | 48 | .dt_compat = versatile_dt_match, |
50 | .restart = versatile_restart, | 49 | .restart = versatile_restart, |
diff --git a/arch/arm/mach-vexpress/Kconfig b/arch/arm/mach-vexpress/Kconfig index 90249cfc37b3..d8b9330f896a 100644 --- a/arch/arm/mach-vexpress/Kconfig +++ b/arch/arm/mach-vexpress/Kconfig | |||
@@ -1,4 +1,4 @@ | |||
1 | config ARCH_VEXPRESS | 1 | menuconfig ARCH_VEXPRESS |
2 | bool "ARM Ltd. Versatile Express family" if ARCH_MULTI_V7 | 2 | bool "ARM Ltd. Versatile Express family" if ARCH_MULTI_V7 |
3 | select ARCH_REQUIRE_GPIOLIB | 3 | select ARCH_REQUIRE_GPIOLIB |
4 | select ARCH_SUPPORTS_BIG_ENDIAN | 4 | select ARCH_SUPPORTS_BIG_ENDIAN |
@@ -37,14 +37,13 @@ config ARCH_VEXPRESS | |||
37 | platforms. The traditional (ATAGs) boot method is not usable on | 37 | platforms. The traditional (ATAGs) boot method is not usable on |
38 | these boards with this option. | 38 | these boards with this option. |
39 | 39 | ||
40 | menu "Versatile Express platform type" | 40 | if ARCH_VEXPRESS |
41 | depends on ARCH_VEXPRESS | ||
42 | 41 | ||
43 | config ARCH_VEXPRESS_CORTEX_A5_A9_ERRATA | 42 | config ARCH_VEXPRESS_CORTEX_A5_A9_ERRATA |
44 | bool "Enable A5 and A9 only errata work-arounds" | 43 | bool "Enable A5 and A9 only errata work-arounds" |
45 | default y | 44 | default y |
46 | select ARM_ERRATA_720789 | 45 | select ARM_ERRATA_720789 |
47 | select PL310_ERRATA_753970 if CACHE_PL310 | 46 | select PL310_ERRATA_753970 if CACHE_L2X0 |
48 | help | 47 | help |
49 | Provides common dependencies for Versatile Express platforms | 48 | Provides common dependencies for Versatile Express platforms |
50 | based on Cortex-A5 and Cortex-A9 processors. In order to | 49 | based on Cortex-A5 and Cortex-A9 processors. In order to |
@@ -65,7 +64,6 @@ config ARCH_VEXPRESS_DCSCB | |||
65 | 64 | ||
66 | config ARCH_VEXPRESS_SPC | 65 | config ARCH_VEXPRESS_SPC |
67 | bool "Versatile Express Serial Power Controller (SPC)" | 66 | bool "Versatile Express Serial Power Controller (SPC)" |
68 | select ARCH_HAS_CPUFREQ | ||
69 | select ARCH_HAS_OPP | 67 | select ARCH_HAS_OPP |
70 | select PM_OPP | 68 | select PM_OPP |
71 | help | 69 | help |
@@ -83,4 +81,4 @@ config ARCH_VEXPRESS_TC2_PM | |||
83 | Support for CPU and cluster power management on Versatile Express | 81 | Support for CPU and cluster power management on Versatile Express |
84 | with a TC2 (A15x2 A7x3) big.LITTLE core tile. | 82 | with a TC2 (A15x2 A7x3) big.LITTLE core tile. |
85 | 83 | ||
86 | endmenu | 84 | endif |
diff --git a/arch/arm/mach-vt8500/Kconfig b/arch/arm/mach-vt8500/Kconfig index 08f56a41cb55..aaaa24fe4d71 100644 --- a/arch/arm/mach-vt8500/Kconfig +++ b/arch/arm/mach-vt8500/Kconfig | |||
@@ -1,6 +1,5 @@ | |||
1 | config ARCH_VT8500 | 1 | config ARCH_VT8500 |
2 | bool | 2 | bool |
3 | select ARCH_HAS_CPUFREQ | ||
4 | select ARCH_REQUIRE_GPIOLIB | 3 | select ARCH_REQUIRE_GPIOLIB |
5 | select CLKDEV_LOOKUP | 4 | select CLKDEV_LOOKUP |
6 | select VT8500_TIMER | 5 | select VT8500_TIMER |
diff --git a/arch/arm/mach-zynq/Kconfig b/arch/arm/mach-zynq/Kconfig index 573e0db1d0f0..0c164f81e72d 100644 --- a/arch/arm/mach-zynq/Kconfig +++ b/arch/arm/mach-zynq/Kconfig | |||
@@ -1,6 +1,5 @@ | |||
1 | config ARCH_ZYNQ | 1 | config ARCH_ZYNQ |
2 | bool "Xilinx Zynq ARM Cortex A9 Platform" if ARCH_MULTI_V7 | 2 | bool "Xilinx Zynq ARM Cortex A9 Platform" if ARCH_MULTI_V7 |
3 | select ARCH_HAS_CPUFREQ | ||
4 | select ARCH_HAS_OPP | 3 | select ARCH_HAS_OPP |
5 | select ARCH_SUPPORTS_BIG_ENDIAN | 4 | select ARCH_SUPPORTS_BIG_ENDIAN |
6 | select ARM_AMBA | 5 | select ARM_AMBA |
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig index eda0dd0ab97b..c348eaee7ee2 100644 --- a/arch/arm/mm/Kconfig +++ b/arch/arm/mm/Kconfig | |||
@@ -889,9 +889,10 @@ config CACHE_L2X0 | |||
889 | help | 889 | help |
890 | This option enables the L2x0 PrimeCell. | 890 | This option enables the L2x0 PrimeCell. |
891 | 891 | ||
892 | if CACHE_L2X0 | ||
893 | |||
892 | config CACHE_PL310 | 894 | config CACHE_PL310 |
893 | bool | 895 | bool |
894 | depends on CACHE_L2X0 | ||
895 | default y if CPU_V7 && !(CPU_V6 || CPU_V6K) | 896 | default y if CPU_V7 && !(CPU_V6 || CPU_V6K) |
896 | help | 897 | help |
897 | This option enables optimisations for the PL310 cache | 898 | This option enables optimisations for the PL310 cache |
@@ -899,7 +900,6 @@ config CACHE_PL310 | |||
899 | 900 | ||
900 | config PL310_ERRATA_588369 | 901 | config PL310_ERRATA_588369 |
901 | bool "PL310 errata: Clean & Invalidate maintenance operations do not invalidate clean lines" | 902 | bool "PL310 errata: Clean & Invalidate maintenance operations do not invalidate clean lines" |
902 | depends on CACHE_L2X0 | ||
903 | help | 903 | help |
904 | The PL310 L2 cache controller implements three types of Clean & | 904 | The PL310 L2 cache controller implements three types of Clean & |
905 | Invalidate maintenance operations: by Physical Address | 905 | Invalidate maintenance operations: by Physical Address |
@@ -912,7 +912,6 @@ config PL310_ERRATA_588369 | |||
912 | 912 | ||
913 | config PL310_ERRATA_727915 | 913 | config PL310_ERRATA_727915 |
914 | bool "PL310 errata: Background Clean & Invalidate by Way operation can cause data corruption" | 914 | bool "PL310 errata: Background Clean & Invalidate by Way operation can cause data corruption" |
915 | depends on CACHE_L2X0 | ||
916 | help | 915 | help |
917 | PL310 implements the Clean & Invalidate by Way L2 cache maintenance | 916 | PL310 implements the Clean & Invalidate by Way L2 cache maintenance |
918 | operation (offset 0x7FC). This operation runs in background so that | 917 | operation (offset 0x7FC). This operation runs in background so that |
@@ -923,7 +922,6 @@ config PL310_ERRATA_727915 | |||
923 | 922 | ||
924 | config PL310_ERRATA_753970 | 923 | config PL310_ERRATA_753970 |
925 | bool "PL310 errata: cache sync operation may be faulty" | 924 | bool "PL310 errata: cache sync operation may be faulty" |
926 | depends on CACHE_PL310 | ||
927 | help | 925 | help |
928 | This option enables the workaround for the 753970 PL310 (r3p0) erratum. | 926 | This option enables the workaround for the 753970 PL310 (r3p0) erratum. |
929 | 927 | ||
@@ -938,7 +936,6 @@ config PL310_ERRATA_753970 | |||
938 | 936 | ||
939 | config PL310_ERRATA_769419 | 937 | config PL310_ERRATA_769419 |
940 | bool "PL310 errata: no automatic Store Buffer drain" | 938 | bool "PL310 errata: no automatic Store Buffer drain" |
941 | depends on CACHE_L2X0 | ||
942 | help | 939 | help |
943 | On revisions of the PL310 prior to r3p2, the Store Buffer does | 940 | On revisions of the PL310 prior to r3p2, the Store Buffer does |
944 | not automatically drain. This can cause normal, non-cacheable | 941 | not automatically drain. This can cause normal, non-cacheable |
@@ -948,6 +945,8 @@ config PL310_ERRATA_769419 | |||
948 | on systems with an outer cache, the store buffer is drained | 945 | on systems with an outer cache, the store buffer is drained |
949 | explicitly. | 946 | explicitly. |
950 | 947 | ||
948 | endif | ||
949 | |||
951 | config CACHE_TAUROS2 | 950 | config CACHE_TAUROS2 |
952 | bool "Enable the Tauros2 L2 cache controller" | 951 | bool "Enable the Tauros2 L2 cache controller" |
953 | depends on (ARCH_DOVE || ARCH_MMP || CPU_PJ4) | 952 | depends on (ARCH_DOVE || ARCH_MMP || CPU_PJ4) |
diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c index efc5cabf70e0..076172b69422 100644 --- a/arch/arm/mm/cache-l2x0.c +++ b/arch/arm/mm/cache-l2x0.c | |||
@@ -1069,6 +1069,33 @@ static const struct l2c_init_data of_l2c310_data __initconst = { | |||
1069 | }; | 1069 | }; |
1070 | 1070 | ||
1071 | /* | 1071 | /* |
1072 | * This is a variant of the of_l2c310_data with .sync set to | ||
1073 | * NULL. Outer sync operations are not needed when the system is I/O | ||
1074 | * coherent, and potentially harmful in certain situations (PCIe/PL310 | ||
1075 | * deadlock on Armada 375/38x due to hardware I/O coherency). The | ||
1076 | * other operations are kept because they are infrequent (therefore do | ||
1077 | * not cause the deadlock in practice) and needed for secondary CPU | ||
1078 | * boot and other power management activities. | ||
1079 | */ | ||
1080 | static const struct l2c_init_data of_l2c310_coherent_data __initconst = { | ||
1081 | .type = "L2C-310 Coherent", | ||
1082 | .way_size_0 = SZ_8K, | ||
1083 | .num_lock = 8, | ||
1084 | .of_parse = l2c310_of_parse, | ||
1085 | .enable = l2c310_enable, | ||
1086 | .fixup = l2c310_fixup, | ||
1087 | .save = l2c310_save, | ||
1088 | .outer_cache = { | ||
1089 | .inv_range = l2c210_inv_range, | ||
1090 | .clean_range = l2c210_clean_range, | ||
1091 | .flush_range = l2c210_flush_range, | ||
1092 | .flush_all = l2c210_flush_all, | ||
1093 | .disable = l2c310_disable, | ||
1094 | .resume = l2c310_resume, | ||
1095 | }, | ||
1096 | }; | ||
1097 | |||
1098 | /* | ||
1072 | * Note that the end addresses passed to Linux primitives are | 1099 | * Note that the end addresses passed to Linux primitives are |
1073 | * noninclusive, while the hardware cache range operations use | 1100 | * noninclusive, while the hardware cache range operations use |
1074 | * inclusive start and end addresses. | 1101 | * inclusive start and end addresses. |
@@ -1487,6 +1514,10 @@ int __init l2x0_of_init(u32 aux_val, u32 aux_mask) | |||
1487 | 1514 | ||
1488 | data = of_match_node(l2x0_ids, np)->data; | 1515 | data = of_match_node(l2x0_ids, np)->data; |
1489 | 1516 | ||
1517 | if (of_device_is_compatible(np, "arm,pl310-cache") && | ||
1518 | of_property_read_bool(np, "arm,io-coherent")) | ||
1519 | data = &of_l2c310_coherent_data; | ||
1520 | |||
1490 | old_aux = readl_relaxed(l2x0_base + L2X0_AUX_CTRL); | 1521 | old_aux = readl_relaxed(l2x0_base + L2X0_AUX_CTRL); |
1491 | if (old_aux != ((old_aux & aux_mask) | aux_val)) { | 1522 | if (old_aux != ((old_aux & aux_mask) | aux_val)) { |
1492 | pr_warn("L2C: platform modifies aux control register: 0x%08x -> 0x%08x\n", | 1523 | pr_warn("L2C: platform modifies aux control register: 0x%08x -> 0x%08x\n", |
diff --git a/arch/arm/mm/nommu.c b/arch/arm/mm/nommu.c index da1874f9f8cf..a014dfacd5ca 100644 --- a/arch/arm/mm/nommu.c +++ b/arch/arm/mm/nommu.c | |||
@@ -300,6 +300,7 @@ void __init sanity_check_meminfo(void) | |||
300 | sanity_check_meminfo_mpu(); | 300 | sanity_check_meminfo_mpu(); |
301 | end = memblock_end_of_DRAM(); | 301 | end = memblock_end_of_DRAM(); |
302 | high_memory = __va(end - 1) + 1; | 302 | high_memory = __va(end - 1) + 1; |
303 | memblock_set_current_limit(end); | ||
303 | } | 304 | } |
304 | 305 | ||
305 | /* | 306 | /* |
diff --git a/arch/arm/mm/proc-arm925.S b/arch/arm/mm/proc-arm925.S index 97448c3acf38..ba0d58e1a2a2 100644 --- a/arch/arm/mm/proc-arm925.S +++ b/arch/arm/mm/proc-arm925.S | |||
@@ -502,6 +502,7 @@ __\name\()_proc_info: | |||
502 | .long \cpu_val | 502 | .long \cpu_val |
503 | .long \cpu_mask | 503 | .long \cpu_mask |
504 | .long PMD_TYPE_SECT | \ | 504 | .long PMD_TYPE_SECT | \ |
505 | PMD_SECT_CACHEABLE | \ | ||
505 | PMD_BIT4 | \ | 506 | PMD_BIT4 | \ |
506 | PMD_SECT_AP_WRITE | \ | 507 | PMD_SECT_AP_WRITE | \ |
507 | PMD_SECT_AP_READ | 508 | PMD_SECT_AP_READ |
diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig index 243dfcb2ca0e..301b892d97d9 100644 --- a/arch/arm/plat-samsung/Kconfig +++ b/arch/arm/plat-samsung/Kconfig | |||
@@ -35,27 +35,15 @@ config SAMSUNG_PM | |||
35 | Base platform power management code for samsung code | 35 | Base platform power management code for samsung code |
36 | 36 | ||
37 | if PLAT_SAMSUNG | 37 | if PLAT_SAMSUNG |
38 | menu "Samsung Common options" | ||
38 | 39 | ||
39 | # boot configurations | 40 | # boot configurations |
40 | 41 | ||
41 | comment "Boot options" | 42 | comment "Boot options" |
42 | 43 | ||
43 | config S3C_BOOT_ERROR_RESET | ||
44 | bool "S3C Reboot on decompression error" | ||
45 | help | ||
46 | Say y here to use the watchdog to reset the system if the | ||
47 | kernel decompressor detects an error during decompression. | ||
48 | |||
49 | config S3C_BOOT_UART_FORCE_FIFO | ||
50 | bool "Force UART FIFO on during boot process" | ||
51 | default y | ||
52 | help | ||
53 | Say Y here to force the UART FIFOs on during the kernel | ||
54 | uncompressor | ||
55 | |||
56 | |||
57 | config S3C_LOWLEVEL_UART_PORT | 44 | config S3C_LOWLEVEL_UART_PORT |
58 | int "S3C UART to use for low-level messages" | 45 | int "S3C UART to use for low-level messages" |
46 | depends on ARCH_S3C64XX | ||
59 | default 0 | 47 | default 0 |
60 | help | 48 | help |
61 | Choice of which UART port to use for the low-level messages, | 49 | Choice of which UART port to use for the low-level messages, |
@@ -407,17 +395,16 @@ config SAMSUNG_PM_GPIO | |||
407 | Include legacy GPIO power management code for platforms not using | 395 | Include legacy GPIO power management code for platforms not using |
408 | pinctrl-samsung driver. | 396 | pinctrl-samsung driver. |
409 | 397 | ||
410 | endif | ||
411 | |||
412 | config SAMSUNG_DMADEV | 398 | config SAMSUNG_DMADEV |
413 | bool | 399 | bool "Use legacy Samsung DMA abstraction" |
414 | select ARM_AMBA | 400 | depends on CPU_S5PV210 || CPU_S5PC100 || ARCH_S5P64X0 || ARCH_S3C64XX |
415 | select DMADEVICES | 401 | select DMADEVICES |
416 | select PL330_DMA if (ARCH_EXYNOS5 || ARCH_EXYNOS4 || CPU_S5PV210 || CPU_S5PC100 || \ | 402 | default y |
417 | CPU_S5P6450 || CPU_S5P6440) | ||
418 | help | 403 | help |
419 | Use DMA device engine for PL330 DMAC. | 404 | Use DMA device engine for PL330 DMAC. |
420 | 405 | ||
406 | endif | ||
407 | |||
421 | config S5P_DEV_MFC | 408 | config S5P_DEV_MFC |
422 | bool | 409 | bool |
423 | help | 410 | help |
@@ -503,4 +490,5 @@ config DEBUG_S3C_UART | |||
503 | default "2" if DEBUG_S3C_UART2 | 490 | default "2" if DEBUG_S3C_UART2 |
504 | default "3" if DEBUG_S3C_UART3 | 491 | default "3" if DEBUG_S3C_UART3 |
505 | 492 | ||
493 | endmenu | ||
506 | endif | 494 | endif |