diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-08 14:14:29 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-08 14:14:29 -0400 |
commit | b3345d7c57d70e6cb6749af25cdbe80515582e99 (patch) | |
tree | 04cce706bc7e944ad1fb257108a8ae735948f97f /arch | |
parent | 44c916d58b9ef1f2c4aec2def57fa8289c716a60 (diff) | |
parent | c2fff85e21818952aa0ee5778926beee6c03e579 (diff) |
Merge tag 'soc-for-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC platform changes from Olof Johansson:
"This is the bulk of new SoC enablement and other platform changes for
3.17:
- Samsung S5PV210 has been converted to DT and multiplatform
- Clock drivers and bindings for some of the lower-end i.MX 1/2
platforms
- Kirkwood, one of the popular Marvell platforms, is folded into the
mvebu platform code, removing mach-kirkwood
- Hwmod data for TI AM43xx and DRA7 platforms
- More additions of Renesas shmobile platform support
- Removal of plat-samsung contents that can be removed with S5PV210
being multiplatform/DT-enabled and the other two old platforms
being removed
New platforms (most with only basic support right now):
- Hisilicon X5HD2 settop box chipset is introduced
- Mediatek MT6589 (mobile chipset) is introduced
- Broadcom BCM7xxx settop box chipset is introduced
+ as usual a lot other pieces all over the platform code"
* tag 'soc-for-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (240 commits)
ARM: hisi: remove smp from machine descriptor
power: reset: move hisilicon reboot code
ARM: dts: Add hix5hd2-dkb dts file.
ARM: debug: Rename Hi3716 to HIX5HD2
ARM: hisi: enable hix5hd2 SoC
ARM: hisi: add ARCH_HISI
MAINTAINERS: add entry for Broadcom ARM STB architecture
ARM: brcmstb: select GISB arbiter and interrupt drivers
ARM: brcmstb: add infrastructure for ARM-based Broadcom STB SoCs
ARM: configs: enable SMP in bcm_defconfig
ARM: add SMP support for Broadcom mobile SoCs
Documentation: arm: misc updates to Marvell EBU SoC status
Documentation: arm: add URLs to public datasheets for the Marvell Armada XP SoC
ARM: mvebu: fix build without platforms selected
ARM: mvebu: add cpuidle support for Armada 38x
ARM: mvebu: add cpuidle support for Armada 370
cpuidle: mvebu: add Armada 38x support
cpuidle: mvebu: add Armada 370 support
cpuidle: mvebu: rename the driver from armada-370-xp to mvebu-v7
ARM: mvebu: export the SCU address
...
Diffstat (limited to 'arch')
351 files changed, 8651 insertions, 18671 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 31b17f3fe2b4..e60718b4b96d 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -531,21 +531,6 @@ config ARCH_DOVE | |||
531 | help | 531 | help |
532 | Support for the Marvell Dove SoC 88AP510 | 532 | Support for the Marvell Dove SoC 88AP510 |
533 | 533 | ||
534 | config ARCH_KIRKWOOD | ||
535 | bool "Marvell Kirkwood" | ||
536 | select ARCH_REQUIRE_GPIOLIB | ||
537 | select CPU_FEROCEON | ||
538 | select GENERIC_CLOCKEVENTS | ||
539 | select MVEBU_MBUS | ||
540 | select PCI | ||
541 | select PCI_QUIRKS | ||
542 | select PINCTRL | ||
543 | select PINCTRL_KIRKWOOD | ||
544 | select PLAT_ORION_LEGACY | ||
545 | help | ||
546 | Support for the following Marvell Kirkwood series SoCs: | ||
547 | 88F6180, 88F6192 and 88F6281. | ||
548 | |||
549 | config ARCH_MV78XX0 | 534 | config ARCH_MV78XX0 |
550 | bool "Marvell MV78xx0" | 535 | bool "Marvell MV78xx0" |
551 | select ARCH_REQUIRE_GPIOLIB | 536 | select ARCH_REQUIRE_GPIOLIB |
@@ -762,24 +747,6 @@ config ARCH_S3C64XX | |||
762 | help | 747 | help |
763 | Samsung S3C64XX series based systems | 748 | Samsung S3C64XX series based systems |
764 | 749 | ||
765 | config ARCH_S5PV210 | ||
766 | bool "Samsung S5PV210/S5PC110" | ||
767 | select ARCH_HAS_HOLES_MEMORYMODEL | ||
768 | select ARCH_SPARSEMEM_ENABLE | ||
769 | select ATAGS | ||
770 | select CLKDEV_LOOKUP | ||
771 | select CLKSRC_SAMSUNG_PWM | ||
772 | select CPU_V7 | ||
773 | select GENERIC_CLOCKEVENTS | ||
774 | select GPIO_SAMSUNG | ||
775 | select HAVE_S3C2410_I2C if I2C | ||
776 | select HAVE_S3C2410_WATCHDOG if WATCHDOG | ||
777 | select HAVE_S3C_RTC if RTC_CLASS | ||
778 | select NEED_MACH_MEMORY_H | ||
779 | select SAMSUNG_ATAGS | ||
780 | help | ||
781 | Samsung S5PV210/S5PC110 series based systems | ||
782 | |||
783 | config ARCH_DAVINCI | 750 | config ARCH_DAVINCI |
784 | bool "TI DaVinci" | 751 | bool "TI DaVinci" |
785 | select ARCH_HAS_HOLES_MEMORYMODEL | 752 | select ARCH_HAS_HOLES_MEMORYMODEL |
@@ -918,8 +885,6 @@ source "arch/arm/mach-ixp4xx/Kconfig" | |||
918 | 885 | ||
919 | source "arch/arm/mach-keystone/Kconfig" | 886 | source "arch/arm/mach-keystone/Kconfig" |
920 | 887 | ||
921 | source "arch/arm/mach-kirkwood/Kconfig" | ||
922 | |||
923 | source "arch/arm/mach-ks8695/Kconfig" | 888 | source "arch/arm/mach-ks8695/Kconfig" |
924 | 889 | ||
925 | source "arch/arm/mach-msm/Kconfig" | 890 | source "arch/arm/mach-msm/Kconfig" |
@@ -930,6 +895,8 @@ source "arch/arm/mach-mv78xx0/Kconfig" | |||
930 | 895 | ||
931 | source "arch/arm/mach-imx/Kconfig" | 896 | source "arch/arm/mach-imx/Kconfig" |
932 | 897 | ||
898 | source "arch/arm/mach-mediatek/Kconfig" | ||
899 | |||
933 | source "arch/arm/mach-mxs/Kconfig" | 900 | source "arch/arm/mach-mxs/Kconfig" |
934 | 901 | ||
935 | source "arch/arm/mach-netx/Kconfig" | 902 | source "arch/arm/mach-netx/Kconfig" |
@@ -1517,7 +1484,8 @@ config ARM_PSCI | |||
1517 | config ARCH_NR_GPIO | 1484 | config ARCH_NR_GPIO |
1518 | int | 1485 | int |
1519 | default 1024 if ARCH_SHMOBILE || ARCH_TEGRA | 1486 | default 1024 if ARCH_SHMOBILE || ARCH_TEGRA |
1520 | default 512 if ARCH_EXYNOS || ARCH_KEYSTONE || SOC_OMAP5 || SOC_DRA7XX || ARCH_S3C24XX || ARCH_S3C64XX | 1487 | default 512 if ARCH_EXYNOS || ARCH_KEYSTONE || SOC_OMAP5 || \ |
1488 | SOC_DRA7XX || ARCH_S3C24XX || ARCH_S3C64XX || ARCH_S5PV210 | ||
1521 | default 416 if ARCH_SUNXI | 1489 | default 416 if ARCH_SUNXI |
1522 | default 392 if ARCH_U8500 | 1490 | default 392 if ARCH_U8500 |
1523 | default 352 if ARCH_VT8500 | 1491 | default 352 if ARCH_VT8500 |
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index b24b5dc720e4..edaf62737bc2 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug | |||
@@ -223,6 +223,14 @@ choice | |||
223 | Say Y here if you want kernel low-level debugging support | 223 | Say Y here if you want kernel low-level debugging support |
224 | on HI3716 UART. | 224 | on HI3716 UART. |
225 | 225 | ||
226 | config DEBUG_HIX5HD2_UART | ||
227 | bool "Hisilicon Hix5hd2 Debug UART" | ||
228 | depends on ARCH_HIX5HD2 | ||
229 | select DEBUG_UART_PL01X | ||
230 | help | ||
231 | Say Y here if you want kernel low-level debugging support | ||
232 | on Hix5hd2 UART. | ||
233 | |||
226 | config DEBUG_HIGHBANK_UART | 234 | config DEBUG_HIGHBANK_UART |
227 | bool "Kernel low-level debugging messages via Highbank UART" | 235 | bool "Kernel low-level debugging messages via Highbank UART" |
228 | depends on ARCH_HIGHBANK | 236 | depends on ARCH_HIGHBANK |
@@ -617,6 +625,7 @@ choice | |||
617 | depends on PLAT_SAMSUNG | 625 | depends on PLAT_SAMSUNG |
618 | select DEBUG_EXYNOS_UART if ARCH_EXYNOS | 626 | select DEBUG_EXYNOS_UART if ARCH_EXYNOS |
619 | select DEBUG_S3C24XX_UART if ARCH_S3C24XX | 627 | select DEBUG_S3C24XX_UART if ARCH_S3C24XX |
628 | select DEBUG_S5PV210_UART if ARCH_S5PV210 | ||
620 | bool "Use Samsung S3C UART 0 for low-level debug" | 629 | bool "Use Samsung S3C UART 0 for low-level debug" |
621 | help | 630 | help |
622 | Say Y here if you want the debug print routines to direct | 631 | Say Y here if you want the debug print routines to direct |
@@ -627,6 +636,7 @@ choice | |||
627 | depends on PLAT_SAMSUNG | 636 | depends on PLAT_SAMSUNG |
628 | select DEBUG_EXYNOS_UART if ARCH_EXYNOS | 637 | select DEBUG_EXYNOS_UART if ARCH_EXYNOS |
629 | select DEBUG_S3C24XX_UART if ARCH_S3C24XX | 638 | select DEBUG_S3C24XX_UART if ARCH_S3C24XX |
639 | select DEBUG_S5PV210_UART if ARCH_S5PV210 | ||
630 | bool "Use Samsung S3C UART 1 for low-level debug" | 640 | bool "Use Samsung S3C UART 1 for low-level debug" |
631 | help | 641 | help |
632 | Say Y here if you want the debug print routines to direct | 642 | Say Y here if you want the debug print routines to direct |
@@ -637,6 +647,7 @@ choice | |||
637 | depends on PLAT_SAMSUNG | 647 | depends on PLAT_SAMSUNG |
638 | select DEBUG_EXYNOS_UART if ARCH_EXYNOS | 648 | select DEBUG_EXYNOS_UART if ARCH_EXYNOS |
639 | select DEBUG_S3C24XX_UART if ARCH_S3C24XX | 649 | select DEBUG_S3C24XX_UART if ARCH_S3C24XX |
650 | select DEBUG_S5PV210_UART if ARCH_S5PV210 | ||
640 | bool "Use Samsung S3C UART 2 for low-level debug" | 651 | bool "Use Samsung S3C UART 2 for low-level debug" |
641 | help | 652 | help |
642 | Say Y here if you want the debug print routines to direct | 653 | Say Y here if you want the debug print routines to direct |
@@ -644,8 +655,9 @@ choice | |||
644 | by the boot-loader before use. | 655 | by the boot-loader before use. |
645 | 656 | ||
646 | config DEBUG_S3C_UART3 | 657 | config DEBUG_S3C_UART3 |
647 | depends on PLAT_SAMSUNG && ARCH_EXYNOS | 658 | depends on PLAT_SAMSUNG && (ARCH_EXYNOS || ARCH_S5PV210) |
648 | select DEBUG_EXYNOS_UART | 659 | select DEBUG_EXYNOS_UART if ARCH_EXYNOS |
660 | select DEBUG_S5PV210_UART if ARCH_S5PV210 | ||
649 | bool "Use Samsung S3C UART 3 for low-level debug" | 661 | bool "Use Samsung S3C UART 3 for low-level debug" |
650 | help | 662 | help |
651 | Say Y here if you want the debug print routines to direct | 663 | Say Y here if you want the debug print routines to direct |
@@ -703,6 +715,14 @@ choice | |||
703 | Say Y here if you want kernel low-level debugging support | 715 | Say Y here if you want kernel low-level debugging support |
704 | on Allwinner A1X based platforms on the UART1. | 716 | on Allwinner A1X based platforms on the UART1. |
705 | 717 | ||
718 | config DEBUG_SUNXI_R_UART | ||
719 | bool "Kernel low-level debugging messages via sunXi R_UART" | ||
720 | depends on MACH_SUN6I || MACH_SUN8I | ||
721 | select DEBUG_UART_8250 | ||
722 | help | ||
723 | Say Y here if you want kernel low-level debugging support | ||
724 | on Allwinner A31/A23 based platforms on the R_UART. | ||
725 | |||
706 | config TEGRA_DEBUG_UART_AUTO_ODMDATA | 726 | config TEGRA_DEBUG_UART_AUTO_ODMDATA |
707 | bool "Kernel low-level debugging messages via Tegra UART via ODMDATA" | 727 | bool "Kernel low-level debugging messages via Tegra UART via ODMDATA" |
708 | depends on ARCH_TEGRA | 728 | depends on ARCH_TEGRA |
@@ -937,6 +957,9 @@ config DEBUG_S3C2410_UART | |||
937 | config DEBUG_S3C24XX_UART | 957 | config DEBUG_S3C24XX_UART |
938 | bool | 958 | bool |
939 | 959 | ||
960 | config DEBUG_S5PV210_UART | ||
961 | bool | ||
962 | |||
940 | config DEBUG_OMAP2PLUS_UART | 963 | config DEBUG_OMAP2PLUS_UART |
941 | bool | 964 | bool |
942 | depends on ARCH_OMAP2PLUS | 965 | depends on ARCH_OMAP2PLUS |
@@ -998,6 +1021,7 @@ config DEBUG_LL_INCLUDE | |||
998 | default "debug/msm.S" if DEBUG_MSM_UART || DEBUG_QCOM_UARTDM | 1021 | default "debug/msm.S" if DEBUG_MSM_UART || DEBUG_QCOM_UARTDM |
999 | default "debug/omap2plus.S" if DEBUG_OMAP2PLUS_UART | 1022 | default "debug/omap2plus.S" if DEBUG_OMAP2PLUS_UART |
1000 | default "debug/s3c24xx.S" if DEBUG_S3C24XX_UART | 1023 | default "debug/s3c24xx.S" if DEBUG_S3C24XX_UART |
1024 | default "debug/s5pv210.S" if DEBUG_S5PV210_UART | ||
1001 | default "debug/sirf.S" if DEBUG_SIRFPRIMA2_UART1 || DEBUG_SIRFMARCO_UART1 | 1025 | default "debug/sirf.S" if DEBUG_SIRFPRIMA2_UART1 || DEBUG_SIRFMARCO_UART1 |
1002 | default "debug/sti.S" if DEBUG_STI_UART | 1026 | default "debug/sti.S" if DEBUG_STI_UART |
1003 | default "debug/tegra.S" if DEBUG_TEGRA_UART | 1027 | default "debug/tegra.S" if DEBUG_TEGRA_UART |
@@ -1022,7 +1046,7 @@ config DEBUG_UART_8250 | |||
1022 | def_bool ARCH_DOVE || ARCH_EBSA110 || \ | 1046 | def_bool ARCH_DOVE || ARCH_EBSA110 || \ |
1023 | (FOOTBRIDGE && !DEBUG_DC21285_PORT) || \ | 1047 | (FOOTBRIDGE && !DEBUG_DC21285_PORT) || \ |
1024 | ARCH_GEMINI || ARCH_IOP13XX || ARCH_IOP32X || \ | 1048 | ARCH_GEMINI || ARCH_IOP13XX || ARCH_IOP32X || \ |
1025 | ARCH_IOP33X || ARCH_IXP4XX || ARCH_KIRKWOOD || \ | 1049 | ARCH_IOP33X || ARCH_IXP4XX || \ |
1026 | ARCH_LPC32XX || ARCH_MV78XX0 || ARCH_ORION5X || ARCH_RPC | 1050 | ARCH_LPC32XX || ARCH_MV78XX0 || ARCH_ORION5X || ARCH_RPC |
1027 | 1051 | ||
1028 | config DEBUG_UART_PHYS | 1052 | config DEBUG_UART_PHYS |
@@ -1032,6 +1056,7 @@ config DEBUG_UART_PHYS | |||
1032 | default 0x01c28400 if DEBUG_SUNXI_UART1 | 1056 | default 0x01c28400 if DEBUG_SUNXI_UART1 |
1033 | default 0x01d0c000 if DEBUG_DAVINCI_DA8XX_UART1 | 1057 | default 0x01d0c000 if DEBUG_DAVINCI_DA8XX_UART1 |
1034 | default 0x01d0d000 if DEBUG_DAVINCI_DA8XX_UART2 | 1058 | default 0x01d0d000 if DEBUG_DAVINCI_DA8XX_UART2 |
1059 | default 0x01f02800 if DEBUG_SUNXI_R_UART | ||
1035 | default 0x02530c00 if DEBUG_KEYSTONE_UART0 | 1060 | default 0x02530c00 if DEBUG_KEYSTONE_UART0 |
1036 | default 0x02531000 if DEBUG_KEYSTONE_UART1 | 1061 | default 0x02531000 if DEBUG_KEYSTONE_UART1 |
1037 | default 0x03010fe0 if ARCH_RPC | 1062 | default 0x03010fe0 if ARCH_RPC |
@@ -1078,10 +1103,10 @@ config DEBUG_UART_PHYS | |||
1078 | default 0xe0000000 if ARCH_SPEAR13XX | 1103 | default 0xe0000000 if ARCH_SPEAR13XX |
1079 | default 0xf0000be0 if ARCH_EBSA110 | 1104 | default 0xf0000be0 if ARCH_EBSA110 |
1080 | default 0xf1012000 if DEBUG_MVEBU_UART_ALTERNATE | 1105 | default 0xf1012000 if DEBUG_MVEBU_UART_ALTERNATE |
1081 | default 0xf1012000 if ARCH_DOVE || ARCH_KIRKWOOD || ARCH_MV78XX0 || \ | 1106 | default 0xf1012000 if ARCH_DOVE || ARCH_MV78XX0 || \ |
1082 | ARCH_ORION5X | 1107 | ARCH_ORION5X |
1083 | default 0xf7fc9000 if DEBUG_BERLIN_UART | 1108 | default 0xf7fc9000 if DEBUG_BERLIN_UART |
1084 | default 0xf8b00000 if DEBUG_HI3716_UART | 1109 | default 0xf8b00000 if DEBUG_HIX5HD2_UART |
1085 | default 0xf991e000 if DEBUG_QCOM_UARTDM | 1110 | default 0xf991e000 if DEBUG_QCOM_UARTDM |
1086 | default 0xfcb00000 if DEBUG_HI3620_UART | 1111 | default 0xfcb00000 if DEBUG_HI3620_UART |
1087 | default 0xfe800000 if ARCH_IOP32X | 1112 | default 0xfe800000 if ARCH_IOP32X |
@@ -1107,6 +1132,7 @@ config DEBUG_UART_VIRT | |||
1107 | default 0xf1600000 if ARCH_INTEGRATOR | 1132 | default 0xf1600000 if ARCH_INTEGRATOR |
1108 | default 0xf1c28000 if DEBUG_SUNXI_UART0 | 1133 | default 0xf1c28000 if DEBUG_SUNXI_UART0 |
1109 | default 0xf1c28400 if DEBUG_SUNXI_UART1 | 1134 | default 0xf1c28400 if DEBUG_SUNXI_UART1 |
1135 | default 0xf1f02800 if DEBUG_SUNXI_R_UART | ||
1110 | default 0xf2100000 if DEBUG_PXA_UART1 | 1136 | default 0xf2100000 if DEBUG_PXA_UART1 |
1111 | default 0xf4090000 if ARCH_LPC32XX | 1137 | default 0xf4090000 if ARCH_LPC32XX |
1112 | default 0xf4200000 if ARCH_GEMINI | 1138 | default 0xf4200000 if ARCH_GEMINI |
@@ -1133,7 +1159,7 @@ config DEBUG_UART_VIRT | |||
1133 | default 0xfe230000 if DEBUG_PICOXCELL_UART | 1159 | default 0xfe230000 if DEBUG_PICOXCELL_UART |
1134 | default 0xfe300000 if DEBUG_BCM_KONA_UART | 1160 | default 0xfe300000 if DEBUG_BCM_KONA_UART |
1135 | default 0xfe800000 if ARCH_IOP32X | 1161 | default 0xfe800000 if ARCH_IOP32X |
1136 | default 0xfeb00000 if DEBUG_HI3620_UART || DEBUG_HI3716_UART | 1162 | default 0xfeb00000 if DEBUG_HI3620_UART || DEBUG_HIX5HD2_UART |
1137 | default 0xfeb24000 if DEBUG_RK3X_UART0 | 1163 | default 0xfeb24000 if DEBUG_RK3X_UART0 |
1138 | default 0xfeb26000 if DEBUG_RK3X_UART1 | 1164 | default 0xfeb26000 if DEBUG_RK3X_UART1 |
1139 | default 0xfeb30c00 if DEBUG_KEYSTONE_UART0 | 1165 | default 0xfeb30c00 if DEBUG_KEYSTONE_UART0 |
@@ -1143,7 +1169,6 @@ config DEBUG_UART_VIRT | |||
1143 | default 0xfec20000 if DEBUG_DAVINCI_DMx_UART0 | 1169 | default 0xfec20000 if DEBUG_DAVINCI_DMx_UART0 |
1144 | default 0xfed0c000 if DEBUG_DAVINCI_DA8XX_UART1 | 1170 | default 0xfed0c000 if DEBUG_DAVINCI_DA8XX_UART1 |
1145 | default 0xfed0d000 if DEBUG_DAVINCI_DA8XX_UART2 | 1171 | default 0xfed0d000 if DEBUG_DAVINCI_DA8XX_UART2 |
1146 | default 0xfed12000 if ARCH_KIRKWOOD | ||
1147 | default 0xfed60000 if DEBUG_RK29_UART0 | 1172 | default 0xfed60000 if DEBUG_RK29_UART0 |
1148 | default 0xfed64000 if DEBUG_RK29_UART1 || DEBUG_RK3X_UART2 | 1173 | default 0xfed64000 if DEBUG_RK29_UART1 || DEBUG_RK3X_UART2 |
1149 | default 0xfed68000 if DEBUG_RK29_UART2 || DEBUG_RK3X_UART3 | 1174 | default 0xfed68000 if DEBUG_RK29_UART2 || DEBUG_RK3X_UART3 |
diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 1e42de45110b..0ce9d0f71f2a 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile | |||
@@ -159,14 +159,13 @@ machine-$(CONFIG_ARCH_EP93XX) += ep93xx | |||
159 | machine-$(CONFIG_ARCH_EXYNOS) += exynos | 159 | machine-$(CONFIG_ARCH_EXYNOS) += exynos |
160 | machine-$(CONFIG_ARCH_GEMINI) += gemini | 160 | machine-$(CONFIG_ARCH_GEMINI) += gemini |
161 | machine-$(CONFIG_ARCH_HIGHBANK) += highbank | 161 | machine-$(CONFIG_ARCH_HIGHBANK) += highbank |
162 | machine-$(CONFIG_ARCH_HI3xxx) += hisi | 162 | machine-$(CONFIG_ARCH_HISI) += hisi |
163 | machine-$(CONFIG_ARCH_INTEGRATOR) += integrator | 163 | machine-$(CONFIG_ARCH_INTEGRATOR) += integrator |
164 | machine-$(CONFIG_ARCH_IOP13XX) += iop13xx | 164 | machine-$(CONFIG_ARCH_IOP13XX) += iop13xx |
165 | machine-$(CONFIG_ARCH_IOP32X) += iop32x | 165 | machine-$(CONFIG_ARCH_IOP32X) += iop32x |
166 | machine-$(CONFIG_ARCH_IOP33X) += iop33x | 166 | machine-$(CONFIG_ARCH_IOP33X) += iop33x |
167 | machine-$(CONFIG_ARCH_IXP4XX) += ixp4xx | 167 | machine-$(CONFIG_ARCH_IXP4XX) += ixp4xx |
168 | machine-$(CONFIG_ARCH_KEYSTONE) += keystone | 168 | machine-$(CONFIG_ARCH_KEYSTONE) += keystone |
169 | machine-$(CONFIG_ARCH_KIRKWOOD) += kirkwood | ||
170 | machine-$(CONFIG_ARCH_KS8695) += ks8695 | 169 | machine-$(CONFIG_ARCH_KS8695) += ks8695 |
171 | machine-$(CONFIG_ARCH_LPC32XX) += lpc32xx | 170 | machine-$(CONFIG_ARCH_LPC32XX) += lpc32xx |
172 | machine-$(CONFIG_ARCH_MMP) += mmp | 171 | machine-$(CONFIG_ARCH_MMP) += mmp |
@@ -175,6 +174,7 @@ machine-$(CONFIG_ARCH_MSM) += msm | |||
175 | machine-$(CONFIG_ARCH_MV78XX0) += mv78xx0 | 174 | machine-$(CONFIG_ARCH_MV78XX0) += mv78xx0 |
176 | machine-$(CONFIG_ARCH_MVEBU) += mvebu | 175 | machine-$(CONFIG_ARCH_MVEBU) += mvebu |
177 | machine-$(CONFIG_ARCH_MXC) += imx | 176 | machine-$(CONFIG_ARCH_MXC) += imx |
177 | machine-$(CONFIG_ARCH_MEDIATEK) += mediatek | ||
178 | machine-$(CONFIG_ARCH_MXS) += mxs | 178 | machine-$(CONFIG_ARCH_MXS) += mxs |
179 | machine-$(CONFIG_ARCH_NETX) += netx | 179 | machine-$(CONFIG_ARCH_NETX) += netx |
180 | machine-$(CONFIG_ARCH_NOMADIK) += nomadik | 180 | machine-$(CONFIG_ARCH_NOMADIK) += nomadik |
@@ -213,11 +213,11 @@ machine-$(CONFIG_PLAT_SPEAR) += spear | |||
213 | plat-$(CONFIG_ARCH_EXYNOS) += samsung | 213 | plat-$(CONFIG_ARCH_EXYNOS) += samsung |
214 | plat-$(CONFIG_ARCH_OMAP) += omap | 214 | plat-$(CONFIG_ARCH_OMAP) += omap |
215 | plat-$(CONFIG_ARCH_S3C64XX) += samsung | 215 | plat-$(CONFIG_ARCH_S3C64XX) += samsung |
216 | plat-$(CONFIG_ARCH_S5PV210) += samsung | ||
216 | plat-$(CONFIG_PLAT_IOP) += iop | 217 | plat-$(CONFIG_PLAT_IOP) += iop |
217 | plat-$(CONFIG_PLAT_ORION) += orion | 218 | plat-$(CONFIG_PLAT_ORION) += orion |
218 | plat-$(CONFIG_PLAT_PXA) += pxa | 219 | plat-$(CONFIG_PLAT_PXA) += pxa |
219 | plat-$(CONFIG_PLAT_S3C24XX) += samsung | 220 | plat-$(CONFIG_PLAT_S3C24XX) += samsung |
220 | plat-$(CONFIG_PLAT_S5P) += samsung | ||
221 | plat-$(CONFIG_PLAT_VERSATILE) += versatile | 221 | plat-$(CONFIG_PLAT_VERSATILE) += versatile |
222 | 222 | ||
223 | ifeq ($(CONFIG_ARCH_EBSA110),y) | 223 | ifeq ($(CONFIG_ARCH_EBSA110),y) |
@@ -241,7 +241,7 @@ MACHINE := | |||
241 | endif | 241 | endif |
242 | 242 | ||
243 | machdirs := $(patsubst %,arch/arm/mach-%/,$(machine-y)) | 243 | machdirs := $(patsubst %,arch/arm/mach-%/,$(machine-y)) |
244 | platdirs := $(patsubst %,arch/arm/plat-%/,$(plat-y)) | 244 | platdirs := $(patsubst %,arch/arm/plat-%/,$(sort $(plat-y))) |
245 | 245 | ||
246 | ifneq ($(CONFIG_ARCH_MULTIPLATFORM),y) | 246 | ifneq ($(CONFIG_ARCH_MULTIPLATFORM),y) |
247 | ifeq ($(KBUILD_SRC),) | 247 | ifeq ($(KBUILD_SRC),) |
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index adb5ed9e269e..74f2906211a9 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile | |||
@@ -83,6 +83,7 @@ dtb-$(CONFIG_ARCH_EXYNOS) += exynos4210-origen.dtb \ | |||
83 | exynos5440-ssdk5440.dtb \ | 83 | exynos5440-ssdk5440.dtb \ |
84 | exynos5800-peach-pi.dtb | 84 | exynos5800-peach-pi.dtb |
85 | dtb-$(CONFIG_ARCH_HI3xxx) += hi3620-hi4511.dtb | 85 | dtb-$(CONFIG_ARCH_HI3xxx) += hi3620-hi4511.dtb |
86 | dtb-$(CONFIG_ARCH_HIX5HD2) += hisi-x5hd2-dkb.dtb | ||
86 | dtb-$(CONFIG_ARCH_HIGHBANK) += highbank.dtb \ | 87 | dtb-$(CONFIG_ARCH_HIGHBANK) += highbank.dtb \ |
87 | ecx-2000.dtb | 88 | ecx-2000.dtb |
88 | dtb-$(CONFIG_ARCH_INTEGRATOR) += integratorap.dtb \ | 89 | dtb-$(CONFIG_ARCH_INTEGRATOR) += integratorap.dtb \ |
@@ -90,8 +91,7 @@ dtb-$(CONFIG_ARCH_INTEGRATOR) += integratorap.dtb \ | |||
90 | dtb-$(CONFIG_ARCH_KEYSTONE) += k2hk-evm.dtb \ | 91 | dtb-$(CONFIG_ARCH_KEYSTONE) += k2hk-evm.dtb \ |
91 | k2l-evm.dtb \ | 92 | k2l-evm.dtb \ |
92 | k2e-evm.dtb | 93 | k2e-evm.dtb |
93 | kirkwood := \ | 94 | dtb-$(CONFIG_MACH_KIRKWOOD) += kirkwood-b3.dtb \ |
94 | kirkwood-b3.dtb \ | ||
95 | kirkwood-cloudbox.dtb \ | 95 | kirkwood-cloudbox.dtb \ |
96 | kirkwood-db-88f6281.dtb \ | 96 | kirkwood-db-88f6281.dtb \ |
97 | kirkwood-db-88f6282.dtb \ | 97 | kirkwood-db-88f6282.dtb \ |
@@ -150,8 +150,6 @@ kirkwood := \ | |||
150 | kirkwood-ts219-6282.dtb \ | 150 | kirkwood-ts219-6282.dtb \ |
151 | kirkwood-ts419-6281.dtb \ | 151 | kirkwood-ts419-6281.dtb \ |
152 | kirkwood-ts419-6282.dtb | 152 | kirkwood-ts419-6282.dtb |
153 | dtb-$(CONFIG_ARCH_KIRKWOOD) += $(kirkwood) | ||
154 | dtb-$(CONFIG_MACH_KIRKWOOD) += $(kirkwood) | ||
155 | dtb-$(CONFIG_ARCH_LPC32XX) += ea3250.dtb phy3250.dtb | 153 | dtb-$(CONFIG_ARCH_LPC32XX) += ea3250.dtb phy3250.dtb |
156 | dtb-$(CONFIG_ARCH_MARCO) += marco-evb.dtb | 154 | dtb-$(CONFIG_ARCH_MARCO) += marco-evb.dtb |
157 | dtb-$(CONFIG_ARCH_MOXART) += moxart-uc7112lx.dtb | 155 | dtb-$(CONFIG_ARCH_MOXART) += moxart-uc7112lx.dtb |
@@ -321,13 +319,17 @@ dtb-$(CONFIG_ARCH_QCOM) += \ | |||
321 | dtb-$(CONFIG_ARCH_S3C24XX) += s3c2416-smdk2416.dtb | 319 | dtb-$(CONFIG_ARCH_S3C24XX) += s3c2416-smdk2416.dtb |
322 | dtb-$(CONFIG_ARCH_S3C64XX) += s3c6410-mini6410.dtb \ | 320 | dtb-$(CONFIG_ARCH_S3C64XX) += s3c6410-mini6410.dtb \ |
323 | s3c6410-smdk6410.dtb | 321 | s3c6410-smdk6410.dtb |
322 | dtb-$(CONFIG_ARCH_S5PV210) += s5pv210-aquila.dtb \ | ||
323 | s5pv210-goni.dtb \ | ||
324 | s5pv210-smdkc110.dtb \ | ||
325 | s5pv210-smdkv210.dtb \ | ||
326 | s5pv210-torbreck.dtb | ||
324 | dtb-$(CONFIG_ARCH_SHMOBILE_LEGACY) += r7s72100-genmai.dtb \ | 327 | dtb-$(CONFIG_ARCH_SHMOBILE_LEGACY) += r7s72100-genmai.dtb \ |
325 | r8a7740-armadillo800eva.dtb \ | 328 | r8a7740-armadillo800eva.dtb \ |
326 | r8a7778-bockw.dtb \ | 329 | r8a7778-bockw.dtb \ |
327 | r8a7778-bockw-reference.dtb \ | 330 | r8a7778-bockw-reference.dtb \ |
328 | r8a7740-armadillo800eva-reference.dtb \ | 331 | r8a7740-armadillo800eva-reference.dtb \ |
329 | r8a7779-marzen.dtb \ | 332 | r8a7779-marzen.dtb \ |
330 | r8a7779-marzen-reference.dtb \ | ||
331 | r8a7791-koelsch.dtb \ | 333 | r8a7791-koelsch.dtb \ |
332 | r8a7790-lager.dtb \ | 334 | r8a7790-lager.dtb \ |
333 | sh73a0-kzm9g.dtb \ | 335 | sh73a0-kzm9g.dtb \ |
@@ -339,7 +341,8 @@ dtb-$(CONFIG_ARCH_SHMOBILE_MULTI) += emev2-kzm9d.dtb \ | |||
339 | r7s72100-genmai.dtb \ | 341 | r7s72100-genmai.dtb \ |
340 | r8a7791-henninger.dtb \ | 342 | r8a7791-henninger.dtb \ |
341 | r8a7791-koelsch.dtb \ | 343 | r8a7791-koelsch.dtb \ |
342 | r8a7790-lager.dtb | 344 | r8a7790-lager.dtb \ |
345 | r8a7779-marzen.dtb | ||
343 | dtb-$(CONFIG_ARCH_SOCFPGA) += socfpga_arria5_socdk.dtb \ | 346 | dtb-$(CONFIG_ARCH_SOCFPGA) += socfpga_arria5_socdk.dtb \ |
344 | socfpga_cyclone5_socdk.dtb \ | 347 | socfpga_cyclone5_socdk.dtb \ |
345 | socfpga_cyclone5_sockit.dtb \ | 348 | socfpga_cyclone5_sockit.dtb \ |
diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi index 4a4e02d0ce9e..3a0a161342ba 100644 --- a/arch/arm/boot/dts/am33xx.dtsi +++ b/arch/arm/boot/dts/am33xx.dtsi | |||
@@ -347,6 +347,15 @@ | |||
347 | status = "disabled"; | 347 | status = "disabled"; |
348 | }; | 348 | }; |
349 | 349 | ||
350 | mailbox: mailbox@480C8000 { | ||
351 | compatible = "ti,omap4-mailbox"; | ||
352 | reg = <0x480C8000 0x200>; | ||
353 | interrupts = <77>; | ||
354 | ti,hwmods = "mailbox"; | ||
355 | ti,mbox-num-users = <4>; | ||
356 | ti,mbox-num-fifos = <8>; | ||
357 | }; | ||
358 | |||
350 | timer1: timer@44e31000 { | 359 | timer1: timer@44e31000 { |
351 | compatible = "ti,am335x-timer-1ms"; | 360 | compatible = "ti,am335x-timer-1ms"; |
352 | reg = <0x44e31000 0x400>; | 361 | reg = <0x44e31000 0x400>; |
diff --git a/arch/arm/boot/dts/am4372.dtsi b/arch/arm/boot/dts/am4372.dtsi index 49fa59622254..c9aee0e799bb 100644 --- a/arch/arm/boot/dts/am4372.dtsi +++ b/arch/arm/boot/dts/am4372.dtsi | |||
@@ -168,9 +168,6 @@ | |||
168 | ti,hwmods = "mailbox"; | 168 | ti,hwmods = "mailbox"; |
169 | ti,mbox-num-users = <4>; | 169 | ti,mbox-num-users = <4>; |
170 | ti,mbox-num-fifos = <8>; | 170 | ti,mbox-num-fifos = <8>; |
171 | ti,mbox-names = "wkup_m3"; | ||
172 | ti,mbox-data = <0 0 0 0>; | ||
173 | status = "disabled"; | ||
174 | }; | 171 | }; |
175 | 172 | ||
176 | timer1: timer@44e31000 { | 173 | timer1: timer@44e31000 { |
diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi index 80127638b379..0686b1e9e7f9 100644 --- a/arch/arm/boot/dts/dra7.dtsi +++ b/arch/arm/boot/dts/dra7.dtsi | |||
@@ -338,6 +338,123 @@ | |||
338 | status = "disabled"; | 338 | status = "disabled"; |
339 | }; | 339 | }; |
340 | 340 | ||
341 | mailbox1: mailbox@4a0f4000 { | ||
342 | compatible = "ti,omap4-mailbox"; | ||
343 | reg = <0x4a0f4000 0x200>; | ||
344 | ti,hwmods = "mailbox1"; | ||
345 | ti,mbox-num-users = <3>; | ||
346 | ti,mbox-num-fifos = <8>; | ||
347 | status = "disabled"; | ||
348 | }; | ||
349 | |||
350 | mailbox2: mailbox@4883a000 { | ||
351 | compatible = "ti,omap4-mailbox"; | ||
352 | reg = <0x4883a000 0x200>; | ||
353 | ti,hwmods = "mailbox2"; | ||
354 | ti,mbox-num-users = <4>; | ||
355 | ti,mbox-num-fifos = <12>; | ||
356 | status = "disabled"; | ||
357 | }; | ||
358 | |||
359 | mailbox3: mailbox@4883c000 { | ||
360 | compatible = "ti,omap4-mailbox"; | ||
361 | reg = <0x4883c000 0x200>; | ||
362 | ti,hwmods = "mailbox3"; | ||
363 | ti,mbox-num-users = <4>; | ||
364 | ti,mbox-num-fifos = <12>; | ||
365 | status = "disabled"; | ||
366 | }; | ||
367 | |||
368 | mailbox4: mailbox@4883e000 { | ||
369 | compatible = "ti,omap4-mailbox"; | ||
370 | reg = <0x4883e000 0x200>; | ||
371 | ti,hwmods = "mailbox4"; | ||
372 | ti,mbox-num-users = <4>; | ||
373 | ti,mbox-num-fifos = <12>; | ||
374 | status = "disabled"; | ||
375 | }; | ||
376 | |||
377 | mailbox5: mailbox@48840000 { | ||
378 | compatible = "ti,omap4-mailbox"; | ||
379 | reg = <0x48840000 0x200>; | ||
380 | ti,hwmods = "mailbox5"; | ||
381 | ti,mbox-num-users = <4>; | ||
382 | ti,mbox-num-fifos = <12>; | ||
383 | status = "disabled"; | ||
384 | }; | ||
385 | |||
386 | mailbox6: mailbox@48842000 { | ||
387 | compatible = "ti,omap4-mailbox"; | ||
388 | reg = <0x48842000 0x200>; | ||
389 | ti,hwmods = "mailbox6"; | ||
390 | ti,mbox-num-users = <4>; | ||
391 | ti,mbox-num-fifos = <12>; | ||
392 | status = "disabled"; | ||
393 | }; | ||
394 | |||
395 | mailbox7: mailbox@48844000 { | ||
396 | compatible = "ti,omap4-mailbox"; | ||
397 | reg = <0x48844000 0x200>; | ||
398 | ti,hwmods = "mailbox7"; | ||
399 | ti,mbox-num-users = <4>; | ||
400 | ti,mbox-num-fifos = <12>; | ||
401 | status = "disabled"; | ||
402 | }; | ||
403 | |||
404 | mailbox8: mailbox@48846000 { | ||
405 | compatible = "ti,omap4-mailbox"; | ||
406 | reg = <0x48846000 0x200>; | ||
407 | ti,hwmods = "mailbox8"; | ||
408 | ti,mbox-num-users = <4>; | ||
409 | ti,mbox-num-fifos = <12>; | ||
410 | status = "disabled"; | ||
411 | }; | ||
412 | |||
413 | mailbox9: mailbox@4885e000 { | ||
414 | compatible = "ti,omap4-mailbox"; | ||
415 | reg = <0x4885e000 0x200>; | ||
416 | ti,hwmods = "mailbox9"; | ||
417 | ti,mbox-num-users = <4>; | ||
418 | ti,mbox-num-fifos = <12>; | ||
419 | status = "disabled"; | ||
420 | }; | ||
421 | |||
422 | mailbox10: mailbox@48860000 { | ||
423 | compatible = "ti,omap4-mailbox"; | ||
424 | reg = <0x48860000 0x200>; | ||
425 | ti,hwmods = "mailbox10"; | ||
426 | ti,mbox-num-users = <4>; | ||
427 | ti,mbox-num-fifos = <12>; | ||
428 | status = "disabled"; | ||
429 | }; | ||
430 | |||
431 | mailbox11: mailbox@48862000 { | ||
432 | compatible = "ti,omap4-mailbox"; | ||
433 | reg = <0x48862000 0x200>; | ||
434 | ti,hwmods = "mailbox11"; | ||
435 | ti,mbox-num-users = <4>; | ||
436 | ti,mbox-num-fifos = <12>; | ||
437 | status = "disabled"; | ||
438 | }; | ||
439 | |||
440 | mailbox12: mailbox@48864000 { | ||
441 | compatible = "ti,omap4-mailbox"; | ||
442 | reg = <0x48864000 0x200>; | ||
443 | ti,hwmods = "mailbox12"; | ||
444 | ti,mbox-num-users = <4>; | ||
445 | ti,mbox-num-fifos = <12>; | ||
446 | status = "disabled"; | ||
447 | }; | ||
448 | |||
449 | mailbox13: mailbox@48802000 { | ||
450 | compatible = "ti,omap4-mailbox"; | ||
451 | reg = <0x48802000 0x200>; | ||
452 | ti,hwmods = "mailbox13"; | ||
453 | ti,mbox-num-users = <4>; | ||
454 | ti,mbox-num-fifos = <12>; | ||
455 | status = "disabled"; | ||
456 | }; | ||
457 | |||
341 | timer1: timer@4ae18000 { | 458 | timer1: timer@4ae18000 { |
342 | compatible = "ti,omap5430-timer"; | 459 | compatible = "ti,omap5430-timer"; |
343 | reg = <0x4ae18000 0x80>; | 460 | reg = <0x4ae18000 0x80>; |
diff --git a/arch/arm/boot/dts/hi3620.dtsi b/arch/arm/boot/dts/hi3620.dtsi index 83a5b8685bd9..6cbb62e5c6a9 100644 --- a/arch/arm/boot/dts/hi3620.dtsi +++ b/arch/arm/boot/dts/hi3620.dtsi | |||
@@ -33,6 +33,7 @@ | |||
33 | cpus { | 33 | cpus { |
34 | #address-cells = <1>; | 34 | #address-cells = <1>; |
35 | #size-cells = <0>; | 35 | #size-cells = <0>; |
36 | enable-method = "hisilicon,hi3620-smp"; | ||
36 | 37 | ||
37 | cpu@0 { | 38 | cpu@0 { |
38 | device_type = "cpu"; | 39 | device_type = "cpu"; |
diff --git a/arch/arm/boot/dts/hisi-x5hd2-dkb.dts b/arch/arm/boot/dts/hisi-x5hd2-dkb.dts new file mode 100644 index 000000000000..05b44c272c9a --- /dev/null +++ b/arch/arm/boot/dts/hisi-x5hd2-dkb.dts | |||
@@ -0,0 +1,53 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2013-2014 Linaro Ltd. | ||
3 | * Copyright (c) 2013-2014 Hisilicon Limited. | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License version 2 as | ||
7 | * publishhed by the Free Software Foundation. | ||
8 | */ | ||
9 | |||
10 | /dts-v1/; | ||
11 | #include "hisi-x5hd2.dtsi" | ||
12 | |||
13 | / { | ||
14 | model = "Hisilicon HIX5HD2 Development Board"; | ||
15 | compatible = "hisilicon,hix5hd2"; | ||
16 | |||
17 | chosen { | ||
18 | bootargs = "console=ttyAMA0,115200 earlyprintk"; | ||
19 | }; | ||
20 | |||
21 | cpus { | ||
22 | #address-cells = <1>; | ||
23 | #size-cells = <0>; | ||
24 | enable-method = "hisilicon,hix5hd2-smp"; | ||
25 | |||
26 | cpu@0 { | ||
27 | compatible = "arm,cortex-a9"; | ||
28 | device_type = "cpu"; | ||
29 | reg = <0>; | ||
30 | next-level-cache = <&l2>; | ||
31 | }; | ||
32 | |||
33 | cpu@1 { | ||
34 | compatible = "arm,cortex-a9"; | ||
35 | device_type = "cpu"; | ||
36 | reg = <1>; | ||
37 | next-level-cache = <&l2>; | ||
38 | }; | ||
39 | }; | ||
40 | |||
41 | memory { | ||
42 | device_type = "memory"; | ||
43 | reg = <0x00000000 0x80000000>; | ||
44 | }; | ||
45 | }; | ||
46 | |||
47 | &timer0 { | ||
48 | status = "okay"; | ||
49 | }; | ||
50 | |||
51 | &uart0 { | ||
52 | status = "okay"; | ||
53 | }; | ||
diff --git a/arch/arm/boot/dts/hisi-x5hd2.dtsi b/arch/arm/boot/dts/hisi-x5hd2.dtsi new file mode 100644 index 000000000000..f85ba2924ff7 --- /dev/null +++ b/arch/arm/boot/dts/hisi-x5hd2.dtsi | |||
@@ -0,0 +1,170 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2013-2014 Linaro Ltd. | ||
3 | * Copyright (c) 2013-2014 Hisilicon Limited. | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License version 2 as | ||
7 | * publishhed by the Free Software Foundation. | ||
8 | */ | ||
9 | |||
10 | #include "skeleton.dtsi" | ||
11 | #include <dt-bindings/clock/hix5hd2-clock.h> | ||
12 | |||
13 | / { | ||
14 | aliases { | ||
15 | serial0 = &uart0; | ||
16 | }; | ||
17 | |||
18 | gic: interrupt-controller@f8a01000 { | ||
19 | compatible = "arm,cortex-a9-gic"; | ||
20 | #interrupt-cells = <3>; | ||
21 | #address-cells = <0>; | ||
22 | interrupt-controller; | ||
23 | /* gic dist base, gic cpu base */ | ||
24 | reg = <0xf8a01000 0x1000>, <0xf8a00100 0x100>; | ||
25 | }; | ||
26 | |||
27 | soc { | ||
28 | #address-cells = <1>; | ||
29 | #size-cells = <1>; | ||
30 | compatible = "simple-bus"; | ||
31 | interrupt-parent = <&gic>; | ||
32 | ranges = <0 0xf8000000 0x8000000>; | ||
33 | |||
34 | amba { | ||
35 | #address-cells = <1>; | ||
36 | #size-cells = <1>; | ||
37 | compatible = "arm,amba-bus"; | ||
38 | ranges; | ||
39 | |||
40 | timer0: timer@00002000 { | ||
41 | compatible = "arm,sp804", "arm,primecell"; | ||
42 | reg = <0x00002000 0x1000>; | ||
43 | /* timer00 & timer01 */ | ||
44 | interrupts = <0 24 4>; | ||
45 | clocks = <&clock HIX5HD2_FIXED_24M>; | ||
46 | status = "disabled"; | ||
47 | }; | ||
48 | |||
49 | timer1: timer@00a29000 { | ||
50 | /* | ||
51 | * Only used in NORMAL state, not available ins | ||
52 | * SLOW or DOZE state. | ||
53 | * The rate is fixed in 24MHz. | ||
54 | */ | ||
55 | compatible = "arm,sp804", "arm,primecell"; | ||
56 | reg = <0x00a29000 0x1000>; | ||
57 | /* timer10 & timer11 */ | ||
58 | interrupts = <0 25 4>; | ||
59 | clocks = <&clock HIX5HD2_FIXED_24M>; | ||
60 | status = "disabled"; | ||
61 | }; | ||
62 | |||
63 | timer2: timer@00a2a000 { | ||
64 | compatible = "arm,sp804", "arm,primecell"; | ||
65 | reg = <0x00a2a000 0x1000>; | ||
66 | /* timer20 & timer21 */ | ||
67 | interrupts = <0 26 4>; | ||
68 | clocks = <&clock HIX5HD2_FIXED_24M>; | ||
69 | status = "disabled"; | ||
70 | }; | ||
71 | |||
72 | timer3: timer@00a2b000 { | ||
73 | compatible = "arm,sp804", "arm,primecell"; | ||
74 | reg = <0x00a2b000 0x1000>; | ||
75 | /* timer30 & timer31 */ | ||
76 | interrupts = <0 27 4>; | ||
77 | clocks = <&clock HIX5HD2_FIXED_24M>; | ||
78 | status = "disabled"; | ||
79 | }; | ||
80 | |||
81 | timer4: timer@00a81000 { | ||
82 | compatible = "arm,sp804", "arm,primecell"; | ||
83 | reg = <0x00a81000 0x1000>; | ||
84 | /* timer30 & timer31 */ | ||
85 | interrupts = <0 28 4>; | ||
86 | clocks = <&clock HIX5HD2_FIXED_24M>; | ||
87 | status = "disabled"; | ||
88 | }; | ||
89 | |||
90 | uart0: uart@00b00000 { | ||
91 | compatible = "arm,pl011", "arm,primecell"; | ||
92 | reg = <0x00b00000 0x1000>; | ||
93 | interrupts = <0 49 4>; | ||
94 | clocks = <&clock HIX5HD2_FIXED_83M>; | ||
95 | clock-names = "apb_pclk"; | ||
96 | status = "disabled"; | ||
97 | }; | ||
98 | |||
99 | uart1: uart@00006000 { | ||
100 | compatible = "arm,pl011", "arm,primecell"; | ||
101 | reg = <0x00006000 0x1000>; | ||
102 | interrupts = <0 50 4>; | ||
103 | clocks = <&clock HIX5HD2_FIXED_83M>; | ||
104 | clock-names = "apb_pclk"; | ||
105 | status = "disabled"; | ||
106 | }; | ||
107 | |||
108 | uart2: uart@00b02000 { | ||
109 | compatible = "arm,pl011", "arm,primecell"; | ||
110 | reg = <0x00b02000 0x1000>; | ||
111 | interrupts = <0 51 4>; | ||
112 | clocks = <&clock HIX5HD2_FIXED_83M>; | ||
113 | clock-names = "apb_pclk"; | ||
114 | status = "disabled"; | ||
115 | }; | ||
116 | |||
117 | uart3: uart@00b03000 { | ||
118 | compatible = "arm,pl011", "arm,primecell"; | ||
119 | reg = <0x00b03000 0x1000>; | ||
120 | interrupts = <0 52 4>; | ||
121 | clocks = <&clock HIX5HD2_FIXED_83M>; | ||
122 | clock-names = "apb_pclk"; | ||
123 | status = "disabled"; | ||
124 | }; | ||
125 | |||
126 | uart4: uart@00b04000 { | ||
127 | compatible = "arm,pl011", "arm,primecell"; | ||
128 | reg = <0xb04000 0x1000>; | ||
129 | interrupts = <0 53 4>; | ||
130 | clocks = <&clock HIX5HD2_FIXED_83M>; | ||
131 | clock-names = "apb_pclk"; | ||
132 | status = "disabled"; | ||
133 | }; | ||
134 | }; | ||
135 | |||
136 | local_timer@00a00600 { | ||
137 | compatible = "arm,cortex-a9-twd-timer"; | ||
138 | reg = <0x00a00600 0x20>; | ||
139 | interrupts = <1 13 0xf01>; | ||
140 | }; | ||
141 | |||
142 | l2: l2-cache { | ||
143 | compatible = "arm,pl310-cache"; | ||
144 | reg = <0x00a10000 0x100000>; | ||
145 | interrupts = <0 15 4>; | ||
146 | cache-unified; | ||
147 | cache-level = <2>; | ||
148 | }; | ||
149 | |||
150 | sysctrl: system-controller@00000000 { | ||
151 | compatible = "hisilicon,sysctrl"; | ||
152 | reg = <0x00000000 0x1000>; | ||
153 | reboot-offset = <0x4>; | ||
154 | }; | ||
155 | |||
156 | cpuctrl@00a22000 { | ||
157 | compatible = "hisilicon,cpuctrl"; | ||
158 | #address-cells = <1>; | ||
159 | #size-cells = <1>; | ||
160 | reg = <0x00a22000 0x2000>; | ||
161 | ranges = <0 0x00a22000 0x2000>; | ||
162 | |||
163 | clock: clock@0 { | ||
164 | compatible = "hisilicon,hix5hd2-clock"; | ||
165 | reg = <0 0x2000>; | ||
166 | #clock-cells = <1>; | ||
167 | }; | ||
168 | }; | ||
169 | }; | ||
170 | }; | ||
diff --git a/arch/arm/boot/dts/mt6589-aquaris5.dts b/arch/arm/boot/dts/mt6589-aquaris5.dts new file mode 100644 index 000000000000..443b4467de15 --- /dev/null +++ b/arch/arm/boot/dts/mt6589-aquaris5.dts | |||
@@ -0,0 +1,25 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2014 MundoReader S.L. | ||
3 | * Author: Matthias Brugger <matthias.bgg@gmail.com> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License as published by | ||
7 | * the Free Software Foundation; either version 2 of the License, or | ||
8 | * (at your option) any later version. | ||
9 | * | ||
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 | |||
16 | /dts-v1/; | ||
17 | #include "mt6589.dtsi" | ||
18 | |||
19 | / { | ||
20 | model = "bq Aquaris5"; | ||
21 | |||
22 | memory { | ||
23 | reg = <0x80000000 0x40000000>; | ||
24 | }; | ||
25 | }; | ||
diff --git a/arch/arm/boot/dts/mt6589.dtsi b/arch/arm/boot/dts/mt6589.dtsi new file mode 100644 index 000000000000..d0297a051549 --- /dev/null +++ b/arch/arm/boot/dts/mt6589.dtsi | |||
@@ -0,0 +1,94 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2014 MundoReader S.L. | ||
3 | * Author: Matthias Brugger <matthias.bgg@gmail.com> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License as published by | ||
7 | * the Free Software Foundation; either version 2 of the License, or | ||
8 | * (at your option) any later version. | ||
9 | * | ||
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 | |||
16 | #include <dt-bindings/interrupt-controller/irq.h> | ||
17 | #include <dt-bindings/interrupt-controller/arm-gic.h> | ||
18 | #include "skeleton.dtsi" | ||
19 | |||
20 | / { | ||
21 | compatible = "mediatek,mt6589"; | ||
22 | interrupt-parent = <&gic>; | ||
23 | |||
24 | cpus { | ||
25 | #address-cells = <1>; | ||
26 | #size-cells = <0>; | ||
27 | |||
28 | cpu@0 { | ||
29 | device_type = "cpu"; | ||
30 | compatible = "arm,cortex-a7"; | ||
31 | reg = <0x0>; | ||
32 | }; | ||
33 | cpu@1 { | ||
34 | device_type = "cpu"; | ||
35 | compatible = "arm,cortex-a7"; | ||
36 | reg = <0x1>; | ||
37 | }; | ||
38 | cpu@2 { | ||
39 | device_type = "cpu"; | ||
40 | compatible = "arm,cortex-a7"; | ||
41 | reg = <0x2>; | ||
42 | }; | ||
43 | cpu@3 { | ||
44 | device_type = "cpu"; | ||
45 | compatible = "arm,cortex-a7"; | ||
46 | reg = <0x3>; | ||
47 | }; | ||
48 | |||
49 | }; | ||
50 | |||
51 | clocks { | ||
52 | #address-cells = <1>; | ||
53 | #size-cells = <1>; | ||
54 | compatible = "simple-bus"; | ||
55 | ranges; | ||
56 | |||
57 | system_clk: dummy13m { | ||
58 | compatible = "fixed-clock"; | ||
59 | clock-frequency = <13000000>; | ||
60 | #clock-cells = <0>; | ||
61 | }; | ||
62 | |||
63 | rtc_clk: dummy32k { | ||
64 | compatible = "fixed-clock"; | ||
65 | clock-frequency = <32000>; | ||
66 | #clock-cells = <0>; | ||
67 | }; | ||
68 | }; | ||
69 | |||
70 | soc { | ||
71 | #address-cells = <1>; | ||
72 | #size-cells = <1>; | ||
73 | compatible = "simple-bus"; | ||
74 | ranges; | ||
75 | |||
76 | timer: timer@10008000 { | ||
77 | compatible = "mediatek,mt6577-timer"; | ||
78 | reg = <0x10008000 0x80>; | ||
79 | interrupts = <GIC_SPI 113 IRQ_TYPE_EDGE_RISING>; | ||
80 | clocks = <&system_clk>, <&rtc_clk>; | ||
81 | clock-names = "system-clk", "rtc-clk"; | ||
82 | }; | ||
83 | |||
84 | gic: interrupt-controller@10212000 { | ||
85 | compatible = "arm,cortex-a15-gic"; | ||
86 | interrupt-controller; | ||
87 | #interrupt-cells = <3>; | ||
88 | reg = <0x10211000 0x1000>, | ||
89 | <0x10212000 0x1000>, | ||
90 | <0x10214000 0x2000>, | ||
91 | <0x10216000 0x2000>; | ||
92 | }; | ||
93 | }; | ||
94 | }; | ||
diff --git a/arch/arm/boot/dts/omap2420.dtsi b/arch/arm/boot/dts/omap2420.dtsi index e83b0468080c..6d21994d824b 100644 --- a/arch/arm/boot/dts/omap2420.dtsi +++ b/arch/arm/boot/dts/omap2420.dtsi | |||
@@ -157,6 +157,8 @@ | |||
157 | interrupts = <26>, <34>; | 157 | interrupts = <26>, <34>; |
158 | interrupt-names = "dsp", "iva"; | 158 | interrupt-names = "dsp", "iva"; |
159 | ti,hwmods = "mailbox"; | 159 | ti,hwmods = "mailbox"; |
160 | ti,mbox-num-users = <4>; | ||
161 | ti,mbox-num-fifos = <6>; | ||
160 | }; | 162 | }; |
161 | 163 | ||
162 | timer1: timer@48028000 { | 164 | timer1: timer@48028000 { |
diff --git a/arch/arm/boot/dts/omap2430.dtsi b/arch/arm/boot/dts/omap2430.dtsi index c4e8013801ee..aa6a354e236f 100644 --- a/arch/arm/boot/dts/omap2430.dtsi +++ b/arch/arm/boot/dts/omap2430.dtsi | |||
@@ -247,6 +247,8 @@ | |||
247 | reg = <0x48094000 0x200>; | 247 | reg = <0x48094000 0x200>; |
248 | interrupts = <26>; | 248 | interrupts = <26>; |
249 | ti,hwmods = "mailbox"; | 249 | ti,hwmods = "mailbox"; |
250 | ti,mbox-num-users = <4>; | ||
251 | ti,mbox-num-fifos = <6>; | ||
250 | }; | 252 | }; |
251 | 253 | ||
252 | timer1: timer@49018000 { | 254 | timer1: timer@49018000 { |
diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi index b2891a9a6975..575a49bf968d 100644 --- a/arch/arm/boot/dts/omap3.dtsi +++ b/arch/arm/boot/dts/omap3.dtsi | |||
@@ -332,6 +332,8 @@ | |||
332 | ti,hwmods = "mailbox"; | 332 | ti,hwmods = "mailbox"; |
333 | reg = <0x48094000 0x200>; | 333 | reg = <0x48094000 0x200>; |
334 | interrupts = <26>; | 334 | interrupts = <26>; |
335 | ti,mbox-num-users = <2>; | ||
336 | ti,mbox-num-fifos = <2>; | ||
335 | }; | 337 | }; |
336 | 338 | ||
337 | mcspi1: spi@48098000 { | 339 | mcspi1: spi@48098000 { |
diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi index 7e26d222bfe3..69408b53200d 100644 --- a/arch/arm/boot/dts/omap4.dtsi +++ b/arch/arm/boot/dts/omap4.dtsi | |||
@@ -649,6 +649,15 @@ | |||
649 | }; | 649 | }; |
650 | }; | 650 | }; |
651 | 651 | ||
652 | mailbox: mailbox@4a0f4000 { | ||
653 | compatible = "ti,omap4-mailbox"; | ||
654 | reg = <0x4a0f4000 0x200>; | ||
655 | interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>; | ||
656 | ti,hwmods = "mailbox"; | ||
657 | ti,mbox-num-users = <3>; | ||
658 | ti,mbox-num-fifos = <8>; | ||
659 | }; | ||
660 | |||
652 | timer1: timer@4a318000 { | 661 | timer1: timer@4a318000 { |
653 | compatible = "ti,omap3430-timer"; | 662 | compatible = "ti,omap3430-timer"; |
654 | reg = <0x4a318000 0x80>; | 663 | reg = <0x4a318000 0x80>; |
diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi index 8eee6fbef7ad..fc8df1739f39 100644 --- a/arch/arm/boot/dts/omap5.dtsi +++ b/arch/arm/boot/dts/omap5.dtsi | |||
@@ -640,6 +640,8 @@ | |||
640 | reg = <0x4a0f4000 0x200>; | 640 | reg = <0x4a0f4000 0x200>; |
641 | interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>; | 641 | interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>; |
642 | ti,hwmods = "mailbox"; | 642 | ti,hwmods = "mailbox"; |
643 | ti,mbox-num-users = <3>; | ||
644 | ti,mbox-num-fifos = <8>; | ||
643 | }; | 645 | }; |
644 | 646 | ||
645 | timer1: timer@4ae18000 { | 647 | timer1: timer@4ae18000 { |
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/s5pv210-aquila.dts b/arch/arm/boot/dts/s5pv210-aquila.dts new file mode 100644 index 000000000000..aa31b84a707a --- /dev/null +++ b/arch/arm/boot/dts/s5pv210-aquila.dts | |||
@@ -0,0 +1,392 @@ | |||
1 | /* | ||
2 | * Samsung's S5PV210 SoC device tree source | ||
3 | * | ||
4 | * Copyright (c) 2013-2014 Samsung Electronics, Co. Ltd. | ||
5 | * | ||
6 | * Mateusz Krawczuk <m.krawczuk@partner.samsung.com> | ||
7 | * Tomasz Figa <t.figa@samsung.com> | ||
8 | * | ||
9 | * Board device tree source for Samsung Aquila board. | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify | ||
12 | * it under the terms of the GNU General Public License version 2 as | ||
13 | * published by the Free Software Foundation. | ||
14 | */ | ||
15 | |||
16 | /dts-v1/; | ||
17 | #include <dt-bindings/input/input.h> | ||
18 | #include "s5pv210.dtsi" | ||
19 | |||
20 | / { | ||
21 | model = "Samsung Aquila based on S5PC110"; | ||
22 | compatible = "samsung,aquila", "samsung,s5pv210"; | ||
23 | |||
24 | aliases { | ||
25 | i2c3 = &i2c_pmic; | ||
26 | }; | ||
27 | |||
28 | chosen { | ||
29 | bootargs = "console=ttySAC2,115200n8 root=/dev/mmcblk1p5 rw rootwait ignore_loglevel earlyprintk"; | ||
30 | }; | ||
31 | |||
32 | memory { | ||
33 | device_type = "memory"; | ||
34 | reg = <0x30000000 0x05000000 | ||
35 | 0x40000000 0x18000000>; | ||
36 | }; | ||
37 | |||
38 | regulators { | ||
39 | compatible = "simple-bus"; | ||
40 | #address-cells = <1>; | ||
41 | #size-cells = <0>; | ||
42 | |||
43 | vtf_reg: fixed-regulator@0 { | ||
44 | compatible = "regulator-fixed"; | ||
45 | reg = <0>; | ||
46 | regulator-name = "V_TF_2.8V"; | ||
47 | regulator-min-microvolt = <2800000>; | ||
48 | regulator-max-microvolt = <2800000>; | ||
49 | gpios = <&mp05 4 0>; | ||
50 | enable-active-high; | ||
51 | }; | ||
52 | |||
53 | pda_reg: fixed-regulator@1 { | ||
54 | compatible = "regulator-fixed"; | ||
55 | regulator-name = "VCC_1.8V_PDA"; | ||
56 | regulator-min-microvolt = <1800000>; | ||
57 | regulator-max-microvolt = <1800000>; | ||
58 | reg = <1>; | ||
59 | }; | ||
60 | |||
61 | bat_reg: fixed-regulator@2 { | ||
62 | compatible = "regulator-fixed"; | ||
63 | regulator-name = "V_BAT"; | ||
64 | regulator-min-microvolt = <3700000>; | ||
65 | regulator-max-microvolt = <3700000>; | ||
66 | reg = <2>; | ||
67 | }; | ||
68 | }; | ||
69 | |||
70 | i2c_pmic: i2c-pmic { | ||
71 | compatible = "i2c-gpio"; | ||
72 | gpios = <&gpj4 0 0>, /* sda */ | ||
73 | <&gpj4 3 0>; /* scl */ | ||
74 | i2c-gpio,delay-us = <2>; /* ~100 kHz */ | ||
75 | #address-cells = <1>; | ||
76 | #size-cells = <0>; | ||
77 | |||
78 | pmic@66 { | ||
79 | compatible = "national,lp3974"; | ||
80 | reg = <0x66>; | ||
81 | |||
82 | max8998,pmic-buck1-default-dvs-idx = <0>; | ||
83 | max8998,pmic-buck1-dvs-gpios = <&gph0 3 0>, | ||
84 | <&gph0 4 0>; | ||
85 | max8998,pmic-buck1-dvs-voltage = <1200000>, <1200000>, | ||
86 | <1200000>, <1200000>; | ||
87 | |||
88 | max8998,pmic-buck2-default-dvs-idx = <0>; | ||
89 | max8998,pmic-buck2-dvs-gpio = <&gph0 5 0>; | ||
90 | max8998,pmic-buck2-dvs-voltage = <1200000>, <1200000>; | ||
91 | |||
92 | regulators { | ||
93 | ldo2_reg: LDO2 { | ||
94 | regulator-name = "VALIVE_1.1V"; | ||
95 | regulator-min-microvolt = <1100000>; | ||
96 | regulator-max-microvolt = <1100000>; | ||
97 | regulator-always-on; | ||
98 | }; | ||
99 | |||
100 | ldo3_reg: LDO3 { | ||
101 | regulator-name = "VUSB+MIPI_1.1V"; | ||
102 | regulator-min-microvolt = <1100000>; | ||
103 | regulator-max-microvolt = <1100000>; | ||
104 | regulator-always-on; | ||
105 | }; | ||
106 | |||
107 | ldo4_reg: LDO4 { | ||
108 | regulator-name = "VADC_3.3V"; | ||
109 | regulator-min-microvolt = <3300000>; | ||
110 | regulator-max-microvolt = <3300000>; | ||
111 | }; | ||
112 | |||
113 | ldo5_reg: LDO5 { | ||
114 | regulator-name = "VTF_2.8V"; | ||
115 | regulator-min-microvolt = <2800000>; | ||
116 | regulator-max-microvolt = <2800000>; | ||
117 | regulator-always-on; | ||
118 | }; | ||
119 | |||
120 | ldo6_reg: LDO6 { | ||
121 | regulator-name = "VCC_3.3V"; | ||
122 | regulator-min-microvolt = <3300000>; | ||
123 | regulator-max-microvolt = <3300000>; | ||
124 | regulator-always-on; | ||
125 | }; | ||
126 | |||
127 | ldo7_reg: LDO7 { | ||
128 | regulator-name = "VCC_3.0V"; | ||
129 | regulator-min-microvolt = <3000000>; | ||
130 | regulator-max-microvolt = <3000000>; | ||
131 | regulator-always-on; | ||
132 | regulator-boot-on; | ||
133 | }; | ||
134 | |||
135 | ldo8_reg: LDO8 { | ||
136 | regulator-name = "VUSB+VDAC_3.3V"; | ||
137 | regulator-min-microvolt = <3300000>; | ||
138 | regulator-max-microvolt = <3300000>; | ||
139 | regulator-always-on; | ||
140 | }; | ||
141 | |||
142 | ldo9_reg: LDO9 { | ||
143 | regulator-name = "VCC+VCAM_2.8V"; | ||
144 | regulator-min-microvolt = <2800000>; | ||
145 | regulator-max-microvolt = <2800000>; | ||
146 | regulator-always-on; | ||
147 | }; | ||
148 | |||
149 | ldo10_reg: LDO10 { | ||
150 | regulator-name = "VPLL_1.1V"; | ||
151 | regulator-min-microvolt = <1100000>; | ||
152 | regulator-max-microvolt = <1100000>; | ||
153 | regulator-always-on; | ||
154 | regulator-boot-on; | ||
155 | }; | ||
156 | |||
157 | ldo11_reg: LDO11 { | ||
158 | regulator-name = "CAM_IO_2.8V"; | ||
159 | regulator-min-microvolt = <2800000>; | ||
160 | regulator-max-microvolt = <2800000>; | ||
161 | regulator-always-on; | ||
162 | }; | ||
163 | |||
164 | ldo12_reg: LDO12 { | ||
165 | regulator-name = "CAM_ISP_1.2V"; | ||
166 | regulator-min-microvolt = <1200000>; | ||
167 | regulator-max-microvolt = <1200000>; | ||
168 | regulator-always-on; | ||
169 | }; | ||
170 | |||
171 | ldo13_reg: LDO13 { | ||
172 | regulator-name = "CAM_A_2.8V"; | ||
173 | regulator-min-microvolt = <2800000>; | ||
174 | regulator-max-microvolt = <2800000>; | ||
175 | regulator-always-on; | ||
176 | }; | ||
177 | |||
178 | ldo14_reg: LDO14 { | ||
179 | regulator-name = "CAM_CIF_1.8V"; | ||
180 | regulator-min-microvolt = <1800000>; | ||
181 | regulator-max-microvolt = <1800000>; | ||
182 | regulator-always-on; | ||
183 | }; | ||
184 | |||
185 | ldo15_reg: LDO15 { | ||
186 | regulator-name = "CAM_AF_3.3V"; | ||
187 | regulator-min-microvolt = <3300000>; | ||
188 | regulator-max-microvolt = <3300000>; | ||
189 | regulator-always-on; | ||
190 | }; | ||
191 | |||
192 | ldo16_reg: LDO16 { | ||
193 | regulator-name = "VMIPI_1.8V"; | ||
194 | regulator-min-microvolt = <1800000>; | ||
195 | regulator-max-microvolt = <1800000>; | ||
196 | regulator-always-on; | ||
197 | }; | ||
198 | |||
199 | ldo17_reg: LDO17 { | ||
200 | regulator-name = "CAM_8M_1.8V"; | ||
201 | regulator-min-microvolt = <1800000>; | ||
202 | regulator-max-microvolt = <1800000>; | ||
203 | regulator-always-on; | ||
204 | }; | ||
205 | |||
206 | buck1_reg: BUCK1 { | ||
207 | regulator-name = "VARM_1.2V"; | ||
208 | regulator-min-microvolt = <1200000>; | ||
209 | regulator-max-microvolt = <1200000>; | ||
210 | regulator-always-on; | ||
211 | }; | ||
212 | |||
213 | buck2_reg: BUCK2 { | ||
214 | regulator-name = "VINT_1.2V"; | ||
215 | regulator-min-microvolt = <1200000>; | ||
216 | regulator-max-microvolt = <1200000>; | ||
217 | regulator-always-on; | ||
218 | }; | ||
219 | |||
220 | buck3_reg: BUCK3 { | ||
221 | regulator-name = "VCC_1.8V"; | ||
222 | regulator-min-microvolt = <1800000>; | ||
223 | regulator-max-microvolt = <1800000>; | ||
224 | regulator-always-on; | ||
225 | }; | ||
226 | |||
227 | buck4_reg: BUCK4 { | ||
228 | regulator-name = "CAM_CORE_1.2V"; | ||
229 | regulator-min-microvolt = <1200000>; | ||
230 | regulator-max-microvolt = <1200000>; | ||
231 | regulator-always-on; | ||
232 | }; | ||
233 | |||
234 | vichg_reg: ENVICHG { | ||
235 | regulator-name = "VICHG"; | ||
236 | }; | ||
237 | |||
238 | safeout1_reg: ESAFEOUT1 { | ||
239 | regulator-name = "SAFEOUT1"; | ||
240 | regulator-always-on; | ||
241 | }; | ||
242 | |||
243 | safeout2_reg: ESAFEOUT2 { | ||
244 | regulator-name = "SAFEOUT2"; | ||
245 | regulator-boot-on; | ||
246 | }; | ||
247 | }; | ||
248 | }; | ||
249 | |||
250 | }; | ||
251 | |||
252 | gpio-keys { | ||
253 | compatible = "gpio-keys"; | ||
254 | |||
255 | power-key { | ||
256 | gpios = <&gph2 6 1>; | ||
257 | linux,code = <KEY_POWER>; | ||
258 | label = "power"; | ||
259 | debounce-interval = <1>; | ||
260 | gpio-key,wakeup; | ||
261 | }; | ||
262 | }; | ||
263 | }; | ||
264 | |||
265 | &xusbxti { | ||
266 | clock-frequency = <24000000>; | ||
267 | }; | ||
268 | |||
269 | &keypad { | ||
270 | linux,input-no-autorepeat; | ||
271 | linux,input-wakeup; | ||
272 | samsung,keypad-num-rows = <3>; | ||
273 | samsung,keypad-num-columns = <3>; | ||
274 | pinctrl-names = "default"; | ||
275 | pinctrl-0 = <&keypad_row0>, <&keypad_row1>, <&keypad_row2>, | ||
276 | <&keypad_col0>, <&keypad_col1>, <&keypad_col2>; | ||
277 | status = "okay"; | ||
278 | |||
279 | key_1 { | ||
280 | keypad,row = <0>; | ||
281 | keypad,column = <1>; | ||
282 | linux,code = <KEY_CONNECT>; | ||
283 | }; | ||
284 | |||
285 | key_2 { | ||
286 | keypad,row = <0>; | ||
287 | keypad,column = <2>; | ||
288 | linux,code = <KEY_BACK>; | ||
289 | }; | ||
290 | |||
291 | key_3 { | ||
292 | keypad,row = <1>; | ||
293 | keypad,column = <1>; | ||
294 | linux,code = <KEY_CAMERA_FOCUS>; | ||
295 | }; | ||
296 | |||
297 | key_4 { | ||
298 | keypad,row = <1>; | ||
299 | keypad,column = <2>; | ||
300 | linux,code = <KEY_VOLUMEUP>; | ||
301 | }; | ||
302 | |||
303 | key_5 { | ||
304 | keypad,row = <2>; | ||
305 | keypad,column = <1>; | ||
306 | linux,code = <KEY_CAMERA>; | ||
307 | }; | ||
308 | |||
309 | key_6 { | ||
310 | keypad,row = <2>; | ||
311 | keypad,column = <2>; | ||
312 | linux,code = <KEY_VOLUMEDOWN>; | ||
313 | }; | ||
314 | }; | ||
315 | |||
316 | &uart0 { | ||
317 | status = "okay"; | ||
318 | }; | ||
319 | |||
320 | &uart1 { | ||
321 | status = "okay"; | ||
322 | }; | ||
323 | |||
324 | &uart2 { | ||
325 | status = "okay"; | ||
326 | }; | ||
327 | |||
328 | &uart3 { | ||
329 | status = "okay"; | ||
330 | }; | ||
331 | |||
332 | &sdhci0 { | ||
333 | bus-width = <4>; | ||
334 | non-removable; | ||
335 | status = "okay"; | ||
336 | vmmc-supply = <&ldo5_reg>; | ||
337 | pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_bus4>; | ||
338 | pinctrl-names = "default"; | ||
339 | }; | ||
340 | |||
341 | &sdhci2 { | ||
342 | bus-width = <4>; | ||
343 | cd-gpios = <&gph3 4 1>; | ||
344 | vmmc-supply = <&vtf_reg>; | ||
345 | cd-inverted; | ||
346 | pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_bus4 &t_flash_detect>; | ||
347 | pinctrl-names = "default"; | ||
348 | status = "okay"; | ||
349 | }; | ||
350 | |||
351 | &onenand { | ||
352 | status = "okay"; | ||
353 | }; | ||
354 | |||
355 | &hsotg { | ||
356 | vusb_a-supply = <&ldo3_reg>; | ||
357 | vusb_d-supply = <&ldo8_reg>; | ||
358 | status = "okay"; | ||
359 | }; | ||
360 | |||
361 | &usbphy { | ||
362 | status = "okay"; | ||
363 | }; | ||
364 | |||
365 | &fimd { | ||
366 | pinctrl-0 = <&lcd_clk &lcd_data24 &pwm1_out>; | ||
367 | pinctrl-names = "default"; | ||
368 | status = "okay"; | ||
369 | |||
370 | display-timings { | ||
371 | native-mode = <&timing0>; | ||
372 | timing0: timing { | ||
373 | clock-frequency = <0>; | ||
374 | hactive = <800>; | ||
375 | vactive = <480>; | ||
376 | hfront-porch = <16>; | ||
377 | hback-porch = <16>; | ||
378 | hsync-len = <2>; | ||
379 | vback-porch = <3>; | ||
380 | vfront-porch = <28>; | ||
381 | vsync-len = <1>; | ||
382 | }; | ||
383 | }; | ||
384 | }; | ||
385 | |||
386 | &pinctrl0 { | ||
387 | t_flash_detect: t-flash-detect { | ||
388 | samsung,pins = "gph3-4"; | ||
389 | samsung,pin-function = <0>; | ||
390 | samsung,pin-pud = <0>; | ||
391 | }; | ||
392 | }; | ||
diff --git a/arch/arm/boot/dts/s5pv210-goni.dts b/arch/arm/boot/dts/s5pv210-goni.dts new file mode 100644 index 000000000000..6387c77a6f7b --- /dev/null +++ b/arch/arm/boot/dts/s5pv210-goni.dts | |||
@@ -0,0 +1,449 @@ | |||
1 | /* | ||
2 | * Samsung's S5PV210 SoC device tree source | ||
3 | * | ||
4 | * Copyright (c) 2013-2014 Samsung Electronics, Co. Ltd. | ||
5 | * | ||
6 | * Mateusz Krawczuk <m.krawczuk@partner.samsung.com> | ||
7 | * Tomasz Figa <t.figa@samsung.com> | ||
8 | * | ||
9 | * Board device tree source for Samsung Goni board. | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify | ||
12 | * it under the terms of the GNU General Public License version 2 as | ||
13 | * published by the Free Software Foundation. | ||
14 | */ | ||
15 | |||
16 | /dts-v1/; | ||
17 | #include <dt-bindings/input/input.h> | ||
18 | #include "s5pv210.dtsi" | ||
19 | |||
20 | / { | ||
21 | model = "Samsung Goni based on S5PC110"; | ||
22 | compatible = "samsung,goni", "samsung,s5pv210"; | ||
23 | |||
24 | aliases { | ||
25 | i2c3 = &i2c_pmic; | ||
26 | }; | ||
27 | |||
28 | chosen { | ||
29 | bootargs = "console=ttySAC0,115200n8 root=/dev/mmcblk0p5 rw rootwait ignore_loglevel earlyprintk"; | ||
30 | }; | ||
31 | |||
32 | memory { | ||
33 | device_type = "memory"; | ||
34 | reg = <0x30000000 0x05000000 | ||
35 | 0x40000000 0x10000000 | ||
36 | 0x50000000 0x08000000>; | ||
37 | }; | ||
38 | |||
39 | regulators { | ||
40 | compatible = "simple-bus"; | ||
41 | #address-cells = <1>; | ||
42 | #size-cells = <0>; | ||
43 | |||
44 | vtf_reg: fixed-regulator@0 { | ||
45 | compatible = "regulator-fixed"; | ||
46 | regulator-name = "V_TF_2.8V"; | ||
47 | regulator-min-microvolt = <2800000>; | ||
48 | regulator-max-microvolt = <2800000>; | ||
49 | reg = <0>; | ||
50 | gpios = <&mp05 4 0>; | ||
51 | enable-active-high; | ||
52 | }; | ||
53 | |||
54 | pda_reg: fixed-regulator@1 { | ||
55 | compatible = "regulator-fixed"; | ||
56 | regulator-name = "VCC_1.8V_PDA"; | ||
57 | regulator-min-microvolt = <1800000>; | ||
58 | regulator-max-microvolt = <1800000>; | ||
59 | reg = <1>; | ||
60 | }; | ||
61 | |||
62 | bat_reg: fixed-regulator@2 { | ||
63 | compatible = "regulator-fixed"; | ||
64 | regulator-name = "V_BAT"; | ||
65 | regulator-min-microvolt = <3700000>; | ||
66 | regulator-max-microvolt = <3700000>; | ||
67 | reg = <2>; | ||
68 | }; | ||
69 | |||
70 | tsp_reg: fixed-regulator@3 { | ||
71 | compatible = "regulator-fixed"; | ||
72 | regulator-name = "TSP_VDD"; | ||
73 | regulator-min-microvolt = <2800000>; | ||
74 | regulator-max-microvolt = <2800000>; | ||
75 | reg = <3>; | ||
76 | gpios = <&gpj1 3 0>; | ||
77 | enable-active-high; | ||
78 | }; | ||
79 | }; | ||
80 | |||
81 | i2c_pmic: i2c-pmic { | ||
82 | compatible = "i2c-gpio"; | ||
83 | gpios = <&gpj4 0 0>, /* sda */ | ||
84 | <&gpj4 3 0>; /* scl */ | ||
85 | i2c-gpio,delay-us = <2>; /* ~100 kHz */ | ||
86 | #address-cells = <1>; | ||
87 | #size-cells = <0>; | ||
88 | |||
89 | pmic@66 { | ||
90 | compatible = "national,lp3974"; | ||
91 | reg = <0x66>; | ||
92 | |||
93 | max8998,pmic-buck1-default-dvs-idx = <0>; | ||
94 | max8998,pmic-buck1-dvs-gpios = <&gph0 3 0>, | ||
95 | <&gph0 4 0>; | ||
96 | max8998,pmic-buck1-dvs-voltage = <1200000>, <1200000>, | ||
97 | <1200000>, <1200000>; | ||
98 | |||
99 | max8998,pmic-buck2-default-dvs-idx = <0>; | ||
100 | max8998,pmic-buck2-dvs-gpio = <&gph0 5 0>; | ||
101 | max8998,pmic-buck2-dvs-voltage = <1200000>, <1200000>; | ||
102 | |||
103 | regulators { | ||
104 | ldo2_reg: LDO2 { | ||
105 | regulator-name = "VALIVE_1.1V"; | ||
106 | regulator-min-microvolt = <1100000>; | ||
107 | regulator-max-microvolt = <1100000>; | ||
108 | regulator-always-on; | ||
109 | }; | ||
110 | |||
111 | ldo3_reg: LDO3 { | ||
112 | regulator-name = "VUSB+MIPI_1.1V"; | ||
113 | regulator-min-microvolt = <1100000>; | ||
114 | regulator-max-microvolt = <1100000>; | ||
115 | regulator-always-on; | ||
116 | }; | ||
117 | |||
118 | ldo4_reg: LDO4 { | ||
119 | regulator-name = "VADC_3.3V"; | ||
120 | regulator-min-microvolt = <3300000>; | ||
121 | regulator-max-microvolt = <3300000>; | ||
122 | }; | ||
123 | |||
124 | ldo5_reg: LDO5 { | ||
125 | regulator-name = "VTF_2.8V"; | ||
126 | regulator-min-microvolt = <2800000>; | ||
127 | regulator-max-microvolt = <2800000>; | ||
128 | }; | ||
129 | |||
130 | ldo6_reg: LDO6 { | ||
131 | regulator-name = "VCC_3.3V"; | ||
132 | regulator-min-microvolt = <3300000>; | ||
133 | regulator-max-microvolt = <3300000>; | ||
134 | }; | ||
135 | |||
136 | ldo7_reg: LDO7 { | ||
137 | regulator-name = "VLCD_1.8V"; | ||
138 | regulator-min-microvolt = <1800000>; | ||
139 | regulator-max-microvolt = <1800000>; | ||
140 | regulator-always-on; | ||
141 | }; | ||
142 | |||
143 | ldo8_reg: LDO8 { | ||
144 | regulator-name = "VUSB+VDAC_3.3V"; | ||
145 | regulator-min-microvolt = <3300000>; | ||
146 | regulator-max-microvolt = <3300000>; | ||
147 | }; | ||
148 | |||
149 | ldo9_reg: LDO9 { | ||
150 | regulator-name = "VCC+VCAM_2.8V"; | ||
151 | regulator-min-microvolt = <2800000>; | ||
152 | regulator-max-microvolt = <2800000>; | ||
153 | }; | ||
154 | |||
155 | ldo10_reg: LDO10 { | ||
156 | regulator-name = "VPLL_1.1V"; | ||
157 | regulator-min-microvolt = <1100000>; | ||
158 | regulator-max-microvolt = <1100000>; | ||
159 | regulator-boot-on; | ||
160 | }; | ||
161 | |||
162 | ldo11_reg: LDO11 { | ||
163 | regulator-name = "CAM_IO_2.8V"; | ||
164 | regulator-min-microvolt = <2800000>; | ||
165 | regulator-max-microvolt = <2800000>; | ||
166 | }; | ||
167 | |||
168 | ldo12_reg: LDO12 { | ||
169 | regulator-name = "CAM_ISP_1.2V"; | ||
170 | regulator-min-microvolt = <1200000>; | ||
171 | regulator-max-microvolt = <1200000>; | ||
172 | }; | ||
173 | |||
174 | ldo13_reg: LDO13 { | ||
175 | regulator-name = "CAM_A_2.8V"; | ||
176 | regulator-min-microvolt = <2800000>; | ||
177 | regulator-max-microvolt = <2800000>; | ||
178 | }; | ||
179 | |||
180 | ldo14_reg: LDO14 { | ||
181 | regulator-name = "CAM_CIF_1.8V"; | ||
182 | regulator-min-microvolt = <1800000>; | ||
183 | regulator-max-microvolt = <1800000>; | ||
184 | }; | ||
185 | |||
186 | ldo15_reg: LDO15 { | ||
187 | regulator-name = "CAM_AF_3.3V"; | ||
188 | regulator-min-microvolt = <3300000>; | ||
189 | regulator-max-microvolt = <3300000>; | ||
190 | }; | ||
191 | |||
192 | ldo16_reg: LDO16 { | ||
193 | regulator-name = "VMIPI_1.8V"; | ||
194 | regulator-min-microvolt = <1800000>; | ||
195 | regulator-max-microvolt = <1800000>; | ||
196 | }; | ||
197 | |||
198 | ldo17_reg: LDO17 { | ||
199 | regulator-name = "CAM_8M_1.8V"; | ||
200 | regulator-min-microvolt = <1800000>; | ||
201 | regulator-max-microvolt = <1800000>; | ||
202 | regulator-always-on; | ||
203 | }; | ||
204 | |||
205 | buck1_reg: BUCK1 { | ||
206 | regulator-name = "VARM_1.2V"; | ||
207 | regulator-min-microvolt = <1200000>; | ||
208 | regulator-max-microvolt = <1200000>; | ||
209 | }; | ||
210 | |||
211 | buck2_reg: BUCK2 { | ||
212 | regulator-name = "VINT_1.2V"; | ||
213 | regulator-min-microvolt = <1200000>; | ||
214 | regulator-max-microvolt = <1200000>; | ||
215 | }; | ||
216 | |||
217 | buck3_reg: BUCK3 { | ||
218 | regulator-name = "VCC_1.8V"; | ||
219 | regulator-min-microvolt = <1800000>; | ||
220 | regulator-max-microvolt = <1800000>; | ||
221 | regulator-always-on; | ||
222 | }; | ||
223 | |||
224 | buck4_reg: BUCK4 { | ||
225 | regulator-name = "CAM_CORE_1.2V"; | ||
226 | regulator-min-microvolt = <1200000>; | ||
227 | regulator-max-microvolt = <1200000>; | ||
228 | regulator-always-on; | ||
229 | }; | ||
230 | }; | ||
231 | }; | ||
232 | }; | ||
233 | |||
234 | gpio-keys { | ||
235 | compatible = "gpio-keys"; | ||
236 | |||
237 | power-key { | ||
238 | gpios = <&gph2 6 1>; | ||
239 | linux,code = <KEY_POWER>; | ||
240 | label = "power"; | ||
241 | debounce-interval = <1>; | ||
242 | gpio-key,wakeup; | ||
243 | }; | ||
244 | }; | ||
245 | }; | ||
246 | |||
247 | &xusbxti { | ||
248 | clock-frequency = <24000000>; | ||
249 | }; | ||
250 | |||
251 | &keypad { | ||
252 | linux,input-no-autorepeat; | ||
253 | linux,input-wakeup; | ||
254 | samsung,keypad-num-rows = <3>; | ||
255 | samsung,keypad-num-columns = <3>; | ||
256 | pinctrl-names = "default"; | ||
257 | pinctrl-0 = <&keypad_row0>, <&keypad_row1>, <&keypad_row2>, | ||
258 | <&keypad_col0>, <&keypad_col1>, <&keypad_col2>; | ||
259 | status = "okay"; | ||
260 | |||
261 | key_1 { | ||
262 | keypad,row = <0>; | ||
263 | keypad,column = <1>; | ||
264 | linux,code = <KEY_CONNECT>; | ||
265 | }; | ||
266 | |||
267 | key_2 { | ||
268 | keypad,row = <0>; | ||
269 | keypad,column = <2>; | ||
270 | linux,code = <KEY_BACK>; | ||
271 | }; | ||
272 | |||
273 | key_3 { | ||
274 | keypad,row = <1>; | ||
275 | keypad,column = <1>; | ||
276 | linux,code = <KEY_CAMERA_FOCUS>; | ||
277 | }; | ||
278 | |||
279 | key_4 { | ||
280 | keypad,row = <1>; | ||
281 | keypad,column = <2>; | ||
282 | linux,code = <KEY_VOLUMEUP>; | ||
283 | }; | ||
284 | |||
285 | key_5 { | ||
286 | keypad,row = <2>; | ||
287 | keypad,column = <1>; | ||
288 | linux,code = <KEY_CAMERA>; | ||
289 | }; | ||
290 | |||
291 | key_6 { | ||
292 | keypad,row = <2>; | ||
293 | keypad,column = <2>; | ||
294 | linux,code = <KEY_VOLUMEDOWN>; | ||
295 | }; | ||
296 | }; | ||
297 | |||
298 | &uart0 { | ||
299 | status = "okay"; | ||
300 | }; | ||
301 | |||
302 | &uart1 { | ||
303 | status = "okay"; | ||
304 | }; | ||
305 | |||
306 | &uart2 { | ||
307 | status = "okay"; | ||
308 | }; | ||
309 | |||
310 | &uart3 { | ||
311 | status = "okay"; | ||
312 | }; | ||
313 | |||
314 | &sdhci0 { | ||
315 | bus-width = <4>; | ||
316 | non-removable; | ||
317 | vmmc-supply = <&ldo5_reg>; | ||
318 | pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_cd &sd0_bus1 &sd0_bus4>; | ||
319 | pinctrl-names = "default"; | ||
320 | status = "okay"; | ||
321 | }; | ||
322 | |||
323 | &sdhci2 { | ||
324 | bus-width = <4>; | ||
325 | cd-gpios = <&gph3 4 1>; | ||
326 | vmmc-supply = <&vtf_reg>; | ||
327 | cd-inverted; | ||
328 | pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_bus4>; | ||
329 | pinctrl-names = "default"; | ||
330 | status = "okay"; | ||
331 | }; | ||
332 | |||
333 | &hsotg { | ||
334 | vusb_a-supply = <&ldo3_reg>; | ||
335 | vusb_d-supply = <&ldo8_reg>; | ||
336 | status = "okay"; | ||
337 | }; | ||
338 | |||
339 | &usbphy { | ||
340 | status = "okay"; | ||
341 | }; | ||
342 | |||
343 | &i2c2 { | ||
344 | samsung,i2c-sda-delay = <100>; | ||
345 | samsung,i2c-max-bus-freq = <400000>; | ||
346 | samsung,i2c-slave-addr = <0x10>; | ||
347 | status = "okay"; | ||
348 | |||
349 | tsp@4a { | ||
350 | compatible = "atmel,maxtouch"; | ||
351 | reg = <0x4a>; | ||
352 | interrupt-parent = <&gpj0>; | ||
353 | interrupts = <5 2>; | ||
354 | |||
355 | atmel,x-line = <17>; | ||
356 | atmel,y-line = <11>; | ||
357 | atmel,x-size = <800>; | ||
358 | atmel,y-size = <480>; | ||
359 | atmel,burst-length = <0x21>; | ||
360 | atmel,threshold = <0x28>; | ||
361 | atmel,orientation = <1>; | ||
362 | |||
363 | vdd-supply = <&tsp_reg>; | ||
364 | }; | ||
365 | }; | ||
366 | |||
367 | &i2c0 { | ||
368 | samsung,i2c-sda-delay = <100>; | ||
369 | samsung,i2c-max-bus-freq = <100000>; | ||
370 | samsung,i2c-slave-addr = <0x10>; | ||
371 | status = "okay"; | ||
372 | |||
373 | noon010pc30: sensor@30 { | ||
374 | compatible = "siliconfile,noon010pc30"; | ||
375 | reg = <0x30>; | ||
376 | vddio-supply = <&ldo11_reg>; | ||
377 | vdda-supply = <&ldo13_reg>; | ||
378 | vdd_core-supply = <&ldo14_reg>; | ||
379 | |||
380 | clock-frequency = <16000000>; | ||
381 | clocks = <&clock_cam 0>; | ||
382 | clock-names = "mclk"; | ||
383 | nreset-gpios = <&gpb 2 0>; | ||
384 | nstby-gpios = <&gpb 0 0>; | ||
385 | |||
386 | port { | ||
387 | noon010pc30_ep: endpoint { | ||
388 | remote-endpoint = <&fimc0_ep>; | ||
389 | bus-width = <8>; | ||
390 | hsync-active = <0>; | ||
391 | vsync-active = <1>; | ||
392 | pclk-sample = <1>; | ||
393 | }; | ||
394 | }; | ||
395 | }; | ||
396 | }; | ||
397 | |||
398 | &camera { | ||
399 | pinctrl-0 = <&cam_port_a_io &cam_port_a_clk_active>; | ||
400 | pinctrl-1 = <&cam_port_a_io &cam_port_a_clk_idle>; | ||
401 | pinctrl-names = "default", "idle"; | ||
402 | |||
403 | parallel-ports { | ||
404 | #address-cells = <1>; | ||
405 | #size-cells = <0>; | ||
406 | |||
407 | /* camera A input */ | ||
408 | port@1 { | ||
409 | reg = <1>; | ||
410 | fimc0_ep: endpoint { | ||
411 | remote-endpoint = <&noon010pc30_ep>; | ||
412 | bus-width = <8>; | ||
413 | hsync-active = <1>; | ||
414 | vsync-active = <1>; | ||
415 | pclk-sample = <0>; | ||
416 | }; | ||
417 | }; | ||
418 | }; | ||
419 | }; | ||
420 | |||
421 | &fimd { | ||
422 | pinctrl-0 = <&lcd_clk &lcd_data24>; | ||
423 | pinctrl-names = "default"; | ||
424 | status = "okay"; | ||
425 | |||
426 | display-timings { | ||
427 | native-mode = <&timing0>; | ||
428 | timing0: timing { | ||
429 | /* 480x800@55Hz */ | ||
430 | clock-frequency = <23439570>; | ||
431 | hactive = <480>; | ||
432 | hfront-porch = <16>; | ||
433 | hback-porch = <16>; | ||
434 | hsync-len = <2>; | ||
435 | vactive = <800>; | ||
436 | vback-porch = <2>; | ||
437 | vfront-porch = <28>; | ||
438 | vsync-len = <1>; | ||
439 | hsync-active = <0>; | ||
440 | vsync-active = <0>; | ||
441 | de-active = <0>; | ||
442 | pixelclk-active = <0>; | ||
443 | }; | ||
444 | }; | ||
445 | }; | ||
446 | |||
447 | &onenand { | ||
448 | status = "okay"; | ||
449 | }; | ||
diff --git a/arch/arm/boot/dts/s5pv210-pinctrl.dtsi b/arch/arm/boot/dts/s5pv210-pinctrl.dtsi new file mode 100644 index 000000000000..8c714088e3c6 --- /dev/null +++ b/arch/arm/boot/dts/s5pv210-pinctrl.dtsi | |||
@@ -0,0 +1,839 @@ | |||
1 | /* | ||
2 | * Samsung's S5PV210 SoC device tree source | ||
3 | * | ||
4 | * Copyright (c) 2013-2014 Samsung Electronics, Co. Ltd. | ||
5 | * | ||
6 | * Mateusz Krawczuk <m.krawczuk@partner.samsung.com> | ||
7 | * Tomasz Figa <t.figa@samsung.com> | ||
8 | * | ||
9 | * Samsung's S5PV210 SoC device nodes are listed in this file. S5PV210 | ||
10 | * based board files can include this file and provide values for board specfic | ||
11 | * bindings. | ||
12 | * | ||
13 | * Note: This file does not include device nodes for all the controllers in | ||
14 | * S5PV210 SoC. As device tree coverage for S5PV210 increases, additional | ||
15 | * nodes can be added to this file. | ||
16 | * | ||
17 | * This program is free software; you can redistribute it and/or modify | ||
18 | * it under the terms of the GNU General Public License version 2 as | ||
19 | * published by the Free Software Foundation. | ||
20 | */ | ||
21 | |||
22 | &pinctrl0 { | ||
23 | gpa0: gpa0 { | ||
24 | gpio-controller; | ||
25 | #gpio-cells = <2>; | ||
26 | |||
27 | interrupt-controller; | ||
28 | #interrupt-cells = <2>; | ||
29 | }; | ||
30 | |||
31 | gpa1: gpa1 { | ||
32 | gpio-controller; | ||
33 | #gpio-cells = <2>; | ||
34 | |||
35 | interrupt-controller; | ||
36 | #interrupt-cells = <2>; | ||
37 | }; | ||
38 | |||
39 | gpb: gpb { | ||
40 | gpio-controller; | ||
41 | #gpio-cells = <2>; | ||
42 | |||
43 | interrupt-controller; | ||
44 | #interrupt-cells = <2>; | ||
45 | }; | ||
46 | |||
47 | gpc0: gpc0 { | ||
48 | gpio-controller; | ||
49 | #gpio-cells = <2>; | ||
50 | |||
51 | interrupt-controller; | ||
52 | #interrupt-cells = <2>; | ||
53 | }; | ||
54 | |||
55 | gpc1: gpc1 { | ||
56 | gpio-controller; | ||
57 | #gpio-cells = <2>; | ||
58 | |||
59 | interrupt-controller; | ||
60 | #interrupt-cells = <2>; | ||
61 | }; | ||
62 | |||
63 | gpd0: gpd0 { | ||
64 | gpio-controller; | ||
65 | #gpio-cells = <2>; | ||
66 | |||
67 | interrupt-controller; | ||
68 | #interrupt-cells = <2>; | ||
69 | }; | ||
70 | |||
71 | gpd1: gpd1 { | ||
72 | gpio-controller; | ||
73 | #gpio-cells = <2>; | ||
74 | |||
75 | interrupt-controller; | ||
76 | #interrupt-cells = <2>; | ||
77 | }; | ||
78 | |||
79 | gpe0: gpe0 { | ||
80 | gpio-controller; | ||
81 | #gpio-cells = <2>; | ||
82 | |||
83 | interrupt-controller; | ||
84 | #interrupt-cells = <2>; | ||
85 | }; | ||
86 | |||
87 | gpe1: gpe1 { | ||
88 | gpio-controller; | ||
89 | #gpio-cells = <2>; | ||
90 | |||
91 | interrupt-controller; | ||
92 | #interrupt-cells = <2>; | ||
93 | }; | ||
94 | |||
95 | gpf0: gpf0 { | ||
96 | gpio-controller; | ||
97 | #gpio-cells = <2>; | ||
98 | |||
99 | interrupt-controller; | ||
100 | #interrupt-cells = <2>; | ||
101 | }; | ||
102 | |||
103 | gpf1: gpf1 { | ||
104 | gpio-controller; | ||
105 | #gpio-cells = <2>; | ||
106 | |||
107 | interrupt-controller; | ||
108 | #interrupt-cells = <2>; | ||
109 | }; | ||
110 | |||
111 | gpf2: gpf2 { | ||
112 | gpio-controller; | ||
113 | #gpio-cells = <2>; | ||
114 | |||
115 | interrupt-controller; | ||
116 | #interrupt-cells = <2>; | ||
117 | }; | ||
118 | |||
119 | gpf3: gpf3 { | ||
120 | gpio-controller; | ||
121 | #gpio-cells = <2>; | ||
122 | |||
123 | interrupt-controller; | ||
124 | #interrupt-cells = <2>; | ||
125 | }; | ||
126 | |||
127 | gpg0: gpg0 { | ||
128 | gpio-controller; | ||
129 | #gpio-cells = <2>; | ||
130 | |||
131 | interrupt-controller; | ||
132 | #interrupt-cells = <2>; | ||
133 | }; | ||
134 | |||
135 | gpg1: gpg1 { | ||
136 | gpio-controller; | ||
137 | #gpio-cells = <2>; | ||
138 | |||
139 | interrupt-controller; | ||
140 | #interrupt-cells = <2>; | ||
141 | }; | ||
142 | |||
143 | gpg2: gpg2 { | ||
144 | gpio-controller; | ||
145 | #gpio-cells = <2>; | ||
146 | |||
147 | interrupt-controller; | ||
148 | #interrupt-cells = <2>; | ||
149 | }; | ||
150 | |||
151 | gpg3: gpg3 { | ||
152 | gpio-controller; | ||
153 | #gpio-cells = <2>; | ||
154 | |||
155 | interrupt-controller; | ||
156 | #interrupt-cells = <2>; | ||
157 | }; | ||
158 | |||
159 | gpj0: gpj0 { | ||
160 | gpio-controller; | ||
161 | #gpio-cells = <2>; | ||
162 | |||
163 | interrupt-controller; | ||
164 | #interrupt-cells = <2>; | ||
165 | }; | ||
166 | |||
167 | gpj1: gpj1 { | ||
168 | gpio-controller; | ||
169 | #gpio-cells = <2>; | ||
170 | |||
171 | interrupt-controller; | ||
172 | #interrupt-cells = <2>; | ||
173 | }; | ||
174 | |||
175 | gpj2: gpj2 { | ||
176 | gpio-controller; | ||
177 | #gpio-cells = <2>; | ||
178 | |||
179 | interrupt-controller; | ||
180 | #interrupt-cells = <2>; | ||
181 | }; | ||
182 | |||
183 | gpj3: gpj3 { | ||
184 | gpio-controller; | ||
185 | #gpio-cells = <2>; | ||
186 | |||
187 | interrupt-controller; | ||
188 | #interrupt-cells = <2>; | ||
189 | }; | ||
190 | |||
191 | gpj4: gpj4 { | ||
192 | gpio-controller; | ||
193 | #gpio-cells = <2>; | ||
194 | |||
195 | interrupt-controller; | ||
196 | #interrupt-cells = <2>; | ||
197 | }; | ||
198 | |||
199 | gpgi: gpgi { | ||
200 | gpio-controller; | ||
201 | #gpio-cells = <2>; | ||
202 | }; | ||
203 | |||
204 | mp01: mp01 { | ||
205 | gpio-controller; | ||
206 | #gpio-cells = <2>; | ||
207 | }; | ||
208 | |||
209 | mp02: mp02 { | ||
210 | gpio-controller; | ||
211 | #gpio-cells = <2>; | ||
212 | }; | ||
213 | |||
214 | mp03: mp03 { | ||
215 | gpio-controller; | ||
216 | #gpio-cells = <2>; | ||
217 | }; | ||
218 | |||
219 | mp04: mp04 { | ||
220 | gpio-controller; | ||
221 | #gpio-cells = <2>; | ||
222 | }; | ||
223 | |||
224 | mp05: mp05 { | ||
225 | gpio-controller; | ||
226 | #gpio-cells = <2>; | ||
227 | }; | ||
228 | |||
229 | mp06: mp06 { | ||
230 | gpio-controller; | ||
231 | #gpio-cells = <2>; | ||
232 | }; | ||
233 | |||
234 | mp07: mp07 { | ||
235 | gpio-controller; | ||
236 | #gpio-cells = <2>; | ||
237 | }; | ||
238 | |||
239 | gph0: gph0 { | ||
240 | gpio-controller; | ||
241 | interrupt-controller; | ||
242 | interrupt-parent = <&vic0>; | ||
243 | interrupts = <0>, <1>, <2>, <3>, | ||
244 | <4>, <5>, <6>, <7>; | ||
245 | #gpio-cells = <2>; | ||
246 | #interrupt-cells = <2>; | ||
247 | }; | ||
248 | |||
249 | gph1: gph1 { | ||
250 | gpio-controller; | ||
251 | interrupt-controller; | ||
252 | interrupt-parent = <&vic0>; | ||
253 | interrupts = <8>, <9>, <10>, <11>, | ||
254 | <12>, <13>, <14>, <15>; | ||
255 | #gpio-cells = <2>; | ||
256 | #interrupt-cells = <2>; | ||
257 | }; | ||
258 | |||
259 | gph2: gph2 { | ||
260 | gpio-controller; | ||
261 | #gpio-cells = <2>; | ||
262 | #interrupt-cells = <2>; | ||
263 | }; | ||
264 | |||
265 | gph3: gph3 { | ||
266 | gpio-controller; | ||
267 | #gpio-cells = <2>; | ||
268 | #interrupt-cells = <2>; | ||
269 | }; | ||
270 | |||
271 | uart0_data: uart0-data { | ||
272 | samsung,pins = "gpa0-0", "gpa0-1"; | ||
273 | samsung,pin-function = <2>; | ||
274 | samsung,pin-pud = <0>; | ||
275 | samsung,pin-drv = <0>; | ||
276 | }; | ||
277 | |||
278 | uart0_fctl: uart0-fctl { | ||
279 | samsung,pins = "gpa0-2", "gpa0-3"; | ||
280 | samsung,pin-function = <2>; | ||
281 | samsung,pin-pud = <0>; | ||
282 | samsung,pin-drv = <0>; | ||
283 | }; | ||
284 | |||
285 | uart1_data: uart1-data { | ||
286 | samsung,pins = "gpa0-4", "gpa0-5"; | ||
287 | samsung,pin-function = <2>; | ||
288 | samsung,pin-pud = <0>; | ||
289 | samsung,pin-drv = <0>; | ||
290 | }; | ||
291 | |||
292 | uart1_fctl: uart1-fctl { | ||
293 | samsung,pins = "gpa0-6", "gpa0-7"; | ||
294 | samsung,pin-function = <2>; | ||
295 | samsung,pin-pud = <0>; | ||
296 | samsung,pin-drv = <0>; | ||
297 | }; | ||
298 | |||
299 | uart2_data: uart2-data { | ||
300 | samsung,pins = "gpa1-0", "gpa1-1"; | ||
301 | samsung,pin-function = <2>; | ||
302 | samsung,pin-pud = <0>; | ||
303 | samsung,pin-drv = <0>; | ||
304 | }; | ||
305 | |||
306 | uart2_fctl: uart2-fctl { | ||
307 | samsung,pins = "gpa1-2", "gpa1-3"; | ||
308 | samsung,pin-function = <3>; | ||
309 | samsung,pin-pud = <0>; | ||
310 | samsung,pin-drv = <0>; | ||
311 | }; | ||
312 | |||
313 | uart3_data: uart3-data { | ||
314 | samsung,pins = "gpa1-2", "gpa1-3"; | ||
315 | samsung,pin-function = <2>; | ||
316 | samsung,pin-pud = <0>; | ||
317 | samsung,pin-drv = <0>; | ||
318 | }; | ||
319 | |||
320 | uart_audio: uart-audio { | ||
321 | samsung,pins = "gpa1-2", "gpa1-3"; | ||
322 | samsung,pin-function = <4>; | ||
323 | samsung,pin-pud = <0>; | ||
324 | samsung,pin-drv = <0>; | ||
325 | }; | ||
326 | |||
327 | spi0_bus: spi0-bus { | ||
328 | samsung,pins = "gpb-0", "gpb-2", "gpb-3"; | ||
329 | samsung,pin-function = <2>; | ||
330 | samsung,pin-pud = <2>; | ||
331 | samsung,pin-drv = <0>; | ||
332 | }; | ||
333 | |||
334 | spi1_bus: spi1-bus { | ||
335 | samsung,pins = "gpb-4", "gpb-6", "gpb-7"; | ||
336 | samsung,pin-function = <2>; | ||
337 | samsung,pin-pud = <2>; | ||
338 | samsung,pin-drv = <0>; | ||
339 | }; | ||
340 | |||
341 | i2s0_bus: i2s0-bus { | ||
342 | samsung,pins = "gpi-0", "gpi-1", "gpi-2", "gpi-3", | ||
343 | "gpi-4", "gpi-5", "gpi-6"; | ||
344 | samsung,pin-function = <2>; | ||
345 | samsung,pin-pud = <0>; | ||
346 | samsung,pin-drv = <0>; | ||
347 | }; | ||
348 | |||
349 | i2s1_bus: i2s1-bus { | ||
350 | samsung,pins = "gpc0-0", "gpc0-1", "gpc0-2", "gpc0-3", | ||
351 | "gpc0-4"; | ||
352 | samsung,pin-function = <2>; | ||
353 | samsung,pin-pud = <0>; | ||
354 | samsung,pin-drv = <0>; | ||
355 | }; | ||
356 | |||
357 | i2s2_bus: i2s2-bus { | ||
358 | samsung,pins = "gpc1-0", "gpc1-1", "gpc1-2", "gpc1-3", | ||
359 | "gpc1-4"; | ||
360 | samsung,pin-function = <4>; | ||
361 | samsung,pin-pud = <0>; | ||
362 | samsung,pin-drv = <0>; | ||
363 | }; | ||
364 | |||
365 | pcm1_bus: pcm1-bus { | ||
366 | samsung,pins = "gpc0-0", "gpc0-1", "gpc0-2", "gpc0-3", | ||
367 | "gpc0-4"; | ||
368 | samsung,pin-function = <3>; | ||
369 | samsung,pin-pud = <0>; | ||
370 | samsung,pin-drv = <0>; | ||
371 | }; | ||
372 | |||
373 | ac97_bus: ac97-bus { | ||
374 | samsung,pins = "gpc0-0", "gpc0-1", "gpc0-2", "gpc0-3", | ||
375 | "gpc0-4"; | ||
376 | samsung,pin-function = <4>; | ||
377 | samsung,pin-pud = <0>; | ||
378 | samsung,pin-drv = <0>; | ||
379 | }; | ||
380 | |||
381 | i2s2_bus: i2s2-bus { | ||
382 | samsung,pins = "gpc1-0", "gpc1-1", "gpc1-2", "gpc1-3", | ||
383 | "gpc1-4"; | ||
384 | samsung,pin-function = <2>; | ||
385 | samsung,pin-pud = <0>; | ||
386 | samsung,pin-drv = <0>; | ||
387 | }; | ||
388 | |||
389 | pcm2_bus: pcm2-bus { | ||
390 | samsung,pins = "gpc1-0", "gpc1-1", "gpc1-2", "gpc1-3", | ||
391 | "gpc1-4"; | ||
392 | samsung,pin-function = <3>; | ||
393 | samsung,pin-pud = <0>; | ||
394 | samsung,pin-drv = <0>; | ||
395 | }; | ||
396 | |||
397 | spdif_bus: spdif-bus { | ||
398 | samsung,pins = "gpc1-0", "gpc1-1"; | ||
399 | samsung,pin-function = <4>; | ||
400 | samsung,pin-pud = <0>; | ||
401 | samsung,pin-drv = <0>; | ||
402 | }; | ||
403 | |||
404 | spi2_bus: spi2-bus { | ||
405 | samsung,pins = "gpc1-1", "gpc1-2", "gpc1-3", "gpc1-4"; | ||
406 | samsung,pin-function = <5>; | ||
407 | samsung,pin-pud = <2>; | ||
408 | samsung,pin-drv = <0>; | ||
409 | }; | ||
410 | |||
411 | i2c0_bus: i2c0-bus { | ||
412 | samsung,pins = "gpd1-0", "gpd1-1"; | ||
413 | samsung,pin-function = <2>; | ||
414 | samsung,pin-pud = <2>; | ||
415 | samsung,pin-drv = <0>; | ||
416 | }; | ||
417 | |||
418 | i2c1_bus: i2c1-bus { | ||
419 | samsung,pins = "gpd1-2", "gpd1-3"; | ||
420 | samsung,pin-function = <2>; | ||
421 | samsung,pin-pud = <2>; | ||
422 | samsung,pin-drv = <0>; | ||
423 | }; | ||
424 | |||
425 | i2c2_bus: i2c2-bus { | ||
426 | samsung,pins = "gpd1-4", "gpd1-5"; | ||
427 | samsung,pin-function = <2>; | ||
428 | samsung,pin-pud = <2>; | ||
429 | samsung,pin-drv = <0>; | ||
430 | }; | ||
431 | |||
432 | pwm0_out: pwm0-out { | ||
433 | samsung,pins = "gpd0-0"; | ||
434 | samsung,pin-function = <2>; | ||
435 | samsung,pin-pud = <0>; | ||
436 | samsung,pin-drv = <0>; | ||
437 | }; | ||
438 | |||
439 | pwm1_out: pwm1-out { | ||
440 | samsung,pins = "gpd0-1"; | ||
441 | samsung,pin-function = <2>; | ||
442 | samsung,pin-pud = <0>; | ||
443 | samsung,pin-drv = <0>; | ||
444 | }; | ||
445 | |||
446 | pwm2_out: pwm2-out { | ||
447 | samsung,pins = "gpd0-2"; | ||
448 | samsung,pin-function = <2>; | ||
449 | samsung,pin-pud = <0>; | ||
450 | samsung,pin-drv = <0>; | ||
451 | }; | ||
452 | |||
453 | pwm3_out: pwm3-out { | ||
454 | samsung,pins = "gpd0-3"; | ||
455 | samsung,pin-function = <2>; | ||
456 | samsung,pin-pud = <0>; | ||
457 | samsung,pin-drv = <0>; | ||
458 | }; | ||
459 | |||
460 | keypad_row0: keypad-row-0 { | ||
461 | samsung,pins = "gph3-0"; | ||
462 | samsung,pin-function = <3>; | ||
463 | samsung,pin-pud = <0>; | ||
464 | samsung,pin-drv = <0>; | ||
465 | }; | ||
466 | |||
467 | keypad_row1: keypad-row-1 { | ||
468 | samsung,pins = "gph3-1"; | ||
469 | samsung,pin-function = <3>; | ||
470 | samsung,pin-pud = <0>; | ||
471 | samsung,pin-drv = <0>; | ||
472 | }; | ||
473 | |||
474 | keypad_row2: keypad-row-2 { | ||
475 | samsung,pins = "gph3-2"; | ||
476 | samsung,pin-function = <3>; | ||
477 | samsung,pin-pud = <0>; | ||
478 | samsung,pin-drv = <0>; | ||
479 | }; | ||
480 | |||
481 | keypad_row3: keypad-row-3 { | ||
482 | samsung,pins = "gph3-3"; | ||
483 | samsung,pin-function = <3>; | ||
484 | samsung,pin-pud = <0>; | ||
485 | samsung,pin-drv = <0>; | ||
486 | }; | ||
487 | |||
488 | keypad_row4: keypad-row-4 { | ||
489 | samsung,pins = "gph3-4"; | ||
490 | samsung,pin-function = <3>; | ||
491 | samsung,pin-pud = <0>; | ||
492 | samsung,pin-drv = <0>; | ||
493 | }; | ||
494 | |||
495 | keypad_row5: keypad-row-5 { | ||
496 | samsung,pins = "gph3-5"; | ||
497 | samsung,pin-function = <3>; | ||
498 | samsung,pin-pud = <0>; | ||
499 | samsung,pin-drv = <0>; | ||
500 | }; | ||
501 | |||
502 | keypad_row6: keypad-row-6 { | ||
503 | samsung,pins = "gph3-6"; | ||
504 | samsung,pin-function = <3>; | ||
505 | samsung,pin-pud = <0>; | ||
506 | samsung,pin-drv = <0>; | ||
507 | }; | ||
508 | |||
509 | keypad_row7: keypad-row-7 { | ||
510 | samsung,pins = "gph3-7"; | ||
511 | samsung,pin-function = <3>; | ||
512 | samsung,pin-pud = <0>; | ||
513 | samsung,pin-drv = <0>; | ||
514 | }; | ||
515 | |||
516 | keypad_col0: keypad-col-0 { | ||
517 | samsung,pins = "gph2-0"; | ||
518 | samsung,pin-function = <3>; | ||
519 | samsung,pin-pud = <0>; | ||
520 | samsung,pin-drv = <0>; | ||
521 | }; | ||
522 | |||
523 | keypad_col1: keypad-col-1 { | ||
524 | samsung,pins = "gph2-1"; | ||
525 | samsung,pin-function = <3>; | ||
526 | samsung,pin-pud = <0>; | ||
527 | samsung,pin-drv = <0>; | ||
528 | }; | ||
529 | |||
530 | keypad_col2: keypad-col-2 { | ||
531 | samsung,pins = "gph2-2"; | ||
532 | samsung,pin-function = <3>; | ||
533 | samsung,pin-pud = <0>; | ||
534 | samsung,pin-drv = <0>; | ||
535 | }; | ||
536 | |||
537 | keypad_col3: keypad-col-3 { | ||
538 | samsung,pins = "gph2-3"; | ||
539 | samsung,pin-function = <3>; | ||
540 | samsung,pin-pud = <0>; | ||
541 | samsung,pin-drv = <0>; | ||
542 | }; | ||
543 | |||
544 | keypad_col4: keypad-col-4 { | ||
545 | samsung,pins = "gph2-4"; | ||
546 | samsung,pin-function = <3>; | ||
547 | samsung,pin-pud = <0>; | ||
548 | samsung,pin-drv = <0>; | ||
549 | }; | ||
550 | |||
551 | keypad_col5: keypad-col-5 { | ||
552 | samsung,pins = "gph2-5"; | ||
553 | samsung,pin-function = <3>; | ||
554 | samsung,pin-pud = <0>; | ||
555 | samsung,pin-drv = <0>; | ||
556 | }; | ||
557 | |||
558 | keypad_col6: keypad-col-6 { | ||
559 | samsung,pins = "gph2-6"; | ||
560 | samsung,pin-function = <3>; | ||
561 | samsung,pin-pud = <0>; | ||
562 | samsung,pin-drv = <0>; | ||
563 | }; | ||
564 | |||
565 | keypad_col7: keypad-col-7 { | ||
566 | samsung,pins = "gph2-7"; | ||
567 | samsung,pin-function = <3>; | ||
568 | samsung,pin-pud = <0>; | ||
569 | samsung,pin-drv = <0>; | ||
570 | }; | ||
571 | |||
572 | sd0_clk: sd0-clk { | ||
573 | samsung,pins = "gpg0-0"; | ||
574 | samsung,pin-function = <2>; | ||
575 | samsung,pin-pud = <0>; | ||
576 | samsung,pin-drv = <3>; | ||
577 | }; | ||
578 | |||
579 | sd0_cmd: sd0-cmd { | ||
580 | samsung,pins = "gpg0-1"; | ||
581 | samsung,pin-function = <2>; | ||
582 | samsung,pin-pud = <0>; | ||
583 | samsung,pin-drv = <3>; | ||
584 | }; | ||
585 | |||
586 | sd0_cd: sd0-cd { | ||
587 | samsung,pins = "gpg0-2"; | ||
588 | samsung,pin-function = <2>; | ||
589 | samsung,pin-pud = <2>; | ||
590 | samsung,pin-drv = <3>; | ||
591 | }; | ||
592 | |||
593 | sd0_bus1: sd0-bus-width1 { | ||
594 | samsung,pins = "gpg0-3"; | ||
595 | samsung,pin-function = <2>; | ||
596 | samsung,pin-pud = <2>; | ||
597 | samsung,pin-drv = <3>; | ||
598 | }; | ||
599 | |||
600 | sd0_bus4: sd0-bus-width4 { | ||
601 | samsung,pins = "gpg0-3", "gpg0-4", "gpg0-5", "gpg0-6"; | ||
602 | samsung,pin-function = <2>; | ||
603 | samsung,pin-pud = <2>; | ||
604 | samsung,pin-drv = <3>; | ||
605 | }; | ||
606 | |||
607 | sd0_bus8: sd0-bus-width8 { | ||
608 | samsung,pins = "gpg1-3", "gpg1-4", "gpg1-5", "gpg1-6"; | ||
609 | samsung,pin-function = <3>; | ||
610 | samsung,pin-pud = <2>; | ||
611 | samsung,pin-drv = <3>; | ||
612 | }; | ||
613 | |||
614 | sd1_clk: sd1-clk { | ||
615 | samsung,pins = "gpg1-0"; | ||
616 | samsung,pin-function = <2>; | ||
617 | samsung,pin-pud = <0>; | ||
618 | samsung,pin-drv = <3>; | ||
619 | }; | ||
620 | |||
621 | sd1_cmd: sd1-cmd { | ||
622 | samsung,pins = "gpg1-1"; | ||
623 | samsung,pin-function = <2>; | ||
624 | samsung,pin-pud = <0>; | ||
625 | samsung,pin-drv = <3>; | ||
626 | }; | ||
627 | |||
628 | sd1_cd: sd1-cd { | ||
629 | samsung,pins = "gpg1-2"; | ||
630 | samsung,pin-function = <2>; | ||
631 | samsung,pin-pud = <2>; | ||
632 | samsung,pin-drv = <3>; | ||
633 | }; | ||
634 | |||
635 | sd1_bus1: sd1-bus-width1 { | ||
636 | samsung,pins = "gpg1-3"; | ||
637 | samsung,pin-function = <2>; | ||
638 | samsung,pin-pud = <2>; | ||
639 | samsung,pin-drv = <3>; | ||
640 | }; | ||
641 | |||
642 | sd1_bus4: sd1-bus-width4 { | ||
643 | samsung,pins = "gpg1-3", "gpg1-4", "gpg1-5", "gpg1-6"; | ||
644 | samsung,pin-function = <2>; | ||
645 | samsung,pin-pud = <2>; | ||
646 | samsung,pin-drv = <3>; | ||
647 | }; | ||
648 | |||
649 | sd2_clk: sd2-clk { | ||
650 | samsung,pins = "gpg2-0"; | ||
651 | samsung,pin-function = <2>; | ||
652 | samsung,pin-pud = <0>; | ||
653 | samsung,pin-drv = <3>; | ||
654 | }; | ||
655 | |||
656 | sd2_cmd: sd2-cmd { | ||
657 | samsung,pins = "gpg2-1"; | ||
658 | samsung,pin-function = <2>; | ||
659 | samsung,pin-pud = <0>; | ||
660 | samsung,pin-drv = <3>; | ||
661 | }; | ||
662 | |||
663 | sd2_cd: sd2-cd { | ||
664 | samsung,pins = "gpg2-2"; | ||
665 | samsung,pin-function = <2>; | ||
666 | samsung,pin-pud = <2>; | ||
667 | samsung,pin-drv = <3>; | ||
668 | }; | ||
669 | |||
670 | sd2_bus1: sd2-bus-width1 { | ||
671 | samsung,pins = "gpg2-3"; | ||
672 | samsung,pin-function = <2>; | ||
673 | samsung,pin-pud = <2>; | ||
674 | samsung,pin-drv = <3>; | ||
675 | }; | ||
676 | |||
677 | sd2_bus4: sd2-bus-width4 { | ||
678 | samsung,pins = "gpg2-3", "gpg2-4", "gpg2-5", "gpg2-6"; | ||
679 | samsung,pin-function = <2>; | ||
680 | samsung,pin-pud = <2>; | ||
681 | samsung,pin-drv = <3>; | ||
682 | }; | ||
683 | |||
684 | sd2_bus8: sd2-bus-width8 { | ||
685 | samsung,pins = "gpg3-3", "gpg3-4", "gpg3-5", "gpg3-6"; | ||
686 | samsung,pin-function = <3>; | ||
687 | samsung,pin-pud = <2>; | ||
688 | samsung,pin-drv = <3>; | ||
689 | }; | ||
690 | |||
691 | sd3_clk: sd3-clk { | ||
692 | samsung,pins = "gpg3-0"; | ||
693 | samsung,pin-function = <2>; | ||
694 | samsung,pin-pud = <0>; | ||
695 | samsung,pin-drv = <3>; | ||
696 | }; | ||
697 | |||
698 | sd3_cmd: sd3-cmd { | ||
699 | samsung,pins = "gpg3-1"; | ||
700 | samsung,pin-function = <2>; | ||
701 | samsung,pin-pud = <0>; | ||
702 | samsung,pin-drv = <3>; | ||
703 | }; | ||
704 | |||
705 | sd3_cd: sd3-cd { | ||
706 | samsung,pins = "gpg3-2"; | ||
707 | samsung,pin-function = <2>; | ||
708 | samsung,pin-pud = <2>; | ||
709 | samsung,pin-drv = <3>; | ||
710 | }; | ||
711 | |||
712 | sd3_bus1: sd3-bus-width1 { | ||
713 | samsung,pins = "gpg3-3"; | ||
714 | samsung,pin-function = <2>; | ||
715 | samsung,pin-pud = <2>; | ||
716 | samsung,pin-drv = <3>; | ||
717 | }; | ||
718 | |||
719 | sd3_bus4: sd3-bus-width4 { | ||
720 | samsung,pins = "gpg3-3", "gpg3-4", "gpg3-5", "gpg3-6"; | ||
721 | samsung,pin-function = <2>; | ||
722 | samsung,pin-pud = <2>; | ||
723 | samsung,pin-drv = <3>; | ||
724 | }; | ||
725 | |||
726 | eint0: ext-int0 { | ||
727 | samsung,pins = "gph0-0"; | ||
728 | samsung,pin-function = <0xf>; | ||
729 | samsung,pin-pud = <0>; | ||
730 | samsung,pin-drv = <0>; | ||
731 | }; | ||
732 | |||
733 | eint8: ext-int8 { | ||
734 | samsung,pins = "gph1-0"; | ||
735 | samsung,pin-function = <0xf>; | ||
736 | samsung,pin-pud = <0>; | ||
737 | samsung,pin-drv = <0>; | ||
738 | }; | ||
739 | |||
740 | eint15: ext-int15 { | ||
741 | samsung,pins = "gph1-7"; | ||
742 | samsung,pin-function = <0xf>; | ||
743 | samsung,pin-pud = <0>; | ||
744 | samsung,pin-drv = <0>; | ||
745 | }; | ||
746 | |||
747 | eint16: ext-int16 { | ||
748 | samsung,pins = "gph2-0"; | ||
749 | samsung,pin-function = <0xf>; | ||
750 | samsung,pin-pud = <0>; | ||
751 | samsung,pin-drv = <0>; | ||
752 | }; | ||
753 | |||
754 | eint31: ext-int31 { | ||
755 | samsung,pins = "gph3-7"; | ||
756 | samsung,pin-function = <0xf>; | ||
757 | samsung,pin-pud = <0>; | ||
758 | samsung,pin-drv = <0>; | ||
759 | }; | ||
760 | |||
761 | cam_port_a_io: cam-port-a-io { | ||
762 | samsung,pins = "gpe0-0", "gpe0-1", "gpe0-2", "gpe0-3", | ||
763 | "gpe0-4", "gpe0-5", "gpe0-6", "gpe0-7", | ||
764 | "gpe1-0", "gpe1-1", "gpe1-2", "gpe1-4"; | ||
765 | samsung,pin-function = <2>; | ||
766 | samsung,pin-pud = <0>; | ||
767 | samsung,pin-drv = <0>; | ||
768 | }; | ||
769 | |||
770 | cam_port_a_clk_active: cam-port-a-clk-active { | ||
771 | samsung,pins = "gpe1-3"; | ||
772 | samsung,pin-function = <2>; | ||
773 | samsung,pin-pud = <0>; | ||
774 | samsung,pin-drv = <3>; | ||
775 | }; | ||
776 | |||
777 | cam_port_a_clk_idle: cam-port-a-clk-idle { | ||
778 | samsung,pins = "gpe1-3"; | ||
779 | samsung,pin-function = <0>; | ||
780 | samsung,pin-pud = <1>; | ||
781 | samsung,pin-drv = <0>; | ||
782 | }; | ||
783 | |||
784 | cam_port_b_io: cam-port-b-io { | ||
785 | samsung,pins = "gpj0-0", "gpj0-1", "gpj0-2", "gpj0-3", | ||
786 | "gpj0-4", "gpj0-5", "gpj0-6", "gpj0-7", | ||
787 | "gpj1-0", "gpj1-1", "gpj1-2", "gpj1-4"; | ||
788 | samsung,pin-function = <3>; | ||
789 | samsung,pin-pud = <0>; | ||
790 | samsung,pin-drv = <0>; | ||
791 | }; | ||
792 | |||
793 | cam_port_b_clk_active: cam-port-b-clk-active { | ||
794 | samsung,pins = "gpj1-3"; | ||
795 | samsung,pin-function = <3>; | ||
796 | samsung,pin-pud = <0>; | ||
797 | samsung,pin-drv = <3>; | ||
798 | }; | ||
799 | |||
800 | cam_port_b_clk_idle: cam-port-b-clk-idle { | ||
801 | samsung,pins = "gpj1-3"; | ||
802 | samsung,pin-function = <0>; | ||
803 | samsung,pin-pud = <1>; | ||
804 | samsung,pin-drv = <0>; | ||
805 | }; | ||
806 | |||
807 | lcd_ctrl: lcd-ctrl { | ||
808 | samsung,pins = "gpd0-0", "gpd0-1"; | ||
809 | samsung,pin-function = <3>; | ||
810 | samsung,pin-pud = <0>; | ||
811 | samsung,pin-drv = <0>; | ||
812 | }; | ||
813 | |||
814 | lcd_sync: lcd-sync { | ||
815 | samsung,pins = "gpf0-0", "gpf0-1"; | ||
816 | samsung,pin-function = <2>; | ||
817 | samsung,pin-pud = <0>; | ||
818 | samsung,pin-drv = <0>; | ||
819 | }; | ||
820 | |||
821 | lcd_clk: lcd-clk { | ||
822 | samsung,pins = "gpf0-0", "gpf0-1", "gpf0-2", "gpf0-3"; | ||
823 | samsung,pin-function = <2>; | ||
824 | samsung,pin-pud = <0>; | ||
825 | samsung,pin-drv = <0>; | ||
826 | }; | ||
827 | |||
828 | lcd_data24: lcd-data-width24 { | ||
829 | samsung,pins = "gpf0-4", "gpf0-5", "gpf0-6", "gpf0-7", | ||
830 | "gpf1-0", "gpf1-1", "gpf1-2", "gpf1-3", | ||
831 | "gpf1-4", "gpf1-5", "gpf1-6", "gpf1-7", | ||
832 | "gpf2-0", "gpf2-1", "gpf2-2", "gpf2-3", | ||
833 | "gpf2-4", "gpf2-5", "gpf2-6", "gpf2-7", | ||
834 | "gpf3-0", "gpf3-1", "gpf3-2", "gpf3-3"; | ||
835 | samsung,pin-function = <2>; | ||
836 | samsung,pin-pud = <0>; | ||
837 | samsung,pin-drv = <0>; | ||
838 | }; | ||
839 | }; | ||
diff --git a/arch/arm/boot/dts/s5pv210-smdkc110.dts b/arch/arm/boot/dts/s5pv210-smdkc110.dts new file mode 100644 index 000000000000..1eedab7ffe94 --- /dev/null +++ b/arch/arm/boot/dts/s5pv210-smdkc110.dts | |||
@@ -0,0 +1,78 @@ | |||
1 | /* | ||
2 | * Samsung's S5PV210 SoC device tree source | ||
3 | * | ||
4 | * Copyright (c) 2013-2014 Samsung Electronics, Co. Ltd. | ||
5 | * | ||
6 | * Mateusz Krawczuk <m.krawczuk@partner.samsung.com> | ||
7 | * Tomasz Figa <t.figa@samsung.com> | ||
8 | * | ||
9 | * Board device tree source for YIC System SMDC110 board. | ||
10 | * | ||
11 | * NOTE: This file is completely based on original board file for mach-smdkc110 | ||
12 | * available in Linux 3.15 and intends to provide equivalent level of hardware | ||
13 | * support. Due to lack of hardware, _no_ testing has been performed. | ||
14 | * | ||
15 | * This program is free software; you can redistribute it and/or modify | ||
16 | * it under the terms of the GNU General Public License version 2 as | ||
17 | * published by the Free Software Foundation. | ||
18 | */ | ||
19 | |||
20 | /dts-v1/; | ||
21 | #include <dt-bindings/input/input.h> | ||
22 | #include "s5pv210.dtsi" | ||
23 | |||
24 | / { | ||
25 | model = "YIC System SMDKC110 based on S5PC110"; | ||
26 | compatible = "yic,smdkc110", "samsung,s5pv210"; | ||
27 | |||
28 | chosen { | ||
29 | bootargs = "console=ttySAC0,115200n8 root=/dev/mmcblk0p1 rw rootwait ignore_loglevel earlyprintk"; | ||
30 | }; | ||
31 | |||
32 | memory { | ||
33 | device_type = "memory"; | ||
34 | reg = <0x20000000 0x20000000>; | ||
35 | }; | ||
36 | }; | ||
37 | |||
38 | &xusbxti { | ||
39 | clock-frequency = <24000000>; | ||
40 | }; | ||
41 | |||
42 | &uart0 { | ||
43 | status = "okay"; | ||
44 | }; | ||
45 | |||
46 | &uart1 { | ||
47 | status = "okay"; | ||
48 | }; | ||
49 | |||
50 | &uart2 { | ||
51 | status = "okay"; | ||
52 | }; | ||
53 | |||
54 | &uart3 { | ||
55 | status = "okay"; | ||
56 | }; | ||
57 | |||
58 | &rtc { | ||
59 | status = "okay"; | ||
60 | }; | ||
61 | |||
62 | &i2c0 { | ||
63 | status = "okay"; | ||
64 | |||
65 | audio-codec@1b { | ||
66 | compatible = "wlf,wm8580"; | ||
67 | reg = <0x1b>; | ||
68 | }; | ||
69 | |||
70 | eeprom@50 { | ||
71 | compatible = "atmel,24c08"; | ||
72 | reg = <0x50>; | ||
73 | }; | ||
74 | }; | ||
75 | |||
76 | &i2s0 { | ||
77 | status = "okay"; | ||
78 | }; | ||
diff --git a/arch/arm/boot/dts/s5pv210-smdkv210.dts b/arch/arm/boot/dts/s5pv210-smdkv210.dts new file mode 100644 index 000000000000..cb8521899ec8 --- /dev/null +++ b/arch/arm/boot/dts/s5pv210-smdkv210.dts | |||
@@ -0,0 +1,238 @@ | |||
1 | /* | ||
2 | * Samsung's S5PV210 SoC device tree source | ||
3 | * | ||
4 | * Copyright (c) 2013-2014 Samsung Electronics, Co. Ltd. | ||
5 | * | ||
6 | * Mateusz Krawczuk <m.krawczuk@partner.samsung.com> | ||
7 | * Tomasz Figa <t.figa@samsung.com> | ||
8 | * | ||
9 | * Board device tree source for YIC System SMDV210 board. | ||
10 | * | ||
11 | * NOTE: This file is completely based on original board file for mach-smdkv210 | ||
12 | * available in Linux 3.15 and intends to provide equivalent level of hardware | ||
13 | * support. Due to lack of hardware, _no_ testing has been performed. | ||
14 | * | ||
15 | * This program is free software; you can redistribute it and/or modify | ||
16 | * it under the terms of the GNU General Public License version 2 as | ||
17 | * published by the Free Software Foundation. | ||
18 | */ | ||
19 | |||
20 | /dts-v1/; | ||
21 | #include <dt-bindings/input/input.h> | ||
22 | #include "s5pv210.dtsi" | ||
23 | |||
24 | / { | ||
25 | model = "YIC System SMDKV210 based on S5PV210"; | ||
26 | compatible = "yic,smdkv210", "samsung,s5pv210"; | ||
27 | |||
28 | chosen { | ||
29 | bootargs = "console=ttySAC0,115200n8 root=/dev/mmcblk0p1 rw rootwait ignore_loglevel earlyprintk"; | ||
30 | }; | ||
31 | |||
32 | memory { | ||
33 | device_type = "memory"; | ||
34 | reg = <0x20000000 0x40000000>; | ||
35 | }; | ||
36 | |||
37 | ethernet@18000000 { | ||
38 | compatible = "davicom,dm9000"; | ||
39 | reg = <0xA8000000 0x2 0xA8000002 0x2>; | ||
40 | interrupt-parent = <&gph1>; | ||
41 | interrupts = <1 4>; | ||
42 | local-mac-address = [00 00 de ad be ef]; | ||
43 | davicom,no-eeprom; | ||
44 | }; | ||
45 | |||
46 | backlight { | ||
47 | compatible = "pwm-backlight"; | ||
48 | pwms = <&pwm 3 5000000 0>; | ||
49 | brightness-levels = <0 4 8 16 32 64 128 255>; | ||
50 | default-brightness-level = <6>; | ||
51 | pinctrl-names = "default"; | ||
52 | pinctrl-0 = <&pwm3_out>; | ||
53 | }; | ||
54 | }; | ||
55 | |||
56 | &xusbxti { | ||
57 | clock-frequency = <24000000>; | ||
58 | }; | ||
59 | |||
60 | &keypad { | ||
61 | linux,input-no-autorepeat; | ||
62 | linux,input-wakeup; | ||
63 | samsung,keypad-num-rows = <8>; | ||
64 | samsung,keypad-num-columns = <8>; | ||
65 | pinctrl-names = "default"; | ||
66 | pinctrl-0 = <&keypad_row0>, <&keypad_row1>, <&keypad_row2>, | ||
67 | <&keypad_row3>, <&keypad_row4>, <&keypad_row5>, | ||
68 | <&keypad_row6>, <&keypad_row7>, | ||
69 | <&keypad_col0>, <&keypad_col1>, <&keypad_col2>, | ||
70 | <&keypad_col3>, <&keypad_col4>, <&keypad_col5>, | ||
71 | <&keypad_col6>, <&keypad_col7>; | ||
72 | status = "okay"; | ||
73 | |||
74 | key_1 { | ||
75 | keypad,row = <0>; | ||
76 | keypad,column = <3>; | ||
77 | linux,code = <KEY_1>; | ||
78 | }; | ||
79 | |||
80 | key_2 { | ||
81 | keypad,row = <0>; | ||
82 | keypad,column = <4>; | ||
83 | linux,code = <KEY_2>; | ||
84 | }; | ||
85 | |||
86 | key_3 { | ||
87 | keypad,row = <0>; | ||
88 | keypad,column = <5>; | ||
89 | linux,code = <KEY_3>; | ||
90 | }; | ||
91 | |||
92 | key_4 { | ||
93 | keypad,row = <0>; | ||
94 | keypad,column = <6>; | ||
95 | linux,code = <KEY_4>; | ||
96 | }; | ||
97 | |||
98 | key_5 { | ||
99 | keypad,row = <0 | ||
100 | >; | ||
101 | keypad,column = <7>; | ||
102 | linux,code = <KEY_5>; | ||
103 | }; | ||
104 | |||
105 | key_6 { | ||
106 | keypad,row = <1>; | ||
107 | keypad,column = <3>; | ||
108 | linux,code = <KEY_A>; | ||
109 | }; | ||
110 | key_7 { | ||
111 | keypad,row = <1>; | ||
112 | keypad,column = <4>; | ||
113 | linux,code = <KEY_B>; | ||
114 | }; | ||
115 | |||
116 | key_8 { | ||
117 | keypad,row = <1>; | ||
118 | keypad,column = <5>; | ||
119 | linux,code = <KEY_C>; | ||
120 | }; | ||
121 | |||
122 | key_9 { | ||
123 | keypad,row = <1>; | ||
124 | keypad,column = <6>; | ||
125 | linux,code = <KEY_D>; | ||
126 | }; | ||
127 | |||
128 | key_10 { | ||
129 | keypad,row = <1>; | ||
130 | keypad,column = <7>; | ||
131 | linux,code = <KEY_E>; | ||
132 | }; | ||
133 | }; | ||
134 | |||
135 | &uart0 { | ||
136 | status = "okay"; | ||
137 | }; | ||
138 | |||
139 | &uart1 { | ||
140 | status = "okay"; | ||
141 | }; | ||
142 | |||
143 | &uart2 { | ||
144 | status = "okay"; | ||
145 | }; | ||
146 | |||
147 | &uart3 { | ||
148 | status = "okay"; | ||
149 | }; | ||
150 | |||
151 | &rtc { | ||
152 | status = "okay"; | ||
153 | }; | ||
154 | |||
155 | &sdhci0 { | ||
156 | bus-width = <4>; | ||
157 | pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_cd &sd0_bus1 &sd0_bus4>; | ||
158 | pinctrl-names = "default"; | ||
159 | status = "okay"; | ||
160 | }; | ||
161 | |||
162 | &sdhci1 { | ||
163 | bus-width = <4>; | ||
164 | pinctrl-0 = <&sd1_clk &sd1_cmd &sd1_cd &sd1_bus1 &sd1_bus4>; | ||
165 | pinctrl-names = "default"; | ||
166 | status = "okay"; | ||
167 | }; | ||
168 | |||
169 | &sdhci2 { | ||
170 | bus-width = <4>; | ||
171 | pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_cd &sd2_bus1 &sd2_bus4>; | ||
172 | pinctrl-names = "default"; | ||
173 | status = "okay"; | ||
174 | }; | ||
175 | |||
176 | &sdhci3 { | ||
177 | bus-width = <4>; | ||
178 | pinctrl-0 = <&sd3_clk &sd3_cmd &sd3_cd &sd3_bus1 &sd3_bus4>; | ||
179 | pinctrl-names = "default"; | ||
180 | status = "okay"; | ||
181 | }; | ||
182 | |||
183 | &hsotg { | ||
184 | status = "okay"; | ||
185 | }; | ||
186 | |||
187 | &usbphy { | ||
188 | status = "okay"; | ||
189 | }; | ||
190 | |||
191 | &fimd { | ||
192 | pinctrl-0 = <&lcd_clk &lcd_data24>; | ||
193 | pinctrl-names = "default"; | ||
194 | status = "okay"; | ||
195 | |||
196 | display-timings { | ||
197 | native-mode = <&timing0>; | ||
198 | |||
199 | timing0: timing@0 { | ||
200 | /* 800x480@60Hz */ | ||
201 | clock-frequency = <24373920>; | ||
202 | hactive = <800>; | ||
203 | vactive = <480>; | ||
204 | hfront-porch = <8>; | ||
205 | hback-porch = <13>; | ||
206 | hsync-len = <3>; | ||
207 | vback-porch = <7>; | ||
208 | vfront-porch = <5>; | ||
209 | vsync-len = <1>; | ||
210 | hsync-active = <0>; | ||
211 | vsync-active = <0>; | ||
212 | de-active = <1>; | ||
213 | pixelclk-active = <1>; | ||
214 | }; | ||
215 | }; | ||
216 | }; | ||
217 | |||
218 | &pwm { | ||
219 | samsung,pwm-outputs = <3>; | ||
220 | }; | ||
221 | |||
222 | &i2c0 { | ||
223 | status = "okay"; | ||
224 | |||
225 | audio-codec@1b { | ||
226 | compatible = "wlf,wm8580"; | ||
227 | reg = <0x1b>; | ||
228 | }; | ||
229 | |||
230 | eeprom@50 { | ||
231 | compatible = "atmel,24c08"; | ||
232 | reg = <0x50>; | ||
233 | }; | ||
234 | }; | ||
235 | |||
236 | &i2s0 { | ||
237 | status = "okay"; | ||
238 | }; | ||
diff --git a/arch/arm/boot/dts/s5pv210-torbreck.dts b/arch/arm/boot/dts/s5pv210-torbreck.dts new file mode 100644 index 000000000000..622599fd2cfa --- /dev/null +++ b/arch/arm/boot/dts/s5pv210-torbreck.dts | |||
@@ -0,0 +1,92 @@ | |||
1 | /* | ||
2 | * Samsung's S5PV210 SoC device tree source | ||
3 | * | ||
4 | * Copyright (c) 2013-2014 Samsung Electronics, Co. Ltd. | ||
5 | * | ||
6 | * Mateusz Krawczuk <m.krawczuk@partner.samsung.com> | ||
7 | * Tomasz Figa <t.figa@samsung.com> | ||
8 | * | ||
9 | * Board device tree source for Torbreck board. | ||
10 | * | ||
11 | * NOTE: This file is completely based on original board file for mach-torbreck | ||
12 | * available in Linux 3.15 and intends to provide equivalent level of hardware | ||
13 | * support. Due to lack of hardware, _no_ testing has been performed. | ||
14 | * | ||
15 | * This program is free software; you can redistribute it and/or modify | ||
16 | * it under the terms of the GNU General Public License version 2 as | ||
17 | * published by the Free Software Foundation. | ||
18 | */ | ||
19 | |||
20 | /dts-v1/; | ||
21 | #include <dt-bindings/input/input.h> | ||
22 | #include "s5pv210.dtsi" | ||
23 | |||
24 | / { | ||
25 | model = "aESOP Torbreck based on S5PV210"; | ||
26 | compatible = "aesop,torbreck", "samsung,s5pv210"; | ||
27 | |||
28 | chosen { | ||
29 | bootargs = "console=ttySAC0,115200n8 root=/dev/mmcblk0p1 rw rootwait ignore_loglevel earlyprintk"; | ||
30 | }; | ||
31 | |||
32 | memory { | ||
33 | device_type = "memory"; | ||
34 | reg = <0x20000000 0x20000000>; | ||
35 | }; | ||
36 | }; | ||
37 | |||
38 | &xusbxti { | ||
39 | clock-frequency = <24000000>; | ||
40 | }; | ||
41 | |||
42 | &uart0 { | ||
43 | status = "okay"; | ||
44 | }; | ||
45 | |||
46 | &uart1 { | ||
47 | status = "okay"; | ||
48 | }; | ||
49 | |||
50 | &uart2 { | ||
51 | status = "okay"; | ||
52 | }; | ||
53 | |||
54 | &uart3 { | ||
55 | status = "okay"; | ||
56 | }; | ||
57 | |||
58 | &rtc { | ||
59 | status = "okay"; | ||
60 | }; | ||
61 | |||
62 | &sdhci0 { | ||
63 | bus-width = <4>; | ||
64 | pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_cd &sd0_bus1 &sd0_bus4>; | ||
65 | pinctrl-names = "default"; | ||
66 | status = "okay"; | ||
67 | }; | ||
68 | |||
69 | &sdhci1 { | ||
70 | bus-width = <4>; | ||
71 | pinctrl-0 = <&sd1_clk &sd1_cmd &sd1_cd &sd1_bus1 &sd1_bus4>; | ||
72 | pinctrl-names = "default"; | ||
73 | status = "okay"; | ||
74 | }; | ||
75 | |||
76 | &sdhci2 { | ||
77 | bus-width = <4>; | ||
78 | pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_bus1 &sd2_bus4>; | ||
79 | pinctrl-names = "default"; | ||
80 | status = "okay"; | ||
81 | }; | ||
82 | |||
83 | &sdhci3 { | ||
84 | bus-width = <4>; | ||
85 | pinctrl-0 = <&sd3_clk &sd3_cmd &sd3_cd &sd3_bus1 &sd3_bus4>; | ||
86 | pinctrl-names = "default"; | ||
87 | status = "okay"; | ||
88 | }; | ||
89 | |||
90 | &i2s0 { | ||
91 | status = "okay"; | ||
92 | }; | ||
diff --git a/arch/arm/boot/dts/s5pv210.dtsi b/arch/arm/boot/dts/s5pv210.dtsi new file mode 100644 index 000000000000..8344a0ee2b86 --- /dev/null +++ b/arch/arm/boot/dts/s5pv210.dtsi | |||
@@ -0,0 +1,633 @@ | |||
1 | /* | ||
2 | * Samsung's S5PV210 SoC device tree source | ||
3 | * | ||
4 | * Copyright (c) 2013-2014 Samsung Electronics, Co. Ltd. | ||
5 | * | ||
6 | * Mateusz Krawczuk <m.krawczuk@partner.samsung.com> | ||
7 | * Tomasz Figa <t.figa@samsung.com> | ||
8 | * | ||
9 | * Samsung's S5PV210 SoC device nodes are listed in this file. S5PV210 | ||
10 | * based board files can include this file and provide values for board specfic | ||
11 | * bindings. | ||
12 | * | ||
13 | * Note: This file does not include device nodes for all the controllers in | ||
14 | * S5PV210 SoC. As device tree coverage for S5PV210 increases, additional | ||
15 | * nodes can be added to this file. | ||
16 | * | ||
17 | * This program is free software; you can redistribute it and/or modify | ||
18 | * it under the terms of the GNU General Public License version 2 as | ||
19 | * published by the Free Software Foundation. | ||
20 | */ | ||
21 | |||
22 | #include "skeleton.dtsi" | ||
23 | #include <dt-bindings/clock/s5pv210.h> | ||
24 | #include <dt-bindings/clock/s5pv210-audss.h> | ||
25 | |||
26 | / { | ||
27 | aliases { | ||
28 | csis0 = &csis0; | ||
29 | fimc0 = &fimc0; | ||
30 | fimc1 = &fimc1; | ||
31 | fimc2 = &fimc2; | ||
32 | i2c0 = &i2c0; | ||
33 | i2c1 = &i2c1; | ||
34 | i2c2 = &i2c2; | ||
35 | i2s0 = &i2s0; | ||
36 | i2s1 = &i2s1; | ||
37 | i2s2 = &i2s2; | ||
38 | pinctrl0 = &pinctrl0; | ||
39 | spi0 = &spi0; | ||
40 | spi1 = &spi1; | ||
41 | }; | ||
42 | |||
43 | cpus { | ||
44 | #address-cells = <1>; | ||
45 | #size-cells = <0>; | ||
46 | |||
47 | cpu@0 { | ||
48 | device_type = "cpu"; | ||
49 | compatible = "arm,cortex-a8"; | ||
50 | reg = <0>; | ||
51 | }; | ||
52 | }; | ||
53 | |||
54 | soc { | ||
55 | compatible = "simple-bus"; | ||
56 | #address-cells = <1>; | ||
57 | #size-cells = <1>; | ||
58 | ranges; | ||
59 | |||
60 | external-clocks { | ||
61 | compatible = "simple-bus"; | ||
62 | #address-cells = <1>; | ||
63 | #size-cells = <0>; | ||
64 | |||
65 | xxti: oscillator@0 { | ||
66 | compatible = "fixed-clock"; | ||
67 | reg = <0>; | ||
68 | clock-frequency = <0>; | ||
69 | clock-output-names = "xxti"; | ||
70 | #clock-cells = <0>; | ||
71 | }; | ||
72 | |||
73 | xusbxti: oscillator@1 { | ||
74 | compatible = "fixed-clock"; | ||
75 | reg = <1>; | ||
76 | clock-frequency = <0>; | ||
77 | clock-output-names = "xusbxti"; | ||
78 | #clock-cells = <0>; | ||
79 | }; | ||
80 | }; | ||
81 | |||
82 | onenand: onenand@b0000000 { | ||
83 | compatible = "samsung,s5pv210-onenand"; | ||
84 | reg = <0xb0600000 0x2000>, | ||
85 | <0xb0000000 0x20000>, | ||
86 | <0xb0040000 0x20000>; | ||
87 | interrupt-parent = <&vic1>; | ||
88 | interrupts = <31>; | ||
89 | clocks = <&clocks CLK_NANDXL>, <&clocks DOUT_FLASH>; | ||
90 | clock-names = "bus", "onenand"; | ||
91 | #address-cells = <1>; | ||
92 | #size-cells = <1>; | ||
93 | status = "disabled"; | ||
94 | }; | ||
95 | |||
96 | chipid@e0000000 { | ||
97 | compatible = "samsung,s5pv210-chipid"; | ||
98 | reg = <0xe0000000 0x1000>; | ||
99 | }; | ||
100 | |||
101 | clocks: clock-controller@e0100000 { | ||
102 | compatible = "samsung,s5pv210-clock", "simple-bus"; | ||
103 | reg = <0xe0100000 0x10000>; | ||
104 | clock-names = "xxti", "xusbxti"; | ||
105 | clocks = <&xxti>, <&xusbxti>; | ||
106 | #clock-cells = <1>; | ||
107 | #address-cells = <1>; | ||
108 | #size-cells = <1>; | ||
109 | ranges; | ||
110 | |||
111 | pmu_syscon: syscon@e0108000 { | ||
112 | compatible = "samsung-s5pv210-pmu", "syscon"; | ||
113 | reg = <0xe0108000 0x8000>; | ||
114 | }; | ||
115 | }; | ||
116 | |||
117 | pinctrl0: pinctrl@e0200000 { | ||
118 | compatible = "samsung,s5pv210-pinctrl"; | ||
119 | reg = <0xe0200000 0x1000>; | ||
120 | interrupt-parent = <&vic0>; | ||
121 | interrupts = <30>; | ||
122 | |||
123 | wakeup-interrupt-controller { | ||
124 | compatible = "samsung,exynos4210-wakeup-eint"; | ||
125 | interrupts = <16>; | ||
126 | interrupt-parent = <&vic0>; | ||
127 | }; | ||
128 | }; | ||
129 | |||
130 | amba { | ||
131 | #address-cells = <1>; | ||
132 | #size-cells = <1>; | ||
133 | compatible = "arm,amba-bus"; | ||
134 | ranges; | ||
135 | |||
136 | pdma0: dma@e0900000 { | ||
137 | compatible = "arm,pl330", "arm,primecell"; | ||
138 | reg = <0xe0900000 0x1000>; | ||
139 | interrupt-parent = <&vic0>; | ||
140 | interrupts = <19>; | ||
141 | clocks = <&clocks CLK_PDMA0>; | ||
142 | clock-names = "apb_pclk"; | ||
143 | #dma-cells = <1>; | ||
144 | #dma-channels = <8>; | ||
145 | #dma-requests = <32>; | ||
146 | }; | ||
147 | |||
148 | pdma1: dma@e0a00000 { | ||
149 | compatible = "arm,pl330", "arm,primecell"; | ||
150 | reg = <0xe0a00000 0x1000>; | ||
151 | interrupt-parent = <&vic0>; | ||
152 | interrupts = <20>; | ||
153 | clocks = <&clocks CLK_PDMA1>; | ||
154 | clock-names = "apb_pclk"; | ||
155 | #dma-cells = <1>; | ||
156 | #dma-channels = <8>; | ||
157 | #dma-requests = <32>; | ||
158 | }; | ||
159 | }; | ||
160 | |||
161 | spi0: spi@e1300000 { | ||
162 | compatible = "samsung,s5pv210-spi"; | ||
163 | reg = <0xe1300000 0x1000>; | ||
164 | interrupt-parent = <&vic1>; | ||
165 | interrupts = <15>; | ||
166 | dmas = <&pdma0 7>, <&pdma0 6>; | ||
167 | dma-names = "tx", "rx"; | ||
168 | clocks = <&clocks SCLK_SPI0>, <&clocks CLK_SPI0>; | ||
169 | clock-names = "spi", "spi_busclk0"; | ||
170 | pinctrl-names = "default"; | ||
171 | pinctrl-0 = <&spi0_bus>; | ||
172 | #address-cells = <1>; | ||
173 | #size-cells = <0>; | ||
174 | status = "disabled"; | ||
175 | }; | ||
176 | |||
177 | spi1: spi@e1400000 { | ||
178 | compatible = "samsung,s5pv210-spi"; | ||
179 | reg = <0xe1400000 0x1000>; | ||
180 | interrupt-parent = <&vic1>; | ||
181 | interrupts = <16>; | ||
182 | dmas = <&pdma1 7>, <&pdma1 6>; | ||
183 | dma-names = "tx", "rx"; | ||
184 | clocks = <&clocks SCLK_SPI1>, <&clocks CLK_SPI1>; | ||
185 | clock-names = "spi", "spi_busclk0"; | ||
186 | pinctrl-names = "default"; | ||
187 | pinctrl-0 = <&spi1_bus>; | ||
188 | #address-cells = <1>; | ||
189 | #size-cells = <0>; | ||
190 | status = "disabled"; | ||
191 | }; | ||
192 | |||
193 | keypad: keypad@e1600000 { | ||
194 | compatible = "samsung,s5pv210-keypad"; | ||
195 | reg = <0xe1600000 0x1000>; | ||
196 | interrupt-parent = <&vic2>; | ||
197 | interrupts = <25>; | ||
198 | clocks = <&clocks CLK_KEYIF>; | ||
199 | clock-names = "keypad"; | ||
200 | status = "disabled"; | ||
201 | }; | ||
202 | |||
203 | i2c0: i2c@e1800000 { | ||
204 | compatible = "samsung,s3c2440-i2c"; | ||
205 | reg = <0xe1800000 0x1000>; | ||
206 | interrupt-parent = <&vic1>; | ||
207 | interrupts = <14>; | ||
208 | clocks = <&clocks CLK_I2C0>; | ||
209 | clock-names = "i2c"; | ||
210 | pinctrl-names = "default"; | ||
211 | pinctrl-0 = <&i2c0_bus>; | ||
212 | #address-cells = <1>; | ||
213 | #size-cells = <0>; | ||
214 | status = "disabled"; | ||
215 | }; | ||
216 | |||
217 | i2c2: i2c@e1a00000 { | ||
218 | compatible = "samsung,s3c2440-i2c"; | ||
219 | reg = <0xe1a00000 0x1000>; | ||
220 | interrupt-parent = <&vic1>; | ||
221 | interrupts = <19>; | ||
222 | clocks = <&clocks CLK_I2C2>; | ||
223 | clock-names = "i2c"; | ||
224 | pinctrl-0 = <&i2c2_bus>; | ||
225 | pinctrl-names = "default"; | ||
226 | #address-cells = <1>; | ||
227 | #size-cells = <0>; | ||
228 | status = "disabled"; | ||
229 | }; | ||
230 | |||
231 | audio-subsystem { | ||
232 | compatible = "samsung,s5pv210-audss", "simple-bus"; | ||
233 | #address-cells = <1>; | ||
234 | #size-cells = <1>; | ||
235 | ranges; | ||
236 | |||
237 | clk_audss: clock-controller@eee10000 { | ||
238 | compatible = "samsung,s5pv210-audss-clock"; | ||
239 | reg = <0xeee10000 0x1000>; | ||
240 | clock-names = "hclk", "xxti", | ||
241 | "fout_epll", | ||
242 | "sclk_audio0"; | ||
243 | clocks = <&clocks DOUT_HCLKP>, <&xxti>, | ||
244 | <&clocks FOUT_EPLL>, | ||
245 | <&clocks SCLK_AUDIO0>; | ||
246 | #clock-cells = <1>; | ||
247 | }; | ||
248 | |||
249 | i2s0: i2s@eee30000 { | ||
250 | compatible = "samsung,s5pv210-i2s"; | ||
251 | reg = <0xeee30000 0x1000>; | ||
252 | interrupt-parent = <&vic2>; | ||
253 | interrupts = <16>; | ||
254 | dma-names = "rx", "tx", "tx-sec"; | ||
255 | dmas = <&pdma1 9>, <&pdma1 10>, <&pdma1 11>; | ||
256 | clock-names = "iis", | ||
257 | "i2s_opclk0", | ||
258 | "i2s_opclk1"; | ||
259 | clocks = <&clk_audss CLK_I2S>, | ||
260 | <&clk_audss CLK_I2S>, | ||
261 | <&clk_audss CLK_DOUT_AUD_BUS>; | ||
262 | samsung,idma-addr = <0xc0010000>; | ||
263 | pinctrl-names = "default"; | ||
264 | pinctrl-0 = <&i2s0_bus>; | ||
265 | #sound-dai-cells = <0>; | ||
266 | status = "disabled"; | ||
267 | }; | ||
268 | }; | ||
269 | |||
270 | i2s1: i2s@e2100000 { | ||
271 | compatible = "samsung,s3c6410-i2s"; | ||
272 | reg = <0xe2100000 0x1000>; | ||
273 | interrupt-parent = <&vic2>; | ||
274 | interrupts = <17>; | ||
275 | dma-names = "rx", "tx"; | ||
276 | dmas = <&pdma1 12>, <&pdma1 13>; | ||
277 | clock-names = "iis", "i2s_opclk0"; | ||
278 | clocks = <&clocks CLK_I2S1>, <&clocks SCLK_AUDIO1>; | ||
279 | pinctrl-names = "default"; | ||
280 | pinctrl-0 = <&i2s1_bus>; | ||
281 | #sound-dai-cells = <0>; | ||
282 | status = "disabled"; | ||
283 | }; | ||
284 | |||
285 | i2s2: i2s@e2a00000 { | ||
286 | compatible = "samsung,s3c6410-i2s"; | ||
287 | reg = <0xe2a00000 0x1000>; | ||
288 | interrupt-parent = <&vic2>; | ||
289 | interrupts = <18>; | ||
290 | dma-names = "rx", "tx"; | ||
291 | dmas = <&pdma1 14>, <&pdma1 15>; | ||
292 | clock-names = "iis", "i2s_opclk0"; | ||
293 | clocks = <&clocks CLK_I2S2>, <&clocks SCLK_AUDIO2>; | ||
294 | pinctrl-names = "default"; | ||
295 | pinctrl-0 = <&i2s2_bus>; | ||
296 | #sound-dai-cells = <0>; | ||
297 | status = "disabled"; | ||
298 | }; | ||
299 | |||
300 | pwm: pwm@e2500000 { | ||
301 | compatible = "samsung,s5pc100-pwm"; | ||
302 | reg = <0xe2500000 0x1000>; | ||
303 | interrupt-parent = <&vic0>; | ||
304 | interrupts = <21>, <22>, <23>, <24>, <25>; | ||
305 | clock-names = "timers"; | ||
306 | clocks = <&clocks CLK_PWM>; | ||
307 | #pwm-cells = <3>; | ||
308 | }; | ||
309 | |||
310 | watchdog: watchdog@e2700000 { | ||
311 | compatible = "samsung,s3c2410-wdt"; | ||
312 | reg = <0xe2700000 0x1000>; | ||
313 | interrupt-parent = <&vic0>; | ||
314 | interrupts = <26>; | ||
315 | clock-names = "watchdog"; | ||
316 | clocks = <&clocks CLK_WDT>; | ||
317 | }; | ||
318 | |||
319 | rtc: rtc@e2800000 { | ||
320 | compatible = "samsung,s3c6410-rtc"; | ||
321 | reg = <0xe2800000 0x100>; | ||
322 | interrupt-parent = <&vic0>; | ||
323 | interrupts = <28>, <29>; | ||
324 | clocks = <&clocks CLK_RTC>; | ||
325 | clock-names = "rtc"; | ||
326 | status = "disabled"; | ||
327 | }; | ||
328 | |||
329 | uart0: serial@e2900000 { | ||
330 | compatible = "samsung,s5pv210-uart"; | ||
331 | reg = <0xe2900000 0x400>; | ||
332 | interrupt-parent = <&vic1>; | ||
333 | interrupts = <10>; | ||
334 | clock-names = "uart", "clk_uart_baud0", | ||
335 | "clk_uart_baud1"; | ||
336 | clocks = <&clocks CLK_UART0>, <&clocks CLK_UART0>, | ||
337 | <&clocks SCLK_UART0>; | ||
338 | status = "disabled"; | ||
339 | }; | ||
340 | |||
341 | uart1: serial@e2900400 { | ||
342 | compatible = "samsung,s5pv210-uart"; | ||
343 | reg = <0xe2900400 0x400>; | ||
344 | interrupt-parent = <&vic1>; | ||
345 | interrupts = <11>; | ||
346 | clock-names = "uart", "clk_uart_baud0", | ||
347 | "clk_uart_baud1"; | ||
348 | clocks = <&clocks CLK_UART1>, <&clocks CLK_UART1>, | ||
349 | <&clocks SCLK_UART1>; | ||
350 | status = "disabled"; | ||
351 | }; | ||
352 | |||
353 | uart2: serial@e2900800 { | ||
354 | compatible = "samsung,s5pv210-uart"; | ||
355 | reg = <0xe2900800 0x400>; | ||
356 | interrupt-parent = <&vic1>; | ||
357 | interrupts = <12>; | ||
358 | clock-names = "uart", "clk_uart_baud0", | ||
359 | "clk_uart_baud1"; | ||
360 | clocks = <&clocks CLK_UART2>, <&clocks CLK_UART2>, | ||
361 | <&clocks SCLK_UART2>; | ||
362 | status = "disabled"; | ||
363 | }; | ||
364 | |||
365 | uart3: serial@e2900c00 { | ||
366 | compatible = "samsung,s5pv210-uart"; | ||
367 | reg = <0xe2900c00 0x400>; | ||
368 | interrupt-parent = <&vic1>; | ||
369 | interrupts = <13>; | ||
370 | clock-names = "uart", "clk_uart_baud0", | ||
371 | "clk_uart_baud1"; | ||
372 | clocks = <&clocks CLK_UART3>, <&clocks CLK_UART3>, | ||
373 | <&clocks SCLK_UART3>; | ||
374 | status = "disabled"; | ||
375 | }; | ||
376 | |||
377 | sdhci0: sdhci@eb000000 { | ||
378 | compatible = "samsung,s3c6410-sdhci"; | ||
379 | reg = <0xeb000000 0x100000>; | ||
380 | interrupt-parent = <&vic1>; | ||
381 | interrupts = <26>; | ||
382 | clock-names = "hsmmc", "mmc_busclk.0", "mmc_busclk.2"; | ||
383 | clocks = <&clocks CLK_HSMMC0>, <&clocks CLK_HSMMC0>, | ||
384 | <&clocks SCLK_MMC0>; | ||
385 | status = "disabled"; | ||
386 | }; | ||
387 | |||
388 | sdhci1: sdhci@eb100000 { | ||
389 | compatible = "samsung,s3c6410-sdhci"; | ||
390 | reg = <0xeb100000 0x100000>; | ||
391 | interrupt-parent = <&vic1>; | ||
392 | interrupts = <27>; | ||
393 | clock-names = "hsmmc", "mmc_busclk.0", "mmc_busclk.2"; | ||
394 | clocks = <&clocks CLK_HSMMC1>, <&clocks CLK_HSMMC1>, | ||
395 | <&clocks SCLK_MMC1>; | ||
396 | status = "disabled"; | ||
397 | }; | ||
398 | |||
399 | sdhci2: sdhci@eb200000 { | ||
400 | compatible = "samsung,s3c6410-sdhci"; | ||
401 | reg = <0xeb200000 0x100000>; | ||
402 | interrupt-parent = <&vic1>; | ||
403 | interrupts = <28>; | ||
404 | clock-names = "hsmmc", "mmc_busclk.0", "mmc_busclk.2"; | ||
405 | clocks = <&clocks CLK_HSMMC2>, <&clocks CLK_HSMMC2>, | ||
406 | <&clocks SCLK_MMC2>; | ||
407 | status = "disabled"; | ||
408 | }; | ||
409 | |||
410 | sdhci3: sdhci@eb300000 { | ||
411 | compatible = "samsung,s3c6410-sdhci"; | ||
412 | reg = <0xeb300000 0x100000>; | ||
413 | interrupt-parent = <&vic3>; | ||
414 | interrupts = <2>; | ||
415 | clock-names = "hsmmc", "mmc_busclk.0", "mmc_busclk.3"; | ||
416 | clocks = <&clocks CLK_HSMMC3>, <&clocks CLK_HSMMC3>, | ||
417 | <&clocks SCLK_MMC3>; | ||
418 | status = "disabled"; | ||
419 | }; | ||
420 | |||
421 | hsotg: hsotg@ec000000 { | ||
422 | compatible = "samsung,s3c6400-hsotg"; | ||
423 | reg = <0xec000000 0x20000>; | ||
424 | interrupt-parent = <&vic1>; | ||
425 | interrupts = <24>; | ||
426 | clocks = <&clocks CLK_USB_OTG>; | ||
427 | clock-names = "otg"; | ||
428 | phy-names = "usb2-phy"; | ||
429 | phys = <&usbphy 0>; | ||
430 | status = "disabled"; | ||
431 | }; | ||
432 | |||
433 | usbphy: usbphy@ec100000 { | ||
434 | compatible = "samsung,s5pv210-usb2-phy"; | ||
435 | reg = <0xec100000 0x100>; | ||
436 | samsung,pmureg-phandle = <&pmu_syscon>; | ||
437 | clocks = <&clocks CLK_USB_OTG>, <&xusbxti>; | ||
438 | clock-names = "phy", "ref"; | ||
439 | #phy-cells = <1>; | ||
440 | status = "disabled"; | ||
441 | }; | ||
442 | |||
443 | ehci: ehci@ec200000 { | ||
444 | compatible = "samsung,exynos4210-ehci"; | ||
445 | reg = <0xec200000 0x100>; | ||
446 | interrupts = <23>; | ||
447 | interrupt-parent = <&vic1>; | ||
448 | clocks = <&clocks CLK_USB_HOST>; | ||
449 | clock-names = "usbhost"; | ||
450 | #address-cells = <1>; | ||
451 | #size-cells = <0>; | ||
452 | status = "disabled"; | ||
453 | |||
454 | port@0 { | ||
455 | reg = <0>; | ||
456 | phys = <&usbphy 1>; | ||
457 | }; | ||
458 | }; | ||
459 | |||
460 | ohci: ohci@ec300000 { | ||
461 | compatible = "samsung,exynos4210-ohci"; | ||
462 | reg = <0xec300000 0x100>; | ||
463 | interrupts = <23>; | ||
464 | clocks = <&clocks CLK_USB_HOST>; | ||
465 | clock-names = "usbhost"; | ||
466 | #address-cells = <1>; | ||
467 | #size-cells = <0>; | ||
468 | status = "disabled"; | ||
469 | |||
470 | port@0 { | ||
471 | reg = <0>; | ||
472 | phys = <&usbphy 1>; | ||
473 | }; | ||
474 | }; | ||
475 | |||
476 | mfc: codec@f1700000 { | ||
477 | compatible = "samsung,mfc-v5"; | ||
478 | reg = <0xf1700000 0x10000>; | ||
479 | interrupt-parent = <&vic2>; | ||
480 | interrupts = <14>; | ||
481 | clocks = <&clocks DOUT_MFC>, <&clocks CLK_MFC>; | ||
482 | clock-names = "sclk_mfc", "mfc"; | ||
483 | }; | ||
484 | |||
485 | vic0: interrupt-controller@f2000000 { | ||
486 | compatible = "arm,pl192-vic"; | ||
487 | interrupt-controller; | ||
488 | reg = <0xf2000000 0x1000>; | ||
489 | #interrupt-cells = <1>; | ||
490 | }; | ||
491 | |||
492 | vic1: interrupt-controller@f2100000 { | ||
493 | compatible = "arm,pl192-vic"; | ||
494 | interrupt-controller; | ||
495 | reg = <0xf2100000 0x1000>; | ||
496 | #interrupt-cells = <1>; | ||
497 | }; | ||
498 | |||
499 | vic2: interrupt-controller@f2200000 { | ||
500 | compatible = "arm,pl192-vic"; | ||
501 | interrupt-controller; | ||
502 | reg = <0xf2200000 0x1000>; | ||
503 | #interrupt-cells = <1>; | ||
504 | }; | ||
505 | |||
506 | vic3: interrupt-controller@f2300000 { | ||
507 | compatible = "arm,pl192-vic"; | ||
508 | interrupt-controller; | ||
509 | reg = <0xf2300000 0x1000>; | ||
510 | #interrupt-cells = <1>; | ||
511 | }; | ||
512 | |||
513 | fimd: fimd@f8000000 { | ||
514 | compatible = "samsung,exynos4210-fimd"; | ||
515 | interrupt-parent = <&vic2>; | ||
516 | reg = <0xf8000000 0x20000>; | ||
517 | interrupt-names = "fifo", "vsync", "lcd_sys"; | ||
518 | interrupts = <0>, <1>, <2>; | ||
519 | clocks = <&clocks SCLK_FIMD>, <&clocks CLK_FIMD>; | ||
520 | clock-names = "sclk_fimd", "fimd"; | ||
521 | status = "disabled"; | ||
522 | }; | ||
523 | |||
524 | g2d: g2d@fa000000 { | ||
525 | compatible = "samsung,s5pv210-g2d"; | ||
526 | reg = <0xfa000000 0x1000>; | ||
527 | interrupt-parent = <&vic2>; | ||
528 | interrupts = <9>; | ||
529 | clocks = <&clocks DOUT_G2D>, <&clocks CLK_G2D>; | ||
530 | clock-names = "sclk_fimg2d", "fimg2d"; | ||
531 | }; | ||
532 | |||
533 | mdma1: mdma@fa200000 { | ||
534 | compatible = "arm,pl330", "arm,primecell"; | ||
535 | reg = <0xfa200000 0x1000>; | ||
536 | interrupt-parent = <&vic0>; | ||
537 | interrupts = <18>; | ||
538 | clocks = <&clocks CLK_MDMA>; | ||
539 | clock-names = "apb_pclk"; | ||
540 | #dma-cells = <1>; | ||
541 | #dma-channels = <8>; | ||
542 | #dma-requests = <1>; | ||
543 | }; | ||
544 | |||
545 | i2c1: i2c@fab00000 { | ||
546 | compatible = "samsung,s3c2440-i2c"; | ||
547 | reg = <0xfab00000 0x1000>; | ||
548 | interrupt-parent = <&vic2>; | ||
549 | interrupts = <13>; | ||
550 | clocks = <&clocks CLK_I2C1>; | ||
551 | clock-names = "i2c"; | ||
552 | pinctrl-names = "default"; | ||
553 | pinctrl-0 = <&i2c1_bus>; | ||
554 | #address-cells = <1>; | ||
555 | #size-cells = <0>; | ||
556 | status = "disabled"; | ||
557 | }; | ||
558 | |||
559 | camera: camera { | ||
560 | compatible = "samsung,fimc", "simple-bus"; | ||
561 | pinctrl-names = "default"; | ||
562 | pinctrl-0 = <>; | ||
563 | clocks = <&clocks SCLK_CAM0>, <&clocks SCLK_CAM1>; | ||
564 | clock-names = "sclk_cam0", "sclk_cam1"; | ||
565 | #address-cells = <1>; | ||
566 | #size-cells = <1>; | ||
567 | ranges; | ||
568 | |||
569 | clock_cam: clock-controller { | ||
570 | #clock-cells = <1>; | ||
571 | }; | ||
572 | |||
573 | csis0: csis@fa600000 { | ||
574 | compatible = "samsung,s5pv210-csis"; | ||
575 | reg = <0xfa600000 0x4000>; | ||
576 | interrupt-parent = <&vic2>; | ||
577 | interrupts = <29>; | ||
578 | clocks = <&clocks CLK_CSIS>, | ||
579 | <&clocks SCLK_CSIS>; | ||
580 | clock-names = "clk_csis", | ||
581 | "sclk_csis"; | ||
582 | bus-width = <4>; | ||
583 | status = "disabled"; | ||
584 | #address-cells = <1>; | ||
585 | #size-cells = <0>; | ||
586 | }; | ||
587 | |||
588 | fimc0: fimc@fb200000 { | ||
589 | compatible = "samsung,s5pv210-fimc"; | ||
590 | reg = <0xfb200000 0x1000>; | ||
591 | interrupts = <5>; | ||
592 | interrupt-parent = <&vic2>; | ||
593 | clocks = <&clocks CLK_FIMC0>, | ||
594 | <&clocks SCLK_FIMC0>; | ||
595 | clock-names = "fimc", | ||
596 | "sclk_fimc"; | ||
597 | samsung,pix-limits = <4224 8192 1920 4224>; | ||
598 | samsung,mainscaler-ext; | ||
599 | samsung,cam-if; | ||
600 | }; | ||
601 | |||
602 | fimc1: fimc@fb300000 { | ||
603 | compatible = "samsung,s5pv210-fimc"; | ||
604 | reg = <0xfb300000 0x1000>; | ||
605 | interrupt-parent = <&vic2>; | ||
606 | interrupts = <6>; | ||
607 | clocks = <&clocks CLK_FIMC1>, | ||
608 | <&clocks SCLK_FIMC1>; | ||
609 | clock-names = "fimc", | ||
610 | "sclk_fimc"; | ||
611 | samsung,pix-limits = <4224 8192 1920 4224>; | ||
612 | samsung,mainscaler-ext; | ||
613 | samsung,cam-if; | ||
614 | }; | ||
615 | |||
616 | fimc2: fimc@fb400000 { | ||
617 | compatible = "samsung,s5pv210-fimc"; | ||
618 | reg = <0xfb400000 0x1000>; | ||
619 | interrupt-parent = <&vic2>; | ||
620 | interrupts = <7>; | ||
621 | clocks = <&clocks CLK_FIMC2>, | ||
622 | <&clocks SCLK_FIMC2>; | ||
623 | clock-names = "fimc", | ||
624 | "sclk_fimc"; | ||
625 | samsung,pix-limits = <4224 8192 1920 4224>; | ||
626 | samsung,mainscaler-ext; | ||
627 | samsung,lcd-wb; | ||
628 | }; | ||
629 | }; | ||
630 | }; | ||
631 | }; | ||
632 | |||
633 | #include "s5pv210-pinctrl.dtsi" | ||
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/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/bcm_defconfig b/arch/arm/configs/bcm_defconfig index 4bf72264b175..fbebcbce1e8c 100644 --- a/arch/arm/configs/bcm_defconfig +++ b/arch/arm/configs/bcm_defconfig | |||
@@ -27,6 +27,7 @@ CONFIG_PARTITION_ADVANCED=y | |||
27 | CONFIG_ARCH_BCM=y | 27 | CONFIG_ARCH_BCM=y |
28 | CONFIG_ARCH_BCM_MOBILE=y | 28 | CONFIG_ARCH_BCM_MOBILE=y |
29 | CONFIG_ARM_THUMBEE=y | 29 | CONFIG_ARM_THUMBEE=y |
30 | CONFIG_SMP=y | ||
30 | CONFIG_PREEMPT=y | 31 | CONFIG_PREEMPT=y |
31 | CONFIG_AEABI=y | 32 | CONFIG_AEABI=y |
32 | # CONFIG_COMPACTION is not set | 33 | # CONFIG_COMPACTION is not set |
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 59b7e45142d8..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 |
@@ -242,6 +247,7 @@ CONFIG_RTC_DRV_SNVS=y | |||
242 | CONFIG_DMADEVICES=y | 247 | CONFIG_DMADEVICES=y |
243 | CONFIG_IMX_SDMA=y | 248 | CONFIG_IMX_SDMA=y |
244 | CONFIG_MXS_DMA=y | 249 | CONFIG_MXS_DMA=y |
250 | CONFIG_FSL_EDMA=y | ||
245 | CONFIG_STAGING=y | 251 | CONFIG_STAGING=y |
246 | CONFIG_DRM_IMX=y | 252 | CONFIG_DRM_IMX=y |
247 | CONFIG_DRM_IMX_FB_HELPER=y | 253 | CONFIG_DRM_IMX_FB_HELPER=y |
@@ -288,6 +294,7 @@ CONFIG_NLS_ASCII=y | |||
288 | CONFIG_NLS_ISO8859_1=y | 294 | CONFIG_NLS_ISO8859_1=y |
289 | CONFIG_NLS_ISO8859_15=m | 295 | CONFIG_NLS_ISO8859_15=m |
290 | CONFIG_NLS_UTF8=y | 296 | CONFIG_NLS_UTF8=y |
297 | CONFIG_PRINTK_TIME=y | ||
291 | CONFIG_DEBUG_FS=y | 298 | CONFIG_DEBUG_FS=y |
292 | CONFIG_MAGIC_SYSRQ=y | 299 | CONFIG_MAGIC_SYSRQ=y |
293 | # 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 534836497998..3332a4231684 100644 --- a/arch/arm/configs/multi_v7_defconfig +++ b/arch/arm/configs/multi_v7_defconfig | |||
@@ -19,6 +19,7 @@ CONFIG_MACH_DOVE=y | |||
19 | CONFIG_ARCH_BCM=y | 19 | CONFIG_ARCH_BCM=y |
20 | CONFIG_ARCH_BCM_MOBILE=y | 20 | CONFIG_ARCH_BCM_MOBILE=y |
21 | CONFIG_ARCH_BCM_5301X=y | 21 | CONFIG_ARCH_BCM_5301X=y |
22 | CONFIG_ARCH_BRCMSTB=y | ||
22 | CONFIG_ARCH_BERLIN=y | 23 | CONFIG_ARCH_BERLIN=y |
23 | CONFIG_MACH_BERLIN_BG2=y | 24 | CONFIG_MACH_BERLIN_BG2=y |
24 | CONFIG_MACH_BERLIN_BG2CD=y | 25 | CONFIG_MACH_BERLIN_BG2CD=y |
@@ -27,7 +28,7 @@ CONFIG_ARCH_HIGHBANK=y | |||
27 | CONFIG_ARCH_HI3xxx=y | 28 | CONFIG_ARCH_HI3xxx=y |
28 | CONFIG_ARCH_KEYSTONE=y | 29 | CONFIG_ARCH_KEYSTONE=y |
29 | CONFIG_ARCH_MXC=y | 30 | CONFIG_ARCH_MXC=y |
30 | CONFIG_MACH_IMX51_DT=y | 31 | CONFIG_SOC_IMX51=y |
31 | CONFIG_SOC_IMX53=y | 32 | CONFIG_SOC_IMX53=y |
32 | CONFIG_SOC_IMX6Q=y | 33 | CONFIG_SOC_IMX6Q=y |
33 | CONFIG_SOC_IMX6SL=y | 34 | CONFIG_SOC_IMX6SL=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/mach-s5pv210/include/mach/debug-macro.S b/arch/arm/include/debug/s5pv210.S index 30b511a580aa..4f1a73e2c1a1 100644 --- a/arch/arm/mach-s5pv210/include/mach/debug-macro.S +++ b/arch/arm/include/debug/s5pv210.S | |||
@@ -1,9 +1,6 @@ | |||
1 | /* linux/arch/arm/mach-s5pv210/include/mach/debug-macro.S | 1 | /* |
2 | * | 2 | * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd. |
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | 3 | * http://www.samsung.com |
4 | * http://www.samsung.com/ | ||
5 | * | ||
6 | * Based on arch/arm/mach-s3c6400/include/mach/debug-macro.S | ||
7 | * | 4 | * |
8 | * This program is free software; you can redistribute it and/or modify | 5 | * This program is free software; you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License version 2 as | 6 | * it under the terms of the GNU General Public License version 2 as |
@@ -12,8 +9,9 @@ | |||
12 | 9 | ||
13 | /* pull in the relevant register and map files. */ | 10 | /* pull in the relevant register and map files. */ |
14 | 11 | ||
15 | #include <linux/serial_s3c.h> | 12 | #define S3C_ADDR_BASE 0xF6000000 |
16 | #include <mach/map.h> | 13 | #define S3C_VA_UART S3C_ADDR_BASE + 0x01000000 |
14 | #define S5PV210_PA_UART 0xe2900000 | ||
17 | 15 | ||
18 | /* note, for the boot process to work we have to keep the UART | 16 | /* note, for the boot process to work we have to keep the UART |
19 | * virtual address aligned to an 1MiB boundary for the L1 | 17 | * virtual address aligned to an 1MiB boundary for the L1 |
@@ -22,8 +20,8 @@ | |||
22 | */ | 20 | */ |
23 | 21 | ||
24 | .macro addruart, rp, rv, tmp | 22 | .macro addruart, rp, rv, tmp |
25 | ldr \rp, = S3C_PA_UART | 23 | ldr \rp, =S5PV210_PA_UART |
26 | ldr \rv, = S3C_VA_UART | 24 | ldr \rv, =S3C_VA_UART |
27 | #if CONFIG_DEBUG_S3C_UART != 0 | 25 | #if CONFIG_DEBUG_S3C_UART != 0 |
28 | add \rp, \rp, #(0x400 * CONFIG_DEBUG_S3C_UART) | 26 | add \rp, \rp, #(0x400 * CONFIG_DEBUG_S3C_UART) |
29 | add \rv, \rv, #(0x400 * CONFIG_DEBUG_S3C_UART) | 27 | add \rv, \rv, #(0x400 * CONFIG_DEBUG_S3C_UART) |
@@ -33,9 +31,4 @@ | |||
33 | #define fifo_full fifo_full_s5pv210 | 31 | #define fifo_full fifo_full_s5pv210 |
34 | #define fifo_level fifo_level_s5pv210 | 32 | #define fifo_level fifo_level_s5pv210 |
35 | 33 | ||
36 | /* include the reset of the code which will do the work, we're only | ||
37 | * compiling for a single cpu processor type so the default of s3c2440 | ||
38 | * will be fine with us. | ||
39 | */ | ||
40 | |||
41 | #include <debug/samsung.S> | 34 | #include <debug/samsung.S> |
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 41c839167e87..fc938005ad39 100644 --- a/arch/arm/mach-bcm/Kconfig +++ b/arch/arm/mach-bcm/Kconfig | |||
@@ -9,7 +9,6 @@ config ARCH_BCM_MOBILE | |||
9 | bool "Broadcom Mobile SoC Support" if ARCH_MULTI_V7 | 9 | bool "Broadcom Mobile SoC Support" if ARCH_MULTI_V7 |
10 | select ARCH_REQUIRE_GPIOLIB | 10 | select ARCH_REQUIRE_GPIOLIB |
11 | select ARM_ERRATA_754322 | 11 | select ARM_ERRATA_754322 |
12 | select ARM_ERRATA_764369 if SMP | ||
13 | select ARM_ERRATA_775420 | 12 | select ARM_ERRATA_775420 |
14 | select ARM_GIC | 13 | select ARM_GIC |
15 | select GPIO_BCM_KONA | 14 | select GPIO_BCM_KONA |
@@ -26,16 +25,18 @@ menu "Broadcom Mobile SoC Selection" | |||
26 | config ARCH_BCM_281XX | 25 | config ARCH_BCM_281XX |
27 | bool "Broadcom BCM281XX SoC family" | 26 | bool "Broadcom BCM281XX SoC family" |
28 | default y | 27 | default y |
28 | select HAVE_SMP | ||
29 | help | 29 | help |
30 | Enable support for the the BCM281XX family, which includes | 30 | Enable support for the BCM281XX family, which includes |
31 | BCM11130, BCM11140, BCM11351, BCM28145 and BCM28155 | 31 | BCM11130, BCM11140, BCM11351, BCM28145 and BCM28155 |
32 | variants. | 32 | variants. |
33 | 33 | ||
34 | config ARCH_BCM_21664 | 34 | config ARCH_BCM_21664 |
35 | bool "Broadcom BCM21664 SoC family" | 35 | bool "Broadcom BCM21664 SoC family" |
36 | default y | 36 | default y |
37 | select HAVE_SMP | ||
37 | help | 38 | help |
38 | Enable support for the the BCM21664 family, which includes | 39 | Enable support for the BCM21664 family, which includes |
39 | BCM21663 and BCM21664 variants. | 40 | BCM21663 and BCM21664 variants. |
40 | 41 | ||
41 | config ARCH_BCM_MOBILE_L2_CACHE | 42 | config ARCH_BCM_MOBILE_L2_CACHE |
@@ -49,6 +50,17 @@ config ARCH_BCM_MOBILE_SMC | |||
49 | bool | 50 | bool |
50 | depends on ARCH_BCM_281XX || ARCH_BCM_21664 | 51 | depends on ARCH_BCM_281XX || ARCH_BCM_21664 |
51 | 52 | ||
53 | config ARCH_BCM_MOBILE_SMP | ||
54 | bool "Broadcom mobile SoC SMP support" | ||
55 | depends on (ARCH_BCM_281XX || ARCH_BCM_21664) && SMP | ||
56 | default y | ||
57 | select HAVE_ARM_SCU | ||
58 | select ARM_ERRATA_764369 | ||
59 | help | ||
60 | SMP support for the BCM281XX and BCM21664 SoC families. | ||
61 | Provided as an option so SMP support for SoCs of this type | ||
62 | can be disabled for an SMP-enabled kernel. | ||
63 | |||
52 | endmenu | 64 | endmenu |
53 | 65 | ||
54 | endif | 66 | endif |
@@ -87,4 +99,20 @@ config ARCH_BCM_5301X | |||
87 | different SoC or with the older BCM47XX and BCM53XX based | 99 | different SoC or with the older BCM47XX and BCM53XX based |
88 | network SoC using a MIPS CPU, they are supported by arch/mips/bcm47xx | 100 | network SoC using a MIPS CPU, they are supported by arch/mips/bcm47xx |
89 | 101 | ||
102 | config ARCH_BRCMSTB | ||
103 | bool "Broadcom BCM7XXX based boards" if ARCH_MULTI_V7 | ||
104 | depends on MMU | ||
105 | select ARM_GIC | ||
106 | select MIGHT_HAVE_PCI | ||
107 | select HAVE_SMP | ||
108 | select HAVE_ARM_ARCH_TIMER | ||
109 | select BRCMSTB_GISB_ARB | ||
110 | select BRCMSTB_L2_IRQ | ||
111 | help | ||
112 | Say Y if you intend to run the kernel on a Broadcom ARM-based STB | ||
113 | chipset. | ||
114 | |||
115 | This enables support for Broadcom ARM-based set-top box chipsets, | ||
116 | including the 7445 family of chips. | ||
117 | |||
90 | endif | 118 | endif |
diff --git a/arch/arm/mach-bcm/Makefile b/arch/arm/mach-bcm/Makefile index 731292114975..67c492aabf4d 100644 --- a/arch/arm/mach-bcm/Makefile +++ b/arch/arm/mach-bcm/Makefile | |||
@@ -16,6 +16,9 @@ obj-$(CONFIG_ARCH_BCM_281XX) += board_bcm281xx.o | |||
16 | # BCM21664 | 16 | # BCM21664 |
17 | obj-$(CONFIG_ARCH_BCM_21664) += board_bcm21664.o | 17 | obj-$(CONFIG_ARCH_BCM_21664) += board_bcm21664.o |
18 | 18 | ||
19 | # BCM281XX and BCM21664 SMP support | ||
20 | obj-$(CONFIG_ARCH_BCM_MOBILE_SMP) += kona_smp.o | ||
21 | |||
19 | # BCM281XX and BCM21664 L2 cache control | 22 | # BCM281XX and BCM21664 L2 cache control |
20 | obj-$(CONFIG_ARCH_BCM_MOBILE_L2_CACHE) += kona_l2_cache.o | 23 | obj-$(CONFIG_ARCH_BCM_MOBILE_L2_CACHE) += kona_l2_cache.o |
21 | 24 | ||
@@ -30,3 +33,8 @@ obj-$(CONFIG_ARCH_BCM2835) += board_bcm2835.o | |||
30 | 33 | ||
31 | # BCM5301X | 34 | # BCM5301X |
32 | obj-$(CONFIG_ARCH_BCM_5301X) += bcm_5301x.o | 35 | obj-$(CONFIG_ARCH_BCM_5301X) += bcm_5301x.o |
36 | |||
37 | ifeq ($(CONFIG_ARCH_BRCMSTB),y) | ||
38 | obj-y += brcmstb.o | ||
39 | obj-$(CONFIG_SMP) += headsmp-brcmstb.o platsmp-brcmstb.o | ||
40 | endif | ||
diff --git a/arch/arm/mach-bcm/brcmstb.c b/arch/arm/mach-bcm/brcmstb.c new file mode 100644 index 000000000000..60a5afa06ed7 --- /dev/null +++ b/arch/arm/mach-bcm/brcmstb.c | |||
@@ -0,0 +1,28 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2013-2014 Broadcom Corporation | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License as | ||
6 | * published by the Free Software Foundation version 2. | ||
7 | * | ||
8 | * This program is distributed "as is" WITHOUT ANY WARRANTY of any | ||
9 | * kind, whether express or implied; without even the implied warranty | ||
10 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | */ | ||
13 | |||
14 | #include <linux/init.h> | ||
15 | #include <linux/of_platform.h> | ||
16 | |||
17 | #include <asm/mach-types.h> | ||
18 | #include <asm/mach/arch.h> | ||
19 | |||
20 | static const char *brcmstb_match[] __initconst = { | ||
21 | "brcm,bcm7445", | ||
22 | "brcm,brcmstb", | ||
23 | NULL | ||
24 | }; | ||
25 | |||
26 | DT_MACHINE_START(BRCMSTB, "Broadcom STB (Flattened Device Tree)") | ||
27 | .dt_compat = brcmstb_match, | ||
28 | MACHINE_END | ||
diff --git a/arch/arm/mach-bcm/brcmstb.h b/arch/arm/mach-bcm/brcmstb.h new file mode 100644 index 000000000000..ec0c3d112b36 --- /dev/null +++ b/arch/arm/mach-bcm/brcmstb.h | |||
@@ -0,0 +1,19 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2013-2014 Broadcom Corporation | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License as | ||
6 | * published by the Free Software Foundation version 2. | ||
7 | * | ||
8 | * This program is distributed "as is" WITHOUT ANY WARRANTY of any | ||
9 | * kind, whether express or implied; without even the implied warranty | ||
10 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | */ | ||
13 | |||
14 | #ifndef __BRCMSTB_H__ | ||
15 | #define __BRCMSTB_H__ | ||
16 | |||
17 | void brcmstb_secondary_startup(void); | ||
18 | |||
19 | #endif /* __BRCMSTB_H__ */ | ||
diff --git a/arch/arm/mach-bcm/headsmp-brcmstb.S b/arch/arm/mach-bcm/headsmp-brcmstb.S new file mode 100644 index 000000000000..199c1ea58248 --- /dev/null +++ b/arch/arm/mach-bcm/headsmp-brcmstb.S | |||
@@ -0,0 +1,33 @@ | |||
1 | /* | ||
2 | * SMP boot code for secondary CPUs | ||
3 | * Based on arch/arm/mach-tegra/headsmp.S | ||
4 | * | ||
5 | * Copyright (C) 2010 NVIDIA, Inc. | ||
6 | * Copyright (C) 2013-2014 Broadcom Corporation | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or | ||
9 | * modify it under the terms of the GNU General Public License as | ||
10 | * published by the Free Software Foundation version 2. | ||
11 | * | ||
12 | * This program is distributed "as is" WITHOUT ANY WARRANTY of any | ||
13 | * kind, whether express or implied; without even the implied warranty | ||
14 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | #include <asm/assembler.h> | ||
19 | #include <linux/linkage.h> | ||
20 | #include <linux/init.h> | ||
21 | |||
22 | .section ".text.head", "ax" | ||
23 | |||
24 | ENTRY(brcmstb_secondary_startup) | ||
25 | /* | ||
26 | * Ensure CPU is in a sane state by disabling all IRQs and switching | ||
27 | * into SVC mode. | ||
28 | */ | ||
29 | setmode PSR_I_BIT | PSR_F_BIT | SVC_MODE, r0 | ||
30 | |||
31 | bl v7_invalidate_l1 | ||
32 | b secondary_startup | ||
33 | ENDPROC(brcmstb_secondary_startup) | ||
diff --git a/arch/arm/mach-bcm/kona_smp.c b/arch/arm/mach-bcm/kona_smp.c new file mode 100644 index 000000000000..66a0465528a5 --- /dev/null +++ b/arch/arm/mach-bcm/kona_smp.c | |||
@@ -0,0 +1,202 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2014 Broadcom Corporation | ||
3 | * Copyright 2014 Linaro Limited | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or | ||
6 | * modify it under the terms of the GNU General Public License as | ||
7 | * published by the Free Software Foundation version 2. | ||
8 | * | ||
9 | * This program is distributed "as is" WITHOUT ANY WARRANTY of any | ||
10 | * kind, whether express or implied; without even the implied warranty | ||
11 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | */ | ||
14 | |||
15 | #include <linux/init.h> | ||
16 | #include <linux/errno.h> | ||
17 | #include <linux/io.h> | ||
18 | #include <linux/of.h> | ||
19 | #include <linux/sched.h> | ||
20 | |||
21 | #include <asm/smp.h> | ||
22 | #include <asm/smp_plat.h> | ||
23 | #include <asm/smp_scu.h> | ||
24 | |||
25 | /* Size of mapped Cortex A9 SCU address space */ | ||
26 | #define CORTEX_A9_SCU_SIZE 0x58 | ||
27 | |||
28 | #define SECONDARY_TIMEOUT_NS NSEC_PER_MSEC /* 1 msec (in nanoseconds) */ | ||
29 | #define BOOT_ADDR_CPUID_MASK 0x3 | ||
30 | |||
31 | /* Name of device node property defining secondary boot register location */ | ||
32 | #define OF_SECONDARY_BOOT "secondary-boot-reg" | ||
33 | |||
34 | /* I/O address of register used to coordinate secondary core startup */ | ||
35 | static u32 secondary_boot; | ||
36 | |||
37 | /* | ||
38 | * Enable the Cortex A9 Snoop Control Unit | ||
39 | * | ||
40 | * By the time this is called we already know there are multiple | ||
41 | * cores present. We assume we're running on a Cortex A9 processor, | ||
42 | * so any trouble getting the base address register or getting the | ||
43 | * SCU base is a problem. | ||
44 | * | ||
45 | * Return 0 if successful or an error code otherwise. | ||
46 | */ | ||
47 | static int __init scu_a9_enable(void) | ||
48 | { | ||
49 | unsigned long config_base; | ||
50 | void __iomem *scu_base; | ||
51 | |||
52 | if (!scu_a9_has_base()) { | ||
53 | pr_err("no configuration base address register!\n"); | ||
54 | return -ENXIO; | ||
55 | } | ||
56 | |||
57 | /* Config base address register value is zero for uniprocessor */ | ||
58 | config_base = scu_a9_get_base(); | ||
59 | if (!config_base) { | ||
60 | pr_err("hardware reports only one core\n"); | ||
61 | return -ENOENT; | ||
62 | } | ||
63 | |||
64 | scu_base = ioremap((phys_addr_t)config_base, CORTEX_A9_SCU_SIZE); | ||
65 | if (!scu_base) { | ||
66 | pr_err("failed to remap config base (%lu/%u) for SCU\n", | ||
67 | config_base, CORTEX_A9_SCU_SIZE); | ||
68 | return -ENOMEM; | ||
69 | } | ||
70 | |||
71 | scu_enable(scu_base); | ||
72 | |||
73 | iounmap(scu_base); /* That's the last we'll need of this */ | ||
74 | |||
75 | return 0; | ||
76 | } | ||
77 | |||
78 | static void __init bcm_smp_prepare_cpus(unsigned int max_cpus) | ||
79 | { | ||
80 | static cpumask_t only_cpu_0 = { CPU_BITS_CPU0 }; | ||
81 | struct device_node *node; | ||
82 | int ret; | ||
83 | |||
84 | BUG_ON(secondary_boot); /* We're called only once */ | ||
85 | |||
86 | /* | ||
87 | * This function is only called via smp_ops->smp_prepare_cpu(). | ||
88 | * That only happens if a "/cpus" device tree node exists | ||
89 | * and has an "enable-method" property that selects the SMP | ||
90 | * operations defined herein. | ||
91 | */ | ||
92 | node = of_find_node_by_path("/cpus"); | ||
93 | BUG_ON(!node); | ||
94 | |||
95 | /* | ||
96 | * Our secondary enable method requires a "secondary-boot-reg" | ||
97 | * property to specify a register address used to request the | ||
98 | * ROM code boot a secondary code. If we have any trouble | ||
99 | * getting this we fall back to uniprocessor mode. | ||
100 | */ | ||
101 | if (of_property_read_u32(node, OF_SECONDARY_BOOT, &secondary_boot)) { | ||
102 | pr_err("%s: missing/invalid " OF_SECONDARY_BOOT " property\n", | ||
103 | node->name); | ||
104 | ret = -ENOENT; /* Arrange to disable SMP */ | ||
105 | goto out; | ||
106 | } | ||
107 | |||
108 | /* | ||
109 | * Enable the SCU on Cortex A9 based SoCs. If -ENOENT is | ||
110 | * returned, the SoC reported a uniprocessor configuration. | ||
111 | * We bail on any other error. | ||
112 | */ | ||
113 | ret = scu_a9_enable(); | ||
114 | out: | ||
115 | of_node_put(node); | ||
116 | if (ret) { | ||
117 | /* Update the CPU present map to reflect uniprocessor mode */ | ||
118 | BUG_ON(ret != -ENOENT); | ||
119 | pr_warn("disabling SMP\n"); | ||
120 | init_cpu_present(&only_cpu_0); | ||
121 | } | ||
122 | } | ||
123 | |||
124 | /* | ||
125 | * The ROM code has the secondary cores looping, waiting for an event. | ||
126 | * When an event occurs each core examines the bottom two bits of the | ||
127 | * secondary boot register. When a core finds those bits contain its | ||
128 | * own core id, it performs initialization, including computing its boot | ||
129 | * address by clearing the boot register value's bottom two bits. The | ||
130 | * core signals that it is beginning its execution by writing its boot | ||
131 | * address back to the secondary boot register, and finally jumps to | ||
132 | * that address. | ||
133 | * | ||
134 | * So to start a core executing we need to: | ||
135 | * - Encode the (hardware) CPU id with the bottom bits of the secondary | ||
136 | * start address. | ||
137 | * - Write that value into the secondary boot register. | ||
138 | * - Generate an event to wake up the secondary CPU(s). | ||
139 | * - Wait for the secondary boot register to be re-written, which | ||
140 | * indicates the secondary core has started. | ||
141 | */ | ||
142 | static int bcm_boot_secondary(unsigned int cpu, struct task_struct *idle) | ||
143 | { | ||
144 | void __iomem *boot_reg; | ||
145 | phys_addr_t boot_func; | ||
146 | u64 start_clock; | ||
147 | u32 cpu_id; | ||
148 | u32 boot_val; | ||
149 | bool timeout = false; | ||
150 | |||
151 | cpu_id = cpu_logical_map(cpu); | ||
152 | if (cpu_id & ~BOOT_ADDR_CPUID_MASK) { | ||
153 | pr_err("bad cpu id (%u > %u)\n", cpu_id, BOOT_ADDR_CPUID_MASK); | ||
154 | return -EINVAL; | ||
155 | } | ||
156 | |||
157 | if (!secondary_boot) { | ||
158 | pr_err("required secondary boot register not specified\n"); | ||
159 | return -EINVAL; | ||
160 | } | ||
161 | |||
162 | boot_reg = ioremap_nocache((phys_addr_t)secondary_boot, sizeof(u32)); | ||
163 | if (!boot_reg) { | ||
164 | pr_err("unable to map boot register for cpu %u\n", cpu_id); | ||
165 | return -ENOSYS; | ||
166 | } | ||
167 | |||
168 | /* | ||
169 | * Secondary cores will start in secondary_startup(), | ||
170 | * defined in "arch/arm/kernel/head.S" | ||
171 | */ | ||
172 | boot_func = virt_to_phys(secondary_startup); | ||
173 | BUG_ON(boot_func & BOOT_ADDR_CPUID_MASK); | ||
174 | BUG_ON(boot_func > (phys_addr_t)U32_MAX); | ||
175 | |||
176 | /* The core to start is encoded in the low bits */ | ||
177 | boot_val = (u32)boot_func | cpu_id; | ||
178 | writel_relaxed(boot_val, boot_reg); | ||
179 | |||
180 | sev(); | ||
181 | |||
182 | /* The low bits will be cleared once the core has started */ | ||
183 | start_clock = local_clock(); | ||
184 | while (!timeout && readl_relaxed(boot_reg) == boot_val) | ||
185 | timeout = local_clock() - start_clock > SECONDARY_TIMEOUT_NS; | ||
186 | |||
187 | iounmap(boot_reg); | ||
188 | |||
189 | if (!timeout) | ||
190 | return 0; | ||
191 | |||
192 | pr_err("timeout waiting for cpu %u to start\n", cpu_id); | ||
193 | |||
194 | return -ENOSYS; | ||
195 | } | ||
196 | |||
197 | static struct smp_operations bcm_smp_ops __initdata = { | ||
198 | .smp_prepare_cpus = bcm_smp_prepare_cpus, | ||
199 | .smp_boot_secondary = bcm_boot_secondary, | ||
200 | }; | ||
201 | CPU_METHOD_OF_DECLARE(bcm_smp_bcm281xx, "brcm,bcm11351-cpu-method", | ||
202 | &bcm_smp_ops); | ||
diff --git a/arch/arm/mach-bcm/platsmp-brcmstb.c b/arch/arm/mach-bcm/platsmp-brcmstb.c new file mode 100644 index 000000000000..af780e9c23a6 --- /dev/null +++ b/arch/arm/mach-bcm/platsmp-brcmstb.c | |||
@@ -0,0 +1,363 @@ | |||
1 | /* | ||
2 | * Broadcom STB CPU SMP and hotplug support for ARM | ||
3 | * | ||
4 | * Copyright (C) 2013-2014 Broadcom Corporation | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public License as | ||
8 | * published by the Free Software Foundation version 2. | ||
9 | * | ||
10 | * This program is distributed "as is" WITHOUT ANY WARRANTY of any | ||
11 | * kind, whether express or implied; without even the implied warranty | ||
12 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | */ | ||
15 | |||
16 | #include <linux/delay.h> | ||
17 | #include <linux/errno.h> | ||
18 | #include <linux/init.h> | ||
19 | #include <linux/io.h> | ||
20 | #include <linux/of_address.h> | ||
21 | #include <linux/of_platform.h> | ||
22 | #include <linux/printk.h> | ||
23 | #include <linux/regmap.h> | ||
24 | #include <linux/smp.h> | ||
25 | #include <linux/mfd/syscon.h> | ||
26 | #include <linux/spinlock.h> | ||
27 | |||
28 | #include <asm/cacheflush.h> | ||
29 | #include <asm/cp15.h> | ||
30 | #include <asm/mach-types.h> | ||
31 | #include <asm/smp_plat.h> | ||
32 | |||
33 | #include "brcmstb.h" | ||
34 | |||
35 | enum { | ||
36 | ZONE_MAN_CLKEN_MASK = BIT(0), | ||
37 | ZONE_MAN_RESET_CNTL_MASK = BIT(1), | ||
38 | ZONE_MAN_MEM_PWR_MASK = BIT(4), | ||
39 | ZONE_RESERVED_1_MASK = BIT(5), | ||
40 | ZONE_MAN_ISO_CNTL_MASK = BIT(6), | ||
41 | ZONE_MANUAL_CONTROL_MASK = BIT(7), | ||
42 | ZONE_PWR_DN_REQ_MASK = BIT(9), | ||
43 | ZONE_PWR_UP_REQ_MASK = BIT(10), | ||
44 | ZONE_BLK_RST_ASSERT_MASK = BIT(12), | ||
45 | ZONE_PWR_OFF_STATE_MASK = BIT(25), | ||
46 | ZONE_PWR_ON_STATE_MASK = BIT(26), | ||
47 | ZONE_DPG_PWR_STATE_MASK = BIT(28), | ||
48 | ZONE_MEM_PWR_STATE_MASK = BIT(29), | ||
49 | ZONE_RESET_STATE_MASK = BIT(31), | ||
50 | CPU0_PWR_ZONE_CTRL_REG = 1, | ||
51 | CPU_RESET_CONFIG_REG = 2, | ||
52 | }; | ||
53 | |||
54 | static void __iomem *cpubiuctrl_block; | ||
55 | static void __iomem *hif_cont_block; | ||
56 | static u32 cpu0_pwr_zone_ctrl_reg; | ||
57 | static u32 cpu_rst_cfg_reg; | ||
58 | static u32 hif_cont_reg; | ||
59 | |||
60 | #ifdef CONFIG_HOTPLUG_CPU | ||
61 | static DEFINE_PER_CPU_ALIGNED(int, per_cpu_sw_state); | ||
62 | |||
63 | static int per_cpu_sw_state_rd(u32 cpu) | ||
64 | { | ||
65 | sync_cache_r(SHIFT_PERCPU_PTR(&per_cpu_sw_state, per_cpu_offset(cpu))); | ||
66 | return per_cpu(per_cpu_sw_state, cpu); | ||
67 | } | ||
68 | |||
69 | static void per_cpu_sw_state_wr(u32 cpu, int val) | ||
70 | { | ||
71 | per_cpu(per_cpu_sw_state, cpu) = val; | ||
72 | dmb(); | ||
73 | sync_cache_w(SHIFT_PERCPU_PTR(&per_cpu_sw_state, per_cpu_offset(cpu))); | ||
74 | dsb_sev(); | ||
75 | } | ||
76 | #else | ||
77 | static inline void per_cpu_sw_state_wr(u32 cpu, int val) { } | ||
78 | #endif | ||
79 | |||
80 | static void __iomem *pwr_ctrl_get_base(u32 cpu) | ||
81 | { | ||
82 | void __iomem *base = cpubiuctrl_block + cpu0_pwr_zone_ctrl_reg; | ||
83 | base += (cpu_logical_map(cpu) * 4); | ||
84 | return base; | ||
85 | } | ||
86 | |||
87 | static u32 pwr_ctrl_rd(u32 cpu) | ||
88 | { | ||
89 | void __iomem *base = pwr_ctrl_get_base(cpu); | ||
90 | return readl_relaxed(base); | ||
91 | } | ||
92 | |||
93 | static void pwr_ctrl_wr(u32 cpu, u32 val) | ||
94 | { | ||
95 | void __iomem *base = pwr_ctrl_get_base(cpu); | ||
96 | writel(val, base); | ||
97 | } | ||
98 | |||
99 | static void cpu_rst_cfg_set(u32 cpu, int set) | ||
100 | { | ||
101 | u32 val; | ||
102 | val = readl_relaxed(cpubiuctrl_block + cpu_rst_cfg_reg); | ||
103 | if (set) | ||
104 | val |= BIT(cpu_logical_map(cpu)); | ||
105 | else | ||
106 | val &= ~BIT(cpu_logical_map(cpu)); | ||
107 | writel_relaxed(val, cpubiuctrl_block + cpu_rst_cfg_reg); | ||
108 | } | ||
109 | |||
110 | static void cpu_set_boot_addr(u32 cpu, unsigned long boot_addr) | ||
111 | { | ||
112 | const int reg_ofs = cpu_logical_map(cpu) * 8; | ||
113 | writel_relaxed(0, hif_cont_block + hif_cont_reg + reg_ofs); | ||
114 | writel_relaxed(boot_addr, hif_cont_block + hif_cont_reg + 4 + reg_ofs); | ||
115 | } | ||
116 | |||
117 | static void brcmstb_cpu_boot(u32 cpu) | ||
118 | { | ||
119 | pr_info("SMP: Booting CPU%d...\n", cpu); | ||
120 | |||
121 | /* | ||
122 | * set the reset vector to point to the secondary_startup | ||
123 | * routine | ||
124 | */ | ||
125 | cpu_set_boot_addr(cpu, virt_to_phys(brcmstb_secondary_startup)); | ||
126 | |||
127 | /* unhalt the cpu */ | ||
128 | cpu_rst_cfg_set(cpu, 0); | ||
129 | } | ||
130 | |||
131 | static void brcmstb_cpu_power_on(u32 cpu) | ||
132 | { | ||
133 | /* | ||
134 | * The secondary cores power was cut, so we must go through | ||
135 | * power-on initialization. | ||
136 | */ | ||
137 | u32 tmp; | ||
138 | |||
139 | pr_info("SMP: Powering up CPU%d...\n", cpu); | ||
140 | |||
141 | /* Request zone power up */ | ||
142 | pwr_ctrl_wr(cpu, ZONE_PWR_UP_REQ_MASK); | ||
143 | |||
144 | /* Wait for the power up FSM to complete */ | ||
145 | do { | ||
146 | tmp = pwr_ctrl_rd(cpu); | ||
147 | } while (!(tmp & ZONE_PWR_ON_STATE_MASK)); | ||
148 | |||
149 | per_cpu_sw_state_wr(cpu, 1); | ||
150 | } | ||
151 | |||
152 | static int brcmstb_cpu_get_power_state(u32 cpu) | ||
153 | { | ||
154 | int tmp = pwr_ctrl_rd(cpu); | ||
155 | return (tmp & ZONE_RESET_STATE_MASK) ? 0 : 1; | ||
156 | } | ||
157 | |||
158 | #ifdef CONFIG_HOTPLUG_CPU | ||
159 | |||
160 | static void brcmstb_cpu_die(u32 cpu) | ||
161 | { | ||
162 | v7_exit_coherency_flush(all); | ||
163 | |||
164 | /* Prevent all interrupts from reaching this CPU. */ | ||
165 | arch_local_irq_disable(); | ||
166 | |||
167 | /* | ||
168 | * Final full barrier to ensure everything before this instruction has | ||
169 | * quiesced. | ||
170 | */ | ||
171 | isb(); | ||
172 | dsb(); | ||
173 | |||
174 | per_cpu_sw_state_wr(cpu, 0); | ||
175 | |||
176 | /* Sit and wait to die */ | ||
177 | wfi(); | ||
178 | |||
179 | /* We should never get here... */ | ||
180 | panic("Spurious interrupt on CPU %d received!\n", cpu); | ||
181 | } | ||
182 | |||
183 | static int brcmstb_cpu_kill(u32 cpu) | ||
184 | { | ||
185 | u32 tmp; | ||
186 | |||
187 | pr_info("SMP: Powering down CPU%d...\n", cpu); | ||
188 | |||
189 | while (per_cpu_sw_state_rd(cpu)) | ||
190 | ; | ||
191 | |||
192 | /* Program zone reset */ | ||
193 | pwr_ctrl_wr(cpu, ZONE_RESET_STATE_MASK | ZONE_BLK_RST_ASSERT_MASK | | ||
194 | ZONE_PWR_DN_REQ_MASK); | ||
195 | |||
196 | /* Verify zone reset */ | ||
197 | tmp = pwr_ctrl_rd(cpu); | ||
198 | if (!(tmp & ZONE_RESET_STATE_MASK)) | ||
199 | pr_err("%s: Zone reset bit for CPU %d not asserted!\n", | ||
200 | __func__, cpu); | ||
201 | |||
202 | /* Wait for power down */ | ||
203 | do { | ||
204 | tmp = pwr_ctrl_rd(cpu); | ||
205 | } while (!(tmp & ZONE_PWR_OFF_STATE_MASK)); | ||
206 | |||
207 | /* Settle-time from Broadcom-internal DVT reference code */ | ||
208 | udelay(7); | ||
209 | |||
210 | /* Assert reset on the CPU */ | ||
211 | cpu_rst_cfg_set(cpu, 1); | ||
212 | |||
213 | return 1; | ||
214 | } | ||
215 | |||
216 | #endif /* CONFIG_HOTPLUG_CPU */ | ||
217 | |||
218 | static int __init setup_hifcpubiuctrl_regs(struct device_node *np) | ||
219 | { | ||
220 | int rc = 0; | ||
221 | char *name; | ||
222 | struct device_node *syscon_np = NULL; | ||
223 | |||
224 | name = "syscon-cpu"; | ||
225 | |||
226 | syscon_np = of_parse_phandle(np, name, 0); | ||
227 | if (!syscon_np) { | ||
228 | pr_err("can't find phandle %s\n", name); | ||
229 | rc = -EINVAL; | ||
230 | goto cleanup; | ||
231 | } | ||
232 | |||
233 | cpubiuctrl_block = of_iomap(syscon_np, 0); | ||
234 | if (!cpubiuctrl_block) { | ||
235 | pr_err("iomap failed for cpubiuctrl_block\n"); | ||
236 | rc = -EINVAL; | ||
237 | goto cleanup; | ||
238 | } | ||
239 | |||
240 | rc = of_property_read_u32_index(np, name, CPU0_PWR_ZONE_CTRL_REG, | ||
241 | &cpu0_pwr_zone_ctrl_reg); | ||
242 | if (rc) { | ||
243 | pr_err("failed to read 1st entry from %s property (%d)\n", name, | ||
244 | rc); | ||
245 | rc = -EINVAL; | ||
246 | goto cleanup; | ||
247 | } | ||
248 | |||
249 | rc = of_property_read_u32_index(np, name, CPU_RESET_CONFIG_REG, | ||
250 | &cpu_rst_cfg_reg); | ||
251 | if (rc) { | ||
252 | pr_err("failed to read 2nd entry from %s property (%d)\n", name, | ||
253 | rc); | ||
254 | rc = -EINVAL; | ||
255 | goto cleanup; | ||
256 | } | ||
257 | |||
258 | cleanup: | ||
259 | if (syscon_np) | ||
260 | of_node_put(syscon_np); | ||
261 | |||
262 | return rc; | ||
263 | } | ||
264 | |||
265 | static int __init setup_hifcont_regs(struct device_node *np) | ||
266 | { | ||
267 | int rc = 0; | ||
268 | char *name; | ||
269 | struct device_node *syscon_np = NULL; | ||
270 | |||
271 | name = "syscon-cont"; | ||
272 | |||
273 | syscon_np = of_parse_phandle(np, name, 0); | ||
274 | if (!syscon_np) { | ||
275 | pr_err("can't find phandle %s\n", name); | ||
276 | rc = -EINVAL; | ||
277 | goto cleanup; | ||
278 | } | ||
279 | |||
280 | hif_cont_block = of_iomap(syscon_np, 0); | ||
281 | if (!hif_cont_block) { | ||
282 | pr_err("iomap failed for hif_cont_block\n"); | ||
283 | rc = -EINVAL; | ||
284 | goto cleanup; | ||
285 | } | ||
286 | |||
287 | /* offset is at top of hif_cont_block */ | ||
288 | hif_cont_reg = 0; | ||
289 | |||
290 | cleanup: | ||
291 | if (syscon_np) | ||
292 | of_node_put(syscon_np); | ||
293 | |||
294 | return rc; | ||
295 | } | ||
296 | |||
297 | static void __init brcmstb_cpu_ctrl_setup(unsigned int max_cpus) | ||
298 | { | ||
299 | int rc; | ||
300 | struct device_node *np; | ||
301 | char *name; | ||
302 | |||
303 | name = "brcm,brcmstb-smpboot"; | ||
304 | np = of_find_compatible_node(NULL, NULL, name); | ||
305 | if (!np) { | ||
306 | pr_err("can't find compatible node %s\n", name); | ||
307 | return; | ||
308 | } | ||
309 | |||
310 | rc = setup_hifcpubiuctrl_regs(np); | ||
311 | if (rc) | ||
312 | return; | ||
313 | |||
314 | rc = setup_hifcont_regs(np); | ||
315 | if (rc) | ||
316 | return; | ||
317 | } | ||
318 | |||
319 | static DEFINE_SPINLOCK(boot_lock); | ||
320 | |||
321 | static void brcmstb_secondary_init(unsigned int cpu) | ||
322 | { | ||
323 | /* | ||
324 | * Synchronise with the boot thread. | ||
325 | */ | ||
326 | spin_lock(&boot_lock); | ||
327 | spin_unlock(&boot_lock); | ||
328 | } | ||
329 | |||
330 | static int brcmstb_boot_secondary(unsigned int cpu, struct task_struct *idle) | ||
331 | { | ||
332 | /* | ||
333 | * set synchronisation state between this boot processor | ||
334 | * and the secondary one | ||
335 | */ | ||
336 | spin_lock(&boot_lock); | ||
337 | |||
338 | /* Bring up power to the core if necessary */ | ||
339 | if (brcmstb_cpu_get_power_state(cpu) == 0) | ||
340 | brcmstb_cpu_power_on(cpu); | ||
341 | |||
342 | brcmstb_cpu_boot(cpu); | ||
343 | |||
344 | /* | ||
345 | * now the secondary core is starting up let it run its | ||
346 | * calibrations, then wait for it to finish | ||
347 | */ | ||
348 | spin_unlock(&boot_lock); | ||
349 | |||
350 | return 0; | ||
351 | } | ||
352 | |||
353 | static struct smp_operations brcmstb_smp_ops __initdata = { | ||
354 | .smp_prepare_cpus = brcmstb_cpu_ctrl_setup, | ||
355 | .smp_secondary_init = brcmstb_secondary_init, | ||
356 | .smp_boot_secondary = brcmstb_boot_secondary, | ||
357 | #ifdef CONFIG_HOTPLUG_CPU | ||
358 | .cpu_kill = brcmstb_cpu_kill, | ||
359 | .cpu_die = brcmstb_cpu_die, | ||
360 | #endif | ||
361 | }; | ||
362 | |||
363 | CPU_METHOD_OF_DECLARE(brcmstb_smp, "brcm,brahma-b15", &brcmstb_smp_ops); | ||
diff --git a/arch/arm/mach-berlin/Kconfig b/arch/arm/mach-berlin/Kconfig index 2631cfc5ab0d..24f85be71671 100644 --- a/arch/arm/mach-berlin/Kconfig +++ b/arch/arm/mach-berlin/Kconfig | |||
@@ -13,7 +13,9 @@ config MACH_BERLIN_BG2 | |||
13 | bool "Marvell Armada 1500 (BG2)" | 13 | bool "Marvell Armada 1500 (BG2)" |
14 | select CACHE_L2X0 | 14 | select CACHE_L2X0 |
15 | select CPU_PJ4B | 15 | select CPU_PJ4B |
16 | select HAVE_ARM_SCU if SMP | ||
16 | select HAVE_ARM_TWD if SMP | 17 | select HAVE_ARM_TWD if SMP |
18 | select HAVE_SMP | ||
17 | select PINCTRL_BERLIN_BG2 | 19 | select PINCTRL_BERLIN_BG2 |
18 | 20 | ||
19 | config MACH_BERLIN_BG2CD | 21 | config MACH_BERLIN_BG2CD |
@@ -25,6 +27,7 @@ config MACH_BERLIN_BG2CD | |||
25 | config MACH_BERLIN_BG2Q | 27 | config MACH_BERLIN_BG2Q |
26 | bool "Marvell Armada 1500 Pro (BG2-Q)" | 28 | bool "Marvell Armada 1500 Pro (BG2-Q)" |
27 | select CACHE_L2X0 | 29 | select CACHE_L2X0 |
30 | select HAVE_ARM_SCU if SMP | ||
28 | select HAVE_ARM_TWD if SMP | 31 | select HAVE_ARM_TWD if SMP |
29 | select PINCTRL_BERLIN_BG2Q | 32 | select PINCTRL_BERLIN_BG2Q |
30 | 33 | ||
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-exynos/common.h b/arch/arm/mach-exynos/common.h index f8daa9cc5617..47b904b3b973 100644 --- a/arch/arm/mach-exynos/common.h +++ b/arch/arm/mach-exynos/common.h | |||
@@ -134,7 +134,7 @@ extern void exynos_cpu_die(unsigned int cpu); | |||
134 | 134 | ||
135 | /* PMU(Power Management Unit) support */ | 135 | /* PMU(Power Management Unit) support */ |
136 | 136 | ||
137 | #define PMU_TABLE_END NULL | 137 | #define PMU_TABLE_END (-1U) |
138 | 138 | ||
139 | enum sys_powerdown { | 139 | enum sys_powerdown { |
140 | SYS_AFTR, | 140 | SYS_AFTR, |
@@ -144,7 +144,7 @@ enum sys_powerdown { | |||
144 | }; | 144 | }; |
145 | 145 | ||
146 | struct exynos_pmu_conf { | 146 | struct exynos_pmu_conf { |
147 | void __iomem *reg; | 147 | unsigned int offset; |
148 | unsigned int val[NUM_SYS_POWERDOWN]; | 148 | unsigned int val[NUM_SYS_POWERDOWN]; |
149 | }; | 149 | }; |
150 | 150 | ||
@@ -160,4 +160,14 @@ extern void exynos_enter_aftr(void); | |||
160 | extern void s5p_init_cpu(void __iomem *cpuid_addr); | 160 | extern void s5p_init_cpu(void __iomem *cpuid_addr); |
161 | extern unsigned int samsung_rev(void); | 161 | extern unsigned int samsung_rev(void); |
162 | 162 | ||
163 | static inline void pmu_raw_writel(u32 val, u32 offset) | ||
164 | { | ||
165 | __raw_writel(val, pmu_base_addr + offset); | ||
166 | } | ||
167 | |||
168 | static inline u32 pmu_raw_readl(u32 offset) | ||
169 | { | ||
170 | return __raw_readl(pmu_base_addr + offset); | ||
171 | } | ||
172 | |||
163 | #endif /* __ARCH_ARM_MACH_EXYNOS_COMMON_H */ | 173 | #endif /* __ARCH_ARM_MACH_EXYNOS_COMMON_H */ |
diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c index 3164ef2e6b6c..c426093bdbd9 100644 --- a/arch/arm/mach-exynos/exynos.c +++ b/arch/arm/mach-exynos/exynos.c | |||
@@ -61,11 +61,6 @@ static struct map_desc exynos4_iodesc[] __initdata = { | |||
61 | .length = SZ_4K, | 61 | .length = SZ_4K, |
62 | .type = MT_DEVICE, | 62 | .type = MT_DEVICE, |
63 | }, { | 63 | }, { |
64 | .virtual = (unsigned long)S5P_VA_PMU, | ||
65 | .pfn = __phys_to_pfn(EXYNOS4_PA_PMU), | ||
66 | .length = SZ_64K, | ||
67 | .type = MT_DEVICE, | ||
68 | }, { | ||
69 | .virtual = (unsigned long)S5P_VA_COMBINER_BASE, | 64 | .virtual = (unsigned long)S5P_VA_COMBINER_BASE, |
70 | .pfn = __phys_to_pfn(EXYNOS4_PA_COMBINER), | 65 | .pfn = __phys_to_pfn(EXYNOS4_PA_COMBINER), |
71 | .length = SZ_4K, | 66 | .length = SZ_4K, |
@@ -139,11 +134,6 @@ static struct map_desc exynos5_iodesc[] __initdata = { | |||
139 | .pfn = __phys_to_pfn(EXYNOS5_PA_CMU), | 134 | .pfn = __phys_to_pfn(EXYNOS5_PA_CMU), |
140 | .length = 144 * SZ_1K, | 135 | .length = 144 * SZ_1K, |
141 | .type = MT_DEVICE, | 136 | .type = MT_DEVICE, |
142 | }, { | ||
143 | .virtual = (unsigned long)S5P_VA_PMU, | ||
144 | .pfn = __phys_to_pfn(EXYNOS5_PA_PMU), | ||
145 | .length = SZ_64K, | ||
146 | .type = MT_DEVICE, | ||
147 | }, | 137 | }, |
148 | }; | 138 | }; |
149 | 139 | ||
@@ -151,7 +141,7 @@ static void exynos_restart(enum reboot_mode mode, const char *cmd) | |||
151 | { | 141 | { |
152 | struct device_node *np; | 142 | struct device_node *np; |
153 | u32 val = 0x1; | 143 | u32 val = 0x1; |
154 | void __iomem *addr = EXYNOS_SWRESET; | 144 | void __iomem *addr = pmu_base_addr + EXYNOS_SWRESET; |
155 | 145 | ||
156 | if (of_machine_is_compatible("samsung,exynos5440")) { | 146 | if (of_machine_is_compatible("samsung,exynos5440")) { |
157 | u32 status; | 147 | u32 status; |
@@ -175,17 +165,6 @@ static struct platform_device exynos_cpuidle = { | |||
175 | .id = -1, | 165 | .id = -1, |
176 | }; | 166 | }; |
177 | 167 | ||
178 | void __init exynos_cpuidle_init(void) | ||
179 | { | ||
180 | if (soc_is_exynos4210() || soc_is_exynos5250()) | ||
181 | platform_device_register(&exynos_cpuidle); | ||
182 | } | ||
183 | |||
184 | void __init exynos_cpufreq_init(void) | ||
185 | { | ||
186 | platform_device_register_simple("exynos-cpufreq", -1, NULL, 0); | ||
187 | } | ||
188 | |||
189 | void __iomem *sysram_base_addr; | 168 | void __iomem *sysram_base_addr; |
190 | void __iomem *sysram_ns_base_addr; | 169 | void __iomem *sysram_ns_base_addr; |
191 | 170 | ||
@@ -335,8 +314,11 @@ static void __init exynos_dt_machine_init(void) | |||
335 | if (!IS_ENABLED(CONFIG_SMP)) | 314 | if (!IS_ENABLED(CONFIG_SMP)) |
336 | exynos_sysram_init(); | 315 | exynos_sysram_init(); |
337 | 316 | ||
338 | exynos_cpuidle_init(); | 317 | if (of_machine_is_compatible("samsung,exynos4210") || |
339 | exynos_cpufreq_init(); | 318 | of_machine_is_compatible("samsung,exynos5250")) |
319 | platform_device_register(&exynos_cpuidle); | ||
320 | |||
321 | platform_device_register_simple("exynos-cpufreq", -1, NULL, 0); | ||
340 | 322 | ||
341 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | 323 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
342 | } | 324 | } |
diff --git a/arch/arm/mach-exynos/include/mach/map.h b/arch/arm/mach-exynos/include/mach/map.h index 963002fb15c3..f0b7e92bad6c 100644 --- a/arch/arm/mach-exynos/include/mach/map.h +++ b/arch/arm/mach-exynos/include/mach/map.h | |||
@@ -27,9 +27,6 @@ | |||
27 | #define EXYNOS4_PA_SYSCON 0x10010000 | 27 | #define EXYNOS4_PA_SYSCON 0x10010000 |
28 | #define EXYNOS5_PA_SYSCON 0x10050100 | 28 | #define EXYNOS5_PA_SYSCON 0x10050100 |
29 | 29 | ||
30 | #define EXYNOS4_PA_PMU 0x10020000 | ||
31 | #define EXYNOS5_PA_PMU 0x10040000 | ||
32 | |||
33 | #define EXYNOS4_PA_CMU 0x10030000 | 30 | #define EXYNOS4_PA_CMU 0x10030000 |
34 | #define EXYNOS5_PA_CMU 0x10010000 | 31 | #define EXYNOS5_PA_CMU 0x10010000 |
35 | 32 | ||
diff --git a/arch/arm/mach-exynos/mcpm-exynos.c b/arch/arm/mach-exynos/mcpm-exynos.c index a96b78f93f2b..b2f8b60cf0e9 100644 --- a/arch/arm/mach-exynos/mcpm-exynos.c +++ b/arch/arm/mach-exynos/mcpm-exynos.c | |||
@@ -26,6 +26,10 @@ | |||
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 | 28 | ||
29 | #define EXYNOS5420_ENABLE_AUTOMATIC_CORE_DOWN BIT(9) | ||
30 | #define EXYNOS5420_USE_ARM_CORE_DOWN_STATE BIT(29) | ||
31 | #define EXYNOS5420_USE_L2_COMMON_UP_STATE BIT(30) | ||
32 | |||
29 | /* | 33 | /* |
30 | * The common v7_exit_coherency_flush API could not be used because of the | 34 | * The common v7_exit_coherency_flush API could not be used because of the |
31 | * Erratum 799270 workaround. This macro is the same as the common one (in | 35 | * Erratum 799270 workaround. This macro is the same as the common one (in |
@@ -51,7 +55,7 @@ | |||
51 | "dsb\n\t" \ | 55 | "dsb\n\t" \ |
52 | "ldmfd sp!, {fp, ip}" \ | 56 | "ldmfd sp!, {fp, ip}" \ |
53 | : \ | 57 | : \ |
54 | : "Ir" (S5P_INFORM0) \ | 58 | : "Ir" (pmu_base_addr + S5P_INFORM0) \ |
55 | : "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", \ | 59 | : "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", \ |
56 | "r9", "r10", "lr", "memory") | 60 | "r9", "r10", "lr", "memory") |
57 | 61 | ||
@@ -73,36 +77,9 @@ cpu_use_count[EXYNOS5420_CPUS_PER_CLUSTER][EXYNOS5420_NR_CLUSTERS]; | |||
73 | 77 | ||
74 | #define exynos_cluster_unused(cluster) !exynos_cluster_usecnt(cluster) | 78 | #define exynos_cluster_unused(cluster) !exynos_cluster_usecnt(cluster) |
75 | 79 | ||
76 | static int exynos_cluster_power_control(unsigned int cluster, int enable) | ||
77 | { | ||
78 | unsigned int tries = 100; | ||
79 | unsigned int val; | ||
80 | |||
81 | if (enable) { | ||
82 | exynos_cluster_power_up(cluster); | ||
83 | val = S5P_CORE_LOCAL_PWR_EN; | ||
84 | } else { | ||
85 | exynos_cluster_power_down(cluster); | ||
86 | val = 0; | ||
87 | } | ||
88 | |||
89 | /* Wait until cluster power control is applied */ | ||
90 | while (tries--) { | ||
91 | if (exynos_cluster_power_state(cluster) == val) | ||
92 | return 0; | ||
93 | |||
94 | cpu_relax(); | ||
95 | } | ||
96 | pr_debug("timed out waiting for cluster %u to power %s\n", cluster, | ||
97 | enable ? "on" : "off"); | ||
98 | |||
99 | return -ETIMEDOUT; | ||
100 | } | ||
101 | |||
102 | static int exynos_power_up(unsigned int cpu, unsigned int cluster) | 80 | static int exynos_power_up(unsigned int cpu, unsigned int cluster) |
103 | { | 81 | { |
104 | unsigned int cpunr = cpu + (cluster * EXYNOS5420_CPUS_PER_CLUSTER); | 82 | unsigned int cpunr = cpu + (cluster * EXYNOS5420_CPUS_PER_CLUSTER); |
105 | int err = 0; | ||
106 | 83 | ||
107 | pr_debug("%s: cpu %u cluster %u\n", __func__, cpu, cluster); | 84 | pr_debug("%s: cpu %u cluster %u\n", __func__, cpu, cluster); |
108 | if (cpu >= EXYNOS5420_CPUS_PER_CLUSTER || | 85 | if (cpu >= EXYNOS5420_CPUS_PER_CLUSTER || |
@@ -126,12 +103,9 @@ static int exynos_power_up(unsigned int cpu, unsigned int cluster) | |||
126 | * cores. | 103 | * cores. |
127 | */ | 104 | */ |
128 | if (was_cluster_down) | 105 | if (was_cluster_down) |
129 | err = exynos_cluster_power_control(cluster, 1); | 106 | exynos_cluster_power_up(cluster); |
130 | 107 | ||
131 | if (!err) | 108 | exynos_cpu_power_up(cpunr); |
132 | exynos_cpu_power_up(cpunr); | ||
133 | else | ||
134 | exynos_cluster_power_control(cluster, 0); | ||
135 | } else if (cpu_use_count[cpu][cluster] != 2) { | 109 | } else if (cpu_use_count[cpu][cluster] != 2) { |
136 | /* | 110 | /* |
137 | * The only possible values are: | 111 | * The only possible values are: |
@@ -147,7 +121,7 @@ static int exynos_power_up(unsigned int cpu, unsigned int cluster) | |||
147 | arch_spin_unlock(&exynos_mcpm_lock); | 121 | arch_spin_unlock(&exynos_mcpm_lock); |
148 | local_irq_enable(); | 122 | local_irq_enable(); |
149 | 123 | ||
150 | return err; | 124 | return 0; |
151 | } | 125 | } |
152 | 126 | ||
153 | /* | 127 | /* |
@@ -178,9 +152,10 @@ static void exynos_power_down(void) | |||
178 | if (cpu_use_count[cpu][cluster] == 0) { | 152 | if (cpu_use_count[cpu][cluster] == 0) { |
179 | exynos_cpu_power_down(cpunr); | 153 | exynos_cpu_power_down(cpunr); |
180 | 154 | ||
181 | if (exynos_cluster_unused(cluster)) | 155 | if (exynos_cluster_unused(cluster)) { |
182 | /* TODO: Turn off the cluster here to save power. */ | 156 | exynos_cluster_power_down(cluster); |
183 | last_man = true; | 157 | last_man = true; |
158 | } | ||
184 | } else if (cpu_use_count[cpu][cluster] == 1) { | 159 | } else if (cpu_use_count[cpu][cluster] == 1) { |
185 | /* | 160 | /* |
186 | * A power_up request went ahead of us. | 161 | * A power_up request went ahead of us. |
@@ -257,10 +232,46 @@ static int exynos_wait_for_powerdown(unsigned int cpu, unsigned int cluster) | |||
257 | return -ETIMEDOUT; /* timeout */ | 232 | return -ETIMEDOUT; /* timeout */ |
258 | } | 233 | } |
259 | 234 | ||
235 | static void exynos_powered_up(void) | ||
236 | { | ||
237 | unsigned int mpidr, cpu, cluster; | ||
238 | |||
239 | mpidr = read_cpuid_mpidr(); | ||
240 | cpu = MPIDR_AFFINITY_LEVEL(mpidr, 0); | ||
241 | cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1); | ||
242 | |||
243 | arch_spin_lock(&exynos_mcpm_lock); | ||
244 | if (cpu_use_count[cpu][cluster] == 0) | ||
245 | cpu_use_count[cpu][cluster] = 1; | ||
246 | arch_spin_unlock(&exynos_mcpm_lock); | ||
247 | } | ||
248 | |||
249 | static void exynos_suspend(u64 residency) | ||
250 | { | ||
251 | unsigned int mpidr, cpunr; | ||
252 | |||
253 | exynos_power_down(); | ||
254 | |||
255 | /* | ||
256 | * Execution reaches here only if cpu did not power down. | ||
257 | * Hence roll back the changes done in exynos_power_down function. | ||
258 | * | ||
259 | * CAUTION: "This function requires the stack data to be visible through | ||
260 | * power down and can only be executed on processors like A15 and A7 | ||
261 | * that hit the cache with the C bit clear in the SCTLR register." | ||
262 | */ | ||
263 | mpidr = read_cpuid_mpidr(); | ||
264 | cpunr = exynos_pmu_cpunr(mpidr); | ||
265 | |||
266 | exynos_cpu_power_up(cpunr); | ||
267 | } | ||
268 | |||
260 | static const struct mcpm_platform_ops exynos_power_ops = { | 269 | static const struct mcpm_platform_ops exynos_power_ops = { |
261 | .power_up = exynos_power_up, | 270 | .power_up = exynos_power_up, |
262 | .power_down = exynos_power_down, | 271 | .power_down = exynos_power_down, |
263 | .wait_for_powerdown = exynos_wait_for_powerdown, | 272 | .wait_for_powerdown = exynos_wait_for_powerdown, |
273 | .suspend = exynos_suspend, | ||
274 | .powered_up = exynos_powered_up, | ||
264 | }; | 275 | }; |
265 | 276 | ||
266 | static void __init exynos_mcpm_usage_count_init(void) | 277 | static void __init exynos_mcpm_usage_count_init(void) |
@@ -312,6 +323,7 @@ static int __init exynos_mcpm_init(void) | |||
312 | { | 323 | { |
313 | struct device_node *node; | 324 | struct device_node *node; |
314 | void __iomem *ns_sram_base_addr; | 325 | void __iomem *ns_sram_base_addr; |
326 | unsigned int value, i; | ||
315 | int ret; | 327 | int ret; |
316 | 328 | ||
317 | node = of_find_matching_node(NULL, exynos_dt_mcpm_match); | 329 | node = of_find_matching_node(NULL, exynos_dt_mcpm_match); |
@@ -338,7 +350,7 @@ static int __init exynos_mcpm_init(void) | |||
338 | * To increase the stability of KFC reset we need to program | 350 | * To increase the stability of KFC reset we need to program |
339 | * the PMU SPARE3 register | 351 | * the PMU SPARE3 register |
340 | */ | 352 | */ |
341 | __raw_writel(EXYNOS5420_SWRESET_KFC_SEL, S5P_PMU_SPARE3); | 353 | pmu_raw_writel(EXYNOS5420_SWRESET_KFC_SEL, S5P_PMU_SPARE3); |
342 | 354 | ||
343 | exynos_mcpm_usage_count_init(); | 355 | exynos_mcpm_usage_count_init(); |
344 | 356 | ||
@@ -357,6 +369,26 @@ static int __init exynos_mcpm_init(void) | |||
357 | pr_info("Exynos MCPM support installed\n"); | 369 | pr_info("Exynos MCPM support installed\n"); |
358 | 370 | ||
359 | /* | 371 | /* |
372 | * On Exynos5420/5800 for the A15 and A7 clusters: | ||
373 | * | ||
374 | * EXYNOS5420_ENABLE_AUTOMATIC_CORE_DOWN ensures that all the cores | ||
375 | * in a cluster are turned off before turning off the cluster L2. | ||
376 | * | ||
377 | * EXYNOS5420_USE_ARM_CORE_DOWN_STATE ensures that a cores is powered | ||
378 | * off before waking it up. | ||
379 | * | ||
380 | * EXYNOS5420_USE_L2_COMMON_UP_STATE ensures that cluster L2 will be | ||
381 | * turned on before the first man is powered up. | ||
382 | */ | ||
383 | for (i = 0; i < EXYNOS5420_NR_CLUSTERS; i++) { | ||
384 | value = pmu_raw_readl(EXYNOS_COMMON_OPTION(i)); | ||
385 | value |= EXYNOS5420_ENABLE_AUTOMATIC_CORE_DOWN | | ||
386 | EXYNOS5420_USE_ARM_CORE_DOWN_STATE | | ||
387 | EXYNOS5420_USE_L2_COMMON_UP_STATE; | ||
388 | pmu_raw_writel(value, EXYNOS_COMMON_OPTION(i)); | ||
389 | } | ||
390 | |||
391 | /* | ||
360 | * U-Boot SPL is hardcoded to jump to the start of ns_sram_base_addr | 392 | * U-Boot SPL is hardcoded to jump to the start of ns_sram_base_addr |
361 | * as part of secondary_cpu_start(). Let's redirect it to the | 393 | * as part of secondary_cpu_start(). Let's redirect it to the |
362 | * mcpm_entry_point(). | 394 | * mcpm_entry_point(). |
diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c index e5a8d764f24c..a9f1cf759949 100644 --- a/arch/arm/mach-exynos/platsmp.c +++ b/arch/arm/mach-exynos/platsmp.c | |||
@@ -26,6 +26,8 @@ | |||
26 | #include <asm/smp_scu.h> | 26 | #include <asm/smp_scu.h> |
27 | #include <asm/firmware.h> | 27 | #include <asm/firmware.h> |
28 | 28 | ||
29 | #include <mach/map.h> | ||
30 | |||
29 | #include "common.h" | 31 | #include "common.h" |
30 | #include "regs-pmu.h" | 32 | #include "regs-pmu.h" |
31 | 33 | ||
@@ -41,7 +43,7 @@ extern void exynos4_secondary_startup(void); | |||
41 | */ | 43 | */ |
42 | void exynos_cpu_power_down(int cpu) | 44 | void exynos_cpu_power_down(int cpu) |
43 | { | 45 | { |
44 | __raw_writel(0, EXYNOS_ARM_CORE_CONFIGURATION(cpu)); | 46 | pmu_raw_writel(0, EXYNOS_ARM_CORE_CONFIGURATION(cpu)); |
45 | } | 47 | } |
46 | 48 | ||
47 | /** | 49 | /** |
@@ -52,8 +54,8 @@ void exynos_cpu_power_down(int cpu) | |||
52 | */ | 54 | */ |
53 | void exynos_cpu_power_up(int cpu) | 55 | void exynos_cpu_power_up(int cpu) |
54 | { | 56 | { |
55 | __raw_writel(S5P_CORE_LOCAL_PWR_EN, | 57 | pmu_raw_writel(S5P_CORE_LOCAL_PWR_EN, |
56 | EXYNOS_ARM_CORE_CONFIGURATION(cpu)); | 58 | EXYNOS_ARM_CORE_CONFIGURATION(cpu)); |
57 | } | 59 | } |
58 | 60 | ||
59 | /** | 61 | /** |
@@ -63,7 +65,7 @@ void exynos_cpu_power_up(int cpu) | |||
63 | */ | 65 | */ |
64 | int exynos_cpu_power_state(int cpu) | 66 | int exynos_cpu_power_state(int cpu) |
65 | { | 67 | { |
66 | return (__raw_readl(EXYNOS_ARM_CORE_STATUS(cpu)) & | 68 | return (pmu_raw_readl(EXYNOS_ARM_CORE_STATUS(cpu)) & |
67 | S5P_CORE_LOCAL_PWR_EN); | 69 | S5P_CORE_LOCAL_PWR_EN); |
68 | } | 70 | } |
69 | 71 | ||
@@ -73,7 +75,7 @@ int exynos_cpu_power_state(int cpu) | |||
73 | */ | 75 | */ |
74 | void exynos_cluster_power_down(int cluster) | 76 | void exynos_cluster_power_down(int cluster) |
75 | { | 77 | { |
76 | __raw_writel(0, EXYNOS_COMMON_CONFIGURATION(cluster)); | 78 | pmu_raw_writel(0, EXYNOS_COMMON_CONFIGURATION(cluster)); |
77 | } | 79 | } |
78 | 80 | ||
79 | /** | 81 | /** |
@@ -82,8 +84,8 @@ void exynos_cluster_power_down(int cluster) | |||
82 | */ | 84 | */ |
83 | void exynos_cluster_power_up(int cluster) | 85 | void exynos_cluster_power_up(int cluster) |
84 | { | 86 | { |
85 | __raw_writel(S5P_CORE_LOCAL_PWR_EN, | 87 | pmu_raw_writel(S5P_CORE_LOCAL_PWR_EN, |
86 | EXYNOS_COMMON_CONFIGURATION(cluster)); | 88 | EXYNOS_COMMON_CONFIGURATION(cluster)); |
87 | } | 89 | } |
88 | 90 | ||
89 | /** | 91 | /** |
@@ -93,14 +95,14 @@ void exynos_cluster_power_up(int cluster) | |||
93 | */ | 95 | */ |
94 | int exynos_cluster_power_state(int cluster) | 96 | int exynos_cluster_power_state(int cluster) |
95 | { | 97 | { |
96 | return (__raw_readl(EXYNOS_COMMON_STATUS(cluster)) & | 98 | return (pmu_raw_readl(EXYNOS_COMMON_STATUS(cluster)) & |
97 | S5P_CORE_LOCAL_PWR_EN); | 99 | S5P_CORE_LOCAL_PWR_EN); |
98 | } | 100 | } |
99 | 101 | ||
100 | static inline void __iomem *cpu_boot_reg_base(void) | 102 | static inline void __iomem *cpu_boot_reg_base(void) |
101 | { | 103 | { |
102 | if (soc_is_exynos4210() && samsung_rev() == EXYNOS4210_REV_1_1) | 104 | if (soc_is_exynos4210() && samsung_rev() == EXYNOS4210_REV_1_1) |
103 | return S5P_INFORM5; | 105 | return pmu_base_addr + S5P_INFORM5; |
104 | return sysram_base_addr; | 106 | return sysram_base_addr; |
105 | } | 107 | } |
106 | 108 | ||
diff --git a/arch/arm/mach-exynos/pm.c b/arch/arm/mach-exynos/pm.c index 6ab68a068e93..18646b7e226b 100644 --- a/arch/arm/mach-exynos/pm.c +++ b/arch/arm/mach-exynos/pm.c | |||
@@ -28,7 +28,6 @@ | |||
28 | #include <asm/suspend.h> | 28 | #include <asm/suspend.h> |
29 | 29 | ||
30 | #include <plat/pm-common.h> | 30 | #include <plat/pm-common.h> |
31 | #include <plat/pll.h> | ||
32 | #include <plat/regs-srom.h> | 31 | #include <plat/regs-srom.h> |
33 | 32 | ||
34 | #include <mach/map.h> | 33 | #include <mach/map.h> |
@@ -102,11 +101,15 @@ static int exynos_irq_set_wake(struct irq_data *data, unsigned int state) | |||
102 | } | 101 | } |
103 | 102 | ||
104 | #define EXYNOS_BOOT_VECTOR_ADDR (samsung_rev() == EXYNOS4210_REV_1_1 ? \ | 103 | #define EXYNOS_BOOT_VECTOR_ADDR (samsung_rev() == EXYNOS4210_REV_1_1 ? \ |
105 | S5P_INFORM7 : (samsung_rev() == EXYNOS4210_REV_1_0 ? \ | 104 | pmu_base_addr + S5P_INFORM7 : \ |
106 | (sysram_base_addr + 0x24) : S5P_INFORM0)) | 105 | (samsung_rev() == EXYNOS4210_REV_1_0 ? \ |
106 | (sysram_base_addr + 0x24) : \ | ||
107 | pmu_base_addr + S5P_INFORM0)) | ||
107 | #define EXYNOS_BOOT_VECTOR_FLAG (samsung_rev() == EXYNOS4210_REV_1_1 ? \ | 108 | #define EXYNOS_BOOT_VECTOR_FLAG (samsung_rev() == EXYNOS4210_REV_1_1 ? \ |
108 | S5P_INFORM6 : (samsung_rev() == EXYNOS4210_REV_1_0 ? \ | 109 | pmu_base_addr + S5P_INFORM6 : \ |
109 | (sysram_base_addr + 0x20) : S5P_INFORM1)) | 110 | (samsung_rev() == EXYNOS4210_REV_1_0 ? \ |
111 | (sysram_base_addr + 0x20) : \ | ||
112 | pmu_base_addr + S5P_INFORM1)) | ||
110 | 113 | ||
111 | #define S5P_CHECK_AFTR 0xFCBA0D10 | 114 | #define S5P_CHECK_AFTR 0xFCBA0D10 |
112 | #define S5P_CHECK_SLEEP 0x00000BAD | 115 | #define S5P_CHECK_SLEEP 0x00000BAD |
@@ -114,7 +117,7 @@ static int exynos_irq_set_wake(struct irq_data *data, unsigned int state) | |||
114 | /* Ext-GIC nIRQ/nFIQ is the only wakeup source in AFTR */ | 117 | /* Ext-GIC nIRQ/nFIQ is the only wakeup source in AFTR */ |
115 | static void exynos_set_wakeupmask(long mask) | 118 | static void exynos_set_wakeupmask(long mask) |
116 | { | 119 | { |
117 | __raw_writel(mask, S5P_WAKEUP_MASK); | 120 | pmu_raw_writel(mask, S5P_WAKEUP_MASK); |
118 | } | 121 | } |
119 | 122 | ||
120 | static void exynos_cpu_set_boot_vector(long flags) | 123 | static void exynos_cpu_set_boot_vector(long flags) |
@@ -191,27 +194,27 @@ static void exynos_pm_prepare(void) | |||
191 | unsigned int tmp; | 194 | unsigned int tmp; |
192 | 195 | ||
193 | /* Set wake-up mask registers */ | 196 | /* Set wake-up mask registers */ |
194 | __raw_writel(exynos_get_eint_wake_mask(), S5P_EINT_WAKEUP_MASK); | 197 | pmu_raw_writel(exynos_get_eint_wake_mask(), S5P_EINT_WAKEUP_MASK); |
195 | __raw_writel(exynos_irqwake_intmask & ~(1 << 31), S5P_WAKEUP_MASK); | 198 | pmu_raw_writel(exynos_irqwake_intmask & ~(1 << 31), S5P_WAKEUP_MASK); |
196 | 199 | ||
197 | s3c_pm_do_save(exynos_core_save, ARRAY_SIZE(exynos_core_save)); | 200 | s3c_pm_do_save(exynos_core_save, ARRAY_SIZE(exynos_core_save)); |
198 | 201 | ||
199 | if (soc_is_exynos5250()) { | 202 | if (soc_is_exynos5250()) { |
200 | s3c_pm_do_save(exynos5_sys_save, ARRAY_SIZE(exynos5_sys_save)); | 203 | s3c_pm_do_save(exynos5_sys_save, ARRAY_SIZE(exynos5_sys_save)); |
201 | /* Disable USE_RETENTION of JPEG_MEM_OPTION */ | 204 | /* Disable USE_RETENTION of JPEG_MEM_OPTION */ |
202 | tmp = __raw_readl(EXYNOS5_JPEG_MEM_OPTION); | 205 | tmp = pmu_raw_readl(EXYNOS5_JPEG_MEM_OPTION); |
203 | tmp &= ~EXYNOS5_OPTION_USE_RETENTION; | 206 | tmp &= ~EXYNOS5_OPTION_USE_RETENTION; |
204 | __raw_writel(tmp, EXYNOS5_JPEG_MEM_OPTION); | 207 | pmu_raw_writel(tmp, EXYNOS5_JPEG_MEM_OPTION); |
205 | } | 208 | } |
206 | 209 | ||
207 | /* Set value of power down register for sleep mode */ | 210 | /* Set value of power down register for sleep mode */ |
208 | 211 | ||
209 | exynos_sys_powerdown_conf(SYS_SLEEP); | 212 | exynos_sys_powerdown_conf(SYS_SLEEP); |
210 | __raw_writel(S5P_CHECK_SLEEP, S5P_INFORM1); | 213 | pmu_raw_writel(S5P_CHECK_SLEEP, S5P_INFORM1); |
211 | 214 | ||
212 | /* ensure at least INFORM0 has the resume address */ | 215 | /* ensure at least INFORM0 has the resume address */ |
213 | 216 | ||
214 | __raw_writel(virt_to_phys(exynos_cpu_resume), S5P_INFORM0); | 217 | pmu_raw_writel(virt_to_phys(exynos_cpu_resume), S5P_INFORM0); |
215 | } | 218 | } |
216 | 219 | ||
217 | static void exynos_pm_central_suspend(void) | 220 | static void exynos_pm_central_suspend(void) |
@@ -219,9 +222,9 @@ static void exynos_pm_central_suspend(void) | |||
219 | unsigned long tmp; | 222 | unsigned long tmp; |
220 | 223 | ||
221 | /* Setting Central Sequence Register for power down mode */ | 224 | /* Setting Central Sequence Register for power down mode */ |
222 | tmp = __raw_readl(S5P_CENTRAL_SEQ_CONFIGURATION); | 225 | tmp = pmu_raw_readl(S5P_CENTRAL_SEQ_CONFIGURATION); |
223 | tmp &= ~S5P_CENTRAL_LOWPWR_CFG; | 226 | tmp &= ~S5P_CENTRAL_LOWPWR_CFG; |
224 | __raw_writel(tmp, S5P_CENTRAL_SEQ_CONFIGURATION); | 227 | pmu_raw_writel(tmp, S5P_CENTRAL_SEQ_CONFIGURATION); |
225 | } | 228 | } |
226 | 229 | ||
227 | static int exynos_pm_suspend(void) | 230 | static int exynos_pm_suspend(void) |
@@ -233,7 +236,7 @@ static int exynos_pm_suspend(void) | |||
233 | /* Setting SEQ_OPTION register */ | 236 | /* Setting SEQ_OPTION register */ |
234 | 237 | ||
235 | tmp = (S5P_USE_STANDBY_WFI0 | S5P_USE_STANDBY_WFE0); | 238 | tmp = (S5P_USE_STANDBY_WFI0 | S5P_USE_STANDBY_WFE0); |
236 | __raw_writel(tmp, S5P_CENTRAL_SEQ_OPTION); | 239 | pmu_raw_writel(tmp, S5P_CENTRAL_SEQ_OPTION); |
237 | 240 | ||
238 | if (read_cpuid_part() == ARM_CPU_PART_CORTEX_A9) | 241 | if (read_cpuid_part() == ARM_CPU_PART_CORTEX_A9) |
239 | exynos_cpu_save_register(); | 242 | exynos_cpu_save_register(); |
@@ -251,12 +254,12 @@ static int exynos_pm_central_resume(void) | |||
251 | * S5P_CENTRAL_LOWPWR_CFG bit will not be set automatically | 254 | * S5P_CENTRAL_LOWPWR_CFG bit will not be set automatically |
252 | * in this situation. | 255 | * in this situation. |
253 | */ | 256 | */ |
254 | tmp = __raw_readl(S5P_CENTRAL_SEQ_CONFIGURATION); | 257 | tmp = pmu_raw_readl(S5P_CENTRAL_SEQ_CONFIGURATION); |
255 | if (!(tmp & S5P_CENTRAL_LOWPWR_CFG)) { | 258 | if (!(tmp & S5P_CENTRAL_LOWPWR_CFG)) { |
256 | tmp |= S5P_CENTRAL_LOWPWR_CFG; | 259 | tmp |= S5P_CENTRAL_LOWPWR_CFG; |
257 | __raw_writel(tmp, S5P_CENTRAL_SEQ_CONFIGURATION); | 260 | pmu_raw_writel(tmp, S5P_CENTRAL_SEQ_CONFIGURATION); |
258 | /* clear the wakeup state register */ | 261 | /* clear the wakeup state register */ |
259 | __raw_writel(0x0, S5P_WAKEUP_STAT); | 262 | pmu_raw_writel(0x0, S5P_WAKEUP_STAT); |
260 | /* No need to perform below restore code */ | 263 | /* No need to perform below restore code */ |
261 | return -1; | 264 | return -1; |
262 | } | 265 | } |
@@ -274,13 +277,13 @@ static void exynos_pm_resume(void) | |||
274 | 277 | ||
275 | /* For release retention */ | 278 | /* For release retention */ |
276 | 279 | ||
277 | __raw_writel((1 << 28), S5P_PAD_RET_MAUDIO_OPTION); | 280 | pmu_raw_writel((1 << 28), S5P_PAD_RET_MAUDIO_OPTION); |
278 | __raw_writel((1 << 28), S5P_PAD_RET_GPIO_OPTION); | 281 | pmu_raw_writel((1 << 28), S5P_PAD_RET_GPIO_OPTION); |
279 | __raw_writel((1 << 28), S5P_PAD_RET_UART_OPTION); | 282 | pmu_raw_writel((1 << 28), S5P_PAD_RET_UART_OPTION); |
280 | __raw_writel((1 << 28), S5P_PAD_RET_MMCA_OPTION); | 283 | pmu_raw_writel((1 << 28), S5P_PAD_RET_MMCA_OPTION); |
281 | __raw_writel((1 << 28), S5P_PAD_RET_MMCB_OPTION); | 284 | pmu_raw_writel((1 << 28), S5P_PAD_RET_MMCB_OPTION); |
282 | __raw_writel((1 << 28), S5P_PAD_RET_EBIA_OPTION); | 285 | pmu_raw_writel((1 << 28), S5P_PAD_RET_EBIA_OPTION); |
283 | __raw_writel((1 << 28), S5P_PAD_RET_EBIB_OPTION); | 286 | pmu_raw_writel((1 << 28), S5P_PAD_RET_EBIB_OPTION); |
284 | 287 | ||
285 | if (soc_is_exynos5250()) | 288 | if (soc_is_exynos5250()) |
286 | s3c_pm_do_restore(exynos5_sys_save, | 289 | s3c_pm_do_restore(exynos5_sys_save, |
@@ -294,7 +297,7 @@ static void exynos_pm_resume(void) | |||
294 | early_wakeup: | 297 | early_wakeup: |
295 | 298 | ||
296 | /* Clear SLEEP mode set in INFORM1 */ | 299 | /* Clear SLEEP mode set in INFORM1 */ |
297 | __raw_writel(0x0, S5P_INFORM1); | 300 | pmu_raw_writel(0x0, S5P_INFORM1); |
298 | 301 | ||
299 | return; | 302 | return; |
300 | } | 303 | } |
@@ -338,7 +341,7 @@ static int exynos_suspend_enter(suspend_state_t state) | |||
338 | s3c_pm_restore_uarts(); | 341 | s3c_pm_restore_uarts(); |
339 | 342 | ||
340 | S3C_PMDBG("%s: wakeup stat: %08x\n", __func__, | 343 | S3C_PMDBG("%s: wakeup stat: %08x\n", __func__, |
341 | __raw_readl(S5P_WAKEUP_STAT)); | 344 | pmu_raw_readl(S5P_WAKEUP_STAT)); |
342 | 345 | ||
343 | s3c_pm_check_restore(); | 346 | s3c_pm_check_restore(); |
344 | 347 | ||
@@ -408,9 +411,9 @@ void __init exynos_pm_init(void) | |||
408 | gic_arch_extn.irq_set_wake = exynos_irq_set_wake; | 411 | gic_arch_extn.irq_set_wake = exynos_irq_set_wake; |
409 | 412 | ||
410 | /* All wakeup disable */ | 413 | /* All wakeup disable */ |
411 | tmp = __raw_readl(S5P_WAKEUP_MASK); | 414 | tmp = pmu_raw_readl(S5P_WAKEUP_MASK); |
412 | tmp |= ((0xFF << 8) | (0x1F << 1)); | 415 | tmp |= ((0xFF << 8) | (0x1F << 1)); |
413 | __raw_writel(tmp, S5P_WAKEUP_MASK); | 416 | pmu_raw_writel(tmp, S5P_WAKEUP_MASK); |
414 | 417 | ||
415 | register_syscore_ops(&exynos_pm_syscore_ops); | 418 | register_syscore_ops(&exynos_pm_syscore_ops); |
416 | suspend_set_ops(&exynos_suspend_ops); | 419 | suspend_set_ops(&exynos_suspend_ops); |
diff --git a/arch/arm/mach-exynos/pmu.c b/arch/arm/mach-exynos/pmu.c index dcfcb44c3c55..ff9d23f0a7d9 100644 --- a/arch/arm/mach-exynos/pmu.c +++ b/arch/arm/mach-exynos/pmu.c | |||
@@ -18,7 +18,7 @@ | |||
18 | static const struct exynos_pmu_conf *exynos_pmu_config; | 18 | static const struct exynos_pmu_conf *exynos_pmu_config; |
19 | 19 | ||
20 | static const struct exynos_pmu_conf exynos4210_pmu_config[] = { | 20 | static const struct exynos_pmu_conf exynos4210_pmu_config[] = { |
21 | /* { .reg = address, .val = { AFTR, LPA, SLEEP } */ | 21 | /* { .offset = offset, .val = { AFTR, LPA, SLEEP } */ |
22 | { S5P_ARM_CORE0_LOWPWR, { 0x0, 0x0, 0x2 } }, | 22 | { S5P_ARM_CORE0_LOWPWR, { 0x0, 0x0, 0x2 } }, |
23 | { S5P_DIS_IRQ_CORE0, { 0x0, 0x0, 0x0 } }, | 23 | { S5P_DIS_IRQ_CORE0, { 0x0, 0x0, 0x0 } }, |
24 | { S5P_DIS_IRQ_CENTRAL0, { 0x0, 0x0, 0x0 } }, | 24 | { S5P_DIS_IRQ_CENTRAL0, { 0x0, 0x0, 0x0 } }, |
@@ -212,7 +212,7 @@ static const struct exynos_pmu_conf exynos4412_pmu_config[] = { | |||
212 | }; | 212 | }; |
213 | 213 | ||
214 | static const struct exynos_pmu_conf exynos5250_pmu_config[] = { | 214 | static const struct exynos_pmu_conf exynos5250_pmu_config[] = { |
215 | /* { .reg = address, .val = { AFTR, LPA, SLEEP } */ | 215 | /* { .offset = offset, .val = { AFTR, LPA, SLEEP } */ |
216 | { EXYNOS5_ARM_CORE0_SYS_PWR_REG, { 0x0, 0x0, 0x2} }, | 216 | { EXYNOS5_ARM_CORE0_SYS_PWR_REG, { 0x0, 0x0, 0x2} }, |
217 | { EXYNOS5_DIS_IRQ_ARM_CORE0_LOCAL_SYS_PWR_REG, { 0x0, 0x0, 0x0} }, | 217 | { EXYNOS5_DIS_IRQ_ARM_CORE0_LOCAL_SYS_PWR_REG, { 0x0, 0x0, 0x0} }, |
218 | { EXYNOS5_DIS_IRQ_ARM_CORE0_CENTRAL_SYS_PWR_REG, { 0x0, 0x0, 0x0} }, | 218 | { EXYNOS5_DIS_IRQ_ARM_CORE0_CENTRAL_SYS_PWR_REG, { 0x0, 0x0, 0x0} }, |
@@ -315,7 +315,7 @@ static const struct exynos_pmu_conf exynos5250_pmu_config[] = { | |||
315 | { PMU_TABLE_END,}, | 315 | { PMU_TABLE_END,}, |
316 | }; | 316 | }; |
317 | 317 | ||
318 | static void __iomem * const exynos5_list_both_cnt_feed[] = { | 318 | static unsigned int const exynos5_list_both_cnt_feed[] = { |
319 | EXYNOS5_ARM_CORE0_OPTION, | 319 | EXYNOS5_ARM_CORE0_OPTION, |
320 | EXYNOS5_ARM_CORE1_OPTION, | 320 | EXYNOS5_ARM_CORE1_OPTION, |
321 | EXYNOS5_ARM_COMMON_OPTION, | 321 | EXYNOS5_ARM_COMMON_OPTION, |
@@ -329,7 +329,7 @@ static void __iomem * const exynos5_list_both_cnt_feed[] = { | |||
329 | EXYNOS5_TOP_PWR_SYSMEM_OPTION, | 329 | EXYNOS5_TOP_PWR_SYSMEM_OPTION, |
330 | }; | 330 | }; |
331 | 331 | ||
332 | static void __iomem * const exynos5_list_diable_wfi_wfe[] = { | 332 | static unsigned int const exynos5_list_diable_wfi_wfe[] = { |
333 | EXYNOS5_ARM_CORE1_OPTION, | 333 | EXYNOS5_ARM_CORE1_OPTION, |
334 | EXYNOS5_FSYS_ARM_OPTION, | 334 | EXYNOS5_FSYS_ARM_OPTION, |
335 | EXYNOS5_ISP_ARM_OPTION, | 335 | EXYNOS5_ISP_ARM_OPTION, |
@@ -344,27 +344,27 @@ static void exynos5_init_pmu(void) | |||
344 | * Enable both SC_FEEDBACK and SC_COUNTER | 344 | * Enable both SC_FEEDBACK and SC_COUNTER |
345 | */ | 345 | */ |
346 | for (i = 0 ; i < ARRAY_SIZE(exynos5_list_both_cnt_feed) ; i++) { | 346 | for (i = 0 ; i < ARRAY_SIZE(exynos5_list_both_cnt_feed) ; i++) { |
347 | tmp = __raw_readl(exynos5_list_both_cnt_feed[i]); | 347 | tmp = pmu_raw_readl(exynos5_list_both_cnt_feed[i]); |
348 | tmp |= (EXYNOS5_USE_SC_FEEDBACK | | 348 | tmp |= (EXYNOS5_USE_SC_FEEDBACK | |
349 | EXYNOS5_USE_SC_COUNTER); | 349 | EXYNOS5_USE_SC_COUNTER); |
350 | __raw_writel(tmp, exynos5_list_both_cnt_feed[i]); | 350 | pmu_raw_writel(tmp, exynos5_list_both_cnt_feed[i]); |
351 | } | 351 | } |
352 | 352 | ||
353 | /* | 353 | /* |
354 | * SKIP_DEACTIVATE_ACEACP_IN_PWDN_BITFIELD Enable | 354 | * SKIP_DEACTIVATE_ACEACP_IN_PWDN_BITFIELD Enable |
355 | */ | 355 | */ |
356 | tmp = __raw_readl(EXYNOS5_ARM_COMMON_OPTION); | 356 | tmp = pmu_raw_readl(EXYNOS5_ARM_COMMON_OPTION); |
357 | tmp |= EXYNOS5_SKIP_DEACTIVATE_ACEACP_IN_PWDN; | 357 | tmp |= EXYNOS5_SKIP_DEACTIVATE_ACEACP_IN_PWDN; |
358 | __raw_writel(tmp, EXYNOS5_ARM_COMMON_OPTION); | 358 | pmu_raw_writel(tmp, EXYNOS5_ARM_COMMON_OPTION); |
359 | 359 | ||
360 | /* | 360 | /* |
361 | * Disable WFI/WFE on XXX_OPTION | 361 | * Disable WFI/WFE on XXX_OPTION |
362 | */ | 362 | */ |
363 | for (i = 0 ; i < ARRAY_SIZE(exynos5_list_diable_wfi_wfe) ; i++) { | 363 | for (i = 0 ; i < ARRAY_SIZE(exynos5_list_diable_wfi_wfe) ; i++) { |
364 | tmp = __raw_readl(exynos5_list_diable_wfi_wfe[i]); | 364 | tmp = pmu_raw_readl(exynos5_list_diable_wfi_wfe[i]); |
365 | tmp &= ~(EXYNOS5_OPTION_USE_STANDBYWFE | | 365 | tmp &= ~(EXYNOS5_OPTION_USE_STANDBYWFE | |
366 | EXYNOS5_OPTION_USE_STANDBYWFI); | 366 | EXYNOS5_OPTION_USE_STANDBYWFI); |
367 | __raw_writel(tmp, exynos5_list_diable_wfi_wfe[i]); | 367 | pmu_raw_writel(tmp, exynos5_list_diable_wfi_wfe[i]); |
368 | } | 368 | } |
369 | } | 369 | } |
370 | 370 | ||
@@ -375,14 +375,14 @@ void exynos_sys_powerdown_conf(enum sys_powerdown mode) | |||
375 | if (soc_is_exynos5250()) | 375 | if (soc_is_exynos5250()) |
376 | exynos5_init_pmu(); | 376 | exynos5_init_pmu(); |
377 | 377 | ||
378 | for (i = 0; (exynos_pmu_config[i].reg != PMU_TABLE_END) ; i++) | 378 | for (i = 0; (exynos_pmu_config[i].offset != PMU_TABLE_END) ; i++) |
379 | __raw_writel(exynos_pmu_config[i].val[mode], | 379 | pmu_raw_writel(exynos_pmu_config[i].val[mode], |
380 | exynos_pmu_config[i].reg); | 380 | exynos_pmu_config[i].offset); |
381 | 381 | ||
382 | if (soc_is_exynos4412()) { | 382 | if (soc_is_exynos4412()) { |
383 | for (i = 0; exynos4412_pmu_config[i].reg != PMU_TABLE_END ; i++) | 383 | for (i = 0; exynos4412_pmu_config[i].offset != PMU_TABLE_END ; i++) |
384 | __raw_writel(exynos4412_pmu_config[i].val[mode], | 384 | pmu_raw_writel(exynos4412_pmu_config[i].val[mode], |
385 | exynos4412_pmu_config[i].reg); | 385 | exynos4412_pmu_config[i].offset); |
386 | } | 386 | } |
387 | } | 387 | } |
388 | 388 | ||
@@ -403,13 +403,13 @@ static int __init exynos_pmu_init(void) | |||
403 | * When SYS_WDTRESET is set, watchdog timer reset request | 403 | * When SYS_WDTRESET is set, watchdog timer reset request |
404 | * is ignored by power management unit. | 404 | * is ignored by power management unit. |
405 | */ | 405 | */ |
406 | value = __raw_readl(EXYNOS5_AUTO_WDTRESET_DISABLE); | 406 | value = pmu_raw_readl(EXYNOS5_AUTO_WDTRESET_DISABLE); |
407 | value &= ~EXYNOS5_SYS_WDTRESET; | 407 | value &= ~EXYNOS5_SYS_WDTRESET; |
408 | __raw_writel(value, EXYNOS5_AUTO_WDTRESET_DISABLE); | 408 | pmu_raw_writel(value, EXYNOS5_AUTO_WDTRESET_DISABLE); |
409 | 409 | ||
410 | value = __raw_readl(EXYNOS5_MASK_WDTRESET_REQUEST); | 410 | value = pmu_raw_readl(EXYNOS5_MASK_WDTRESET_REQUEST); |
411 | value &= ~EXYNOS5_SYS_WDTRESET; | 411 | value &= ~EXYNOS5_SYS_WDTRESET; |
412 | __raw_writel(value, EXYNOS5_MASK_WDTRESET_REQUEST); | 412 | pmu_raw_writel(value, EXYNOS5_MASK_WDTRESET_REQUEST); |
413 | 413 | ||
414 | exynos_pmu_config = exynos5250_pmu_config; | 414 | exynos_pmu_config = exynos5250_pmu_config; |
415 | pr_info("EXYNOS5250 PMU Initialize\n"); | 415 | pr_info("EXYNOS5250 PMU Initialize\n"); |
diff --git a/arch/arm/mach-exynos/regs-pmu.h b/arch/arm/mach-exynos/regs-pmu.h index 1993e6bd5388..96a1569262b5 100644 --- a/arch/arm/mach-exynos/regs-pmu.h +++ b/arch/arm/mach-exynos/regs-pmu.h | |||
@@ -12,300 +12,298 @@ | |||
12 | #ifndef __ASM_ARCH_REGS_PMU_H | 12 | #ifndef __ASM_ARCH_REGS_PMU_H |
13 | #define __ASM_ARCH_REGS_PMU_H __FILE__ | 13 | #define __ASM_ARCH_REGS_PMU_H __FILE__ |
14 | 14 | ||
15 | #include <mach/map.h> | 15 | #define S5P_CENTRAL_SEQ_CONFIGURATION 0x0200 |
16 | |||
17 | #define S5P_PMUREG(x) (S5P_VA_PMU + (x)) | ||
18 | |||
19 | #define S5P_CENTRAL_SEQ_CONFIGURATION S5P_PMUREG(0x0200) | ||
20 | 16 | ||
21 | #define S5P_CENTRAL_LOWPWR_CFG (1 << 16) | 17 | #define S5P_CENTRAL_LOWPWR_CFG (1 << 16) |
22 | 18 | ||
23 | #define S5P_CENTRAL_SEQ_OPTION S5P_PMUREG(0x0208) | 19 | #define S5P_CENTRAL_SEQ_OPTION 0x0208 |
24 | 20 | ||
25 | #define S5P_USE_STANDBY_WFI0 (1 << 16) | 21 | #define S5P_USE_STANDBY_WFI0 (1 << 16) |
26 | #define S5P_USE_STANDBY_WFE0 (1 << 24) | 22 | #define S5P_USE_STANDBY_WFE0 (1 << 24) |
27 | 23 | ||
28 | #define EXYNOS_SWRESET S5P_PMUREG(0x0400) | 24 | #define EXYNOS_SWRESET 0x0400 |
29 | #define EXYNOS5440_SWRESET S5P_PMUREG(0x00C4) | 25 | #define EXYNOS5440_SWRESET 0x00C4 |
30 | 26 | ||
31 | #define S5P_WAKEUP_STAT S5P_PMUREG(0x0600) | 27 | #define S5P_WAKEUP_STAT 0x0600 |
32 | #define S5P_EINT_WAKEUP_MASK S5P_PMUREG(0x0604) | 28 | #define S5P_EINT_WAKEUP_MASK 0x0604 |
33 | #define S5P_WAKEUP_MASK S5P_PMUREG(0x0608) | 29 | #define S5P_WAKEUP_MASK 0x0608 |
34 | 30 | ||
35 | #define S5P_INFORM0 S5P_PMUREG(0x0800) | 31 | #define S5P_INFORM0 0x0800 |
36 | #define S5P_INFORM1 S5P_PMUREG(0x0804) | 32 | #define S5P_INFORM1 0x0804 |
37 | #define S5P_INFORM5 S5P_PMUREG(0x0814) | 33 | #define S5P_INFORM5 0x0814 |
38 | #define S5P_INFORM6 S5P_PMUREG(0x0818) | 34 | #define S5P_INFORM6 0x0818 |
39 | #define S5P_INFORM7 S5P_PMUREG(0x081C) | 35 | #define S5P_INFORM7 0x081C |
40 | #define S5P_PMU_SPARE3 S5P_PMUREG(0x090C) | 36 | #define S5P_PMU_SPARE3 0x090C |
41 | 37 | ||
42 | #define S5P_ARM_CORE0_LOWPWR S5P_PMUREG(0x1000) | 38 | #define S5P_ARM_CORE0_LOWPWR 0x1000 |
43 | #define S5P_DIS_IRQ_CORE0 S5P_PMUREG(0x1004) | 39 | #define S5P_DIS_IRQ_CORE0 0x1004 |
44 | #define S5P_DIS_IRQ_CENTRAL0 S5P_PMUREG(0x1008) | 40 | #define S5P_DIS_IRQ_CENTRAL0 0x1008 |
45 | #define S5P_ARM_CORE1_LOWPWR S5P_PMUREG(0x1010) | 41 | #define S5P_ARM_CORE1_LOWPWR 0x1010 |
46 | #define S5P_DIS_IRQ_CORE1 S5P_PMUREG(0x1014) | 42 | #define S5P_DIS_IRQ_CORE1 0x1014 |
47 | #define S5P_DIS_IRQ_CENTRAL1 S5P_PMUREG(0x1018) | 43 | #define S5P_DIS_IRQ_CENTRAL1 0x1018 |
48 | #define S5P_ARM_COMMON_LOWPWR S5P_PMUREG(0x1080) | 44 | #define S5P_ARM_COMMON_LOWPWR 0x1080 |
49 | #define S5P_L2_0_LOWPWR S5P_PMUREG(0x10C0) | 45 | #define S5P_L2_0_LOWPWR 0x10C0 |
50 | #define S5P_L2_1_LOWPWR S5P_PMUREG(0x10C4) | 46 | #define S5P_L2_1_LOWPWR 0x10C4 |
51 | #define S5P_CMU_ACLKSTOP_LOWPWR S5P_PMUREG(0x1100) | 47 | #define S5P_CMU_ACLKSTOP_LOWPWR 0x1100 |
52 | #define S5P_CMU_SCLKSTOP_LOWPWR S5P_PMUREG(0x1104) | 48 | #define S5P_CMU_SCLKSTOP_LOWPWR 0x1104 |
53 | #define S5P_CMU_RESET_LOWPWR S5P_PMUREG(0x110C) | 49 | #define S5P_CMU_RESET_LOWPWR 0x110C |
54 | #define S5P_APLL_SYSCLK_LOWPWR S5P_PMUREG(0x1120) | 50 | #define S5P_APLL_SYSCLK_LOWPWR 0x1120 |
55 | #define S5P_MPLL_SYSCLK_LOWPWR S5P_PMUREG(0x1124) | 51 | #define S5P_MPLL_SYSCLK_LOWPWR 0x1124 |
56 | #define S5P_VPLL_SYSCLK_LOWPWR S5P_PMUREG(0x1128) | 52 | #define S5P_VPLL_SYSCLK_LOWPWR 0x1128 |
57 | #define S5P_EPLL_SYSCLK_LOWPWR S5P_PMUREG(0x112C) | 53 | #define S5P_EPLL_SYSCLK_LOWPWR 0x112C |
58 | #define S5P_CMU_CLKSTOP_GPS_ALIVE_LOWPWR S5P_PMUREG(0x1138) | 54 | #define S5P_CMU_CLKSTOP_GPS_ALIVE_LOWPWR 0x1138 |
59 | #define S5P_CMU_RESET_GPSALIVE_LOWPWR S5P_PMUREG(0x113C) | 55 | #define S5P_CMU_RESET_GPSALIVE_LOWPWR 0x113C |
60 | #define S5P_CMU_CLKSTOP_CAM_LOWPWR S5P_PMUREG(0x1140) | 56 | #define S5P_CMU_CLKSTOP_CAM_LOWPWR 0x1140 |
61 | #define S5P_CMU_CLKSTOP_TV_LOWPWR S5P_PMUREG(0x1144) | 57 | #define S5P_CMU_CLKSTOP_TV_LOWPWR 0x1144 |
62 | #define S5P_CMU_CLKSTOP_MFC_LOWPWR S5P_PMUREG(0x1148) | 58 | #define S5P_CMU_CLKSTOP_MFC_LOWPWR 0x1148 |
63 | #define S5P_CMU_CLKSTOP_G3D_LOWPWR S5P_PMUREG(0x114C) | 59 | #define S5P_CMU_CLKSTOP_G3D_LOWPWR 0x114C |
64 | #define S5P_CMU_CLKSTOP_LCD0_LOWPWR S5P_PMUREG(0x1150) | 60 | #define S5P_CMU_CLKSTOP_LCD0_LOWPWR 0x1150 |
65 | #define S5P_CMU_CLKSTOP_MAUDIO_LOWPWR S5P_PMUREG(0x1158) | 61 | #define S5P_CMU_CLKSTOP_MAUDIO_LOWPWR 0x1158 |
66 | #define S5P_CMU_CLKSTOP_GPS_LOWPWR S5P_PMUREG(0x115C) | 62 | #define S5P_CMU_CLKSTOP_GPS_LOWPWR 0x115C |
67 | #define S5P_CMU_RESET_CAM_LOWPWR S5P_PMUREG(0x1160) | 63 | #define S5P_CMU_RESET_CAM_LOWPWR 0x1160 |
68 | #define S5P_CMU_RESET_TV_LOWPWR S5P_PMUREG(0x1164) | 64 | #define S5P_CMU_RESET_TV_LOWPWR 0x1164 |
69 | #define S5P_CMU_RESET_MFC_LOWPWR S5P_PMUREG(0x1168) | 65 | #define S5P_CMU_RESET_MFC_LOWPWR 0x1168 |
70 | #define S5P_CMU_RESET_G3D_LOWPWR S5P_PMUREG(0x116C) | 66 | #define S5P_CMU_RESET_G3D_LOWPWR 0x116C |
71 | #define S5P_CMU_RESET_LCD0_LOWPWR S5P_PMUREG(0x1170) | 67 | #define S5P_CMU_RESET_LCD0_LOWPWR 0x1170 |
72 | #define S5P_CMU_RESET_MAUDIO_LOWPWR S5P_PMUREG(0x1178) | 68 | #define S5P_CMU_RESET_MAUDIO_LOWPWR 0x1178 |
73 | #define S5P_CMU_RESET_GPS_LOWPWR S5P_PMUREG(0x117C) | 69 | #define S5P_CMU_RESET_GPS_LOWPWR 0x117C |
74 | #define S5P_TOP_BUS_LOWPWR S5P_PMUREG(0x1180) | 70 | #define S5P_TOP_BUS_LOWPWR 0x1180 |
75 | #define S5P_TOP_RETENTION_LOWPWR S5P_PMUREG(0x1184) | 71 | #define S5P_TOP_RETENTION_LOWPWR 0x1184 |
76 | #define S5P_TOP_PWR_LOWPWR S5P_PMUREG(0x1188) | 72 | #define S5P_TOP_PWR_LOWPWR 0x1188 |
77 | #define S5P_LOGIC_RESET_LOWPWR S5P_PMUREG(0x11A0) | 73 | #define S5P_LOGIC_RESET_LOWPWR 0x11A0 |
78 | #define S5P_ONENAND_MEM_LOWPWR S5P_PMUREG(0x11C0) | 74 | #define S5P_ONENAND_MEM_LOWPWR 0x11C0 |
79 | #define S5P_G2D_ACP_MEM_LOWPWR S5P_PMUREG(0x11C8) | 75 | #define S5P_G2D_ACP_MEM_LOWPWR 0x11C8 |
80 | #define S5P_USBOTG_MEM_LOWPWR S5P_PMUREG(0x11CC) | 76 | #define S5P_USBOTG_MEM_LOWPWR 0x11CC |
81 | #define S5P_HSMMC_MEM_LOWPWR S5P_PMUREG(0x11D0) | 77 | #define S5P_HSMMC_MEM_LOWPWR 0x11D0 |
82 | #define S5P_CSSYS_MEM_LOWPWR S5P_PMUREG(0x11D4) | 78 | #define S5P_CSSYS_MEM_LOWPWR 0x11D4 |
83 | #define S5P_SECSS_MEM_LOWPWR S5P_PMUREG(0x11D8) | 79 | #define S5P_SECSS_MEM_LOWPWR 0x11D8 |
84 | #define S5P_PAD_RETENTION_DRAM_LOWPWR S5P_PMUREG(0x1200) | 80 | #define S5P_PAD_RETENTION_DRAM_LOWPWR 0x1200 |
85 | #define S5P_PAD_RETENTION_MAUDIO_LOWPWR S5P_PMUREG(0x1204) | 81 | #define S5P_PAD_RETENTION_MAUDIO_LOWPWR 0x1204 |
86 | #define S5P_PAD_RETENTION_GPIO_LOWPWR S5P_PMUREG(0x1220) | 82 | #define S5P_PAD_RETENTION_GPIO_LOWPWR 0x1220 |
87 | #define S5P_PAD_RETENTION_UART_LOWPWR S5P_PMUREG(0x1224) | 83 | #define S5P_PAD_RETENTION_UART_LOWPWR 0x1224 |
88 | #define S5P_PAD_RETENTION_MMCA_LOWPWR S5P_PMUREG(0x1228) | 84 | #define S5P_PAD_RETENTION_MMCA_LOWPWR 0x1228 |
89 | #define S5P_PAD_RETENTION_MMCB_LOWPWR S5P_PMUREG(0x122C) | 85 | #define S5P_PAD_RETENTION_MMCB_LOWPWR 0x122C |
90 | #define S5P_PAD_RETENTION_EBIA_LOWPWR S5P_PMUREG(0x1230) | 86 | #define S5P_PAD_RETENTION_EBIA_LOWPWR 0x1230 |
91 | #define S5P_PAD_RETENTION_EBIB_LOWPWR S5P_PMUREG(0x1234) | 87 | #define S5P_PAD_RETENTION_EBIB_LOWPWR 0x1234 |
92 | #define S5P_PAD_RETENTION_ISOLATION_LOWPWR S5P_PMUREG(0x1240) | 88 | #define S5P_PAD_RETENTION_ISOLATION_LOWPWR 0x1240 |
93 | #define S5P_PAD_RETENTION_ALV_SEL_LOWPWR S5P_PMUREG(0x1260) | 89 | #define S5P_PAD_RETENTION_ALV_SEL_LOWPWR 0x1260 |
94 | #define S5P_XUSBXTI_LOWPWR S5P_PMUREG(0x1280) | 90 | #define S5P_XUSBXTI_LOWPWR 0x1280 |
95 | #define S5P_XXTI_LOWPWR S5P_PMUREG(0x1284) | 91 | #define S5P_XXTI_LOWPWR 0x1284 |
96 | #define S5P_EXT_REGULATOR_LOWPWR S5P_PMUREG(0x12C0) | 92 | #define S5P_EXT_REGULATOR_LOWPWR 0x12C0 |
97 | #define S5P_GPIO_MODE_LOWPWR S5P_PMUREG(0x1300) | 93 | #define S5P_GPIO_MODE_LOWPWR 0x1300 |
98 | #define S5P_GPIO_MODE_MAUDIO_LOWPWR S5P_PMUREG(0x1340) | 94 | #define S5P_GPIO_MODE_MAUDIO_LOWPWR 0x1340 |
99 | #define S5P_CAM_LOWPWR S5P_PMUREG(0x1380) | 95 | #define S5P_CAM_LOWPWR 0x1380 |
100 | #define S5P_TV_LOWPWR S5P_PMUREG(0x1384) | 96 | #define S5P_TV_LOWPWR 0x1384 |
101 | #define S5P_MFC_LOWPWR S5P_PMUREG(0x1388) | 97 | #define S5P_MFC_LOWPWR 0x1388 |
102 | #define S5P_G3D_LOWPWR S5P_PMUREG(0x138C) | 98 | #define S5P_G3D_LOWPWR 0x138C |
103 | #define S5P_LCD0_LOWPWR S5P_PMUREG(0x1390) | 99 | #define S5P_LCD0_LOWPWR 0x1390 |
104 | #define S5P_MAUDIO_LOWPWR S5P_PMUREG(0x1398) | 100 | #define S5P_MAUDIO_LOWPWR 0x1398 |
105 | #define S5P_GPS_LOWPWR S5P_PMUREG(0x139C) | 101 | #define S5P_GPS_LOWPWR 0x139C |
106 | #define S5P_GPS_ALIVE_LOWPWR S5P_PMUREG(0x13A0) | 102 | #define S5P_GPS_ALIVE_LOWPWR 0x13A0 |
107 | 103 | ||
108 | #define EXYNOS_ARM_CORE0_CONFIGURATION S5P_PMUREG(0x2000) | 104 | #define EXYNOS_ARM_CORE0_CONFIGURATION 0x2000 |
109 | #define EXYNOS_ARM_CORE_CONFIGURATION(_nr) \ | 105 | #define EXYNOS_ARM_CORE_CONFIGURATION(_nr) \ |
110 | (EXYNOS_ARM_CORE0_CONFIGURATION + (0x80 * (_nr))) | 106 | (EXYNOS_ARM_CORE0_CONFIGURATION + (0x80 * (_nr))) |
111 | #define EXYNOS_ARM_CORE_STATUS(_nr) \ | 107 | #define EXYNOS_ARM_CORE_STATUS(_nr) \ |
112 | (EXYNOS_ARM_CORE_CONFIGURATION(_nr) + 0x4) | 108 | (EXYNOS_ARM_CORE_CONFIGURATION(_nr) + 0x4) |
113 | 109 | ||
114 | #define EXYNOS_ARM_COMMON_CONFIGURATION S5P_PMUREG(0x2500) | 110 | #define EXYNOS_ARM_COMMON_CONFIGURATION 0x2500 |
115 | #define EXYNOS_COMMON_CONFIGURATION(_nr) \ | 111 | #define EXYNOS_COMMON_CONFIGURATION(_nr) \ |
116 | (EXYNOS_ARM_COMMON_CONFIGURATION + (0x80 * (_nr))) | 112 | (EXYNOS_ARM_COMMON_CONFIGURATION + (0x80 * (_nr))) |
117 | #define EXYNOS_COMMON_STATUS(_nr) \ | 113 | #define EXYNOS_COMMON_STATUS(_nr) \ |
118 | (EXYNOS_COMMON_CONFIGURATION(_nr) + 0x4) | 114 | (EXYNOS_COMMON_CONFIGURATION(_nr) + 0x4) |
115 | #define EXYNOS_COMMON_OPTION(_nr) \ | ||
116 | (EXYNOS_COMMON_CONFIGURATION(_nr) + 0x8) | ||
119 | 117 | ||
120 | #define S5P_PAD_RET_MAUDIO_OPTION S5P_PMUREG(0x3028) | 118 | #define S5P_PAD_RET_MAUDIO_OPTION 0x3028 |
121 | #define S5P_PAD_RET_GPIO_OPTION S5P_PMUREG(0x3108) | 119 | #define S5P_PAD_RET_GPIO_OPTION 0x3108 |
122 | #define S5P_PAD_RET_UART_OPTION S5P_PMUREG(0x3128) | 120 | #define S5P_PAD_RET_UART_OPTION 0x3128 |
123 | #define S5P_PAD_RET_MMCA_OPTION S5P_PMUREG(0x3148) | 121 | #define S5P_PAD_RET_MMCA_OPTION 0x3148 |
124 | #define S5P_PAD_RET_MMCB_OPTION S5P_PMUREG(0x3168) | 122 | #define S5P_PAD_RET_MMCB_OPTION 0x3168 |
125 | #define S5P_PAD_RET_EBIA_OPTION S5P_PMUREG(0x3188) | 123 | #define S5P_PAD_RET_EBIA_OPTION 0x3188 |
126 | #define S5P_PAD_RET_EBIB_OPTION S5P_PMUREG(0x31A8) | 124 | #define S5P_PAD_RET_EBIB_OPTION 0x31A8 |
127 | 125 | ||
128 | #define S5P_CORE_LOCAL_PWR_EN 0x3 | 126 | #define S5P_CORE_LOCAL_PWR_EN 0x3 |
129 | 127 | ||
130 | /* Only for EXYNOS4210 */ | 128 | /* Only for EXYNOS4210 */ |
131 | #define S5P_CMU_CLKSTOP_LCD1_LOWPWR S5P_PMUREG(0x1154) | 129 | #define S5P_CMU_CLKSTOP_LCD1_LOWPWR 0x1154 |
132 | #define S5P_CMU_RESET_LCD1_LOWPWR S5P_PMUREG(0x1174) | 130 | #define S5P_CMU_RESET_LCD1_LOWPWR 0x1174 |
133 | #define S5P_MODIMIF_MEM_LOWPWR S5P_PMUREG(0x11C4) | 131 | #define S5P_MODIMIF_MEM_LOWPWR 0x11C4 |
134 | #define S5P_PCIE_MEM_LOWPWR S5P_PMUREG(0x11E0) | 132 | #define S5P_PCIE_MEM_LOWPWR 0x11E0 |
135 | #define S5P_SATA_MEM_LOWPWR S5P_PMUREG(0x11E4) | 133 | #define S5P_SATA_MEM_LOWPWR 0x11E4 |
136 | #define S5P_LCD1_LOWPWR S5P_PMUREG(0x1394) | 134 | #define S5P_LCD1_LOWPWR 0x1394 |
137 | 135 | ||
138 | /* Only for EXYNOS4x12 */ | 136 | /* Only for EXYNOS4x12 */ |
139 | #define S5P_ISP_ARM_LOWPWR S5P_PMUREG(0x1050) | 137 | #define S5P_ISP_ARM_LOWPWR 0x1050 |
140 | #define S5P_DIS_IRQ_ISP_ARM_LOCAL_LOWPWR S5P_PMUREG(0x1054) | 138 | #define S5P_DIS_IRQ_ISP_ARM_LOCAL_LOWPWR 0x1054 |
141 | #define S5P_DIS_IRQ_ISP_ARM_CENTRAL_LOWPWR S5P_PMUREG(0x1058) | 139 | #define S5P_DIS_IRQ_ISP_ARM_CENTRAL_LOWPWR 0x1058 |
142 | #define S5P_CMU_ACLKSTOP_COREBLK_LOWPWR S5P_PMUREG(0x1110) | 140 | #define S5P_CMU_ACLKSTOP_COREBLK_LOWPWR 0x1110 |
143 | #define S5P_CMU_SCLKSTOP_COREBLK_LOWPWR S5P_PMUREG(0x1114) | 141 | #define S5P_CMU_SCLKSTOP_COREBLK_LOWPWR 0x1114 |
144 | #define S5P_CMU_RESET_COREBLK_LOWPWR S5P_PMUREG(0x111C) | 142 | #define S5P_CMU_RESET_COREBLK_LOWPWR 0x111C |
145 | #define S5P_MPLLUSER_SYSCLK_LOWPWR S5P_PMUREG(0x1130) | 143 | #define S5P_MPLLUSER_SYSCLK_LOWPWR 0x1130 |
146 | #define S5P_CMU_CLKSTOP_ISP_LOWPWR S5P_PMUREG(0x1154) | 144 | #define S5P_CMU_CLKSTOP_ISP_LOWPWR 0x1154 |
147 | #define S5P_CMU_RESET_ISP_LOWPWR S5P_PMUREG(0x1174) | 145 | #define S5P_CMU_RESET_ISP_LOWPWR 0x1174 |
148 | #define S5P_TOP_BUS_COREBLK_LOWPWR S5P_PMUREG(0x1190) | 146 | #define S5P_TOP_BUS_COREBLK_LOWPWR 0x1190 |
149 | #define S5P_TOP_RETENTION_COREBLK_LOWPWR S5P_PMUREG(0x1194) | 147 | #define S5P_TOP_RETENTION_COREBLK_LOWPWR 0x1194 |
150 | #define S5P_TOP_PWR_COREBLK_LOWPWR S5P_PMUREG(0x1198) | 148 | #define S5P_TOP_PWR_COREBLK_LOWPWR 0x1198 |
151 | #define S5P_OSCCLK_GATE_LOWPWR S5P_PMUREG(0x11A4) | 149 | #define S5P_OSCCLK_GATE_LOWPWR 0x11A4 |
152 | #define S5P_LOGIC_RESET_COREBLK_LOWPWR S5P_PMUREG(0x11B0) | 150 | #define S5P_LOGIC_RESET_COREBLK_LOWPWR 0x11B0 |
153 | #define S5P_OSCCLK_GATE_COREBLK_LOWPWR S5P_PMUREG(0x11B4) | 151 | #define S5P_OSCCLK_GATE_COREBLK_LOWPWR 0x11B4 |
154 | #define S5P_HSI_MEM_LOWPWR S5P_PMUREG(0x11C4) | 152 | #define S5P_HSI_MEM_LOWPWR 0x11C4 |
155 | #define S5P_ROTATOR_MEM_LOWPWR S5P_PMUREG(0x11DC) | 153 | #define S5P_ROTATOR_MEM_LOWPWR 0x11DC |
156 | #define S5P_PAD_RETENTION_GPIO_COREBLK_LOWPWR S5P_PMUREG(0x123C) | 154 | #define S5P_PAD_RETENTION_GPIO_COREBLK_LOWPWR 0x123C |
157 | #define S5P_PAD_ISOLATION_COREBLK_LOWPWR S5P_PMUREG(0x1250) | 155 | #define S5P_PAD_ISOLATION_COREBLK_LOWPWR 0x1250 |
158 | #define S5P_GPIO_MODE_COREBLK_LOWPWR S5P_PMUREG(0x1320) | 156 | #define S5P_GPIO_MODE_COREBLK_LOWPWR 0x1320 |
159 | #define S5P_TOP_ASB_RESET_LOWPWR S5P_PMUREG(0x1344) | 157 | #define S5P_TOP_ASB_RESET_LOWPWR 0x1344 |
160 | #define S5P_TOP_ASB_ISOLATION_LOWPWR S5P_PMUREG(0x1348) | 158 | #define S5P_TOP_ASB_ISOLATION_LOWPWR 0x1348 |
161 | #define S5P_ISP_LOWPWR S5P_PMUREG(0x1394) | 159 | #define S5P_ISP_LOWPWR 0x1394 |
162 | #define S5P_DRAM_FREQ_DOWN_LOWPWR S5P_PMUREG(0x13B0) | 160 | #define S5P_DRAM_FREQ_DOWN_LOWPWR 0x13B0 |
163 | #define S5P_DDRPHY_DLLOFF_LOWPWR S5P_PMUREG(0x13B4) | 161 | #define S5P_DDRPHY_DLLOFF_LOWPWR 0x13B4 |
164 | #define S5P_CMU_SYSCLK_ISP_LOWPWR S5P_PMUREG(0x13B8) | 162 | #define S5P_CMU_SYSCLK_ISP_LOWPWR 0x13B8 |
165 | #define S5P_CMU_SYSCLK_GPS_LOWPWR S5P_PMUREG(0x13BC) | 163 | #define S5P_CMU_SYSCLK_GPS_LOWPWR 0x13BC |
166 | #define S5P_LPDDR_PHY_DLL_LOCK_LOWPWR S5P_PMUREG(0x13C0) | 164 | #define S5P_LPDDR_PHY_DLL_LOCK_LOWPWR 0x13C0 |
167 | 165 | ||
168 | #define S5P_ARM_L2_0_OPTION S5P_PMUREG(0x2608) | 166 | #define S5P_ARM_L2_0_OPTION 0x2608 |
169 | #define S5P_ARM_L2_1_OPTION S5P_PMUREG(0x2628) | 167 | #define S5P_ARM_L2_1_OPTION 0x2628 |
170 | #define S5P_ONENAND_MEM_OPTION S5P_PMUREG(0x2E08) | 168 | #define S5P_ONENAND_MEM_OPTION 0x2E08 |
171 | #define S5P_HSI_MEM_OPTION S5P_PMUREG(0x2E28) | 169 | #define S5P_HSI_MEM_OPTION 0x2E28 |
172 | #define S5P_G2D_ACP_MEM_OPTION S5P_PMUREG(0x2E48) | 170 | #define S5P_G2D_ACP_MEM_OPTION 0x2E48 |
173 | #define S5P_USBOTG_MEM_OPTION S5P_PMUREG(0x2E68) | 171 | #define S5P_USBOTG_MEM_OPTION 0x2E68 |
174 | #define S5P_HSMMC_MEM_OPTION S5P_PMUREG(0x2E88) | 172 | #define S5P_HSMMC_MEM_OPTION 0x2E88 |
175 | #define S5P_CSSYS_MEM_OPTION S5P_PMUREG(0x2EA8) | 173 | #define S5P_CSSYS_MEM_OPTION 0x2EA8 |
176 | #define S5P_SECSS_MEM_OPTION S5P_PMUREG(0x2EC8) | 174 | #define S5P_SECSS_MEM_OPTION 0x2EC8 |
177 | #define S5P_ROTATOR_MEM_OPTION S5P_PMUREG(0x2F48) | 175 | #define S5P_ROTATOR_MEM_OPTION 0x2F48 |
178 | 176 | ||
179 | /* Only for EXYNOS4412 */ | 177 | /* Only for EXYNOS4412 */ |
180 | #define S5P_ARM_CORE2_LOWPWR S5P_PMUREG(0x1020) | 178 | #define S5P_ARM_CORE2_LOWPWR 0x1020 |
181 | #define S5P_DIS_IRQ_CORE2 S5P_PMUREG(0x1024) | 179 | #define S5P_DIS_IRQ_CORE2 0x1024 |
182 | #define S5P_DIS_IRQ_CENTRAL2 S5P_PMUREG(0x1028) | 180 | #define S5P_DIS_IRQ_CENTRAL2 0x1028 |
183 | #define S5P_ARM_CORE3_LOWPWR S5P_PMUREG(0x1030) | 181 | #define S5P_ARM_CORE3_LOWPWR 0x1030 |
184 | #define S5P_DIS_IRQ_CORE3 S5P_PMUREG(0x1034) | 182 | #define S5P_DIS_IRQ_CORE3 0x1034 |
185 | #define S5P_DIS_IRQ_CENTRAL3 S5P_PMUREG(0x1038) | 183 | #define S5P_DIS_IRQ_CENTRAL3 0x1038 |
186 | 184 | ||
187 | /* For EXYNOS5 */ | 185 | /* For EXYNOS5 */ |
188 | 186 | ||
189 | #define EXYNOS5_AUTO_WDTRESET_DISABLE S5P_PMUREG(0x0408) | 187 | #define EXYNOS5_AUTO_WDTRESET_DISABLE 0x0408 |
190 | #define EXYNOS5_MASK_WDTRESET_REQUEST S5P_PMUREG(0x040C) | 188 | #define EXYNOS5_MASK_WDTRESET_REQUEST 0x040C |
191 | 189 | ||
192 | #define EXYNOS5_SYS_WDTRESET (1 << 20) | 190 | #define EXYNOS5_SYS_WDTRESET (1 << 20) |
193 | 191 | ||
194 | #define EXYNOS5_ARM_CORE0_SYS_PWR_REG S5P_PMUREG(0x1000) | 192 | #define EXYNOS5_ARM_CORE0_SYS_PWR_REG 0x1000 |
195 | #define EXYNOS5_DIS_IRQ_ARM_CORE0_LOCAL_SYS_PWR_REG S5P_PMUREG(0x1004) | 193 | #define EXYNOS5_DIS_IRQ_ARM_CORE0_LOCAL_SYS_PWR_REG 0x1004 |
196 | #define EXYNOS5_DIS_IRQ_ARM_CORE0_CENTRAL_SYS_PWR_REG S5P_PMUREG(0x1008) | 194 | #define EXYNOS5_DIS_IRQ_ARM_CORE0_CENTRAL_SYS_PWR_REG 0x1008 |
197 | #define EXYNOS5_ARM_CORE1_SYS_PWR_REG S5P_PMUREG(0x1010) | 195 | #define EXYNOS5_ARM_CORE1_SYS_PWR_REG 0x1010 |
198 | #define EXYNOS5_DIS_IRQ_ARM_CORE1_LOCAL_SYS_PWR_REG S5P_PMUREG(0x1014) | 196 | #define EXYNOS5_DIS_IRQ_ARM_CORE1_LOCAL_SYS_PWR_REG 0x1014 |
199 | #define EXYNOS5_DIS_IRQ_ARM_CORE1_CENTRAL_SYS_PWR_REG S5P_PMUREG(0x1018) | 197 | #define EXYNOS5_DIS_IRQ_ARM_CORE1_CENTRAL_SYS_PWR_REG 0x1018 |
200 | #define EXYNOS5_FSYS_ARM_SYS_PWR_REG S5P_PMUREG(0x1040) | 198 | #define EXYNOS5_FSYS_ARM_SYS_PWR_REG 0x1040 |
201 | #define EXYNOS5_DIS_IRQ_FSYS_ARM_CENTRAL_SYS_PWR_REG S5P_PMUREG(0x1048) | 199 | #define EXYNOS5_DIS_IRQ_FSYS_ARM_CENTRAL_SYS_PWR_REG 0x1048 |
202 | #define EXYNOS5_ISP_ARM_SYS_PWR_REG S5P_PMUREG(0x1050) | 200 | #define EXYNOS5_ISP_ARM_SYS_PWR_REG 0x1050 |
203 | #define EXYNOS5_DIS_IRQ_ISP_ARM_LOCAL_SYS_PWR_REG S5P_PMUREG(0x1054) | 201 | #define EXYNOS5_DIS_IRQ_ISP_ARM_LOCAL_SYS_PWR_REG 0x1054 |
204 | #define EXYNOS5_DIS_IRQ_ISP_ARM_CENTRAL_SYS_PWR_REG S5P_PMUREG(0x1058) | 202 | #define EXYNOS5_DIS_IRQ_ISP_ARM_CENTRAL_SYS_PWR_REG 0x1058 |
205 | #define EXYNOS5_ARM_COMMON_SYS_PWR_REG S5P_PMUREG(0x1080) | 203 | #define EXYNOS5_ARM_COMMON_SYS_PWR_REG 0x1080 |
206 | #define EXYNOS5_ARM_L2_SYS_PWR_REG S5P_PMUREG(0x10C0) | 204 | #define EXYNOS5_ARM_L2_SYS_PWR_REG 0x10C0 |
207 | #define EXYNOS5_CMU_ACLKSTOP_SYS_PWR_REG S5P_PMUREG(0x1100) | 205 | #define EXYNOS5_CMU_ACLKSTOP_SYS_PWR_REG 0x1100 |
208 | #define EXYNOS5_CMU_SCLKSTOP_SYS_PWR_REG S5P_PMUREG(0x1104) | 206 | #define EXYNOS5_CMU_SCLKSTOP_SYS_PWR_REG 0x1104 |
209 | #define EXYNOS5_CMU_RESET_SYS_PWR_REG S5P_PMUREG(0x110C) | 207 | #define EXYNOS5_CMU_RESET_SYS_PWR_REG 0x110C |
210 | #define EXYNOS5_CMU_ACLKSTOP_SYSMEM_SYS_PWR_REG S5P_PMUREG(0x1120) | 208 | #define EXYNOS5_CMU_ACLKSTOP_SYSMEM_SYS_PWR_REG 0x1120 |
211 | #define EXYNOS5_CMU_SCLKSTOP_SYSMEM_SYS_PWR_REG S5P_PMUREG(0x1124) | 209 | #define EXYNOS5_CMU_SCLKSTOP_SYSMEM_SYS_PWR_REG 0x1124 |
212 | #define EXYNOS5_CMU_RESET_SYSMEM_SYS_PWR_REG S5P_PMUREG(0x112C) | 210 | #define EXYNOS5_CMU_RESET_SYSMEM_SYS_PWR_REG 0x112C |
213 | #define EXYNOS5_DRAM_FREQ_DOWN_SYS_PWR_REG S5P_PMUREG(0x1130) | 211 | #define EXYNOS5_DRAM_FREQ_DOWN_SYS_PWR_REG 0x1130 |
214 | #define EXYNOS5_DDRPHY_DLLOFF_SYS_PWR_REG S5P_PMUREG(0x1134) | 212 | #define EXYNOS5_DDRPHY_DLLOFF_SYS_PWR_REG 0x1134 |
215 | #define EXYNOS5_DDRPHY_DLLLOCK_SYS_PWR_REG S5P_PMUREG(0x1138) | 213 | #define EXYNOS5_DDRPHY_DLLLOCK_SYS_PWR_REG 0x1138 |
216 | #define EXYNOS5_APLL_SYSCLK_SYS_PWR_REG S5P_PMUREG(0x1140) | 214 | #define EXYNOS5_APLL_SYSCLK_SYS_PWR_REG 0x1140 |
217 | #define EXYNOS5_MPLL_SYSCLK_SYS_PWR_REG S5P_PMUREG(0x1144) | 215 | #define EXYNOS5_MPLL_SYSCLK_SYS_PWR_REG 0x1144 |
218 | #define EXYNOS5_VPLL_SYSCLK_SYS_PWR_REG S5P_PMUREG(0x1148) | 216 | #define EXYNOS5_VPLL_SYSCLK_SYS_PWR_REG 0x1148 |
219 | #define EXYNOS5_EPLL_SYSCLK_SYS_PWR_REG S5P_PMUREG(0x114C) | 217 | #define EXYNOS5_EPLL_SYSCLK_SYS_PWR_REG 0x114C |
220 | #define EXYNOS5_BPLL_SYSCLK_SYS_PWR_REG S5P_PMUREG(0x1150) | 218 | #define EXYNOS5_BPLL_SYSCLK_SYS_PWR_REG 0x1150 |
221 | #define EXYNOS5_CPLL_SYSCLK_SYS_PWR_REG S5P_PMUREG(0x1154) | 219 | #define EXYNOS5_CPLL_SYSCLK_SYS_PWR_REG 0x1154 |
222 | #define EXYNOS5_MPLLUSER_SYSCLK_SYS_PWR_REG S5P_PMUREG(0x1164) | 220 | #define EXYNOS5_MPLLUSER_SYSCLK_SYS_PWR_REG 0x1164 |
223 | #define EXYNOS5_BPLLUSER_SYSCLK_SYS_PWR_REG S5P_PMUREG(0x1170) | 221 | #define EXYNOS5_BPLLUSER_SYSCLK_SYS_PWR_REG 0x1170 |
224 | #define EXYNOS5_TOP_BUS_SYS_PWR_REG S5P_PMUREG(0x1180) | 222 | #define EXYNOS5_TOP_BUS_SYS_PWR_REG 0x1180 |
225 | #define EXYNOS5_TOP_RETENTION_SYS_PWR_REG S5P_PMUREG(0x1184) | 223 | #define EXYNOS5_TOP_RETENTION_SYS_PWR_REG 0x1184 |
226 | #define EXYNOS5_TOP_PWR_SYS_PWR_REG S5P_PMUREG(0x1188) | 224 | #define EXYNOS5_TOP_PWR_SYS_PWR_REG 0x1188 |
227 | #define EXYNOS5_TOP_BUS_SYSMEM_SYS_PWR_REG S5P_PMUREG(0x1190) | 225 | #define EXYNOS5_TOP_BUS_SYSMEM_SYS_PWR_REG 0x1190 |
228 | #define EXYNOS5_TOP_RETENTION_SYSMEM_SYS_PWR_REG S5P_PMUREG(0x1194) | 226 | #define EXYNOS5_TOP_RETENTION_SYSMEM_SYS_PWR_REG 0x1194 |
229 | #define EXYNOS5_TOP_PWR_SYSMEM_SYS_PWR_REG S5P_PMUREG(0x1198) | 227 | #define EXYNOS5_TOP_PWR_SYSMEM_SYS_PWR_REG 0x1198 |
230 | #define EXYNOS5_LOGIC_RESET_SYS_PWR_REG S5P_PMUREG(0x11A0) | 228 | #define EXYNOS5_LOGIC_RESET_SYS_PWR_REG 0x11A0 |
231 | #define EXYNOS5_OSCCLK_GATE_SYS_PWR_REG S5P_PMUREG(0x11A4) | 229 | #define EXYNOS5_OSCCLK_GATE_SYS_PWR_REG 0x11A4 |
232 | #define EXYNOS5_LOGIC_RESET_SYSMEM_SYS_PWR_REG S5P_PMUREG(0x11B0) | 230 | #define EXYNOS5_LOGIC_RESET_SYSMEM_SYS_PWR_REG 0x11B0 |
233 | #define EXYNOS5_OSCCLK_GATE_SYSMEM_SYS_PWR_REG S5P_PMUREG(0x11B4) | 231 | #define EXYNOS5_OSCCLK_GATE_SYSMEM_SYS_PWR_REG 0x11B4 |
234 | #define EXYNOS5_USBOTG_MEM_SYS_PWR_REG S5P_PMUREG(0x11C0) | 232 | #define EXYNOS5_USBOTG_MEM_SYS_PWR_REG 0x11C0 |
235 | #define EXYNOS5_G2D_MEM_SYS_PWR_REG S5P_PMUREG(0x11C8) | 233 | #define EXYNOS5_G2D_MEM_SYS_PWR_REG 0x11C8 |
236 | #define EXYNOS5_USBDRD_MEM_SYS_PWR_REG S5P_PMUREG(0x11CC) | 234 | #define EXYNOS5_USBDRD_MEM_SYS_PWR_REG 0x11CC |
237 | #define EXYNOS5_SDMMC_MEM_SYS_PWR_REG S5P_PMUREG(0x11D0) | 235 | #define EXYNOS5_SDMMC_MEM_SYS_PWR_REG 0x11D0 |
238 | #define EXYNOS5_CSSYS_MEM_SYS_PWR_REG S5P_PMUREG(0x11D4) | 236 | #define EXYNOS5_CSSYS_MEM_SYS_PWR_REG 0x11D4 |
239 | #define EXYNOS5_SECSS_MEM_SYS_PWR_REG S5P_PMUREG(0x11D8) | 237 | #define EXYNOS5_SECSS_MEM_SYS_PWR_REG 0x11D8 |
240 | #define EXYNOS5_ROTATOR_MEM_SYS_PWR_REG S5P_PMUREG(0x11DC) | 238 | #define EXYNOS5_ROTATOR_MEM_SYS_PWR_REG 0x11DC |
241 | #define EXYNOS5_INTRAM_MEM_SYS_PWR_REG S5P_PMUREG(0x11E0) | 239 | #define EXYNOS5_INTRAM_MEM_SYS_PWR_REG 0x11E0 |
242 | #define EXYNOS5_INTROM_MEM_SYS_PWR_REG S5P_PMUREG(0x11E4) | 240 | #define EXYNOS5_INTROM_MEM_SYS_PWR_REG 0x11E4 |
243 | #define EXYNOS5_JPEG_MEM_SYS_PWR_REG S5P_PMUREG(0x11E8) | 241 | #define EXYNOS5_JPEG_MEM_SYS_PWR_REG 0x11E8 |
244 | #define EXYNOS5_HSI_MEM_SYS_PWR_REG S5P_PMUREG(0x11EC) | 242 | #define EXYNOS5_HSI_MEM_SYS_PWR_REG 0x11EC |
245 | #define EXYNOS5_MCUIOP_MEM_SYS_PWR_REG S5P_PMUREG(0x11F4) | 243 | #define EXYNOS5_MCUIOP_MEM_SYS_PWR_REG 0x11F4 |
246 | #define EXYNOS5_SATA_MEM_SYS_PWR_REG S5P_PMUREG(0x11FC) | 244 | #define EXYNOS5_SATA_MEM_SYS_PWR_REG 0x11FC |
247 | #define EXYNOS5_PAD_RETENTION_DRAM_SYS_PWR_REG S5P_PMUREG(0x1200) | 245 | #define EXYNOS5_PAD_RETENTION_DRAM_SYS_PWR_REG 0x1200 |
248 | #define EXYNOS5_PAD_RETENTION_MAU_SYS_PWR_REG S5P_PMUREG(0x1204) | 246 | #define EXYNOS5_PAD_RETENTION_MAU_SYS_PWR_REG 0x1204 |
249 | #define EXYNOS5_PAD_RETENTION_EFNAND_SYS_PWR_REG S5P_PMUREG(0x1208) | 247 | #define EXYNOS5_PAD_RETENTION_EFNAND_SYS_PWR_REG 0x1208 |
250 | #define EXYNOS5_PAD_RETENTION_GPIO_SYS_PWR_REG S5P_PMUREG(0x1220) | 248 | #define EXYNOS5_PAD_RETENTION_GPIO_SYS_PWR_REG 0x1220 |
251 | #define EXYNOS5_PAD_RETENTION_UART_SYS_PWR_REG S5P_PMUREG(0x1224) | 249 | #define EXYNOS5_PAD_RETENTION_UART_SYS_PWR_REG 0x1224 |
252 | #define EXYNOS5_PAD_RETENTION_MMCA_SYS_PWR_REG S5P_PMUREG(0x1228) | 250 | #define EXYNOS5_PAD_RETENTION_MMCA_SYS_PWR_REG 0x1228 |
253 | #define EXYNOS5_PAD_RETENTION_MMCB_SYS_PWR_REG S5P_PMUREG(0x122C) | 251 | #define EXYNOS5_PAD_RETENTION_MMCB_SYS_PWR_REG 0x122C |
254 | #define EXYNOS5_PAD_RETENTION_EBIA_SYS_PWR_REG S5P_PMUREG(0x1230) | 252 | #define EXYNOS5_PAD_RETENTION_EBIA_SYS_PWR_REG 0x1230 |
255 | #define EXYNOS5_PAD_RETENTION_EBIB_SYS_PWR_REG S5P_PMUREG(0x1234) | 253 | #define EXYNOS5_PAD_RETENTION_EBIB_SYS_PWR_REG 0x1234 |
256 | #define EXYNOS5_PAD_RETENTION_SPI_SYS_PWR_REG S5P_PMUREG(0x1238) | 254 | #define EXYNOS5_PAD_RETENTION_SPI_SYS_PWR_REG 0x1238 |
257 | #define EXYNOS5_PAD_RETENTION_GPIO_SYSMEM_SYS_PWR_REG S5P_PMUREG(0x123C) | 255 | #define EXYNOS5_PAD_RETENTION_GPIO_SYSMEM_SYS_PWR_REG 0x123C |
258 | #define EXYNOS5_PAD_ISOLATION_SYS_PWR_REG S5P_PMUREG(0x1240) | 256 | #define EXYNOS5_PAD_ISOLATION_SYS_PWR_REG 0x1240 |
259 | #define EXYNOS5_PAD_ISOLATION_SYSMEM_SYS_PWR_REG S5P_PMUREG(0x1250) | 257 | #define EXYNOS5_PAD_ISOLATION_SYSMEM_SYS_PWR_REG 0x1250 |
260 | #define EXYNOS5_PAD_ALV_SEL_SYS_PWR_REG S5P_PMUREG(0x1260) | 258 | #define EXYNOS5_PAD_ALV_SEL_SYS_PWR_REG 0x1260 |
261 | #define EXYNOS5_XUSBXTI_SYS_PWR_REG S5P_PMUREG(0x1280) | 259 | #define EXYNOS5_XUSBXTI_SYS_PWR_REG 0x1280 |
262 | #define EXYNOS5_XXTI_SYS_PWR_REG S5P_PMUREG(0x1284) | 260 | #define EXYNOS5_XXTI_SYS_PWR_REG 0x1284 |
263 | #define EXYNOS5_EXT_REGULATOR_SYS_PWR_REG S5P_PMUREG(0x12C0) | 261 | #define EXYNOS5_EXT_REGULATOR_SYS_PWR_REG 0x12C0 |
264 | #define EXYNOS5_GPIO_MODE_SYS_PWR_REG S5P_PMUREG(0x1300) | 262 | #define EXYNOS5_GPIO_MODE_SYS_PWR_REG 0x1300 |
265 | #define EXYNOS5_GPIO_MODE_SYSMEM_SYS_PWR_REG S5P_PMUREG(0x1320) | 263 | #define EXYNOS5_GPIO_MODE_SYSMEM_SYS_PWR_REG 0x1320 |
266 | #define EXYNOS5_GPIO_MODE_MAU_SYS_PWR_REG S5P_PMUREG(0x1340) | 264 | #define EXYNOS5_GPIO_MODE_MAU_SYS_PWR_REG 0x1340 |
267 | #define EXYNOS5_TOP_ASB_RESET_SYS_PWR_REG S5P_PMUREG(0x1344) | 265 | #define EXYNOS5_TOP_ASB_RESET_SYS_PWR_REG 0x1344 |
268 | #define EXYNOS5_TOP_ASB_ISOLATION_SYS_PWR_REG S5P_PMUREG(0x1348) | 266 | #define EXYNOS5_TOP_ASB_ISOLATION_SYS_PWR_REG 0x1348 |
269 | #define EXYNOS5_GSCL_SYS_PWR_REG S5P_PMUREG(0x1400) | 267 | #define EXYNOS5_GSCL_SYS_PWR_REG 0x1400 |
270 | #define EXYNOS5_ISP_SYS_PWR_REG S5P_PMUREG(0x1404) | 268 | #define EXYNOS5_ISP_SYS_PWR_REG 0x1404 |
271 | #define EXYNOS5_MFC_SYS_PWR_REG S5P_PMUREG(0x1408) | 269 | #define EXYNOS5_MFC_SYS_PWR_REG 0x1408 |
272 | #define EXYNOS5_G3D_SYS_PWR_REG S5P_PMUREG(0x140C) | 270 | #define EXYNOS5_G3D_SYS_PWR_REG 0x140C |
273 | #define EXYNOS5_DISP1_SYS_PWR_REG S5P_PMUREG(0x1414) | 271 | #define EXYNOS5_DISP1_SYS_PWR_REG 0x1414 |
274 | #define EXYNOS5_MAU_SYS_PWR_REG S5P_PMUREG(0x1418) | 272 | #define EXYNOS5_MAU_SYS_PWR_REG 0x1418 |
275 | #define EXYNOS5_CMU_CLKSTOP_GSCL_SYS_PWR_REG S5P_PMUREG(0x1480) | 273 | #define EXYNOS5_CMU_CLKSTOP_GSCL_SYS_PWR_REG 0x1480 |
276 | #define EXYNOS5_CMU_CLKSTOP_ISP_SYS_PWR_REG S5P_PMUREG(0x1484) | 274 | #define EXYNOS5_CMU_CLKSTOP_ISP_SYS_PWR_REG 0x1484 |
277 | #define EXYNOS5_CMU_CLKSTOP_MFC_SYS_PWR_REG S5P_PMUREG(0x1488) | 275 | #define EXYNOS5_CMU_CLKSTOP_MFC_SYS_PWR_REG 0x1488 |
278 | #define EXYNOS5_CMU_CLKSTOP_G3D_SYS_PWR_REG S5P_PMUREG(0x148C) | 276 | #define EXYNOS5_CMU_CLKSTOP_G3D_SYS_PWR_REG 0x148C |
279 | #define EXYNOS5_CMU_CLKSTOP_DISP1_SYS_PWR_REG S5P_PMUREG(0x1494) | 277 | #define EXYNOS5_CMU_CLKSTOP_DISP1_SYS_PWR_REG 0x1494 |
280 | #define EXYNOS5_CMU_CLKSTOP_MAU_SYS_PWR_REG S5P_PMUREG(0x1498) | 278 | #define EXYNOS5_CMU_CLKSTOP_MAU_SYS_PWR_REG 0x1498 |
281 | #define EXYNOS5_CMU_SYSCLK_GSCL_SYS_PWR_REG S5P_PMUREG(0x14C0) | 279 | #define EXYNOS5_CMU_SYSCLK_GSCL_SYS_PWR_REG 0x14C0 |
282 | #define EXYNOS5_CMU_SYSCLK_ISP_SYS_PWR_REG S5P_PMUREG(0x14C4) | 280 | #define EXYNOS5_CMU_SYSCLK_ISP_SYS_PWR_REG 0x14C4 |
283 | #define EXYNOS5_CMU_SYSCLK_MFC_SYS_PWR_REG S5P_PMUREG(0x14C8) | 281 | #define EXYNOS5_CMU_SYSCLK_MFC_SYS_PWR_REG 0x14C8 |
284 | #define EXYNOS5_CMU_SYSCLK_G3D_SYS_PWR_REG S5P_PMUREG(0x14CC) | 282 | #define EXYNOS5_CMU_SYSCLK_G3D_SYS_PWR_REG 0x14CC |
285 | #define EXYNOS5_CMU_SYSCLK_DISP1_SYS_PWR_REG S5P_PMUREG(0x14D4) | 283 | #define EXYNOS5_CMU_SYSCLK_DISP1_SYS_PWR_REG 0x14D4 |
286 | #define EXYNOS5_CMU_SYSCLK_MAU_SYS_PWR_REG S5P_PMUREG(0x14D8) | 284 | #define EXYNOS5_CMU_SYSCLK_MAU_SYS_PWR_REG 0x14D8 |
287 | #define EXYNOS5_CMU_RESET_GSCL_SYS_PWR_REG S5P_PMUREG(0x1580) | 285 | #define EXYNOS5_CMU_RESET_GSCL_SYS_PWR_REG 0x1580 |
288 | #define EXYNOS5_CMU_RESET_ISP_SYS_PWR_REG S5P_PMUREG(0x1584) | 286 | #define EXYNOS5_CMU_RESET_ISP_SYS_PWR_REG 0x1584 |
289 | #define EXYNOS5_CMU_RESET_MFC_SYS_PWR_REG S5P_PMUREG(0x1588) | 287 | #define EXYNOS5_CMU_RESET_MFC_SYS_PWR_REG 0x1588 |
290 | #define EXYNOS5_CMU_RESET_G3D_SYS_PWR_REG S5P_PMUREG(0x158C) | 288 | #define EXYNOS5_CMU_RESET_G3D_SYS_PWR_REG 0x158C |
291 | #define EXYNOS5_CMU_RESET_DISP1_SYS_PWR_REG S5P_PMUREG(0x1594) | 289 | #define EXYNOS5_CMU_RESET_DISP1_SYS_PWR_REG 0x1594 |
292 | #define EXYNOS5_CMU_RESET_MAU_SYS_PWR_REG S5P_PMUREG(0x1598) | 290 | #define EXYNOS5_CMU_RESET_MAU_SYS_PWR_REG 0x1598 |
293 | 291 | ||
294 | #define EXYNOS5_ARM_CORE0_OPTION S5P_PMUREG(0x2008) | 292 | #define EXYNOS5_ARM_CORE0_OPTION 0x2008 |
295 | #define EXYNOS5_ARM_CORE1_OPTION S5P_PMUREG(0x2088) | 293 | #define EXYNOS5_ARM_CORE1_OPTION 0x2088 |
296 | #define EXYNOS5_FSYS_ARM_OPTION S5P_PMUREG(0x2208) | 294 | #define EXYNOS5_FSYS_ARM_OPTION 0x2208 |
297 | #define EXYNOS5_ISP_ARM_OPTION S5P_PMUREG(0x2288) | 295 | #define EXYNOS5_ISP_ARM_OPTION 0x2288 |
298 | #define EXYNOS5_ARM_COMMON_OPTION S5P_PMUREG(0x2408) | 296 | #define EXYNOS5_ARM_COMMON_OPTION 0x2408 |
299 | #define EXYNOS5_ARM_L2_OPTION S5P_PMUREG(0x2608) | 297 | #define EXYNOS5_ARM_L2_OPTION 0x2608 |
300 | #define EXYNOS5_TOP_PWR_OPTION S5P_PMUREG(0x2C48) | 298 | #define EXYNOS5_TOP_PWR_OPTION 0x2C48 |
301 | #define EXYNOS5_TOP_PWR_SYSMEM_OPTION S5P_PMUREG(0x2CC8) | 299 | #define EXYNOS5_TOP_PWR_SYSMEM_OPTION 0x2CC8 |
302 | #define EXYNOS5_JPEG_MEM_OPTION S5P_PMUREG(0x2F48) | 300 | #define EXYNOS5_JPEG_MEM_OPTION 0x2F48 |
303 | #define EXYNOS5_GSCL_OPTION S5P_PMUREG(0x4008) | 301 | #define EXYNOS5_GSCL_OPTION 0x4008 |
304 | #define EXYNOS5_ISP_OPTION S5P_PMUREG(0x4028) | 302 | #define EXYNOS5_ISP_OPTION 0x4028 |
305 | #define EXYNOS5_MFC_OPTION S5P_PMUREG(0x4048) | 303 | #define EXYNOS5_MFC_OPTION 0x4048 |
306 | #define EXYNOS5_G3D_OPTION S5P_PMUREG(0x4068) | 304 | #define EXYNOS5_G3D_OPTION 0x4068 |
307 | #define EXYNOS5_DISP1_OPTION S5P_PMUREG(0x40A8) | 305 | #define EXYNOS5_DISP1_OPTION 0x40A8 |
308 | #define EXYNOS5_MAU_OPTION S5P_PMUREG(0x40C8) | 306 | #define EXYNOS5_MAU_OPTION 0x40C8 |
309 | 307 | ||
310 | #define EXYNOS5_USE_SC_FEEDBACK (1 << 1) | 308 | #define EXYNOS5_USE_SC_FEEDBACK (1 << 1) |
311 | #define EXYNOS5_USE_SC_COUNTER (1 << 0) | 309 | #define EXYNOS5_USE_SC_COUNTER (1 << 0) |
@@ -319,4 +317,13 @@ | |||
319 | 317 | ||
320 | #define EXYNOS5420_SWRESET_KFC_SEL 0x3 | 318 | #define EXYNOS5420_SWRESET_KFC_SEL 0x3 |
321 | 319 | ||
320 | #include <asm/cputype.h> | ||
321 | #define MAX_CPUS_IN_CLUSTER 4 | ||
322 | |||
323 | static inline unsigned int exynos_pmu_cpunr(unsigned int mpidr) | ||
324 | { | ||
325 | return ((MPIDR_AFFINITY_LEVEL(mpidr, 1) * MAX_CPUS_IN_CLUSTER) | ||
326 | + MPIDR_AFFINITY_LEVEL(mpidr, 0)); | ||
327 | } | ||
328 | |||
322 | #endif /* __ASM_ARCH_REGS_PMU_H */ | 329 | #endif /* __ASM_ARCH_REGS_PMU_H */ |
diff --git a/arch/arm/mach-hisi/Kconfig b/arch/arm/mach-hisi/Kconfig index feee4dbb0760..984882943f77 100644 --- a/arch/arm/mach-hisi/Kconfig +++ b/arch/arm/mach-hisi/Kconfig | |||
@@ -1,12 +1,36 @@ | |||
1 | config ARCH_HI3xxx | 1 | config ARCH_HISI |
2 | bool "Hisilicon Hi36xx/Hi37xx family" if ARCH_MULTI_V7 | 2 | bool "Hisilicon SoC Support" |
3 | depends on ARCH_MULTIPLATFORM | ||
3 | select ARM_AMBA | 4 | select ARM_AMBA |
4 | select ARM_GIC | 5 | select ARM_GIC |
5 | select ARM_TIMER_SP804 | 6 | select ARM_TIMER_SP804 |
7 | select POWER_RESET | ||
8 | select POWER_RESET_HISI | ||
9 | select POWER_SUPPLY | ||
10 | |||
11 | if ARCH_HISI | ||
12 | |||
13 | menu "Hisilicon platform type" | ||
14 | |||
15 | config ARCH_HI3xxx | ||
16 | bool "Hisilicon Hi36xx family" if ARCH_MULTI_V7 | ||
17 | select CACHE_L2X0 | ||
18 | select HAVE_ARM_SCU if SMP | ||
19 | select HAVE_ARM_TWD if SMP | ||
20 | select PINCTRL | ||
21 | select PINCTRL_SINGLE | ||
22 | help | ||
23 | Support for Hisilicon Hi36xx SoC family | ||
24 | |||
25 | config ARCH_HIX5HD2 | ||
26 | bool "Hisilicon X5HD2 family" if ARCH_MULTI_V7 | ||
6 | select CACHE_L2X0 | 27 | select CACHE_L2X0 |
7 | select HAVE_ARM_SCU if SMP | 28 | select HAVE_ARM_SCU if SMP |
8 | select HAVE_ARM_TWD if SMP | 29 | select HAVE_ARM_TWD if SMP |
9 | select PINCTRL | 30 | select PINCTRL |
10 | select PINCTRL_SINGLE | 31 | select PINCTRL_SINGLE |
11 | help | 32 | help |
12 | Support for Hisilicon Hi36xx/Hi37xx processor family | 33 | Support for Hisilicon HIX5HD2 SoC family |
34 | endmenu | ||
35 | |||
36 | endif | ||
diff --git a/arch/arm/mach-hisi/Makefile b/arch/arm/mach-hisi/Makefile index 2ae1b59267c2..ee2506b9cde3 100644 --- a/arch/arm/mach-hisi/Makefile +++ b/arch/arm/mach-hisi/Makefile | |||
@@ -3,4 +3,4 @@ | |||
3 | # | 3 | # |
4 | 4 | ||
5 | obj-y += hisilicon.o | 5 | obj-y += hisilicon.o |
6 | obj-$(CONFIG_SMP) += platsmp.o hotplug.o | 6 | obj-$(CONFIG_SMP) += platsmp.o hotplug.o headsmp.o |
diff --git a/arch/arm/mach-hisi/core.h b/arch/arm/mach-hisi/core.h index af23ec204538..88b1f487d065 100644 --- a/arch/arm/mach-hisi/core.h +++ b/arch/arm/mach-hisi/core.h | |||
@@ -12,4 +12,9 @@ extern void hi3xxx_cpu_die(unsigned int cpu); | |||
12 | extern int hi3xxx_cpu_kill(unsigned int cpu); | 12 | extern int hi3xxx_cpu_kill(unsigned int cpu); |
13 | extern void hi3xxx_set_cpu(int cpu, bool enable); | 13 | extern void hi3xxx_set_cpu(int cpu, bool enable); |
14 | 14 | ||
15 | extern void hix5hd2_secondary_startup(void); | ||
16 | extern struct smp_operations hix5hd2_smp_ops; | ||
17 | extern void hix5hd2_set_cpu(int cpu, bool enable); | ||
18 | extern void hix5hd2_cpu_die(unsigned int cpu); | ||
19 | |||
15 | #endif | 20 | #endif |
diff --git a/arch/arm/mach-hisi/headsmp.S b/arch/arm/mach-hisi/headsmp.S new file mode 100644 index 000000000000..278889c00b77 --- /dev/null +++ b/arch/arm/mach-hisi/headsmp.S | |||
@@ -0,0 +1,16 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2014 Hisilicon Limited. | ||
3 | * Copyright (c) 2014 Linaro Ltd. | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License version 2 as | ||
7 | * published by the Free Software Foundation. | ||
8 | */ | ||
9 | #include <linux/linkage.h> | ||
10 | #include <linux/init.h> | ||
11 | |||
12 | __CPUINIT | ||
13 | |||
14 | ENTRY(hix5hd2_secondary_startup) | ||
15 | bl v7_invalidate_l1 | ||
16 | b secondary_startup | ||
diff --git a/arch/arm/mach-hisi/hisilicon.c b/arch/arm/mach-hisi/hisilicon.c index 741faf3e7100..7cda6dda3cd0 100644 --- a/arch/arm/mach-hisi/hisilicon.c +++ b/arch/arm/mach-hisi/hisilicon.c | |||
@@ -14,16 +14,10 @@ | |||
14 | #include <linux/clk-provider.h> | 14 | #include <linux/clk-provider.h> |
15 | #include <linux/clocksource.h> | 15 | #include <linux/clocksource.h> |
16 | #include <linux/irqchip.h> | 16 | #include <linux/irqchip.h> |
17 | #include <linux/of_address.h> | ||
18 | #include <linux/of_platform.h> | ||
19 | |||
20 | #include <asm/proc-fns.h> | ||
21 | 17 | ||
22 | #include <asm/mach/arch.h> | 18 | #include <asm/mach/arch.h> |
23 | #include <asm/mach/map.h> | 19 | #include <asm/mach/map.h> |
24 | 20 | ||
25 | #include "core.h" | ||
26 | |||
27 | #define HI3620_SYSCTRL_PHYS_BASE 0xfc802000 | 21 | #define HI3620_SYSCTRL_PHYS_BASE 0xfc802000 |
28 | #define HI3620_SYSCTRL_VIRT_BASE 0xfe802000 | 22 | #define HI3620_SYSCTRL_VIRT_BASE 0xfe802000 |
29 | 23 | ||
@@ -51,32 +45,6 @@ static void __init hi3620_map_io(void) | |||
51 | iotable_init(hi3620_io_desc, ARRAY_SIZE(hi3620_io_desc)); | 45 | iotable_init(hi3620_io_desc, ARRAY_SIZE(hi3620_io_desc)); |
52 | } | 46 | } |
53 | 47 | ||
54 | static void hi3xxx_restart(enum reboot_mode mode, const char *cmd) | ||
55 | { | ||
56 | struct device_node *np; | ||
57 | void __iomem *base; | ||
58 | int offset; | ||
59 | |||
60 | np = of_find_compatible_node(NULL, NULL, "hisilicon,sysctrl"); | ||
61 | if (!np) { | ||
62 | pr_err("failed to find hisilicon,sysctrl node\n"); | ||
63 | return; | ||
64 | } | ||
65 | base = of_iomap(np, 0); | ||
66 | if (!base) { | ||
67 | pr_err("failed to map address in hisilicon,sysctrl node\n"); | ||
68 | return; | ||
69 | } | ||
70 | if (of_property_read_u32(np, "reboot-offset", &offset) < 0) { | ||
71 | pr_err("failed to find reboot-offset property\n"); | ||
72 | return; | ||
73 | } | ||
74 | writel_relaxed(0xdeadbeef, base + offset); | ||
75 | |||
76 | while (1) | ||
77 | cpu_do_idle(); | ||
78 | } | ||
79 | |||
80 | static const char *hi3xxx_compat[] __initconst = { | 48 | static const char *hi3xxx_compat[] __initconst = { |
81 | "hisilicon,hi3620-hi4511", | 49 | "hisilicon,hi3620-hi4511", |
82 | NULL, | 50 | NULL, |
@@ -85,6 +53,13 @@ static const char *hi3xxx_compat[] __initconst = { | |||
85 | DT_MACHINE_START(HI3620, "Hisilicon Hi3620 (Flattened Device Tree)") | 53 | DT_MACHINE_START(HI3620, "Hisilicon Hi3620 (Flattened Device Tree)") |
86 | .map_io = hi3620_map_io, | 54 | .map_io = hi3620_map_io, |
87 | .dt_compat = hi3xxx_compat, | 55 | .dt_compat = hi3xxx_compat, |
88 | .smp = smp_ops(hi3xxx_smp_ops), | 56 | MACHINE_END |
89 | .restart = hi3xxx_restart, | 57 | |
58 | static const char *hix5hd2_compat[] __initconst = { | ||
59 | "hisilicon,hix5hd2", | ||
60 | NULL, | ||
61 | }; | ||
62 | |||
63 | DT_MACHINE_START(HIX5HD2_DT, "Hisilicon HIX5HD2 (Flattened Device Tree)") | ||
64 | .dt_compat = hix5hd2_compat, | ||
90 | MACHINE_END | 65 | MACHINE_END |
diff --git a/arch/arm/mach-hisi/hotplug.c b/arch/arm/mach-hisi/hotplug.c index abd441b0c604..84e6919f68c7 100644 --- a/arch/arm/mach-hisi/hotplug.c +++ b/arch/arm/mach-hisi/hotplug.c | |||
@@ -57,6 +57,14 @@ | |||
57 | #define CPU0_NEON_SRST_REQ_EN (1 << 4) | 57 | #define CPU0_NEON_SRST_REQ_EN (1 << 4) |
58 | #define CPU0_SRST_REQ_EN (1 << 0) | 58 | #define CPU0_SRST_REQ_EN (1 << 0) |
59 | 59 | ||
60 | #define HIX5HD2_PERI_CRG20 0x50 | ||
61 | #define CRG20_CPU1_RESET (1 << 17) | ||
62 | |||
63 | #define HIX5HD2_PERI_PMC0 0x1000 | ||
64 | #define PMC0_CPU1_WAIT_MTCOMS_ACK (1 << 8) | ||
65 | #define PMC0_CPU1_PMC_ENABLE (1 << 7) | ||
66 | #define PMC0_CPU1_POWERDOWN (1 << 3) | ||
67 | |||
60 | enum { | 68 | enum { |
61 | HI3620_CTRL, | 69 | HI3620_CTRL, |
62 | ERROR_CTRL, | 70 | ERROR_CTRL, |
@@ -157,6 +165,50 @@ void hi3xxx_set_cpu(int cpu, bool enable) | |||
157 | set_cpu_hi3620(cpu, enable); | 165 | set_cpu_hi3620(cpu, enable); |
158 | } | 166 | } |
159 | 167 | ||
168 | static bool hix5hd2_hotplug_init(void) | ||
169 | { | ||
170 | struct device_node *np; | ||
171 | |||
172 | np = of_find_compatible_node(NULL, NULL, "hisilicon,cpuctrl"); | ||
173 | if (np) { | ||
174 | ctrl_base = of_iomap(np, 0); | ||
175 | return true; | ||
176 | } | ||
177 | return false; | ||
178 | } | ||
179 | |||
180 | void hix5hd2_set_cpu(int cpu, bool enable) | ||
181 | { | ||
182 | u32 val = 0; | ||
183 | |||
184 | if (!ctrl_base) | ||
185 | if (!hix5hd2_hotplug_init()) | ||
186 | BUG(); | ||
187 | |||
188 | if (enable) { | ||
189 | /* power on cpu1 */ | ||
190 | val = readl_relaxed(ctrl_base + HIX5HD2_PERI_PMC0); | ||
191 | val &= ~(PMC0_CPU1_WAIT_MTCOMS_ACK | PMC0_CPU1_POWERDOWN); | ||
192 | val |= PMC0_CPU1_PMC_ENABLE; | ||
193 | writel_relaxed(val, ctrl_base + HIX5HD2_PERI_PMC0); | ||
194 | /* unreset */ | ||
195 | val = readl_relaxed(ctrl_base + HIX5HD2_PERI_CRG20); | ||
196 | val &= ~CRG20_CPU1_RESET; | ||
197 | writel_relaxed(val, ctrl_base + HIX5HD2_PERI_CRG20); | ||
198 | } else { | ||
199 | /* power down cpu1 */ | ||
200 | val = readl_relaxed(ctrl_base + HIX5HD2_PERI_PMC0); | ||
201 | val |= PMC0_CPU1_PMC_ENABLE | PMC0_CPU1_POWERDOWN; | ||
202 | val &= ~PMC0_CPU1_WAIT_MTCOMS_ACK; | ||
203 | writel_relaxed(val, ctrl_base + HIX5HD2_PERI_PMC0); | ||
204 | |||
205 | /* reset */ | ||
206 | val = readl_relaxed(ctrl_base + HIX5HD2_PERI_CRG20); | ||
207 | val |= CRG20_CPU1_RESET; | ||
208 | writel_relaxed(val, ctrl_base + HIX5HD2_PERI_CRG20); | ||
209 | } | ||
210 | } | ||
211 | |||
160 | static inline void cpu_enter_lowpower(void) | 212 | static inline void cpu_enter_lowpower(void) |
161 | { | 213 | { |
162 | unsigned int v; | 214 | unsigned int v; |
@@ -199,4 +251,10 @@ int hi3xxx_cpu_kill(unsigned int cpu) | |||
199 | hi3xxx_set_cpu(cpu, false); | 251 | hi3xxx_set_cpu(cpu, false); |
200 | return 1; | 252 | return 1; |
201 | } | 253 | } |
254 | |||
255 | void hix5hd2_cpu_die(unsigned int cpu) | ||
256 | { | ||
257 | flush_cache_all(); | ||
258 | hix5hd2_set_cpu(cpu, false); | ||
259 | } | ||
202 | #endif | 260 | #endif |
diff --git a/arch/arm/mach-hisi/platsmp.c b/arch/arm/mach-hisi/platsmp.c index 471f1ee3be2b..575dd8285f1f 100644 --- a/arch/arm/mach-hisi/platsmp.c +++ b/arch/arm/mach-hisi/platsmp.c | |||
@@ -17,6 +17,8 @@ | |||
17 | 17 | ||
18 | #include "core.h" | 18 | #include "core.h" |
19 | 19 | ||
20 | #define HIX5HD2_BOOT_ADDRESS 0xffff0000 | ||
21 | |||
20 | static void __iomem *ctrl_base; | 22 | static void __iomem *ctrl_base; |
21 | 23 | ||
22 | void hi3xxx_set_cpu_jump(int cpu, void *jump_addr) | 24 | void hi3xxx_set_cpu_jump(int cpu, void *jump_addr) |
@@ -35,11 +37,9 @@ int hi3xxx_get_cpu_jump(int cpu) | |||
35 | return readl_relaxed(ctrl_base + ((cpu - 1) << 2)); | 37 | return readl_relaxed(ctrl_base + ((cpu - 1) << 2)); |
36 | } | 38 | } |
37 | 39 | ||
38 | static void __init hi3xxx_smp_prepare_cpus(unsigned int max_cpus) | 40 | static void __init hisi_enable_scu_a9(void) |
39 | { | 41 | { |
40 | struct device_node *np = NULL; | ||
41 | unsigned long base = 0; | 42 | unsigned long base = 0; |
42 | u32 offset = 0; | ||
43 | void __iomem *scu_base = NULL; | 43 | void __iomem *scu_base = NULL; |
44 | 44 | ||
45 | if (scu_a9_has_base()) { | 45 | if (scu_a9_has_base()) { |
@@ -52,6 +52,14 @@ static void __init hi3xxx_smp_prepare_cpus(unsigned int max_cpus) | |||
52 | scu_enable(scu_base); | 52 | scu_enable(scu_base); |
53 | iounmap(scu_base); | 53 | iounmap(scu_base); |
54 | } | 54 | } |
55 | } | ||
56 | |||
57 | static void __init hi3xxx_smp_prepare_cpus(unsigned int max_cpus) | ||
58 | { | ||
59 | struct device_node *np = NULL; | ||
60 | u32 offset = 0; | ||
61 | |||
62 | hisi_enable_scu_a9(); | ||
55 | if (!ctrl_base) { | 63 | if (!ctrl_base) { |
56 | np = of_find_compatible_node(NULL, NULL, "hisilicon,sysctrl"); | 64 | np = of_find_compatible_node(NULL, NULL, "hisilicon,sysctrl"); |
57 | if (!np) { | 65 | if (!np) { |
@@ -87,3 +95,42 @@ struct smp_operations hi3xxx_smp_ops __initdata = { | |||
87 | .cpu_kill = hi3xxx_cpu_kill, | 95 | .cpu_kill = hi3xxx_cpu_kill, |
88 | #endif | 96 | #endif |
89 | }; | 97 | }; |
98 | |||
99 | static void __init hix5hd2_smp_prepare_cpus(unsigned int max_cpus) | ||
100 | { | ||
101 | hisi_enable_scu_a9(); | ||
102 | } | ||
103 | |||
104 | void hix5hd2_set_scu_boot_addr(phys_addr_t start_addr, phys_addr_t jump_addr) | ||
105 | { | ||
106 | void __iomem *virt; | ||
107 | |||
108 | virt = ioremap(start_addr, PAGE_SIZE); | ||
109 | |||
110 | writel_relaxed(0xe51ff004, virt); /* ldr pc, [rc, #-4] */ | ||
111 | writel_relaxed(jump_addr, virt + 4); /* pc jump phy address */ | ||
112 | iounmap(virt); | ||
113 | } | ||
114 | |||
115 | static int hix5hd2_boot_secondary(unsigned int cpu, struct task_struct *idle) | ||
116 | { | ||
117 | phys_addr_t jumpaddr; | ||
118 | |||
119 | jumpaddr = virt_to_phys(hix5hd2_secondary_startup); | ||
120 | hix5hd2_set_scu_boot_addr(HIX5HD2_BOOT_ADDRESS, jumpaddr); | ||
121 | hix5hd2_set_cpu(cpu, true); | ||
122 | arch_send_wakeup_ipi_mask(cpumask_of(cpu)); | ||
123 | return 0; | ||
124 | } | ||
125 | |||
126 | |||
127 | struct smp_operations hix5hd2_smp_ops __initdata = { | ||
128 | .smp_prepare_cpus = hix5hd2_smp_prepare_cpus, | ||
129 | .smp_boot_secondary = hix5hd2_boot_secondary, | ||
130 | #ifdef CONFIG_HOTPLUG_CPU | ||
131 | .cpu_die = hix5hd2_cpu_die, | ||
132 | #endif | ||
133 | }; | ||
134 | |||
135 | CPU_METHOD_OF_DECLARE(hi3xxx_smp, "hisilicon,hi3620-smp", &hi3xxx_smp_ops); | ||
136 | CPU_METHOD_OF_DECLARE(hix5hd2_smp, "hisilicon,hix5hd2-smp", &hix5hd2_smp_ops); | ||
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index ab6bcfd2e220..9de84a215abd 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig | |||
@@ -64,18 +64,8 @@ config IMX_HAVE_IOMUX_V1 | |||
64 | config ARCH_MXC_IOMUX_V3 | 64 | config ARCH_MXC_IOMUX_V3 |
65 | bool | 65 | bool |
66 | 66 | ||
67 | config ARCH_MX1 | ||
68 | bool | ||
69 | |||
70 | config ARCH_MX25 | ||
71 | bool | ||
72 | |||
73 | config MACH_MX27 | ||
74 | bool | ||
75 | |||
76 | config SOC_IMX1 | 67 | config SOC_IMX1 |
77 | bool | 68 | bool |
78 | select ARCH_MX1 | ||
79 | select CPU_ARM920T | 69 | select CPU_ARM920T |
80 | select IMX_HAVE_IOMUX_V1 | 70 | select IMX_HAVE_IOMUX_V1 |
81 | select MXC_AVIC | 71 | select MXC_AVIC |
@@ -88,7 +78,6 @@ config SOC_IMX21 | |||
88 | 78 | ||
89 | config SOC_IMX25 | 79 | config SOC_IMX25 |
90 | bool | 80 | bool |
91 | select ARCH_MX25 | ||
92 | select ARCH_MXC_IOMUX_V3 | 81 | select ARCH_MXC_IOMUX_V3 |
93 | select CPU_ARM926T | 82 | select CPU_ARM926T |
94 | select MXC_AVIC | 83 | select MXC_AVIC |
@@ -99,7 +88,6 @@ config SOC_IMX27 | |||
99 | select ARCH_HAS_OPP | 88 | select ARCH_HAS_OPP |
100 | select CPU_ARM926T | 89 | select CPU_ARM926T |
101 | select IMX_HAVE_IOMUX_V1 | 90 | select IMX_HAVE_IOMUX_V1 |
102 | select MACH_MX27 | ||
103 | select MXC_AVIC | 91 | select MXC_AVIC |
104 | select PINCTRL_IMX27 | 92 | select PINCTRL_IMX27 |
105 | 93 | ||
@@ -118,18 +106,6 @@ config SOC_IMX35 | |||
118 | select PINCTRL_IMX35 | 106 | select PINCTRL_IMX35 |
119 | select SMP_ON_UP if SMP | 107 | select SMP_ON_UP if SMP |
120 | 108 | ||
121 | config SOC_IMX5 | ||
122 | bool | ||
123 | select ARCH_HAS_OPP | ||
124 | select ARCH_MXC_IOMUX_V3 | ||
125 | select MXC_TZIC | ||
126 | |||
127 | config SOC_IMX51 | ||
128 | bool | ||
129 | select HAVE_IMX_SRC | ||
130 | select PINCTRL_IMX51 | ||
131 | select SOC_IMX5 | ||
132 | |||
133 | if ARCH_MULTI_V4T | 109 | if ARCH_MULTI_V4T |
134 | 110 | ||
135 | comment "MX1 platforms:" | 111 | comment "MX1 platforms:" |
@@ -365,15 +341,6 @@ config MACH_IMX27_VISSTRIM_M10 | |||
365 | This includes specific configurations for the board and its | 341 | This includes specific configurations for the board and its |
366 | peripherals. | 342 | peripherals. |
367 | 343 | ||
368 | config MACH_IMX27LITE | ||
369 | bool "LogicPD MX27 LITEKIT platform" | ||
370 | select IMX_HAVE_PLATFORM_IMX_SSI | ||
371 | select IMX_HAVE_PLATFORM_IMX_UART | ||
372 | select SOC_IMX27 | ||
373 | help | ||
374 | Include support for MX27 LITEKIT platform. This includes specific | ||
375 | configurations for the board and its peripherals. | ||
376 | |||
377 | config MACH_PCA100 | 344 | config MACH_PCA100 |
378 | bool "Phytec phyCARD-s (pca100)" | 345 | bool "Phytec phyCARD-s (pca100)" |
379 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC | 346 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC |
@@ -405,15 +372,6 @@ config MACH_MXT_TD60 | |||
405 | Include support for i-MXT (aka td60) platform. This | 372 | Include support for i-MXT (aka td60) platform. This |
406 | includes specific configurations for the module and its peripherals. | 373 | includes specific configurations for the module and its peripherals. |
407 | 374 | ||
408 | config MACH_IMX27IPCAM | ||
409 | bool "IMX27 IPCAM platform" | ||
410 | select IMX_HAVE_PLATFORM_IMX2_WDT | ||
411 | select IMX_HAVE_PLATFORM_IMX_UART | ||
412 | select SOC_IMX27 | ||
413 | help | ||
414 | Include support for IMX27 IPCAM platform. This includes specific | ||
415 | configurations for the board and its peripherals. | ||
416 | |||
417 | config MACH_IMX27_DT | 375 | config MACH_IMX27_DT |
418 | bool "Support i.MX27 platforms from device tree" | 376 | bool "Support i.MX27 platforms from device tree" |
419 | select SOC_IMX27 | 377 | select SOC_IMX27 |
@@ -699,24 +657,29 @@ if ARCH_MULTI_V7 | |||
699 | 657 | ||
700 | comment "Device tree only" | 658 | comment "Device tree only" |
701 | 659 | ||
660 | config SOC_IMX5 | ||
661 | bool | ||
662 | select ARCH_HAS_OPP | ||
663 | select HAVE_IMX_SRC | ||
664 | select MXC_TZIC | ||
665 | |||
702 | config SOC_IMX50 | 666 | config SOC_IMX50 |
703 | bool "i.MX50 support" | 667 | bool "i.MX50 support" |
704 | select HAVE_IMX_SRC | ||
705 | select PINCTRL_IMX50 | 668 | select PINCTRL_IMX50 |
706 | select SOC_IMX5 | 669 | select SOC_IMX5 |
707 | 670 | ||
708 | help | 671 | help |
709 | This enables support for Freescale i.MX50 processor. | 672 | This enables support for Freescale i.MX50 processor. |
710 | 673 | ||
711 | config MACH_IMX51_DT | 674 | config SOC_IMX51 |
712 | bool "i.MX51 support" | 675 | bool "i.MX51 support" |
713 | select SOC_IMX51 | 676 | select PINCTRL_IMX51 |
677 | select SOC_IMX5 | ||
714 | help | 678 | help |
715 | This enables support for Freescale i.MX51 processor | 679 | This enables support for Freescale i.MX51 processor |
716 | 680 | ||
717 | config SOC_IMX53 | 681 | config SOC_IMX53 |
718 | bool "i.MX53 support" | 682 | bool "i.MX53 support" |
719 | select HAVE_IMX_SRC | ||
720 | select PINCTRL_IMX53 | 683 | select PINCTRL_IMX53 |
721 | select SOC_IMX5 | 684 | select SOC_IMX5 |
722 | 685 | ||
@@ -733,8 +696,6 @@ config SOC_IMX6 | |||
733 | select HAVE_IMX_MMDC | 696 | select HAVE_IMX_MMDC |
734 | select HAVE_IMX_SRC | 697 | select HAVE_IMX_SRC |
735 | select MFD_SYSCON | 698 | select MFD_SYSCON |
736 | select PL310_ERRATA_588369 if CACHE_L2X0 | ||
737 | select PL310_ERRATA_727915 if CACHE_L2X0 | ||
738 | select PL310_ERRATA_769419 if CACHE_L2X0 | 699 | select PL310_ERRATA_769419 if CACHE_L2X0 |
739 | 700 | ||
740 | config SOC_IMX6Q | 701 | config SOC_IMX6Q |
@@ -770,8 +731,6 @@ config SOC_VF610 | |||
770 | select ARM_GIC | 731 | select ARM_GIC |
771 | select PINCTRL_VF610 | 732 | select PINCTRL_VF610 |
772 | select VF_PIT_TIMER | 733 | select VF_PIT_TIMER |
773 | select PL310_ERRATA_588369 if CACHE_L2X0 | ||
774 | select PL310_ERRATA_727915 if CACHE_L2X0 | ||
775 | select PL310_ERRATA_769419 if CACHE_L2X0 | 734 | select PL310_ERRATA_769419 if CACHE_L2X0 |
776 | 735 | ||
777 | help | 736 | help |
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 8556c787e59c..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" |
@@ -73,48 +74,13 @@ static const char *lvds_sels[] = { | |||
73 | "pcie_ref_125m", "sata_ref_100m", | 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_100m]); | 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 5408ca70c8d6..fef46faf692f 100644 --- a/arch/arm/mach-imx/clk-imx6sl.c +++ b/arch/arm/mach-imx/clk-imx6sl.c | |||
@@ -348,18 +348,12 @@ static void __init imx6sl_clocks_init(struct device_node *ccm_node) | |||
348 | 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); |
349 | 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); |
350 | 350 | ||
351 | for (i = 0; i < ARRAY_SIZE(clks); i++) | 351 | imx_check_clocks(clks, ARRAY_SIZE(clks)); |
352 | if (IS_ERR(clks[i])) | ||
353 | pr_err("i.MX6SL clk %d: register failed with %ld\n", | ||
354 | i, PTR_ERR(clks[i])); | ||
355 | 352 | ||
356 | clk_data.clks = clks; | 353 | clk_data.clks = clks; |
357 | clk_data.clk_num = ARRAY_SIZE(clks); | 354 | clk_data.clk_num = ARRAY_SIZE(clks); |
358 | 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); |
359 | 356 | ||
360 | clk_register_clkdev(clks[IMX6SL_CLK_GPT], "ipg", "imx-gpt.0"); | ||
361 | clk_register_clkdev(clks[IMX6SL_CLK_GPT_SERIAL], "per", "imx-gpt.0"); | ||
362 | |||
363 | /* Ensure the AHB clk is at 132MHz. */ | 357 | /* Ensure the AHB clk is at 132MHz. */ |
364 | ret = clk_set_rate(clks[IMX6SL_CLK_AHB], 132000000); | 358 | ret = clk_set_rate(clks[IMX6SL_CLK_AHB], 132000000); |
365 | if (ret) | 359 | if (ret) |
@@ -383,8 +377,5 @@ static void __init imx6sl_clocks_init(struct device_node *ccm_node) | |||
383 | 377 | ||
384 | /* Set initial power mode */ | 378 | /* Set initial power mode */ |
385 | imx6q_set_lpm(WAIT_CLOCKED); | 379 | imx6q_set_lpm(WAIT_CLOCKED); |
386 | |||
387 | np = of_find_compatible_node(NULL, NULL, "fsl,imx6sl-gpt"); | ||
388 | mxc_timer_init_dt(np); | ||
389 | } | 380 | } |
390 | 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/integrator_ap.c b/arch/arm/mach-integrator/integrator_ap.c index 660ca6feff40..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 */ |
@@ -558,7 +553,6 @@ DT_MACHINE_START(INTEGRATOR_AP_DT, "ARM Integrator/AP (Device Tree)") | |||
558 | .map_io = ap_map_io, | 553 | .map_io = ap_map_io, |
559 | .init_early = ap_init_early, | 554 | .init_early = ap_init_early, |
560 | .init_irq = ap_init_irq_of, | 555 | .init_irq = ap_init_irq_of, |
561 | .handle_irq = fpga_handle_irq, | ||
562 | .init_time = ap_of_timer_init, | 556 | .init_time = ap_of_timer_init, |
563 | .init_machine = ap_init_of, | 557 | .init_machine = ap_init_of, |
564 | .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 e39097068cf9..cca02eb75eb5 100644 --- a/arch/arm/mach-integrator/integrator_cp.c +++ b/arch/arm/mach-integrator/integrator_cp.c | |||
@@ -21,7 +21,7 @@ | |||
21 | #include <linux/platform_data/video-clcd-versatile.h> | 21 | #include <linux/platform_data/video-clcd-versatile.h> |
22 | #include <linux/amba/mmci.h> | 22 | #include <linux/amba/mmci.h> |
23 | #include <linux/io.h> | 23 | #include <linux/io.h> |
24 | #include <linux/irqchip/versatile-fpga.h> | 24 | #include <linux/irqchip.h> |
25 | #include <linux/gfp.h> | 25 | #include <linux/gfp.h> |
26 | #include <linux/mtd/physmap.h> | 26 | #include <linux/mtd/physmap.h> |
27 | #include <linux/of_irq.h> | 27 | #include <linux/of_irq.h> |
@@ -234,15 +234,10 @@ static void __init intcp_init_early(void) | |||
234 | sched_clock_register(intcp_read_sched_clock, 32, 24000000); | 234 | sched_clock_register(intcp_read_sched_clock, 32, 24000000); |
235 | } | 235 | } |
236 | 236 | ||
237 | static const struct of_device_id fpga_irq_of_match[] __initconst = { | ||
238 | { .compatible = "arm,versatile-fpga-irq", .data = fpga_irq_of_init, }, | ||
239 | { /* Sentinel */ } | ||
240 | }; | ||
241 | |||
242 | static void __init intcp_init_irq_of(void) | 237 | static void __init intcp_init_irq_of(void) |
243 | { | 238 | { |
244 | cm_init(); | 239 | cm_init(); |
245 | of_irq_init(fpga_irq_of_match); | 240 | irqchip_init(); |
246 | } | 241 | } |
247 | 242 | ||
248 | /* | 243 | /* |
@@ -328,7 +323,6 @@ DT_MACHINE_START(INTEGRATOR_CP_DT, "ARM Integrator/CP (Device Tree)") | |||
328 | .map_io = intcp_map_io, | 323 | .map_io = intcp_map_io, |
329 | .init_early = intcp_init_early, | 324 | .init_early = intcp_init_early, |
330 | .init_irq = intcp_init_irq_of, | 325 | .init_irq = intcp_init_irq_of, |
331 | .handle_irq = fpga_handle_irq, | ||
332 | .init_machine = intcp_init_of, | 326 | .init_machine = intcp_init_of, |
333 | .restart = integrator_restart, | 327 | .restart = integrator_restart, |
334 | .dt_compat = intcp_dt_board_compat, | 328 | .dt_compat = intcp_dt_board_compat, |
diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig deleted file mode 100644 index df4b26340ae4..000000000000 --- a/arch/arm/mach-kirkwood/Kconfig +++ /dev/null | |||
@@ -1,111 +0,0 @@ | |||
1 | if ARCH_KIRKWOOD | ||
2 | |||
3 | menu "Marvell Kirkwood Implementations" | ||
4 | |||
5 | config KIRKWOOD_LEGACY | ||
6 | bool | ||
7 | |||
8 | config MACH_D2NET_V2 | ||
9 | bool "LaCie d2 Network v2 NAS Board" | ||
10 | select KIRKWOOD_LEGACY | ||
11 | help | ||
12 | Say 'Y' here if you want your kernel to support the | ||
13 | LaCie d2 Network v2 NAS. | ||
14 | |||
15 | config MACH_NET2BIG_V2 | ||
16 | bool "LaCie 2Big Network v2 NAS Board" | ||
17 | select KIRKWOOD_LEGACY | ||
18 | help | ||
19 | Say 'Y' here if you want your kernel to support the | ||
20 | LaCie 2Big Network v2 NAS. | ||
21 | |||
22 | config MACH_NET5BIG_V2 | ||
23 | bool "LaCie 5Big Network v2 NAS Board" | ||
24 | select KIRKWOOD_LEGACY | ||
25 | help | ||
26 | Say 'Y' here if you want your kernel to support the | ||
27 | LaCie 5Big Network v2 NAS. | ||
28 | |||
29 | config MACH_OPENRD | ||
30 | select KIRKWOOD_LEGACY | ||
31 | bool | ||
32 | |||
33 | config MACH_OPENRD_BASE | ||
34 | bool "Marvell OpenRD Base Board" | ||
35 | select MACH_OPENRD | ||
36 | help | ||
37 | Say 'Y' here if you want your kernel to support the | ||
38 | Marvell OpenRD Base Board. | ||
39 | |||
40 | config MACH_OPENRD_CLIENT | ||
41 | bool "Marvell OpenRD Client Board" | ||
42 | select MACH_OPENRD | ||
43 | help | ||
44 | Say 'Y' here if you want your kernel to support the | ||
45 | Marvell OpenRD Client Board. | ||
46 | |||
47 | config MACH_OPENRD_ULTIMATE | ||
48 | bool "Marvell OpenRD Ultimate Board" | ||
49 | select MACH_OPENRD | ||
50 | help | ||
51 | Say 'Y' here if you want your kernel to support the | ||
52 | Marvell OpenRD Ultimate Board. | ||
53 | |||
54 | config MACH_RD88F6192_NAS | ||
55 | bool "Marvell RD-88F6192-NAS Reference Board" | ||
56 | select KIRKWOOD_LEGACY | ||
57 | help | ||
58 | Say 'Y' here if you want your kernel to support the | ||
59 | Marvell RD-88F6192-NAS Reference Board. | ||
60 | |||
61 | config MACH_RD88F6281 | ||
62 | bool "Marvell RD-88F6281 Reference Board" | ||
63 | select KIRKWOOD_LEGACY | ||
64 | help | ||
65 | Say 'Y' here if you want your kernel to support the | ||
66 | Marvell RD-88F6281 Reference Board. | ||
67 | |||
68 | config MACH_T5325 | ||
69 | bool "HP t5325 Thin Client" | ||
70 | select KIRKWOOD_LEGACY | ||
71 | help | ||
72 | Say 'Y' here if you want your kernel to support the | ||
73 | HP t5325 Thin Client. | ||
74 | |||
75 | config MACH_TS219 | ||
76 | bool "QNAP TS-110, TS-119, TS-119P+, TS-210, TS-219, TS-219P and TS-219P+ Turbo NAS" | ||
77 | select KIRKWOOD_LEGACY | ||
78 | help | ||
79 | Say 'Y' here if you want your kernel to support the | ||
80 | QNAP TS-110, TS-119, TS-119P+, TS-210, TS-219, TS-219P and | ||
81 | TS-219P+ Turbo NAS devices. | ||
82 | |||
83 | config MACH_TS41X | ||
84 | bool "QNAP TS-410, TS-410U, TS-419P, TS-419P+ and TS-419U Turbo NAS" | ||
85 | select KIRKWOOD_LEGACY | ||
86 | help | ||
87 | Say 'Y' here if you want your kernel to support the | ||
88 | QNAP TS-410, TS-410U, TS-419P, TS-419P+ and TS-419U Turbo | ||
89 | NAS devices. | ||
90 | |||
91 | comment "Device tree entries" | ||
92 | |||
93 | config ARCH_KIRKWOOD_DT | ||
94 | bool "Marvell Kirkwood Flattened Device Tree" | ||
95 | select KIRKWOOD_CLK | ||
96 | select OF_IRQ | ||
97 | select ORION_IRQCHIP | ||
98 | select ORION_TIMER | ||
99 | select POWER_SUPPLY | ||
100 | select POWER_RESET | ||
101 | select POWER_RESET_GPIO | ||
102 | select REGULATOR | ||
103 | select REGULATOR_FIXED_VOLTAGE | ||
104 | select USE_OF | ||
105 | help | ||
106 | Say 'Y' here if you want your kernel to support the | ||
107 | Marvell Kirkwood using flattened device tree. | ||
108 | |||
109 | endmenu | ||
110 | |||
111 | endif | ||
diff --git a/arch/arm/mach-kirkwood/Makefile b/arch/arm/mach-kirkwood/Makefile deleted file mode 100644 index 3a72c5c6e747..000000000000 --- a/arch/arm/mach-kirkwood/Makefile +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | obj-$(CONFIG_KIRKWOOD_LEGACY) += irq.o mpp.o common.o pcie.o | ||
2 | obj-$(CONFIG_PM) += pm.o | ||
3 | |||
4 | obj-$(CONFIG_MACH_D2NET_V2) += d2net_v2-setup.o lacie_v2-common.o | ||
5 | obj-$(CONFIG_MACH_NET2BIG_V2) += netxbig_v2-setup.o lacie_v2-common.o | ||
6 | obj-$(CONFIG_MACH_NET5BIG_V2) += netxbig_v2-setup.o lacie_v2-common.o | ||
7 | obj-$(CONFIG_MACH_OPENRD) += openrd-setup.o | ||
8 | obj-$(CONFIG_MACH_RD88F6192_NAS) += rd88f6192-nas-setup.o | ||
9 | obj-$(CONFIG_MACH_RD88F6281) += rd88f6281-setup.o | ||
10 | obj-$(CONFIG_MACH_T5325) += t5325-setup.o | ||
11 | obj-$(CONFIG_MACH_TS219) += ts219-setup.o tsx1x-common.o | ||
12 | obj-$(CONFIG_MACH_TS41X) += ts41x-setup.o tsx1x-common.o | ||
13 | |||
14 | obj-$(CONFIG_ARCH_KIRKWOOD_DT) += board-dt.o | ||
diff --git a/arch/arm/mach-kirkwood/Makefile.boot b/arch/arm/mach-kirkwood/Makefile.boot deleted file mode 100644 index 760a0efe7580..000000000000 --- a/arch/arm/mach-kirkwood/Makefile.boot +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | zreladdr-y += 0x00008000 | ||
2 | params_phys-y := 0x00000100 | ||
3 | initrd_phys-y := 0x00800000 | ||
diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c deleted file mode 100644 index ff18ff20f71f..000000000000 --- a/arch/arm/mach-kirkwood/board-dt.c +++ /dev/null | |||
@@ -1,223 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2012 (C), Jason Cooper <jason@lakedaemon.net> | ||
3 | * | ||
4 | * arch/arm/mach-kirkwood/board-dt.c | ||
5 | * | ||
6 | * Flattened Device Tree board initialization | ||
7 | * | ||
8 | * This file is licensed under the terms of the GNU General Public | ||
9 | * License version 2. This program is licensed "as is" without any | ||
10 | * warranty of any kind, whether express or implied. | ||
11 | */ | ||
12 | |||
13 | #include <linux/clk.h> | ||
14 | #include <linux/kernel.h> | ||
15 | #include <linux/init.h> | ||
16 | #include <linux/of.h> | ||
17 | #include <linux/of_address.h> | ||
18 | #include <linux/of_net.h> | ||
19 | #include <linux/of_platform.h> | ||
20 | #include <linux/dma-mapping.h> | ||
21 | #include <linux/irqchip.h> | ||
22 | #include <asm/hardware/cache-feroceon-l2.h> | ||
23 | #include <asm/mach/arch.h> | ||
24 | #include <asm/mach/map.h> | ||
25 | #include <mach/bridge-regs.h> | ||
26 | #include <plat/common.h> | ||
27 | #include <plat/pcie.h> | ||
28 | #include "pm.h" | ||
29 | |||
30 | static struct map_desc kirkwood_io_desc[] __initdata = { | ||
31 | { | ||
32 | .virtual = (unsigned long) KIRKWOOD_REGS_VIRT_BASE, | ||
33 | .pfn = __phys_to_pfn(KIRKWOOD_REGS_PHYS_BASE), | ||
34 | .length = KIRKWOOD_REGS_SIZE, | ||
35 | .type = MT_DEVICE, | ||
36 | }, | ||
37 | }; | ||
38 | |||
39 | static void __init kirkwood_map_io(void) | ||
40 | { | ||
41 | iotable_init(kirkwood_io_desc, ARRAY_SIZE(kirkwood_io_desc)); | ||
42 | } | ||
43 | |||
44 | static struct resource kirkwood_cpufreq_resources[] = { | ||
45 | [0] = { | ||
46 | .start = CPU_CONTROL_PHYS, | ||
47 | .end = CPU_CONTROL_PHYS + 3, | ||
48 | .flags = IORESOURCE_MEM, | ||
49 | }, | ||
50 | }; | ||
51 | |||
52 | static struct platform_device kirkwood_cpufreq_device = { | ||
53 | .name = "kirkwood-cpufreq", | ||
54 | .id = -1, | ||
55 | .num_resources = ARRAY_SIZE(kirkwood_cpufreq_resources), | ||
56 | .resource = kirkwood_cpufreq_resources, | ||
57 | }; | ||
58 | |||
59 | static void __init kirkwood_cpufreq_init(void) | ||
60 | { | ||
61 | platform_device_register(&kirkwood_cpufreq_device); | ||
62 | } | ||
63 | |||
64 | static struct resource kirkwood_cpuidle_resource[] = { | ||
65 | { | ||
66 | .flags = IORESOURCE_MEM, | ||
67 | .start = DDR_OPERATION_BASE, | ||
68 | .end = DDR_OPERATION_BASE + 3, | ||
69 | }, | ||
70 | }; | ||
71 | |||
72 | static struct platform_device kirkwood_cpuidle = { | ||
73 | .name = "kirkwood_cpuidle", | ||
74 | .id = -1, | ||
75 | .resource = kirkwood_cpuidle_resource, | ||
76 | .num_resources = 1, | ||
77 | }; | ||
78 | |||
79 | static void __init kirkwood_cpuidle_init(void) | ||
80 | { | ||
81 | platform_device_register(&kirkwood_cpuidle); | ||
82 | } | ||
83 | |||
84 | /* Temporary here since mach-mvebu has a function we can use */ | ||
85 | static void kirkwood_restart(enum reboot_mode mode, const char *cmd) | ||
86 | { | ||
87 | /* | ||
88 | * Enable soft reset to assert RSTOUTn. | ||
89 | */ | ||
90 | writel(SOFT_RESET_OUT_EN, RSTOUTn_MASK); | ||
91 | |||
92 | /* | ||
93 | * Assert soft reset. | ||
94 | */ | ||
95 | writel(SOFT_RESET, SYSTEM_SOFT_RESET); | ||
96 | |||
97 | while (1) | ||
98 | ; | ||
99 | } | ||
100 | |||
101 | #define MV643XX_ETH_MAC_ADDR_LOW 0x0414 | ||
102 | #define MV643XX_ETH_MAC_ADDR_HIGH 0x0418 | ||
103 | |||
104 | static void __init kirkwood_dt_eth_fixup(void) | ||
105 | { | ||
106 | struct device_node *np; | ||
107 | |||
108 | /* | ||
109 | * The ethernet interfaces forget the MAC address assigned by u-boot | ||
110 | * if the clocks are turned off. Usually, u-boot on kirkwood boards | ||
111 | * has no DT support to properly set local-mac-address property. | ||
112 | * As a workaround, we get the MAC address from mv643xx_eth registers | ||
113 | * and update the port device node if no valid MAC address is set. | ||
114 | */ | ||
115 | for_each_compatible_node(np, NULL, "marvell,kirkwood-eth-port") { | ||
116 | struct device_node *pnp = of_get_parent(np); | ||
117 | struct clk *clk; | ||
118 | struct property *pmac; | ||
119 | void __iomem *io; | ||
120 | u8 *macaddr; | ||
121 | u32 reg; | ||
122 | |||
123 | if (!pnp) | ||
124 | continue; | ||
125 | |||
126 | /* skip disabled nodes or nodes with valid MAC address*/ | ||
127 | if (!of_device_is_available(pnp) || of_get_mac_address(np)) | ||
128 | goto eth_fixup_skip; | ||
129 | |||
130 | clk = of_clk_get(pnp, 0); | ||
131 | if (IS_ERR(clk)) | ||
132 | goto eth_fixup_skip; | ||
133 | |||
134 | io = of_iomap(pnp, 0); | ||
135 | if (!io) | ||
136 | goto eth_fixup_no_map; | ||
137 | |||
138 | /* ensure port clock is not gated to not hang CPU */ | ||
139 | clk_prepare_enable(clk); | ||
140 | |||
141 | /* store MAC address register contents in local-mac-address */ | ||
142 | pr_err(FW_INFO "%s: local-mac-address is not set\n", | ||
143 | np->full_name); | ||
144 | |||
145 | pmac = kzalloc(sizeof(*pmac) + 6, GFP_KERNEL); | ||
146 | if (!pmac) | ||
147 | goto eth_fixup_no_mem; | ||
148 | |||
149 | pmac->value = pmac + 1; | ||
150 | pmac->length = 6; | ||
151 | pmac->name = kstrdup("local-mac-address", GFP_KERNEL); | ||
152 | if (!pmac->name) { | ||
153 | kfree(pmac); | ||
154 | goto eth_fixup_no_mem; | ||
155 | } | ||
156 | |||
157 | macaddr = pmac->value; | ||
158 | reg = readl(io + MV643XX_ETH_MAC_ADDR_HIGH); | ||
159 | macaddr[0] = (reg >> 24) & 0xff; | ||
160 | macaddr[1] = (reg >> 16) & 0xff; | ||
161 | macaddr[2] = (reg >> 8) & 0xff; | ||
162 | macaddr[3] = reg & 0xff; | ||
163 | |||
164 | reg = readl(io + MV643XX_ETH_MAC_ADDR_LOW); | ||
165 | macaddr[4] = (reg >> 8) & 0xff; | ||
166 | macaddr[5] = reg & 0xff; | ||
167 | |||
168 | of_update_property(np, pmac); | ||
169 | |||
170 | eth_fixup_no_mem: | ||
171 | iounmap(io); | ||
172 | clk_disable_unprepare(clk); | ||
173 | eth_fixup_no_map: | ||
174 | clk_put(clk); | ||
175 | eth_fixup_skip: | ||
176 | of_node_put(pnp); | ||
177 | } | ||
178 | } | ||
179 | |||
180 | /* | ||
181 | * Disable propagation of mbus errors to the CPU local bus, as this | ||
182 | * causes mbus errors (which can occur for example for PCI aborts) to | ||
183 | * throw CPU aborts, which we're not set up to deal with. | ||
184 | */ | ||
185 | static void __init kirkwood_disable_mbus_error_propagation(void) | ||
186 | { | ||
187 | void __iomem *cpu_config; | ||
188 | |||
189 | cpu_config = ioremap(CPU_CONFIG_PHYS, 4); | ||
190 | writel(readl(cpu_config) & ~CPU_CONFIG_ERROR_PROP, cpu_config); | ||
191 | iounmap(cpu_config); | ||
192 | } | ||
193 | |||
194 | static void __init kirkwood_dt_init(void) | ||
195 | { | ||
196 | kirkwood_disable_mbus_error_propagation(); | ||
197 | |||
198 | BUG_ON(mvebu_mbus_dt_init(false)); | ||
199 | |||
200 | #ifdef CONFIG_CACHE_FEROCEON_L2 | ||
201 | feroceon_of_init(); | ||
202 | #endif | ||
203 | kirkwood_cpufreq_init(); | ||
204 | kirkwood_cpuidle_init(); | ||
205 | |||
206 | kirkwood_pm_init(); | ||
207 | kirkwood_dt_eth_fixup(); | ||
208 | |||
209 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | ||
210 | } | ||
211 | |||
212 | static const char * const kirkwood_dt_board_compat[] = { | ||
213 | "marvell,kirkwood", | ||
214 | NULL | ||
215 | }; | ||
216 | |||
217 | DT_MACHINE_START(KIRKWOOD_DT, "Marvell Kirkwood (Flattened Device Tree)") | ||
218 | /* Maintainer: Jason Cooper <jason@lakedaemon.net> */ | ||
219 | .map_io = kirkwood_map_io, | ||
220 | .init_machine = kirkwood_dt_init, | ||
221 | .restart = kirkwood_restart, | ||
222 | .dt_compat = kirkwood_dt_board_compat, | ||
223 | MACHINE_END | ||
diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c deleted file mode 100644 index 255f33a3903c..000000000000 --- a/arch/arm/mach-kirkwood/common.c +++ /dev/null | |||
@@ -1,746 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-kirkwood/common.c | ||
3 | * | ||
4 | * Core functions for Marvell Kirkwood SoCs | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public | ||
7 | * License version 2. This program is licensed "as is" without any | ||
8 | * warranty of any kind, whether express or implied. | ||
9 | */ | ||
10 | |||
11 | #include <linux/kernel.h> | ||
12 | #include <linux/init.h> | ||
13 | #include <linux/platform_device.h> | ||
14 | #include <linux/serial_8250.h> | ||
15 | #include <linux/ata_platform.h> | ||
16 | #include <linux/mtd/nand.h> | ||
17 | #include <linux/dma-mapping.h> | ||
18 | #include <linux/clk-provider.h> | ||
19 | #include <linux/spinlock.h> | ||
20 | #include <linux/mv643xx_i2c.h> | ||
21 | #include <linux/timex.h> | ||
22 | #include <linux/kexec.h> | ||
23 | #include <linux/reboot.h> | ||
24 | #include <net/dsa.h> | ||
25 | #include <asm/page.h> | ||
26 | #include <asm/mach/map.h> | ||
27 | #include <asm/mach/time.h> | ||
28 | #include <asm/hardware/cache-feroceon-l2.h> | ||
29 | #include <mach/kirkwood.h> | ||
30 | #include <mach/bridge-regs.h> | ||
31 | #include <linux/platform_data/asoc-kirkwood.h> | ||
32 | #include <linux/platform_data/mmc-mvsdio.h> | ||
33 | #include <linux/platform_data/mtd-orion_nand.h> | ||
34 | #include <linux/platform_data/usb-ehci-orion.h> | ||
35 | #include <plat/common.h> | ||
36 | #include <plat/time.h> | ||
37 | #include <linux/platform_data/dma-mv_xor.h> | ||
38 | #include "common.h" | ||
39 | #include "pm.h" | ||
40 | |||
41 | /* These can go away once Kirkwood uses the mvebu-mbus DT binding */ | ||
42 | #define KIRKWOOD_MBUS_NAND_TARGET 0x01 | ||
43 | #define KIRKWOOD_MBUS_NAND_ATTR 0x2f | ||
44 | #define KIRKWOOD_MBUS_SRAM_TARGET 0x03 | ||
45 | #define KIRKWOOD_MBUS_SRAM_ATTR 0x01 | ||
46 | |||
47 | /***************************************************************************** | ||
48 | * I/O Address Mapping | ||
49 | ****************************************************************************/ | ||
50 | static struct map_desc kirkwood_io_desc[] __initdata = { | ||
51 | { | ||
52 | .virtual = (unsigned long) KIRKWOOD_REGS_VIRT_BASE, | ||
53 | .pfn = __phys_to_pfn(KIRKWOOD_REGS_PHYS_BASE), | ||
54 | .length = KIRKWOOD_REGS_SIZE, | ||
55 | .type = MT_DEVICE, | ||
56 | }, | ||
57 | }; | ||
58 | |||
59 | void __init kirkwood_map_io(void) | ||
60 | { | ||
61 | iotable_init(kirkwood_io_desc, ARRAY_SIZE(kirkwood_io_desc)); | ||
62 | } | ||
63 | |||
64 | /***************************************************************************** | ||
65 | * CLK tree | ||
66 | ****************************************************************************/ | ||
67 | |||
68 | static void enable_sata0(void) | ||
69 | { | ||
70 | /* Enable PLL and IVREF */ | ||
71 | writel(readl(SATA0_PHY_MODE_2) | 0xf, SATA0_PHY_MODE_2); | ||
72 | /* Enable PHY */ | ||
73 | writel(readl(SATA0_IF_CTRL) & ~0x200, SATA0_IF_CTRL); | ||
74 | } | ||
75 | |||
76 | static void disable_sata0(void) | ||
77 | { | ||
78 | /* Disable PLL and IVREF */ | ||
79 | writel(readl(SATA0_PHY_MODE_2) & ~0xf, SATA0_PHY_MODE_2); | ||
80 | /* Disable PHY */ | ||
81 | writel(readl(SATA0_IF_CTRL) | 0x200, SATA0_IF_CTRL); | ||
82 | } | ||
83 | |||
84 | static void enable_sata1(void) | ||
85 | { | ||
86 | /* Enable PLL and IVREF */ | ||
87 | writel(readl(SATA1_PHY_MODE_2) | 0xf, SATA1_PHY_MODE_2); | ||
88 | /* Enable PHY */ | ||
89 | writel(readl(SATA1_IF_CTRL) & ~0x200, SATA1_IF_CTRL); | ||
90 | } | ||
91 | |||
92 | static void disable_sata1(void) | ||
93 | { | ||
94 | /* Disable PLL and IVREF */ | ||
95 | writel(readl(SATA1_PHY_MODE_2) & ~0xf, SATA1_PHY_MODE_2); | ||
96 | /* Disable PHY */ | ||
97 | writel(readl(SATA1_IF_CTRL) | 0x200, SATA1_IF_CTRL); | ||
98 | } | ||
99 | |||
100 | static void disable_pcie0(void) | ||
101 | { | ||
102 | writel(readl(PCIE_LINK_CTRL) | 0x10, PCIE_LINK_CTRL); | ||
103 | while (1) | ||
104 | if (readl(PCIE_STATUS) & 0x1) | ||
105 | break; | ||
106 | writel(readl(PCIE_LINK_CTRL) & ~0x10, PCIE_LINK_CTRL); | ||
107 | } | ||
108 | |||
109 | static void disable_pcie1(void) | ||
110 | { | ||
111 | u32 dev, rev; | ||
112 | |||
113 | kirkwood_pcie_id(&dev, &rev); | ||
114 | |||
115 | if (dev == MV88F6282_DEV_ID) { | ||
116 | writel(readl(PCIE1_LINK_CTRL) | 0x10, PCIE1_LINK_CTRL); | ||
117 | while (1) | ||
118 | if (readl(PCIE1_STATUS) & 0x1) | ||
119 | break; | ||
120 | writel(readl(PCIE1_LINK_CTRL) & ~0x10, PCIE1_LINK_CTRL); | ||
121 | } | ||
122 | } | ||
123 | |||
124 | /* An extended version of the gated clk. This calls fn_en()/fn_dis | ||
125 | * before enabling/disabling the clock. We use this to turn on/off | ||
126 | * PHYs etc. */ | ||
127 | struct clk_gate_fn { | ||
128 | struct clk_gate gate; | ||
129 | void (*fn_en)(void); | ||
130 | void (*fn_dis)(void); | ||
131 | }; | ||
132 | |||
133 | #define to_clk_gate_fn(_gate) container_of(_gate, struct clk_gate_fn, gate) | ||
134 | #define to_clk_gate(_hw) container_of(_hw, struct clk_gate, hw) | ||
135 | |||
136 | static int clk_gate_fn_enable(struct clk_hw *hw) | ||
137 | { | ||
138 | struct clk_gate *gate = to_clk_gate(hw); | ||
139 | struct clk_gate_fn *gate_fn = to_clk_gate_fn(gate); | ||
140 | int ret; | ||
141 | |||
142 | ret = clk_gate_ops.enable(hw); | ||
143 | if (!ret && gate_fn->fn_en) | ||
144 | gate_fn->fn_en(); | ||
145 | |||
146 | return ret; | ||
147 | } | ||
148 | |||
149 | static void clk_gate_fn_disable(struct clk_hw *hw) | ||
150 | { | ||
151 | struct clk_gate *gate = to_clk_gate(hw); | ||
152 | struct clk_gate_fn *gate_fn = to_clk_gate_fn(gate); | ||
153 | |||
154 | if (gate_fn->fn_dis) | ||
155 | gate_fn->fn_dis(); | ||
156 | |||
157 | clk_gate_ops.disable(hw); | ||
158 | } | ||
159 | |||
160 | static struct clk_ops clk_gate_fn_ops; | ||
161 | |||
162 | static struct clk __init *clk_register_gate_fn(struct device *dev, | ||
163 | const char *name, | ||
164 | const char *parent_name, unsigned long flags, | ||
165 | void __iomem *reg, u8 bit_idx, | ||
166 | u8 clk_gate_flags, spinlock_t *lock, | ||
167 | void (*fn_en)(void), void (*fn_dis)(void)) | ||
168 | { | ||
169 | struct clk_gate_fn *gate_fn; | ||
170 | struct clk *clk; | ||
171 | struct clk_init_data init; | ||
172 | |||
173 | gate_fn = kzalloc(sizeof(struct clk_gate_fn), GFP_KERNEL); | ||
174 | if (!gate_fn) { | ||
175 | pr_err("%s: could not allocate gated clk\n", __func__); | ||
176 | return ERR_PTR(-ENOMEM); | ||
177 | } | ||
178 | |||
179 | init.name = name; | ||
180 | init.ops = &clk_gate_fn_ops; | ||
181 | init.flags = flags; | ||
182 | init.parent_names = (parent_name ? &parent_name : NULL); | ||
183 | init.num_parents = (parent_name ? 1 : 0); | ||
184 | |||
185 | /* struct clk_gate assignments */ | ||
186 | gate_fn->gate.reg = reg; | ||
187 | gate_fn->gate.bit_idx = bit_idx; | ||
188 | gate_fn->gate.flags = clk_gate_flags; | ||
189 | gate_fn->gate.lock = lock; | ||
190 | gate_fn->gate.hw.init = &init; | ||
191 | gate_fn->fn_en = fn_en; | ||
192 | gate_fn->fn_dis = fn_dis; | ||
193 | |||
194 | /* ops is the gate ops, but with our enable/disable functions */ | ||
195 | if (clk_gate_fn_ops.enable != clk_gate_fn_enable || | ||
196 | clk_gate_fn_ops.disable != clk_gate_fn_disable) { | ||
197 | clk_gate_fn_ops = clk_gate_ops; | ||
198 | clk_gate_fn_ops.enable = clk_gate_fn_enable; | ||
199 | clk_gate_fn_ops.disable = clk_gate_fn_disable; | ||
200 | } | ||
201 | |||
202 | clk = clk_register(dev, &gate_fn->gate.hw); | ||
203 | |||
204 | if (IS_ERR(clk)) | ||
205 | kfree(gate_fn); | ||
206 | |||
207 | return clk; | ||
208 | } | ||
209 | |||
210 | static DEFINE_SPINLOCK(gating_lock); | ||
211 | static struct clk *tclk; | ||
212 | |||
213 | static struct clk __init *kirkwood_register_gate(const char *name, u8 bit_idx) | ||
214 | { | ||
215 | return clk_register_gate(NULL, name, "tclk", 0, CLOCK_GATING_CTRL, | ||
216 | bit_idx, 0, &gating_lock); | ||
217 | } | ||
218 | |||
219 | static struct clk __init *kirkwood_register_gate_fn(const char *name, | ||
220 | u8 bit_idx, | ||
221 | void (*fn_en)(void), | ||
222 | void (*fn_dis)(void)) | ||
223 | { | ||
224 | return clk_register_gate_fn(NULL, name, "tclk", 0, CLOCK_GATING_CTRL, | ||
225 | bit_idx, 0, &gating_lock, fn_en, fn_dis); | ||
226 | } | ||
227 | |||
228 | static struct clk *ge0, *ge1; | ||
229 | |||
230 | void __init kirkwood_clk_init(void) | ||
231 | { | ||
232 | struct clk *runit, *sata0, *sata1, *usb0, *sdio; | ||
233 | struct clk *crypto, *xor0, *xor1, *pex0, *pex1, *audio; | ||
234 | |||
235 | tclk = clk_register_fixed_rate(NULL, "tclk", NULL, | ||
236 | CLK_IS_ROOT, kirkwood_tclk); | ||
237 | |||
238 | runit = kirkwood_register_gate("runit", CGC_BIT_RUNIT); | ||
239 | ge0 = kirkwood_register_gate("ge0", CGC_BIT_GE0); | ||
240 | ge1 = kirkwood_register_gate("ge1", CGC_BIT_GE1); | ||
241 | sata0 = kirkwood_register_gate_fn("sata0", CGC_BIT_SATA0, | ||
242 | enable_sata0, disable_sata0); | ||
243 | sata1 = kirkwood_register_gate_fn("sata1", CGC_BIT_SATA1, | ||
244 | enable_sata1, disable_sata1); | ||
245 | usb0 = kirkwood_register_gate("usb0", CGC_BIT_USB0); | ||
246 | sdio = kirkwood_register_gate("sdio", CGC_BIT_SDIO); | ||
247 | crypto = kirkwood_register_gate("crypto", CGC_BIT_CRYPTO); | ||
248 | xor0 = kirkwood_register_gate("xor0", CGC_BIT_XOR0); | ||
249 | xor1 = kirkwood_register_gate("xor1", CGC_BIT_XOR1); | ||
250 | pex0 = kirkwood_register_gate_fn("pex0", CGC_BIT_PEX0, | ||
251 | NULL, disable_pcie0); | ||
252 | pex1 = kirkwood_register_gate_fn("pex1", CGC_BIT_PEX1, | ||
253 | NULL, disable_pcie1); | ||
254 | audio = kirkwood_register_gate("audio", CGC_BIT_AUDIO); | ||
255 | kirkwood_register_gate("tdm", CGC_BIT_TDM); | ||
256 | kirkwood_register_gate("tsu", CGC_BIT_TSU); | ||
257 | |||
258 | /* clkdev entries, mapping clks to devices */ | ||
259 | orion_clkdev_add(NULL, "orion_spi.0", runit); | ||
260 | orion_clkdev_add(NULL, "orion_spi.1", runit); | ||
261 | orion_clkdev_add(NULL, MV643XX_ETH_NAME ".0", ge0); | ||
262 | orion_clkdev_add(NULL, MV643XX_ETH_NAME ".1", ge1); | ||
263 | orion_clkdev_add(NULL, "orion_wdt", tclk); | ||
264 | orion_clkdev_add("0", "sata_mv.0", sata0); | ||
265 | orion_clkdev_add("1", "sata_mv.0", sata1); | ||
266 | orion_clkdev_add(NULL, "orion-ehci.0", usb0); | ||
267 | orion_clkdev_add(NULL, "orion_nand", runit); | ||
268 | orion_clkdev_add(NULL, "mvsdio", sdio); | ||
269 | orion_clkdev_add(NULL, "mv_crypto", crypto); | ||
270 | orion_clkdev_add(NULL, MV_XOR_NAME ".0", xor0); | ||
271 | orion_clkdev_add(NULL, MV_XOR_NAME ".1", xor1); | ||
272 | orion_clkdev_add("0", "pcie", pex0); | ||
273 | orion_clkdev_add("1", "pcie", pex1); | ||
274 | orion_clkdev_add(NULL, "mvebu-audio", audio); | ||
275 | orion_clkdev_add(NULL, MV64XXX_I2C_CTLR_NAME ".0", runit); | ||
276 | orion_clkdev_add(NULL, MV64XXX_I2C_CTLR_NAME ".1", runit); | ||
277 | |||
278 | /* Marvell says runit is used by SPI, UART, NAND, TWSI, ..., | ||
279 | * so should never be gated. | ||
280 | */ | ||
281 | clk_prepare_enable(runit); | ||
282 | } | ||
283 | |||
284 | /***************************************************************************** | ||
285 | * EHCI0 | ||
286 | ****************************************************************************/ | ||
287 | void __init kirkwood_ehci_init(void) | ||
288 | { | ||
289 | orion_ehci_init(USB_PHYS_BASE, IRQ_KIRKWOOD_USB, EHCI_PHY_NA); | ||
290 | } | ||
291 | |||
292 | |||
293 | /***************************************************************************** | ||
294 | * GE00 | ||
295 | ****************************************************************************/ | ||
296 | void __init kirkwood_ge00_init(struct mv643xx_eth_platform_data *eth_data) | ||
297 | { | ||
298 | orion_ge00_init(eth_data, | ||
299 | GE00_PHYS_BASE, IRQ_KIRKWOOD_GE00_SUM, | ||
300 | IRQ_KIRKWOOD_GE00_ERR, 1600); | ||
301 | /* The interface forgets the MAC address assigned by u-boot if | ||
302 | the clock is turned off, so claim the clk now. */ | ||
303 | clk_prepare_enable(ge0); | ||
304 | } | ||
305 | |||
306 | |||
307 | /***************************************************************************** | ||
308 | * GE01 | ||
309 | ****************************************************************************/ | ||
310 | void __init kirkwood_ge01_init(struct mv643xx_eth_platform_data *eth_data) | ||
311 | { | ||
312 | orion_ge01_init(eth_data, | ||
313 | GE01_PHYS_BASE, IRQ_KIRKWOOD_GE01_SUM, | ||
314 | IRQ_KIRKWOOD_GE01_ERR, 1600); | ||
315 | clk_prepare_enable(ge1); | ||
316 | } | ||
317 | |||
318 | |||
319 | /***************************************************************************** | ||
320 | * Ethernet switch | ||
321 | ****************************************************************************/ | ||
322 | void __init kirkwood_ge00_switch_init(struct dsa_platform_data *d, int irq) | ||
323 | { | ||
324 | orion_ge00_switch_init(d, irq); | ||
325 | } | ||
326 | |||
327 | |||
328 | /***************************************************************************** | ||
329 | * NAND flash | ||
330 | ****************************************************************************/ | ||
331 | static struct resource kirkwood_nand_resource = { | ||
332 | .flags = IORESOURCE_MEM, | ||
333 | .start = KIRKWOOD_NAND_MEM_PHYS_BASE, | ||
334 | .end = KIRKWOOD_NAND_MEM_PHYS_BASE + | ||
335 | KIRKWOOD_NAND_MEM_SIZE - 1, | ||
336 | }; | ||
337 | |||
338 | static struct orion_nand_data kirkwood_nand_data = { | ||
339 | .cle = 0, | ||
340 | .ale = 1, | ||
341 | .width = 8, | ||
342 | }; | ||
343 | |||
344 | static struct platform_device kirkwood_nand_flash = { | ||
345 | .name = "orion_nand", | ||
346 | .id = -1, | ||
347 | .dev = { | ||
348 | .platform_data = &kirkwood_nand_data, | ||
349 | }, | ||
350 | .resource = &kirkwood_nand_resource, | ||
351 | .num_resources = 1, | ||
352 | }; | ||
353 | |||
354 | void __init kirkwood_nand_init(struct mtd_partition *parts, int nr_parts, | ||
355 | int chip_delay) | ||
356 | { | ||
357 | kirkwood_nand_data.parts = parts; | ||
358 | kirkwood_nand_data.nr_parts = nr_parts; | ||
359 | kirkwood_nand_data.chip_delay = chip_delay; | ||
360 | platform_device_register(&kirkwood_nand_flash); | ||
361 | } | ||
362 | |||
363 | void __init kirkwood_nand_init_rnb(struct mtd_partition *parts, int nr_parts, | ||
364 | int (*dev_ready)(struct mtd_info *)) | ||
365 | { | ||
366 | kirkwood_nand_data.parts = parts; | ||
367 | kirkwood_nand_data.nr_parts = nr_parts; | ||
368 | kirkwood_nand_data.dev_ready = dev_ready; | ||
369 | platform_device_register(&kirkwood_nand_flash); | ||
370 | } | ||
371 | |||
372 | /***************************************************************************** | ||
373 | * SoC RTC | ||
374 | ****************************************************************************/ | ||
375 | static void __init kirkwood_rtc_init(void) | ||
376 | { | ||
377 | orion_rtc_init(RTC_PHYS_BASE, IRQ_KIRKWOOD_RTC); | ||
378 | } | ||
379 | |||
380 | |||
381 | /***************************************************************************** | ||
382 | * SATA | ||
383 | ****************************************************************************/ | ||
384 | void __init kirkwood_sata_init(struct mv_sata_platform_data *sata_data) | ||
385 | { | ||
386 | orion_sata_init(sata_data, SATA_PHYS_BASE, IRQ_KIRKWOOD_SATA); | ||
387 | } | ||
388 | |||
389 | |||
390 | /***************************************************************************** | ||
391 | * SD/SDIO/MMC | ||
392 | ****************************************************************************/ | ||
393 | static struct resource mvsdio_resources[] = { | ||
394 | [0] = { | ||
395 | .start = SDIO_PHYS_BASE, | ||
396 | .end = SDIO_PHYS_BASE + SZ_1K - 1, | ||
397 | .flags = IORESOURCE_MEM, | ||
398 | }, | ||
399 | [1] = { | ||
400 | .start = IRQ_KIRKWOOD_SDIO, | ||
401 | .end = IRQ_KIRKWOOD_SDIO, | ||
402 | .flags = IORESOURCE_IRQ, | ||
403 | }, | ||
404 | }; | ||
405 | |||
406 | static u64 mvsdio_dmamask = DMA_BIT_MASK(32); | ||
407 | |||
408 | static struct platform_device kirkwood_sdio = { | ||
409 | .name = "mvsdio", | ||
410 | .id = -1, | ||
411 | .dev = { | ||
412 | .dma_mask = &mvsdio_dmamask, | ||
413 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
414 | }, | ||
415 | .num_resources = ARRAY_SIZE(mvsdio_resources), | ||
416 | .resource = mvsdio_resources, | ||
417 | }; | ||
418 | |||
419 | void __init kirkwood_sdio_init(struct mvsdio_platform_data *mvsdio_data) | ||
420 | { | ||
421 | u32 dev, rev; | ||
422 | |||
423 | kirkwood_pcie_id(&dev, &rev); | ||
424 | if (rev == 0 && dev != MV88F6282_DEV_ID) /* catch all Kirkwood Z0's */ | ||
425 | mvsdio_data->clock = 100000000; | ||
426 | else | ||
427 | mvsdio_data->clock = 200000000; | ||
428 | kirkwood_sdio.dev.platform_data = mvsdio_data; | ||
429 | platform_device_register(&kirkwood_sdio); | ||
430 | } | ||
431 | |||
432 | |||
433 | /***************************************************************************** | ||
434 | * SPI | ||
435 | ****************************************************************************/ | ||
436 | void __init kirkwood_spi_init(void) | ||
437 | { | ||
438 | orion_spi_init(SPI_PHYS_BASE); | ||
439 | } | ||
440 | |||
441 | |||
442 | /***************************************************************************** | ||
443 | * I2C | ||
444 | ****************************************************************************/ | ||
445 | void __init kirkwood_i2c_init(void) | ||
446 | { | ||
447 | orion_i2c_init(I2C_PHYS_BASE, IRQ_KIRKWOOD_TWSI, 8); | ||
448 | } | ||
449 | |||
450 | |||
451 | /***************************************************************************** | ||
452 | * UART0 | ||
453 | ****************************************************************************/ | ||
454 | |||
455 | void __init kirkwood_uart0_init(void) | ||
456 | { | ||
457 | orion_uart0_init(UART0_VIRT_BASE, UART0_PHYS_BASE, | ||
458 | IRQ_KIRKWOOD_UART_0, tclk); | ||
459 | } | ||
460 | |||
461 | |||
462 | /***************************************************************************** | ||
463 | * UART1 | ||
464 | ****************************************************************************/ | ||
465 | void __init kirkwood_uart1_init(void) | ||
466 | { | ||
467 | orion_uart1_init(UART1_VIRT_BASE, UART1_PHYS_BASE, | ||
468 | IRQ_KIRKWOOD_UART_1, tclk); | ||
469 | } | ||
470 | |||
471 | /***************************************************************************** | ||
472 | * Cryptographic Engines and Security Accelerator (CESA) | ||
473 | ****************************************************************************/ | ||
474 | void __init kirkwood_crypto_init(void) | ||
475 | { | ||
476 | orion_crypto_init(CRYPTO_PHYS_BASE, KIRKWOOD_SRAM_PHYS_BASE, | ||
477 | KIRKWOOD_SRAM_SIZE, IRQ_KIRKWOOD_CRYPTO); | ||
478 | } | ||
479 | |||
480 | |||
481 | /***************************************************************************** | ||
482 | * XOR0 | ||
483 | ****************************************************************************/ | ||
484 | void __init kirkwood_xor0_init(void) | ||
485 | { | ||
486 | orion_xor0_init(XOR0_PHYS_BASE, XOR0_HIGH_PHYS_BASE, | ||
487 | IRQ_KIRKWOOD_XOR_00, IRQ_KIRKWOOD_XOR_01); | ||
488 | } | ||
489 | |||
490 | |||
491 | /***************************************************************************** | ||
492 | * XOR1 | ||
493 | ****************************************************************************/ | ||
494 | void __init kirkwood_xor1_init(void) | ||
495 | { | ||
496 | orion_xor1_init(XOR1_PHYS_BASE, XOR1_HIGH_PHYS_BASE, | ||
497 | IRQ_KIRKWOOD_XOR_10, IRQ_KIRKWOOD_XOR_11); | ||
498 | } | ||
499 | |||
500 | |||
501 | /***************************************************************************** | ||
502 | * Watchdog | ||
503 | ****************************************************************************/ | ||
504 | void __init kirkwood_wdt_init(void) | ||
505 | { | ||
506 | orion_wdt_init(); | ||
507 | } | ||
508 | |||
509 | /***************************************************************************** | ||
510 | * CPU idle | ||
511 | ****************************************************************************/ | ||
512 | static struct resource kirkwood_cpuidle_resource[] = { | ||
513 | { | ||
514 | .flags = IORESOURCE_MEM, | ||
515 | .start = DDR_OPERATION_BASE, | ||
516 | .end = DDR_OPERATION_BASE + 3, | ||
517 | }, | ||
518 | }; | ||
519 | |||
520 | static struct platform_device kirkwood_cpuidle = { | ||
521 | .name = "kirkwood_cpuidle", | ||
522 | .id = -1, | ||
523 | .resource = kirkwood_cpuidle_resource, | ||
524 | .num_resources = 1, | ||
525 | }; | ||
526 | |||
527 | void __init kirkwood_cpuidle_init(void) | ||
528 | { | ||
529 | platform_device_register(&kirkwood_cpuidle); | ||
530 | } | ||
531 | |||
532 | /***************************************************************************** | ||
533 | * Time handling | ||
534 | ****************************************************************************/ | ||
535 | void __init kirkwood_init_early(void) | ||
536 | { | ||
537 | orion_time_set_base(TIMER_VIRT_BASE); | ||
538 | } | ||
539 | |||
540 | int kirkwood_tclk; | ||
541 | |||
542 | static int __init kirkwood_find_tclk(void) | ||
543 | { | ||
544 | u32 dev, rev; | ||
545 | |||
546 | kirkwood_pcie_id(&dev, &rev); | ||
547 | |||
548 | if (dev == MV88F6281_DEV_ID || dev == MV88F6282_DEV_ID) | ||
549 | if (((readl(SAMPLE_AT_RESET) >> 21) & 1) == 0) | ||
550 | return 200000000; | ||
551 | |||
552 | return 166666667; | ||
553 | } | ||
554 | |||
555 | void __init kirkwood_timer_init(void) | ||
556 | { | ||
557 | kirkwood_tclk = kirkwood_find_tclk(); | ||
558 | |||
559 | orion_time_init(BRIDGE_VIRT_BASE, BRIDGE_INT_TIMER1_CLR, | ||
560 | IRQ_KIRKWOOD_BRIDGE, kirkwood_tclk); | ||
561 | } | ||
562 | |||
563 | /***************************************************************************** | ||
564 | * Audio | ||
565 | ****************************************************************************/ | ||
566 | static struct resource kirkwood_audio_resources[] = { | ||
567 | [0] = { | ||
568 | .start = AUDIO_PHYS_BASE, | ||
569 | .end = AUDIO_PHYS_BASE + SZ_16K - 1, | ||
570 | .flags = IORESOURCE_MEM, | ||
571 | }, | ||
572 | [1] = { | ||
573 | .start = IRQ_KIRKWOOD_I2S, | ||
574 | .end = IRQ_KIRKWOOD_I2S, | ||
575 | .flags = IORESOURCE_IRQ, | ||
576 | }, | ||
577 | }; | ||
578 | |||
579 | static struct kirkwood_asoc_platform_data kirkwood_audio_data = { | ||
580 | .burst = 128, | ||
581 | }; | ||
582 | |||
583 | static struct platform_device kirkwood_audio_device = { | ||
584 | .name = "mvebu-audio", | ||
585 | .id = -1, | ||
586 | .num_resources = ARRAY_SIZE(kirkwood_audio_resources), | ||
587 | .resource = kirkwood_audio_resources, | ||
588 | .dev = { | ||
589 | .platform_data = &kirkwood_audio_data, | ||
590 | }, | ||
591 | }; | ||
592 | |||
593 | void __init kirkwood_audio_init(void) | ||
594 | { | ||
595 | platform_device_register(&kirkwood_audio_device); | ||
596 | } | ||
597 | |||
598 | /***************************************************************************** | ||
599 | * CPU Frequency | ||
600 | ****************************************************************************/ | ||
601 | static struct resource kirkwood_cpufreq_resources[] = { | ||
602 | [0] = { | ||
603 | .start = CPU_CONTROL_PHYS, | ||
604 | .end = CPU_CONTROL_PHYS + 3, | ||
605 | .flags = IORESOURCE_MEM, | ||
606 | }, | ||
607 | }; | ||
608 | |||
609 | static struct platform_device kirkwood_cpufreq_device = { | ||
610 | .name = "kirkwood-cpufreq", | ||
611 | .id = -1, | ||
612 | .num_resources = ARRAY_SIZE(kirkwood_cpufreq_resources), | ||
613 | .resource = kirkwood_cpufreq_resources, | ||
614 | }; | ||
615 | |||
616 | void __init kirkwood_cpufreq_init(void) | ||
617 | { | ||
618 | platform_device_register(&kirkwood_cpufreq_device); | ||
619 | } | ||
620 | |||
621 | /***************************************************************************** | ||
622 | * General | ||
623 | ****************************************************************************/ | ||
624 | /* | ||
625 | * Identify device ID and revision. | ||
626 | */ | ||
627 | char * __init kirkwood_id(void) | ||
628 | { | ||
629 | u32 dev, rev; | ||
630 | |||
631 | kirkwood_pcie_id(&dev, &rev); | ||
632 | |||
633 | if (dev == MV88F6281_DEV_ID) { | ||
634 | if (rev == MV88F6281_REV_Z0) | ||
635 | return "MV88F6281-Z0"; | ||
636 | else if (rev == MV88F6281_REV_A0) | ||
637 | return "MV88F6281-A0"; | ||
638 | else if (rev == MV88F6281_REV_A1) | ||
639 | return "MV88F6281-A1"; | ||
640 | else | ||
641 | return "MV88F6281-Rev-Unsupported"; | ||
642 | } else if (dev == MV88F6192_DEV_ID) { | ||
643 | if (rev == MV88F6192_REV_Z0) | ||
644 | return "MV88F6192-Z0"; | ||
645 | else if (rev == MV88F6192_REV_A0) | ||
646 | return "MV88F6192-A0"; | ||
647 | else if (rev == MV88F6192_REV_A1) | ||
648 | return "MV88F6192-A1"; | ||
649 | else | ||
650 | return "MV88F6192-Rev-Unsupported"; | ||
651 | } else if (dev == MV88F6180_DEV_ID) { | ||
652 | if (rev == MV88F6180_REV_A0) | ||
653 | return "MV88F6180-Rev-A0"; | ||
654 | else if (rev == MV88F6180_REV_A1) | ||
655 | return "MV88F6180-Rev-A1"; | ||
656 | else | ||
657 | return "MV88F6180-Rev-Unsupported"; | ||
658 | } else if (dev == MV88F6282_DEV_ID) { | ||
659 | if (rev == MV88F6282_REV_A0) | ||
660 | return "MV88F6282-Rev-A0"; | ||
661 | else if (rev == MV88F6282_REV_A1) | ||
662 | return "MV88F6282-Rev-A1"; | ||
663 | else | ||
664 | return "MV88F6282-Rev-Unsupported"; | ||
665 | } else { | ||
666 | return "Device-Unknown"; | ||
667 | } | ||
668 | } | ||
669 | |||
670 | void __init kirkwood_setup_wins(void) | ||
671 | { | ||
672 | mvebu_mbus_add_window_by_id(KIRKWOOD_MBUS_NAND_TARGET, | ||
673 | KIRKWOOD_MBUS_NAND_ATTR, | ||
674 | KIRKWOOD_NAND_MEM_PHYS_BASE, | ||
675 | KIRKWOOD_NAND_MEM_SIZE); | ||
676 | mvebu_mbus_add_window_by_id(KIRKWOOD_MBUS_SRAM_TARGET, | ||
677 | KIRKWOOD_MBUS_SRAM_ATTR, | ||
678 | KIRKWOOD_SRAM_PHYS_BASE, | ||
679 | KIRKWOOD_SRAM_SIZE); | ||
680 | } | ||
681 | |||
682 | void __init kirkwood_l2_init(void) | ||
683 | { | ||
684 | #ifdef CONFIG_CACHE_FEROCEON_L2 | ||
685 | #ifdef CONFIG_CACHE_FEROCEON_L2_WRITETHROUGH | ||
686 | writel(readl(L2_CONFIG_REG) | L2_WRITETHROUGH, L2_CONFIG_REG); | ||
687 | feroceon_l2_init(1); | ||
688 | #else | ||
689 | writel(readl(L2_CONFIG_REG) & ~L2_WRITETHROUGH, L2_CONFIG_REG); | ||
690 | feroceon_l2_init(0); | ||
691 | #endif | ||
692 | #endif | ||
693 | } | ||
694 | |||
695 | void __init kirkwood_init(void) | ||
696 | { | ||
697 | pr_info("Kirkwood: %s, TCLK=%d.\n", kirkwood_id(), kirkwood_tclk); | ||
698 | |||
699 | /* | ||
700 | * Disable propagation of mbus errors to the CPU local bus, | ||
701 | * as this causes mbus errors (which can occur for example | ||
702 | * for PCI aborts) to throw CPU aborts, which we're not set | ||
703 | * up to deal with. | ||
704 | */ | ||
705 | writel(readl(CPU_CONFIG) & ~CPU_CONFIG_ERROR_PROP, CPU_CONFIG); | ||
706 | |||
707 | BUG_ON(mvebu_mbus_init("marvell,kirkwood-mbus", | ||
708 | BRIDGE_WINS_BASE, BRIDGE_WINS_SZ, | ||
709 | DDR_WINDOW_CPU_BASE, DDR_WINDOW_CPU_SZ)); | ||
710 | |||
711 | kirkwood_setup_wins(); | ||
712 | |||
713 | kirkwood_l2_init(); | ||
714 | |||
715 | /* Setup root of clk tree */ | ||
716 | kirkwood_clk_init(); | ||
717 | |||
718 | /* internal devices that every board has */ | ||
719 | kirkwood_rtc_init(); | ||
720 | kirkwood_wdt_init(); | ||
721 | kirkwood_xor0_init(); | ||
722 | kirkwood_xor1_init(); | ||
723 | kirkwood_crypto_init(); | ||
724 | |||
725 | kirkwood_pm_init(); | ||
726 | kirkwood_cpuidle_init(); | ||
727 | #ifdef CONFIG_KEXEC | ||
728 | kexec_reinit = kirkwood_enable_pcie; | ||
729 | #endif | ||
730 | } | ||
731 | |||
732 | void kirkwood_restart(enum reboot_mode mode, const char *cmd) | ||
733 | { | ||
734 | /* | ||
735 | * Enable soft reset to assert RSTOUTn. | ||
736 | */ | ||
737 | writel(SOFT_RESET_OUT_EN, RSTOUTn_MASK); | ||
738 | |||
739 | /* | ||
740 | * Assert soft reset. | ||
741 | */ | ||
742 | writel(SOFT_RESET, SYSTEM_SOFT_RESET); | ||
743 | |||
744 | while (1) | ||
745 | ; | ||
746 | } | ||
diff --git a/arch/arm/mach-kirkwood/common.h b/arch/arm/mach-kirkwood/common.h deleted file mode 100644 index 832a4e2ab8d7..000000000000 --- a/arch/arm/mach-kirkwood/common.h +++ /dev/null | |||
@@ -1,74 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-kirkwood/common.h | ||
3 | * | ||
4 | * Core functions for Marvell Kirkwood SoCs | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public | ||
7 | * License version 2. This program is licensed "as is" without any | ||
8 | * warranty of any kind, whether express or implied. | ||
9 | */ | ||
10 | |||
11 | #ifndef __ARCH_KIRKWOOD_COMMON_H | ||
12 | #define __ARCH_KIRKWOOD_COMMON_H | ||
13 | |||
14 | #include <linux/reboot.h> | ||
15 | |||
16 | struct dsa_platform_data; | ||
17 | struct mv643xx_eth_platform_data; | ||
18 | struct mv_sata_platform_data; | ||
19 | struct mvsdio_platform_data; | ||
20 | struct mtd_partition; | ||
21 | struct mtd_info; | ||
22 | struct kirkwood_asoc_platform_data; | ||
23 | |||
24 | #define KW_PCIE0 (1 << 0) | ||
25 | #define KW_PCIE1 (1 << 1) | ||
26 | |||
27 | /* | ||
28 | * Basic Kirkwood init functions used early by machine-setup. | ||
29 | */ | ||
30 | void kirkwood_map_io(void); | ||
31 | void kirkwood_init(void); | ||
32 | void kirkwood_init_early(void); | ||
33 | void kirkwood_init_irq(void); | ||
34 | |||
35 | void kirkwood_setup_wins(void); | ||
36 | |||
37 | void kirkwood_enable_pcie(void); | ||
38 | void kirkwood_pcie_id(u32 *dev, u32 *rev); | ||
39 | |||
40 | void kirkwood_ehci_init(void); | ||
41 | void kirkwood_ge00_init(struct mv643xx_eth_platform_data *eth_data); | ||
42 | void kirkwood_ge01_init(struct mv643xx_eth_platform_data *eth_data); | ||
43 | void kirkwood_ge00_switch_init(struct dsa_platform_data *d, int irq); | ||
44 | void kirkwood_pcie_init(unsigned int portmask); | ||
45 | void kirkwood_sata_init(struct mv_sata_platform_data *sata_data); | ||
46 | void kirkwood_sdio_init(struct mvsdio_platform_data *mvsdio_data); | ||
47 | void kirkwood_spi_init(void); | ||
48 | void kirkwood_i2c_init(void); | ||
49 | void kirkwood_uart0_init(void); | ||
50 | void kirkwood_uart1_init(void); | ||
51 | void kirkwood_nand_init(struct mtd_partition *parts, int nr_parts, int delay); | ||
52 | void kirkwood_nand_init_rnb(struct mtd_partition *parts, int nr_parts, | ||
53 | int (*dev_ready)(struct mtd_info *)); | ||
54 | void kirkwood_audio_init(void); | ||
55 | void kirkwood_cpuidle_init(void); | ||
56 | void kirkwood_cpufreq_init(void); | ||
57 | |||
58 | void kirkwood_restart(enum reboot_mode, const char *); | ||
59 | void kirkwood_clk_init(void); | ||
60 | |||
61 | /* early init functions not converted to fdt yet */ | ||
62 | char *kirkwood_id(void); | ||
63 | void kirkwood_l2_init(void); | ||
64 | void kirkwood_wdt_init(void); | ||
65 | void kirkwood_xor0_init(void); | ||
66 | void kirkwood_xor1_init(void); | ||
67 | void kirkwood_crypto_init(void); | ||
68 | |||
69 | extern int kirkwood_tclk; | ||
70 | extern void kirkwood_timer_init(void); | ||
71 | |||
72 | #define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x) | ||
73 | |||
74 | #endif | ||
diff --git a/arch/arm/mach-kirkwood/d2net_v2-setup.c b/arch/arm/mach-kirkwood/d2net_v2-setup.c deleted file mode 100644 index 453418063c1e..000000000000 --- a/arch/arm/mach-kirkwood/d2net_v2-setup.c +++ /dev/null | |||
@@ -1,231 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-kirkwood/d2net_v2-setup.c | ||
3 | * | ||
4 | * LaCie d2 Network Space 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 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
21 | */ | ||
22 | |||
23 | #include <linux/kernel.h> | ||
24 | #include <linux/init.h> | ||
25 | #include <linux/platform_device.h> | ||
26 | #include <linux/ata_platform.h> | ||
27 | #include <linux/mv643xx_eth.h> | ||
28 | #include <linux/input.h> | ||
29 | #include <linux/gpio.h> | ||
30 | #include <linux/gpio_keys.h> | ||
31 | #include <linux/leds.h> | ||
32 | #include <asm/mach-types.h> | ||
33 | #include <asm/mach/arch.h> | ||
34 | #include <mach/kirkwood.h> | ||
35 | #include <linux/platform_data/leds-kirkwood-ns2.h> | ||
36 | #include "common.h" | ||
37 | #include "mpp.h" | ||
38 | #include "lacie_v2-common.h" | ||
39 | |||
40 | /***************************************************************************** | ||
41 | * Ethernet | ||
42 | ****************************************************************************/ | ||
43 | |||
44 | static struct mv643xx_eth_platform_data d2net_v2_ge00_data = { | ||
45 | .phy_addr = MV643XX_ETH_PHY_ADDR(8), | ||
46 | }; | ||
47 | |||
48 | /***************************************************************************** | ||
49 | * SATA | ||
50 | ****************************************************************************/ | ||
51 | |||
52 | static struct mv_sata_platform_data d2net_v2_sata_data = { | ||
53 | .n_ports = 2, | ||
54 | }; | ||
55 | |||
56 | /***************************************************************************** | ||
57 | * GPIO keys | ||
58 | ****************************************************************************/ | ||
59 | |||
60 | #define D2NET_V2_GPIO_PUSH_BUTTON 34 | ||
61 | #define D2NET_V2_GPIO_POWER_SWITCH_ON 13 | ||
62 | #define D2NET_V2_GPIO_POWER_SWITCH_OFF 15 | ||
63 | |||
64 | #define D2NET_V2_SWITCH_POWER_ON 0x1 | ||
65 | #define D2NET_V2_SWITCH_POWER_OFF 0x2 | ||
66 | |||
67 | static struct gpio_keys_button d2net_v2_buttons[] = { | ||
68 | [0] = { | ||
69 | .type = EV_SW, | ||
70 | .code = D2NET_V2_SWITCH_POWER_ON, | ||
71 | .gpio = D2NET_V2_GPIO_POWER_SWITCH_ON, | ||
72 | .desc = "Back power switch (on|auto)", | ||
73 | .active_low = 0, | ||
74 | }, | ||
75 | [1] = { | ||
76 | .type = EV_SW, | ||
77 | .code = D2NET_V2_SWITCH_POWER_OFF, | ||
78 | .gpio = D2NET_V2_GPIO_POWER_SWITCH_OFF, | ||
79 | .desc = "Back power switch (auto|off)", | ||
80 | .active_low = 0, | ||
81 | }, | ||
82 | [2] = { | ||
83 | .code = KEY_POWER, | ||
84 | .gpio = D2NET_V2_GPIO_PUSH_BUTTON, | ||
85 | .desc = "Front Push Button", | ||
86 | .active_low = 1, | ||
87 | }, | ||
88 | }; | ||
89 | |||
90 | static struct gpio_keys_platform_data d2net_v2_button_data = { | ||
91 | .buttons = d2net_v2_buttons, | ||
92 | .nbuttons = ARRAY_SIZE(d2net_v2_buttons), | ||
93 | }; | ||
94 | |||
95 | static struct platform_device d2net_v2_gpio_buttons = { | ||
96 | .name = "gpio-keys", | ||
97 | .id = -1, | ||
98 | .dev = { | ||
99 | .platform_data = &d2net_v2_button_data, | ||
100 | }, | ||
101 | }; | ||
102 | |||
103 | /***************************************************************************** | ||
104 | * GPIO LEDs | ||
105 | ****************************************************************************/ | ||
106 | |||
107 | #define D2NET_V2_GPIO_RED_LED 12 | ||
108 | |||
109 | static struct gpio_led d2net_v2_gpio_led_pins[] = { | ||
110 | { | ||
111 | .name = "d2net_v2:red:fail", | ||
112 | .gpio = D2NET_V2_GPIO_RED_LED, | ||
113 | }, | ||
114 | }; | ||
115 | |||
116 | static struct gpio_led_platform_data d2net_v2_gpio_leds_data = { | ||
117 | .num_leds = ARRAY_SIZE(d2net_v2_gpio_led_pins), | ||
118 | .leds = d2net_v2_gpio_led_pins, | ||
119 | }; | ||
120 | |||
121 | static struct platform_device d2net_v2_gpio_leds = { | ||
122 | .name = "leds-gpio", | ||
123 | .id = -1, | ||
124 | .dev = { | ||
125 | .platform_data = &d2net_v2_gpio_leds_data, | ||
126 | }, | ||
127 | }; | ||
128 | |||
129 | /***************************************************************************** | ||
130 | * Dual-GPIO CPLD LEDs | ||
131 | ****************************************************************************/ | ||
132 | |||
133 | #define D2NET_V2_GPIO_BLUE_LED_SLOW 29 | ||
134 | #define D2NET_V2_GPIO_BLUE_LED_CMD 30 | ||
135 | |||
136 | static struct ns2_led d2net_v2_led_pins[] = { | ||
137 | { | ||
138 | .name = "d2net_v2:blue:sata", | ||
139 | .cmd = D2NET_V2_GPIO_BLUE_LED_CMD, | ||
140 | .slow = D2NET_V2_GPIO_BLUE_LED_SLOW, | ||
141 | }, | ||
142 | }; | ||
143 | |||
144 | static struct ns2_led_platform_data d2net_v2_leds_data = { | ||
145 | .num_leds = ARRAY_SIZE(d2net_v2_led_pins), | ||
146 | .leds = d2net_v2_led_pins, | ||
147 | }; | ||
148 | |||
149 | static struct platform_device d2net_v2_leds = { | ||
150 | .name = "leds-ns2", | ||
151 | .id = -1, | ||
152 | .dev = { | ||
153 | .platform_data = &d2net_v2_leds_data, | ||
154 | }, | ||
155 | }; | ||
156 | |||
157 | /***************************************************************************** | ||
158 | * General Setup | ||
159 | ****************************************************************************/ | ||
160 | |||
161 | static unsigned int d2net_v2_mpp_config[] __initdata = { | ||
162 | MPP0_SPI_SCn, | ||
163 | MPP1_SPI_MOSI, | ||
164 | MPP2_SPI_SCK, | ||
165 | MPP3_SPI_MISO, | ||
166 | MPP6_SYSRST_OUTn, | ||
167 | MPP7_GPO, /* Request power-off */ | ||
168 | MPP8_TW0_SDA, | ||
169 | MPP9_TW0_SCK, | ||
170 | MPP10_UART0_TXD, | ||
171 | MPP11_UART0_RXD, | ||
172 | MPP12_GPO, /* Red led */ | ||
173 | MPP13_GPIO, /* Rear power switch (on|auto) */ | ||
174 | MPP14_GPIO, /* USB fuse */ | ||
175 | MPP15_GPIO, /* Rear power switch (auto|off) */ | ||
176 | MPP16_GPIO, /* SATA 0 power */ | ||
177 | MPP21_SATA0_ACTn, | ||
178 | MPP24_GPIO, /* USB mode select */ | ||
179 | MPP26_GPIO, /* USB device vbus */ | ||
180 | MPP28_GPIO, /* USB enable host vbus */ | ||
181 | MPP29_GPIO, /* Blue led (slow register) */ | ||
182 | MPP30_GPIO, /* Blue led (command register) */ | ||
183 | MPP34_GPIO, /* Power button (1 = Released, 0 = Pushed) */ | ||
184 | MPP35_GPIO, /* Inhibit power-off */ | ||
185 | 0 | ||
186 | }; | ||
187 | |||
188 | #define D2NET_V2_GPIO_POWER_OFF 7 | ||
189 | |||
190 | static void d2net_v2_power_off(void) | ||
191 | { | ||
192 | gpio_set_value(D2NET_V2_GPIO_POWER_OFF, 1); | ||
193 | } | ||
194 | |||
195 | static void __init d2net_v2_init(void) | ||
196 | { | ||
197 | /* | ||
198 | * Basic setup. Needs to be called early. | ||
199 | */ | ||
200 | kirkwood_init(); | ||
201 | kirkwood_mpp_conf(d2net_v2_mpp_config); | ||
202 | |||
203 | lacie_v2_hdd_power_init(1); | ||
204 | |||
205 | kirkwood_ehci_init(); | ||
206 | kirkwood_ge00_init(&d2net_v2_ge00_data); | ||
207 | kirkwood_sata_init(&d2net_v2_sata_data); | ||
208 | kirkwood_uart0_init(); | ||
209 | lacie_v2_register_flash(); | ||
210 | lacie_v2_register_i2c_devices(); | ||
211 | |||
212 | platform_device_register(&d2net_v2_leds); | ||
213 | platform_device_register(&d2net_v2_gpio_leds); | ||
214 | platform_device_register(&d2net_v2_gpio_buttons); | ||
215 | |||
216 | if (gpio_request(D2NET_V2_GPIO_POWER_OFF, "power-off") == 0 && | ||
217 | gpio_direction_output(D2NET_V2_GPIO_POWER_OFF, 0) == 0) | ||
218 | pm_power_off = d2net_v2_power_off; | ||
219 | else | ||
220 | pr_err("d2net_v2: failed to configure power-off GPIO\n"); | ||
221 | } | ||
222 | |||
223 | MACHINE_START(D2NET_V2, "LaCie d2 Network v2") | ||
224 | .atag_offset = 0x100, | ||
225 | .init_machine = d2net_v2_init, | ||
226 | .map_io = kirkwood_map_io, | ||
227 | .init_early = kirkwood_init_early, | ||
228 | .init_irq = kirkwood_init_irq, | ||
229 | .init_time = kirkwood_timer_init, | ||
230 | .restart = kirkwood_restart, | ||
231 | MACHINE_END | ||
diff --git a/arch/arm/mach-kirkwood/include/mach/bridge-regs.h b/arch/arm/mach-kirkwood/include/mach/bridge-regs.h deleted file mode 100644 index 1c37082c8b39..000000000000 --- a/arch/arm/mach-kirkwood/include/mach/bridge-regs.h +++ /dev/null | |||
@@ -1,86 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-kirkwood/include/mach/bridge-regs.h | ||
3 | * | ||
4 | * Mbus-L to Mbus Bridge Registers | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public | ||
7 | * License version 2. This program is licensed "as is" without any | ||
8 | * warranty of any kind, whether express or implied. | ||
9 | */ | ||
10 | |||
11 | #ifndef __ASM_ARCH_BRIDGE_REGS_H | ||
12 | #define __ASM_ARCH_BRIDGE_REGS_H | ||
13 | |||
14 | #include <mach/kirkwood.h> | ||
15 | |||
16 | #define CPU_CONFIG (BRIDGE_VIRT_BASE + 0x0100) | ||
17 | #define CPU_CONFIG_PHYS (BRIDGE_PHYS_BASE + 0x0100) | ||
18 | #define CPU_CONFIG_ERROR_PROP 0x00000004 | ||
19 | |||
20 | #define CPU_CONTROL (BRIDGE_VIRT_BASE + 0x0104) | ||
21 | #define CPU_CONTROL_PHYS (BRIDGE_PHYS_BASE + 0x0104) | ||
22 | #define CPU_RESET 0x00000002 | ||
23 | |||
24 | #define RSTOUTn_MASK (BRIDGE_VIRT_BASE + 0x0108) | ||
25 | #define RSTOUTn_MASK_PHYS (BRIDGE_PHYS_BASE + 0x0108) | ||
26 | #define SOFT_RESET_OUT_EN 0x00000004 | ||
27 | |||
28 | #define SYSTEM_SOFT_RESET (BRIDGE_VIRT_BASE + 0x010c) | ||
29 | #define SOFT_RESET 0x00000001 | ||
30 | |||
31 | #define BRIDGE_CAUSE (BRIDGE_VIRT_BASE + 0x0110) | ||
32 | |||
33 | #define BRIDGE_INT_TIMER1_CLR (~0x0004) | ||
34 | |||
35 | #define IRQ_VIRT_BASE (BRIDGE_VIRT_BASE + 0x0200) | ||
36 | #define IRQ_CAUSE_LOW_OFF 0x0000 | ||
37 | #define IRQ_MASK_LOW_OFF 0x0004 | ||
38 | #define IRQ_CAUSE_HIGH_OFF 0x0010 | ||
39 | #define IRQ_MASK_HIGH_OFF 0x0014 | ||
40 | |||
41 | #define TIMER_VIRT_BASE (BRIDGE_VIRT_BASE + 0x0300) | ||
42 | #define TIMER_PHYS_BASE (BRIDGE_PHYS_BASE + 0x0300) | ||
43 | |||
44 | #define L2_CONFIG_REG (BRIDGE_VIRT_BASE + 0x0128) | ||
45 | #define L2_WRITETHROUGH 0x00000010 | ||
46 | |||
47 | #define CLOCK_GATING_CTRL (BRIDGE_VIRT_BASE + 0x11c) | ||
48 | #define CGC_BIT_GE0 (0) | ||
49 | #define CGC_BIT_PEX0 (2) | ||
50 | #define CGC_BIT_USB0 (3) | ||
51 | #define CGC_BIT_SDIO (4) | ||
52 | #define CGC_BIT_TSU (5) | ||
53 | #define CGC_BIT_DUNIT (6) | ||
54 | #define CGC_BIT_RUNIT (7) | ||
55 | #define CGC_BIT_XOR0 (8) | ||
56 | #define CGC_BIT_AUDIO (9) | ||
57 | #define CGC_BIT_SATA0 (14) | ||
58 | #define CGC_BIT_SATA1 (15) | ||
59 | #define CGC_BIT_XOR1 (16) | ||
60 | #define CGC_BIT_CRYPTO (17) | ||
61 | #define CGC_BIT_PEX1 (18) | ||
62 | #define CGC_BIT_GE1 (19) | ||
63 | #define CGC_BIT_TDM (20) | ||
64 | #define CGC_GE0 (1 << 0) | ||
65 | #define CGC_PEX0 (1 << 2) | ||
66 | #define CGC_USB0 (1 << 3) | ||
67 | #define CGC_SDIO (1 << 4) | ||
68 | #define CGC_TSU (1 << 5) | ||
69 | #define CGC_DUNIT (1 << 6) | ||
70 | #define CGC_RUNIT (1 << 7) | ||
71 | #define CGC_XOR0 (1 << 8) | ||
72 | #define CGC_AUDIO (1 << 9) | ||
73 | #define CGC_POWERSAVE (1 << 11) | ||
74 | #define CGC_SATA0 (1 << 14) | ||
75 | #define CGC_SATA1 (1 << 15) | ||
76 | #define CGC_XOR1 (1 << 16) | ||
77 | #define CGC_CRYPTO (1 << 17) | ||
78 | #define CGC_PEX1 (1 << 18) | ||
79 | #define CGC_GE1 (1 << 19) | ||
80 | #define CGC_TDM (1 << 20) | ||
81 | #define CGC_RESERVED (0x6 << 21) | ||
82 | |||
83 | #define MEMORY_PM_CTRL (BRIDGE_VIRT_BASE + 0x118) | ||
84 | #define MEMORY_PM_CTRL_PHYS (BRIDGE_PHYS_BASE + 0x118) | ||
85 | |||
86 | #endif | ||
diff --git a/arch/arm/mach-kirkwood/include/mach/entry-macro.S b/arch/arm/mach-kirkwood/include/mach/entry-macro.S deleted file mode 100644 index 82db29f7af8f..000000000000 --- a/arch/arm/mach-kirkwood/include/mach/entry-macro.S +++ /dev/null | |||
@@ -1,34 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-kirkwood/include/mach/entry-macro.S | ||
3 | * | ||
4 | * Low-level IRQ helper macros for Marvell Kirkwood platforms | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public | ||
7 | * License version 2. This program is licensed "as is" without any | ||
8 | * warranty of any kind, whether express or implied. | ||
9 | */ | ||
10 | |||
11 | #include <mach/bridge-regs.h> | ||
12 | |||
13 | .macro get_irqnr_preamble, base, tmp | ||
14 | ldr \base, =IRQ_VIRT_BASE | ||
15 | .endm | ||
16 | |||
17 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
18 | @ check low interrupts | ||
19 | ldr \irqstat, [\base, #IRQ_CAUSE_LOW_OFF] | ||
20 | ldr \tmp, [\base, #IRQ_MASK_LOW_OFF] | ||
21 | mov \irqnr, #31 | ||
22 | ands \irqstat, \irqstat, \tmp | ||
23 | bne 1001f | ||
24 | |||
25 | @ if no low interrupts set, check high interrupts | ||
26 | ldr \irqstat, [\base, #IRQ_CAUSE_HIGH_OFF] | ||
27 | ldr \tmp, [\base, #IRQ_MASK_HIGH_OFF] | ||
28 | mov \irqnr, #63 | ||
29 | ands \irqstat, \irqstat, \tmp | ||
30 | |||
31 | @ find first active interrupt source | ||
32 | 1001: clzne \irqstat, \irqstat | ||
33 | subne \irqnr, \irqnr, \irqstat | ||
34 | .endm | ||
diff --git a/arch/arm/mach-kirkwood/include/mach/hardware.h b/arch/arm/mach-kirkwood/include/mach/hardware.h deleted file mode 100644 index 742b74f43e41..000000000000 --- a/arch/arm/mach-kirkwood/include/mach/hardware.h +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-kirkwood/include/mach/hardware.h | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | */ | ||
8 | |||
9 | #ifndef __ASM_ARCH_HARDWARE_H | ||
10 | #define __ASM_ARCH_HARDWARE_H | ||
11 | |||
12 | #include "kirkwood.h" | ||
13 | |||
14 | #endif | ||
diff --git a/arch/arm/mach-kirkwood/include/mach/irqs.h b/arch/arm/mach-kirkwood/include/mach/irqs.h deleted file mode 100644 index 2bf8161e3b51..000000000000 --- a/arch/arm/mach-kirkwood/include/mach/irqs.h +++ /dev/null | |||
@@ -1,65 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-kirkwood/include/mach/irqs.h | ||
3 | * | ||
4 | * IRQ definitions for Marvell Kirkwood SoCs | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public | ||
7 | * License version 2. This program is licensed "as is" without any | ||
8 | * warranty of any kind, whether express or implied. | ||
9 | */ | ||
10 | |||
11 | #ifndef __ASM_ARCH_IRQS_H | ||
12 | #define __ASM_ARCH_IRQS_H | ||
13 | |||
14 | /* | ||
15 | * Low Interrupt Controller | ||
16 | */ | ||
17 | #define IRQ_KIRKWOOD_HIGH_SUM 0 | ||
18 | #define IRQ_KIRKWOOD_BRIDGE 1 | ||
19 | #define IRQ_KIRKWOOD_HOST2CPU 2 | ||
20 | #define IRQ_KIRKWOOD_CPU2HOST 3 | ||
21 | #define IRQ_KIRKWOOD_XOR_00 5 | ||
22 | #define IRQ_KIRKWOOD_XOR_01 6 | ||
23 | #define IRQ_KIRKWOOD_XOR_10 7 | ||
24 | #define IRQ_KIRKWOOD_XOR_11 8 | ||
25 | #define IRQ_KIRKWOOD_PCIE 9 | ||
26 | #define IRQ_KIRKWOOD_PCIE1 10 | ||
27 | #define IRQ_KIRKWOOD_GE00_SUM 11 | ||
28 | #define IRQ_KIRKWOOD_GE01_SUM 15 | ||
29 | #define IRQ_KIRKWOOD_USB 19 | ||
30 | #define IRQ_KIRKWOOD_SATA 21 | ||
31 | #define IRQ_KIRKWOOD_CRYPTO 22 | ||
32 | #define IRQ_KIRKWOOD_SPI 23 | ||
33 | #define IRQ_KIRKWOOD_I2S 24 | ||
34 | #define IRQ_KIRKWOOD_TS_0 26 | ||
35 | #define IRQ_KIRKWOOD_SDIO 28 | ||
36 | #define IRQ_KIRKWOOD_TWSI 29 | ||
37 | #define IRQ_KIRKWOOD_AVB 30 | ||
38 | #define IRQ_KIRKWOOD_TDMI 31 | ||
39 | |||
40 | /* | ||
41 | * High Interrupt Controller | ||
42 | */ | ||
43 | #define IRQ_KIRKWOOD_UART_0 33 | ||
44 | #define IRQ_KIRKWOOD_UART_1 34 | ||
45 | #define IRQ_KIRKWOOD_GPIO_LOW_0_7 35 | ||
46 | #define IRQ_KIRKWOOD_GPIO_LOW_8_15 36 | ||
47 | #define IRQ_KIRKWOOD_GPIO_LOW_16_23 37 | ||
48 | #define IRQ_KIRKWOOD_GPIO_LOW_24_31 38 | ||
49 | #define IRQ_KIRKWOOD_GPIO_HIGH_0_7 39 | ||
50 | #define IRQ_KIRKWOOD_GPIO_HIGH_8_15 40 | ||
51 | #define IRQ_KIRKWOOD_GPIO_HIGH_16_23 41 | ||
52 | #define IRQ_KIRKWOOD_GE00_ERR 46 | ||
53 | #define IRQ_KIRKWOOD_GE01_ERR 47 | ||
54 | #define IRQ_KIRKWOOD_RTC 53 | ||
55 | |||
56 | /* | ||
57 | * KIRKWOOD General Purpose Pins | ||
58 | */ | ||
59 | #define IRQ_KIRKWOOD_GPIO_START 64 | ||
60 | #define NR_GPIO_IRQS 50 | ||
61 | |||
62 | #define NR_IRQS (IRQ_KIRKWOOD_GPIO_START + NR_GPIO_IRQS) | ||
63 | |||
64 | |||
65 | #endif | ||
diff --git a/arch/arm/mach-kirkwood/include/mach/kirkwood.h b/arch/arm/mach-kirkwood/include/mach/kirkwood.h deleted file mode 100644 index 92976cef3910..000000000000 --- a/arch/arm/mach-kirkwood/include/mach/kirkwood.h +++ /dev/null | |||
@@ -1,142 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-kirkwood/include/mach/kirkwood.h | ||
3 | * | ||
4 | * Generic definitions for Marvell Kirkwood SoC flavors: | ||
5 | * 88F6180, 88F6192 and 88F6281. | ||
6 | * | ||
7 | * This file is licensed under the terms of the GNU General Public | ||
8 | * License version 2. This program is licensed "as is" without any | ||
9 | * warranty of any kind, whether express or implied. | ||
10 | */ | ||
11 | |||
12 | #ifndef __ASM_ARCH_KIRKWOOD_H | ||
13 | #define __ASM_ARCH_KIRKWOOD_H | ||
14 | |||
15 | /* | ||
16 | * Marvell Kirkwood address maps. | ||
17 | * | ||
18 | * phys | ||
19 | * e0000000 PCIe #0 Memory space | ||
20 | * e8000000 PCIe #1 Memory space | ||
21 | * f1000000 on-chip peripheral registers | ||
22 | * f2000000 PCIe #0 I/O space | ||
23 | * f3000000 PCIe #1 I/O space | ||
24 | * f4000000 NAND controller address window | ||
25 | * f5000000 Security Accelerator SRAM | ||
26 | * | ||
27 | * virt phys size | ||
28 | * fed00000 f1000000 1M on-chip peripheral registers | ||
29 | * fee00000 f2000000 1M PCIe #0 I/O space | ||
30 | * fef00000 f3000000 1M PCIe #1 I/O space | ||
31 | */ | ||
32 | |||
33 | #define KIRKWOOD_SRAM_PHYS_BASE 0xf5000000 | ||
34 | #define KIRKWOOD_SRAM_SIZE SZ_2K | ||
35 | |||
36 | #define KIRKWOOD_NAND_MEM_PHYS_BASE 0xf4000000 | ||
37 | #define KIRKWOOD_NAND_MEM_SIZE SZ_1K | ||
38 | |||
39 | #define KIRKWOOD_PCIE1_IO_PHYS_BASE 0xf3000000 | ||
40 | #define KIRKWOOD_PCIE1_IO_BUS_BASE 0x00010000 | ||
41 | #define KIRKWOOD_PCIE1_IO_SIZE SZ_64K | ||
42 | |||
43 | #define KIRKWOOD_PCIE_IO_PHYS_BASE 0xf2000000 | ||
44 | #define KIRKWOOD_PCIE_IO_BUS_BASE 0x00000000 | ||
45 | #define KIRKWOOD_PCIE_IO_SIZE SZ_64K | ||
46 | |||
47 | #define KIRKWOOD_REGS_PHYS_BASE 0xf1000000 | ||
48 | #define KIRKWOOD_REGS_VIRT_BASE IOMEM(0xfed00000) | ||
49 | #define KIRKWOOD_REGS_SIZE SZ_1M | ||
50 | |||
51 | #define KIRKWOOD_PCIE_MEM_PHYS_BASE 0xe0000000 | ||
52 | #define KIRKWOOD_PCIE_MEM_BUS_BASE 0xe0000000 | ||
53 | #define KIRKWOOD_PCIE_MEM_SIZE SZ_128M | ||
54 | |||
55 | #define KIRKWOOD_PCIE1_MEM_PHYS_BASE 0xe8000000 | ||
56 | #define KIRKWOOD_PCIE1_MEM_BUS_BASE 0xe8000000 | ||
57 | #define KIRKWOOD_PCIE1_MEM_SIZE SZ_128M | ||
58 | |||
59 | /* | ||
60 | * Register Map | ||
61 | */ | ||
62 | #define DDR_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE + 0x00000) | ||
63 | #define DDR_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE + 0x00000) | ||
64 | #define DDR_WINDOW_CPU_BASE (DDR_PHYS_BASE + 0x1500) | ||
65 | #define DDR_WINDOW_CPU_SZ (0x20) | ||
66 | #define DDR_OPERATION_BASE (DDR_PHYS_BASE + 0x1418) | ||
67 | |||
68 | #define DEV_BUS_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE + 0x10000) | ||
69 | #define DEV_BUS_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE + 0x10000) | ||
70 | #define SAMPLE_AT_RESET (DEV_BUS_VIRT_BASE + 0x0030) | ||
71 | #define DEVICE_ID (DEV_BUS_VIRT_BASE + 0x0034) | ||
72 | #define GPIO_LOW_VIRT_BASE (DEV_BUS_VIRT_BASE + 0x0100) | ||
73 | #define GPIO_HIGH_VIRT_BASE (DEV_BUS_VIRT_BASE + 0x0140) | ||
74 | #define RTC_PHYS_BASE (DEV_BUS_PHYS_BASE + 0x0300) | ||
75 | #define SPI_PHYS_BASE (DEV_BUS_PHYS_BASE + 0x0600) | ||
76 | #define I2C_PHYS_BASE (DEV_BUS_PHYS_BASE + 0x1000) | ||
77 | #define UART0_PHYS_BASE (DEV_BUS_PHYS_BASE + 0x2000) | ||
78 | #define UART0_VIRT_BASE (DEV_BUS_VIRT_BASE + 0x2000) | ||
79 | #define UART1_PHYS_BASE (DEV_BUS_PHYS_BASE + 0x2100) | ||
80 | #define UART1_VIRT_BASE (DEV_BUS_VIRT_BASE + 0x2100) | ||
81 | |||
82 | #define BRIDGE_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE + 0x20000) | ||
83 | #define BRIDGE_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE + 0x20000) | ||
84 | #define BRIDGE_WINS_BASE (BRIDGE_PHYS_BASE) | ||
85 | #define BRIDGE_WINS_SZ (0x80) | ||
86 | |||
87 | #define CRYPTO_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE + 0x30000) | ||
88 | |||
89 | #define PCIE_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE + 0x40000) | ||
90 | #define PCIE_LINK_CTRL (PCIE_VIRT_BASE + 0x70) | ||
91 | #define PCIE_STATUS (PCIE_VIRT_BASE + 0x1a04) | ||
92 | #define PCIE1_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE + 0x44000) | ||
93 | #define PCIE1_LINK_CTRL (PCIE1_VIRT_BASE + 0x70) | ||
94 | #define PCIE1_STATUS (PCIE1_VIRT_BASE + 0x1a04) | ||
95 | |||
96 | #define USB_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE + 0x50000) | ||
97 | |||
98 | #define XOR0_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE + 0x60800) | ||
99 | #define XOR0_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE + 0x60800) | ||
100 | #define XOR1_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE + 0x60900) | ||
101 | #define XOR1_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE + 0x60900) | ||
102 | #define XOR0_HIGH_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE + 0x60A00) | ||
103 | #define XOR0_HIGH_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE + 0x60A00) | ||
104 | #define XOR1_HIGH_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE + 0x60B00) | ||
105 | #define XOR1_HIGH_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE + 0x60B00) | ||
106 | |||
107 | #define GE00_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE + 0x70000) | ||
108 | #define GE01_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE + 0x74000) | ||
109 | |||
110 | #define SATA_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE + 0x80000) | ||
111 | #define SATA_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE + 0x80000) | ||
112 | #define SATA0_IF_CTRL (SATA_VIRT_BASE + 0x2050) | ||
113 | #define SATA0_PHY_MODE_2 (SATA_VIRT_BASE + 0x2330) | ||
114 | #define SATA1_IF_CTRL (SATA_VIRT_BASE + 0x4050) | ||
115 | #define SATA1_PHY_MODE_2 (SATA_VIRT_BASE + 0x4330) | ||
116 | |||
117 | #define SDIO_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE + 0x90000) | ||
118 | |||
119 | #define AUDIO_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE + 0xA0000) | ||
120 | #define AUDIO_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE + 0xA0000) | ||
121 | |||
122 | /* | ||
123 | * Supported devices and revisions. | ||
124 | */ | ||
125 | #define MV88F6281_DEV_ID 0x6281 | ||
126 | #define MV88F6281_REV_Z0 0 | ||
127 | #define MV88F6281_REV_A0 2 | ||
128 | #define MV88F6281_REV_A1 3 | ||
129 | |||
130 | #define MV88F6192_DEV_ID 0x6192 | ||
131 | #define MV88F6192_REV_Z0 0 | ||
132 | #define MV88F6192_REV_A0 2 | ||
133 | #define MV88F6192_REV_A1 3 | ||
134 | |||
135 | #define MV88F6180_DEV_ID 0x6180 | ||
136 | #define MV88F6180_REV_A0 2 | ||
137 | #define MV88F6180_REV_A1 3 | ||
138 | |||
139 | #define MV88F6282_DEV_ID 0x6282 | ||
140 | #define MV88F6282_REV_A0 0 | ||
141 | #define MV88F6282_REV_A1 1 | ||
142 | #endif | ||
diff --git a/arch/arm/mach-kirkwood/include/mach/uncompress.h b/arch/arm/mach-kirkwood/include/mach/uncompress.h deleted file mode 100644 index 5bca5534021f..000000000000 --- a/arch/arm/mach-kirkwood/include/mach/uncompress.h +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-kirkwood/include/mach/uncompress.h | ||
3 | * | ||
4 | * This file is licensed under the terms of the GNU General Public | ||
5 | * License version 2. This program is licensed "as is" without any | ||
6 | * warranty of any kind, whether express or implied. | ||
7 | */ | ||
8 | |||
9 | #include <linux/serial_reg.h> | ||
10 | #include <mach/kirkwood.h> | ||
11 | |||
12 | #define SERIAL_BASE ((unsigned char *)UART0_PHYS_BASE) | ||
13 | |||
14 | static void putc(const char c) | ||
15 | { | ||
16 | unsigned char *base = SERIAL_BASE; | ||
17 | int i; | ||
18 | |||
19 | for (i = 0; i < 0x1000; i++) { | ||
20 | if (base[UART_LSR << 2] & UART_LSR_THRE) | ||
21 | break; | ||
22 | barrier(); | ||
23 | } | ||
24 | |||
25 | base[UART_TX << 2] = c; | ||
26 | } | ||
27 | |||
28 | static void flush(void) | ||
29 | { | ||
30 | unsigned char *base = SERIAL_BASE; | ||
31 | unsigned char mask; | ||
32 | int i; | ||
33 | |||
34 | mask = UART_LSR_TEMT | UART_LSR_THRE; | ||
35 | |||
36 | for (i = 0; i < 0x1000; i++) { | ||
37 | if ((base[UART_LSR << 2] & mask) == mask) | ||
38 | break; | ||
39 | barrier(); | ||
40 | } | ||
41 | } | ||
42 | |||
43 | /* | ||
44 | * nothing to do | ||
45 | */ | ||
46 | #define arch_decomp_setup() | ||
diff --git a/arch/arm/mach-kirkwood/irq.c b/arch/arm/mach-kirkwood/irq.c deleted file mode 100644 index 2c47a8ad0e27..000000000000 --- a/arch/arm/mach-kirkwood/irq.c +++ /dev/null | |||
@@ -1,82 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-kirkwood/irq.c | ||
3 | * | ||
4 | * Kirkwood IRQ handling. | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public | ||
7 | * License version 2. This program is licensed "as is" without any | ||
8 | * warranty of any kind, whether express or implied. | ||
9 | */ | ||
10 | #include <asm/exception.h> | ||
11 | #include <linux/gpio.h> | ||
12 | #include <linux/kernel.h> | ||
13 | #include <linux/irq.h> | ||
14 | #include <linux/io.h> | ||
15 | #include <mach/bridge-regs.h> | ||
16 | #include <plat/orion-gpio.h> | ||
17 | #include <plat/irq.h> | ||
18 | #include "common.h" | ||
19 | |||
20 | static int __initdata gpio0_irqs[4] = { | ||
21 | IRQ_KIRKWOOD_GPIO_LOW_0_7, | ||
22 | IRQ_KIRKWOOD_GPIO_LOW_8_15, | ||
23 | IRQ_KIRKWOOD_GPIO_LOW_16_23, | ||
24 | IRQ_KIRKWOOD_GPIO_LOW_24_31, | ||
25 | }; | ||
26 | |||
27 | static int __initdata gpio1_irqs[4] = { | ||
28 | IRQ_KIRKWOOD_GPIO_HIGH_0_7, | ||
29 | IRQ_KIRKWOOD_GPIO_HIGH_8_15, | ||
30 | IRQ_KIRKWOOD_GPIO_HIGH_16_23, | ||
31 | 0, | ||
32 | }; | ||
33 | |||
34 | #ifdef CONFIG_MULTI_IRQ_HANDLER | ||
35 | /* | ||
36 | * Compiling with both non-DT and DT support enabled, will | ||
37 | * break asm irq handler used by non-DT boards. Therefore, | ||
38 | * we provide a C-style irq handler even for non-DT boards, | ||
39 | * if MULTI_IRQ_HANDLER is set. | ||
40 | */ | ||
41 | |||
42 | static void __iomem *kirkwood_irq_base = IRQ_VIRT_BASE; | ||
43 | |||
44 | asmlinkage void | ||
45 | __exception_irq_entry kirkwood_legacy_handle_irq(struct pt_regs *regs) | ||
46 | { | ||
47 | u32 stat; | ||
48 | |||
49 | stat = readl_relaxed(kirkwood_irq_base + IRQ_CAUSE_LOW_OFF); | ||
50 | stat &= readl_relaxed(kirkwood_irq_base + IRQ_MASK_LOW_OFF); | ||
51 | if (stat) { | ||
52 | unsigned int hwirq = __fls(stat); | ||
53 | handle_IRQ(hwirq, regs); | ||
54 | return; | ||
55 | } | ||
56 | stat = readl_relaxed(kirkwood_irq_base + IRQ_CAUSE_HIGH_OFF); | ||
57 | stat &= readl_relaxed(kirkwood_irq_base + IRQ_MASK_HIGH_OFF); | ||
58 | if (stat) { | ||
59 | unsigned int hwirq = 32 + __fls(stat); | ||
60 | handle_IRQ(hwirq, regs); | ||
61 | return; | ||
62 | } | ||
63 | } | ||
64 | #endif | ||
65 | |||
66 | void __init kirkwood_init_irq(void) | ||
67 | { | ||
68 | orion_irq_init(0, IRQ_VIRT_BASE + IRQ_MASK_LOW_OFF); | ||
69 | orion_irq_init(32, IRQ_VIRT_BASE + IRQ_MASK_HIGH_OFF); | ||
70 | |||
71 | #ifdef CONFIG_MULTI_IRQ_HANDLER | ||
72 | set_handle_irq(kirkwood_legacy_handle_irq); | ||
73 | #endif | ||
74 | |||
75 | /* | ||
76 | * Initialize gpiolib for GPIOs 0-49. | ||
77 | */ | ||
78 | orion_gpio_init(NULL, 0, 32, GPIO_LOW_VIRT_BASE, 0, | ||
79 | IRQ_KIRKWOOD_GPIO_START, gpio0_irqs); | ||
80 | orion_gpio_init(NULL, 32, 18, GPIO_HIGH_VIRT_BASE, 0, | ||
81 | IRQ_KIRKWOOD_GPIO_START + 32, gpio1_irqs); | ||
82 | } | ||
diff --git a/arch/arm/mach-kirkwood/lacie_v2-common.c b/arch/arm/mach-kirkwood/lacie_v2-common.c deleted file mode 100644 index 8e3e4331c380..000000000000 --- a/arch/arm/mach-kirkwood/lacie_v2-common.c +++ /dev/null | |||
@@ -1,114 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-kirkwood/lacie_v2-common.c | ||
3 | * | ||
4 | * This file is licensed under the terms of the GNU General Public | ||
5 | * License version 2. This program is licensed "as is" without any | ||
6 | * warranty of any kind, whether express or implied. | ||
7 | */ | ||
8 | |||
9 | #include <linux/kernel.h> | ||
10 | #include <linux/init.h> | ||
11 | #include <linux/mtd/physmap.h> | ||
12 | #include <linux/spi/flash.h> | ||
13 | #include <linux/spi/spi.h> | ||
14 | #include <linux/i2c.h> | ||
15 | #include <linux/platform_data/at24.h> | ||
16 | #include <linux/gpio.h> | ||
17 | #include <asm/mach/time.h> | ||
18 | #include <mach/kirkwood.h> | ||
19 | #include <mach/irqs.h> | ||
20 | #include <plat/time.h> | ||
21 | #include "common.h" | ||
22 | #include "lacie_v2-common.h" | ||
23 | |||
24 | /***************************************************************************** | ||
25 | * 512KB SPI Flash on Boot Device (MACRONIX MX25L4005) | ||
26 | ****************************************************************************/ | ||
27 | |||
28 | static struct mtd_partition lacie_v2_flash_parts[] = { | ||
29 | { | ||
30 | .name = "u-boot", | ||
31 | .size = MTDPART_SIZ_FULL, | ||
32 | .offset = 0, | ||
33 | .mask_flags = MTD_WRITEABLE, /* force read-only */ | ||
34 | }, | ||
35 | }; | ||
36 | |||
37 | static const struct flash_platform_data lacie_v2_flash = { | ||
38 | .type = "mx25l4005a", | ||
39 | .name = "spi_flash", | ||
40 | .parts = lacie_v2_flash_parts, | ||
41 | .nr_parts = ARRAY_SIZE(lacie_v2_flash_parts), | ||
42 | }; | ||
43 | |||
44 | static struct spi_board_info __initdata lacie_v2_spi_slave_info[] = { | ||
45 | { | ||
46 | .modalias = "m25p80", | ||
47 | .platform_data = &lacie_v2_flash, | ||
48 | .irq = -1, | ||
49 | .max_speed_hz = 20000000, | ||
50 | .bus_num = 0, | ||
51 | .chip_select = 0, | ||
52 | }, | ||
53 | }; | ||
54 | |||
55 | void __init lacie_v2_register_flash(void) | ||
56 | { | ||
57 | spi_register_board_info(lacie_v2_spi_slave_info, | ||
58 | ARRAY_SIZE(lacie_v2_spi_slave_info)); | ||
59 | kirkwood_spi_init(); | ||
60 | } | ||
61 | |||
62 | /***************************************************************************** | ||
63 | * I2C devices | ||
64 | ****************************************************************************/ | ||
65 | |||
66 | static struct at24_platform_data at24c04 = { | ||
67 | .byte_len = SZ_4K / 8, | ||
68 | .page_size = 16, | ||
69 | }; | ||
70 | |||
71 | /* | ||
72 | * i2c addr | chip | description | ||
73 | * 0x50 | HT24LC04 | eeprom (512B) | ||
74 | */ | ||
75 | |||
76 | static struct i2c_board_info __initdata lacie_v2_i2c_info[] = { | ||
77 | { | ||
78 | I2C_BOARD_INFO("24c04", 0x50), | ||
79 | .platform_data = &at24c04, | ||
80 | } | ||
81 | }; | ||
82 | |||
83 | void __init lacie_v2_register_i2c_devices(void) | ||
84 | { | ||
85 | kirkwood_i2c_init(); | ||
86 | i2c_register_board_info(0, lacie_v2_i2c_info, | ||
87 | ARRAY_SIZE(lacie_v2_i2c_info)); | ||
88 | } | ||
89 | |||
90 | /***************************************************************************** | ||
91 | * Hard Disk power | ||
92 | ****************************************************************************/ | ||
93 | |||
94 | static int __initdata lacie_v2_gpio_hdd_power[] = { 16, 17, 41, 42, 43 }; | ||
95 | |||
96 | void __init lacie_v2_hdd_power_init(int hdd_num) | ||
97 | { | ||
98 | int i; | ||
99 | int err; | ||
100 | |||
101 | /* Power up all hard disks. */ | ||
102 | for (i = 0; i < hdd_num; i++) { | ||
103 | err = gpio_request(lacie_v2_gpio_hdd_power[i], NULL); | ||
104 | if (err == 0) { | ||
105 | err = gpio_direction_output( | ||
106 | lacie_v2_gpio_hdd_power[i], 1); | ||
107 | /* Free the HDD power GPIOs. This allow user-space to | ||
108 | * configure them via the gpiolib sysfs interface. */ | ||
109 | gpio_free(lacie_v2_gpio_hdd_power[i]); | ||
110 | } | ||
111 | if (err) | ||
112 | pr_err("Failed to power up HDD%d\n", i + 1); | ||
113 | } | ||
114 | } | ||
diff --git a/arch/arm/mach-kirkwood/lacie_v2-common.h b/arch/arm/mach-kirkwood/lacie_v2-common.h deleted file mode 100644 index fc64f578536e..000000000000 --- a/arch/arm/mach-kirkwood/lacie_v2-common.h +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-kirkwood/lacie_v2-common.h | ||
3 | * | ||
4 | * This file is licensed under the terms of the GNU General Public | ||
5 | * License version 2. This program is licensed "as is" without any | ||
6 | * warranty of any kind, whether express or implied. | ||
7 | */ | ||
8 | |||
9 | #ifndef __ARCH_KIRKWOOD_LACIE_V2_COMMON_H | ||
10 | #define __ARCH_KIRKWOOD_LACIE_V2_COMMON_H | ||
11 | |||
12 | void lacie_v2_register_flash(void); | ||
13 | void lacie_v2_register_i2c_devices(void); | ||
14 | void lacie_v2_hdd_power_init(int hdd_num); | ||
15 | |||
16 | #endif | ||
diff --git a/arch/arm/mach-kirkwood/mpp.c b/arch/arm/mach-kirkwood/mpp.c deleted file mode 100644 index e96fd71abd76..000000000000 --- a/arch/arm/mach-kirkwood/mpp.c +++ /dev/null | |||
@@ -1,43 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-kirkwood/mpp.c | ||
3 | * | ||
4 | * MPP functions for Marvell Kirkwood SoCs | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public | ||
7 | * License version 2. This program is licensed "as is" without any | ||
8 | * warranty of any kind, whether express or implied. | ||
9 | */ | ||
10 | #include <linux/gpio.h> | ||
11 | #include <linux/kernel.h> | ||
12 | #include <linux/init.h> | ||
13 | #include <linux/io.h> | ||
14 | #include <mach/hardware.h> | ||
15 | #include <plat/mpp.h> | ||
16 | #include "common.h" | ||
17 | #include "mpp.h" | ||
18 | |||
19 | static unsigned int __init kirkwood_variant(void) | ||
20 | { | ||
21 | u32 dev, rev; | ||
22 | |||
23 | kirkwood_pcie_id(&dev, &rev); | ||
24 | |||
25 | if (dev == MV88F6281_DEV_ID && rev >= MV88F6281_REV_A0) | ||
26 | return MPP_F6281_MASK; | ||
27 | if (dev == MV88F6282_DEV_ID) | ||
28 | return MPP_F6282_MASK; | ||
29 | if (dev == MV88F6192_DEV_ID && rev >= MV88F6192_REV_A0) | ||
30 | return MPP_F6192_MASK; | ||
31 | if (dev == MV88F6180_DEV_ID) | ||
32 | return MPP_F6180_MASK; | ||
33 | |||
34 | pr_err("MPP setup: unknown kirkwood variant (dev %#x rev %#x)\n", | ||
35 | dev, rev); | ||
36 | return 0; | ||
37 | } | ||
38 | |||
39 | void __init kirkwood_mpp_conf(unsigned int *mpp_list) | ||
40 | { | ||
41 | orion_mpp_conf(mpp_list, kirkwood_variant(), | ||
42 | MPP_MAX, DEV_BUS_VIRT_BASE); | ||
43 | } | ||
diff --git a/arch/arm/mach-kirkwood/mpp.h b/arch/arm/mach-kirkwood/mpp.h deleted file mode 100644 index d5a0d1da2e0e..000000000000 --- a/arch/arm/mach-kirkwood/mpp.h +++ /dev/null | |||
@@ -1,348 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-kirkwood/mpp.h -- Multi Purpose Pins | ||
3 | * | ||
4 | * Copyright 2009: Marvell Technology Group Ltd. | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public | ||
7 | * License version 2. This program is licensed "as is" without any | ||
8 | * warranty of any kind, whether express or implied. | ||
9 | */ | ||
10 | |||
11 | #ifndef __KIRKWOOD_MPP_H | ||
12 | #define __KIRKWOOD_MPP_H | ||
13 | |||
14 | #define MPP(_num, _sel, _in, _out, _F6180, _F6190, _F6192, _F6281, _F6282) ( \ | ||
15 | /* MPP number */ ((_num) & 0xff) | \ | ||
16 | /* MPP select value */ (((_sel) & 0xf) << 8) | \ | ||
17 | /* may be input signal */ ((!!(_in)) << 12) | \ | ||
18 | /* may be output signal */ ((!!(_out)) << 13) | \ | ||
19 | /* available on F6180 */ ((!!(_F6180)) << 14) | \ | ||
20 | /* available on F6190 */ ((!!(_F6190)) << 15) | \ | ||
21 | /* available on F6192 */ ((!!(_F6192)) << 16) | \ | ||
22 | /* available on F6281 */ ((!!(_F6281)) << 17) | \ | ||
23 | /* available on F6282 */ ((!!(_F6282)) << 18)) | ||
24 | |||
25 | /* num sel i o 6180 6190 6192 6281 6282 */ | ||
26 | |||
27 | #define MPP_F6180_MASK MPP( 0, 0x0, 0, 0, 1, 0, 0, 0, 0 ) | ||
28 | #define MPP_F6190_MASK MPP( 0, 0x0, 0, 0, 0, 1, 0, 0, 0 ) | ||
29 | #define MPP_F6192_MASK MPP( 0, 0x0, 0, 0, 0, 0, 1, 0, 0 ) | ||
30 | #define MPP_F6281_MASK MPP( 0, 0x0, 0, 0, 0, 0, 0, 1, 0 ) | ||
31 | #define MPP_F6282_MASK MPP( 0, 0x0, 0, 0, 0, 0, 0, 0, 1 ) | ||
32 | |||
33 | #define MPP0_GPIO MPP( 0, 0x0, 1, 1, 1, 1, 1, 1, 1 ) | ||
34 | #define MPP0_NF_IO2 MPP( 0, 0x1, 0, 0, 1, 1, 1, 1, 1 ) | ||
35 | #define MPP0_SPI_SCn MPP( 0, 0x2, 0, 0, 1, 1, 1, 1, 1 ) | ||
36 | |||
37 | #define MPP1_GPO MPP( 1, 0x0, 0, 1, 1, 1, 1, 1, 1 ) | ||
38 | #define MPP1_NF_IO3 MPP( 1, 0x1, 0, 0, 1, 1, 1, 1, 1 ) | ||
39 | #define MPP1_SPI_MOSI MPP( 1, 0x2, 0, 0, 1, 1, 1, 1, 1 ) | ||
40 | |||
41 | #define MPP2_GPO MPP( 2, 0x0, 0, 1, 1, 1, 1, 1, 1 ) | ||
42 | #define MPP2_NF_IO4 MPP( 2, 0x1, 0, 0, 1, 1, 1, 1, 1 ) | ||
43 | #define MPP2_SPI_SCK MPP( 2, 0x2, 0, 0, 1, 1, 1, 1, 1 ) | ||
44 | |||
45 | #define MPP3_GPO MPP( 3, 0x0, 0, 1, 1, 1, 1, 1, 1 ) | ||
46 | #define MPP3_NF_IO5 MPP( 3, 0x1, 0, 0, 1, 1, 1, 1, 1 ) | ||
47 | #define MPP3_SPI_MISO MPP( 3, 0x2, 0, 0, 1, 1, 1, 1, 1 ) | ||
48 | |||
49 | #define MPP4_GPIO MPP( 4, 0x0, 1, 1, 1, 1, 1, 1, 1 ) | ||
50 | #define MPP4_NF_IO6 MPP( 4, 0x1, 0, 0, 1, 1, 1, 1, 1 ) | ||
51 | #define MPP4_UART0_RXD MPP( 4, 0x2, 0, 0, 1, 1, 1, 1, 1 ) | ||
52 | #define MPP4_SATA1_ACTn MPP( 4, 0x5, 0, 0, 0, 0, 1, 1, 1 ) | ||
53 | #define MPP4_LCD_VGA_HSYNC MPP( 4, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | ||
54 | #define MPP4_PTP_CLK MPP( 4, 0xd, 0, 0, 1, 1, 1, 1, 0 ) | ||
55 | |||
56 | #define MPP5_GPO MPP( 5, 0x0, 0, 1, 1, 1, 1, 1, 1 ) | ||
57 | #define MPP5_NF_IO7 MPP( 5, 0x1, 0, 0, 1, 1, 1, 1, 1 ) | ||
58 | #define MPP5_UART0_TXD MPP( 5, 0x2, 0, 0, 1, 1, 1, 1, 1 ) | ||
59 | #define MPP5_PTP_TRIG_GEN MPP( 5, 0x4, 0, 0, 1, 1, 1, 1, 0 ) | ||
60 | #define MPP5_SATA0_ACTn MPP( 5, 0x5, 0, 0, 0, 1, 1, 1, 1 ) | ||
61 | #define MPP5_LCD_VGA_VSYNC MPP( 5, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | ||
62 | |||
63 | #define MPP6_SYSRST_OUTn MPP( 6, 0x1, 0, 0, 1, 1, 1, 1, 1 ) | ||
64 | #define MPP6_SPI_MOSI MPP( 6, 0x2, 0, 0, 1, 1, 1, 1, 1 ) | ||
65 | #define MPP6_PTP_TRIG_GEN MPP( 6, 0x3, 0, 0, 1, 1, 1, 1, 0 ) | ||
66 | |||
67 | #define MPP7_GPO MPP( 7, 0x0, 0, 1, 1, 1, 1, 1, 1 ) | ||
68 | #define MPP7_PEX_RST_OUTn MPP( 7, 0x1, 0, 0, 1, 1, 1, 1, 0 ) | ||
69 | #define MPP7_SPI_SCn MPP( 7, 0x2, 0, 0, 1, 1, 1, 1, 1 ) | ||
70 | #define MPP7_PTP_TRIG_GEN MPP( 7, 0x3, 0, 0, 1, 1, 1, 1, 0 ) | ||
71 | #define MPP7_LCD_PWM MPP( 7, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | ||
72 | |||
73 | #define MPP8_GPIO MPP( 8, 0x0, 1, 1, 1, 1, 1, 1, 1 ) | ||
74 | #define MPP8_TW0_SDA MPP( 8, 0x1, 0, 0, 1, 1, 1, 1, 1 ) | ||
75 | #define MPP8_UART0_RTS MPP( 8, 0x2, 0, 0, 1, 1, 1, 1, 1 ) | ||
76 | #define MPP8_UART1_RTS MPP( 8, 0x3, 0, 0, 1, 1, 1, 1, 1 ) | ||
77 | #define MPP8_MII0_RXERR MPP( 8, 0x4, 0, 0, 0, 1, 1, 1, 1 ) | ||
78 | #define MPP8_SATA1_PRESENTn MPP( 8, 0x5, 0, 0, 0, 0, 1, 1, 1 ) | ||
79 | #define MPP8_PTP_CLK MPP( 8, 0xc, 0, 0, 1, 1, 1, 1, 0 ) | ||
80 | #define MPP8_MII0_COL MPP( 8, 0xd, 0, 0, 1, 1, 1, 1, 1 ) | ||
81 | |||
82 | #define MPP9_GPIO MPP( 9, 0x0, 1, 1, 1, 1, 1, 1, 1 ) | ||
83 | #define MPP9_TW0_SCK MPP( 9, 0x1, 0, 0, 1, 1, 1, 1, 1 ) | ||
84 | #define MPP9_UART0_CTS MPP( 9, 0x2, 0, 0, 1, 1, 1, 1, 1 ) | ||
85 | #define MPP9_UART1_CTS MPP( 9, 0x3, 0, 0, 1, 1, 1, 1, 1 ) | ||
86 | #define MPP9_SATA0_PRESENTn MPP( 9, 0x5, 0, 0, 0, 1, 1, 1, 1 ) | ||
87 | #define MPP9_PTP_EVENT_REQ MPP( 9, 0xc, 0, 0, 1, 1, 1, 1, 0 ) | ||
88 | #define MPP9_MII0_CRS MPP( 9, 0xd, 0, 0, 1, 1, 1, 1, 1 ) | ||
89 | |||
90 | #define MPP10_GPO MPP( 10, 0x0, 0, 1, 1, 1, 1, 1, 1 ) | ||
91 | #define MPP10_SPI_SCK MPP( 10, 0x2, 0, 0, 1, 1, 1, 1, 1 ) | ||
92 | #define MPP10_UART0_TXD MPP( 10, 0X3, 0, 0, 1, 1, 1, 1, 1 ) | ||
93 | #define MPP10_SATA1_ACTn MPP( 10, 0x5, 0, 0, 0, 0, 1, 1, 1 ) | ||
94 | #define MPP10_PTP_TRIG_GEN MPP( 10, 0xc, 0, 0, 1, 1, 1, 1, 0 ) | ||
95 | |||
96 | #define MPP11_GPIO MPP( 11, 0x0, 1, 1, 1, 1, 1, 1, 1 ) | ||
97 | #define MPP11_SPI_MISO MPP( 11, 0x2, 0, 0, 1, 1, 1, 1, 1 ) | ||
98 | #define MPP11_UART0_RXD MPP( 11, 0x3, 0, 0, 1, 1, 1, 1, 1 ) | ||
99 | #define MPP11_PTP_EVENT_REQ MPP( 11, 0x4, 0, 0, 1, 1, 1, 1, 0 ) | ||
100 | #define MPP11_PTP_TRIG_GEN MPP( 11, 0xc, 0, 0, 1, 1, 1, 1, 0 ) | ||
101 | #define MPP11_PTP_CLK MPP( 11, 0xd, 0, 0, 1, 1, 1, 1, 0 ) | ||
102 | #define MPP11_SATA0_ACTn MPP( 11, 0x5, 0, 0, 0, 1, 1, 1, 1 ) | ||
103 | |||
104 | #define MPP12_GPO MPP( 12, 0x0, 0, 1, 1, 1, 1, 1, 1 ) | ||
105 | #define MPP12_GPIO MPP( 12, 0x0, 1, 1, 0, 0, 0, 1, 0 ) | ||
106 | #define MPP12_SD_CLK MPP( 12, 0x1, 0, 0, 1, 1, 1, 1, 1 ) | ||
107 | #define MPP12_AU_SPDIF0 MPP( 12, 0xa, 0, 0, 0, 0, 0, 0, 1 ) | ||
108 | #define MPP12_SPI_MOSI MPP( 12, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | ||
109 | #define MPP12_TW1_SDA MPP( 12, 0xd, 0, 0, 0, 0, 0, 0, 1 ) | ||
110 | |||
111 | #define MPP13_GPIO MPP( 13, 0x0, 1, 1, 1, 1, 1, 1, 1 ) | ||
112 | #define MPP13_SD_CMD MPP( 13, 0x1, 0, 0, 1, 1, 1, 1, 1 ) | ||
113 | #define MPP13_UART1_TXD MPP( 13, 0x3, 0, 0, 1, 1, 1, 1, 1 ) | ||
114 | #define MPP13_AU_SPDIFRMCLK MPP( 13, 0xa, 0, 0, 0, 0, 0, 0, 1 ) | ||
115 | #define MPP13_LCDPWM MPP( 13, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | ||
116 | |||
117 | #define MPP14_GPIO MPP( 14, 0x0, 1, 1, 1, 1, 1, 1, 1 ) | ||
118 | #define MPP14_SD_D0 MPP( 14, 0x1, 0, 0, 1, 1, 1, 1, 1 ) | ||
119 | #define MPP14_UART1_RXD MPP( 14, 0x3, 0, 0, 1, 1, 1, 1, 1 ) | ||
120 | #define MPP14_SATA1_PRESENTn MPP( 14, 0x4, 0, 0, 0, 0, 1, 1, 1 ) | ||
121 | #define MPP14_AU_SPDIFI MPP( 14, 0xa, 0, 0, 0, 0, 0, 0, 1 ) | ||
122 | #define MPP14_AU_I2SDI MPP( 14, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | ||
123 | #define MPP14_MII0_COL MPP( 14, 0xd, 0, 0, 1, 1, 1, 1, 1 ) | ||
124 | |||
125 | #define MPP15_GPIO MPP( 15, 0x0, 1, 1, 1, 1, 1, 1, 1 ) | ||
126 | #define MPP15_SD_D1 MPP( 15, 0x1, 0, 0, 1, 1, 1, 1, 1 ) | ||
127 | #define MPP15_UART0_RTS MPP( 15, 0x2, 0, 0, 1, 1, 1, 1, 1 ) | ||
128 | #define MPP15_UART1_TXD MPP( 15, 0x3, 0, 0, 1, 1, 1, 1, 1 ) | ||
129 | #define MPP15_SATA0_ACTn MPP( 15, 0x4, 0, 0, 0, 1, 1, 1, 1 ) | ||
130 | #define MPP15_SPI_CSn MPP( 15, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | ||
131 | |||
132 | #define MPP16_GPIO MPP( 16, 0x0, 1, 1, 1, 1, 1, 1, 1 ) | ||
133 | #define MPP16_SD_D2 MPP( 16, 0x1, 0, 0, 1, 1, 1, 1, 1 ) | ||
134 | #define MPP16_UART0_CTS MPP( 16, 0x2, 0, 0, 1, 1, 1, 1, 1 ) | ||
135 | #define MPP16_UART1_RXD MPP( 16, 0x3, 0, 0, 1, 1, 1, 1, 1 ) | ||
136 | #define MPP16_SATA1_ACTn MPP( 16, 0x4, 0, 0, 0, 0, 1, 1, 1 ) | ||
137 | #define MPP16_LCD_EXT_REF_CLK MPP( 16, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | ||
138 | #define MPP16_MII0_CRS MPP( 16, 0xd, 0, 0, 1, 1, 1, 1, 1 ) | ||
139 | |||
140 | #define MPP17_GPIO MPP( 17, 0x0, 1, 1, 1, 1, 1, 1, 1 ) | ||
141 | #define MPP17_SD_D3 MPP( 17, 0x1, 0, 0, 1, 1, 1, 1, 1 ) | ||
142 | #define MPP17_SATA0_PRESENTn MPP( 17, 0x4, 0, 0, 0, 1, 1, 1, 1 ) | ||
143 | #define MPP17_SATA1_ACTn MPP( 17, 0xa, 0, 0, 0, 0, 0, 0, 1 ) | ||
144 | #define MPP17_TW1_SCK MPP( 17, 0xd, 0, 0, 0, 0, 0, 0, 1 ) | ||
145 | |||
146 | #define MPP18_GPO MPP( 18, 0x0, 0, 1, 1, 1, 1, 1, 1 ) | ||
147 | #define MPP18_NF_IO0 MPP( 18, 0x1, 0, 0, 1, 1, 1, 1, 1 ) | ||
148 | #define MPP18_PEX0_CLKREQ MPP( 18, 0x2, 0, 0, 0, 0, 0, 0, 1 ) | ||
149 | |||
150 | #define MPP19_GPO MPP( 19, 0x0, 0, 1, 1, 1, 1, 1, 1 ) | ||
151 | #define MPP19_NF_IO1 MPP( 19, 0x1, 0, 0, 1, 1, 1, 1, 1 ) | ||
152 | |||
153 | #define MPP20_GPIO MPP( 20, 0x0, 1, 1, 0, 1, 1, 1, 1 ) | ||
154 | #define MPP20_TSMP0 MPP( 20, 0x1, 0, 0, 0, 0, 1, 1, 1 ) | ||
155 | #define MPP20_TDM_CH0_TX_QL MPP( 20, 0x2, 0, 0, 0, 0, 1, 1, 1 ) | ||
156 | #define MPP20_GE1_TXD0 MPP( 20, 0x3, 0, 0, 0, 1, 1, 1, 1 ) | ||
157 | #define MPP20_AU_SPDIFI MPP( 20, 0x4, 0, 0, 0, 0, 1, 1, 1 ) | ||
158 | #define MPP20_SATA1_ACTn MPP( 20, 0x5, 0, 0, 0, 0, 1, 1, 1 ) | ||
159 | #define MPP20_LCD_D0 MPP( 20, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | ||
160 | |||
161 | #define MPP21_GPIO MPP( 21, 0x0, 1, 1, 0, 1, 1, 1, 1 ) | ||
162 | #define MPP21_TSMP1 MPP( 21, 0x1, 0, 0, 0, 0, 1, 1, 1 ) | ||
163 | #define MPP21_TDM_CH0_RX_QL MPP( 21, 0x2, 0, 0, 0, 0, 1, 1, 1 ) | ||
164 | #define MPP21_GE1_TXD1 MPP( 21, 0x3, 0, 0, 0, 1, 1, 1, 1 ) | ||
165 | #define MPP21_AU_SPDIFO MPP( 21, 0x4, 0, 0, 0, 0, 1, 1, 1 ) | ||
166 | #define MPP21_SATA0_ACTn MPP( 21, 0x5, 0, 0, 0, 1, 1, 1, 1 ) | ||
167 | #define MPP21_LCD_D1 MPP( 21, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | ||
168 | |||
169 | #define MPP22_GPIO MPP( 22, 0x0, 1, 1, 0, 1, 1, 1, 1 ) | ||
170 | #define MPP22_TSMP2 MPP( 22, 0x1, 0, 0, 0, 0, 1, 1, 1 ) | ||
171 | #define MPP22_TDM_CH2_TX_QL MPP( 22, 0x2, 0, 0, 0, 0, 1, 1, 1 ) | ||
172 | #define MPP22_GE1_TXD2 MPP( 22, 0x3, 0, 0, 0, 1, 1, 1, 1 ) | ||
173 | #define MPP22_AU_SPDIFRMKCLK MPP( 22, 0x4, 0, 0, 0, 0, 1, 1, 1 ) | ||
174 | #define MPP22_SATA1_PRESENTn MPP( 22, 0x5, 0, 0, 0, 0, 1, 1, 1 ) | ||
175 | #define MPP22_LCD_D2 MPP( 22, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | ||
176 | |||
177 | #define MPP23_GPIO MPP( 23, 0x0, 1, 1, 0, 1, 1, 1, 1 ) | ||
178 | #define MPP23_TSMP3 MPP( 23, 0x1, 0, 0, 0, 0, 1, 1, 1 ) | ||
179 | #define MPP23_TDM_CH2_RX_QL MPP( 23, 0x2, 0, 0, 0, 0, 1, 1, 1 ) | ||
180 | #define MPP23_GE1_TXD3 MPP( 23, 0x3, 0, 0, 0, 1, 1, 1, 1 ) | ||
181 | #define MPP23_AU_I2SBCLK MPP( 23, 0x4, 0, 0, 0, 0, 1, 1, 1 ) | ||
182 | #define MPP23_SATA0_PRESENTn MPP( 23, 0x5, 0, 0, 0, 1, 1, 1, 1 ) | ||
183 | #define MPP23_LCD_D3 MPP( 23, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | ||
184 | |||
185 | #define MPP24_GPIO MPP( 24, 0x0, 1, 1, 0, 1, 1, 1, 1 ) | ||
186 | #define MPP24_TSMP4 MPP( 24, 0x1, 0, 0, 0, 0, 1, 1, 1 ) | ||
187 | #define MPP24_TDM_SPI_CS0 MPP( 24, 0x2, 0, 0, 0, 0, 1, 1, 1 ) | ||
188 | #define MPP24_GE1_RXD0 MPP( 24, 0x3, 0, 0, 0, 1, 1, 1, 1 ) | ||
189 | #define MPP24_AU_I2SDO MPP( 24, 0x4, 0, 0, 0, 0, 1, 1, 1 ) | ||
190 | #define MPP24_LCD_D4 MPP( 24, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | ||
191 | |||
192 | #define MPP25_GPIO MPP( 25, 0x0, 1, 1, 0, 1, 1, 1, 1 ) | ||
193 | #define MPP25_TSMP5 MPP( 25, 0x1, 0, 0, 0, 0, 1, 1, 1 ) | ||
194 | #define MPP25_TDM_SPI_SCK MPP( 25, 0x2, 0, 0, 0, 0, 1, 1, 1 ) | ||
195 | #define MPP25_GE1_RXD1 MPP( 25, 0x3, 0, 0, 0, 1, 1, 1, 1 ) | ||
196 | #define MPP25_AU_I2SLRCLK MPP( 25, 0x4, 0, 0, 0, 0, 1, 1, 1 ) | ||
197 | #define MPP25_LCD_D5 MPP( 25, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | ||
198 | |||
199 | #define MPP26_GPIO MPP( 26, 0x0, 1, 1, 0, 1, 1, 1, 1 ) | ||
200 | #define MPP26_TSMP6 MPP( 26, 0x1, 0, 0, 0, 0, 1, 1, 1 ) | ||
201 | #define MPP26_TDM_SPI_MISO MPP( 26, 0x2, 0, 0, 0, 0, 1, 1, 1 ) | ||
202 | #define MPP26_GE1_RXD2 MPP( 26, 0x3, 0, 0, 0, 1, 1, 1, 1 ) | ||
203 | #define MPP26_AU_I2SMCLK MPP( 26, 0x4, 0, 0, 0, 0, 1, 1, 1 ) | ||
204 | #define MPP26_LCD_D6 MPP( 26, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | ||
205 | |||
206 | #define MPP27_GPIO MPP( 27, 0x0, 1, 1, 0, 1, 1, 1, 1 ) | ||
207 | #define MPP27_TSMP7 MPP( 27, 0x1, 0, 0, 0, 0, 1, 1, 1 ) | ||
208 | #define MPP27_TDM_SPI_MOSI MPP( 27, 0x2, 0, 0, 0, 0, 1, 1, 1 ) | ||
209 | #define MPP27_GE1_RXD3 MPP( 27, 0x3, 0, 0, 0, 1, 1, 1, 1 ) | ||
210 | #define MPP27_AU_I2SDI MPP( 27, 0x4, 0, 0, 0, 0, 1, 1, 1 ) | ||
211 | #define MPP27_LCD_D7 MPP( 27, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | ||
212 | |||
213 | #define MPP28_GPIO MPP( 28, 0x0, 1, 1, 0, 1, 1, 1, 1 ) | ||
214 | #define MPP28_TSMP8 MPP( 28, 0x1, 0, 0, 0, 0, 1, 1, 1 ) | ||
215 | #define MPP28_TDM_CODEC_INTn MPP( 28, 0x2, 0, 0, 0, 0, 1, 1, 1 ) | ||
216 | #define MPP28_GE1_COL MPP( 28, 0x3, 0, 0, 0, 1, 1, 1, 1 ) | ||
217 | #define MPP28_AU_EXTCLK MPP( 28, 0x4, 0, 0, 0, 0, 1, 1, 1 ) | ||
218 | #define MPP28_LCD_D8 MPP( 28, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | ||
219 | |||
220 | #define MPP29_GPIO MPP( 29, 0x0, 1, 1, 0, 1, 1, 1, 1 ) | ||
221 | #define MPP29_TSMP9 MPP( 29, 0x1, 0, 0, 0, 0, 1, 1, 1 ) | ||
222 | #define MPP29_TDM_CODEC_RSTn MPP( 29, 0x2, 0, 0, 0, 0, 1, 1, 1 ) | ||
223 | #define MPP29_GE1_TCLK MPP( 29, 0x3, 0, 0, 0, 1, 1, 1, 1 ) | ||
224 | #define MPP29_LCD_D9 MPP( 29, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | ||
225 | |||
226 | #define MPP30_GPIO MPP( 30, 0x0, 1, 1, 0, 1, 1, 1, 1 ) | ||
227 | #define MPP30_TSMP10 MPP( 30, 0x1, 0, 0, 0, 0, 1, 1, 1 ) | ||
228 | #define MPP30_TDM_PCLK MPP( 30, 0x2, 0, 0, 0, 0, 1, 1, 1 ) | ||
229 | #define MPP30_GE1_RXCTL MPP( 30, 0x3, 0, 0, 0, 1, 1, 1, 1 ) | ||
230 | #define MPP30_LCD_D10 MPP( 30, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | ||
231 | |||
232 | #define MPP31_GPIO MPP( 31, 0x0, 1, 1, 0, 1, 1, 1, 1 ) | ||
233 | #define MPP31_TSMP11 MPP( 31, 0x1, 0, 0, 0, 0, 1, 1, 1 ) | ||
234 | #define MPP31_TDM_FS MPP( 31, 0x2, 0, 0, 0, 0, 1, 1, 1 ) | ||
235 | #define MPP31_GE1_RXCLK MPP( 31, 0x3, 0, 0, 0, 1, 1, 1, 1 ) | ||
236 | #define MPP31_LCD_D11 MPP( 31, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | ||
237 | |||
238 | #define MPP32_GPIO MPP( 32, 0x0, 1, 1, 0, 1, 1, 1, 1 ) | ||
239 | #define MPP32_TSMP12 MPP( 32, 0x1, 0, 0, 0, 0, 1, 1, 1 ) | ||
240 | #define MPP32_TDM_DRX MPP( 32, 0x2, 0, 0, 0, 0, 1, 1, 1 ) | ||
241 | #define MPP32_GE1_TCLKOUT MPP( 32, 0x3, 0, 0, 0, 1, 1, 1, 1 ) | ||
242 | #define MPP32_LCD_D12 MPP( 32, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | ||
243 | |||
244 | #define MPP33_GPO MPP( 33, 0x0, 0, 1, 0, 1, 1, 1, 1 ) | ||
245 | #define MPP33_TDM_DTX MPP( 33, 0x2, 0, 0, 0, 0, 1, 1, 1 ) | ||
246 | #define MPP33_GE1_TXCTL MPP( 33, 0x3, 0, 0, 0, 1, 1, 1, 1 ) | ||
247 | #define MPP33_LCD_D13 MPP( 33, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | ||
248 | |||
249 | #define MPP34_GPIO MPP( 34, 0x0, 1, 1, 0, 1, 1, 1, 1 ) | ||
250 | #define MPP34_TDM_SPI_CS1 MPP( 34, 0x2, 0, 0, 0, 0, 1, 1, 1 ) | ||
251 | #define MPP34_GE1_TXEN MPP( 34, 0x3, 0, 0, 0, 1, 1, 1, 1 ) | ||
252 | #define MPP34_SATA1_ACTn MPP( 34, 0x5, 0, 0, 0, 0, 0, 1, 1 ) | ||
253 | #define MPP34_LCD_D14 MPP( 34, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | ||
254 | |||
255 | #define MPP35_GPIO MPP( 35, 0x0, 1, 1, 1, 1, 1, 1, 1 ) | ||
256 | #define MPP35_TDM_CH0_TX_QL MPP( 35, 0x2, 0, 0, 0, 0, 1, 1, 1 ) | ||
257 | #define MPP35_GE1_RXERR MPP( 35, 0x3, 0, 0, 0, 1, 1, 1, 1 ) | ||
258 | #define MPP35_SATA0_ACTn MPP( 35, 0x5, 0, 0, 0, 1, 1, 1, 1 ) | ||
259 | #define MPP35_LCD_D15 MPP( 22, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | ||
260 | #define MPP35_MII0_RXERR MPP( 35, 0xc, 0, 0, 1, 1, 1, 1, 1 ) | ||
261 | |||
262 | #define MPP36_GPIO MPP( 36, 0x0, 1, 1, 1, 0, 0, 1, 1 ) | ||
263 | #define MPP36_TSMP0 MPP( 36, 0x1, 0, 0, 0, 0, 0, 1, 1 ) | ||
264 | #define MPP36_TDM_SPI_CS1 MPP( 36, 0x2, 0, 0, 0, 0, 0, 1, 1 ) | ||
265 | #define MPP36_AU_SPDIFI MPP( 36, 0x4, 0, 0, 1, 0, 0, 1, 1 ) | ||
266 | #define MPP36_TW1_SDA MPP( 36, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | ||
267 | |||
268 | #define MPP37_GPIO MPP( 37, 0x0, 1, 1, 1, 0, 0, 1, 1 ) | ||
269 | #define MPP37_TSMP1 MPP( 37, 0x1, 0, 0, 0, 0, 0, 1, 1 ) | ||
270 | #define MPP37_TDM_CH2_TX_QL MPP( 37, 0x2, 0, 0, 0, 0, 0, 1, 1 ) | ||
271 | #define MPP37_AU_SPDIFO MPP( 37, 0x4, 0, 0, 1, 0, 0, 1, 1 ) | ||
272 | #define MPP37_TW1_SCK MPP( 37, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | ||
273 | |||
274 | #define MPP38_GPIO MPP( 38, 0x0, 1, 1, 1, 0, 0, 1, 1 ) | ||
275 | #define MPP38_TSMP2 MPP( 38, 0x1, 0, 0, 0, 0, 0, 1, 1 ) | ||
276 | #define MPP38_TDM_CH2_RX_QL MPP( 38, 0x2, 0, 0, 0, 0, 0, 1, 1 ) | ||
277 | #define MPP38_AU_SPDIFRMLCLK MPP( 38, 0x4, 0, 0, 1, 0, 0, 1, 1 ) | ||
278 | #define MPP38_LCD_D18 MPP( 38, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | ||
279 | |||
280 | #define MPP39_GPIO MPP( 39, 0x0, 1, 1, 1, 0, 0, 1, 1 ) | ||
281 | #define MPP39_TSMP3 MPP( 39, 0x1, 0, 0, 0, 0, 0, 1, 1 ) | ||
282 | #define MPP39_TDM_SPI_CS0 MPP( 39, 0x2, 0, 0, 0, 0, 0, 1, 1 ) | ||
283 | #define MPP39_AU_I2SBCLK MPP( 39, 0x4, 0, 0, 1, 0, 0, 1, 1 ) | ||
284 | #define MPP39_LCD_D19 MPP( 39, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | ||
285 | |||
286 | #define MPP40_GPIO MPP( 40, 0x0, 1, 1, 1, 0, 0, 1, 1 ) | ||
287 | #define MPP40_TSMP4 MPP( 40, 0x1, 0, 0, 0, 0, 0, 1, 1 ) | ||
288 | #define MPP40_TDM_SPI_SCK MPP( 40, 0x2, 0, 0, 0, 0, 0, 1, 1 ) | ||
289 | #define MPP40_AU_I2SDO MPP( 40, 0x4, 0, 0, 1, 0, 0, 1, 1 ) | ||
290 | #define MPP40_LCD_D20 MPP( 40, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | ||
291 | |||
292 | #define MPP41_GPIO MPP( 41, 0x0, 1, 1, 1, 0, 0, 1, 1 ) | ||
293 | #define MPP41_TSMP5 MPP( 41, 0x1, 0, 0, 0, 0, 0, 1, 1 ) | ||
294 | #define MPP41_TDM_SPI_MISO MPP( 41, 0x2, 0, 0, 0, 0, 0, 1, 1 ) | ||
295 | #define MPP41_AU_I2SLRCLK MPP( 41, 0x4, 0, 0, 1, 0, 0, 1, 1 ) | ||
296 | #define MPP41_LCD_D21 MPP( 41, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | ||
297 | |||
298 | #define MPP42_GPIO MPP( 42, 0x0, 1, 1, 1, 0, 0, 1, 1 ) | ||
299 | #define MPP42_TSMP6 MPP( 42, 0x1, 0, 0, 0, 0, 0, 1, 1 ) | ||
300 | #define MPP42_TDM_SPI_MOSI MPP( 42, 0x2, 0, 0, 0, 0, 0, 1, 1 ) | ||
301 | #define MPP42_AU_I2SMCLK MPP( 42, 0x4, 0, 0, 1, 0, 0, 1, 1 ) | ||
302 | #define MPP42_LCD_D22 MPP( 42, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | ||
303 | |||
304 | #define MPP43_GPIO MPP( 43, 0x0, 1, 1, 1, 0, 0, 1, 1 ) | ||
305 | #define MPP43_TSMP7 MPP( 43, 0x1, 0, 0, 0, 0, 0, 1, 1 ) | ||
306 | #define MPP43_TDM_CODEC_INTn MPP( 43, 0x2, 0, 0, 0, 0, 0, 1, 1 ) | ||
307 | #define MPP43_AU_I2SDI MPP( 43, 0x4, 0, 0, 1, 0, 0, 1, 1 ) | ||
308 | #define MPP43_LCD_D23 MPP( 22, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | ||
309 | |||
310 | #define MPP44_GPIO MPP( 44, 0x0, 1, 1, 1, 0, 0, 1, 1 ) | ||
311 | #define MPP44_TSMP8 MPP( 44, 0x1, 0, 0, 0, 0, 0, 1, 1 ) | ||
312 | #define MPP44_TDM_CODEC_RSTn MPP( 44, 0x2, 0, 0, 0, 0, 0, 1, 1 ) | ||
313 | #define MPP44_AU_EXTCLK MPP( 44, 0x4, 0, 0, 1, 0, 0, 1, 1 ) | ||
314 | #define MPP44_LCD_CLK MPP( 44, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | ||
315 | |||
316 | #define MPP45_GPIO MPP( 45, 0x0, 1, 1, 0, 0, 0, 1, 1 ) | ||
317 | #define MPP45_TSMP9 MPP( 45, 0x1, 0, 0, 0, 0, 0, 1, 1 ) | ||
318 | #define MPP45_TDM_PCLK MPP( 45, 0x2, 0, 0, 0, 0, 0, 1, 1 ) | ||
319 | #define MPP245_LCD_E MPP( 45, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | ||
320 | |||
321 | #define MPP46_GPIO MPP( 46, 0x0, 1, 1, 0, 0, 0, 1, 1 ) | ||
322 | #define MPP46_TSMP10 MPP( 46, 0x1, 0, 0, 0, 0, 0, 1, 1 ) | ||
323 | #define MPP46_TDM_FS MPP( 46, 0x2, 0, 0, 0, 0, 0, 1, 1 ) | ||
324 | #define MPP46_LCD_HSYNC MPP( 46, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | ||
325 | |||
326 | #define MPP47_GPIO MPP( 47, 0x0, 1, 1, 0, 0, 0, 1, 1 ) | ||
327 | #define MPP47_TSMP11 MPP( 47, 0x1, 0, 0, 0, 0, 0, 1, 1 ) | ||
328 | #define MPP47_TDM_DRX MPP( 47, 0x2, 0, 0, 0, 0, 0, 1, 1 ) | ||
329 | #define MPP47_LCD_VSYNC MPP( 47, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | ||
330 | |||
331 | #define MPP48_GPIO MPP( 48, 0x0, 1, 1, 0, 0, 0, 1, 1 ) | ||
332 | #define MPP48_TSMP12 MPP( 48, 0x1, 0, 0, 0, 0, 0, 1, 1 ) | ||
333 | #define MPP48_TDM_DTX MPP( 48, 0x2, 0, 0, 0, 0, 0, 1, 1 ) | ||
334 | #define MPP48_LCD_D16 MPP( 22, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | ||
335 | |||
336 | #define MPP49_GPIO MPP( 49, 0x0, 1, 1, 0, 0, 0, 1, 0 ) | ||
337 | #define MPP49_GPO MPP( 49, 0x0, 0, 1, 0, 0, 0, 0, 1 ) | ||
338 | #define MPP49_TSMP9 MPP( 49, 0x1, 0, 0, 0, 0, 0, 1, 0 ) | ||
339 | #define MPP49_TDM_CH0_RX_QL MPP( 49, 0x2, 0, 0, 0, 0, 0, 1, 1 ) | ||
340 | #define MPP49_PTP_CLK MPP( 49, 0x5, 0, 0, 0, 0, 0, 1, 0 ) | ||
341 | #define MPP49_PEX0_CLKREQ MPP( 49, 0xa, 0, 0, 0, 0, 0, 0, 1 ) | ||
342 | #define MPP49_LCD_D17 MPP( 49, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | ||
343 | |||
344 | #define MPP_MAX 49 | ||
345 | |||
346 | void kirkwood_mpp_conf(unsigned int *mpp_list); | ||
347 | |||
348 | #endif | ||
diff --git a/arch/arm/mach-kirkwood/netxbig_v2-setup.c b/arch/arm/mach-kirkwood/netxbig_v2-setup.c deleted file mode 100644 index 913d032cdb19..000000000000 --- a/arch/arm/mach-kirkwood/netxbig_v2-setup.c +++ /dev/null | |||
@@ -1,422 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-kirkwood/netxbig_v2-setup.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 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
21 | */ | ||
22 | |||
23 | #include <linux/kernel.h> | ||
24 | #include <linux/init.h> | ||
25 | #include <linux/platform_device.h> | ||
26 | #include <linux/ata_platform.h> | ||
27 | #include <linux/mv643xx_eth.h> | ||
28 | #include <linux/input.h> | ||
29 | #include <linux/gpio.h> | ||
30 | #include <linux/gpio_keys.h> | ||
31 | #include <linux/leds.h> | ||
32 | #include <asm/mach-types.h> | ||
33 | #include <asm/mach/arch.h> | ||
34 | #include <mach/kirkwood.h> | ||
35 | #include <linux/platform_data/leds-kirkwood-netxbig.h> | ||
36 | #include "common.h" | ||
37 | #include "mpp.h" | ||
38 | #include "lacie_v2-common.h" | ||
39 | |||
40 | /***************************************************************************** | ||
41 | * Ethernet | ||
42 | ****************************************************************************/ | ||
43 | |||
44 | static struct mv643xx_eth_platform_data netxbig_v2_ge00_data = { | ||
45 | .phy_addr = MV643XX_ETH_PHY_ADDR(8), | ||
46 | }; | ||
47 | |||
48 | static struct mv643xx_eth_platform_data netxbig_v2_ge01_data = { | ||
49 | .phy_addr = MV643XX_ETH_PHY_ADDR(0), | ||
50 | }; | ||
51 | |||
52 | /***************************************************************************** | ||
53 | * SATA | ||
54 | ****************************************************************************/ | ||
55 | |||
56 | static struct mv_sata_platform_data netxbig_v2_sata_data = { | ||
57 | .n_ports = 2, | ||
58 | }; | ||
59 | |||
60 | /***************************************************************************** | ||
61 | * GPIO keys | ||
62 | ****************************************************************************/ | ||
63 | |||
64 | #define NETXBIG_V2_GPIO_SWITCH_POWER_ON 13 | ||
65 | #define NETXBIG_V2_GPIO_SWITCH_POWER_OFF 15 | ||
66 | #define NETXBIG_V2_GPIO_FUNC_BUTTON 34 | ||
67 | |||
68 | #define NETXBIG_V2_SWITCH_POWER_ON 0x1 | ||
69 | #define NETXBIG_V2_SWITCH_POWER_OFF 0x2 | ||
70 | |||
71 | static struct gpio_keys_button netxbig_v2_buttons[] = { | ||
72 | [0] = { | ||
73 | .type = EV_SW, | ||
74 | .code = NETXBIG_V2_SWITCH_POWER_ON, | ||
75 | .gpio = NETXBIG_V2_GPIO_SWITCH_POWER_ON, | ||
76 | .desc = "Back power switch (on|auto)", | ||
77 | .active_low = 1, | ||
78 | }, | ||
79 | [1] = { | ||
80 | .type = EV_SW, | ||
81 | .code = NETXBIG_V2_SWITCH_POWER_OFF, | ||
82 | .gpio = NETXBIG_V2_GPIO_SWITCH_POWER_OFF, | ||
83 | .desc = "Back power switch (auto|off)", | ||
84 | .active_low = 1, | ||
85 | }, | ||
86 | [2] = { | ||
87 | .code = KEY_OPTION, | ||
88 | .gpio = NETXBIG_V2_GPIO_FUNC_BUTTON, | ||
89 | .desc = "Function button", | ||
90 | .active_low = 1, | ||
91 | }, | ||
92 | }; | ||
93 | |||
94 | static struct gpio_keys_platform_data netxbig_v2_button_data = { | ||
95 | .buttons = netxbig_v2_buttons, | ||
96 | .nbuttons = ARRAY_SIZE(netxbig_v2_buttons), | ||
97 | }; | ||
98 | |||
99 | static struct platform_device netxbig_v2_gpio_buttons = { | ||
100 | .name = "gpio-keys", | ||
101 | .id = -1, | ||
102 | .dev = { | ||
103 | .platform_data = &netxbig_v2_button_data, | ||
104 | }, | ||
105 | }; | ||
106 | |||
107 | /***************************************************************************** | ||
108 | * GPIO extension LEDs | ||
109 | ****************************************************************************/ | ||
110 | |||
111 | /* | ||
112 | * The LEDs are controlled by a CPLD and can be configured through a GPIO | ||
113 | * extension bus: | ||
114 | * | ||
115 | * - address register : bit [0-2] -> GPIO [47-49] | ||
116 | * - data register : bit [0-2] -> GPIO [44-46] | ||
117 | * - enable register : GPIO 29 | ||
118 | */ | ||
119 | |||
120 | static int netxbig_v2_gpio_ext_addr[] = { 47, 48, 49 }; | ||
121 | static int netxbig_v2_gpio_ext_data[] = { 44, 45, 46 }; | ||
122 | |||
123 | static struct netxbig_gpio_ext netxbig_v2_gpio_ext = { | ||
124 | .addr = netxbig_v2_gpio_ext_addr, | ||
125 | .num_addr = ARRAY_SIZE(netxbig_v2_gpio_ext_addr), | ||
126 | .data = netxbig_v2_gpio_ext_data, | ||
127 | .num_data = ARRAY_SIZE(netxbig_v2_gpio_ext_data), | ||
128 | .enable = 29, | ||
129 | }; | ||
130 | |||
131 | /* | ||
132 | * Address register selection: | ||
133 | * | ||
134 | * addr | register | ||
135 | * ---------------------------- | ||
136 | * 0 | front LED | ||
137 | * 1 | front LED brightness | ||
138 | * 2 | SATA LED brightness | ||
139 | * 3 | SATA0 LED | ||
140 | * 4 | SATA1 LED | ||
141 | * 5 | SATA2 LED | ||
142 | * 6 | SATA3 LED | ||
143 | * 7 | SATA4 LED | ||
144 | * | ||
145 | * Data register configuration: | ||
146 | * | ||
147 | * data | LED brightness | ||
148 | * ------------------------------------------------- | ||
149 | * 0 | min (off) | ||
150 | * - | - | ||
151 | * 7 | max | ||
152 | * | ||
153 | * data | front LED mode | ||
154 | * ------------------------------------------------- | ||
155 | * 0 | fix off | ||
156 | * 1 | fix blue on | ||
157 | * 2 | fix red on | ||
158 | * 3 | blink blue on=1 sec and blue off=1 sec | ||
159 | * 4 | blink red on=1 sec and red off=1 sec | ||
160 | * 5 | blink blue on=2.5 sec and red on=0.5 sec | ||
161 | * 6 | blink blue on=1 sec and red on=1 sec | ||
162 | * 7 | blink blue on=0.5 sec and blue off=2.5 sec | ||
163 | * | ||
164 | * data | SATA LED mode | ||
165 | * ------------------------------------------------- | ||
166 | * 0 | fix off | ||
167 | * 1 | SATA activity blink | ||
168 | * 2 | fix red on | ||
169 | * 3 | blink blue on=1 sec and blue off=1 sec | ||
170 | * 4 | blink red on=1 sec and red off=1 sec | ||
171 | * 5 | blink blue on=2.5 sec and red on=0.5 sec | ||
172 | * 6 | blink blue on=1 sec and red on=1 sec | ||
173 | * 7 | fix blue on | ||
174 | */ | ||
175 | |||
176 | static int netxbig_v2_red_mled[NETXBIG_LED_MODE_NUM] = { | ||
177 | [NETXBIG_LED_OFF] = 0, | ||
178 | [NETXBIG_LED_ON] = 2, | ||
179 | [NETXBIG_LED_SATA] = NETXBIG_LED_INVALID_MODE, | ||
180 | [NETXBIG_LED_TIMER1] = 4, | ||
181 | [NETXBIG_LED_TIMER2] = NETXBIG_LED_INVALID_MODE, | ||
182 | }; | ||
183 | |||
184 | static int netxbig_v2_blue_pwr_mled[NETXBIG_LED_MODE_NUM] = { | ||
185 | [NETXBIG_LED_OFF] = 0, | ||
186 | [NETXBIG_LED_ON] = 1, | ||
187 | [NETXBIG_LED_SATA] = NETXBIG_LED_INVALID_MODE, | ||
188 | [NETXBIG_LED_TIMER1] = 3, | ||
189 | [NETXBIG_LED_TIMER2] = 7, | ||
190 | }; | ||
191 | |||
192 | static int netxbig_v2_blue_sata_mled[NETXBIG_LED_MODE_NUM] = { | ||
193 | [NETXBIG_LED_OFF] = 0, | ||
194 | [NETXBIG_LED_ON] = 7, | ||
195 | [NETXBIG_LED_SATA] = 1, | ||
196 | [NETXBIG_LED_TIMER1] = 3, | ||
197 | [NETXBIG_LED_TIMER2] = NETXBIG_LED_INVALID_MODE, | ||
198 | }; | ||
199 | |||
200 | static struct netxbig_led_timer netxbig_v2_led_timer[] = { | ||
201 | [0] = { | ||
202 | .delay_on = 500, | ||
203 | .delay_off = 500, | ||
204 | .mode = NETXBIG_LED_TIMER1, | ||
205 | }, | ||
206 | [1] = { | ||
207 | .delay_on = 500, | ||
208 | .delay_off = 1000, | ||
209 | .mode = NETXBIG_LED_TIMER2, | ||
210 | }, | ||
211 | }; | ||
212 | |||
213 | #define NETXBIG_LED(_name, maddr, mval, baddr) \ | ||
214 | { .name = _name, \ | ||
215 | .mode_addr = maddr, \ | ||
216 | .mode_val = mval, \ | ||
217 | .bright_addr = baddr } | ||
218 | |||
219 | static struct netxbig_led net2big_v2_leds_ctrl[] = { | ||
220 | NETXBIG_LED("net2big-v2:blue:power", 0, netxbig_v2_blue_pwr_mled, 1), | ||
221 | NETXBIG_LED("net2big-v2:red:power", 0, netxbig_v2_red_mled, 1), | ||
222 | NETXBIG_LED("net2big-v2:blue:sata0", 3, netxbig_v2_blue_sata_mled, 2), | ||
223 | NETXBIG_LED("net2big-v2:red:sata0", 3, netxbig_v2_red_mled, 2), | ||
224 | NETXBIG_LED("net2big-v2:blue:sata1", 4, netxbig_v2_blue_sata_mled, 2), | ||
225 | NETXBIG_LED("net2big-v2:red:sata1", 4, netxbig_v2_red_mled, 2), | ||
226 | }; | ||
227 | |||
228 | static struct netxbig_led_platform_data net2big_v2_leds_data = { | ||
229 | .gpio_ext = &netxbig_v2_gpio_ext, | ||
230 | .timer = netxbig_v2_led_timer, | ||
231 | .num_timer = ARRAY_SIZE(netxbig_v2_led_timer), | ||
232 | .leds = net2big_v2_leds_ctrl, | ||
233 | .num_leds = ARRAY_SIZE(net2big_v2_leds_ctrl), | ||
234 | }; | ||
235 | |||
236 | static struct netxbig_led net5big_v2_leds_ctrl[] = { | ||
237 | NETXBIG_LED("net5big-v2:blue:power", 0, netxbig_v2_blue_pwr_mled, 1), | ||
238 | NETXBIG_LED("net5big-v2:red:power", 0, netxbig_v2_red_mled, 1), | ||
239 | NETXBIG_LED("net5big-v2:blue:sata0", 3, netxbig_v2_blue_sata_mled, 2), | ||
240 | NETXBIG_LED("net5big-v2:red:sata0", 3, netxbig_v2_red_mled, 2), | ||
241 | NETXBIG_LED("net5big-v2:blue:sata1", 4, netxbig_v2_blue_sata_mled, 2), | ||
242 | NETXBIG_LED("net5big-v2:red:sata1", 4, netxbig_v2_red_mled, 2), | ||
243 | NETXBIG_LED("net5big-v2:blue:sata2", 5, netxbig_v2_blue_sata_mled, 2), | ||
244 | NETXBIG_LED("net5big-v2:red:sata2", 5, netxbig_v2_red_mled, 2), | ||
245 | NETXBIG_LED("net5big-v2:blue:sata3", 6, netxbig_v2_blue_sata_mled, 2), | ||
246 | NETXBIG_LED("net5big-v2:red:sata3", 6, netxbig_v2_red_mled, 2), | ||
247 | NETXBIG_LED("net5big-v2:blue:sata4", 7, netxbig_v2_blue_sata_mled, 2), | ||
248 | NETXBIG_LED("net5big-v2:red:sata5", 7, netxbig_v2_red_mled, 2), | ||
249 | }; | ||
250 | |||
251 | static struct netxbig_led_platform_data net5big_v2_leds_data = { | ||
252 | .gpio_ext = &netxbig_v2_gpio_ext, | ||
253 | .timer = netxbig_v2_led_timer, | ||
254 | .num_timer = ARRAY_SIZE(netxbig_v2_led_timer), | ||
255 | .leds = net5big_v2_leds_ctrl, | ||
256 | .num_leds = ARRAY_SIZE(net5big_v2_leds_ctrl), | ||
257 | }; | ||
258 | |||
259 | static struct platform_device netxbig_v2_leds = { | ||
260 | .name = "leds-netxbig", | ||
261 | .id = -1, | ||
262 | .dev = { | ||
263 | .platform_data = &net2big_v2_leds_data, | ||
264 | }, | ||
265 | }; | ||
266 | |||
267 | /***************************************************************************** | ||
268 | * General Setup | ||
269 | ****************************************************************************/ | ||
270 | |||
271 | static unsigned int net2big_v2_mpp_config[] __initdata = { | ||
272 | MPP0_SPI_SCn, | ||
273 | MPP1_SPI_MOSI, | ||
274 | MPP2_SPI_SCK, | ||
275 | MPP3_SPI_MISO, | ||
276 | MPP6_SYSRST_OUTn, | ||
277 | MPP7_GPO, /* Request power-off */ | ||
278 | MPP8_TW0_SDA, | ||
279 | MPP9_TW0_SCK, | ||
280 | MPP10_UART0_TXD, | ||
281 | MPP11_UART0_RXD, | ||
282 | MPP13_GPIO, /* Rear power switch (on|auto) */ | ||
283 | MPP14_GPIO, /* USB fuse alarm */ | ||
284 | MPP15_GPIO, /* Rear power switch (auto|off) */ | ||
285 | MPP16_GPIO, /* SATA HDD1 power */ | ||
286 | MPP17_GPIO, /* SATA HDD2 power */ | ||
287 | MPP20_SATA1_ACTn, | ||
288 | MPP21_SATA0_ACTn, | ||
289 | MPP24_GPIO, /* USB mode select */ | ||
290 | MPP26_GPIO, /* USB device vbus */ | ||
291 | MPP28_GPIO, /* USB enable host vbus */ | ||
292 | MPP29_GPIO, /* GPIO extension ALE */ | ||
293 | MPP34_GPIO, /* Rear Push button */ | ||
294 | MPP35_GPIO, /* Inhibit switch power-off */ | ||
295 | MPP36_GPIO, /* SATA HDD1 presence */ | ||
296 | MPP37_GPIO, /* SATA HDD2 presence */ | ||
297 | MPP40_GPIO, /* eSATA presence */ | ||
298 | MPP44_GPIO, /* GPIO extension (data 0) */ | ||
299 | MPP45_GPIO, /* GPIO extension (data 1) */ | ||
300 | MPP46_GPIO, /* GPIO extension (data 2) */ | ||
301 | MPP47_GPIO, /* GPIO extension (addr 0) */ | ||
302 | MPP48_GPIO, /* GPIO extension (addr 1) */ | ||
303 | MPP49_GPIO, /* GPIO extension (addr 2) */ | ||
304 | 0 | ||
305 | }; | ||
306 | |||
307 | static unsigned int net5big_v2_mpp_config[] __initdata = { | ||
308 | MPP0_SPI_SCn, | ||
309 | MPP1_SPI_MOSI, | ||
310 | MPP2_SPI_SCK, | ||
311 | MPP3_SPI_MISO, | ||
312 | MPP6_SYSRST_OUTn, | ||
313 | MPP7_GPO, /* Request power-off */ | ||
314 | MPP8_TW0_SDA, | ||
315 | MPP9_TW0_SCK, | ||
316 | MPP10_UART0_TXD, | ||
317 | MPP11_UART0_RXD, | ||
318 | MPP13_GPIO, /* Rear power switch (on|auto) */ | ||
319 | MPP14_GPIO, /* USB fuse alarm */ | ||
320 | MPP15_GPIO, /* Rear power switch (auto|off) */ | ||
321 | MPP16_GPIO, /* SATA HDD1 power */ | ||
322 | MPP17_GPIO, /* SATA HDD2 power */ | ||
323 | MPP20_GE1_TXD0, | ||
324 | MPP21_GE1_TXD1, | ||
325 | MPP22_GE1_TXD2, | ||
326 | MPP23_GE1_TXD3, | ||
327 | MPP24_GE1_RXD0, | ||
328 | MPP25_GE1_RXD1, | ||
329 | MPP26_GE1_RXD2, | ||
330 | MPP27_GE1_RXD3, | ||
331 | MPP28_GPIO, /* USB enable host vbus */ | ||
332 | MPP29_GPIO, /* GPIO extension ALE */ | ||
333 | MPP30_GE1_RXCTL, | ||
334 | MPP31_GE1_RXCLK, | ||
335 | MPP32_GE1_TCLKOUT, | ||
336 | MPP33_GE1_TXCTL, | ||
337 | MPP34_GPIO, /* Rear Push button */ | ||
338 | MPP35_GPIO, /* Inhibit switch power-off */ | ||
339 | MPP36_GPIO, /* SATA HDD1 presence */ | ||
340 | MPP37_GPIO, /* SATA HDD2 presence */ | ||
341 | MPP38_GPIO, /* SATA HDD3 presence */ | ||
342 | MPP39_GPIO, /* SATA HDD4 presence */ | ||
343 | MPP40_GPIO, /* SATA HDD5 presence */ | ||
344 | MPP41_GPIO, /* SATA HDD3 power */ | ||
345 | MPP42_GPIO, /* SATA HDD4 power */ | ||
346 | MPP43_GPIO, /* SATA HDD5 power */ | ||
347 | MPP44_GPIO, /* GPIO extension (data 0) */ | ||
348 | MPP45_GPIO, /* GPIO extension (data 1) */ | ||
349 | MPP46_GPIO, /* GPIO extension (data 2) */ | ||
350 | MPP47_GPIO, /* GPIO extension (addr 0) */ | ||
351 | MPP48_GPIO, /* GPIO extension (addr 1) */ | ||
352 | MPP49_GPIO, /* GPIO extension (addr 2) */ | ||
353 | 0 | ||
354 | }; | ||
355 | |||
356 | #define NETXBIG_V2_GPIO_POWER_OFF 7 | ||
357 | |||
358 | static void netxbig_v2_power_off(void) | ||
359 | { | ||
360 | gpio_set_value(NETXBIG_V2_GPIO_POWER_OFF, 1); | ||
361 | } | ||
362 | |||
363 | static void __init netxbig_v2_init(void) | ||
364 | { | ||
365 | /* | ||
366 | * Basic setup. Needs to be called early. | ||
367 | */ | ||
368 | kirkwood_init(); | ||
369 | if (machine_is_net2big_v2()) | ||
370 | kirkwood_mpp_conf(net2big_v2_mpp_config); | ||
371 | else | ||
372 | kirkwood_mpp_conf(net5big_v2_mpp_config); | ||
373 | |||
374 | if (machine_is_net2big_v2()) | ||
375 | lacie_v2_hdd_power_init(2); | ||
376 | else | ||
377 | lacie_v2_hdd_power_init(5); | ||
378 | |||
379 | kirkwood_ehci_init(); | ||
380 | kirkwood_ge00_init(&netxbig_v2_ge00_data); | ||
381 | if (machine_is_net5big_v2()) | ||
382 | kirkwood_ge01_init(&netxbig_v2_ge01_data); | ||
383 | kirkwood_sata_init(&netxbig_v2_sata_data); | ||
384 | kirkwood_uart0_init(); | ||
385 | lacie_v2_register_flash(); | ||
386 | lacie_v2_register_i2c_devices(); | ||
387 | |||
388 | if (machine_is_net5big_v2()) | ||
389 | netxbig_v2_leds.dev.platform_data = &net5big_v2_leds_data; | ||
390 | platform_device_register(&netxbig_v2_leds); | ||
391 | platform_device_register(&netxbig_v2_gpio_buttons); | ||
392 | |||
393 | if (gpio_request(NETXBIG_V2_GPIO_POWER_OFF, "power-off") == 0 && | ||
394 | gpio_direction_output(NETXBIG_V2_GPIO_POWER_OFF, 0) == 0) | ||
395 | pm_power_off = netxbig_v2_power_off; | ||
396 | else | ||
397 | pr_err("netxbig_v2: failed to configure power-off GPIO\n"); | ||
398 | } | ||
399 | |||
400 | #ifdef CONFIG_MACH_NET2BIG_V2 | ||
401 | MACHINE_START(NET2BIG_V2, "LaCie 2Big Network v2") | ||
402 | .atag_offset = 0x100, | ||
403 | .init_machine = netxbig_v2_init, | ||
404 | .map_io = kirkwood_map_io, | ||
405 | .init_early = kirkwood_init_early, | ||
406 | .init_irq = kirkwood_init_irq, | ||
407 | .init_time = kirkwood_timer_init, | ||
408 | .restart = kirkwood_restart, | ||
409 | MACHINE_END | ||
410 | #endif | ||
411 | |||
412 | #ifdef CONFIG_MACH_NET5BIG_V2 | ||
413 | MACHINE_START(NET5BIG_V2, "LaCie 5Big Network v2") | ||
414 | .atag_offset = 0x100, | ||
415 | .init_machine = netxbig_v2_init, | ||
416 | .map_io = kirkwood_map_io, | ||
417 | .init_early = kirkwood_init_early, | ||
418 | .init_irq = kirkwood_init_irq, | ||
419 | .init_time = kirkwood_timer_init, | ||
420 | .restart = kirkwood_restart, | ||
421 | MACHINE_END | ||
422 | #endif | ||
diff --git a/arch/arm/mach-kirkwood/openrd-setup.c b/arch/arm/mach-kirkwood/openrd-setup.c deleted file mode 100644 index e5cf84103583..000000000000 --- a/arch/arm/mach-kirkwood/openrd-setup.c +++ /dev/null | |||
@@ -1,255 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-kirkwood/openrd-setup.c | ||
3 | * | ||
4 | * Marvell OpenRD (Base|Client|Ultimate) Board Setup | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public | ||
7 | * License version 2. This program is licensed "as is" without any | ||
8 | * warranty of any kind, whether express or implied. | ||
9 | */ | ||
10 | |||
11 | #include <linux/kernel.h> | ||
12 | #include <linux/init.h> | ||
13 | #include <linux/platform_device.h> | ||
14 | #include <linux/mtd/nand.h> | ||
15 | #include <linux/mtd/partitions.h> | ||
16 | #include <linux/ata_platform.h> | ||
17 | #include <linux/mv643xx_eth.h> | ||
18 | #include <linux/i2c.h> | ||
19 | #include <linux/gpio.h> | ||
20 | #include <asm/mach-types.h> | ||
21 | #include <asm/mach/arch.h> | ||
22 | #include <mach/kirkwood.h> | ||
23 | #include <linux/platform_data/mmc-mvsdio.h> | ||
24 | #include "common.h" | ||
25 | #include "mpp.h" | ||
26 | |||
27 | static struct mtd_partition openrd_nand_parts[] = { | ||
28 | { | ||
29 | .name = "u-boot", | ||
30 | .offset = 0, | ||
31 | .size = SZ_1M, | ||
32 | .mask_flags = MTD_WRITEABLE | ||
33 | }, { | ||
34 | .name = "uImage", | ||
35 | .offset = MTDPART_OFS_NXTBLK, | ||
36 | .size = SZ_4M | ||
37 | }, { | ||
38 | .name = "root", | ||
39 | .offset = MTDPART_OFS_NXTBLK, | ||
40 | .size = MTDPART_SIZ_FULL | ||
41 | }, | ||
42 | }; | ||
43 | |||
44 | static struct mv643xx_eth_platform_data openrd_ge00_data = { | ||
45 | .phy_addr = MV643XX_ETH_PHY_ADDR(8), | ||
46 | }; | ||
47 | |||
48 | static struct mv643xx_eth_platform_data openrd_ge01_data = { | ||
49 | .phy_addr = MV643XX_ETH_PHY_ADDR(24), | ||
50 | }; | ||
51 | |||
52 | static struct mv_sata_platform_data openrd_sata_data = { | ||
53 | .n_ports = 2, | ||
54 | }; | ||
55 | |||
56 | static struct mvsdio_platform_data openrd_mvsdio_data = { | ||
57 | .gpio_card_detect = 29, /* MPP29 used as SD card detect */ | ||
58 | .gpio_write_protect = -1, | ||
59 | }; | ||
60 | |||
61 | static unsigned int openrd_mpp_config[] __initdata = { | ||
62 | MPP12_SD_CLK, | ||
63 | MPP13_SD_CMD, | ||
64 | MPP14_SD_D0, | ||
65 | MPP15_SD_D1, | ||
66 | MPP16_SD_D2, | ||
67 | MPP17_SD_D3, | ||
68 | MPP28_GPIO, | ||
69 | MPP29_GPIO, | ||
70 | MPP34_GPIO, | ||
71 | 0 | ||
72 | }; | ||
73 | |||
74 | /* Configure MPP for UART1 */ | ||
75 | static unsigned int openrd_uart1_mpp_config[] __initdata = { | ||
76 | MPP13_UART1_TXD, | ||
77 | MPP14_UART1_RXD, | ||
78 | 0 | ||
79 | }; | ||
80 | |||
81 | static struct i2c_board_info i2c_board_info[] __initdata = { | ||
82 | { | ||
83 | I2C_BOARD_INFO("cs42l51", 0x4a), | ||
84 | }, | ||
85 | }; | ||
86 | |||
87 | static struct platform_device openrd_client_audio_device = { | ||
88 | .name = "openrd-client-audio", | ||
89 | .id = -1, | ||
90 | }; | ||
91 | |||
92 | static int __initdata uart1; | ||
93 | |||
94 | static int __init sd_uart_selection(char *str) | ||
95 | { | ||
96 | uart1 = -EINVAL; | ||
97 | |||
98 | /* Default is SD. Change if required, for UART */ | ||
99 | if (!str) | ||
100 | return 0; | ||
101 | |||
102 | if (!strncmp(str, "232", 3)) { | ||
103 | uart1 = 232; | ||
104 | } else if (!strncmp(str, "485", 3)) { | ||
105 | /* OpenRD-Base doesn't have RS485. Treat is as an | ||
106 | * unknown argument & just have default setting - | ||
107 | * which is SD */ | ||
108 | if (machine_is_openrd_base()) { | ||
109 | uart1 = -ENODEV; | ||
110 | return 1; | ||
111 | } | ||
112 | |||
113 | uart1 = 485; | ||
114 | } | ||
115 | return 1; | ||
116 | } | ||
117 | /* Parse boot_command_line string kw_openrd_init_uart1=232/485 */ | ||
118 | __setup("kw_openrd_init_uart1=", sd_uart_selection); | ||
119 | |||
120 | static int __init uart1_mpp_config(void) | ||
121 | { | ||
122 | kirkwood_mpp_conf(openrd_uart1_mpp_config); | ||
123 | |||
124 | if (gpio_request(34, "SD_UART1_SEL")) { | ||
125 | pr_err("GPIO request 34 failed for SD/UART1 selection\n"); | ||
126 | return -EIO; | ||
127 | } | ||
128 | |||
129 | if (gpio_request(28, "RS232_RS485_SEL")) { | ||
130 | pr_err("GPIO request 28 failed for RS232/RS485 selection\n"); | ||
131 | gpio_free(34); | ||
132 | return -EIO; | ||
133 | } | ||
134 | |||
135 | /* Select UART1 | ||
136 | * Pin # 34: 0 => UART1, 1 => SD */ | ||
137 | gpio_direction_output(34, 0); | ||
138 | |||
139 | /* Select RS232 OR RS485 | ||
140 | * Pin # 28: 0 => RS232, 1 => RS485 */ | ||
141 | if (uart1 == 232) | ||
142 | gpio_direction_output(28, 0); | ||
143 | else | ||
144 | gpio_direction_output(28, 1); | ||
145 | |||
146 | gpio_free(34); | ||
147 | gpio_free(28); | ||
148 | |||
149 | return 0; | ||
150 | } | ||
151 | |||
152 | static void __init openrd_init(void) | ||
153 | { | ||
154 | /* | ||
155 | * Basic setup. Needs to be called early. | ||
156 | */ | ||
157 | kirkwood_init(); | ||
158 | kirkwood_mpp_conf(openrd_mpp_config); | ||
159 | |||
160 | kirkwood_uart0_init(); | ||
161 | kirkwood_nand_init(openrd_nand_parts, ARRAY_SIZE(openrd_nand_parts), | ||
162 | 25); | ||
163 | |||
164 | kirkwood_ehci_init(); | ||
165 | |||
166 | if (machine_is_openrd_ultimate()) { | ||
167 | openrd_ge00_data.phy_addr = MV643XX_ETH_PHY_ADDR(0); | ||
168 | openrd_ge01_data.phy_addr = MV643XX_ETH_PHY_ADDR(1); | ||
169 | } | ||
170 | |||
171 | kirkwood_ge00_init(&openrd_ge00_data); | ||
172 | if (!machine_is_openrd_base()) | ||
173 | kirkwood_ge01_init(&openrd_ge01_data); | ||
174 | |||
175 | kirkwood_sata_init(&openrd_sata_data); | ||
176 | |||
177 | kirkwood_i2c_init(); | ||
178 | |||
179 | if (machine_is_openrd_client() || machine_is_openrd_ultimate()) { | ||
180 | platform_device_register(&openrd_client_audio_device); | ||
181 | i2c_register_board_info(0, i2c_board_info, | ||
182 | ARRAY_SIZE(i2c_board_info)); | ||
183 | kirkwood_audio_init(); | ||
184 | } | ||
185 | |||
186 | if (uart1 <= 0) { | ||
187 | if (uart1 < 0) | ||
188 | pr_err("Invalid kernel parameter to select UART1. Defaulting to SD. ERROR CODE: %d\n", | ||
189 | uart1); | ||
190 | |||
191 | /* Select SD | ||
192 | * Pin # 34: 0 => UART1, 1 => SD */ | ||
193 | if (gpio_request(34, "SD_UART1_SEL")) { | ||
194 | pr_err("GPIO request 34 failed for SD/UART1 selection\n"); | ||
195 | } else { | ||
196 | |||
197 | gpio_direction_output(34, 1); | ||
198 | gpio_free(34); | ||
199 | kirkwood_sdio_init(&openrd_mvsdio_data); | ||
200 | } | ||
201 | } else { | ||
202 | if (!uart1_mpp_config()) | ||
203 | kirkwood_uart1_init(); | ||
204 | } | ||
205 | } | ||
206 | |||
207 | static int __init openrd_pci_init(void) | ||
208 | { | ||
209 | if (machine_is_openrd_base() || | ||
210 | machine_is_openrd_client() || | ||
211 | machine_is_openrd_ultimate()) | ||
212 | kirkwood_pcie_init(KW_PCIE0); | ||
213 | |||
214 | return 0; | ||
215 | } | ||
216 | subsys_initcall(openrd_pci_init); | ||
217 | |||
218 | #ifdef CONFIG_MACH_OPENRD_BASE | ||
219 | MACHINE_START(OPENRD_BASE, "Marvell OpenRD Base Board") | ||
220 | /* Maintainer: Dhaval Vasa <dhaval.vasa@einfochips.com> */ | ||
221 | .atag_offset = 0x100, | ||
222 | .init_machine = openrd_init, | ||
223 | .map_io = kirkwood_map_io, | ||
224 | .init_early = kirkwood_init_early, | ||
225 | .init_irq = kirkwood_init_irq, | ||
226 | .init_time = kirkwood_timer_init, | ||
227 | .restart = kirkwood_restart, | ||
228 | MACHINE_END | ||
229 | #endif | ||
230 | |||
231 | #ifdef CONFIG_MACH_OPENRD_CLIENT | ||
232 | MACHINE_START(OPENRD_CLIENT, "Marvell OpenRD Client Board") | ||
233 | /* Maintainer: Dhaval Vasa <dhaval.vasa@einfochips.com> */ | ||
234 | .atag_offset = 0x100, | ||
235 | .init_machine = openrd_init, | ||
236 | .map_io = kirkwood_map_io, | ||
237 | .init_early = kirkwood_init_early, | ||
238 | .init_irq = kirkwood_init_irq, | ||
239 | .init_time = kirkwood_timer_init, | ||
240 | .restart = kirkwood_restart, | ||
241 | MACHINE_END | ||
242 | #endif | ||
243 | |||
244 | #ifdef CONFIG_MACH_OPENRD_ULTIMATE | ||
245 | MACHINE_START(OPENRD_ULTIMATE, "Marvell OpenRD Ultimate Board") | ||
246 | /* Maintainer: Dhaval Vasa <dhaval.vasa@einfochips.com> */ | ||
247 | .atag_offset = 0x100, | ||
248 | .init_machine = openrd_init, | ||
249 | .map_io = kirkwood_map_io, | ||
250 | .init_early = kirkwood_init_early, | ||
251 | .init_irq = kirkwood_init_irq, | ||
252 | .init_time = kirkwood_timer_init, | ||
253 | .restart = kirkwood_restart, | ||
254 | MACHINE_END | ||
255 | #endif | ||
diff --git a/arch/arm/mach-kirkwood/pcie.c b/arch/arm/mach-kirkwood/pcie.c deleted file mode 100644 index 12d86f39f380..000000000000 --- a/arch/arm/mach-kirkwood/pcie.c +++ /dev/null | |||
@@ -1,296 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-kirkwood/pcie.c | ||
3 | * | ||
4 | * PCIe functions for Marvell Kirkwood SoCs | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public | ||
7 | * License version 2. This program is licensed "as is" without any | ||
8 | * warranty of any kind, whether express or implied. | ||
9 | */ | ||
10 | |||
11 | #include <linux/kernel.h> | ||
12 | #include <linux/pci.h> | ||
13 | #include <linux/slab.h> | ||
14 | #include <linux/clk.h> | ||
15 | #include <linux/mbus.h> | ||
16 | #include <video/vga.h> | ||
17 | #include <asm/irq.h> | ||
18 | #include <asm/mach/pci.h> | ||
19 | #include <plat/pcie.h> | ||
20 | #include <mach/bridge-regs.h> | ||
21 | #include "common.h" | ||
22 | |||
23 | /* These can go away once Kirkwood uses the mvebu-mbus DT binding */ | ||
24 | #define KIRKWOOD_MBUS_PCIE0_MEM_TARGET 0x4 | ||
25 | #define KIRKWOOD_MBUS_PCIE0_MEM_ATTR 0xe8 | ||
26 | #define KIRKWOOD_MBUS_PCIE0_IO_TARGET 0x4 | ||
27 | #define KIRKWOOD_MBUS_PCIE0_IO_ATTR 0xe0 | ||
28 | #define KIRKWOOD_MBUS_PCIE1_MEM_TARGET 0x4 | ||
29 | #define KIRKWOOD_MBUS_PCIE1_MEM_ATTR 0xd8 | ||
30 | #define KIRKWOOD_MBUS_PCIE1_IO_TARGET 0x4 | ||
31 | #define KIRKWOOD_MBUS_PCIE1_IO_ATTR 0xd0 | ||
32 | |||
33 | static void kirkwood_enable_pcie_clk(const char *port) | ||
34 | { | ||
35 | struct clk *clk; | ||
36 | |||
37 | clk = clk_get_sys("pcie", port); | ||
38 | if (IS_ERR(clk)) { | ||
39 | pr_err("PCIE clock %s missing\n", port); | ||
40 | return; | ||
41 | } | ||
42 | clk_prepare_enable(clk); | ||
43 | clk_put(clk); | ||
44 | } | ||
45 | |||
46 | /* This function is called very early in the boot when probing the | ||
47 | hardware to determine what we actually are, and what rate tclk is | ||
48 | ticking at. Hence calling kirkwood_enable_pcie_clk() is not | ||
49 | possible since the clk tree has not been created yet. */ | ||
50 | void kirkwood_enable_pcie(void) | ||
51 | { | ||
52 | u32 curr = readl(CLOCK_GATING_CTRL); | ||
53 | if (!(curr & CGC_PEX0)) | ||
54 | writel(curr | CGC_PEX0, CLOCK_GATING_CTRL); | ||
55 | } | ||
56 | |||
57 | void kirkwood_pcie_id(u32 *dev, u32 *rev) | ||
58 | { | ||
59 | kirkwood_enable_pcie(); | ||
60 | *dev = orion_pcie_dev_id(PCIE_VIRT_BASE); | ||
61 | *rev = orion_pcie_rev(PCIE_VIRT_BASE); | ||
62 | } | ||
63 | |||
64 | struct pcie_port { | ||
65 | u8 root_bus_nr; | ||
66 | void __iomem *base; | ||
67 | spinlock_t conf_lock; | ||
68 | int irq; | ||
69 | struct resource res; | ||
70 | }; | ||
71 | |||
72 | static int pcie_port_map[2]; | ||
73 | static int num_pcie_ports; | ||
74 | |||
75 | static int pcie_valid_config(struct pcie_port *pp, int bus, int dev) | ||
76 | { | ||
77 | /* | ||
78 | * Don't go out when trying to access -- | ||
79 | * 1. nonexisting device on local bus | ||
80 | * 2. where there's no device connected (no link) | ||
81 | */ | ||
82 | if (bus == pp->root_bus_nr && dev == 0) | ||
83 | return 1; | ||
84 | |||
85 | if (!orion_pcie_link_up(pp->base)) | ||
86 | return 0; | ||
87 | |||
88 | if (bus == pp->root_bus_nr && dev != 1) | ||
89 | return 0; | ||
90 | |||
91 | return 1; | ||
92 | } | ||
93 | |||
94 | |||
95 | /* | ||
96 | * PCIe config cycles are done by programming the PCIE_CONF_ADDR register | ||
97 | * and then reading the PCIE_CONF_DATA register. Need to make sure these | ||
98 | * transactions are atomic. | ||
99 | */ | ||
100 | |||
101 | static int pcie_rd_conf(struct pci_bus *bus, u32 devfn, int where, | ||
102 | int size, u32 *val) | ||
103 | { | ||
104 | struct pci_sys_data *sys = bus->sysdata; | ||
105 | struct pcie_port *pp = sys->private_data; | ||
106 | unsigned long flags; | ||
107 | int ret; | ||
108 | |||
109 | if (pcie_valid_config(pp, bus->number, PCI_SLOT(devfn)) == 0) { | ||
110 | *val = 0xffffffff; | ||
111 | return PCIBIOS_DEVICE_NOT_FOUND; | ||
112 | } | ||
113 | |||
114 | spin_lock_irqsave(&pp->conf_lock, flags); | ||
115 | ret = orion_pcie_rd_conf(pp->base, bus, devfn, where, size, val); | ||
116 | spin_unlock_irqrestore(&pp->conf_lock, flags); | ||
117 | |||
118 | return ret; | ||
119 | } | ||
120 | |||
121 | static int pcie_wr_conf(struct pci_bus *bus, u32 devfn, | ||
122 | int where, int size, u32 val) | ||
123 | { | ||
124 | struct pci_sys_data *sys = bus->sysdata; | ||
125 | struct pcie_port *pp = sys->private_data; | ||
126 | unsigned long flags; | ||
127 | int ret; | ||
128 | |||
129 | if (pcie_valid_config(pp, bus->number, PCI_SLOT(devfn)) == 0) | ||
130 | return PCIBIOS_DEVICE_NOT_FOUND; | ||
131 | |||
132 | spin_lock_irqsave(&pp->conf_lock, flags); | ||
133 | ret = orion_pcie_wr_conf(pp->base, bus, devfn, where, size, val); | ||
134 | spin_unlock_irqrestore(&pp->conf_lock, flags); | ||
135 | |||
136 | return ret; | ||
137 | } | ||
138 | |||
139 | static struct pci_ops pcie_ops = { | ||
140 | .read = pcie_rd_conf, | ||
141 | .write = pcie_wr_conf, | ||
142 | }; | ||
143 | |||
144 | static void __init pcie0_ioresources_init(struct pcie_port *pp) | ||
145 | { | ||
146 | pp->base = PCIE_VIRT_BASE; | ||
147 | pp->irq = IRQ_KIRKWOOD_PCIE; | ||
148 | |||
149 | /* | ||
150 | * IORESOURCE_MEM | ||
151 | */ | ||
152 | pp->res.name = "PCIe 0 MEM"; | ||
153 | pp->res.start = KIRKWOOD_PCIE_MEM_PHYS_BASE; | ||
154 | pp->res.end = pp->res.start + KIRKWOOD_PCIE_MEM_SIZE - 1; | ||
155 | pp->res.flags = IORESOURCE_MEM; | ||
156 | } | ||
157 | |||
158 | static void __init pcie1_ioresources_init(struct pcie_port *pp) | ||
159 | { | ||
160 | pp->base = PCIE1_VIRT_BASE; | ||
161 | pp->irq = IRQ_KIRKWOOD_PCIE1; | ||
162 | |||
163 | /* | ||
164 | * IORESOURCE_MEM | ||
165 | */ | ||
166 | pp->res.name = "PCIe 1 MEM"; | ||
167 | pp->res.start = KIRKWOOD_PCIE1_MEM_PHYS_BASE; | ||
168 | pp->res.end = pp->res.start + KIRKWOOD_PCIE1_MEM_SIZE - 1; | ||
169 | pp->res.flags = IORESOURCE_MEM; | ||
170 | } | ||
171 | |||
172 | static int __init kirkwood_pcie_setup(int nr, struct pci_sys_data *sys) | ||
173 | { | ||
174 | struct pcie_port *pp; | ||
175 | int index; | ||
176 | |||
177 | if (nr >= num_pcie_ports) | ||
178 | return 0; | ||
179 | |||
180 | index = pcie_port_map[nr]; | ||
181 | pr_info("PCI: bus%d uses PCIe port %d\n", sys->busnr, index); | ||
182 | |||
183 | pp = kzalloc(sizeof(*pp), GFP_KERNEL); | ||
184 | if (!pp) | ||
185 | panic("PCIe: failed to allocate pcie_port data"); | ||
186 | sys->private_data = pp; | ||
187 | pp->root_bus_nr = sys->busnr; | ||
188 | spin_lock_init(&pp->conf_lock); | ||
189 | |||
190 | switch (index) { | ||
191 | case 0: | ||
192 | kirkwood_enable_pcie_clk("0"); | ||
193 | pcie0_ioresources_init(pp); | ||
194 | pci_ioremap_io(SZ_64K * sys->busnr, KIRKWOOD_PCIE_IO_PHYS_BASE); | ||
195 | break; | ||
196 | case 1: | ||
197 | kirkwood_enable_pcie_clk("1"); | ||
198 | pcie1_ioresources_init(pp); | ||
199 | pci_ioremap_io(SZ_64K * sys->busnr, | ||
200 | KIRKWOOD_PCIE1_IO_PHYS_BASE); | ||
201 | break; | ||
202 | default: | ||
203 | panic("PCIe setup: invalid controller %d", index); | ||
204 | } | ||
205 | |||
206 | if (request_resource(&iomem_resource, &pp->res)) | ||
207 | panic("Request PCIe%d Memory resource failed\n", index); | ||
208 | |||
209 | pci_add_resource_offset(&sys->resources, &pp->res, sys->mem_offset); | ||
210 | |||
211 | /* | ||
212 | * Generic PCIe unit setup. | ||
213 | */ | ||
214 | orion_pcie_set_local_bus_nr(pp->base, sys->busnr); | ||
215 | |||
216 | orion_pcie_setup(pp->base); | ||
217 | |||
218 | return 1; | ||
219 | } | ||
220 | |||
221 | /* | ||
222 | * The root complex has a hardwired class of PCI_CLASS_MEMORY_OTHER, when it | ||
223 | * is operating as a root complex this needs to be switched to | ||
224 | * PCI_CLASS_BRIDGE_HOST or Linux will errantly try to process the BAR's on | ||
225 | * the device. Decoding setup is handled by the orion code. | ||
226 | */ | ||
227 | static void rc_pci_fixup(struct pci_dev *dev) | ||
228 | { | ||
229 | if (dev->bus->parent == NULL && dev->devfn == 0) { | ||
230 | int i; | ||
231 | |||
232 | dev->class &= 0xff; | ||
233 | dev->class |= PCI_CLASS_BRIDGE_HOST << 8; | ||
234 | for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) { | ||
235 | dev->resource[i].start = 0; | ||
236 | dev->resource[i].end = 0; | ||
237 | dev->resource[i].flags = 0; | ||
238 | } | ||
239 | } | ||
240 | } | ||
241 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MARVELL, PCI_ANY_ID, rc_pci_fixup); | ||
242 | |||
243 | static int __init kirkwood_pcie_map_irq(const struct pci_dev *dev, u8 slot, | ||
244 | u8 pin) | ||
245 | { | ||
246 | struct pci_sys_data *sys = dev->sysdata; | ||
247 | struct pcie_port *pp = sys->private_data; | ||
248 | |||
249 | return pp->irq; | ||
250 | } | ||
251 | |||
252 | static struct hw_pci kirkwood_pci __initdata = { | ||
253 | .setup = kirkwood_pcie_setup, | ||
254 | .map_irq = kirkwood_pcie_map_irq, | ||
255 | .ops = &pcie_ops, | ||
256 | }; | ||
257 | |||
258 | static void __init add_pcie_port(int index, void __iomem *base) | ||
259 | { | ||
260 | pcie_port_map[num_pcie_ports++] = index; | ||
261 | pr_info("Kirkwood PCIe port %d: link %s\n", index, | ||
262 | orion_pcie_link_up(base) ? "up" : "down"); | ||
263 | } | ||
264 | |||
265 | void __init kirkwood_pcie_init(unsigned int portmask) | ||
266 | { | ||
267 | mvebu_mbus_add_window_remap_by_id(KIRKWOOD_MBUS_PCIE0_IO_TARGET, | ||
268 | KIRKWOOD_MBUS_PCIE0_IO_ATTR, | ||
269 | KIRKWOOD_PCIE_IO_PHYS_BASE, | ||
270 | KIRKWOOD_PCIE_IO_SIZE, | ||
271 | KIRKWOOD_PCIE_IO_BUS_BASE); | ||
272 | mvebu_mbus_add_window_by_id(KIRKWOOD_MBUS_PCIE0_MEM_TARGET, | ||
273 | KIRKWOOD_MBUS_PCIE0_MEM_ATTR, | ||
274 | KIRKWOOD_PCIE_MEM_PHYS_BASE, | ||
275 | KIRKWOOD_PCIE_MEM_SIZE); | ||
276 | mvebu_mbus_add_window_remap_by_id(KIRKWOOD_MBUS_PCIE1_IO_TARGET, | ||
277 | KIRKWOOD_MBUS_PCIE1_IO_ATTR, | ||
278 | KIRKWOOD_PCIE1_IO_PHYS_BASE, | ||
279 | KIRKWOOD_PCIE1_IO_SIZE, | ||
280 | KIRKWOOD_PCIE1_IO_BUS_BASE); | ||
281 | mvebu_mbus_add_window_by_id(KIRKWOOD_MBUS_PCIE1_MEM_TARGET, | ||
282 | KIRKWOOD_MBUS_PCIE1_MEM_ATTR, | ||
283 | KIRKWOOD_PCIE1_MEM_PHYS_BASE, | ||
284 | KIRKWOOD_PCIE1_MEM_SIZE); | ||
285 | |||
286 | vga_base = KIRKWOOD_PCIE_MEM_PHYS_BASE; | ||
287 | |||
288 | if (portmask & KW_PCIE0) | ||
289 | add_pcie_port(0, PCIE_VIRT_BASE); | ||
290 | |||
291 | if (portmask & KW_PCIE1) | ||
292 | add_pcie_port(1, PCIE1_VIRT_BASE); | ||
293 | |||
294 | kirkwood_pci.nr_controllers = num_pcie_ports; | ||
295 | pci_common_init(&kirkwood_pci); | ||
296 | } | ||
diff --git a/arch/arm/mach-kirkwood/pm.c b/arch/arm/mach-kirkwood/pm.c deleted file mode 100644 index 8e5e0329d04c..000000000000 --- a/arch/arm/mach-kirkwood/pm.c +++ /dev/null | |||
@@ -1,76 +0,0 @@ | |||
1 | /* | ||
2 | * Power Management driver for Marvell Kirkwood SoCs | ||
3 | * | ||
4 | * Copyright (C) 2013 Ezequiel Garcia <ezequiel@free-electrons.com> | ||
5 | * Copyright (C) 2010 Simon Guinot <sguinot@lacie.com> | ||
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, | ||
9 | * version 2 of the License. | ||
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/kernel.h> | ||
18 | #include <linux/suspend.h> | ||
19 | #include <linux/io.h> | ||
20 | #include <mach/bridge-regs.h> | ||
21 | #include "common.h" | ||
22 | |||
23 | static void __iomem *ddr_operation_base; | ||
24 | static void __iomem *memory_pm_ctrl; | ||
25 | |||
26 | static void kirkwood_low_power(void) | ||
27 | { | ||
28 | u32 mem_pm_ctrl; | ||
29 | |||
30 | mem_pm_ctrl = readl(memory_pm_ctrl); | ||
31 | |||
32 | /* Set peripherals to low-power mode */ | ||
33 | writel_relaxed(~0, memory_pm_ctrl); | ||
34 | |||
35 | /* Set DDR in self-refresh */ | ||
36 | writel_relaxed(0x7, ddr_operation_base); | ||
37 | |||
38 | /* | ||
39 | * Set CPU in wait-for-interrupt state. | ||
40 | * This disables the CPU core clocks, | ||
41 | * the array clocks, and also the L2 controller. | ||
42 | */ | ||
43 | cpu_do_idle(); | ||
44 | |||
45 | writel_relaxed(mem_pm_ctrl, memory_pm_ctrl); | ||
46 | } | ||
47 | |||
48 | static int kirkwood_suspend_enter(suspend_state_t state) | ||
49 | { | ||
50 | switch (state) { | ||
51 | case PM_SUSPEND_STANDBY: | ||
52 | kirkwood_low_power(); | ||
53 | break; | ||
54 | default: | ||
55 | return -EINVAL; | ||
56 | } | ||
57 | return 0; | ||
58 | } | ||
59 | |||
60 | static int kirkwood_pm_valid_standby(suspend_state_t state) | ||
61 | { | ||
62 | return state == PM_SUSPEND_STANDBY; | ||
63 | } | ||
64 | |||
65 | static const struct platform_suspend_ops kirkwood_suspend_ops = { | ||
66 | .enter = kirkwood_suspend_enter, | ||
67 | .valid = kirkwood_pm_valid_standby, | ||
68 | }; | ||
69 | |||
70 | void __init kirkwood_pm_init(void) | ||
71 | { | ||
72 | ddr_operation_base = ioremap(DDR_OPERATION_BASE, 4); | ||
73 | memory_pm_ctrl = ioremap(MEMORY_PM_CTRL_PHYS, 4); | ||
74 | |||
75 | suspend_set_ops(&kirkwood_suspend_ops); | ||
76 | } | ||
diff --git a/arch/arm/mach-kirkwood/pm.h b/arch/arm/mach-kirkwood/pm.h deleted file mode 100644 index 21e7530f368b..000000000000 --- a/arch/arm/mach-kirkwood/pm.h +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | /* | ||
2 | * Power Management driver for Marvell Kirkwood SoCs | ||
3 | * | ||
4 | * Copyright (C) 2013 Ezequiel Garcia <ezequiel@free-electrons.com> | ||
5 | * Copyright (C) 2010 Simon Guinot <sguinot@lacie.com> | ||
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, | ||
9 | * version 2 of the License. | ||
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 | #ifndef __ARCH_KIRKWOOD_PM_H | ||
18 | #define __ARCH_KIRKWOOD_PM_H | ||
19 | |||
20 | #ifdef CONFIG_PM | ||
21 | void kirkwood_pm_init(void); | ||
22 | #else | ||
23 | static inline void kirkwood_pm_init(void) {}; | ||
24 | #endif | ||
25 | |||
26 | #endif | ||
diff --git a/arch/arm/mach-kirkwood/rd88f6192-nas-setup.c b/arch/arm/mach-kirkwood/rd88f6192-nas-setup.c deleted file mode 100644 index e4fd3129d36f..000000000000 --- a/arch/arm/mach-kirkwood/rd88f6192-nas-setup.c +++ /dev/null | |||
@@ -1,89 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-kirkwood/rd88f6192-nas-setup.c | ||
3 | * | ||
4 | * Marvell RD-88F6192-NAS Reference Board Setup | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public | ||
7 | * License version 2. This program is licensed "as is" without any | ||
8 | * warranty of any kind, whether express or implied. | ||
9 | */ | ||
10 | |||
11 | #include <linux/kernel.h> | ||
12 | #include <linux/init.h> | ||
13 | #include <linux/platform_device.h> | ||
14 | #include <linux/ata_platform.h> | ||
15 | #include <linux/mv643xx_eth.h> | ||
16 | #include <linux/gpio.h> | ||
17 | #include <linux/spi/flash.h> | ||
18 | #include <linux/spi/spi.h> | ||
19 | #include <asm/mach-types.h> | ||
20 | #include <asm/mach/arch.h> | ||
21 | #include <mach/kirkwood.h> | ||
22 | #include <plat/orion-gpio.h> | ||
23 | #include "common.h" | ||
24 | |||
25 | #define RD88F6192_GPIO_USB_VBUS 10 | ||
26 | |||
27 | static struct mv643xx_eth_platform_data rd88f6192_ge00_data = { | ||
28 | .phy_addr = MV643XX_ETH_PHY_ADDR(8), | ||
29 | }; | ||
30 | |||
31 | static struct mv_sata_platform_data rd88f6192_sata_data = { | ||
32 | .n_ports = 2, | ||
33 | }; | ||
34 | |||
35 | static const struct flash_platform_data rd88F6192_spi_slave_data = { | ||
36 | .type = "m25p128", | ||
37 | }; | ||
38 | |||
39 | static struct spi_board_info __initdata rd88F6192_spi_slave_info[] = { | ||
40 | { | ||
41 | .modalias = "m25p80", | ||
42 | .platform_data = &rd88F6192_spi_slave_data, | ||
43 | .irq = -1, | ||
44 | .max_speed_hz = 20000000, | ||
45 | .bus_num = 0, | ||
46 | .chip_select = 0, | ||
47 | }, | ||
48 | }; | ||
49 | |||
50 | static void __init rd88f6192_init(void) | ||
51 | { | ||
52 | /* | ||
53 | * Basic setup. Needs to be called early. | ||
54 | */ | ||
55 | kirkwood_init(); | ||
56 | |||
57 | orion_gpio_set_valid(RD88F6192_GPIO_USB_VBUS, 1); | ||
58 | if (gpio_request(RD88F6192_GPIO_USB_VBUS, "USB VBUS") != 0 || | ||
59 | gpio_direction_output(RD88F6192_GPIO_USB_VBUS, 1) != 0) | ||
60 | pr_err("RD-88F6192-NAS: failed to setup USB VBUS GPIO\n"); | ||
61 | |||
62 | kirkwood_ehci_init(); | ||
63 | kirkwood_ge00_init(&rd88f6192_ge00_data); | ||
64 | kirkwood_sata_init(&rd88f6192_sata_data); | ||
65 | spi_register_board_info(rd88F6192_spi_slave_info, | ||
66 | ARRAY_SIZE(rd88F6192_spi_slave_info)); | ||
67 | kirkwood_spi_init(); | ||
68 | kirkwood_uart0_init(); | ||
69 | } | ||
70 | |||
71 | static int __init rd88f6192_pci_init(void) | ||
72 | { | ||
73 | if (machine_is_rd88f6192_nas()) | ||
74 | kirkwood_pcie_init(KW_PCIE0); | ||
75 | |||
76 | return 0; | ||
77 | } | ||
78 | subsys_initcall(rd88f6192_pci_init); | ||
79 | |||
80 | MACHINE_START(RD88F6192_NAS, "Marvell RD-88F6192-NAS Development Board") | ||
81 | /* Maintainer: Saeed Bishara <saeed@marvell.com> */ | ||
82 | .atag_offset = 0x100, | ||
83 | .init_machine = rd88f6192_init, | ||
84 | .map_io = kirkwood_map_io, | ||
85 | .init_early = kirkwood_init_early, | ||
86 | .init_irq = kirkwood_init_irq, | ||
87 | .init_time = kirkwood_timer_init, | ||
88 | .restart = kirkwood_restart, | ||
89 | MACHINE_END | ||
diff --git a/arch/arm/mach-kirkwood/rd88f6281-setup.c b/arch/arm/mach-kirkwood/rd88f6281-setup.c deleted file mode 100644 index 5154bd2a3ad3..000000000000 --- a/arch/arm/mach-kirkwood/rd88f6281-setup.c +++ /dev/null | |||
@@ -1,128 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-kirkwood/rd88f6281-setup.c | ||
3 | * | ||
4 | * Marvell RD-88F6281 Reference Board Setup | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public | ||
7 | * License version 2. This program is licensed "as is" without any | ||
8 | * warranty of any kind, whether express or implied. | ||
9 | */ | ||
10 | |||
11 | #include <linux/kernel.h> | ||
12 | #include <linux/init.h> | ||
13 | #include <linux/platform_device.h> | ||
14 | #include <linux/irq.h> | ||
15 | #include <linux/mtd/partitions.h> | ||
16 | #include <linux/ata_platform.h> | ||
17 | #include <linux/mv643xx_eth.h> | ||
18 | #include <linux/ethtool.h> | ||
19 | #include <net/dsa.h> | ||
20 | #include <asm/mach-types.h> | ||
21 | #include <asm/mach/arch.h> | ||
22 | #include <mach/kirkwood.h> | ||
23 | #include <linux/platform_data/mmc-mvsdio.h> | ||
24 | #include "common.h" | ||
25 | #include "mpp.h" | ||
26 | |||
27 | static struct mtd_partition rd88f6281_nand_parts[] = { | ||
28 | { | ||
29 | .name = "u-boot", | ||
30 | .offset = 0, | ||
31 | .size = SZ_1M | ||
32 | }, { | ||
33 | .name = "uImage", | ||
34 | .offset = MTDPART_OFS_NXTBLK, | ||
35 | .size = SZ_2M | ||
36 | }, { | ||
37 | .name = "root", | ||
38 | .offset = MTDPART_OFS_NXTBLK, | ||
39 | .size = MTDPART_SIZ_FULL | ||
40 | }, | ||
41 | }; | ||
42 | |||
43 | static struct mv643xx_eth_platform_data rd88f6281_ge00_data = { | ||
44 | .phy_addr = MV643XX_ETH_PHY_NONE, | ||
45 | .speed = SPEED_1000, | ||
46 | .duplex = DUPLEX_FULL, | ||
47 | }; | ||
48 | |||
49 | static struct dsa_chip_data rd88f6281_switch_chip_data = { | ||
50 | .port_names[0] = "lan1", | ||
51 | .port_names[1] = "lan2", | ||
52 | .port_names[2] = "lan3", | ||
53 | .port_names[3] = "lan4", | ||
54 | .port_names[5] = "cpu", | ||
55 | }; | ||
56 | |||
57 | static struct dsa_platform_data rd88f6281_switch_plat_data = { | ||
58 | .nr_chips = 1, | ||
59 | .chip = &rd88f6281_switch_chip_data, | ||
60 | }; | ||
61 | |||
62 | static struct mv643xx_eth_platform_data rd88f6281_ge01_data = { | ||
63 | .phy_addr = MV643XX_ETH_PHY_ADDR(11), | ||
64 | }; | ||
65 | |||
66 | static struct mv_sata_platform_data rd88f6281_sata_data = { | ||
67 | .n_ports = 2, | ||
68 | }; | ||
69 | |||
70 | static struct mvsdio_platform_data rd88f6281_mvsdio_data = { | ||
71 | .gpio_card_detect = 28, | ||
72 | .gpio_write_protect = -1, | ||
73 | }; | ||
74 | |||
75 | static unsigned int rd88f6281_mpp_config[] __initdata = { | ||
76 | MPP28_GPIO, | ||
77 | 0 | ||
78 | }; | ||
79 | |||
80 | static void __init rd88f6281_init(void) | ||
81 | { | ||
82 | u32 dev, rev; | ||
83 | |||
84 | /* | ||
85 | * Basic setup. Needs to be called early. | ||
86 | */ | ||
87 | kirkwood_init(); | ||
88 | kirkwood_mpp_conf(rd88f6281_mpp_config); | ||
89 | |||
90 | kirkwood_nand_init(rd88f6281_nand_parts, | ||
91 | ARRAY_SIZE(rd88f6281_nand_parts), | ||
92 | 25); | ||
93 | kirkwood_ehci_init(); | ||
94 | |||
95 | kirkwood_ge00_init(&rd88f6281_ge00_data); | ||
96 | kirkwood_pcie_id(&dev, &rev); | ||
97 | if (rev == MV88F6281_REV_A0) { | ||
98 | rd88f6281_switch_chip_data.sw_addr = 10; | ||
99 | kirkwood_ge01_init(&rd88f6281_ge01_data); | ||
100 | } else { | ||
101 | rd88f6281_switch_chip_data.port_names[4] = "wan"; | ||
102 | } | ||
103 | kirkwood_ge00_switch_init(&rd88f6281_switch_plat_data, NO_IRQ); | ||
104 | |||
105 | kirkwood_sata_init(&rd88f6281_sata_data); | ||
106 | kirkwood_sdio_init(&rd88f6281_mvsdio_data); | ||
107 | kirkwood_uart0_init(); | ||
108 | } | ||
109 | |||
110 | static int __init rd88f6281_pci_init(void) | ||
111 | { | ||
112 | if (machine_is_rd88f6281()) | ||
113 | kirkwood_pcie_init(KW_PCIE0); | ||
114 | |||
115 | return 0; | ||
116 | } | ||
117 | subsys_initcall(rd88f6281_pci_init); | ||
118 | |||
119 | MACHINE_START(RD88F6281, "Marvell RD-88F6281 Reference Board") | ||
120 | /* Maintainer: Saeed Bishara <saeed@marvell.com> */ | ||
121 | .atag_offset = 0x100, | ||
122 | .init_machine = rd88f6281_init, | ||
123 | .map_io = kirkwood_map_io, | ||
124 | .init_early = kirkwood_init_early, | ||
125 | .init_irq = kirkwood_init_irq, | ||
126 | .init_time = kirkwood_timer_init, | ||
127 | .restart = kirkwood_restart, | ||
128 | MACHINE_END | ||
diff --git a/arch/arm/mach-kirkwood/t5325-setup.c b/arch/arm/mach-kirkwood/t5325-setup.c deleted file mode 100644 index 8736f8c97518..000000000000 --- a/arch/arm/mach-kirkwood/t5325-setup.c +++ /dev/null | |||
@@ -1,216 +0,0 @@ | |||
1 | /* | ||
2 | * | ||
3 | * HP t5325 Thin Client setup | ||
4 | * | ||
5 | * Copyright (C) 2010 Martin Michlmayr <tbm@cyrius.com> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or | ||
8 | * modify it under the terms of the GNU General Public License | ||
9 | * as published by the Free Software Foundation; either version | ||
10 | * 2 of the License, or (at your option) any later version. | ||
11 | */ | ||
12 | |||
13 | #include <linux/kernel.h> | ||
14 | #include <linux/init.h> | ||
15 | #include <linux/platform_device.h> | ||
16 | #include <linux/mtd/physmap.h> | ||
17 | #include <linux/spi/flash.h> | ||
18 | #include <linux/spi/spi.h> | ||
19 | #include <linux/i2c.h> | ||
20 | #include <linux/mv643xx_eth.h> | ||
21 | #include <linux/ata_platform.h> | ||
22 | #include <linux/gpio.h> | ||
23 | #include <linux/gpio_keys.h> | ||
24 | #include <linux/input.h> | ||
25 | #include <sound/alc5623.h> | ||
26 | #include <asm/mach-types.h> | ||
27 | #include <asm/mach/arch.h> | ||
28 | #include <mach/kirkwood.h> | ||
29 | #include "common.h" | ||
30 | #include "mpp.h" | ||
31 | |||
32 | static struct mtd_partition hp_t5325_partitions[] = { | ||
33 | { | ||
34 | .name = "u-boot env", | ||
35 | .size = SZ_64K, | ||
36 | .offset = SZ_512K + SZ_256K, | ||
37 | }, | ||
38 | { | ||
39 | .name = "permanent u-boot env", | ||
40 | .size = SZ_64K, | ||
41 | .offset = MTDPART_OFS_APPEND, | ||
42 | .mask_flags = MTD_WRITEABLE, | ||
43 | }, | ||
44 | { | ||
45 | .name = "HP env", | ||
46 | .size = SZ_64K, | ||
47 | .offset = MTDPART_OFS_APPEND, | ||
48 | }, | ||
49 | { | ||
50 | .name = "u-boot", | ||
51 | .size = SZ_512K, | ||
52 | .offset = 0, | ||
53 | .mask_flags = MTD_WRITEABLE, | ||
54 | }, | ||
55 | { | ||
56 | .name = "SSD firmware", | ||
57 | .size = SZ_256K, | ||
58 | .offset = SZ_512K, | ||
59 | }, | ||
60 | }; | ||
61 | |||
62 | static const struct flash_platform_data hp_t5325_flash = { | ||
63 | .type = "mx25l8005", | ||
64 | .name = "spi_flash", | ||
65 | .parts = hp_t5325_partitions, | ||
66 | .nr_parts = ARRAY_SIZE(hp_t5325_partitions), | ||
67 | }; | ||
68 | |||
69 | static struct spi_board_info __initdata hp_t5325_spi_slave_info[] = { | ||
70 | { | ||
71 | .modalias = "m25p80", | ||
72 | .platform_data = &hp_t5325_flash, | ||
73 | .irq = -1, | ||
74 | }, | ||
75 | }; | ||
76 | |||
77 | static struct mv643xx_eth_platform_data hp_t5325_ge00_data = { | ||
78 | .phy_addr = MV643XX_ETH_PHY_ADDR(8), | ||
79 | }; | ||
80 | |||
81 | static struct mv_sata_platform_data hp_t5325_sata_data = { | ||
82 | .n_ports = 2, | ||
83 | }; | ||
84 | |||
85 | static struct gpio_keys_button hp_t5325_buttons[] = { | ||
86 | { | ||
87 | .code = KEY_POWER, | ||
88 | .gpio = 45, | ||
89 | .desc = "Power", | ||
90 | .active_low = 1, | ||
91 | }, | ||
92 | }; | ||
93 | |||
94 | static struct gpio_keys_platform_data hp_t5325_button_data = { | ||
95 | .buttons = hp_t5325_buttons, | ||
96 | .nbuttons = ARRAY_SIZE(hp_t5325_buttons), | ||
97 | }; | ||
98 | |||
99 | static struct platform_device hp_t5325_button_device = { | ||
100 | .name = "gpio-keys", | ||
101 | .id = -1, | ||
102 | .num_resources = 0, | ||
103 | .dev = { | ||
104 | .platform_data = &hp_t5325_button_data, | ||
105 | } | ||
106 | }; | ||
107 | |||
108 | static struct platform_device hp_t5325_audio_device = { | ||
109 | .name = "t5325-audio", | ||
110 | .id = -1, | ||
111 | }; | ||
112 | |||
113 | static unsigned int hp_t5325_mpp_config[] __initdata = { | ||
114 | MPP0_NF_IO2, | ||
115 | MPP1_SPI_MOSI, | ||
116 | MPP2_SPI_SCK, | ||
117 | MPP3_SPI_MISO, | ||
118 | MPP4_NF_IO6, | ||
119 | MPP5_NF_IO7, | ||
120 | MPP6_SYSRST_OUTn, | ||
121 | MPP7_SPI_SCn, | ||
122 | MPP8_TW0_SDA, | ||
123 | MPP9_TW0_SCK, | ||
124 | MPP10_UART0_TXD, | ||
125 | MPP11_UART0_RXD, | ||
126 | MPP12_SD_CLK, | ||
127 | MPP13_GPIO, | ||
128 | MPP14_GPIO, | ||
129 | MPP15_GPIO, | ||
130 | MPP16_GPIO, | ||
131 | MPP17_GPIO, | ||
132 | MPP18_NF_IO0, | ||
133 | MPP19_NF_IO1, | ||
134 | MPP20_GPIO, | ||
135 | MPP21_GPIO, | ||
136 | MPP22_GPIO, | ||
137 | MPP23_GPIO, | ||
138 | MPP32_GPIO, | ||
139 | MPP33_GE1_TXCTL, | ||
140 | MPP39_AU_I2SBCLK, | ||
141 | MPP40_AU_I2SDO, | ||
142 | MPP43_AU_I2SDI, | ||
143 | MPP41_AU_I2SLRCLK, | ||
144 | MPP42_AU_I2SMCLK, | ||
145 | MPP45_GPIO, /* Power button */ | ||
146 | MPP48_GPIO, /* Board power off */ | ||
147 | 0 | ||
148 | }; | ||
149 | |||
150 | static struct alc5623_platform_data alc5621_data = { | ||
151 | .add_ctrl = 0x3700, | ||
152 | .jack_det_ctrl = 0x4810, | ||
153 | }; | ||
154 | |||
155 | static struct i2c_board_info i2c_board_info[] __initdata = { | ||
156 | { | ||
157 | I2C_BOARD_INFO("alc5621", 0x1a), | ||
158 | .platform_data = &alc5621_data, | ||
159 | }, | ||
160 | }; | ||
161 | |||
162 | #define HP_T5325_GPIO_POWER_OFF 48 | ||
163 | |||
164 | static void hp_t5325_power_off(void) | ||
165 | { | ||
166 | gpio_set_value(HP_T5325_GPIO_POWER_OFF, 1); | ||
167 | } | ||
168 | |||
169 | static void __init hp_t5325_init(void) | ||
170 | { | ||
171 | /* | ||
172 | * Basic setup. Needs to be called early. | ||
173 | */ | ||
174 | kirkwood_init(); | ||
175 | kirkwood_mpp_conf(hp_t5325_mpp_config); | ||
176 | |||
177 | kirkwood_uart0_init(); | ||
178 | spi_register_board_info(hp_t5325_spi_slave_info, | ||
179 | ARRAY_SIZE(hp_t5325_spi_slave_info)); | ||
180 | kirkwood_spi_init(); | ||
181 | kirkwood_i2c_init(); | ||
182 | kirkwood_ge00_init(&hp_t5325_ge00_data); | ||
183 | kirkwood_sata_init(&hp_t5325_sata_data); | ||
184 | kirkwood_ehci_init(); | ||
185 | platform_device_register(&hp_t5325_button_device); | ||
186 | platform_device_register(&hp_t5325_audio_device); | ||
187 | |||
188 | i2c_register_board_info(0, i2c_board_info, ARRAY_SIZE(i2c_board_info)); | ||
189 | kirkwood_audio_init(); | ||
190 | |||
191 | if (gpio_request(HP_T5325_GPIO_POWER_OFF, "power-off") == 0 && | ||
192 | gpio_direction_output(HP_T5325_GPIO_POWER_OFF, 0) == 0) | ||
193 | pm_power_off = hp_t5325_power_off; | ||
194 | else | ||
195 | pr_err("t5325: failed to configure power-off GPIO\n"); | ||
196 | } | ||
197 | |||
198 | static int __init hp_t5325_pci_init(void) | ||
199 | { | ||
200 | if (machine_is_t5325()) | ||
201 | kirkwood_pcie_init(KW_PCIE0); | ||
202 | |||
203 | return 0; | ||
204 | } | ||
205 | subsys_initcall(hp_t5325_pci_init); | ||
206 | |||
207 | MACHINE_START(T5325, "HP t5325 Thin Client") | ||
208 | /* Maintainer: Martin Michlmayr <tbm@cyrius.com> */ | ||
209 | .atag_offset = 0x100, | ||
210 | .init_machine = hp_t5325_init, | ||
211 | .map_io = kirkwood_map_io, | ||
212 | .init_early = kirkwood_init_early, | ||
213 | .init_irq = kirkwood_init_irq, | ||
214 | .init_time = kirkwood_timer_init, | ||
215 | .restart = kirkwood_restart, | ||
216 | MACHINE_END | ||
diff --git a/arch/arm/mach-kirkwood/ts219-setup.c b/arch/arm/mach-kirkwood/ts219-setup.c deleted file mode 100644 index e1267d6b468f..000000000000 --- a/arch/arm/mach-kirkwood/ts219-setup.c +++ /dev/null | |||
@@ -1,142 +0,0 @@ | |||
1 | /* | ||
2 | * | ||
3 | * QNAP TS-11x/TS-21x Turbo NAS Board Setup | ||
4 | * | ||
5 | * Copyright (C) 2009 Martin Michlmayr <tbm@cyrius.com> | ||
6 | * Copyright (C) 2008 Byron Bradley <byron.bbradley@gmail.com> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or | ||
9 | * modify it under the terms of the GNU General Public License | ||
10 | * as published by the Free Software Foundation; either version | ||
11 | * 2 of the License, or (at your option) any later version. | ||
12 | */ | ||
13 | |||
14 | #include <linux/kernel.h> | ||
15 | #include <linux/init.h> | ||
16 | #include <linux/platform_device.h> | ||
17 | #include <linux/i2c.h> | ||
18 | #include <linux/mv643xx_eth.h> | ||
19 | #include <linux/ata_platform.h> | ||
20 | #include <linux/gpio_keys.h> | ||
21 | #include <linux/input.h> | ||
22 | #include <asm/mach-types.h> | ||
23 | #include <asm/mach/arch.h> | ||
24 | #include <mach/kirkwood.h> | ||
25 | #include "common.h" | ||
26 | #include "mpp.h" | ||
27 | #include "tsx1x-common.h" | ||
28 | |||
29 | static struct i2c_board_info __initdata qnap_ts219_i2c_rtc = { | ||
30 | I2C_BOARD_INFO("s35390a", 0x30), | ||
31 | }; | ||
32 | |||
33 | static struct mv643xx_eth_platform_data qnap_ts219_ge00_data = { | ||
34 | .phy_addr = MV643XX_ETH_PHY_ADDR(8), | ||
35 | }; | ||
36 | |||
37 | static struct mv_sata_platform_data qnap_ts219_sata_data = { | ||
38 | .n_ports = 2, | ||
39 | }; | ||
40 | |||
41 | static struct gpio_keys_button qnap_ts219_buttons[] = { | ||
42 | { | ||
43 | .code = KEY_COPY, | ||
44 | .gpio = 15, | ||
45 | .desc = "USB Copy", | ||
46 | .active_low = 1, | ||
47 | }, | ||
48 | { | ||
49 | .code = KEY_RESTART, | ||
50 | .gpio = 16, | ||
51 | .desc = "Reset", | ||
52 | .active_low = 1, | ||
53 | }, | ||
54 | }; | ||
55 | |||
56 | static struct gpio_keys_platform_data qnap_ts219_button_data = { | ||
57 | .buttons = qnap_ts219_buttons, | ||
58 | .nbuttons = ARRAY_SIZE(qnap_ts219_buttons), | ||
59 | }; | ||
60 | |||
61 | static struct platform_device qnap_ts219_button_device = { | ||
62 | .name = "gpio-keys", | ||
63 | .id = -1, | ||
64 | .num_resources = 0, | ||
65 | .dev = { | ||
66 | .platform_data = &qnap_ts219_button_data, | ||
67 | } | ||
68 | }; | ||
69 | |||
70 | static unsigned int qnap_ts219_mpp_config[] __initdata = { | ||
71 | MPP0_SPI_SCn, | ||
72 | MPP1_SPI_MOSI, | ||
73 | MPP2_SPI_SCK, | ||
74 | MPP3_SPI_MISO, | ||
75 | MPP4_SATA1_ACTn, | ||
76 | MPP5_SATA0_ACTn, | ||
77 | MPP8_TW0_SDA, | ||
78 | MPP9_TW0_SCK, | ||
79 | MPP10_UART0_TXD, | ||
80 | MPP11_UART0_RXD, | ||
81 | MPP13_UART1_TXD, /* PIC controller */ | ||
82 | MPP14_UART1_RXD, /* PIC controller */ | ||
83 | MPP15_GPIO, /* USB Copy button (on devices with 88F6281) */ | ||
84 | MPP16_GPIO, /* Reset button (on devices with 88F6281) */ | ||
85 | MPP36_GPIO, /* RAM: 0: 256 MB, 1: 512 MB */ | ||
86 | MPP37_GPIO, /* Reset button (on devices with 88F6282) */ | ||
87 | MPP43_GPIO, /* USB Copy button (on devices with 88F6282) */ | ||
88 | MPP44_GPIO, /* Board ID: 0: TS-11x, 1: TS-21x */ | ||
89 | 0 | ||
90 | }; | ||
91 | |||
92 | static void __init qnap_ts219_init(void) | ||
93 | { | ||
94 | u32 dev, rev; | ||
95 | |||
96 | /* | ||
97 | * Basic setup. Needs to be called early. | ||
98 | */ | ||
99 | kirkwood_init(); | ||
100 | kirkwood_mpp_conf(qnap_ts219_mpp_config); | ||
101 | |||
102 | kirkwood_uart0_init(); | ||
103 | kirkwood_uart1_init(); /* A PIC controller is connected here. */ | ||
104 | qnap_tsx1x_register_flash(); | ||
105 | kirkwood_i2c_init(); | ||
106 | i2c_register_board_info(0, &qnap_ts219_i2c_rtc, 1); | ||
107 | |||
108 | kirkwood_pcie_id(&dev, &rev); | ||
109 | if (dev == MV88F6282_DEV_ID) { | ||
110 | qnap_ts219_buttons[0].gpio = 43; /* USB Copy button */ | ||
111 | qnap_ts219_buttons[1].gpio = 37; /* Reset button */ | ||
112 | qnap_ts219_ge00_data.phy_addr = MV643XX_ETH_PHY_ADDR(0); | ||
113 | } | ||
114 | |||
115 | kirkwood_ge00_init(&qnap_ts219_ge00_data); | ||
116 | kirkwood_sata_init(&qnap_ts219_sata_data); | ||
117 | kirkwood_ehci_init(); | ||
118 | platform_device_register(&qnap_ts219_button_device); | ||
119 | |||
120 | pm_power_off = qnap_tsx1x_power_off; | ||
121 | |||
122 | } | ||
123 | |||
124 | static int __init ts219_pci_init(void) | ||
125 | { | ||
126 | if (machine_is_ts219()) | ||
127 | kirkwood_pcie_init(KW_PCIE1 | KW_PCIE0); | ||
128 | |||
129 | return 0; | ||
130 | } | ||
131 | subsys_initcall(ts219_pci_init); | ||
132 | |||
133 | MACHINE_START(TS219, "QNAP TS-119/TS-219") | ||
134 | /* Maintainer: Martin Michlmayr <tbm@cyrius.com> */ | ||
135 | .atag_offset = 0x100, | ||
136 | .init_machine = qnap_ts219_init, | ||
137 | .map_io = kirkwood_map_io, | ||
138 | .init_early = kirkwood_init_early, | ||
139 | .init_irq = kirkwood_init_irq, | ||
140 | .init_time = kirkwood_timer_init, | ||
141 | .restart = kirkwood_restart, | ||
142 | MACHINE_END | ||
diff --git a/arch/arm/mach-kirkwood/ts41x-setup.c b/arch/arm/mach-kirkwood/ts41x-setup.c deleted file mode 100644 index 81d585806b2f..000000000000 --- a/arch/arm/mach-kirkwood/ts41x-setup.c +++ /dev/null | |||
@@ -1,186 +0,0 @@ | |||
1 | /* | ||
2 | * | ||
3 | * QNAP TS-410, TS-410U, TS-419P and TS-419U Turbo NAS Board Setup | ||
4 | * | ||
5 | * Copyright (C) 2009-2010 Martin Michlmayr <tbm@cyrius.com> | ||
6 | * Copyright (C) 2008 Byron Bradley <byron.bbradley@gmail.com> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or | ||
9 | * modify it under the terms of the GNU General Public License | ||
10 | * as published by the Free Software Foundation; either version | ||
11 | * 2 of the License, or (at your option) any later version. | ||
12 | */ | ||
13 | |||
14 | #include <linux/kernel.h> | ||
15 | #include <linux/init.h> | ||
16 | #include <linux/platform_device.h> | ||
17 | #include <linux/i2c.h> | ||
18 | #include <linux/mv643xx_eth.h> | ||
19 | #include <linux/ata_platform.h> | ||
20 | #include <linux/gpio.h> | ||
21 | #include <linux/gpio_keys.h> | ||
22 | #include <linux/input.h> | ||
23 | #include <linux/io.h> | ||
24 | #include <asm/mach-types.h> | ||
25 | #include <asm/mach/arch.h> | ||
26 | #include <mach/kirkwood.h> | ||
27 | #include "common.h" | ||
28 | #include "mpp.h" | ||
29 | #include "tsx1x-common.h" | ||
30 | |||
31 | /* for the PCIe reset workaround */ | ||
32 | #include <plat/pcie.h> | ||
33 | |||
34 | |||
35 | #define QNAP_TS41X_JUMPER_JP1 45 | ||
36 | |||
37 | static struct i2c_board_info __initdata qnap_ts41x_i2c_rtc = { | ||
38 | I2C_BOARD_INFO("s35390a", 0x30), | ||
39 | }; | ||
40 | |||
41 | static struct mv643xx_eth_platform_data qnap_ts41x_ge00_data = { | ||
42 | .phy_addr = MV643XX_ETH_PHY_ADDR(8), | ||
43 | }; | ||
44 | |||
45 | static struct mv643xx_eth_platform_data qnap_ts41x_ge01_data = { | ||
46 | .phy_addr = MV643XX_ETH_PHY_ADDR(0), | ||
47 | }; | ||
48 | |||
49 | static struct mv_sata_platform_data qnap_ts41x_sata_data = { | ||
50 | .n_ports = 2, | ||
51 | }; | ||
52 | |||
53 | static struct gpio_keys_button qnap_ts41x_buttons[] = { | ||
54 | { | ||
55 | .code = KEY_COPY, | ||
56 | .gpio = 43, | ||
57 | .desc = "USB Copy", | ||
58 | .active_low = 1, | ||
59 | }, | ||
60 | { | ||
61 | .code = KEY_RESTART, | ||
62 | .gpio = 37, | ||
63 | .desc = "Reset", | ||
64 | .active_low = 1, | ||
65 | }, | ||
66 | }; | ||
67 | |||
68 | static struct gpio_keys_platform_data qnap_ts41x_button_data = { | ||
69 | .buttons = qnap_ts41x_buttons, | ||
70 | .nbuttons = ARRAY_SIZE(qnap_ts41x_buttons), | ||
71 | }; | ||
72 | |||
73 | static struct platform_device qnap_ts41x_button_device = { | ||
74 | .name = "gpio-keys", | ||
75 | .id = -1, | ||
76 | .num_resources = 0, | ||
77 | .dev = { | ||
78 | .platform_data = &qnap_ts41x_button_data, | ||
79 | } | ||
80 | }; | ||
81 | |||
82 | static unsigned int qnap_ts41x_mpp_config[] __initdata = { | ||
83 | MPP0_SPI_SCn, | ||
84 | MPP1_SPI_MOSI, | ||
85 | MPP2_SPI_SCK, | ||
86 | MPP3_SPI_MISO, | ||
87 | MPP6_SYSRST_OUTn, | ||
88 | MPP7_PEX_RST_OUTn, | ||
89 | MPP8_TW0_SDA, | ||
90 | MPP9_TW0_SCK, | ||
91 | MPP10_UART0_TXD, | ||
92 | MPP11_UART0_RXD, | ||
93 | MPP13_UART1_TXD, /* PIC controller */ | ||
94 | MPP14_UART1_RXD, /* PIC controller */ | ||
95 | MPP15_SATA0_ACTn, | ||
96 | MPP16_SATA1_ACTn, | ||
97 | MPP20_GE1_TXD0, | ||
98 | MPP21_GE1_TXD1, | ||
99 | MPP22_GE1_TXD2, | ||
100 | MPP23_GE1_TXD3, | ||
101 | MPP24_GE1_RXD0, | ||
102 | MPP25_GE1_RXD1, | ||
103 | MPP26_GE1_RXD2, | ||
104 | MPP27_GE1_RXD3, | ||
105 | MPP30_GE1_RXCTL, | ||
106 | MPP31_GE1_RXCLK, | ||
107 | MPP32_GE1_TCLKOUT, | ||
108 | MPP33_GE1_TXCTL, | ||
109 | MPP36_GPIO, /* RAM: 0: 256 MB, 1: 512 MB */ | ||
110 | MPP37_GPIO, /* Reset button */ | ||
111 | MPP43_GPIO, /* USB Copy button */ | ||
112 | MPP44_GPIO, /* Board ID: 0: TS-419U, 1: TS-419 */ | ||
113 | MPP45_GPIO, /* JP1: 0: LCD, 1: serial console */ | ||
114 | MPP46_GPIO, /* External SATA HDD1 error indicator */ | ||
115 | MPP47_GPIO, /* External SATA HDD2 error indicator */ | ||
116 | MPP48_GPIO, /* External SATA HDD3 error indicator */ | ||
117 | MPP49_GPIO, /* External SATA HDD4 error indicator */ | ||
118 | 0 | ||
119 | }; | ||
120 | |||
121 | static void __init qnap_ts41x_init(void) | ||
122 | { | ||
123 | u32 dev, rev; | ||
124 | |||
125 | /* | ||
126 | * Basic setup. Needs to be called early. | ||
127 | */ | ||
128 | kirkwood_init(); | ||
129 | kirkwood_mpp_conf(qnap_ts41x_mpp_config); | ||
130 | |||
131 | kirkwood_uart0_init(); | ||
132 | kirkwood_uart1_init(); /* A PIC controller is connected here. */ | ||
133 | qnap_tsx1x_register_flash(); | ||
134 | kirkwood_i2c_init(); | ||
135 | i2c_register_board_info(0, &qnap_ts41x_i2c_rtc, 1); | ||
136 | |||
137 | kirkwood_pcie_id(&dev, &rev); | ||
138 | if (dev == MV88F6282_DEV_ID) { | ||
139 | qnap_ts41x_ge00_data.phy_addr = MV643XX_ETH_PHY_ADDR(0); | ||
140 | qnap_ts41x_ge01_data.phy_addr = MV643XX_ETH_PHY_ADDR(1); | ||
141 | } | ||
142 | kirkwood_ge00_init(&qnap_ts41x_ge00_data); | ||
143 | kirkwood_ge01_init(&qnap_ts41x_ge01_data); | ||
144 | |||
145 | kirkwood_sata_init(&qnap_ts41x_sata_data); | ||
146 | kirkwood_ehci_init(); | ||
147 | platform_device_register(&qnap_ts41x_button_device); | ||
148 | |||
149 | pm_power_off = qnap_tsx1x_power_off; | ||
150 | |||
151 | if (gpio_request(QNAP_TS41X_JUMPER_JP1, "JP1") == 0) | ||
152 | gpio_export(QNAP_TS41X_JUMPER_JP1, 0); | ||
153 | } | ||
154 | |||
155 | static int __init ts41x_pci_init(void) | ||
156 | { | ||
157 | if (machine_is_ts41x()) { | ||
158 | u32 dev, rev; | ||
159 | |||
160 | /* | ||
161 | * Without this explicit reset, the PCIe SATA controller | ||
162 | * (Marvell 88sx7042/sata_mv) is known to stop working | ||
163 | * after a few minutes. | ||
164 | */ | ||
165 | orion_pcie_reset(PCIE_VIRT_BASE); | ||
166 | |||
167 | kirkwood_pcie_id(&dev, &rev); | ||
168 | if (dev == MV88F6282_DEV_ID) | ||
169 | kirkwood_pcie_init(KW_PCIE1 | KW_PCIE0); | ||
170 | else | ||
171 | kirkwood_pcie_init(KW_PCIE0); | ||
172 | } | ||
173 | return 0; | ||
174 | } | ||
175 | subsys_initcall(ts41x_pci_init); | ||
176 | |||
177 | MACHINE_START(TS41X, "QNAP TS-41x") | ||
178 | /* Maintainer: Martin Michlmayr <tbm@cyrius.com> */ | ||
179 | .atag_offset = 0x100, | ||
180 | .init_machine = qnap_ts41x_init, | ||
181 | .map_io = kirkwood_map_io, | ||
182 | .init_early = kirkwood_init_early, | ||
183 | .init_irq = kirkwood_init_irq, | ||
184 | .init_time = kirkwood_timer_init, | ||
185 | .restart = kirkwood_restart, | ||
186 | MACHINE_END | ||
diff --git a/arch/arm/mach-kirkwood/tsx1x-common.c b/arch/arm/mach-kirkwood/tsx1x-common.c deleted file mode 100644 index cec87cef76ca..000000000000 --- a/arch/arm/mach-kirkwood/tsx1x-common.c +++ /dev/null | |||
@@ -1,113 +0,0 @@ | |||
1 | #include <linux/kernel.h> | ||
2 | #include <linux/pci.h> | ||
3 | #include <linux/platform_device.h> | ||
4 | #include <linux/mtd/physmap.h> | ||
5 | #include <linux/spi/flash.h> | ||
6 | #include <linux/spi/spi.h> | ||
7 | #include <linux/serial_reg.h> | ||
8 | #include <mach/kirkwood.h> | ||
9 | #include "common.h" | ||
10 | #include "tsx1x-common.h" | ||
11 | |||
12 | /* | ||
13 | * QNAP TS-x1x Boards flash | ||
14 | */ | ||
15 | |||
16 | /**************************************************************************** | ||
17 | * 16 MiB NOR flash. The struct mtd_partition is not in the same order as the | ||
18 | * partitions on the device because we want to keep compatibility with | ||
19 | * the QNAP firmware. | ||
20 | * Layout as used by QNAP: | ||
21 | * 0x00000000-0x00080000 : "U-Boot" | ||
22 | * 0x00200000-0x00400000 : "Kernel" | ||
23 | * 0x00400000-0x00d00000 : "RootFS" | ||
24 | * 0x00d00000-0x01000000 : "RootFS2" | ||
25 | * 0x00080000-0x000c0000 : "U-Boot Config" | ||
26 | * 0x000c0000-0x00200000 : "NAS Config" | ||
27 | * | ||
28 | * We'll use "RootFS1" instead of "RootFS" to stay compatible with the layout | ||
29 | * used by the QNAP TS-109/TS-209. | ||
30 | * | ||
31 | ***************************************************************************/ | ||
32 | |||
33 | static struct mtd_partition qnap_tsx1x_partitions[] = { | ||
34 | { | ||
35 | .name = "U-Boot", | ||
36 | .size = 0x00080000, | ||
37 | .offset = 0, | ||
38 | .mask_flags = MTD_WRITEABLE, | ||
39 | }, { | ||
40 | .name = "Kernel", | ||
41 | .size = 0x00200000, | ||
42 | .offset = 0x00200000, | ||
43 | }, { | ||
44 | .name = "RootFS1", | ||
45 | .size = 0x00900000, | ||
46 | .offset = 0x00400000, | ||
47 | }, { | ||
48 | .name = "RootFS2", | ||
49 | .size = 0x00300000, | ||
50 | .offset = 0x00d00000, | ||
51 | }, { | ||
52 | .name = "U-Boot Config", | ||
53 | .size = 0x00040000, | ||
54 | .offset = 0x00080000, | ||
55 | }, { | ||
56 | .name = "NAS Config", | ||
57 | .size = 0x00140000, | ||
58 | .offset = 0x000c0000, | ||
59 | }, | ||
60 | }; | ||
61 | |||
62 | static const struct flash_platform_data qnap_tsx1x_flash = { | ||
63 | .type = "m25p128", | ||
64 | .name = "spi_flash", | ||
65 | .parts = qnap_tsx1x_partitions, | ||
66 | .nr_parts = ARRAY_SIZE(qnap_tsx1x_partitions), | ||
67 | }; | ||
68 | |||
69 | static struct spi_board_info __initdata qnap_tsx1x_spi_slave_info[] = { | ||
70 | { | ||
71 | .modalias = "m25p80", | ||
72 | .platform_data = &qnap_tsx1x_flash, | ||
73 | .irq = -1, | ||
74 | .max_speed_hz = 20000000, | ||
75 | .bus_num = 0, | ||
76 | .chip_select = 0, | ||
77 | }, | ||
78 | }; | ||
79 | |||
80 | void __init qnap_tsx1x_register_flash(void) | ||
81 | { | ||
82 | spi_register_board_info(qnap_tsx1x_spi_slave_info, | ||
83 | ARRAY_SIZE(qnap_tsx1x_spi_slave_info)); | ||
84 | kirkwood_spi_init(); | ||
85 | } | ||
86 | |||
87 | |||
88 | /***************************************************************************** | ||
89 | * QNAP TS-x1x specific power off method via UART1-attached PIC | ||
90 | ****************************************************************************/ | ||
91 | |||
92 | #define UART1_REG(x) (UART1_VIRT_BASE + ((UART_##x) << 2)) | ||
93 | |||
94 | void qnap_tsx1x_power_off(void) | ||
95 | { | ||
96 | /* 19200 baud divisor */ | ||
97 | const unsigned divisor = ((kirkwood_tclk + (8 * 19200)) / (16 * 19200)); | ||
98 | |||
99 | pr_info("%s: triggering power-off...\n", __func__); | ||
100 | |||
101 | /* hijack UART1 and reset into sane state (19200,8n1) */ | ||
102 | writel(0x83, UART1_REG(LCR)); | ||
103 | writel(divisor & 0xff, UART1_REG(DLL)); | ||
104 | writel((divisor >> 8) & 0xff, UART1_REG(DLM)); | ||
105 | writel(0x03, UART1_REG(LCR)); | ||
106 | writel(0x00, UART1_REG(IER)); | ||
107 | writel(0x00, UART1_REG(FCR)); | ||
108 | writel(0x00, UART1_REG(MCR)); | ||
109 | |||
110 | /* send the power-off command 'A' to PIC */ | ||
111 | writel('A', UART1_REG(TX)); | ||
112 | } | ||
113 | |||
diff --git a/arch/arm/mach-kirkwood/tsx1x-common.h b/arch/arm/mach-kirkwood/tsx1x-common.h deleted file mode 100644 index 7fa037361b55..000000000000 --- a/arch/arm/mach-kirkwood/tsx1x-common.h +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | #ifndef __ARCH_KIRKWOOD_TSX1X_COMMON_H | ||
2 | #define __ARCH_KIRKWOOD_TSX1X_COMMON_H | ||
3 | |||
4 | extern void __init qnap_tsx1x_register_flash(void); | ||
5 | extern void qnap_tsx1x_power_off(void); | ||
6 | |||
7 | #endif | ||
diff --git a/arch/arm/mach-mediatek/Kconfig b/arch/arm/mach-mediatek/Kconfig new file mode 100644 index 000000000000..2c043a210db0 --- /dev/null +++ b/arch/arm/mach-mediatek/Kconfig | |||
@@ -0,0 +1,6 @@ | |||
1 | config ARCH_MEDIATEK | ||
2 | bool "Mediatek MT6589 SoC" if ARCH_MULTI_V7 | ||
3 | select ARM_GIC | ||
4 | select MTK_TIMER | ||
5 | help | ||
6 | Support for Mediatek Cortex-A7 Quad-Core-SoC MT6589. | ||
diff --git a/arch/arm/mach-mediatek/Makefile b/arch/arm/mach-mediatek/Makefile new file mode 100644 index 000000000000..43e619f56172 --- /dev/null +++ b/arch/arm/mach-mediatek/Makefile | |||
@@ -0,0 +1 @@ | |||
obj-$(CONFIG_ARCH_MEDIATEK) += mediatek.o | |||
diff --git a/arch/arm/mach-s5pv210/include/mach/dma.h b/arch/arm/mach-mediatek/mediatek.c index 201842a3769e..f2acf075350d 100644 --- a/arch/arm/mach-s5pv210/include/mach/dma.h +++ b/arch/arm/mach-mediatek/mediatek.c | |||
@@ -1,6 +1,8 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2010 Samsung Electronics Co. Ltd. | 2 | * Device Tree support for Mediatek SoCs |
3 | * Jaswinder Singh <jassi.brar@samsung.com> | 3 | * |
4 | * Copyright (c) 2014 MundoReader S.L. | ||
5 | * Author: Matthias Brugger <matthias.bgg@gmail.com> | ||
4 | * | 6 | * |
5 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
6 | * it under the terms of the GNU General Public License as published by | 8 | * it under the terms of the GNU General Public License as published by |
@@ -11,16 +13,15 @@ | |||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | * GNU General Public License for more details. | 15 | * 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., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
18 | */ | 16 | */ |
17 | #include <linux/init.h> | ||
18 | #include <asm/mach/arch.h> | ||
19 | 19 | ||
20 | #ifndef __MACH_DMA_H | 20 | static const char * const mediatek_board_dt_compat[] = { |
21 | #define __MACH_DMA_H | 21 | "mediatek,mt6589", |
22 | 22 | NULL, | |
23 | /* This platform uses the common DMA API driver for PL330 */ | 23 | }; |
24 | #include <plat/dma-pl330.h> | ||
25 | 24 | ||
26 | #endif /* __MACH_DMA_H */ | 25 | DT_MACHINE_START(MEDIATEK_DT, "Mediatek Cortex-A7 (Device Tree)") |
26 | .dt_compat = mediatek_board_dt_compat, | ||
27 | MACHINE_END | ||
diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig index b9bc599a5fd0..c1e4567a5ab3 100644 --- a/arch/arm/mach-mvebu/Kconfig +++ b/arch/arm/mach-mvebu/Kconfig | |||
@@ -14,11 +14,15 @@ menuconfig ARCH_MVEBU | |||
14 | 14 | ||
15 | if ARCH_MVEBU | 15 | if ARCH_MVEBU |
16 | 16 | ||
17 | config MACH_MVEBU_ANY | ||
18 | bool | ||
19 | |||
17 | config MACH_MVEBU_V7 | 20 | config MACH_MVEBU_V7 |
18 | bool | 21 | bool |
19 | select ARMADA_370_XP_TIMER | 22 | select ARMADA_370_XP_TIMER |
20 | select CACHE_L2X0 | 23 | select CACHE_L2X0 |
21 | select ARM_CPU_SUSPEND | 24 | select ARM_CPU_SUSPEND |
25 | select MACH_MVEBU_ANY | ||
22 | 26 | ||
23 | config MACH_ARMADA_370 | 27 | config MACH_ARMADA_370 |
24 | bool "Marvell Armada 370 boards" if ARCH_MULTI_V7 | 28 | bool "Marvell Armada 370 boards" if ARCH_MULTI_V7 |
@@ -75,6 +79,7 @@ config MACH_DOVE | |||
75 | select CACHE_L2X0 | 79 | select CACHE_L2X0 |
76 | select CPU_PJ4 | 80 | select CPU_PJ4 |
77 | select DOVE_CLK | 81 | select DOVE_CLK |
82 | select MACH_MVEBU_ANY | ||
78 | select ORION_IRQCHIP | 83 | select ORION_IRQCHIP |
79 | select ORION_TIMER | 84 | select ORION_TIMER |
80 | select PINCTRL_DOVE | 85 | select PINCTRL_DOVE |
@@ -87,6 +92,7 @@ config MACH_KIRKWOOD | |||
87 | select ARCH_REQUIRE_GPIOLIB | 92 | select ARCH_REQUIRE_GPIOLIB |
88 | select CPU_FEROCEON | 93 | select CPU_FEROCEON |
89 | select KIRKWOOD_CLK | 94 | select KIRKWOOD_CLK |
95 | select MACH_MVEBU_ANY | ||
90 | select ORION_IRQCHIP | 96 | select ORION_IRQCHIP |
91 | select ORION_TIMER | 97 | select ORION_TIMER |
92 | select PCI | 98 | select PCI |
@@ -96,4 +102,11 @@ config MACH_KIRKWOOD | |||
96 | Say 'Y' here if you want your kernel to support boards based | 102 | Say 'Y' here if you want your kernel to support boards based |
97 | on the Marvell Kirkwood device tree. | 103 | on the Marvell Kirkwood device tree. |
98 | 104 | ||
105 | config MACH_NETXBIG | ||
106 | bool "LaCie 2Big and 5Big Network v2" | ||
107 | depends on MACH_KIRKWOOD | ||
108 | help | ||
109 | Say 'Y' here if you want your kernel to support the | ||
110 | LaCie 2Big and 5Big Network v2 | ||
111 | |||
99 | endif | 112 | endif |
diff --git a/arch/arm/mach-mvebu/Makefile b/arch/arm/mach-mvebu/Makefile index 1636cdbef01a..e24136b42765 100644 --- a/arch/arm/mach-mvebu/Makefile +++ b/arch/arm/mach-mvebu/Makefile | |||
@@ -4,13 +4,13 @@ ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include \ | |||
4 | AFLAGS_coherency_ll.o := -Wa,-march=armv7-a | 4 | AFLAGS_coherency_ll.o := -Wa,-march=armv7-a |
5 | CFLAGS_pmsu.o := -march=armv7-a | 5 | CFLAGS_pmsu.o := -march=armv7-a |
6 | 6 | ||
7 | obj-y += system-controller.o mvebu-soc-id.o | 7 | obj-$(CONFIG_MACH_MVEBU_ANY) += system-controller.o mvebu-soc-id.o |
8 | 8 | ||
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 pmsu_ll.o | 10 | obj-y += cpu-reset.o board-v7.o coherency.o coherency_ll.o pmsu.o pmsu_ll.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..84cd90d9b860 100644 --- a/arch/arm/mach-mvebu/armada-370-xp.h +++ b/arch/arm/mach-mvebu/armada-370-xp.h | |||
@@ -24,4 +24,6 @@ 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 | |||
27 | #endif /* __MACH_ARMADA_370_XP_H */ | 29 | #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 b2524d689f21..6478626e3ff6 100644 --- a/arch/arm/mach-mvebu/board-v7.c +++ b/arch/arm/mach-mvebu/board-v7.c | |||
@@ -34,14 +34,14 @@ | |||
34 | #include "coherency.h" | 34 | #include "coherency.h" |
35 | #include "mvebu-soc-id.h" | 35 | #include "mvebu-soc-id.h" |
36 | 36 | ||
37 | static void __iomem *scu_base; | ||
38 | |||
37 | /* | 39 | /* |
38 | * Enables the SCU when available. Obviously, this is only useful on | 40 | * Enables the SCU when available. Obviously, this is only useful on |
39 | * Cortex-A based SOCs, not on PJ4B based ones. | 41 | * Cortex-A based SOCs, not on PJ4B based ones. |
40 | */ | 42 | */ |
41 | static void __init mvebu_scu_enable(void) | 43 | static void __init mvebu_scu_enable(void) |
42 | { | 44 | { |
43 | void __iomem *scu_base; | ||
44 | |||
45 | struct device_node *np = | 45 | struct device_node *np = |
46 | of_find_compatible_node(NULL, NULL, "arm,cortex-a9-scu"); | 46 | of_find_compatible_node(NULL, NULL, "arm,cortex-a9-scu"); |
47 | if (np) { | 47 | if (np) { |
@@ -51,6 +51,11 @@ static void __init mvebu_scu_enable(void) | |||
51 | } | 51 | } |
52 | } | 52 | } |
53 | 53 | ||
54 | void __iomem *mvebu_get_scu_base(void) | ||
55 | { | ||
56 | return scu_base; | ||
57 | } | ||
58 | |||
54 | /* | 59 | /* |
55 | * Early versions of Armada 375 SoC have a bug where the BootROM | 60 | * Early versions of Armada 375 SoC have a bug where the BootROM |
56 | * leaves an external data abort pending. The kernel is hit by this | 61 | * leaves an external data abort pending. The kernel is hit by this |
@@ -125,8 +130,16 @@ static void __init thermal_quirk(void) | |||
125 | { | 130 | { |
126 | struct device_node *np; | 131 | struct device_node *np; |
127 | u32 dev, rev; | 132 | u32 dev, rev; |
133 | int res; | ||
128 | 134 | ||
129 | if (mvebu_get_soc_id(&dev, &rev) == 0 && rev > ARMADA_375_Z1_REV) | 135 | /* |
136 | * The early SoC Z1 revision needs a quirk to be applied in order | ||
137 | * for the thermal controller to work properly. This quirk breaks | ||
138 | * the thermal support if applied on a SoC that doesn't need it, | ||
139 | * so we enforce the SoC revision to be known. | ||
140 | */ | ||
141 | res = mvebu_get_soc_id(&dev, &rev); | ||
142 | if (res < 0 || (res == 0 && rev > ARMADA_375_Z1_REV)) | ||
130 | return; | 143 | return; |
131 | 144 | ||
132 | for_each_compatible_node(np, NULL, "marvell,armada375-thermal") { | 145 | for_each_compatible_node(np, NULL, "marvell,armada375-thermal") { |
@@ -160,7 +173,8 @@ static void __init thermal_quirk(void) | |||
160 | 173 | ||
161 | /* | 174 | /* |
162 | * The thermal controller needs some quirk too, so let's change | 175 | * The thermal controller needs some quirk too, so let's change |
163 | * the compatible string to reflect this. | 176 | * the compatible string to reflect this and allow the driver |
177 | * the take the necessary action. | ||
164 | */ | 178 | */ |
165 | prop = kzalloc(sizeof(*prop), GFP_KERNEL); | 179 | prop = kzalloc(sizeof(*prop), GFP_KERNEL); |
166 | prop->name = kstrdup("compatible", GFP_KERNEL); | 180 | 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..3ccb40c3bf94 100644 --- a/arch/arm/mach-mvebu/common.h +++ b/arch/arm/mach-mvebu/common.h | |||
@@ -21,7 +21,8 @@ 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 | int mvebu_system_controller_get_soc_id(u32 *dev, u32 *rev); | ||
24 | 25 | ||
25 | void armada_xp_cpu_die(unsigned int cpu); | 26 | void __iomem *mvebu_get_scu_base(void); |
26 | 27 | ||
27 | #endif | 28 | #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/headsmp-a9.S b/arch/arm/mach-mvebu/headsmp-a9.S index 2c3c7fc65e28..be51c998c0cd 100644 --- a/arch/arm/mach-mvebu/headsmp-a9.S +++ b/arch/arm/mach-mvebu/headsmp-a9.S | |||
@@ -18,21 +18,6 @@ | |||
18 | #include <asm/assembler.h> | 18 | #include <asm/assembler.h> |
19 | 19 | ||
20 | __CPUINIT | 20 | __CPUINIT |
21 | #define CPU_RESUME_ADDR_REG 0xf10182d4 | ||
22 | |||
23 | .global armada_375_smp_cpu1_enable_code_start | ||
24 | .global armada_375_smp_cpu1_enable_code_end | ||
25 | |||
26 | armada_375_smp_cpu1_enable_code_start: | ||
27 | ARM_BE8(setend be) | ||
28 | adr r0, 1f | ||
29 | ldr r0, [r0] | ||
30 | ldr r1, [r0] | ||
31 | ARM_BE8(rev r1, r1) | ||
32 | ret r1 | ||
33 | 1: | ||
34 | .word CPU_RESUME_ADDR_REG | ||
35 | armada_375_smp_cpu1_enable_code_end: | ||
36 | 21 | ||
37 | ENTRY(mvebu_cortex_a9_secondary_startup) | 22 | ENTRY(mvebu_cortex_a9_secondary_startup) |
38 | ARM_BE8(setend be) | 23 | ARM_BE8(setend be) |
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..47a71a924b96 100644 --- a/arch/arm/mach-mvebu/platsmp-a9.c +++ b/arch/arm/mach-mvebu/platsmp-a9.c | |||
@@ -20,33 +20,8 @@ | |||
20 | #include <asm/smp_scu.h> | 20 | #include <asm/smp_scu.h> |
21 | #include <asm/smp_plat.h> | 21 | #include <asm/smp_plat.h> |
22 | #include "common.h" | 22 | #include "common.h" |
23 | #include "mvebu-soc-id.h" | ||
24 | #include "pmsu.h" | 23 | #include "pmsu.h" |
25 | 24 | ||
26 | #define CRYPT0_ENG_ID 41 | ||
27 | #define CRYPT0_ENG_ATTR 0x1 | ||
28 | #define SRAM_PHYS_BASE 0xFFFF0000 | ||
29 | |||
30 | #define BOOTROM_BASE 0xFFF00000 | ||
31 | #define BOOTROM_SIZE 0x100000 | ||
32 | |||
33 | extern unsigned char armada_375_smp_cpu1_enable_code_end; | ||
34 | extern unsigned char armada_375_smp_cpu1_enable_code_start; | ||
35 | |||
36 | void armada_375_smp_cpu1_enable_wa(void) | ||
37 | { | ||
38 | void __iomem *sram_virt_base; | ||
39 | |||
40 | mvebu_mbus_del_window(BOOTROM_BASE, BOOTROM_SIZE); | ||
41 | mvebu_mbus_add_window_by_id(CRYPT0_ENG_ID, CRYPT0_ENG_ATTR, | ||
42 | SRAM_PHYS_BASE, SZ_64K); | ||
43 | sram_virt_base = ioremap(SRAM_PHYS_BASE, SZ_64K); | ||
44 | |||
45 | memcpy(sram_virt_base, &armada_375_smp_cpu1_enable_code_start, | ||
46 | &armada_375_smp_cpu1_enable_code_end | ||
47 | - &armada_375_smp_cpu1_enable_code_start); | ||
48 | } | ||
49 | |||
50 | extern void mvebu_cortex_a9_secondary_startup(void); | 25 | extern void mvebu_cortex_a9_secondary_startup(void); |
51 | 26 | ||
52 | static int __cpuinit mvebu_cortex_a9_boot_secondary(unsigned int cpu, | 27 | static int __cpuinit mvebu_cortex_a9_boot_secondary(unsigned int cpu, |
@@ -63,21 +38,10 @@ static int __cpuinit mvebu_cortex_a9_boot_secondary(unsigned int cpu, | |||
63 | * address. | 38 | * address. |
64 | */ | 39 | */ |
65 | hw_cpu = cpu_logical_map(cpu); | 40 | hw_cpu = cpu_logical_map(cpu); |
66 | 41 | if (of_machine_is_compatible("marvell,armada375")) | |
67 | if (of_machine_is_compatible("marvell,armada375")) { | ||
68 | u32 dev, rev; | ||
69 | |||
70 | if (mvebu_get_soc_id(&dev, &rev) == 0 && | ||
71 | rev == ARMADA_375_Z1_REV) | ||
72 | armada_375_smp_cpu1_enable_wa(); | ||
73 | |||
74 | mvebu_system_controller_set_cpu_boot_addr(mvebu_cortex_a9_secondary_startup); | 42 | mvebu_system_controller_set_cpu_boot_addr(mvebu_cortex_a9_secondary_startup); |
75 | } | 43 | else |
76 | else { | 44 | mvebu_pmsu_set_cpu_boot_addr(hw_cpu, mvebu_cortex_a9_secondary_startup); |
77 | mvebu_pmsu_set_cpu_boot_addr(hw_cpu, | ||
78 | mvebu_cortex_a9_secondary_startup); | ||
79 | } | ||
80 | |||
81 | smp_wmb(); | 45 | smp_wmb(); |
82 | ret = mvebu_cpu_reset_deassert(hw_cpu); | 46 | ret = mvebu_cpu_reset_deassert(hw_cpu); |
83 | if (ret) { | 47 | if (ret) { |
@@ -91,9 +55,6 @@ static int __cpuinit mvebu_cortex_a9_boot_secondary(unsigned int cpu, | |||
91 | 55 | ||
92 | static struct smp_operations mvebu_cortex_a9_smp_ops __initdata = { | 56 | static struct smp_operations mvebu_cortex_a9_smp_ops __initdata = { |
93 | .smp_boot_secondary = mvebu_cortex_a9_boot_secondary, | 57 | .smp_boot_secondary = mvebu_cortex_a9_boot_secondary, |
94 | #ifdef CONFIG_HOTPLUG_CPU | ||
95 | .cpu_die = armada_xp_cpu_die, | ||
96 | #endif | ||
97 | }; | 58 | }; |
98 | 59 | ||
99 | CPU_METHOD_OF_DECLARE(mvebu_armada_375_smp, "marvell,armada-375-smp", | 60 | 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..895dc373c8a1 100644 --- a/arch/arm/mach-mvebu/platsmp.c +++ b/arch/arm/mach-mvebu/platsmp.c | |||
@@ -67,6 +67,7 @@ static void __init set_secondary_cpus_clock(void) | |||
67 | if (!cpu_clk) | 67 | if (!cpu_clk) |
68 | return; | 68 | return; |
69 | clk_set_rate(cpu_clk, rate); | 69 | clk_set_rate(cpu_clk, rate); |
70 | clk_prepare_enable(cpu_clk); | ||
70 | } | 71 | } |
71 | } | 72 | } |
72 | 73 | ||
@@ -78,6 +79,17 @@ static int armada_xp_boot_secondary(unsigned int cpu, struct task_struct *idle) | |||
78 | 79 | ||
79 | hw_cpu = cpu_logical_map(cpu); | 80 | hw_cpu = cpu_logical_map(cpu); |
80 | mvebu_pmsu_set_cpu_boot_addr(hw_cpu, armada_xp_secondary_startup); | 81 | mvebu_pmsu_set_cpu_boot_addr(hw_cpu, armada_xp_secondary_startup); |
82 | |||
83 | /* | ||
84 | * This is needed to wake up CPUs in the offline state after | ||
85 | * using CPU hotplug. | ||
86 | */ | ||
87 | arch_send_wakeup_ipi_mask(cpumask_of(cpu)); | ||
88 | |||
89 | /* | ||
90 | * This is needed to take secondary CPUs out of reset on the | ||
91 | * initial boot. | ||
92 | */ | ||
81 | ret = mvebu_cpu_reset_deassert(hw_cpu); | 93 | ret = mvebu_cpu_reset_deassert(hw_cpu); |
82 | if (ret) { | 94 | if (ret) { |
83 | pr_warn("unable to boot CPU: %d\n", ret); | 95 | pr_warn("unable to boot CPU: %d\n", ret); |
@@ -87,6 +99,19 @@ static int armada_xp_boot_secondary(unsigned int cpu, struct task_struct *idle) | |||
87 | return 0; | 99 | return 0; |
88 | } | 100 | } |
89 | 101 | ||
102 | /* | ||
103 | * When a CPU is brought back online, either through CPU hotplug, or | ||
104 | * because of the boot of a kexec'ed kernel, the PMSU configuration | ||
105 | * for this CPU might be in the deep idle state, preventing this CPU | ||
106 | * from receiving interrupts. Here, we therefore take out the current | ||
107 | * CPU from this state, which was entered by armada_xp_cpu_die() | ||
108 | * below. | ||
109 | */ | ||
110 | static void armada_xp_secondary_init(unsigned int cpu) | ||
111 | { | ||
112 | mvebu_v7_pmsu_idle_exit(); | ||
113 | } | ||
114 | |||
90 | static void __init armada_xp_smp_init_cpus(void) | 115 | static void __init armada_xp_smp_init_cpus(void) |
91 | { | 116 | { |
92 | unsigned int ncores = num_possible_cpus(); | 117 | unsigned int ncores = num_possible_cpus(); |
@@ -122,12 +147,36 @@ static void __init armada_xp_smp_prepare_cpus(unsigned int max_cpus) | |||
122 | panic("The address for the BootROM is incorrect"); | 147 | panic("The address for the BootROM is incorrect"); |
123 | } | 148 | } |
124 | 149 | ||
150 | #ifdef CONFIG_HOTPLUG_CPU | ||
151 | static void armada_xp_cpu_die(unsigned int cpu) | ||
152 | { | ||
153 | /* | ||
154 | * CPU hotplug is implemented by putting offline CPUs into the | ||
155 | * deep idle sleep state. | ||
156 | */ | ||
157 | armada_370_xp_pmsu_idle_enter(true); | ||
158 | } | ||
159 | |||
160 | /* | ||
161 | * We need a dummy function, so that platform_can_cpu_hotplug() knows | ||
162 | * we support CPU hotplug. However, the function does not need to do | ||
163 | * anything, because CPUs going offline can enter the deep idle state | ||
164 | * by themselves, without any help from a still alive CPU. | ||
165 | */ | ||
166 | static int armada_xp_cpu_kill(unsigned int cpu) | ||
167 | { | ||
168 | return 1; | ||
169 | } | ||
170 | #endif | ||
171 | |||
125 | struct smp_operations armada_xp_smp_ops __initdata = { | 172 | struct smp_operations armada_xp_smp_ops __initdata = { |
126 | .smp_init_cpus = armada_xp_smp_init_cpus, | 173 | .smp_init_cpus = armada_xp_smp_init_cpus, |
127 | .smp_prepare_cpus = armada_xp_smp_prepare_cpus, | 174 | .smp_prepare_cpus = armada_xp_smp_prepare_cpus, |
128 | .smp_boot_secondary = armada_xp_boot_secondary, | 175 | .smp_boot_secondary = armada_xp_boot_secondary, |
176 | .smp_secondary_init = armada_xp_secondary_init, | ||
129 | #ifdef CONFIG_HOTPLUG_CPU | 177 | #ifdef CONFIG_HOTPLUG_CPU |
130 | .cpu_die = armada_xp_cpu_die, | 178 | .cpu_die = armada_xp_cpu_die, |
179 | .cpu_kill = armada_xp_cpu_kill, | ||
131 | #endif | 180 | #endif |
132 | }; | 181 | }; |
133 | 182 | ||
diff --git a/arch/arm/mach-mvebu/pmsu.c b/arch/arm/mach-mvebu/pmsu.c index 25aa8237d668..8a70a51533fd 100644 --- a/arch/arm/mach-mvebu/pmsu.c +++ b/arch/arm/mach-mvebu/pmsu.c | |||
@@ -18,22 +18,29 @@ | |||
18 | 18 | ||
19 | #define pr_fmt(fmt) "mvebu-pmsu: " fmt | 19 | #define pr_fmt(fmt) "mvebu-pmsu: " fmt |
20 | 20 | ||
21 | #include <linux/clk.h> | ||
21 | #include <linux/cpu_pm.h> | 22 | #include <linux/cpu_pm.h> |
22 | #include <linux/kernel.h> | 23 | #include <linux/delay.h> |
23 | #include <linux/init.h> | 24 | #include <linux/init.h> |
24 | #include <linux/of_address.h> | ||
25 | #include <linux/io.h> | 25 | #include <linux/io.h> |
26 | #include <linux/kernel.h> | ||
27 | #include <linux/mbus.h> | ||
28 | #include <linux/of_address.h> | ||
29 | #include <linux/of_device.h> | ||
26 | #include <linux/platform_device.h> | 30 | #include <linux/platform_device.h> |
27 | #include <linux/smp.h> | 31 | #include <linux/pm_opp.h> |
28 | #include <linux/resource.h> | 32 | #include <linux/resource.h> |
33 | #include <linux/slab.h> | ||
34 | #include <linux/smp.h> | ||
29 | #include <asm/cacheflush.h> | 35 | #include <asm/cacheflush.h> |
30 | #include <asm/cp15.h> | 36 | #include <asm/cp15.h> |
37 | #include <asm/smp_scu.h> | ||
31 | #include <asm/smp_plat.h> | 38 | #include <asm/smp_plat.h> |
32 | #include <asm/suspend.h> | 39 | #include <asm/suspend.h> |
33 | #include <asm/tlbflush.h> | 40 | #include <asm/tlbflush.h> |
34 | #include "common.h" | 41 | #include "common.h" |
42 | #include "armada-370-xp.h" | ||
35 | 43 | ||
36 | static void __iomem *pmsu_mp_base; | ||
37 | 44 | ||
38 | #define PMSU_BASE_OFFSET 0x100 | 45 | #define PMSU_BASE_OFFSET 0x100 |
39 | #define PMSU_REG_SIZE 0x1000 | 46 | #define PMSU_REG_SIZE 0x1000 |
@@ -57,20 +64,45 @@ static void __iomem *pmsu_mp_base; | |||
57 | #define PMSU_STATUS_AND_MASK_IRQ_MASK BIT(24) | 64 | #define PMSU_STATUS_AND_MASK_IRQ_MASK BIT(24) |
58 | #define PMSU_STATUS_AND_MASK_FIQ_MASK BIT(25) | 65 | #define PMSU_STATUS_AND_MASK_FIQ_MASK BIT(25) |
59 | 66 | ||
67 | #define PMSU_EVENT_STATUS_AND_MASK(cpu) ((cpu * 0x100) + 0x120) | ||
68 | #define PMSU_EVENT_STATUS_AND_MASK_DFS_DONE BIT(1) | ||
69 | #define PMSU_EVENT_STATUS_AND_MASK_DFS_DONE_MASK BIT(17) | ||
70 | |||
60 | #define PMSU_BOOT_ADDR_REDIRECT_OFFSET(cpu) ((cpu * 0x100) + 0x124) | 71 | #define PMSU_BOOT_ADDR_REDIRECT_OFFSET(cpu) ((cpu * 0x100) + 0x124) |
61 | 72 | ||
62 | /* PMSU fabric registers */ | 73 | /* PMSU fabric registers */ |
63 | #define L2C_NFABRIC_PM_CTL 0x4 | 74 | #define L2C_NFABRIC_PM_CTL 0x4 |
64 | #define L2C_NFABRIC_PM_CTL_PWR_DOWN BIT(20) | 75 | #define L2C_NFABRIC_PM_CTL_PWR_DOWN BIT(20) |
65 | 76 | ||
77 | /* PMSU delay registers */ | ||
78 | #define PMSU_POWERDOWN_DELAY 0xF04 | ||
79 | #define PMSU_POWERDOWN_DELAY_PMU BIT(1) | ||
80 | #define PMSU_POWERDOWN_DELAY_MASK 0xFFFE | ||
81 | #define PMSU_DFLT_ARMADA38X_DELAY 0x64 | ||
82 | |||
83 | /* CA9 MPcore SoC Control registers */ | ||
84 | |||
85 | #define MPCORE_RESET_CTL 0x64 | ||
86 | #define MPCORE_RESET_CTL_L2 BIT(0) | ||
87 | #define MPCORE_RESET_CTL_DEBUG BIT(16) | ||
88 | |||
89 | #define SRAM_PHYS_BASE 0xFFFF0000 | ||
90 | #define BOOTROM_BASE 0xFFF00000 | ||
91 | #define BOOTROM_SIZE 0x100000 | ||
92 | |||
93 | #define ARMADA_370_CRYPT0_ENG_TARGET 0x9 | ||
94 | #define ARMADA_370_CRYPT0_ENG_ATTR 0x1 | ||
95 | |||
66 | extern void ll_disable_coherency(void); | 96 | extern void ll_disable_coherency(void); |
67 | extern void ll_enable_coherency(void); | 97 | extern void ll_enable_coherency(void); |
68 | 98 | ||
69 | extern void armada_370_xp_cpu_resume(void); | 99 | extern void armada_370_xp_cpu_resume(void); |
100 | extern void armada_38x_cpu_resume(void); | ||
70 | 101 | ||
71 | static struct platform_device armada_xp_cpuidle_device = { | 102 | static phys_addr_t pmsu_mp_phys_base; |
72 | .name = "cpuidle-armada-370-xp", | 103 | static void __iomem *pmsu_mp_base; |
73 | }; | 104 | |
105 | static void *mvebu_cpu_resume; | ||
74 | 106 | ||
75 | static struct of_device_id of_pmsu_table[] = { | 107 | static struct of_device_id of_pmsu_table[] = { |
76 | { .compatible = "marvell,armada-370-pmsu", }, | 108 | { .compatible = "marvell,armada-370-pmsu", }, |
@@ -85,7 +117,49 @@ void mvebu_pmsu_set_cpu_boot_addr(int hw_cpu, void *boot_addr) | |||
85 | PMSU_BOOT_ADDR_REDIRECT_OFFSET(hw_cpu)); | 117 | PMSU_BOOT_ADDR_REDIRECT_OFFSET(hw_cpu)); |
86 | } | 118 | } |
87 | 119 | ||
88 | static int __init armada_370_xp_pmsu_init(void) | 120 | extern unsigned char mvebu_boot_wa_start; |
121 | extern unsigned char mvebu_boot_wa_end; | ||
122 | |||
123 | /* | ||
124 | * This function sets up the boot address workaround needed for SMP | ||
125 | * boot on Armada 375 Z1 and cpuidle on Armada 370. It unmaps the | ||
126 | * BootROM Mbus window, and instead remaps a crypto SRAM into which a | ||
127 | * custom piece of code is copied to replace the problematic BootROM. | ||
128 | */ | ||
129 | int mvebu_setup_boot_addr_wa(unsigned int crypto_eng_target, | ||
130 | unsigned int crypto_eng_attribute, | ||
131 | phys_addr_t resume_addr_reg) | ||
132 | { | ||
133 | void __iomem *sram_virt_base; | ||
134 | u32 code_len = &mvebu_boot_wa_end - &mvebu_boot_wa_start; | ||
135 | |||
136 | mvebu_mbus_del_window(BOOTROM_BASE, BOOTROM_SIZE); | ||
137 | mvebu_mbus_add_window_by_id(crypto_eng_target, crypto_eng_attribute, | ||
138 | SRAM_PHYS_BASE, SZ_64K); | ||
139 | |||
140 | sram_virt_base = ioremap(SRAM_PHYS_BASE, SZ_64K); | ||
141 | if (!sram_virt_base) { | ||
142 | pr_err("Unable to map SRAM to setup the boot address WA\n"); | ||
143 | return -ENOMEM; | ||
144 | } | ||
145 | |||
146 | memcpy(sram_virt_base, &mvebu_boot_wa_start, code_len); | ||
147 | |||
148 | /* | ||
149 | * The last word of the code copied in SRAM must contain the | ||
150 | * physical base address of the PMSU register. We | ||
151 | * intentionally store this address in the native endianness | ||
152 | * of the system. | ||
153 | */ | ||
154 | __raw_writel((unsigned long)resume_addr_reg, | ||
155 | sram_virt_base + code_len - 4); | ||
156 | |||
157 | iounmap(sram_virt_base); | ||
158 | |||
159 | return 0; | ||
160 | } | ||
161 | |||
162 | static int __init mvebu_v7_pmsu_init(void) | ||
89 | { | 163 | { |
90 | struct device_node *np; | 164 | struct device_node *np; |
91 | struct resource res; | 165 | struct resource res; |
@@ -116,6 +190,8 @@ static int __init armada_370_xp_pmsu_init(void) | |||
116 | goto out; | 190 | goto out; |
117 | } | 191 | } |
118 | 192 | ||
193 | pmsu_mp_phys_base = res.start; | ||
194 | |||
119 | pmsu_mp_base = ioremap(res.start, resource_size(&res)); | 195 | pmsu_mp_base = ioremap(res.start, resource_size(&res)); |
120 | if (!pmsu_mp_base) { | 196 | if (!pmsu_mp_base) { |
121 | pr_err("unable to map registers\n"); | 197 | pr_err("unable to map registers\n"); |
@@ -129,7 +205,7 @@ static int __init armada_370_xp_pmsu_init(void) | |||
129 | return ret; | 205 | return ret; |
130 | } | 206 | } |
131 | 207 | ||
132 | static void armada_370_xp_pmsu_enable_l2_powerdown_onidle(void) | 208 | static void mvebu_v7_pmsu_enable_l2_powerdown_onidle(void) |
133 | { | 209 | { |
134 | u32 reg; | 210 | u32 reg; |
135 | 211 | ||
@@ -142,14 +218,20 @@ static void armada_370_xp_pmsu_enable_l2_powerdown_onidle(void) | |||
142 | writel(reg, pmsu_mp_base + L2C_NFABRIC_PM_CTL); | 218 | writel(reg, pmsu_mp_base + L2C_NFABRIC_PM_CTL); |
143 | } | 219 | } |
144 | 220 | ||
221 | enum pmsu_idle_prepare_flags { | ||
222 | PMSU_PREPARE_NORMAL = 0, | ||
223 | PMSU_PREPARE_DEEP_IDLE = BIT(0), | ||
224 | PMSU_PREPARE_SNOOP_DISABLE = BIT(1), | ||
225 | }; | ||
226 | |||
145 | /* No locking is needed because we only access per-CPU registers */ | 227 | /* No locking is needed because we only access per-CPU registers */ |
146 | void armada_370_xp_pmsu_idle_prepare(bool deepidle) | 228 | static int mvebu_v7_pmsu_idle_prepare(unsigned long flags) |
147 | { | 229 | { |
148 | unsigned int hw_cpu = cpu_logical_map(smp_processor_id()); | 230 | unsigned int hw_cpu = cpu_logical_map(smp_processor_id()); |
149 | u32 reg; | 231 | u32 reg; |
150 | 232 | ||
151 | if (pmsu_mp_base == NULL) | 233 | if (pmsu_mp_base == NULL) |
152 | return; | 234 | return -EINVAL; |
153 | 235 | ||
154 | /* | 236 | /* |
155 | * Adjust the PMSU configuration to wait for WFI signal, enable | 237 | * Adjust the PMSU configuration to wait for WFI signal, enable |
@@ -167,22 +249,34 @@ void armada_370_xp_pmsu_idle_prepare(bool deepidle) | |||
167 | 249 | ||
168 | reg = readl(pmsu_mp_base + PMSU_CONTROL_AND_CONFIG(hw_cpu)); | 250 | reg = readl(pmsu_mp_base + PMSU_CONTROL_AND_CONFIG(hw_cpu)); |
169 | /* ask HW to power down the L2 Cache if needed */ | 251 | /* ask HW to power down the L2 Cache if needed */ |
170 | if (deepidle) | 252 | if (flags & PMSU_PREPARE_DEEP_IDLE) |
171 | reg |= PMSU_CONTROL_AND_CONFIG_L2_PWDDN; | 253 | reg |= PMSU_CONTROL_AND_CONFIG_L2_PWDDN; |
172 | 254 | ||
173 | /* request power down */ | 255 | /* request power down */ |
174 | reg |= PMSU_CONTROL_AND_CONFIG_PWDDN_REQ; | 256 | reg |= PMSU_CONTROL_AND_CONFIG_PWDDN_REQ; |
175 | writel(reg, pmsu_mp_base + PMSU_CONTROL_AND_CONFIG(hw_cpu)); | 257 | writel(reg, pmsu_mp_base + PMSU_CONTROL_AND_CONFIG(hw_cpu)); |
176 | 258 | ||
177 | /* Disable snoop disable by HW - SW is taking care of it */ | 259 | if (flags & PMSU_PREPARE_SNOOP_DISABLE) { |
178 | reg = readl(pmsu_mp_base + PMSU_CPU_POWER_DOWN_CONTROL(hw_cpu)); | 260 | /* Disable snoop disable by HW - SW is taking care of it */ |
179 | reg |= PMSU_CPU_POWER_DOWN_DIS_SNP_Q_SKIP; | 261 | reg = readl(pmsu_mp_base + PMSU_CPU_POWER_DOWN_CONTROL(hw_cpu)); |
180 | writel(reg, pmsu_mp_base + PMSU_CPU_POWER_DOWN_CONTROL(hw_cpu)); | 262 | reg |= PMSU_CPU_POWER_DOWN_DIS_SNP_Q_SKIP; |
263 | writel(reg, pmsu_mp_base + PMSU_CPU_POWER_DOWN_CONTROL(hw_cpu)); | ||
264 | } | ||
265 | |||
266 | return 0; | ||
181 | } | 267 | } |
182 | 268 | ||
183 | static noinline int do_armada_370_xp_cpu_suspend(unsigned long deepidle) | 269 | int armada_370_xp_pmsu_idle_enter(unsigned long deepidle) |
184 | { | 270 | { |
185 | armada_370_xp_pmsu_idle_prepare(deepidle); | 271 | unsigned long flags = PMSU_PREPARE_SNOOP_DISABLE; |
272 | int ret; | ||
273 | |||
274 | if (deepidle) | ||
275 | flags |= PMSU_PREPARE_DEEP_IDLE; | ||
276 | |||
277 | ret = mvebu_v7_pmsu_idle_prepare(flags); | ||
278 | if (ret) | ||
279 | return ret; | ||
186 | 280 | ||
187 | v7_exit_coherency_flush(all); | 281 | v7_exit_coherency_flush(all); |
188 | 282 | ||
@@ -208,25 +302,50 @@ static noinline int do_armada_370_xp_cpu_suspend(unsigned long deepidle) | |||
208 | "isb " | 302 | "isb " |
209 | : : : "r0"); | 303 | : : : "r0"); |
210 | 304 | ||
211 | pr_warn("Failed to suspend the system\n"); | 305 | pr_debug("Failed to suspend the system\n"); |
212 | 306 | ||
213 | return 0; | 307 | return 0; |
214 | } | 308 | } |
215 | 309 | ||
216 | static int armada_370_xp_cpu_suspend(unsigned long deepidle) | 310 | static int armada_370_xp_cpu_suspend(unsigned long deepidle) |
217 | { | 311 | { |
218 | return cpu_suspend(deepidle, do_armada_370_xp_cpu_suspend); | 312 | return cpu_suspend(deepidle, armada_370_xp_pmsu_idle_enter); |
313 | } | ||
314 | |||
315 | static int armada_38x_do_cpu_suspend(unsigned long deepidle) | ||
316 | { | ||
317 | unsigned long flags = 0; | ||
318 | |||
319 | if (deepidle) | ||
320 | flags |= PMSU_PREPARE_DEEP_IDLE; | ||
321 | |||
322 | mvebu_v7_pmsu_idle_prepare(flags); | ||
323 | /* | ||
324 | * Already flushed cache, but do it again as the outer cache | ||
325 | * functions dirty the cache with spinlocks | ||
326 | */ | ||
327 | v7_exit_coherency_flush(louis); | ||
328 | |||
329 | scu_power_mode(mvebu_get_scu_base(), SCU_PM_POWEROFF); | ||
330 | |||
331 | cpu_do_idle(); | ||
332 | |||
333 | return 1; | ||
334 | } | ||
335 | |||
336 | static int armada_38x_cpu_suspend(unsigned long deepidle) | ||
337 | { | ||
338 | return cpu_suspend(false, armada_38x_do_cpu_suspend); | ||
219 | } | 339 | } |
220 | 340 | ||
221 | /* No locking is needed because we only access per-CPU registers */ | 341 | /* No locking is needed because we only access per-CPU registers */ |
222 | static noinline void armada_370_xp_pmsu_idle_restore(void) | 342 | void mvebu_v7_pmsu_idle_exit(void) |
223 | { | 343 | { |
224 | unsigned int hw_cpu = cpu_logical_map(smp_processor_id()); | 344 | unsigned int hw_cpu = cpu_logical_map(smp_processor_id()); |
225 | u32 reg; | 345 | u32 reg; |
226 | 346 | ||
227 | if (pmsu_mp_base == NULL) | 347 | if (pmsu_mp_base == NULL) |
228 | return; | 348 | return; |
229 | |||
230 | /* cancel ask HW to power down the L2 Cache if possible */ | 349 | /* cancel ask HW to power down the L2 Cache if possible */ |
231 | reg = readl(pmsu_mp_base + PMSU_CONTROL_AND_CONFIG(hw_cpu)); | 350 | reg = readl(pmsu_mp_base + PMSU_CONTROL_AND_CONFIG(hw_cpu)); |
232 | reg &= ~PMSU_CONTROL_AND_CONFIG_L2_PWDDN; | 351 | reg &= ~PMSU_CONTROL_AND_CONFIG_L2_PWDDN; |
@@ -241,53 +360,292 @@ static noinline void armada_370_xp_pmsu_idle_restore(void) | |||
241 | writel(reg, pmsu_mp_base + PMSU_STATUS_AND_MASK(hw_cpu)); | 360 | writel(reg, pmsu_mp_base + PMSU_STATUS_AND_MASK(hw_cpu)); |
242 | } | 361 | } |
243 | 362 | ||
244 | static int armada_370_xp_cpu_pm_notify(struct notifier_block *self, | 363 | static int mvebu_v7_cpu_pm_notify(struct notifier_block *self, |
245 | unsigned long action, void *hcpu) | 364 | unsigned long action, void *hcpu) |
246 | { | 365 | { |
247 | if (action == CPU_PM_ENTER) { | 366 | if (action == CPU_PM_ENTER) { |
248 | unsigned int hw_cpu = cpu_logical_map(smp_processor_id()); | 367 | unsigned int hw_cpu = cpu_logical_map(smp_processor_id()); |
249 | mvebu_pmsu_set_cpu_boot_addr(hw_cpu, armada_370_xp_cpu_resume); | 368 | mvebu_pmsu_set_cpu_boot_addr(hw_cpu, mvebu_cpu_resume); |
250 | } else if (action == CPU_PM_EXIT) { | 369 | } else if (action == CPU_PM_EXIT) { |
251 | armada_370_xp_pmsu_idle_restore(); | 370 | mvebu_v7_pmsu_idle_exit(); |
252 | } | 371 | } |
253 | 372 | ||
254 | return NOTIFY_OK; | 373 | return NOTIFY_OK; |
255 | } | 374 | } |
256 | 375 | ||
257 | static struct notifier_block armada_370_xp_cpu_pm_notifier = { | 376 | static struct notifier_block mvebu_v7_cpu_pm_notifier = { |
258 | .notifier_call = armada_370_xp_cpu_pm_notify, | 377 | .notifier_call = mvebu_v7_cpu_pm_notify, |
259 | }; | 378 | }; |
260 | 379 | ||
261 | int __init armada_370_xp_cpu_pm_init(void) | 380 | static struct platform_device mvebu_v7_cpuidle_device; |
381 | |||
382 | static __init int armada_370_cpuidle_init(void) | ||
262 | { | 383 | { |
263 | struct device_node *np; | 384 | struct device_node *np; |
385 | phys_addr_t redirect_reg; | ||
386 | |||
387 | np = of_find_compatible_node(NULL, NULL, "marvell,coherency-fabric"); | ||
388 | if (!np) | ||
389 | return -ENODEV; | ||
390 | of_node_put(np); | ||
264 | 391 | ||
265 | /* | 392 | /* |
266 | * Check that all the requirements are available to enable | 393 | * On Armada 370, there is "a slow exit process from the deep |
267 | * cpuidle. So far, it is only supported on Armada XP, cpuidle | 394 | * idle state due to heavy L1/L2 cache cleanup operations |
268 | * needs the coherency fabric and the PMSU enabled | 395 | * performed by the BootROM software". To avoid this, we |
396 | * replace the restart code of the bootrom by a a simple jump | ||
397 | * to the boot address. Then the code located at this boot | ||
398 | * address will take care of the initialization. | ||
269 | */ | 399 | */ |
400 | redirect_reg = pmsu_mp_phys_base + PMSU_BOOT_ADDR_REDIRECT_OFFSET(0); | ||
401 | mvebu_setup_boot_addr_wa(ARMADA_370_CRYPT0_ENG_TARGET, | ||
402 | ARMADA_370_CRYPT0_ENG_ATTR, | ||
403 | redirect_reg); | ||
270 | 404 | ||
271 | if (!of_machine_is_compatible("marvell,armadaxp")) | 405 | mvebu_cpu_resume = armada_370_xp_cpu_resume; |
272 | return 0; | 406 | mvebu_v7_cpuidle_device.dev.platform_data = armada_370_xp_cpu_suspend; |
407 | mvebu_v7_cpuidle_device.name = "cpuidle-armada-370"; | ||
408 | |||
409 | return 0; | ||
410 | } | ||
411 | |||
412 | static __init int armada_38x_cpuidle_init(void) | ||
413 | { | ||
414 | struct device_node *np; | ||
415 | void __iomem *mpsoc_base; | ||
416 | u32 reg; | ||
417 | |||
418 | np = of_find_compatible_node(NULL, NULL, | ||
419 | "marvell,armada-380-coherency-fabric"); | ||
420 | if (!np) | ||
421 | return -ENODEV; | ||
422 | of_node_put(np); | ||
423 | |||
424 | np = of_find_compatible_node(NULL, NULL, | ||
425 | "marvell,armada-380-mpcore-soc-ctrl"); | ||
426 | if (!np) | ||
427 | return -ENODEV; | ||
428 | mpsoc_base = of_iomap(np, 0); | ||
429 | BUG_ON(!mpsoc_base); | ||
430 | of_node_put(np); | ||
431 | |||
432 | /* Set up reset mask when powering down the cpus */ | ||
433 | reg = readl(mpsoc_base + MPCORE_RESET_CTL); | ||
434 | reg |= MPCORE_RESET_CTL_L2; | ||
435 | reg |= MPCORE_RESET_CTL_DEBUG; | ||
436 | writel(reg, mpsoc_base + MPCORE_RESET_CTL); | ||
437 | iounmap(mpsoc_base); | ||
438 | |||
439 | /* Set up delay */ | ||
440 | reg = readl(pmsu_mp_base + PMSU_POWERDOWN_DELAY); | ||
441 | reg &= ~PMSU_POWERDOWN_DELAY_MASK; | ||
442 | reg |= PMSU_DFLT_ARMADA38X_DELAY; | ||
443 | reg |= PMSU_POWERDOWN_DELAY_PMU; | ||
444 | writel(reg, pmsu_mp_base + PMSU_POWERDOWN_DELAY); | ||
445 | |||
446 | mvebu_cpu_resume = armada_38x_cpu_resume; | ||
447 | mvebu_v7_cpuidle_device.dev.platform_data = armada_38x_cpu_suspend; | ||
448 | mvebu_v7_cpuidle_device.name = "cpuidle-armada-38x"; | ||
449 | |||
450 | return 0; | ||
451 | } | ||
452 | |||
453 | static __init int armada_xp_cpuidle_init(void) | ||
454 | { | ||
455 | struct device_node *np; | ||
273 | 456 | ||
274 | np = of_find_compatible_node(NULL, NULL, "marvell,coherency-fabric"); | 457 | np = of_find_compatible_node(NULL, NULL, "marvell,coherency-fabric"); |
275 | if (!np) | 458 | if (!np) |
276 | return 0; | 459 | return -ENODEV; |
277 | of_node_put(np); | 460 | of_node_put(np); |
278 | 461 | ||
462 | mvebu_cpu_resume = armada_370_xp_cpu_resume; | ||
463 | mvebu_v7_cpuidle_device.dev.platform_data = armada_370_xp_cpu_suspend; | ||
464 | mvebu_v7_cpuidle_device.name = "cpuidle-armada-xp"; | ||
465 | |||
466 | return 0; | ||
467 | } | ||
468 | |||
469 | static int __init mvebu_v7_cpu_pm_init(void) | ||
470 | { | ||
471 | struct device_node *np; | ||
472 | int ret; | ||
473 | |||
279 | np = of_find_matching_node(NULL, of_pmsu_table); | 474 | np = of_find_matching_node(NULL, of_pmsu_table); |
280 | if (!np) | 475 | if (!np) |
281 | return 0; | 476 | return 0; |
282 | of_node_put(np); | 477 | of_node_put(np); |
283 | 478 | ||
284 | armada_370_xp_pmsu_enable_l2_powerdown_onidle(); | 479 | if (of_machine_is_compatible("marvell,armadaxp")) |
285 | armada_xp_cpuidle_device.dev.platform_data = armada_370_xp_cpu_suspend; | 480 | ret = armada_xp_cpuidle_init(); |
286 | platform_device_register(&armada_xp_cpuidle_device); | 481 | else if (of_machine_is_compatible("marvell,armada370")) |
287 | cpu_pm_register_notifier(&armada_370_xp_cpu_pm_notifier); | 482 | ret = armada_370_cpuidle_init(); |
483 | else if (of_machine_is_compatible("marvell,armada380")) | ||
484 | ret = armada_38x_cpuidle_init(); | ||
485 | else | ||
486 | return 0; | ||
487 | |||
488 | if (ret) | ||
489 | return ret; | ||
490 | |||
491 | mvebu_v7_pmsu_enable_l2_powerdown_onidle(); | ||
492 | platform_device_register(&mvebu_v7_cpuidle_device); | ||
493 | cpu_pm_register_notifier(&mvebu_v7_cpu_pm_notifier); | ||
494 | |||
495 | return 0; | ||
496 | } | ||
497 | |||
498 | arch_initcall(mvebu_v7_cpu_pm_init); | ||
499 | early_initcall(mvebu_v7_pmsu_init); | ||
500 | |||
501 | static void mvebu_pmsu_dfs_request_local(void *data) | ||
502 | { | ||
503 | u32 reg; | ||
504 | u32 cpu = smp_processor_id(); | ||
505 | unsigned long flags; | ||
506 | |||
507 | local_irq_save(flags); | ||
508 | |||
509 | /* Prepare to enter idle */ | ||
510 | reg = readl(pmsu_mp_base + PMSU_STATUS_AND_MASK(cpu)); | ||
511 | reg |= PMSU_STATUS_AND_MASK_CPU_IDLE_WAIT | | ||
512 | PMSU_STATUS_AND_MASK_IRQ_MASK | | ||
513 | PMSU_STATUS_AND_MASK_FIQ_MASK; | ||
514 | writel(reg, pmsu_mp_base + PMSU_STATUS_AND_MASK(cpu)); | ||
515 | |||
516 | /* Request the DFS transition */ | ||
517 | reg = readl(pmsu_mp_base + PMSU_CONTROL_AND_CONFIG(cpu)); | ||
518 | reg |= PMSU_CONTROL_AND_CONFIG_DFS_REQ; | ||
519 | writel(reg, pmsu_mp_base + PMSU_CONTROL_AND_CONFIG(cpu)); | ||
520 | |||
521 | /* The fact of entering idle will trigger the DFS transition */ | ||
522 | wfi(); | ||
523 | |||
524 | /* | ||
525 | * We're back from idle, the DFS transition has completed, | ||
526 | * clear the idle wait indication. | ||
527 | */ | ||
528 | reg = readl(pmsu_mp_base + PMSU_STATUS_AND_MASK(cpu)); | ||
529 | reg &= ~PMSU_STATUS_AND_MASK_CPU_IDLE_WAIT; | ||
530 | writel(reg, pmsu_mp_base + PMSU_STATUS_AND_MASK(cpu)); | ||
531 | |||
532 | local_irq_restore(flags); | ||
533 | } | ||
534 | |||
535 | int mvebu_pmsu_dfs_request(int cpu) | ||
536 | { | ||
537 | unsigned long timeout; | ||
538 | int hwcpu = cpu_logical_map(cpu); | ||
539 | u32 reg; | ||
540 | |||
541 | /* Clear any previous DFS DONE event */ | ||
542 | reg = readl(pmsu_mp_base + PMSU_EVENT_STATUS_AND_MASK(hwcpu)); | ||
543 | reg &= ~PMSU_EVENT_STATUS_AND_MASK_DFS_DONE; | ||
544 | writel(reg, pmsu_mp_base + PMSU_EVENT_STATUS_AND_MASK(hwcpu)); | ||
545 | |||
546 | /* Mask the DFS done interrupt, since we are going to poll */ | ||
547 | reg = readl(pmsu_mp_base + PMSU_EVENT_STATUS_AND_MASK(hwcpu)); | ||
548 | reg |= PMSU_EVENT_STATUS_AND_MASK_DFS_DONE_MASK; | ||
549 | writel(reg, pmsu_mp_base + PMSU_EVENT_STATUS_AND_MASK(hwcpu)); | ||
550 | |||
551 | /* Trigger the DFS on the appropriate CPU */ | ||
552 | smp_call_function_single(cpu, mvebu_pmsu_dfs_request_local, | ||
553 | NULL, false); | ||
554 | |||
555 | /* Poll until the DFS done event is generated */ | ||
556 | timeout = jiffies + HZ; | ||
557 | while (time_before(jiffies, timeout)) { | ||
558 | reg = readl(pmsu_mp_base + PMSU_EVENT_STATUS_AND_MASK(hwcpu)); | ||
559 | if (reg & PMSU_EVENT_STATUS_AND_MASK_DFS_DONE) | ||
560 | break; | ||
561 | udelay(10); | ||
562 | } | ||
563 | |||
564 | if (time_after(jiffies, timeout)) | ||
565 | return -ETIME; | ||
566 | |||
567 | /* Restore the DFS mask to its original state */ | ||
568 | reg = readl(pmsu_mp_base + PMSU_EVENT_STATUS_AND_MASK(hwcpu)); | ||
569 | reg &= ~PMSU_EVENT_STATUS_AND_MASK_DFS_DONE_MASK; | ||
570 | writel(reg, pmsu_mp_base + PMSU_EVENT_STATUS_AND_MASK(hwcpu)); | ||
571 | |||
572 | return 0; | ||
573 | } | ||
574 | |||
575 | static int __init armada_xp_pmsu_cpufreq_init(void) | ||
576 | { | ||
577 | struct device_node *np; | ||
578 | struct resource res; | ||
579 | int ret, cpu; | ||
580 | |||
581 | if (!of_machine_is_compatible("marvell,armadaxp")) | ||
582 | return 0; | ||
583 | |||
584 | /* | ||
585 | * In order to have proper cpufreq handling, we need to ensure | ||
586 | * that the Device Tree description of the CPU clock includes | ||
587 | * the definition of the PMU DFS registers. If not, we do not | ||
588 | * register the clock notifier and the cpufreq driver. This | ||
589 | * piece of code is only for compatibility with old Device | ||
590 | * Trees. | ||
591 | */ | ||
592 | np = of_find_compatible_node(NULL, NULL, "marvell,armada-xp-cpu-clock"); | ||
593 | if (!np) | ||
594 | return 0; | ||
595 | |||
596 | ret = of_address_to_resource(np, 1, &res); | ||
597 | if (ret) { | ||
598 | pr_warn(FW_WARN "not enabling cpufreq, deprecated armada-xp-cpu-clock binding\n"); | ||
599 | of_node_put(np); | ||
600 | return 0; | ||
601 | } | ||
602 | |||
603 | of_node_put(np); | ||
604 | |||
605 | /* | ||
606 | * For each CPU, this loop registers the operating points | ||
607 | * supported (which are the nominal CPU frequency and half of | ||
608 | * it), and registers the clock notifier that will take care | ||
609 | * of doing the PMSU part of a frequency transition. | ||
610 | */ | ||
611 | for_each_possible_cpu(cpu) { | ||
612 | struct device *cpu_dev; | ||
613 | struct clk *clk; | ||
614 | int ret; | ||
615 | |||
616 | cpu_dev = get_cpu_device(cpu); | ||
617 | if (!cpu_dev) { | ||
618 | pr_err("Cannot get CPU %d\n", cpu); | ||
619 | continue; | ||
620 | } | ||
621 | |||
622 | clk = clk_get(cpu_dev, 0); | ||
623 | if (IS_ERR(clk)) { | ||
624 | pr_err("Cannot get clock for CPU %d\n", cpu); | ||
625 | return PTR_ERR(clk); | ||
626 | } | ||
627 | |||
628 | /* | ||
629 | * In case of a failure of dev_pm_opp_add(), we don't | ||
630 | * bother with cleaning up the registered OPP (there's | ||
631 | * no function to do so), and simply cancel the | ||
632 | * registration of the cpufreq device. | ||
633 | */ | ||
634 | ret = dev_pm_opp_add(cpu_dev, clk_get_rate(clk), 0); | ||
635 | if (ret) { | ||
636 | clk_put(clk); | ||
637 | return ret; | ||
638 | } | ||
639 | |||
640 | ret = dev_pm_opp_add(cpu_dev, clk_get_rate(clk) / 2, 0); | ||
641 | if (ret) { | ||
642 | clk_put(clk); | ||
643 | return ret; | ||
644 | } | ||
645 | } | ||
288 | 646 | ||
647 | platform_device_register_simple("cpufreq-generic", -1, NULL, 0); | ||
289 | return 0; | 648 | return 0; |
290 | } | 649 | } |
291 | 650 | ||
292 | arch_initcall(armada_370_xp_cpu_pm_init); | 651 | device_initcall(armada_xp_pmsu_cpufreq_init); |
293 | early_initcall(armada_370_xp_pmsu_init); | ||
diff --git a/arch/arm/mach-mvebu/pmsu.h b/arch/arm/mach-mvebu/pmsu.h index 07a737c6b95d..6b58c1fe2b0d 100644 --- a/arch/arm/mach-mvebu/pmsu.h +++ b/arch/arm/mach-mvebu/pmsu.h | |||
@@ -12,5 +12,10 @@ | |||
12 | #define __MACH_MVEBU_PMSU_H | 12 | #define __MACH_MVEBU_PMSU_H |
13 | 13 | ||
14 | int armada_xp_boot_cpu(unsigned int cpu_id, void *phys_addr); | 14 | int armada_xp_boot_cpu(unsigned int cpu_id, void *phys_addr); |
15 | int mvebu_setup_boot_addr_wa(unsigned int crypto_eng_target, | ||
16 | unsigned int crypto_eng_attribute, | ||
17 | phys_addr_t resume_addr_reg); | ||
18 | |||
19 | void mvebu_v7_pmsu_idle_exit(void); | ||
15 | 20 | ||
16 | #endif /* __MACH_370_XP_PMSU_H */ | 21 | #endif /* __MACH_370_XP_PMSU_H */ |
diff --git a/arch/arm/mach-mvebu/pmsu_ll.S b/arch/arm/mach-mvebu/pmsu_ll.S index fc3de68d8c54..a945756cfb45 100644 --- a/arch/arm/mach-mvebu/pmsu_ll.S +++ b/arch/arm/mach-mvebu/pmsu_ll.S | |||
@@ -23,3 +23,39 @@ ARM_BE8(setend be ) @ go BE8 if entered LE | |||
23 | b cpu_resume | 23 | b cpu_resume |
24 | ENDPROC(armada_370_xp_cpu_resume) | 24 | ENDPROC(armada_370_xp_cpu_resume) |
25 | 25 | ||
26 | ENTRY(armada_38x_cpu_resume) | ||
27 | /* do we need it for Armada 38x*/ | ||
28 | ARM_BE8(setend be ) @ go BE8 if entered LE | ||
29 | bl v7_invalidate_l1 | ||
30 | mrc p15, 4, r1, c15, c0 @ get SCU base address | ||
31 | orr r1, r1, #0x8 @ SCU CPU Power Status Register | ||
32 | mrc 15, 0, r0, cr0, cr0, 5 @ get the CPU ID | ||
33 | and r0, r0, #15 | ||
34 | add r1, r1, r0 | ||
35 | mov r0, #0x0 | ||
36 | strb r0, [r1] @ switch SCU power state to Normal mode | ||
37 | b cpu_resume | ||
38 | ENDPROC(armada_38x_cpu_resume) | ||
39 | |||
40 | .global mvebu_boot_wa_start | ||
41 | .global mvebu_boot_wa_end | ||
42 | |||
43 | /* The following code will be executed from SRAM */ | ||
44 | ENTRY(mvebu_boot_wa_start) | ||
45 | mvebu_boot_wa_start: | ||
46 | ARM_BE8(setend be) | ||
47 | adr r0, 1f | ||
48 | ldr r0, [r0] @ load the address of the | ||
49 | @ resume register | ||
50 | ldr r0, [r0] @ load the value in the | ||
51 | @ resume register | ||
52 | ARM_BE8(rev r0, r0) @ the value is stored LE | ||
53 | mov pc, r0 @ jump to this value | ||
54 | /* | ||
55 | * the last word of this piece of code will be filled by the physical | ||
56 | * address of the boot address register just after being copied in SRAM | ||
57 | */ | ||
58 | 1: | ||
59 | .long . | ||
60 | mvebu_boot_wa_end: | ||
61 | ENDPROC(mvebu_boot_wa_end) | ||
diff --git a/arch/arm/mach-mvebu/system-controller.c b/arch/arm/mach-mvebu/system-controller.c index 0c5524ac75b7..a068cb5c2ce8 100644 --- a/arch/arm/mach-mvebu/system-controller.c +++ b/arch/arm/mach-mvebu/system-controller.c | |||
@@ -28,8 +28,14 @@ | |||
28 | #include <linux/io.h> | 28 | #include <linux/io.h> |
29 | #include <linux/reboot.h> | 29 | #include <linux/reboot.h> |
30 | #include "common.h" | 30 | #include "common.h" |
31 | #include "mvebu-soc-id.h" | ||
32 | #include "pmsu.h" | ||
33 | |||
34 | #define ARMADA_375_CRYPT0_ENG_TARGET 41 | ||
35 | #define ARMADA_375_CRYPT0_ENG_ATTR 1 | ||
31 | 36 | ||
32 | static void __iomem *system_controller_base; | 37 | static void __iomem *system_controller_base; |
38 | static phys_addr_t system_controller_phys_base; | ||
33 | 39 | ||
34 | struct mvebu_system_controller { | 40 | struct mvebu_system_controller { |
35 | u32 rstoutn_mask_offset; | 41 | u32 rstoutn_mask_offset; |
@@ -39,6 +45,9 @@ struct mvebu_system_controller { | |||
39 | u32 system_soft_reset; | 45 | u32 system_soft_reset; |
40 | 46 | ||
41 | u32 resume_boot_addr; | 47 | u32 resume_boot_addr; |
48 | |||
49 | u32 dev_id; | ||
50 | u32 rev_id; | ||
42 | }; | 51 | }; |
43 | static struct mvebu_system_controller *mvebu_sc; | 52 | static struct mvebu_system_controller *mvebu_sc; |
44 | 53 | ||
@@ -47,6 +56,8 @@ static const struct mvebu_system_controller armada_370_xp_system_controller = { | |||
47 | .system_soft_reset_offset = 0x64, | 56 | .system_soft_reset_offset = 0x64, |
48 | .rstoutn_mask_reset_out_en = 0x1, | 57 | .rstoutn_mask_reset_out_en = 0x1, |
49 | .system_soft_reset = 0x1, | 58 | .system_soft_reset = 0x1, |
59 | .dev_id = 0x38, | ||
60 | .rev_id = 0x3c, | ||
50 | }; | 61 | }; |
51 | 62 | ||
52 | static const struct mvebu_system_controller armada_375_system_controller = { | 63 | static const struct mvebu_system_controller armada_375_system_controller = { |
@@ -55,6 +66,8 @@ static const struct mvebu_system_controller armada_375_system_controller = { | |||
55 | .rstoutn_mask_reset_out_en = 0x1, | 66 | .rstoutn_mask_reset_out_en = 0x1, |
56 | .system_soft_reset = 0x1, | 67 | .system_soft_reset = 0x1, |
57 | .resume_boot_addr = 0xd4, | 68 | .resume_boot_addr = 0xd4, |
69 | .dev_id = 0x38, | ||
70 | .rev_id = 0x3c, | ||
58 | }; | 71 | }; |
59 | 72 | ||
60 | static const struct mvebu_system_controller orion_system_controller = { | 73 | static const struct mvebu_system_controller orion_system_controller = { |
@@ -101,11 +114,45 @@ void mvebu_restart(enum reboot_mode mode, const char *cmd) | |||
101 | ; | 114 | ; |
102 | } | 115 | } |
103 | 116 | ||
117 | int mvebu_system_controller_get_soc_id(u32 *dev, u32 *rev) | ||
118 | { | ||
119 | if (of_machine_is_compatible("marvell,armada380") && | ||
120 | system_controller_base) { | ||
121 | *dev = readl(system_controller_base + mvebu_sc->dev_id) >> 16; | ||
122 | *rev = (readl(system_controller_base + mvebu_sc->rev_id) >> 8) | ||
123 | & 0xF; | ||
124 | return 0; | ||
125 | } else | ||
126 | return -ENODEV; | ||
127 | } | ||
128 | |||
104 | #ifdef CONFIG_SMP | 129 | #ifdef CONFIG_SMP |
130 | void mvebu_armada375_smp_wa_init(void) | ||
131 | { | ||
132 | u32 dev, rev; | ||
133 | phys_addr_t resume_addr_reg; | ||
134 | |||
135 | if (mvebu_get_soc_id(&dev, &rev) != 0) | ||
136 | return; | ||
137 | |||
138 | if (rev != ARMADA_375_Z1_REV) | ||
139 | return; | ||
140 | |||
141 | resume_addr_reg = system_controller_phys_base + | ||
142 | mvebu_sc->resume_boot_addr; | ||
143 | mvebu_setup_boot_addr_wa(ARMADA_375_CRYPT0_ENG_TARGET, | ||
144 | ARMADA_375_CRYPT0_ENG_ATTR, | ||
145 | resume_addr_reg); | ||
146 | } | ||
147 | |||
105 | void mvebu_system_controller_set_cpu_boot_addr(void *boot_addr) | 148 | void mvebu_system_controller_set_cpu_boot_addr(void *boot_addr) |
106 | { | 149 | { |
107 | BUG_ON(system_controller_base == NULL); | 150 | BUG_ON(system_controller_base == NULL); |
108 | BUG_ON(mvebu_sc->resume_boot_addr == 0); | 151 | BUG_ON(mvebu_sc->resume_boot_addr == 0); |
152 | |||
153 | if (of_machine_is_compatible("marvell,armada375")) | ||
154 | mvebu_armada375_smp_wa_init(); | ||
155 | |||
109 | writel(virt_to_phys(boot_addr), system_controller_base + | 156 | writel(virt_to_phys(boot_addr), system_controller_base + |
110 | mvebu_sc->resume_boot_addr); | 157 | mvebu_sc->resume_boot_addr); |
111 | } | 158 | } |
@@ -119,7 +166,10 @@ static int __init mvebu_system_controller_init(void) | |||
119 | np = of_find_matching_node_and_match(NULL, of_system_controller_table, | 166 | np = of_find_matching_node_and_match(NULL, of_system_controller_table, |
120 | &match); | 167 | &match); |
121 | if (np) { | 168 | if (np) { |
169 | struct resource res; | ||
122 | system_controller_base = of_iomap(np, 0); | 170 | system_controller_base = of_iomap(np, 0); |
171 | of_address_to_resource(np, 0, &res); | ||
172 | system_controller_phys_base = res.start; | ||
123 | mvebu_sc = (struct mvebu_system_controller *)match->data; | 173 | mvebu_sc = (struct mvebu_system_controller *)match->data; |
124 | of_node_put(np); | 174 | of_node_put(np); |
125 | } | 175 | } |
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index fa7800015753..4481b6867902 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile | |||
@@ -202,6 +202,7 @@ obj-$(CONFIG_SOC_OMAP2420) += opp2420_data.o | |||
202 | obj-$(CONFIG_SOC_OMAP2430) += opp2430_data.o | 202 | obj-$(CONFIG_SOC_OMAP2430) += opp2430_data.o |
203 | 203 | ||
204 | # hwmod data | 204 | # hwmod data |
205 | obj-y += omap_hwmod_common_ipblock_data.o | ||
205 | obj-$(CONFIG_SOC_OMAP2420) += omap_hwmod_2xxx_ipblock_data.o | 206 | obj-$(CONFIG_SOC_OMAP2420) += omap_hwmod_2xxx_ipblock_data.o |
206 | obj-$(CONFIG_SOC_OMAP2420) += omap_hwmod_2xxx_3xxx_ipblock_data.o | 207 | obj-$(CONFIG_SOC_OMAP2420) += omap_hwmod_2xxx_3xxx_ipblock_data.o |
207 | obj-$(CONFIG_SOC_OMAP2420) += omap_hwmod_2xxx_interconnect_data.o | 208 | obj-$(CONFIG_SOC_OMAP2420) += omap_hwmod_2xxx_interconnect_data.o |
diff --git a/arch/arm/mach-omap2/cm2_7xx.h b/arch/arm/mach-omap2/cm2_7xx.h index 9ad7594e7622..e966e3a3c931 100644 --- a/arch/arm/mach-omap2/cm2_7xx.h +++ b/arch/arm/mach-omap2/cm2_7xx.h | |||
@@ -357,6 +357,10 @@ | |||
357 | #define DRA7XX_CM_L3INIT_SATA_CLKCTRL DRA7XX_CM_CORE_REGADDR(DRA7XX_CM_CORE_L3INIT_INST, 0x0088) | 357 | #define DRA7XX_CM_L3INIT_SATA_CLKCTRL DRA7XX_CM_CORE_REGADDR(DRA7XX_CM_CORE_L3INIT_INST, 0x0088) |
358 | #define DRA7XX_CM_PCIE_CLKSTCTRL_OFFSET 0x00a0 | 358 | #define DRA7XX_CM_PCIE_CLKSTCTRL_OFFSET 0x00a0 |
359 | #define DRA7XX_CM_PCIE_STATICDEP_OFFSET 0x00a4 | 359 | #define DRA7XX_CM_PCIE_STATICDEP_OFFSET 0x00a4 |
360 | #define DRA7XX_CM_L3INIT_PCIESS1_CLKCTRL_OFFSET 0x00b0 | ||
361 | #define DRA7XX_CM_L3INIT_PCIESS1_CLKCTRL DRA7XX_CM_CORE_REGADDR(DRA7XX_CM_CORE_L3INIT_INST, 0x00b0) | ||
362 | #define DRA7XX_CM_L3INIT_PCIESS2_CLKCTRL_OFFSET 0x00b8 | ||
363 | #define DRA7XX_CM_L3INIT_PCIESS2_CLKCTRL DRA7XX_CM_CORE_REGADDR(DRA7XX_CM_CORE_L3INIT_INST, 0x00b8) | ||
360 | #define DRA7XX_CM_GMAC_CLKSTCTRL_OFFSET 0x00c0 | 364 | #define DRA7XX_CM_GMAC_CLKSTCTRL_OFFSET 0x00c0 |
361 | #define DRA7XX_CM_GMAC_STATICDEP_OFFSET 0x00c4 | 365 | #define DRA7XX_CM_GMAC_STATICDEP_OFFSET 0x00c4 |
362 | #define DRA7XX_CM_GMAC_DYNAMICDEP_OFFSET 0x00c8 | 366 | #define DRA7XX_CM_GMAC_DYNAMICDEP_OFFSET 0x00c8 |
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index b6f8f348296e..324f02bf8a51 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c | |||
@@ -432,9 +432,9 @@ static int __init omap2_init_devices(void) | |||
432 | */ | 432 | */ |
433 | omap_init_audio(); | 433 | omap_init_audio(); |
434 | omap_init_camera(); | 434 | omap_init_camera(); |
435 | omap_init_mbox(); | ||
436 | /* If dtb is there, the devices will be created dynamically */ | 435 | /* If dtb is there, the devices will be created dynamically */ |
437 | if (!of_have_populated_dt()) { | 436 | if (!of_have_populated_dt()) { |
437 | omap_init_mbox(); | ||
438 | omap_init_mcspi(); | 438 | omap_init_mcspi(); |
439 | omap_init_sham(); | 439 | omap_init_sham(); |
440 | omap_init_aes(); | 440 | omap_init_aes(); |
diff --git a/arch/arm/mach-omap2/dma.c b/arch/arm/mach-omap2/dma.c index a6d2cf1f8d02..e1a56d87599e 100644 --- a/arch/arm/mach-omap2/dma.c +++ b/arch/arm/mach-omap2/dma.c | |||
@@ -259,6 +259,9 @@ static int __init omap2_system_dma_init_dev(struct omap_hwmod *oh, void *unused) | |||
259 | if (cpu_is_omap34xx() && (omap_type() != OMAP2_DEVICE_TYPE_GP)) | 259 | if (cpu_is_omap34xx() && (omap_type() != OMAP2_DEVICE_TYPE_GP)) |
260 | d->dev_caps |= HS_CHANNELS_RESERVED; | 260 | d->dev_caps |= HS_CHANNELS_RESERVED; |
261 | 261 | ||
262 | if (platform_get_irq_byname(pdev, "0") < 0) | ||
263 | d->dev_caps |= DMA_ENGINE_HANDLE_IRQ; | ||
264 | |||
262 | /* Check the capabilities register for descriptor loading feature */ | 265 | /* Check the capabilities register for descriptor loading feature */ |
263 | if (dma_read(CAPS_0, 0) & DMA_HAS_DESCRIPTOR_CAPS) | 266 | if (dma_read(CAPS_0, 0) & DMA_HAS_DESCRIPTOR_CAPS) |
264 | dma_common_ch_end = CCDN; | 267 | dma_common_ch_end = CCDN; |
diff --git a/arch/arm/mach-omap2/omap_hwmod_2420_data.c b/arch/arm/mach-omap2/omap_hwmod_2420_data.c index 2f15979c2e9c..65b1647092bd 100644 --- a/arch/arm/mach-omap2/omap_hwmod_2420_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_2420_data.c | |||
@@ -16,7 +16,6 @@ | |||
16 | #include <linux/i2c-omap.h> | 16 | #include <linux/i2c-omap.h> |
17 | #include <linux/platform_data/spi-omap2-mcspi.h> | 17 | #include <linux/platform_data/spi-omap2-mcspi.h> |
18 | #include <linux/omap-dma.h> | 18 | #include <linux/omap-dma.h> |
19 | #include <linux/platform_data/mailbox-omap.h> | ||
20 | #include <plat/dmtimer.h> | 19 | #include <plat/dmtimer.h> |
21 | 20 | ||
22 | #include "omap_hwmod.h" | 21 | #include "omap_hwmod.h" |
@@ -163,18 +162,6 @@ static struct omap_hwmod omap2420_dma_system_hwmod = { | |||
163 | }; | 162 | }; |
164 | 163 | ||
165 | /* mailbox */ | 164 | /* mailbox */ |
166 | static struct omap_mbox_dev_info omap2420_mailbox_info[] = { | ||
167 | { .name = "dsp", .tx_id = 0, .rx_id = 1, .irq_id = 0, .usr_id = 0 }, | ||
168 | { .name = "iva", .tx_id = 2, .rx_id = 3, .irq_id = 1, .usr_id = 3 }, | ||
169 | }; | ||
170 | |||
171 | static struct omap_mbox_pdata omap2420_mailbox_attrs = { | ||
172 | .num_users = 4, | ||
173 | .num_fifos = 6, | ||
174 | .info_cnt = ARRAY_SIZE(omap2420_mailbox_info), | ||
175 | .info = omap2420_mailbox_info, | ||
176 | }; | ||
177 | |||
178 | static struct omap_hwmod omap2420_mailbox_hwmod = { | 165 | static struct omap_hwmod omap2420_mailbox_hwmod = { |
179 | .name = "mailbox", | 166 | .name = "mailbox", |
180 | .class = &omap2xxx_mailbox_hwmod_class, | 167 | .class = &omap2xxx_mailbox_hwmod_class, |
@@ -188,7 +175,6 @@ static struct omap_hwmod omap2420_mailbox_hwmod = { | |||
188 | .idlest_idle_bit = OMAP24XX_ST_MAILBOXES_SHIFT, | 175 | .idlest_idle_bit = OMAP24XX_ST_MAILBOXES_SHIFT, |
189 | }, | 176 | }, |
190 | }, | 177 | }, |
191 | .dev_attr = &omap2420_mailbox_attrs, | ||
192 | }; | 178 | }; |
193 | 179 | ||
194 | /* | 180 | /* |
diff --git a/arch/arm/mach-omap2/omap_hwmod_2430_data.c b/arch/arm/mach-omap2/omap_hwmod_2430_data.c index 6d1b60902179..c2555cb95e71 100644 --- a/arch/arm/mach-omap2/omap_hwmod_2430_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_2430_data.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/platform_data/asoc-ti-mcbsp.h> | 17 | #include <linux/platform_data/asoc-ti-mcbsp.h> |
18 | #include <linux/platform_data/spi-omap2-mcspi.h> | 18 | #include <linux/platform_data/spi-omap2-mcspi.h> |
19 | #include <linux/omap-dma.h> | 19 | #include <linux/omap-dma.h> |
20 | #include <linux/platform_data/mailbox-omap.h> | ||
21 | #include <plat/dmtimer.h> | 20 | #include <plat/dmtimer.h> |
22 | 21 | ||
23 | #include "omap_hwmod.h" | 22 | #include "omap_hwmod.h" |
@@ -161,17 +160,6 @@ static struct omap_hwmod omap2430_dma_system_hwmod = { | |||
161 | }; | 160 | }; |
162 | 161 | ||
163 | /* mailbox */ | 162 | /* mailbox */ |
164 | static struct omap_mbox_dev_info omap2430_mailbox_info[] = { | ||
165 | { .name = "dsp", .tx_id = 0, .rx_id = 1 }, | ||
166 | }; | ||
167 | |||
168 | static struct omap_mbox_pdata omap2430_mailbox_attrs = { | ||
169 | .num_users = 4, | ||
170 | .num_fifos = 6, | ||
171 | .info_cnt = ARRAY_SIZE(omap2430_mailbox_info), | ||
172 | .info = omap2430_mailbox_info, | ||
173 | }; | ||
174 | |||
175 | static struct omap_hwmod omap2430_mailbox_hwmod = { | 163 | static struct omap_hwmod omap2430_mailbox_hwmod = { |
176 | .name = "mailbox", | 164 | .name = "mailbox", |
177 | .class = &omap2xxx_mailbox_hwmod_class, | 165 | .class = &omap2xxx_mailbox_hwmod_class, |
@@ -185,7 +173,6 @@ static struct omap_hwmod omap2430_mailbox_hwmod = { | |||
185 | .idlest_idle_bit = OMAP24XX_ST_MAILBOXES_SHIFT, | 173 | .idlest_idle_bit = OMAP24XX_ST_MAILBOXES_SHIFT, |
186 | }, | 174 | }, |
187 | }, | 175 | }, |
188 | .dev_attr = &omap2430_mailbox_attrs, | ||
189 | }; | 176 | }; |
190 | 177 | ||
191 | /* mcspi3 */ | 178 | /* mcspi3 */ |
diff --git a/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_interconnect_data.c b/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_interconnect_data.c index 0413daba2dba..c1e98d589100 100644 --- a/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_interconnect_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_interconnect_data.c | |||
@@ -152,15 +152,6 @@ struct omap_hwmod_addr_space omap2_dma_system_addrs[] = { | |||
152 | { } | 152 | { } |
153 | }; | 153 | }; |
154 | 154 | ||
155 | struct omap_hwmod_addr_space omap2_mailbox_addrs[] = { | ||
156 | { | ||
157 | .pa_start = 0x48094000, | ||
158 | .pa_end = 0x48094000 + SZ_512 - 1, | ||
159 | .flags = ADDR_TYPE_RT, | ||
160 | }, | ||
161 | { } | ||
162 | }; | ||
163 | |||
164 | struct omap_hwmod_addr_space omap2_mcbsp1_addrs[] = { | 155 | struct omap_hwmod_addr_space omap2_mcbsp1_addrs[] = { |
165 | { | 156 | { |
166 | .name = "mpu", | 157 | .name = "mpu", |
diff --git a/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c b/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c index 5da7a42a6d90..c6c6384de867 100644 --- a/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c | |||
@@ -37,46 +37,6 @@ struct omap_hwmod_class omap2_uart_class = { | |||
37 | }; | 37 | }; |
38 | 38 | ||
39 | /* | 39 | /* |
40 | * 'dss' class | ||
41 | * display sub-system | ||
42 | */ | ||
43 | |||
44 | static struct omap_hwmod_class_sysconfig omap2_dss_sysc = { | ||
45 | .rev_offs = 0x0000, | ||
46 | .sysc_offs = 0x0010, | ||
47 | .syss_offs = 0x0014, | ||
48 | .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE | | ||
49 | SYSS_HAS_RESET_STATUS), | ||
50 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
51 | }; | ||
52 | |||
53 | struct omap_hwmod_class omap2_dss_hwmod_class = { | ||
54 | .name = "dss", | ||
55 | .sysc = &omap2_dss_sysc, | ||
56 | .reset = omap_dss_reset, | ||
57 | }; | ||
58 | |||
59 | /* | ||
60 | * 'rfbi' class | ||
61 | * remote frame buffer interface | ||
62 | */ | ||
63 | |||
64 | static struct omap_hwmod_class_sysconfig omap2_rfbi_sysc = { | ||
65 | .rev_offs = 0x0000, | ||
66 | .sysc_offs = 0x0010, | ||
67 | .syss_offs = 0x0014, | ||
68 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET | | ||
69 | SYSC_HAS_AUTOIDLE), | ||
70 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
71 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
72 | }; | ||
73 | |||
74 | struct omap_hwmod_class omap2_rfbi_hwmod_class = { | ||
75 | .name = "rfbi", | ||
76 | .sysc = &omap2_rfbi_sysc, | ||
77 | }; | ||
78 | |||
79 | /* | ||
80 | * 'venc' class | 40 | * 'venc' class |
81 | * video encoder | 41 | * video encoder |
82 | */ | 42 | */ |
diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_interconnect_data.c b/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_interconnect_data.c index e2db378b849e..8f5989d48a80 100644 --- a/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_interconnect_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_interconnect_data.c | |||
@@ -317,21 +317,11 @@ struct omap_hwmod_ocp_if am33xx_l4_per__i2c3 = { | |||
317 | .user = OCP_USER_MPU, | 317 | .user = OCP_USER_MPU, |
318 | }; | 318 | }; |
319 | 319 | ||
320 | static struct omap_hwmod_addr_space am33xx_mailbox_addrs[] = { | ||
321 | { | ||
322 | .pa_start = 0x480C8000, | ||
323 | .pa_end = 0x480C8000 + (SZ_4K - 1), | ||
324 | .flags = ADDR_TYPE_RT | ||
325 | }, | ||
326 | { } | ||
327 | }; | ||
328 | |||
329 | /* l4 ls -> mailbox */ | 320 | /* l4 ls -> mailbox */ |
330 | struct omap_hwmod_ocp_if am33xx_l4_per__mailbox = { | 321 | struct omap_hwmod_ocp_if am33xx_l4_per__mailbox = { |
331 | .master = &am33xx_l4_ls_hwmod, | 322 | .master = &am33xx_l4_ls_hwmod, |
332 | .slave = &am33xx_mailbox_hwmod, | 323 | .slave = &am33xx_mailbox_hwmod, |
333 | .clk = "l4ls_gclk", | 324 | .clk = "l4ls_gclk", |
334 | .addr = am33xx_mailbox_addrs, | ||
335 | .user = OCP_USER_MPU, | 325 | .user = OCP_USER_MPU, |
336 | }; | 326 | }; |
337 | 327 | ||
diff --git a/arch/arm/mach-omap2/omap_hwmod_43xx_data.c b/arch/arm/mach-omap2/omap_hwmod_43xx_data.c index 5c2cc8083fdd..fea01aa3ef42 100644 --- a/arch/arm/mach-omap2/omap_hwmod_43xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_43xx_data.c | |||
@@ -19,6 +19,8 @@ | |||
19 | #include "omap_hwmod.h" | 19 | #include "omap_hwmod.h" |
20 | #include "omap_hwmod_33xx_43xx_common_data.h" | 20 | #include "omap_hwmod_33xx_43xx_common_data.h" |
21 | #include "prcm43xx.h" | 21 | #include "prcm43xx.h" |
22 | #include "omap_hwmod_common_data.h" | ||
23 | |||
22 | 24 | ||
23 | /* IP blocks */ | 25 | /* IP blocks */ |
24 | static struct omap_hwmod am43xx_l4_hs_hwmod = { | 26 | static struct omap_hwmod am43xx_l4_hs_hwmod = { |
@@ -415,6 +417,72 @@ static struct omap_hwmod am43xx_qspi_hwmod = { | |||
415 | }, | 417 | }, |
416 | }; | 418 | }; |
417 | 419 | ||
420 | /* dss */ | ||
421 | |||
422 | static struct omap_hwmod am43xx_dss_core_hwmod = { | ||
423 | .name = "dss_core", | ||
424 | .class = &omap2_dss_hwmod_class, | ||
425 | .clkdm_name = "dss_clkdm", | ||
426 | .main_clk = "disp_clk", | ||
427 | .prcm = { | ||
428 | .omap4 = { | ||
429 | .clkctrl_offs = AM43XX_CM_PER_DSS_CLKCTRL_OFFSET, | ||
430 | .modulemode = MODULEMODE_SWCTRL, | ||
431 | }, | ||
432 | }, | ||
433 | }; | ||
434 | |||
435 | /* dispc */ | ||
436 | |||
437 | struct omap_dss_dispc_dev_attr am43xx_dss_dispc_dev_attr = { | ||
438 | .manager_count = 1, | ||
439 | .has_framedonetv_irq = 0 | ||
440 | }; | ||
441 | |||
442 | static struct omap_hwmod_class_sysconfig am43xx_dispc_sysc = { | ||
443 | .rev_offs = 0x0000, | ||
444 | .sysc_offs = 0x0010, | ||
445 | .syss_offs = 0x0014, | ||
446 | .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SOFTRESET | | ||
447 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE | | ||
448 | SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_MIDLEMODE), | ||
449 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | | ||
450 | MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART), | ||
451 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
452 | }; | ||
453 | |||
454 | static struct omap_hwmod_class am43xx_dispc_hwmod_class = { | ||
455 | .name = "dispc", | ||
456 | .sysc = &am43xx_dispc_sysc, | ||
457 | }; | ||
458 | |||
459 | static struct omap_hwmod am43xx_dss_dispc_hwmod = { | ||
460 | .name = "dss_dispc", | ||
461 | .class = &am43xx_dispc_hwmod_class, | ||
462 | .clkdm_name = "dss_clkdm", | ||
463 | .main_clk = "disp_clk", | ||
464 | .prcm = { | ||
465 | .omap4 = { | ||
466 | .clkctrl_offs = AM43XX_CM_PER_DSS_CLKCTRL_OFFSET, | ||
467 | }, | ||
468 | }, | ||
469 | .dev_attr = &am43xx_dss_dispc_dev_attr, | ||
470 | }; | ||
471 | |||
472 | /* rfbi */ | ||
473 | |||
474 | static struct omap_hwmod am43xx_dss_rfbi_hwmod = { | ||
475 | .name = "dss_rfbi", | ||
476 | .class = &omap2_rfbi_hwmod_class, | ||
477 | .clkdm_name = "dss_clkdm", | ||
478 | .main_clk = "disp_clk", | ||
479 | .prcm = { | ||
480 | .omap4 = { | ||
481 | .clkctrl_offs = AM43XX_CM_PER_DSS_CLKCTRL_OFFSET, | ||
482 | }, | ||
483 | }, | ||
484 | }; | ||
485 | |||
418 | /* Interfaces */ | 486 | /* Interfaces */ |
419 | static struct omap_hwmod_ocp_if am43xx_l3_main__l4_hs = { | 487 | static struct omap_hwmod_ocp_if am43xx_l3_main__l4_hs = { |
420 | .master = &am33xx_l3_main_hwmod, | 488 | .master = &am33xx_l3_main_hwmod, |
@@ -654,6 +722,34 @@ static struct omap_hwmod_ocp_if am43xx_l3_s__qspi = { | |||
654 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 722 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
655 | }; | 723 | }; |
656 | 724 | ||
725 | static struct omap_hwmod_ocp_if am43xx_dss__l3_main = { | ||
726 | .master = &am43xx_dss_core_hwmod, | ||
727 | .slave = &am33xx_l3_main_hwmod, | ||
728 | .clk = "l3_gclk", | ||
729 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
730 | }; | ||
731 | |||
732 | static struct omap_hwmod_ocp_if am43xx_l4_ls__dss = { | ||
733 | .master = &am33xx_l4_ls_hwmod, | ||
734 | .slave = &am43xx_dss_core_hwmod, | ||
735 | .clk = "l4ls_gclk", | ||
736 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
737 | }; | ||
738 | |||
739 | static struct omap_hwmod_ocp_if am43xx_l4_ls__dss_dispc = { | ||
740 | .master = &am33xx_l4_ls_hwmod, | ||
741 | .slave = &am43xx_dss_dispc_hwmod, | ||
742 | .clk = "l4ls_gclk", | ||
743 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
744 | }; | ||
745 | |||
746 | static struct omap_hwmod_ocp_if am43xx_l4_ls__dss_rfbi = { | ||
747 | .master = &am33xx_l4_ls_hwmod, | ||
748 | .slave = &am43xx_dss_rfbi_hwmod, | ||
749 | .clk = "l4ls_gclk", | ||
750 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
751 | }; | ||
752 | |||
657 | static struct omap_hwmod_ocp_if *am43xx_hwmod_ocp_ifs[] __initdata = { | 753 | static struct omap_hwmod_ocp_if *am43xx_hwmod_ocp_ifs[] __initdata = { |
658 | &am33xx_l4_wkup__synctimer, | 754 | &am33xx_l4_wkup__synctimer, |
659 | &am43xx_l4_ls__timer8, | 755 | &am43xx_l4_ls__timer8, |
@@ -748,6 +844,10 @@ static struct omap_hwmod_ocp_if *am43xx_hwmod_ocp_ifs[] __initdata = { | |||
748 | &am43xx_l4_ls__ocp2scp1, | 844 | &am43xx_l4_ls__ocp2scp1, |
749 | &am43xx_l3_s__usbotgss0, | 845 | &am43xx_l3_s__usbotgss0, |
750 | &am43xx_l3_s__usbotgss1, | 846 | &am43xx_l3_s__usbotgss1, |
847 | &am43xx_dss__l3_main, | ||
848 | &am43xx_l4_ls__dss, | ||
849 | &am43xx_l4_ls__dss_dispc, | ||
850 | &am43xx_l4_ls__dss_rfbi, | ||
751 | NULL, | 851 | NULL, |
752 | }; | 852 | }; |
753 | 853 | ||
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c index b4acc0a7576f..44e5634bba34 100644 --- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c | |||
@@ -4138,21 +4138,11 @@ static struct omap_hwmod_ocp_if omap44xx_l4_wkup__kbd = { | |||
4138 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 4138 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
4139 | }; | 4139 | }; |
4140 | 4140 | ||
4141 | static struct omap_hwmod_addr_space omap44xx_mailbox_addrs[] = { | ||
4142 | { | ||
4143 | .pa_start = 0x4a0f4000, | ||
4144 | .pa_end = 0x4a0f41ff, | ||
4145 | .flags = ADDR_TYPE_RT | ||
4146 | }, | ||
4147 | { } | ||
4148 | }; | ||
4149 | |||
4150 | /* l4_cfg -> mailbox */ | 4141 | /* l4_cfg -> mailbox */ |
4151 | static struct omap_hwmod_ocp_if omap44xx_l4_cfg__mailbox = { | 4142 | static struct omap_hwmod_ocp_if omap44xx_l4_cfg__mailbox = { |
4152 | .master = &omap44xx_l4_cfg_hwmod, | 4143 | .master = &omap44xx_l4_cfg_hwmod, |
4153 | .slave = &omap44xx_mailbox_hwmod, | 4144 | .slave = &omap44xx_mailbox_hwmod, |
4154 | .clk = "l4_div_ck", | 4145 | .clk = "l4_div_ck", |
4155 | .addr = omap44xx_mailbox_addrs, | ||
4156 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 4146 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
4157 | }; | 4147 | }; |
4158 | 4148 | ||
diff --git a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c index 284324f2b98a..2757abf87fbc 100644 --- a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c | |||
@@ -273,6 +273,56 @@ static struct omap_hwmod dra7xx_ctrl_module_wkup_hwmod = { | |||
273 | }; | 273 | }; |
274 | 274 | ||
275 | /* | 275 | /* |
276 | * 'gmac' class | ||
277 | * cpsw/gmac sub system | ||
278 | */ | ||
279 | static struct omap_hwmod_class_sysconfig dra7xx_gmac_sysc = { | ||
280 | .rev_offs = 0x0, | ||
281 | .sysc_offs = 0x8, | ||
282 | .syss_offs = 0x4, | ||
283 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE | | ||
284 | SYSS_HAS_RESET_STATUS), | ||
285 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | MSTANDBY_FORCE | | ||
286 | MSTANDBY_NO), | ||
287 | .sysc_fields = &omap_hwmod_sysc_type3, | ||
288 | }; | ||
289 | |||
290 | static struct omap_hwmod_class dra7xx_gmac_hwmod_class = { | ||
291 | .name = "gmac", | ||
292 | .sysc = &dra7xx_gmac_sysc, | ||
293 | }; | ||
294 | |||
295 | static struct omap_hwmod dra7xx_gmac_hwmod = { | ||
296 | .name = "gmac", | ||
297 | .class = &dra7xx_gmac_hwmod_class, | ||
298 | .clkdm_name = "gmac_clkdm", | ||
299 | .flags = (HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY), | ||
300 | .main_clk = "dpll_gmac_ck", | ||
301 | .mpu_rt_idx = 1, | ||
302 | .prcm = { | ||
303 | .omap4 = { | ||
304 | .clkctrl_offs = DRA7XX_CM_GMAC_GMAC_CLKCTRL_OFFSET, | ||
305 | .context_offs = DRA7XX_RM_GMAC_GMAC_CONTEXT_OFFSET, | ||
306 | .modulemode = MODULEMODE_SWCTRL, | ||
307 | }, | ||
308 | }, | ||
309 | }; | ||
310 | |||
311 | /* | ||
312 | * 'mdio' class | ||
313 | */ | ||
314 | static struct omap_hwmod_class dra7xx_mdio_hwmod_class = { | ||
315 | .name = "davinci_mdio", | ||
316 | }; | ||
317 | |||
318 | static struct omap_hwmod dra7xx_mdio_hwmod = { | ||
319 | .name = "davinci_mdio", | ||
320 | .class = &dra7xx_mdio_hwmod_class, | ||
321 | .clkdm_name = "gmac_clkdm", | ||
322 | .main_clk = "dpll_gmac_ck", | ||
323 | }; | ||
324 | |||
325 | /* | ||
276 | * 'dcan' class | 326 | * 'dcan' class |
277 | * | 327 | * |
278 | */ | 328 | */ |
@@ -343,19 +393,10 @@ static struct omap_dma_dev_attr dma_dev_attr = { | |||
343 | }; | 393 | }; |
344 | 394 | ||
345 | /* dma_system */ | 395 | /* dma_system */ |
346 | static struct omap_hwmod_irq_info dra7xx_dma_system_irqs[] = { | ||
347 | { .name = "0", .irq = 12 + DRA7XX_IRQ_GIC_START }, | ||
348 | { .name = "1", .irq = 13 + DRA7XX_IRQ_GIC_START }, | ||
349 | { .name = "2", .irq = 14 + DRA7XX_IRQ_GIC_START }, | ||
350 | { .name = "3", .irq = 15 + DRA7XX_IRQ_GIC_START }, | ||
351 | { .irq = -1 } | ||
352 | }; | ||
353 | |||
354 | static struct omap_hwmod dra7xx_dma_system_hwmod = { | 396 | static struct omap_hwmod dra7xx_dma_system_hwmod = { |
355 | .name = "dma_system", | 397 | .name = "dma_system", |
356 | .class = &dra7xx_dma_hwmod_class, | 398 | .class = &dra7xx_dma_hwmod_class, |
357 | .clkdm_name = "dma_clkdm", | 399 | .clkdm_name = "dma_clkdm", |
358 | .mpu_irqs = dra7xx_dma_system_irqs, | ||
359 | .main_clk = "l3_iclk_div", | 400 | .main_clk = "l3_iclk_div", |
360 | .prcm = { | 401 | .prcm = { |
361 | .omap4 = { | 402 | .omap4 = { |
@@ -939,6 +980,194 @@ static struct omap_hwmod dra7xx_i2c5_hwmod = { | |||
939 | }; | 980 | }; |
940 | 981 | ||
941 | /* | 982 | /* |
983 | * 'mailbox' class | ||
984 | * | ||
985 | */ | ||
986 | |||
987 | static struct omap_hwmod_class_sysconfig dra7xx_mailbox_sysc = { | ||
988 | .rev_offs = 0x0000, | ||
989 | .sysc_offs = 0x0010, | ||
990 | .sysc_flags = (SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE | | ||
991 | SYSC_HAS_SOFTRESET), | ||
992 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
993 | .sysc_fields = &omap_hwmod_sysc_type2, | ||
994 | }; | ||
995 | |||
996 | static struct omap_hwmod_class dra7xx_mailbox_hwmod_class = { | ||
997 | .name = "mailbox", | ||
998 | .sysc = &dra7xx_mailbox_sysc, | ||
999 | }; | ||
1000 | |||
1001 | /* mailbox1 */ | ||
1002 | static struct omap_hwmod dra7xx_mailbox1_hwmod = { | ||
1003 | .name = "mailbox1", | ||
1004 | .class = &dra7xx_mailbox_hwmod_class, | ||
1005 | .clkdm_name = "l4cfg_clkdm", | ||
1006 | .prcm = { | ||
1007 | .omap4 = { | ||
1008 | .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX1_CLKCTRL_OFFSET, | ||
1009 | .context_offs = DRA7XX_RM_L4CFG_MAILBOX1_CONTEXT_OFFSET, | ||
1010 | }, | ||
1011 | }, | ||
1012 | }; | ||
1013 | |||
1014 | /* mailbox2 */ | ||
1015 | static struct omap_hwmod dra7xx_mailbox2_hwmod = { | ||
1016 | .name = "mailbox2", | ||
1017 | .class = &dra7xx_mailbox_hwmod_class, | ||
1018 | .clkdm_name = "l4cfg_clkdm", | ||
1019 | .prcm = { | ||
1020 | .omap4 = { | ||
1021 | .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX2_CLKCTRL_OFFSET, | ||
1022 | .context_offs = DRA7XX_RM_L4CFG_MAILBOX2_CONTEXT_OFFSET, | ||
1023 | }, | ||
1024 | }, | ||
1025 | }; | ||
1026 | |||
1027 | /* mailbox3 */ | ||
1028 | static struct omap_hwmod dra7xx_mailbox3_hwmod = { | ||
1029 | .name = "mailbox3", | ||
1030 | .class = &dra7xx_mailbox_hwmod_class, | ||
1031 | .clkdm_name = "l4cfg_clkdm", | ||
1032 | .prcm = { | ||
1033 | .omap4 = { | ||
1034 | .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX3_CLKCTRL_OFFSET, | ||
1035 | .context_offs = DRA7XX_RM_L4CFG_MAILBOX3_CONTEXT_OFFSET, | ||
1036 | }, | ||
1037 | }, | ||
1038 | }; | ||
1039 | |||
1040 | /* mailbox4 */ | ||
1041 | static struct omap_hwmod dra7xx_mailbox4_hwmod = { | ||
1042 | .name = "mailbox4", | ||
1043 | .class = &dra7xx_mailbox_hwmod_class, | ||
1044 | .clkdm_name = "l4cfg_clkdm", | ||
1045 | .prcm = { | ||
1046 | .omap4 = { | ||
1047 | .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX4_CLKCTRL_OFFSET, | ||
1048 | .context_offs = DRA7XX_RM_L4CFG_MAILBOX4_CONTEXT_OFFSET, | ||
1049 | }, | ||
1050 | }, | ||
1051 | }; | ||
1052 | |||
1053 | /* mailbox5 */ | ||
1054 | static struct omap_hwmod dra7xx_mailbox5_hwmod = { | ||
1055 | .name = "mailbox5", | ||
1056 | .class = &dra7xx_mailbox_hwmod_class, | ||
1057 | .clkdm_name = "l4cfg_clkdm", | ||
1058 | .prcm = { | ||
1059 | .omap4 = { | ||
1060 | .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX5_CLKCTRL_OFFSET, | ||
1061 | .context_offs = DRA7XX_RM_L4CFG_MAILBOX5_CONTEXT_OFFSET, | ||
1062 | }, | ||
1063 | }, | ||
1064 | }; | ||
1065 | |||
1066 | /* mailbox6 */ | ||
1067 | static struct omap_hwmod dra7xx_mailbox6_hwmod = { | ||
1068 | .name = "mailbox6", | ||
1069 | .class = &dra7xx_mailbox_hwmod_class, | ||
1070 | .clkdm_name = "l4cfg_clkdm", | ||
1071 | .prcm = { | ||
1072 | .omap4 = { | ||
1073 | .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX6_CLKCTRL_OFFSET, | ||
1074 | .context_offs = DRA7XX_RM_L4CFG_MAILBOX6_CONTEXT_OFFSET, | ||
1075 | }, | ||
1076 | }, | ||
1077 | }; | ||
1078 | |||
1079 | /* mailbox7 */ | ||
1080 | static struct omap_hwmod dra7xx_mailbox7_hwmod = { | ||
1081 | .name = "mailbox7", | ||
1082 | .class = &dra7xx_mailbox_hwmod_class, | ||
1083 | .clkdm_name = "l4cfg_clkdm", | ||
1084 | .prcm = { | ||
1085 | .omap4 = { | ||
1086 | .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX7_CLKCTRL_OFFSET, | ||
1087 | .context_offs = DRA7XX_RM_L4CFG_MAILBOX7_CONTEXT_OFFSET, | ||
1088 | }, | ||
1089 | }, | ||
1090 | }; | ||
1091 | |||
1092 | /* mailbox8 */ | ||
1093 | static struct omap_hwmod dra7xx_mailbox8_hwmod = { | ||
1094 | .name = "mailbox8", | ||
1095 | .class = &dra7xx_mailbox_hwmod_class, | ||
1096 | .clkdm_name = "l4cfg_clkdm", | ||
1097 | .prcm = { | ||
1098 | .omap4 = { | ||
1099 | .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX8_CLKCTRL_OFFSET, | ||
1100 | .context_offs = DRA7XX_RM_L4CFG_MAILBOX8_CONTEXT_OFFSET, | ||
1101 | }, | ||
1102 | }, | ||
1103 | }; | ||
1104 | |||
1105 | /* mailbox9 */ | ||
1106 | static struct omap_hwmod dra7xx_mailbox9_hwmod = { | ||
1107 | .name = "mailbox9", | ||
1108 | .class = &dra7xx_mailbox_hwmod_class, | ||
1109 | .clkdm_name = "l4cfg_clkdm", | ||
1110 | .prcm = { | ||
1111 | .omap4 = { | ||
1112 | .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX9_CLKCTRL_OFFSET, | ||
1113 | .context_offs = DRA7XX_RM_L4CFG_MAILBOX9_CONTEXT_OFFSET, | ||
1114 | }, | ||
1115 | }, | ||
1116 | }; | ||
1117 | |||
1118 | /* mailbox10 */ | ||
1119 | static struct omap_hwmod dra7xx_mailbox10_hwmod = { | ||
1120 | .name = "mailbox10", | ||
1121 | .class = &dra7xx_mailbox_hwmod_class, | ||
1122 | .clkdm_name = "l4cfg_clkdm", | ||
1123 | .prcm = { | ||
1124 | .omap4 = { | ||
1125 | .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX10_CLKCTRL_OFFSET, | ||
1126 | .context_offs = DRA7XX_RM_L4CFG_MAILBOX10_CONTEXT_OFFSET, | ||
1127 | }, | ||
1128 | }, | ||
1129 | }; | ||
1130 | |||
1131 | /* mailbox11 */ | ||
1132 | static struct omap_hwmod dra7xx_mailbox11_hwmod = { | ||
1133 | .name = "mailbox11", | ||
1134 | .class = &dra7xx_mailbox_hwmod_class, | ||
1135 | .clkdm_name = "l4cfg_clkdm", | ||
1136 | .prcm = { | ||
1137 | .omap4 = { | ||
1138 | .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX11_CLKCTRL_OFFSET, | ||
1139 | .context_offs = DRA7XX_RM_L4CFG_MAILBOX11_CONTEXT_OFFSET, | ||
1140 | }, | ||
1141 | }, | ||
1142 | }; | ||
1143 | |||
1144 | /* mailbox12 */ | ||
1145 | static struct omap_hwmod dra7xx_mailbox12_hwmod = { | ||
1146 | .name = "mailbox12", | ||
1147 | .class = &dra7xx_mailbox_hwmod_class, | ||
1148 | .clkdm_name = "l4cfg_clkdm", | ||
1149 | .prcm = { | ||
1150 | .omap4 = { | ||
1151 | .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX12_CLKCTRL_OFFSET, | ||
1152 | .context_offs = DRA7XX_RM_L4CFG_MAILBOX12_CONTEXT_OFFSET, | ||
1153 | }, | ||
1154 | }, | ||
1155 | }; | ||
1156 | |||
1157 | /* mailbox13 */ | ||
1158 | static struct omap_hwmod dra7xx_mailbox13_hwmod = { | ||
1159 | .name = "mailbox13", | ||
1160 | .class = &dra7xx_mailbox_hwmod_class, | ||
1161 | .clkdm_name = "l4cfg_clkdm", | ||
1162 | .prcm = { | ||
1163 | .omap4 = { | ||
1164 | .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX13_CLKCTRL_OFFSET, | ||
1165 | .context_offs = DRA7XX_RM_L4CFG_MAILBOX13_CONTEXT_OFFSET, | ||
1166 | }, | ||
1167 | }, | ||
1168 | }; | ||
1169 | |||
1170 | /* | ||
942 | * 'mcspi' class | 1171 | * 'mcspi' class |
943 | * | 1172 | * |
944 | */ | 1173 | */ |
@@ -1215,6 +1444,97 @@ static struct omap_hwmod dra7xx_ocp2scp1_hwmod = { | |||
1215 | }, | 1444 | }, |
1216 | }; | 1445 | }; |
1217 | 1446 | ||
1447 | /* ocp2scp3 */ | ||
1448 | static struct omap_hwmod dra7xx_ocp2scp3_hwmod = { | ||
1449 | .name = "ocp2scp3", | ||
1450 | .class = &dra7xx_ocp2scp_hwmod_class, | ||
1451 | .clkdm_name = "l3init_clkdm", | ||
1452 | .main_clk = "l4_root_clk_div", | ||
1453 | .prcm = { | ||
1454 | .omap4 = { | ||
1455 | .clkctrl_offs = DRA7XX_CM_L3INIT_OCP2SCP3_CLKCTRL_OFFSET, | ||
1456 | .context_offs = DRA7XX_RM_L3INIT_OCP2SCP3_CONTEXT_OFFSET, | ||
1457 | .modulemode = MODULEMODE_HWCTRL, | ||
1458 | }, | ||
1459 | }, | ||
1460 | }; | ||
1461 | |||
1462 | /* | ||
1463 | * 'PCIE' class | ||
1464 | * | ||
1465 | */ | ||
1466 | |||
1467 | static struct omap_hwmod_class dra7xx_pcie_hwmod_class = { | ||
1468 | .name = "pcie", | ||
1469 | }; | ||
1470 | |||
1471 | /* pcie1 */ | ||
1472 | static struct omap_hwmod dra7xx_pcie1_hwmod = { | ||
1473 | .name = "pcie1", | ||
1474 | .class = &dra7xx_pcie_hwmod_class, | ||
1475 | .clkdm_name = "pcie_clkdm", | ||
1476 | .main_clk = "l4_root_clk_div", | ||
1477 | .prcm = { | ||
1478 | .omap4 = { | ||
1479 | .clkctrl_offs = DRA7XX_CM_PCIE_CLKSTCTRL_OFFSET, | ||
1480 | .modulemode = MODULEMODE_SWCTRL, | ||
1481 | }, | ||
1482 | }, | ||
1483 | }; | ||
1484 | |||
1485 | /* pcie2 */ | ||
1486 | static struct omap_hwmod dra7xx_pcie2_hwmod = { | ||
1487 | .name = "pcie2", | ||
1488 | .class = &dra7xx_pcie_hwmod_class, | ||
1489 | .clkdm_name = "pcie_clkdm", | ||
1490 | .main_clk = "l4_root_clk_div", | ||
1491 | .prcm = { | ||
1492 | .omap4 = { | ||
1493 | .clkctrl_offs = DRA7XX_CM_PCIE_CLKSTCTRL_OFFSET, | ||
1494 | .modulemode = MODULEMODE_SWCTRL, | ||
1495 | }, | ||
1496 | }, | ||
1497 | }; | ||
1498 | |||
1499 | /* | ||
1500 | * 'PCIE PHY' class | ||
1501 | * | ||
1502 | */ | ||
1503 | |||
1504 | static struct omap_hwmod_class dra7xx_pcie_phy_hwmod_class = { | ||
1505 | .name = "pcie-phy", | ||
1506 | }; | ||
1507 | |||
1508 | /* pcie1 phy */ | ||
1509 | static struct omap_hwmod dra7xx_pcie1_phy_hwmod = { | ||
1510 | .name = "pcie1-phy", | ||
1511 | .class = &dra7xx_pcie_phy_hwmod_class, | ||
1512 | .clkdm_name = "l3init_clkdm", | ||
1513 | .main_clk = "l4_root_clk_div", | ||
1514 | .prcm = { | ||
1515 | .omap4 = { | ||
1516 | .clkctrl_offs = DRA7XX_CM_L3INIT_PCIESS1_CLKCTRL_OFFSET, | ||
1517 | .context_offs = DRA7XX_RM_L3INIT_PCIESS1_CONTEXT_OFFSET, | ||
1518 | .modulemode = MODULEMODE_SWCTRL, | ||
1519 | }, | ||
1520 | }, | ||
1521 | }; | ||
1522 | |||
1523 | /* pcie2 phy */ | ||
1524 | static struct omap_hwmod dra7xx_pcie2_phy_hwmod = { | ||
1525 | .name = "pcie2-phy", | ||
1526 | .class = &dra7xx_pcie_phy_hwmod_class, | ||
1527 | .clkdm_name = "l3init_clkdm", | ||
1528 | .main_clk = "l4_root_clk_div", | ||
1529 | .prcm = { | ||
1530 | .omap4 = { | ||
1531 | .clkctrl_offs = DRA7XX_CM_L3INIT_PCIESS2_CLKCTRL_OFFSET, | ||
1532 | .context_offs = DRA7XX_RM_L3INIT_PCIESS2_CONTEXT_OFFSET, | ||
1533 | .modulemode = MODULEMODE_SWCTRL, | ||
1534 | }, | ||
1535 | }, | ||
1536 | }; | ||
1537 | |||
1218 | /* | 1538 | /* |
1219 | * 'qspi' class | 1539 | * 'qspi' class |
1220 | * | 1540 | * |
@@ -1249,6 +1569,38 @@ static struct omap_hwmod dra7xx_qspi_hwmod = { | |||
1249 | }; | 1569 | }; |
1250 | 1570 | ||
1251 | /* | 1571 | /* |
1572 | * 'rtcss' class | ||
1573 | * | ||
1574 | */ | ||
1575 | static struct omap_hwmod_class_sysconfig dra7xx_rtcss_sysc = { | ||
1576 | .sysc_offs = 0x0078, | ||
1577 | .sysc_flags = SYSC_HAS_SIDLEMODE, | ||
1578 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | | ||
1579 | SIDLE_SMART_WKUP), | ||
1580 | .sysc_fields = &omap_hwmod_sysc_type3, | ||
1581 | }; | ||
1582 | |||
1583 | static struct omap_hwmod_class dra7xx_rtcss_hwmod_class = { | ||
1584 | .name = "rtcss", | ||
1585 | .sysc = &dra7xx_rtcss_sysc, | ||
1586 | }; | ||
1587 | |||
1588 | /* rtcss */ | ||
1589 | static struct omap_hwmod dra7xx_rtcss_hwmod = { | ||
1590 | .name = "rtcss", | ||
1591 | .class = &dra7xx_rtcss_hwmod_class, | ||
1592 | .clkdm_name = "rtc_clkdm", | ||
1593 | .main_clk = "sys_32k_ck", | ||
1594 | .prcm = { | ||
1595 | .omap4 = { | ||
1596 | .clkctrl_offs = DRA7XX_CM_RTC_RTCSS_CLKCTRL_OFFSET, | ||
1597 | .context_offs = DRA7XX_RM_RTC_RTCSS_CONTEXT_OFFSET, | ||
1598 | .modulemode = MODULEMODE_SWCTRL, | ||
1599 | }, | ||
1600 | }, | ||
1601 | }; | ||
1602 | |||
1603 | /* | ||
1252 | * 'sata' class | 1604 | * 'sata' class |
1253 | * | 1605 | * |
1254 | */ | 1606 | */ |
@@ -2007,6 +2359,19 @@ static struct omap_hwmod_ocp_if dra7xx_l4_wkup__ctrl_module_wkup = { | |||
2007 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 2359 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
2008 | }; | 2360 | }; |
2009 | 2361 | ||
2362 | static struct omap_hwmod_ocp_if dra7xx_l4_per2__cpgmac0 = { | ||
2363 | .master = &dra7xx_l4_per2_hwmod, | ||
2364 | .slave = &dra7xx_gmac_hwmod, | ||
2365 | .clk = "dpll_gmac_ck", | ||
2366 | .user = OCP_USER_MPU, | ||
2367 | }; | ||
2368 | |||
2369 | static struct omap_hwmod_ocp_if dra7xx_gmac__mdio = { | ||
2370 | .master = &dra7xx_gmac_hwmod, | ||
2371 | .slave = &dra7xx_mdio_hwmod, | ||
2372 | .user = OCP_USER_MPU, | ||
2373 | }; | ||
2374 | |||
2010 | /* l4_wkup -> dcan1 */ | 2375 | /* l4_wkup -> dcan1 */ |
2011 | static struct omap_hwmod_ocp_if dra7xx_l4_wkup__dcan1 = { | 2376 | static struct omap_hwmod_ocp_if dra7xx_l4_wkup__dcan1 = { |
2012 | .master = &dra7xx_l4_wkup_hwmod, | 2377 | .master = &dra7xx_l4_wkup_hwmod, |
@@ -2254,6 +2619,110 @@ static struct omap_hwmod_ocp_if dra7xx_l4_per1__i2c5 = { | |||
2254 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 2619 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
2255 | }; | 2620 | }; |
2256 | 2621 | ||
2622 | /* l4_cfg -> mailbox1 */ | ||
2623 | static struct omap_hwmod_ocp_if dra7xx_l4_cfg__mailbox1 = { | ||
2624 | .master = &dra7xx_l4_cfg_hwmod, | ||
2625 | .slave = &dra7xx_mailbox1_hwmod, | ||
2626 | .clk = "l3_iclk_div", | ||
2627 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2628 | }; | ||
2629 | |||
2630 | /* l4_per3 -> mailbox2 */ | ||
2631 | static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox2 = { | ||
2632 | .master = &dra7xx_l4_per3_hwmod, | ||
2633 | .slave = &dra7xx_mailbox2_hwmod, | ||
2634 | .clk = "l3_iclk_div", | ||
2635 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2636 | }; | ||
2637 | |||
2638 | /* l4_per3 -> mailbox3 */ | ||
2639 | static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox3 = { | ||
2640 | .master = &dra7xx_l4_per3_hwmod, | ||
2641 | .slave = &dra7xx_mailbox3_hwmod, | ||
2642 | .clk = "l3_iclk_div", | ||
2643 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2644 | }; | ||
2645 | |||
2646 | /* l4_per3 -> mailbox4 */ | ||
2647 | static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox4 = { | ||
2648 | .master = &dra7xx_l4_per3_hwmod, | ||
2649 | .slave = &dra7xx_mailbox4_hwmod, | ||
2650 | .clk = "l3_iclk_div", | ||
2651 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2652 | }; | ||
2653 | |||
2654 | /* l4_per3 -> mailbox5 */ | ||
2655 | static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox5 = { | ||
2656 | .master = &dra7xx_l4_per3_hwmod, | ||
2657 | .slave = &dra7xx_mailbox5_hwmod, | ||
2658 | .clk = "l3_iclk_div", | ||
2659 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2660 | }; | ||
2661 | |||
2662 | /* l4_per3 -> mailbox6 */ | ||
2663 | static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox6 = { | ||
2664 | .master = &dra7xx_l4_per3_hwmod, | ||
2665 | .slave = &dra7xx_mailbox6_hwmod, | ||
2666 | .clk = "l3_iclk_div", | ||
2667 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2668 | }; | ||
2669 | |||
2670 | /* l4_per3 -> mailbox7 */ | ||
2671 | static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox7 = { | ||
2672 | .master = &dra7xx_l4_per3_hwmod, | ||
2673 | .slave = &dra7xx_mailbox7_hwmod, | ||
2674 | .clk = "l3_iclk_div", | ||
2675 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2676 | }; | ||
2677 | |||
2678 | /* l4_per3 -> mailbox8 */ | ||
2679 | static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox8 = { | ||
2680 | .master = &dra7xx_l4_per3_hwmod, | ||
2681 | .slave = &dra7xx_mailbox8_hwmod, | ||
2682 | .clk = "l3_iclk_div", | ||
2683 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2684 | }; | ||
2685 | |||
2686 | /* l4_per3 -> mailbox9 */ | ||
2687 | static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox9 = { | ||
2688 | .master = &dra7xx_l4_per3_hwmod, | ||
2689 | .slave = &dra7xx_mailbox9_hwmod, | ||
2690 | .clk = "l3_iclk_div", | ||
2691 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2692 | }; | ||
2693 | |||
2694 | /* l4_per3 -> mailbox10 */ | ||
2695 | static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox10 = { | ||
2696 | .master = &dra7xx_l4_per3_hwmod, | ||
2697 | .slave = &dra7xx_mailbox10_hwmod, | ||
2698 | .clk = "l3_iclk_div", | ||
2699 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2700 | }; | ||
2701 | |||
2702 | /* l4_per3 -> mailbox11 */ | ||
2703 | static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox11 = { | ||
2704 | .master = &dra7xx_l4_per3_hwmod, | ||
2705 | .slave = &dra7xx_mailbox11_hwmod, | ||
2706 | .clk = "l3_iclk_div", | ||
2707 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2708 | }; | ||
2709 | |||
2710 | /* l4_per3 -> mailbox12 */ | ||
2711 | static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox12 = { | ||
2712 | .master = &dra7xx_l4_per3_hwmod, | ||
2713 | .slave = &dra7xx_mailbox12_hwmod, | ||
2714 | .clk = "l3_iclk_div", | ||
2715 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2716 | }; | ||
2717 | |||
2718 | /* l4_per3 -> mailbox13 */ | ||
2719 | static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox13 = { | ||
2720 | .master = &dra7xx_l4_per3_hwmod, | ||
2721 | .slave = &dra7xx_mailbox13_hwmod, | ||
2722 | .clk = "l3_iclk_div", | ||
2723 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2724 | }; | ||
2725 | |||
2257 | /* l4_per1 -> mcspi1 */ | 2726 | /* l4_per1 -> mcspi1 */ |
2258 | static struct omap_hwmod_ocp_if dra7xx_l4_per1__mcspi1 = { | 2727 | static struct omap_hwmod_ocp_if dra7xx_l4_per1__mcspi1 = { |
2259 | .master = &dra7xx_l4_per1_hwmod, | 2728 | .master = &dra7xx_l4_per1_hwmod, |
@@ -2334,6 +2803,62 @@ static struct omap_hwmod_ocp_if dra7xx_l4_cfg__ocp2scp1 = { | |||
2334 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 2803 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
2335 | }; | 2804 | }; |
2336 | 2805 | ||
2806 | /* l4_cfg -> ocp2scp3 */ | ||
2807 | static struct omap_hwmod_ocp_if dra7xx_l4_cfg__ocp2scp3 = { | ||
2808 | .master = &dra7xx_l4_cfg_hwmod, | ||
2809 | .slave = &dra7xx_ocp2scp3_hwmod, | ||
2810 | .clk = "l4_root_clk_div", | ||
2811 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2812 | }; | ||
2813 | |||
2814 | /* l3_main_1 -> pcie1 */ | ||
2815 | static struct omap_hwmod_ocp_if dra7xx_l3_main_1__pcie1 = { | ||
2816 | .master = &dra7xx_l3_main_1_hwmod, | ||
2817 | .slave = &dra7xx_pcie1_hwmod, | ||
2818 | .clk = "l3_iclk_div", | ||
2819 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2820 | }; | ||
2821 | |||
2822 | /* l4_cfg -> pcie1 */ | ||
2823 | static struct omap_hwmod_ocp_if dra7xx_l4_cfg__pcie1 = { | ||
2824 | .master = &dra7xx_l4_cfg_hwmod, | ||
2825 | .slave = &dra7xx_pcie1_hwmod, | ||
2826 | .clk = "l4_root_clk_div", | ||
2827 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2828 | }; | ||
2829 | |||
2830 | /* l3_main_1 -> pcie2 */ | ||
2831 | static struct omap_hwmod_ocp_if dra7xx_l3_main_1__pcie2 = { | ||
2832 | .master = &dra7xx_l3_main_1_hwmod, | ||
2833 | .slave = &dra7xx_pcie2_hwmod, | ||
2834 | .clk = "l3_iclk_div", | ||
2835 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2836 | }; | ||
2837 | |||
2838 | /* l4_cfg -> pcie2 */ | ||
2839 | static struct omap_hwmod_ocp_if dra7xx_l4_cfg__pcie2 = { | ||
2840 | .master = &dra7xx_l4_cfg_hwmod, | ||
2841 | .slave = &dra7xx_pcie2_hwmod, | ||
2842 | .clk = "l4_root_clk_div", | ||
2843 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2844 | }; | ||
2845 | |||
2846 | /* l4_cfg -> pcie1 phy */ | ||
2847 | static struct omap_hwmod_ocp_if dra7xx_l4_cfg__pcie1_phy = { | ||
2848 | .master = &dra7xx_l4_cfg_hwmod, | ||
2849 | .slave = &dra7xx_pcie1_phy_hwmod, | ||
2850 | .clk = "l4_root_clk_div", | ||
2851 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2852 | }; | ||
2853 | |||
2854 | /* l4_cfg -> pcie2 phy */ | ||
2855 | static struct omap_hwmod_ocp_if dra7xx_l4_cfg__pcie2_phy = { | ||
2856 | .master = &dra7xx_l4_cfg_hwmod, | ||
2857 | .slave = &dra7xx_pcie2_phy_hwmod, | ||
2858 | .clk = "l4_root_clk_div", | ||
2859 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2860 | }; | ||
2861 | |||
2337 | static struct omap_hwmod_addr_space dra7xx_qspi_addrs[] = { | 2862 | static struct omap_hwmod_addr_space dra7xx_qspi_addrs[] = { |
2338 | { | 2863 | { |
2339 | .pa_start = 0x4b300000, | 2864 | .pa_start = 0x4b300000, |
@@ -2352,6 +2877,14 @@ static struct omap_hwmod_ocp_if dra7xx_l3_main_1__qspi = { | |||
2352 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 2877 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
2353 | }; | 2878 | }; |
2354 | 2879 | ||
2880 | /* l4_per3 -> rtcss */ | ||
2881 | static struct omap_hwmod_ocp_if dra7xx_l4_per3__rtcss = { | ||
2882 | .master = &dra7xx_l4_per3_hwmod, | ||
2883 | .slave = &dra7xx_rtcss_hwmod, | ||
2884 | .clk = "l4_root_clk_div", | ||
2885 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2886 | }; | ||
2887 | |||
2355 | static struct omap_hwmod_addr_space dra7xx_sata_addrs[] = { | 2888 | static struct omap_hwmod_addr_space dra7xx_sata_addrs[] = { |
2356 | { | 2889 | { |
2357 | .name = "sysc", | 2890 | .name = "sysc", |
@@ -2650,6 +3183,8 @@ static struct omap_hwmod_ocp_if *dra7xx_hwmod_ocp_ifs[] __initdata = { | |||
2650 | &dra7xx_l4_wkup__ctrl_module_wkup, | 3183 | &dra7xx_l4_wkup__ctrl_module_wkup, |
2651 | &dra7xx_l4_wkup__dcan1, | 3184 | &dra7xx_l4_wkup__dcan1, |
2652 | &dra7xx_l4_per2__dcan2, | 3185 | &dra7xx_l4_per2__dcan2, |
3186 | &dra7xx_l4_per2__cpgmac0, | ||
3187 | &dra7xx_gmac__mdio, | ||
2653 | &dra7xx_l4_cfg__dma_system, | 3188 | &dra7xx_l4_cfg__dma_system, |
2654 | &dra7xx_l3_main_1__dss, | 3189 | &dra7xx_l3_main_1__dss, |
2655 | &dra7xx_l3_main_1__dispc, | 3190 | &dra7xx_l3_main_1__dispc, |
@@ -2670,6 +3205,19 @@ static struct omap_hwmod_ocp_if *dra7xx_hwmod_ocp_ifs[] __initdata = { | |||
2670 | &dra7xx_l4_per1__i2c3, | 3205 | &dra7xx_l4_per1__i2c3, |
2671 | &dra7xx_l4_per1__i2c4, | 3206 | &dra7xx_l4_per1__i2c4, |
2672 | &dra7xx_l4_per1__i2c5, | 3207 | &dra7xx_l4_per1__i2c5, |
3208 | &dra7xx_l4_cfg__mailbox1, | ||
3209 | &dra7xx_l4_per3__mailbox2, | ||
3210 | &dra7xx_l4_per3__mailbox3, | ||
3211 | &dra7xx_l4_per3__mailbox4, | ||
3212 | &dra7xx_l4_per3__mailbox5, | ||
3213 | &dra7xx_l4_per3__mailbox6, | ||
3214 | &dra7xx_l4_per3__mailbox7, | ||
3215 | &dra7xx_l4_per3__mailbox8, | ||
3216 | &dra7xx_l4_per3__mailbox9, | ||
3217 | &dra7xx_l4_per3__mailbox10, | ||
3218 | &dra7xx_l4_per3__mailbox11, | ||
3219 | &dra7xx_l4_per3__mailbox12, | ||
3220 | &dra7xx_l4_per3__mailbox13, | ||
2673 | &dra7xx_l4_per1__mcspi1, | 3221 | &dra7xx_l4_per1__mcspi1, |
2674 | &dra7xx_l4_per1__mcspi2, | 3222 | &dra7xx_l4_per1__mcspi2, |
2675 | &dra7xx_l4_per1__mcspi3, | 3223 | &dra7xx_l4_per1__mcspi3, |
@@ -2680,7 +3228,15 @@ static struct omap_hwmod_ocp_if *dra7xx_hwmod_ocp_ifs[] __initdata = { | |||
2680 | &dra7xx_l4_per1__mmc4, | 3228 | &dra7xx_l4_per1__mmc4, |
2681 | &dra7xx_l4_cfg__mpu, | 3229 | &dra7xx_l4_cfg__mpu, |
2682 | &dra7xx_l4_cfg__ocp2scp1, | 3230 | &dra7xx_l4_cfg__ocp2scp1, |
3231 | &dra7xx_l4_cfg__ocp2scp3, | ||
3232 | &dra7xx_l3_main_1__pcie1, | ||
3233 | &dra7xx_l4_cfg__pcie1, | ||
3234 | &dra7xx_l3_main_1__pcie2, | ||
3235 | &dra7xx_l4_cfg__pcie2, | ||
3236 | &dra7xx_l4_cfg__pcie1_phy, | ||
3237 | &dra7xx_l4_cfg__pcie2_phy, | ||
2683 | &dra7xx_l3_main_1__qspi, | 3238 | &dra7xx_l3_main_1__qspi, |
3239 | &dra7xx_l4_per3__rtcss, | ||
2684 | &dra7xx_l4_cfg__sata, | 3240 | &dra7xx_l4_cfg__sata, |
2685 | &dra7xx_l4_cfg__smartreflex_core, | 3241 | &dra7xx_l4_cfg__smartreflex_core, |
2686 | &dra7xx_l4_cfg__smartreflex_mpu, | 3242 | &dra7xx_l4_cfg__smartreflex_mpu, |
diff --git a/arch/arm/mach-omap2/omap_hwmod_common_data.h b/arch/arm/mach-omap2/omap_hwmod_common_data.h index 2c38c6b0ee03..11ed5a17dd77 100644 --- a/arch/arm/mach-omap2/omap_hwmod_common_data.h +++ b/arch/arm/mach-omap2/omap_hwmod_common_data.h | |||
@@ -33,7 +33,6 @@ extern struct omap_hwmod_addr_space omap2_mcspi1_addr_space[]; | |||
33 | extern struct omap_hwmod_addr_space omap2_mcspi2_addr_space[]; | 33 | extern struct omap_hwmod_addr_space omap2_mcspi2_addr_space[]; |
34 | extern struct omap_hwmod_addr_space omap2430_mcspi3_addr_space[]; | 34 | extern struct omap_hwmod_addr_space omap2430_mcspi3_addr_space[]; |
35 | extern struct omap_hwmod_addr_space omap2_dma_system_addrs[]; | 35 | extern struct omap_hwmod_addr_space omap2_dma_system_addrs[]; |
36 | extern struct omap_hwmod_addr_space omap2_mailbox_addrs[]; | ||
37 | extern struct omap_hwmod_addr_space omap2_mcbsp1_addrs[]; | 36 | extern struct omap_hwmod_addr_space omap2_mcbsp1_addrs[]; |
38 | extern struct omap_hwmod_addr_space omap2_hdq1w_addr_space[]; | 37 | extern struct omap_hwmod_addr_space omap2_hdq1w_addr_space[]; |
39 | 38 | ||
diff --git a/arch/arm/mach-omap2/omap_hwmod_common_ipblock_data.c b/arch/arm/mach-omap2/omap_hwmod_common_ipblock_data.c new file mode 100644 index 000000000000..f21664da25a2 --- /dev/null +++ b/arch/arm/mach-omap2/omap_hwmod_common_ipblock_data.c | |||
@@ -0,0 +1,55 @@ | |||
1 | /* | ||
2 | * omap_hwmod_common_ipblock_data.c - common IP block data for OMAP2+ | ||
3 | * | ||
4 | * Copyright (C) 2011 Nokia Corporation | ||
5 | * Copyright (C) 2012 Texas Instruments, Inc. | ||
6 | * Paul Walmsley | ||
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 version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #include "omap_hwmod.h" | ||
14 | #include "omap_hwmod_common_data.h" | ||
15 | |||
16 | /* | ||
17 | * 'dss' class | ||
18 | * display sub-system | ||
19 | */ | ||
20 | |||
21 | static struct omap_hwmod_class_sysconfig omap2_dss_sysc = { | ||
22 | .rev_offs = 0x0000, | ||
23 | .sysc_offs = 0x0010, | ||
24 | .syss_offs = 0x0014, | ||
25 | .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE | | ||
26 | SYSS_HAS_RESET_STATUS), | ||
27 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
28 | }; | ||
29 | |||
30 | struct omap_hwmod_class omap2_dss_hwmod_class = { | ||
31 | .name = "dss", | ||
32 | .sysc = &omap2_dss_sysc, | ||
33 | .reset = omap_dss_reset, | ||
34 | }; | ||
35 | |||
36 | /* | ||
37 | * 'rfbi' class | ||
38 | * remote frame buffer interface | ||
39 | */ | ||
40 | |||
41 | static struct omap_hwmod_class_sysconfig omap2_rfbi_sysc = { | ||
42 | .rev_offs = 0x0000, | ||
43 | .sysc_offs = 0x0010, | ||
44 | .syss_offs = 0x0014, | ||
45 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET | | ||
46 | SYSC_HAS_AUTOIDLE), | ||
47 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
48 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
49 | }; | ||
50 | |||
51 | struct omap_hwmod_class omap2_rfbi_hwmod_class = { | ||
52 | .name = "rfbi", | ||
53 | .sysc = &omap2_rfbi_sysc, | ||
54 | }; | ||
55 | |||
diff --git a/arch/arm/mach-omap2/prcm43xx.h b/arch/arm/mach-omap2/prcm43xx.h index 7785be984edd..ad7b3e9977f8 100644 --- a/arch/arm/mach-omap2/prcm43xx.h +++ b/arch/arm/mach-omap2/prcm43xx.h | |||
@@ -142,5 +142,6 @@ | |||
142 | #define AM43XX_CM_PER_USBPHYOCP2SCP0_CLKCTRL_OFFSET 0x05B8 | 142 | #define AM43XX_CM_PER_USBPHYOCP2SCP0_CLKCTRL_OFFSET 0x05B8 |
143 | #define AM43XX_CM_PER_USB_OTG_SS1_CLKCTRL_OFFSET 0x0268 | 143 | #define AM43XX_CM_PER_USB_OTG_SS1_CLKCTRL_OFFSET 0x0268 |
144 | #define AM43XX_CM_PER_USBPHYOCP2SCP1_CLKCTRL_OFFSET 0x05C0 | 144 | #define AM43XX_CM_PER_USBPHYOCP2SCP1_CLKCTRL_OFFSET 0x05C0 |
145 | #define AM43XX_CM_PER_DSS_CLKCTRL_OFFSET 0x0a20 | ||
145 | 146 | ||
146 | #endif | 147 | #endif |
diff --git a/arch/arm/mach-omap2/prm7xx.h b/arch/arm/mach-omap2/prm7xx.h index d92a8404edc7..4bb50fbf29be 100644 --- a/arch/arm/mach-omap2/prm7xx.h +++ b/arch/arm/mach-omap2/prm7xx.h | |||
@@ -374,6 +374,10 @@ | |||
374 | #define DRA7XX_RM_L3INIT_IEEE1500_2_OCP_CONTEXT_OFFSET 0x007c | 374 | #define DRA7XX_RM_L3INIT_IEEE1500_2_OCP_CONTEXT_OFFSET 0x007c |
375 | #define DRA7XX_PM_L3INIT_SATA_WKDEP_OFFSET 0x0088 | 375 | #define DRA7XX_PM_L3INIT_SATA_WKDEP_OFFSET 0x0088 |
376 | #define DRA7XX_RM_L3INIT_SATA_CONTEXT_OFFSET 0x008c | 376 | #define DRA7XX_RM_L3INIT_SATA_CONTEXT_OFFSET 0x008c |
377 | #define DRA7XX_PM_L3INIT_PCIESS1_WKDEP_OFFSET 0x00b0 | ||
378 | #define DRA7XX_RM_L3INIT_PCIESS1_CONTEXT_OFFSET 0x00b4 | ||
379 | #define DRA7XX_PM_L3INIT_PCIESS2_WKDEP_OFFSET 0x00b8 | ||
380 | #define DRA7XX_RM_L3INIT_PCIESS2_CONTEXT_OFFSET 0x00bc | ||
377 | #define DRA7XX_RM_GMAC_GMAC_CONTEXT_OFFSET 0x00d4 | 381 | #define DRA7XX_RM_GMAC_GMAC_CONTEXT_OFFSET 0x00d4 |
378 | #define DRA7XX_RM_L3INIT_OCP2SCP1_CONTEXT_OFFSET 0x00e4 | 382 | #define DRA7XX_RM_L3INIT_OCP2SCP1_CONTEXT_OFFSET 0x00e4 |
379 | #define DRA7XX_RM_L3INIT_OCP2SCP3_CONTEXT_OFFSET 0x00ec | 383 | #define DRA7XX_RM_L3INIT_OCP2SCP3_CONTEXT_OFFSET 0x00ec |
diff --git a/arch/arm/mach-rockchip/Makefile b/arch/arm/mach-rockchip/Makefile index 4377a1436a98..b29d8ead4cf2 100644 --- a/arch/arm/mach-rockchip/Makefile +++ b/arch/arm/mach-rockchip/Makefile | |||
@@ -1,2 +1,4 @@ | |||
1 | CFLAGS_platsmp.o := -march=armv7-a | ||
2 | |||
1 | obj-$(CONFIG_ARCH_ROCKCHIP) += rockchip.o | 3 | obj-$(CONFIG_ARCH_ROCKCHIP) += rockchip.o |
2 | obj-$(CONFIG_SMP) += headsmp.o platsmp.o | 4 | obj-$(CONFIG_SMP) += headsmp.o platsmp.o |
diff --git a/arch/arm/mach-rockchip/platsmp.c b/arch/arm/mach-rockchip/platsmp.c index 910835d4ccf4..189684f55927 100644 --- a/arch/arm/mach-rockchip/platsmp.c +++ b/arch/arm/mach-rockchip/platsmp.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/of_address.h> | 21 | #include <linux/of_address.h> |
22 | 22 | ||
23 | #include <asm/cacheflush.h> | 23 | #include <asm/cacheflush.h> |
24 | #include <asm/cp15.h> | ||
24 | #include <asm/smp_scu.h> | 25 | #include <asm/smp_scu.h> |
25 | #include <asm/smp_plat.h> | 26 | #include <asm/smp_plat.h> |
26 | #include <asm/mach/map.h> | 27 | #include <asm/mach/map.h> |
@@ -178,8 +179,27 @@ static void __init rockchip_smp_prepare_cpus(unsigned int max_cpus) | |||
178 | pmu_set_power_domain(0 + i, false); | 179 | pmu_set_power_domain(0 + i, false); |
179 | } | 180 | } |
180 | 181 | ||
182 | #ifdef CONFIG_HOTPLUG_CPU | ||
183 | static int rockchip_cpu_kill(unsigned int cpu) | ||
184 | { | ||
185 | pmu_set_power_domain(0 + cpu, false); | ||
186 | return 1; | ||
187 | } | ||
188 | |||
189 | static void rockchip_cpu_die(unsigned int cpu) | ||
190 | { | ||
191 | v7_exit_coherency_flush(louis); | ||
192 | while(1) | ||
193 | cpu_do_idle(); | ||
194 | } | ||
195 | #endif | ||
196 | |||
181 | static struct smp_operations rockchip_smp_ops __initdata = { | 197 | static struct smp_operations rockchip_smp_ops __initdata = { |
182 | .smp_prepare_cpus = rockchip_smp_prepare_cpus, | 198 | .smp_prepare_cpus = rockchip_smp_prepare_cpus, |
183 | .smp_boot_secondary = rockchip_boot_secondary, | 199 | .smp_boot_secondary = rockchip_boot_secondary, |
200 | #ifdef CONFIG_HOTPLUG_CPU | ||
201 | .cpu_kill = rockchip_cpu_kill, | ||
202 | .cpu_die = rockchip_cpu_die, | ||
203 | #endif | ||
184 | }; | 204 | }; |
185 | CPU_METHOD_OF_DECLARE(rk3066_smp, "rockchip,rk3066-smp", &rockchip_smp_ops); | 205 | CPU_METHOD_OF_DECLARE(rk3066_smp, "rockchip,rk3066-smp", &rockchip_smp_ops); |
diff --git a/arch/arm/mach-s3c24xx/common.c b/arch/arm/mach-s3c24xx/common.c index c0763b837745..44fa95df9262 100644 --- a/arch/arm/mach-s3c24xx/common.c +++ b/arch/arm/mach-s3c24xx/common.c | |||
@@ -49,9 +49,7 @@ | |||
49 | 49 | ||
50 | #include <plat/cpu.h> | 50 | #include <plat/cpu.h> |
51 | #include <plat/devs.h> | 51 | #include <plat/devs.h> |
52 | #include <plat/clock.h> | ||
53 | #include <plat/cpu-freq.h> | 52 | #include <plat/cpu-freq.h> |
54 | #include <plat/pll.h> | ||
55 | #include <plat/pwm-core.h> | 53 | #include <plat/pwm-core.h> |
56 | #include <plat/watchdog-reset.h> | 54 | #include <plat/watchdog-reset.h> |
57 | 55 | ||
diff --git a/arch/arm/mach-s3c24xx/iotiming-s3c2412.c b/arch/arm/mach-s3c24xx/iotiming-s3c2412.c index bd064c05c473..28b13951de87 100644 --- a/arch/arm/mach-s3c24xx/iotiming-s3c2412.c +++ b/arch/arm/mach-s3c24xx/iotiming-s3c2412.c | |||
@@ -29,7 +29,6 @@ | |||
29 | 29 | ||
30 | #include <plat/cpu.h> | 30 | #include <plat/cpu.h> |
31 | #include <plat/cpu-freq-core.h> | 31 | #include <plat/cpu-freq-core.h> |
32 | #include <plat/clock.h> | ||
33 | 32 | ||
34 | #include <mach/s3c2412.h> | 33 | #include <mach/s3c2412.h> |
35 | 34 | ||
diff --git a/arch/arm/mach-s3c24xx/mach-h1940.c b/arch/arm/mach-s3c24xx/mach-h1940.c index fbf5487ae5d1..c9a99bbad545 100644 --- a/arch/arm/mach-s3c24xx/mach-h1940.c +++ b/arch/arm/mach-s3c24xx/mach-h1940.c | |||
@@ -60,7 +60,6 @@ | |||
60 | #include <plat/cpu.h> | 60 | #include <plat/cpu.h> |
61 | #include <plat/devs.h> | 61 | #include <plat/devs.h> |
62 | #include <plat/gpio-cfg.h> | 62 | #include <plat/gpio-cfg.h> |
63 | #include <plat/pll.h> | ||
64 | #include <plat/pm.h> | 63 | #include <plat/pm.h> |
65 | #include <plat/samsung-time.h> | 64 | #include <plat/samsung-time.h> |
66 | 65 | ||
@@ -73,6 +72,10 @@ | |||
73 | 72 | ||
74 | #define H1940_LATCH_BIT(x) (1 << ((x) + 16 - S3C_GPIO_END)) | 73 | #define H1940_LATCH_BIT(x) (1 << ((x) + 16 - S3C_GPIO_END)) |
75 | 74 | ||
75 | #define S3C24XX_PLL_MDIV_SHIFT (12) | ||
76 | #define S3C24XX_PLL_PDIV_SHIFT (4) | ||
77 | #define S3C24XX_PLL_SDIV_SHIFT (0) | ||
78 | |||
76 | static struct map_desc h1940_iodesc[] __initdata = { | 79 | static struct map_desc h1940_iodesc[] __initdata = { |
77 | [0] = { | 80 | [0] = { |
78 | .virtual = (unsigned long)H1940_LATCH, | 81 | .virtual = (unsigned long)H1940_LATCH, |
diff --git a/arch/arm/mach-s3c24xx/mach-jive.c b/arch/arm/mach-s3c24xx/mach-jive.c index e81ea82c55f9..e647b47244a9 100644 --- a/arch/arm/mach-s3c24xx/mach-jive.c +++ b/arch/arm/mach-s3c24xx/mach-jive.c | |||
@@ -48,7 +48,6 @@ | |||
48 | #include <linux/mtd/partitions.h> | 48 | #include <linux/mtd/partitions.h> |
49 | 49 | ||
50 | #include <plat/gpio-cfg.h> | 50 | #include <plat/gpio-cfg.h> |
51 | #include <plat/clock.h> | ||
52 | #include <plat/devs.h> | 51 | #include <plat/devs.h> |
53 | #include <plat/cpu.h> | 52 | #include <plat/cpu.h> |
54 | #include <plat/pm.h> | 53 | #include <plat/pm.h> |
diff --git a/arch/arm/mach-s3c24xx/mach-smdk2413.c b/arch/arm/mach-s3c24xx/mach-smdk2413.c index fb3b80e44595..10726bf84920 100644 --- a/arch/arm/mach-s3c24xx/mach-smdk2413.c +++ b/arch/arm/mach-s3c24xx/mach-smdk2413.c | |||
@@ -43,7 +43,6 @@ | |||
43 | #include <mach/gpio-samsung.h> | 43 | #include <mach/gpio-samsung.h> |
44 | #include <mach/fb.h> | 44 | #include <mach/fb.h> |
45 | 45 | ||
46 | #include <plat/clock.h> | ||
47 | #include <plat/devs.h> | 46 | #include <plat/devs.h> |
48 | #include <plat/cpu.h> | 47 | #include <plat/cpu.h> |
49 | #include <plat/samsung-time.h> | 48 | #include <plat/samsung-time.h> |
diff --git a/arch/arm/mach-s3c24xx/mach-smdk2416.c b/arch/arm/mach-s3c24xx/mach-smdk2416.c index fa6f30d23601..24189e8e8560 100644 --- a/arch/arm/mach-s3c24xx/mach-smdk2416.c +++ b/arch/arm/mach-s3c24xx/mach-smdk2416.c | |||
@@ -44,7 +44,6 @@ | |||
44 | #include <linux/platform_data/i2c-s3c2410.h> | 44 | #include <linux/platform_data/i2c-s3c2410.h> |
45 | 45 | ||
46 | #include <plat/gpio-cfg.h> | 46 | #include <plat/gpio-cfg.h> |
47 | #include <plat/clock.h> | ||
48 | #include <plat/devs.h> | 47 | #include <plat/devs.h> |
49 | #include <plat/cpu.h> | 48 | #include <plat/cpu.h> |
50 | #include <linux/platform_data/mtd-nand-s3c2410.h> | 49 | #include <linux/platform_data/mtd-nand-s3c2410.h> |
diff --git a/arch/arm/mach-s3c24xx/mach-smdk2443.c b/arch/arm/mach-s3c24xx/mach-smdk2443.c index ef5d5ea33182..0ed77614dcfe 100644 --- a/arch/arm/mach-s3c24xx/mach-smdk2443.c +++ b/arch/arm/mach-s3c24xx/mach-smdk2443.c | |||
@@ -38,7 +38,6 @@ | |||
38 | #include <mach/fb.h> | 38 | #include <mach/fb.h> |
39 | #include <linux/platform_data/i2c-s3c2410.h> | 39 | #include <linux/platform_data/i2c-s3c2410.h> |
40 | 40 | ||
41 | #include <plat/clock.h> | ||
42 | #include <plat/devs.h> | 41 | #include <plat/devs.h> |
43 | #include <plat/cpu.h> | 42 | #include <plat/cpu.h> |
44 | #include <plat/samsung-time.h> | 43 | #include <plat/samsung-time.h> |
diff --git a/arch/arm/mach-s3c24xx/mach-vstms.c b/arch/arm/mach-s3c24xx/mach-vstms.c index 9104c2be36c9..9d4f64750698 100644 --- a/arch/arm/mach-s3c24xx/mach-vstms.c +++ b/arch/arm/mach-s3c24xx/mach-vstms.c | |||
@@ -42,7 +42,6 @@ | |||
42 | #include <linux/platform_data/i2c-s3c2410.h> | 42 | #include <linux/platform_data/i2c-s3c2410.h> |
43 | #include <linux/platform_data/mtd-nand-s3c2410.h> | 43 | #include <linux/platform_data/mtd-nand-s3c2410.h> |
44 | 44 | ||
45 | #include <plat/clock.h> | ||
46 | #include <plat/devs.h> | 45 | #include <plat/devs.h> |
47 | #include <plat/cpu.h> | 46 | #include <plat/cpu.h> |
48 | #include <plat/samsung-time.h> | 47 | #include <plat/samsung-time.h> |
diff --git a/arch/arm/mach-s3c24xx/s3c2410.c b/arch/arm/mach-s3c24xx/s3c2410.c index 7eab88829883..5ffe828cd659 100644 --- a/arch/arm/mach-s3c24xx/s3c2410.c +++ b/arch/arm/mach-s3c24xx/s3c2410.c | |||
@@ -41,8 +41,6 @@ | |||
41 | 41 | ||
42 | #include <plat/cpu.h> | 42 | #include <plat/cpu.h> |
43 | #include <plat/devs.h> | 43 | #include <plat/devs.h> |
44 | #include <plat/clock.h> | ||
45 | #include <plat/pll.h> | ||
46 | #include <plat/pm.h> | 44 | #include <plat/pm.h> |
47 | #include <plat/watchdog-reset.h> | 45 | #include <plat/watchdog-reset.h> |
48 | 46 | ||
@@ -83,10 +81,6 @@ void __init s3c2410_map_io(void) | |||
83 | iotable_init(s3c2410_iodesc, ARRAY_SIZE(s3c2410_iodesc)); | 81 | iotable_init(s3c2410_iodesc, ARRAY_SIZE(s3c2410_iodesc)); |
84 | } | 82 | } |
85 | 83 | ||
86 | void __init_or_cpufreq s3c2410_setup_clocks(void) | ||
87 | { | ||
88 | } | ||
89 | |||
90 | struct bus_type s3c2410_subsys = { | 84 | struct bus_type s3c2410_subsys = { |
91 | .name = "s3c2410-core", | 85 | .name = "s3c2410-core", |
92 | .dev_name = "s3c2410-core", | 86 | .dev_name = "s3c2410-core", |
diff --git a/arch/arm/mach-s3c24xx/s3c2412.c b/arch/arm/mach-s3c24xx/s3c2412.c index d49f52fbc842..569f3f5a6c71 100644 --- a/arch/arm/mach-s3c24xx/s3c2412.c +++ b/arch/arm/mach-s3c24xx/s3c2412.c | |||
@@ -37,12 +37,10 @@ | |||
37 | #include <mach/regs-clock.h> | 37 | #include <mach/regs-clock.h> |
38 | #include <mach/regs-gpio.h> | 38 | #include <mach/regs-gpio.h> |
39 | 39 | ||
40 | #include <plat/clock.h> | ||
41 | #include <plat/cpu.h> | 40 | #include <plat/cpu.h> |
42 | #include <plat/cpu-freq.h> | 41 | #include <plat/cpu-freq.h> |
43 | #include <plat/devs.h> | 42 | #include <plat/devs.h> |
44 | #include <plat/nand-core.h> | 43 | #include <plat/nand-core.h> |
45 | #include <plat/pll.h> | ||
46 | #include <plat/pm.h> | 44 | #include <plat/pm.h> |
47 | #include <plat/regs-spi.h> | 45 | #include <plat/regs-spi.h> |
48 | 46 | ||
@@ -171,10 +169,6 @@ void __init s3c2412_map_io(void) | |||
171 | iotable_init(s3c2412_iodesc, ARRAY_SIZE(s3c2412_iodesc)); | 169 | iotable_init(s3c2412_iodesc, ARRAY_SIZE(s3c2412_iodesc)); |
172 | } | 170 | } |
173 | 171 | ||
174 | void __init_or_cpufreq s3c2412_setup_clocks(void) | ||
175 | { | ||
176 | } | ||
177 | |||
178 | /* need to register the subsystem before we actually register the device, and | 172 | /* need to register the subsystem before we actually register the device, and |
179 | * we also need to ensure that it has been initialised before any of the | 173 | * we also need to ensure that it has been initialised before any of the |
180 | * drivers even try to use it (even if not on an s3c2412 based system) | 174 | * drivers even try to use it (even if not on an s3c2412 based system) |
diff --git a/arch/arm/mach-s3c24xx/s3c2442.c b/arch/arm/mach-s3c24xx/s3c2442.c index fb9da2b603a2..7b043349f1c8 100644 --- a/arch/arm/mach-s3c24xx/s3c2442.c +++ b/arch/arm/mach-s3c24xx/s3c2442.c | |||
@@ -43,7 +43,6 @@ | |||
43 | 43 | ||
44 | #include <mach/regs-clock.h> | 44 | #include <mach/regs-clock.h> |
45 | 45 | ||
46 | #include <plat/clock.h> | ||
47 | #include <plat/cpu.h> | 46 | #include <plat/cpu.h> |
48 | #include <plat/pm.h> | 47 | #include <plat/pm.h> |
49 | 48 | ||
diff --git a/arch/arm/mach-s3c24xx/s3c244x.c b/arch/arm/mach-s3c24xx/s3c244x.c index 4a64bcc9eb51..d1c3e65785a1 100644 --- a/arch/arm/mach-s3c24xx/s3c244x.c +++ b/arch/arm/mach-s3c24xx/s3c244x.c | |||
@@ -38,11 +38,9 @@ | |||
38 | #include <mach/regs-clock.h> | 38 | #include <mach/regs-clock.h> |
39 | #include <mach/regs-gpio.h> | 39 | #include <mach/regs-gpio.h> |
40 | 40 | ||
41 | #include <plat/clock.h> | ||
42 | #include <plat/devs.h> | 41 | #include <plat/devs.h> |
43 | #include <plat/cpu.h> | 42 | #include <plat/cpu.h> |
44 | #include <plat/pm.h> | 43 | #include <plat/pm.h> |
45 | #include <plat/pll.h> | ||
46 | #include <plat/nand-core.h> | 44 | #include <plat/nand-core.h> |
47 | #include <plat/watchdog-reset.h> | 45 | #include <plat/watchdog-reset.h> |
48 | 46 | ||
@@ -78,10 +76,6 @@ void __init s3c244x_map_io(void) | |||
78 | s3c2410_device_dclk.name = "s3c2440-dclk"; | 76 | s3c2410_device_dclk.name = "s3c2440-dclk"; |
79 | } | 77 | } |
80 | 78 | ||
81 | void __init_or_cpufreq s3c244x_setup_clocks(void) | ||
82 | { | ||
83 | } | ||
84 | |||
85 | /* Since the S3C2442 and S3C2440 share items, put both subsystems here */ | 79 | /* Since the S3C2442 and S3C2440 share items, put both subsystems here */ |
86 | 80 | ||
87 | struct bus_type s3c2440_subsys = { | 81 | struct bus_type s3c2440_subsys = { |
diff --git a/arch/arm/mach-s3c64xx/mach-anw6410.c b/arch/arm/mach-s3c64xx/mach-anw6410.c index 55eb6a69655b..60576dfbea8d 100644 --- a/arch/arm/mach-s3c64xx/mach-anw6410.c +++ b/arch/arm/mach-s3c64xx/mach-anw6410.c | |||
@@ -45,7 +45,6 @@ | |||
45 | #include <linux/platform_data/i2c-s3c2410.h> | 45 | #include <linux/platform_data/i2c-s3c2410.h> |
46 | #include <plat/fb.h> | 46 | #include <plat/fb.h> |
47 | 47 | ||
48 | #include <plat/clock.h> | ||
49 | #include <plat/devs.h> | 48 | #include <plat/devs.h> |
50 | #include <plat/cpu.h> | 49 | #include <plat/cpu.h> |
51 | #include <mach/regs-gpio.h> | 50 | #include <mach/regs-gpio.h> |
diff --git a/arch/arm/mach-s3c64xx/mach-crag6410.c b/arch/arm/mach-s3c64xx/mach-crag6410.c index 4b0199fff9f5..fe116334afda 100644 --- a/arch/arm/mach-s3c64xx/mach-crag6410.c +++ b/arch/arm/mach-s3c64xx/mach-crag6410.c | |||
@@ -58,7 +58,6 @@ | |||
58 | #include <linux/platform_data/spi-s3c64xx.h> | 58 | #include <linux/platform_data/spi-s3c64xx.h> |
59 | 59 | ||
60 | #include <plat/keypad.h> | 60 | #include <plat/keypad.h> |
61 | #include <plat/clock.h> | ||
62 | #include <plat/devs.h> | 61 | #include <plat/devs.h> |
63 | #include <plat/cpu.h> | 62 | #include <plat/cpu.h> |
64 | #include <plat/adc.h> | 63 | #include <plat/adc.h> |
diff --git a/arch/arm/mach-s3c64xx/mach-hmt.c b/arch/arm/mach-s3c64xx/mach-hmt.c index 72cee08c8bf5..19e8feb908fd 100644 --- a/arch/arm/mach-s3c64xx/mach-hmt.c +++ b/arch/arm/mach-s3c64xx/mach-hmt.c | |||
@@ -39,7 +39,6 @@ | |||
39 | #include <plat/fb.h> | 39 | #include <plat/fb.h> |
40 | #include <linux/platform_data/mtd-nand-s3c2410.h> | 40 | #include <linux/platform_data/mtd-nand-s3c2410.h> |
41 | 41 | ||
42 | #include <plat/clock.h> | ||
43 | #include <plat/devs.h> | 42 | #include <plat/devs.h> |
44 | #include <plat/cpu.h> | 43 | #include <plat/cpu.h> |
45 | #include <plat/samsung-time.h> | 44 | #include <plat/samsung-time.h> |
diff --git a/arch/arm/mach-s3c64xx/mach-ncp.c b/arch/arm/mach-s3c64xx/mach-ncp.c index 67f06a9ae656..4bae7dc49eea 100644 --- a/arch/arm/mach-s3c64xx/mach-ncp.c +++ b/arch/arm/mach-s3c64xx/mach-ncp.c | |||
@@ -40,7 +40,6 @@ | |||
40 | #include <linux/platform_data/i2c-s3c2410.h> | 40 | #include <linux/platform_data/i2c-s3c2410.h> |
41 | #include <plat/fb.h> | 41 | #include <plat/fb.h> |
42 | 42 | ||
43 | #include <plat/clock.h> | ||
44 | #include <plat/devs.h> | 43 | #include <plat/devs.h> |
45 | #include <plat/cpu.h> | 44 | #include <plat/cpu.h> |
46 | #include <plat/samsung-time.h> | 45 | #include <plat/samsung-time.h> |
diff --git a/arch/arm/mach-s3c64xx/mach-smartq.c b/arch/arm/mach-s3c64xx/mach-smartq.c index 78dd6f73c072..b3d13537a7f0 100644 --- a/arch/arm/mach-s3c64xx/mach-smartq.c +++ b/arch/arm/mach-s3c64xx/mach-smartq.c | |||
@@ -28,7 +28,6 @@ | |||
28 | #include <mach/regs-gpio.h> | 28 | #include <mach/regs-gpio.h> |
29 | #include <mach/gpio-samsung.h> | 29 | #include <mach/gpio-samsung.h> |
30 | 30 | ||
31 | #include <plat/clock.h> | ||
32 | #include <plat/cpu.h> | 31 | #include <plat/cpu.h> |
33 | #include <plat/devs.h> | 32 | #include <plat/devs.h> |
34 | #include <linux/platform_data/i2c-s3c2410.h> | 33 | #include <linux/platform_data/i2c-s3c2410.h> |
diff --git a/arch/arm/mach-s3c64xx/mach-smdk6400.c b/arch/arm/mach-s3c64xx/mach-smdk6400.c index c85d1cbe769f..910749768340 100644 --- a/arch/arm/mach-s3c64xx/mach-smdk6400.c +++ b/arch/arm/mach-s3c64xx/mach-smdk6400.c | |||
@@ -30,7 +30,6 @@ | |||
30 | #include <mach/hardware.h> | 30 | #include <mach/hardware.h> |
31 | #include <mach/map.h> | 31 | #include <mach/map.h> |
32 | 32 | ||
33 | #include <plat/clock.h> | ||
34 | #include <plat/devs.h> | 33 | #include <plat/devs.h> |
35 | #include <plat/cpu.h> | 34 | #include <plat/cpu.h> |
36 | #include <linux/platform_data/i2c-s3c2410.h> | 35 | #include <linux/platform_data/i2c-s3c2410.h> |
diff --git a/arch/arm/mach-s3c64xx/mach-smdk6410.c b/arch/arm/mach-s3c64xx/mach-smdk6410.c index c6a8b2ab0240..1dc86d76b530 100644 --- a/arch/arm/mach-s3c64xx/mach-smdk6410.c +++ b/arch/arm/mach-s3c64xx/mach-smdk6410.c | |||
@@ -63,7 +63,6 @@ | |||
63 | #include <plat/fb.h> | 63 | #include <plat/fb.h> |
64 | #include <plat/gpio-cfg.h> | 64 | #include <plat/gpio-cfg.h> |
65 | 65 | ||
66 | #include <plat/clock.h> | ||
67 | #include <plat/devs.h> | 66 | #include <plat/devs.h> |
68 | #include <plat/cpu.h> | 67 | #include <plat/cpu.h> |
69 | #include <plat/adc.h> | 68 | #include <plat/adc.h> |
diff --git a/arch/arm/mach-s3c64xx/s3c6400.c b/arch/arm/mach-s3c64xx/s3c6400.c index 8c42807bf579..1ce48c54cd9c 100644 --- a/arch/arm/mach-s3c64xx/s3c6400.c +++ b/arch/arm/mach-s3c64xx/s3c6400.c | |||
@@ -39,7 +39,6 @@ | |||
39 | 39 | ||
40 | #include <plat/cpu.h> | 40 | #include <plat/cpu.h> |
41 | #include <plat/devs.h> | 41 | #include <plat/devs.h> |
42 | #include <plat/clock.h> | ||
43 | #include <plat/sdhci.h> | 42 | #include <plat/sdhci.h> |
44 | #include <plat/iic-core.h> | 43 | #include <plat/iic-core.h> |
45 | #include <plat/onenand-core.h> | 44 | #include <plat/onenand-core.h> |
diff --git a/arch/arm/mach-s3c64xx/s3c6410.c b/arch/arm/mach-s3c64xx/s3c6410.c index 5be3f09bac92..b2a7930548d9 100644 --- a/arch/arm/mach-s3c64xx/s3c6410.c +++ b/arch/arm/mach-s3c64xx/s3c6410.c | |||
@@ -40,7 +40,6 @@ | |||
40 | 40 | ||
41 | #include <plat/cpu.h> | 41 | #include <plat/cpu.h> |
42 | #include <plat/devs.h> | 42 | #include <plat/devs.h> |
43 | #include <plat/clock.h> | ||
44 | #include <plat/sdhci.h> | 43 | #include <plat/sdhci.h> |
45 | #include <plat/ata-core.h> | 44 | #include <plat/ata-core.h> |
46 | #include <plat/adc-core.h> | 45 | #include <plat/adc-core.h> |
diff --git a/arch/arm/mach-s5pv210/Kconfig b/arch/arm/mach-s5pv210/Kconfig index f60f2862856d..330bfc8fcd52 100644 --- a/arch/arm/mach-s5pv210/Kconfig +++ b/arch/arm/mach-s5pv210/Kconfig | |||
@@ -7,193 +7,28 @@ | |||
7 | 7 | ||
8 | # Configuration options for the S5PV210/S5PC110 | 8 | # Configuration options for the S5PV210/S5PC110 |
9 | 9 | ||
10 | config ARCH_S5PV210 | ||
11 | bool "Samsung S5PV210/S5PC110" if ARCH_MULTI_V7 | ||
12 | select ARCH_HAS_HOLES_MEMORYMODEL | ||
13 | select ARCH_REQUIRE_GPIOLIB | ||
14 | select ARM_VIC | ||
15 | select CLKSRC_SAMSUNG_PWM | ||
16 | select COMMON_CLK_SAMSUNG | ||
17 | select HAVE_S3C2410_I2C if I2C | ||
18 | select HAVE_S3C2410_WATCHDOG if WATCHDOG | ||
19 | select HAVE_S3C_RTC if RTC_CLASS | ||
20 | select PINCTRL | ||
21 | select PINCTRL_EXYNOS | ||
22 | help | ||
23 | Samsung S5PV210/S5PC110 series based systems | ||
24 | |||
10 | if ARCH_S5PV210 | 25 | if ARCH_S5PV210 |
11 | 26 | ||
12 | config CPU_S5PV210 | 27 | config CPU_S5PV210 |
13 | bool | 28 | def_bool y |
14 | select ARM_AMBA | 29 | select ARM_AMBA |
15 | select PL330_DMA if DMADEVICES | 30 | select PL330_DMA if DMADEVICES |
16 | select S5P_EXT_INT | ||
17 | select S5P_PM if PM | ||
18 | select S5P_SLEEP if PM | ||
19 | help | 31 | help |
20 | Enable S5PV210 CPU support | 32 | Enable S5PV210 CPU support |
21 | 33 | ||
22 | config S5PV210_SETUP_I2C1 | ||
23 | bool | ||
24 | help | ||
25 | Common setup code for i2c bus 1. | ||
26 | |||
27 | config S5PV210_SETUP_I2C2 | ||
28 | bool | ||
29 | help | ||
30 | Common setup code for i2c bus 2. | ||
31 | |||
32 | config S5PV210_SETUP_IDE | ||
33 | bool | ||
34 | help | ||
35 | Common setup code for S5PV210 IDE GPIO configurations | ||
36 | |||
37 | config S5PV210_SETUP_FB_24BPP | ||
38 | bool | ||
39 | help | ||
40 | Common setup code for S5PV210 with an 24bpp RGB display helper. | ||
41 | |||
42 | config S5PV210_SETUP_KEYPAD | ||
43 | bool | ||
44 | help | ||
45 | Common setup code for keypad. | ||
46 | |||
47 | config S5PV210_SETUP_SDHCI | ||
48 | bool | ||
49 | select S5PV210_SETUP_SDHCI_GPIO | ||
50 | help | ||
51 | Internal helper functions for S5PV210 based SDHCI systems | ||
52 | |||
53 | config S5PV210_SETUP_SDHCI_GPIO | ||
54 | bool | ||
55 | help | ||
56 | Common setup code for SDHCI gpio. | ||
57 | |||
58 | config S5PV210_SETUP_FIMC | ||
59 | bool | ||
60 | help | ||
61 | Common setup code for the camera interfaces. | ||
62 | |||
63 | config S5PV210_SETUP_SPI | ||
64 | bool | ||
65 | help | ||
66 | Common setup code for SPI GPIO configurations. | ||
67 | |||
68 | config S5PV210_SETUP_USB_PHY | ||
69 | bool | ||
70 | help | ||
71 | Common setup code for USB PHY controller | ||
72 | |||
73 | menu "S5PC110 Machines" | ||
74 | |||
75 | config MACH_AQUILA | ||
76 | bool "Aquila" | ||
77 | select CPU_S5PV210 | ||
78 | select S3C_DEV_FB | ||
79 | select S3C_DEV_HSMMC | ||
80 | select S3C_DEV_HSMMC1 | ||
81 | select S3C_DEV_HSMMC2 | ||
82 | select S5PV210_SETUP_FB_24BPP | ||
83 | select S5PV210_SETUP_SDHCI | ||
84 | select S5PV210_SETUP_USB_PHY | ||
85 | select S5P_DEV_FIMC0 | ||
86 | select S5P_DEV_FIMC1 | ||
87 | select S5P_DEV_FIMC2 | ||
88 | select S5P_DEV_ONENAND | ||
89 | help | ||
90 | Machine support for the Samsung Aquila target based on S5PC110 SoC | ||
91 | |||
92 | config MACH_GONI | ||
93 | bool "GONI" | ||
94 | select CPU_S5PV210 | ||
95 | select S3C_DEV_FB | ||
96 | select S3C_DEV_HSMMC | ||
97 | select S3C_DEV_HSMMC1 | ||
98 | select S3C_DEV_HSMMC2 | ||
99 | select S3C_DEV_I2C1 | ||
100 | select S3C_DEV_I2C2 | ||
101 | select S3C_DEV_USB_HSOTG | ||
102 | select S5PV210_SETUP_FB_24BPP | ||
103 | select S5PV210_SETUP_FIMC | ||
104 | select S5PV210_SETUP_I2C1 | ||
105 | select S5PV210_SETUP_I2C2 | ||
106 | select S5PV210_SETUP_KEYPAD | ||
107 | select S5PV210_SETUP_SDHCI | ||
108 | select S5PV210_SETUP_USB_PHY | ||
109 | select S5P_DEV_FIMC0 | ||
110 | select S5P_DEV_FIMC1 | ||
111 | select S5P_DEV_FIMC2 | ||
112 | select S5P_DEV_MFC | ||
113 | select S5P_DEV_ONENAND | ||
114 | select S5P_DEV_TV | ||
115 | select S5P_GPIO_INT | ||
116 | select SAMSUNG_DEV_KEYPAD | ||
117 | help | ||
118 | Machine support for Samsung GONI board | ||
119 | S5PC110(MCP) is one of package option of S5PV210 | ||
120 | |||
121 | config MACH_SMDKC110 | ||
122 | bool "SMDKC110" | ||
123 | select CPU_S5PV210 | ||
124 | select S3C_DEV_I2C1 | ||
125 | select S3C_DEV_I2C2 | ||
126 | select S3C_DEV_RTC | ||
127 | select S3C_DEV_WDT | ||
128 | select S5PV210_SETUP_I2C1 | ||
129 | select S5PV210_SETUP_I2C2 | ||
130 | select S5PV210_SETUP_IDE | ||
131 | select S5P_DEV_FIMC0 | ||
132 | select S5P_DEV_FIMC1 | ||
133 | select S5P_DEV_FIMC2 | ||
134 | select S5P_DEV_MFC | ||
135 | select SAMSUNG_DEV_IDE | ||
136 | help | ||
137 | Machine support for Samsung SMDKC110 | ||
138 | S5PC110(MCP) is one of package option of S5PV210 | ||
139 | |||
140 | endmenu | ||
141 | |||
142 | menu "S5PV210 Machines" | ||
143 | |||
144 | config MACH_SMDKV210 | ||
145 | bool "SMDKV210" | ||
146 | select CPU_S5PV210 | ||
147 | select S3C_DEV_FB | ||
148 | select S3C_DEV_HSMMC | ||
149 | select S3C_DEV_HSMMC1 | ||
150 | select S3C_DEV_HSMMC2 | ||
151 | select S3C_DEV_HSMMC3 | ||
152 | select S3C_DEV_I2C1 | ||
153 | select S3C_DEV_I2C2 | ||
154 | select S3C_DEV_RTC | ||
155 | select S3C_DEV_USB_HSOTG | ||
156 | select S3C_DEV_WDT | ||
157 | select S5PV210_SETUP_FB_24BPP | ||
158 | select S5PV210_SETUP_I2C1 | ||
159 | select S5PV210_SETUP_I2C2 | ||
160 | select S5PV210_SETUP_IDE | ||
161 | select S5PV210_SETUP_KEYPAD | ||
162 | select S5PV210_SETUP_SDHCI | ||
163 | select S5PV210_SETUP_USB_PHY | ||
164 | select S5P_DEV_FIMC0 | ||
165 | select S5P_DEV_FIMC1 | ||
166 | select S5P_DEV_FIMC2 | ||
167 | select S5P_DEV_JPEG | ||
168 | select S5P_DEV_MFC | ||
169 | select SAMSUNG_DEV_ADC | ||
170 | select SAMSUNG_DEV_BACKLIGHT | ||
171 | select SAMSUNG_DEV_IDE | ||
172 | select SAMSUNG_DEV_KEYPAD | ||
173 | select SAMSUNG_DEV_PWM | ||
174 | select SAMSUNG_DEV_TS | ||
175 | help | ||
176 | Machine support for Samsung SMDKV210 | ||
177 | |||
178 | config MACH_TORBRECK | ||
179 | bool "Torbreck" | ||
180 | select ARCH_SPARSEMEM_ENABLE | ||
181 | select CPU_S5PV210 | ||
182 | select S3C_DEV_HSMMC | ||
183 | select S3C_DEV_HSMMC1 | ||
184 | select S3C_DEV_HSMMC2 | ||
185 | select S3C_DEV_HSMMC3 | ||
186 | select S3C_DEV_I2C1 | ||
187 | select S3C_DEV_I2C2 | ||
188 | select S3C_DEV_RTC | ||
189 | select S3C_DEV_WDT | ||
190 | select S5PV210_SETUP_I2C1 | ||
191 | select S5PV210_SETUP_I2C2 | ||
192 | select S5PV210_SETUP_SDHCI | ||
193 | select SAMSUNG_DEV_IDE | ||
194 | help | ||
195 | Machine support for aESOP Torbreck | ||
196 | |||
197 | endmenu | ||
198 | |||
199 | endif | 34 | endif |
diff --git a/arch/arm/mach-s5pv210/Makefile b/arch/arm/mach-s5pv210/Makefile index 1c4e41998a10..7dc2d0e25a83 100644 --- a/arch/arm/mach-s5pv210/Makefile +++ b/arch/arm/mach-s5pv210/Makefile | |||
@@ -5,6 +5,8 @@ | |||
5 | # | 5 | # |
6 | # Licensed under GPLv2 | 6 | # Licensed under GPLv2 |
7 | 7 | ||
8 | ccflags-$(CONFIG_ARCH_MULTIPLATFORM) += -I$(srctree)/$(src)/include -I$(srctree)/arch/arm/plat-samsung/include | ||
9 | |||
8 | obj-y := | 10 | obj-y := |
9 | obj-m := | 11 | obj-m := |
10 | obj-n := | 12 | obj-n := |
@@ -12,31 +14,8 @@ obj- := | |||
12 | 14 | ||
13 | # Core | 15 | # Core |
14 | 16 | ||
15 | obj-y += common.o clock.o | 17 | obj-$(CONFIG_PM_SLEEP) += pm.o sleep.o |
16 | |||
17 | obj-$(CONFIG_PM) += pm.o | ||
18 | |||
19 | obj-y += dma.o | ||
20 | 18 | ||
21 | # machine support | 19 | # machine support |
22 | 20 | ||
23 | obj-$(CONFIG_MACH_AQUILA) += mach-aquila.o | 21 | obj-y += s5pv210.o |
24 | obj-$(CONFIG_MACH_GONI) += mach-goni.o | ||
25 | obj-$(CONFIG_MACH_SMDKC110) += mach-smdkc110.o | ||
26 | obj-$(CONFIG_MACH_SMDKV210) += mach-smdkv210.o | ||
27 | obj-$(CONFIG_MACH_TORBRECK) += mach-torbreck.o | ||
28 | |||
29 | # device support | ||
30 | |||
31 | obj-y += dev-audio.o | ||
32 | |||
33 | obj-y += setup-i2c0.o | ||
34 | obj-$(CONFIG_S5PV210_SETUP_FB_24BPP) += setup-fb-24bpp.o | ||
35 | obj-$(CONFIG_S5PV210_SETUP_FIMC) += setup-fimc.o | ||
36 | obj-$(CONFIG_S5PV210_SETUP_I2C1) += setup-i2c1.o | ||
37 | obj-$(CONFIG_S5PV210_SETUP_I2C2) += setup-i2c2.o | ||
38 | obj-$(CONFIG_S5PV210_SETUP_IDE) += setup-ide.o | ||
39 | obj-$(CONFIG_S5PV210_SETUP_KEYPAD) += setup-keypad.o | ||
40 | obj-$(CONFIG_S5PV210_SETUP_SDHCI_GPIO) += setup-sdhci-gpio.o | ||
41 | obj-$(CONFIG_S5PV210_SETUP_SPI) += setup-spi.o | ||
42 | obj-$(CONFIG_S5PV210_SETUP_USB_PHY) += setup-usb-phy.o | ||
diff --git a/arch/arm/mach-s5pv210/Makefile.boot b/arch/arm/mach-s5pv210/Makefile.boot deleted file mode 100644 index 79ece4055b02..000000000000 --- a/arch/arm/mach-s5pv210/Makefile.boot +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | zreladdr-y += 0x20008000 | ||
2 | params_phys-y := 0x20000100 | ||
diff --git a/arch/arm/mach-s5pv210/clock.c b/arch/arm/mach-s5pv210/clock.c deleted file mode 100644 index ca463724a3df..000000000000 --- a/arch/arm/mach-s5pv210/clock.c +++ /dev/null | |||
@@ -1,1365 +0,0 @@ | |||
1 | /* linux/arch/arm/mach-s5pv210/clock.c | ||
2 | * | ||
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com/ | ||
5 | * | ||
6 | * S5PV210 - Clock support | ||
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 version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #include <linux/init.h> | ||
14 | #include <linux/module.h> | ||
15 | #include <linux/kernel.h> | ||
16 | #include <linux/list.h> | ||
17 | #include <linux/errno.h> | ||
18 | #include <linux/err.h> | ||
19 | #include <linux/clk.h> | ||
20 | #include <linux/device.h> | ||
21 | #include <linux/io.h> | ||
22 | |||
23 | #include <mach/map.h> | ||
24 | |||
25 | #include <plat/cpu-freq.h> | ||
26 | #include <mach/regs-clock.h> | ||
27 | #include <plat/clock.h> | ||
28 | #include <plat/cpu.h> | ||
29 | #include <plat/pll.h> | ||
30 | #include <plat/s5p-clock.h> | ||
31 | #include <plat/clock-clksrc.h> | ||
32 | |||
33 | #include "common.h" | ||
34 | |||
35 | static unsigned long xtal; | ||
36 | |||
37 | static struct clksrc_clk clk_mout_apll = { | ||
38 | .clk = { | ||
39 | .name = "mout_apll", | ||
40 | }, | ||
41 | .sources = &clk_src_apll, | ||
42 | .reg_src = { .reg = S5P_CLK_SRC0, .shift = 0, .size = 1 }, | ||
43 | }; | ||
44 | |||
45 | static struct clksrc_clk clk_mout_epll = { | ||
46 | .clk = { | ||
47 | .name = "mout_epll", | ||
48 | }, | ||
49 | .sources = &clk_src_epll, | ||
50 | .reg_src = { .reg = S5P_CLK_SRC0, .shift = 8, .size = 1 }, | ||
51 | }; | ||
52 | |||
53 | static struct clksrc_clk clk_mout_mpll = { | ||
54 | .clk = { | ||
55 | .name = "mout_mpll", | ||
56 | }, | ||
57 | .sources = &clk_src_mpll, | ||
58 | .reg_src = { .reg = S5P_CLK_SRC0, .shift = 4, .size = 1 }, | ||
59 | }; | ||
60 | |||
61 | static struct clk *clkset_armclk_list[] = { | ||
62 | [0] = &clk_mout_apll.clk, | ||
63 | [1] = &clk_mout_mpll.clk, | ||
64 | }; | ||
65 | |||
66 | static struct clksrc_sources clkset_armclk = { | ||
67 | .sources = clkset_armclk_list, | ||
68 | .nr_sources = ARRAY_SIZE(clkset_armclk_list), | ||
69 | }; | ||
70 | |||
71 | static struct clksrc_clk clk_armclk = { | ||
72 | .clk = { | ||
73 | .name = "armclk", | ||
74 | }, | ||
75 | .sources = &clkset_armclk, | ||
76 | .reg_src = { .reg = S5P_CLK_SRC0, .shift = 16, .size = 1 }, | ||
77 | .reg_div = { .reg = S5P_CLK_DIV0, .shift = 0, .size = 3 }, | ||
78 | }; | ||
79 | |||
80 | static struct clksrc_clk clk_hclk_msys = { | ||
81 | .clk = { | ||
82 | .name = "hclk_msys", | ||
83 | .parent = &clk_armclk.clk, | ||
84 | }, | ||
85 | .reg_div = { .reg = S5P_CLK_DIV0, .shift = 8, .size = 3 }, | ||
86 | }; | ||
87 | |||
88 | static struct clksrc_clk clk_pclk_msys = { | ||
89 | .clk = { | ||
90 | .name = "pclk_msys", | ||
91 | .parent = &clk_hclk_msys.clk, | ||
92 | }, | ||
93 | .reg_div = { .reg = S5P_CLK_DIV0, .shift = 12, .size = 3 }, | ||
94 | }; | ||
95 | |||
96 | static struct clksrc_clk clk_sclk_a2m = { | ||
97 | .clk = { | ||
98 | .name = "sclk_a2m", | ||
99 | .parent = &clk_mout_apll.clk, | ||
100 | }, | ||
101 | .reg_div = { .reg = S5P_CLK_DIV0, .shift = 4, .size = 3 }, | ||
102 | }; | ||
103 | |||
104 | static struct clk *clkset_hclk_sys_list[] = { | ||
105 | [0] = &clk_mout_mpll.clk, | ||
106 | [1] = &clk_sclk_a2m.clk, | ||
107 | }; | ||
108 | |||
109 | static struct clksrc_sources clkset_hclk_sys = { | ||
110 | .sources = clkset_hclk_sys_list, | ||
111 | .nr_sources = ARRAY_SIZE(clkset_hclk_sys_list), | ||
112 | }; | ||
113 | |||
114 | static struct clksrc_clk clk_hclk_dsys = { | ||
115 | .clk = { | ||
116 | .name = "hclk_dsys", | ||
117 | }, | ||
118 | .sources = &clkset_hclk_sys, | ||
119 | .reg_src = { .reg = S5P_CLK_SRC0, .shift = 20, .size = 1 }, | ||
120 | .reg_div = { .reg = S5P_CLK_DIV0, .shift = 16, .size = 4 }, | ||
121 | }; | ||
122 | |||
123 | static struct clksrc_clk clk_pclk_dsys = { | ||
124 | .clk = { | ||
125 | .name = "pclk_dsys", | ||
126 | .parent = &clk_hclk_dsys.clk, | ||
127 | }, | ||
128 | .reg_div = { .reg = S5P_CLK_DIV0, .shift = 20, .size = 3 }, | ||
129 | }; | ||
130 | |||
131 | static struct clksrc_clk clk_hclk_psys = { | ||
132 | .clk = { | ||
133 | .name = "hclk_psys", | ||
134 | }, | ||
135 | .sources = &clkset_hclk_sys, | ||
136 | .reg_src = { .reg = S5P_CLK_SRC0, .shift = 24, .size = 1 }, | ||
137 | .reg_div = { .reg = S5P_CLK_DIV0, .shift = 24, .size = 4 }, | ||
138 | }; | ||
139 | |||
140 | static struct clksrc_clk clk_pclk_psys = { | ||
141 | .clk = { | ||
142 | .name = "pclk_psys", | ||
143 | .parent = &clk_hclk_psys.clk, | ||
144 | }, | ||
145 | .reg_div = { .reg = S5P_CLK_DIV0, .shift = 28, .size = 3 }, | ||
146 | }; | ||
147 | |||
148 | static int s5pv210_clk_ip0_ctrl(struct clk *clk, int enable) | ||
149 | { | ||
150 | return s5p_gatectrl(S5P_CLKGATE_IP0, clk, enable); | ||
151 | } | ||
152 | |||
153 | static int s5pv210_clk_ip1_ctrl(struct clk *clk, int enable) | ||
154 | { | ||
155 | return s5p_gatectrl(S5P_CLKGATE_IP1, clk, enable); | ||
156 | } | ||
157 | |||
158 | static int s5pv210_clk_ip2_ctrl(struct clk *clk, int enable) | ||
159 | { | ||
160 | return s5p_gatectrl(S5P_CLKGATE_IP2, clk, enable); | ||
161 | } | ||
162 | |||
163 | static int s5pv210_clk_ip3_ctrl(struct clk *clk, int enable) | ||
164 | { | ||
165 | return s5p_gatectrl(S5P_CLKGATE_IP3, clk, enable); | ||
166 | } | ||
167 | |||
168 | static int s5pv210_clk_mask0_ctrl(struct clk *clk, int enable) | ||
169 | { | ||
170 | return s5p_gatectrl(S5P_CLK_SRC_MASK0, clk, enable); | ||
171 | } | ||
172 | |||
173 | static int s5pv210_clk_mask1_ctrl(struct clk *clk, int enable) | ||
174 | { | ||
175 | return s5p_gatectrl(S5P_CLK_SRC_MASK1, clk, enable); | ||
176 | } | ||
177 | |||
178 | static int s5pv210_clk_hdmiphy_ctrl(struct clk *clk, int enable) | ||
179 | { | ||
180 | return s5p_gatectrl(S5P_HDMI_PHY_CONTROL, clk, enable); | ||
181 | } | ||
182 | |||
183 | static int exynos4_clk_dac_ctrl(struct clk *clk, int enable) | ||
184 | { | ||
185 | return s5p_gatectrl(S5P_DAC_PHY_CONTROL, clk, enable); | ||
186 | } | ||
187 | |||
188 | static struct clk clk_sclk_hdmi27m = { | ||
189 | .name = "sclk_hdmi27m", | ||
190 | .rate = 27000000, | ||
191 | }; | ||
192 | |||
193 | static struct clk clk_sclk_hdmiphy = { | ||
194 | .name = "sclk_hdmiphy", | ||
195 | }; | ||
196 | |||
197 | static struct clk clk_sclk_usbphy0 = { | ||
198 | .name = "sclk_usbphy0", | ||
199 | }; | ||
200 | |||
201 | static struct clk clk_sclk_usbphy1 = { | ||
202 | .name = "sclk_usbphy1", | ||
203 | }; | ||
204 | |||
205 | static struct clk clk_pcmcdclk0 = { | ||
206 | .name = "pcmcdclk", | ||
207 | }; | ||
208 | |||
209 | static struct clk clk_pcmcdclk1 = { | ||
210 | .name = "pcmcdclk", | ||
211 | }; | ||
212 | |||
213 | static struct clk clk_pcmcdclk2 = { | ||
214 | .name = "pcmcdclk", | ||
215 | }; | ||
216 | |||
217 | static struct clk *clkset_vpllsrc_list[] = { | ||
218 | [0] = &clk_fin_vpll, | ||
219 | [1] = &clk_sclk_hdmi27m, | ||
220 | }; | ||
221 | |||
222 | static struct clksrc_sources clkset_vpllsrc = { | ||
223 | .sources = clkset_vpllsrc_list, | ||
224 | .nr_sources = ARRAY_SIZE(clkset_vpllsrc_list), | ||
225 | }; | ||
226 | |||
227 | static struct clksrc_clk clk_vpllsrc = { | ||
228 | .clk = { | ||
229 | .name = "vpll_src", | ||
230 | .enable = s5pv210_clk_mask0_ctrl, | ||
231 | .ctrlbit = (1 << 7), | ||
232 | }, | ||
233 | .sources = &clkset_vpllsrc, | ||
234 | .reg_src = { .reg = S5P_CLK_SRC1, .shift = 28, .size = 1 }, | ||
235 | }; | ||
236 | |||
237 | static struct clk *clkset_sclk_vpll_list[] = { | ||
238 | [0] = &clk_vpllsrc.clk, | ||
239 | [1] = &clk_fout_vpll, | ||
240 | }; | ||
241 | |||
242 | static struct clksrc_sources clkset_sclk_vpll = { | ||
243 | .sources = clkset_sclk_vpll_list, | ||
244 | .nr_sources = ARRAY_SIZE(clkset_sclk_vpll_list), | ||
245 | }; | ||
246 | |||
247 | static struct clksrc_clk clk_sclk_vpll = { | ||
248 | .clk = { | ||
249 | .name = "sclk_vpll", | ||
250 | }, | ||
251 | .sources = &clkset_sclk_vpll, | ||
252 | .reg_src = { .reg = S5P_CLK_SRC0, .shift = 12, .size = 1 }, | ||
253 | }; | ||
254 | |||
255 | static struct clk *clkset_moutdmc0src_list[] = { | ||
256 | [0] = &clk_sclk_a2m.clk, | ||
257 | [1] = &clk_mout_mpll.clk, | ||
258 | [2] = NULL, | ||
259 | [3] = NULL, | ||
260 | }; | ||
261 | |||
262 | static struct clksrc_sources clkset_moutdmc0src = { | ||
263 | .sources = clkset_moutdmc0src_list, | ||
264 | .nr_sources = ARRAY_SIZE(clkset_moutdmc0src_list), | ||
265 | }; | ||
266 | |||
267 | static struct clksrc_clk clk_mout_dmc0 = { | ||
268 | .clk = { | ||
269 | .name = "mout_dmc0", | ||
270 | }, | ||
271 | .sources = &clkset_moutdmc0src, | ||
272 | .reg_src = { .reg = S5P_CLK_SRC6, .shift = 24, .size = 2 }, | ||
273 | }; | ||
274 | |||
275 | static struct clksrc_clk clk_sclk_dmc0 = { | ||
276 | .clk = { | ||
277 | .name = "sclk_dmc0", | ||
278 | .parent = &clk_mout_dmc0.clk, | ||
279 | }, | ||
280 | .reg_div = { .reg = S5P_CLK_DIV6, .shift = 28, .size = 4 }, | ||
281 | }; | ||
282 | |||
283 | static unsigned long s5pv210_clk_imem_get_rate(struct clk *clk) | ||
284 | { | ||
285 | return clk_get_rate(clk->parent) / 2; | ||
286 | } | ||
287 | |||
288 | static struct clk_ops clk_hclk_imem_ops = { | ||
289 | .get_rate = s5pv210_clk_imem_get_rate, | ||
290 | }; | ||
291 | |||
292 | static unsigned long s5pv210_clk_fout_apll_get_rate(struct clk *clk) | ||
293 | { | ||
294 | return s5p_get_pll45xx(xtal, __raw_readl(S5P_APLL_CON), pll_4508); | ||
295 | } | ||
296 | |||
297 | static struct clk_ops clk_fout_apll_ops = { | ||
298 | .get_rate = s5pv210_clk_fout_apll_get_rate, | ||
299 | }; | ||
300 | |||
301 | static struct clk init_clocks_off[] = { | ||
302 | { | ||
303 | .name = "rot", | ||
304 | .parent = &clk_hclk_dsys.clk, | ||
305 | .enable = s5pv210_clk_ip0_ctrl, | ||
306 | .ctrlbit = (1<<29), | ||
307 | }, { | ||
308 | .name = "fimc", | ||
309 | .devname = "s5pv210-fimc.0", | ||
310 | .parent = &clk_hclk_dsys.clk, | ||
311 | .enable = s5pv210_clk_ip0_ctrl, | ||
312 | .ctrlbit = (1 << 24), | ||
313 | }, { | ||
314 | .name = "fimc", | ||
315 | .devname = "s5pv210-fimc.1", | ||
316 | .parent = &clk_hclk_dsys.clk, | ||
317 | .enable = s5pv210_clk_ip0_ctrl, | ||
318 | .ctrlbit = (1 << 25), | ||
319 | }, { | ||
320 | .name = "fimc", | ||
321 | .devname = "s5pv210-fimc.2", | ||
322 | .parent = &clk_hclk_dsys.clk, | ||
323 | .enable = s5pv210_clk_ip0_ctrl, | ||
324 | .ctrlbit = (1 << 26), | ||
325 | }, { | ||
326 | .name = "jpeg", | ||
327 | .parent = &clk_hclk_dsys.clk, | ||
328 | .enable = s5pv210_clk_ip0_ctrl, | ||
329 | .ctrlbit = (1 << 28), | ||
330 | }, { | ||
331 | .name = "mfc", | ||
332 | .devname = "s5p-mfc", | ||
333 | .parent = &clk_pclk_psys.clk, | ||
334 | .enable = s5pv210_clk_ip0_ctrl, | ||
335 | .ctrlbit = (1 << 16), | ||
336 | }, { | ||
337 | .name = "dac", | ||
338 | .devname = "s5p-sdo", | ||
339 | .parent = &clk_hclk_dsys.clk, | ||
340 | .enable = s5pv210_clk_ip1_ctrl, | ||
341 | .ctrlbit = (1 << 10), | ||
342 | }, { | ||
343 | .name = "mixer", | ||
344 | .devname = "s5p-mixer", | ||
345 | .parent = &clk_hclk_dsys.clk, | ||
346 | .enable = s5pv210_clk_ip1_ctrl, | ||
347 | .ctrlbit = (1 << 9), | ||
348 | }, { | ||
349 | .name = "vp", | ||
350 | .devname = "s5p-mixer", | ||
351 | .parent = &clk_hclk_dsys.clk, | ||
352 | .enable = s5pv210_clk_ip1_ctrl, | ||
353 | .ctrlbit = (1 << 8), | ||
354 | }, { | ||
355 | .name = "hdmi", | ||
356 | .devname = "s5pv210-hdmi", | ||
357 | .parent = &clk_hclk_dsys.clk, | ||
358 | .enable = s5pv210_clk_ip1_ctrl, | ||
359 | .ctrlbit = (1 << 11), | ||
360 | }, { | ||
361 | .name = "hdmiphy", | ||
362 | .devname = "s5pv210-hdmi", | ||
363 | .enable = s5pv210_clk_hdmiphy_ctrl, | ||
364 | .ctrlbit = (1 << 0), | ||
365 | }, { | ||
366 | .name = "dacphy", | ||
367 | .devname = "s5p-sdo", | ||
368 | .enable = exynos4_clk_dac_ctrl, | ||
369 | .ctrlbit = (1 << 0), | ||
370 | }, { | ||
371 | .name = "otg", | ||
372 | .parent = &clk_hclk_psys.clk, | ||
373 | .enable = s5pv210_clk_ip1_ctrl, | ||
374 | .ctrlbit = (1<<16), | ||
375 | }, { | ||
376 | .name = "usb-host", | ||
377 | .parent = &clk_hclk_psys.clk, | ||
378 | .enable = s5pv210_clk_ip1_ctrl, | ||
379 | .ctrlbit = (1<<17), | ||
380 | }, { | ||
381 | .name = "lcd", | ||
382 | .parent = &clk_hclk_dsys.clk, | ||
383 | .enable = s5pv210_clk_ip1_ctrl, | ||
384 | .ctrlbit = (1<<0), | ||
385 | }, { | ||
386 | .name = "cfcon", | ||
387 | .parent = &clk_hclk_psys.clk, | ||
388 | .enable = s5pv210_clk_ip1_ctrl, | ||
389 | .ctrlbit = (1<<25), | ||
390 | }, { | ||
391 | .name = "systimer", | ||
392 | .parent = &clk_pclk_psys.clk, | ||
393 | .enable = s5pv210_clk_ip3_ctrl, | ||
394 | .ctrlbit = (1<<16), | ||
395 | }, { | ||
396 | .name = "watchdog", | ||
397 | .parent = &clk_pclk_psys.clk, | ||
398 | .enable = s5pv210_clk_ip3_ctrl, | ||
399 | .ctrlbit = (1<<22), | ||
400 | }, { | ||
401 | .name = "rtc", | ||
402 | .parent = &clk_pclk_psys.clk, | ||
403 | .enable = s5pv210_clk_ip3_ctrl, | ||
404 | .ctrlbit = (1<<15), | ||
405 | }, { | ||
406 | .name = "i2c", | ||
407 | .devname = "s3c2440-i2c.0", | ||
408 | .parent = &clk_pclk_psys.clk, | ||
409 | .enable = s5pv210_clk_ip3_ctrl, | ||
410 | .ctrlbit = (1<<7), | ||
411 | }, { | ||
412 | .name = "i2c", | ||
413 | .devname = "s3c2440-i2c.1", | ||
414 | .parent = &clk_pclk_psys.clk, | ||
415 | .enable = s5pv210_clk_ip3_ctrl, | ||
416 | .ctrlbit = (1 << 10), | ||
417 | }, { | ||
418 | .name = "i2c", | ||
419 | .devname = "s3c2440-i2c.2", | ||
420 | .parent = &clk_pclk_psys.clk, | ||
421 | .enable = s5pv210_clk_ip3_ctrl, | ||
422 | .ctrlbit = (1<<9), | ||
423 | }, { | ||
424 | .name = "i2c", | ||
425 | .devname = "s3c2440-hdmiphy-i2c", | ||
426 | .parent = &clk_pclk_psys.clk, | ||
427 | .enable = s5pv210_clk_ip3_ctrl, | ||
428 | .ctrlbit = (1 << 11), | ||
429 | }, { | ||
430 | .name = "spi", | ||
431 | .devname = "s5pv210-spi.0", | ||
432 | .parent = &clk_pclk_psys.clk, | ||
433 | .enable = s5pv210_clk_ip3_ctrl, | ||
434 | .ctrlbit = (1<<12), | ||
435 | }, { | ||
436 | .name = "spi", | ||
437 | .devname = "s5pv210-spi.1", | ||
438 | .parent = &clk_pclk_psys.clk, | ||
439 | .enable = s5pv210_clk_ip3_ctrl, | ||
440 | .ctrlbit = (1<<13), | ||
441 | }, { | ||
442 | .name = "spi", | ||
443 | .devname = "s5pv210-spi.2", | ||
444 | .parent = &clk_pclk_psys.clk, | ||
445 | .enable = s5pv210_clk_ip3_ctrl, | ||
446 | .ctrlbit = (1<<14), | ||
447 | }, { | ||
448 | .name = "timers", | ||
449 | .parent = &clk_pclk_psys.clk, | ||
450 | .enable = s5pv210_clk_ip3_ctrl, | ||
451 | .ctrlbit = (1<<23), | ||
452 | }, { | ||
453 | .name = "adc", | ||
454 | .parent = &clk_pclk_psys.clk, | ||
455 | .enable = s5pv210_clk_ip3_ctrl, | ||
456 | .ctrlbit = (1<<24), | ||
457 | }, { | ||
458 | .name = "keypad", | ||
459 | .parent = &clk_pclk_psys.clk, | ||
460 | .enable = s5pv210_clk_ip3_ctrl, | ||
461 | .ctrlbit = (1<<21), | ||
462 | }, { | ||
463 | .name = "iis", | ||
464 | .devname = "samsung-i2s.0", | ||
465 | .parent = &clk_p, | ||
466 | .enable = s5pv210_clk_ip3_ctrl, | ||
467 | .ctrlbit = (1<<4), | ||
468 | }, { | ||
469 | .name = "iis", | ||
470 | .devname = "samsung-i2s.1", | ||
471 | .parent = &clk_p, | ||
472 | .enable = s5pv210_clk_ip3_ctrl, | ||
473 | .ctrlbit = (1 << 5), | ||
474 | }, { | ||
475 | .name = "iis", | ||
476 | .devname = "samsung-i2s.2", | ||
477 | .parent = &clk_p, | ||
478 | .enable = s5pv210_clk_ip3_ctrl, | ||
479 | .ctrlbit = (1 << 6), | ||
480 | }, { | ||
481 | .name = "spdif", | ||
482 | .parent = &clk_p, | ||
483 | .enable = s5pv210_clk_ip3_ctrl, | ||
484 | .ctrlbit = (1 << 0), | ||
485 | }, | ||
486 | }; | ||
487 | |||
488 | static struct clk init_clocks[] = { | ||
489 | { | ||
490 | .name = "hclk_imem", | ||
491 | .parent = &clk_hclk_msys.clk, | ||
492 | .ctrlbit = (1 << 5), | ||
493 | .enable = s5pv210_clk_ip0_ctrl, | ||
494 | .ops = &clk_hclk_imem_ops, | ||
495 | }, { | ||
496 | .name = "uart", | ||
497 | .devname = "s5pv210-uart.0", | ||
498 | .parent = &clk_pclk_psys.clk, | ||
499 | .enable = s5pv210_clk_ip3_ctrl, | ||
500 | .ctrlbit = (1 << 17), | ||
501 | }, { | ||
502 | .name = "uart", | ||
503 | .devname = "s5pv210-uart.1", | ||
504 | .parent = &clk_pclk_psys.clk, | ||
505 | .enable = s5pv210_clk_ip3_ctrl, | ||
506 | .ctrlbit = (1 << 18), | ||
507 | }, { | ||
508 | .name = "uart", | ||
509 | .devname = "s5pv210-uart.2", | ||
510 | .parent = &clk_pclk_psys.clk, | ||
511 | .enable = s5pv210_clk_ip3_ctrl, | ||
512 | .ctrlbit = (1 << 19), | ||
513 | }, { | ||
514 | .name = "uart", | ||
515 | .devname = "s5pv210-uart.3", | ||
516 | .parent = &clk_pclk_psys.clk, | ||
517 | .enable = s5pv210_clk_ip3_ctrl, | ||
518 | .ctrlbit = (1 << 20), | ||
519 | }, { | ||
520 | .name = "sromc", | ||
521 | .parent = &clk_hclk_psys.clk, | ||
522 | .enable = s5pv210_clk_ip1_ctrl, | ||
523 | .ctrlbit = (1 << 26), | ||
524 | }, | ||
525 | }; | ||
526 | |||
527 | static struct clk clk_hsmmc0 = { | ||
528 | .name = "hsmmc", | ||
529 | .devname = "s3c-sdhci.0", | ||
530 | .parent = &clk_hclk_psys.clk, | ||
531 | .enable = s5pv210_clk_ip2_ctrl, | ||
532 | .ctrlbit = (1<<16), | ||
533 | }; | ||
534 | |||
535 | static struct clk clk_hsmmc1 = { | ||
536 | .name = "hsmmc", | ||
537 | .devname = "s3c-sdhci.1", | ||
538 | .parent = &clk_hclk_psys.clk, | ||
539 | .enable = s5pv210_clk_ip2_ctrl, | ||
540 | .ctrlbit = (1<<17), | ||
541 | }; | ||
542 | |||
543 | static struct clk clk_hsmmc2 = { | ||
544 | .name = "hsmmc", | ||
545 | .devname = "s3c-sdhci.2", | ||
546 | .parent = &clk_hclk_psys.clk, | ||
547 | .enable = s5pv210_clk_ip2_ctrl, | ||
548 | .ctrlbit = (1<<18), | ||
549 | }; | ||
550 | |||
551 | static struct clk clk_hsmmc3 = { | ||
552 | .name = "hsmmc", | ||
553 | .devname = "s3c-sdhci.3", | ||
554 | .parent = &clk_hclk_psys.clk, | ||
555 | .enable = s5pv210_clk_ip2_ctrl, | ||
556 | .ctrlbit = (1<<19), | ||
557 | }; | ||
558 | |||
559 | static struct clk clk_pdma0 = { | ||
560 | .name = "pdma0", | ||
561 | .parent = &clk_hclk_psys.clk, | ||
562 | .enable = s5pv210_clk_ip0_ctrl, | ||
563 | .ctrlbit = (1 << 3), | ||
564 | }; | ||
565 | |||
566 | static struct clk clk_pdma1 = { | ||
567 | .name = "pdma1", | ||
568 | .parent = &clk_hclk_psys.clk, | ||
569 | .enable = s5pv210_clk_ip0_ctrl, | ||
570 | .ctrlbit = (1 << 4), | ||
571 | }; | ||
572 | |||
573 | static struct clk *clkset_uart_list[] = { | ||
574 | [6] = &clk_mout_mpll.clk, | ||
575 | [7] = &clk_mout_epll.clk, | ||
576 | }; | ||
577 | |||
578 | static struct clksrc_sources clkset_uart = { | ||
579 | .sources = clkset_uart_list, | ||
580 | .nr_sources = ARRAY_SIZE(clkset_uart_list), | ||
581 | }; | ||
582 | |||
583 | static struct clk *clkset_group1_list[] = { | ||
584 | [0] = &clk_sclk_a2m.clk, | ||
585 | [1] = &clk_mout_mpll.clk, | ||
586 | [2] = &clk_mout_epll.clk, | ||
587 | [3] = &clk_sclk_vpll.clk, | ||
588 | }; | ||
589 | |||
590 | static struct clksrc_sources clkset_group1 = { | ||
591 | .sources = clkset_group1_list, | ||
592 | .nr_sources = ARRAY_SIZE(clkset_group1_list), | ||
593 | }; | ||
594 | |||
595 | static struct clk *clkset_sclk_onenand_list[] = { | ||
596 | [0] = &clk_hclk_psys.clk, | ||
597 | [1] = &clk_hclk_dsys.clk, | ||
598 | }; | ||
599 | |||
600 | static struct clksrc_sources clkset_sclk_onenand = { | ||
601 | .sources = clkset_sclk_onenand_list, | ||
602 | .nr_sources = ARRAY_SIZE(clkset_sclk_onenand_list), | ||
603 | }; | ||
604 | |||
605 | static struct clk *clkset_sclk_dac_list[] = { | ||
606 | [0] = &clk_sclk_vpll.clk, | ||
607 | [1] = &clk_sclk_hdmiphy, | ||
608 | }; | ||
609 | |||
610 | static struct clksrc_sources clkset_sclk_dac = { | ||
611 | .sources = clkset_sclk_dac_list, | ||
612 | .nr_sources = ARRAY_SIZE(clkset_sclk_dac_list), | ||
613 | }; | ||
614 | |||
615 | static struct clksrc_clk clk_sclk_dac = { | ||
616 | .clk = { | ||
617 | .name = "sclk_dac", | ||
618 | .enable = s5pv210_clk_mask0_ctrl, | ||
619 | .ctrlbit = (1 << 2), | ||
620 | }, | ||
621 | .sources = &clkset_sclk_dac, | ||
622 | .reg_src = { .reg = S5P_CLK_SRC1, .shift = 8, .size = 1 }, | ||
623 | }; | ||
624 | |||
625 | static struct clksrc_clk clk_sclk_pixel = { | ||
626 | .clk = { | ||
627 | .name = "sclk_pixel", | ||
628 | .parent = &clk_sclk_vpll.clk, | ||
629 | }, | ||
630 | .reg_div = { .reg = S5P_CLK_DIV1, .shift = 0, .size = 4}, | ||
631 | }; | ||
632 | |||
633 | static struct clk *clkset_sclk_hdmi_list[] = { | ||
634 | [0] = &clk_sclk_pixel.clk, | ||
635 | [1] = &clk_sclk_hdmiphy, | ||
636 | }; | ||
637 | |||
638 | static struct clksrc_sources clkset_sclk_hdmi = { | ||
639 | .sources = clkset_sclk_hdmi_list, | ||
640 | .nr_sources = ARRAY_SIZE(clkset_sclk_hdmi_list), | ||
641 | }; | ||
642 | |||
643 | static struct clksrc_clk clk_sclk_hdmi = { | ||
644 | .clk = { | ||
645 | .name = "sclk_hdmi", | ||
646 | .enable = s5pv210_clk_mask0_ctrl, | ||
647 | .ctrlbit = (1 << 0), | ||
648 | }, | ||
649 | .sources = &clkset_sclk_hdmi, | ||
650 | .reg_src = { .reg = S5P_CLK_SRC1, .shift = 0, .size = 1 }, | ||
651 | }; | ||
652 | |||
653 | static struct clk *clkset_sclk_mixer_list[] = { | ||
654 | [0] = &clk_sclk_dac.clk, | ||
655 | [1] = &clk_sclk_hdmi.clk, | ||
656 | }; | ||
657 | |||
658 | static struct clksrc_sources clkset_sclk_mixer = { | ||
659 | .sources = clkset_sclk_mixer_list, | ||
660 | .nr_sources = ARRAY_SIZE(clkset_sclk_mixer_list), | ||
661 | }; | ||
662 | |||
663 | static struct clksrc_clk clk_sclk_mixer = { | ||
664 | .clk = { | ||
665 | .name = "sclk_mixer", | ||
666 | .enable = s5pv210_clk_mask0_ctrl, | ||
667 | .ctrlbit = (1 << 1), | ||
668 | }, | ||
669 | .sources = &clkset_sclk_mixer, | ||
670 | .reg_src = { .reg = S5P_CLK_SRC1, .shift = 4, .size = 1 }, | ||
671 | }; | ||
672 | |||
673 | static struct clksrc_clk *sclk_tv[] = { | ||
674 | &clk_sclk_dac, | ||
675 | &clk_sclk_pixel, | ||
676 | &clk_sclk_hdmi, | ||
677 | &clk_sclk_mixer, | ||
678 | }; | ||
679 | |||
680 | static struct clk *clkset_sclk_audio0_list[] = { | ||
681 | [0] = &clk_ext_xtal_mux, | ||
682 | [1] = &clk_pcmcdclk0, | ||
683 | [2] = &clk_sclk_hdmi27m, | ||
684 | [3] = &clk_sclk_usbphy0, | ||
685 | [4] = &clk_sclk_usbphy1, | ||
686 | [5] = &clk_sclk_hdmiphy, | ||
687 | [6] = &clk_mout_mpll.clk, | ||
688 | [7] = &clk_mout_epll.clk, | ||
689 | [8] = &clk_sclk_vpll.clk, | ||
690 | }; | ||
691 | |||
692 | static struct clksrc_sources clkset_sclk_audio0 = { | ||
693 | .sources = clkset_sclk_audio0_list, | ||
694 | .nr_sources = ARRAY_SIZE(clkset_sclk_audio0_list), | ||
695 | }; | ||
696 | |||
697 | static struct clksrc_clk clk_sclk_audio0 = { | ||
698 | .clk = { | ||
699 | .name = "sclk_audio", | ||
700 | .devname = "soc-audio.0", | ||
701 | .enable = s5pv210_clk_mask0_ctrl, | ||
702 | .ctrlbit = (1 << 24), | ||
703 | }, | ||
704 | .sources = &clkset_sclk_audio0, | ||
705 | .reg_src = { .reg = S5P_CLK_SRC6, .shift = 0, .size = 4 }, | ||
706 | .reg_div = { .reg = S5P_CLK_DIV6, .shift = 0, .size = 4 }, | ||
707 | }; | ||
708 | |||
709 | static struct clk *clkset_sclk_audio1_list[] = { | ||
710 | [0] = &clk_ext_xtal_mux, | ||
711 | [1] = &clk_pcmcdclk1, | ||
712 | [2] = &clk_sclk_hdmi27m, | ||
713 | [3] = &clk_sclk_usbphy0, | ||
714 | [4] = &clk_sclk_usbphy1, | ||
715 | [5] = &clk_sclk_hdmiphy, | ||
716 | [6] = &clk_mout_mpll.clk, | ||
717 | [7] = &clk_mout_epll.clk, | ||
718 | [8] = &clk_sclk_vpll.clk, | ||
719 | }; | ||
720 | |||
721 | static struct clksrc_sources clkset_sclk_audio1 = { | ||
722 | .sources = clkset_sclk_audio1_list, | ||
723 | .nr_sources = ARRAY_SIZE(clkset_sclk_audio1_list), | ||
724 | }; | ||
725 | |||
726 | static struct clksrc_clk clk_sclk_audio1 = { | ||
727 | .clk = { | ||
728 | .name = "sclk_audio", | ||
729 | .devname = "soc-audio.1", | ||
730 | .enable = s5pv210_clk_mask0_ctrl, | ||
731 | .ctrlbit = (1 << 25), | ||
732 | }, | ||
733 | .sources = &clkset_sclk_audio1, | ||
734 | .reg_src = { .reg = S5P_CLK_SRC6, .shift = 4, .size = 4 }, | ||
735 | .reg_div = { .reg = S5P_CLK_DIV6, .shift = 4, .size = 4 }, | ||
736 | }; | ||
737 | |||
738 | static struct clk *clkset_sclk_audio2_list[] = { | ||
739 | [0] = &clk_ext_xtal_mux, | ||
740 | [1] = &clk_pcmcdclk0, | ||
741 | [2] = &clk_sclk_hdmi27m, | ||
742 | [3] = &clk_sclk_usbphy0, | ||
743 | [4] = &clk_sclk_usbphy1, | ||
744 | [5] = &clk_sclk_hdmiphy, | ||
745 | [6] = &clk_mout_mpll.clk, | ||
746 | [7] = &clk_mout_epll.clk, | ||
747 | [8] = &clk_sclk_vpll.clk, | ||
748 | }; | ||
749 | |||
750 | static struct clksrc_sources clkset_sclk_audio2 = { | ||
751 | .sources = clkset_sclk_audio2_list, | ||
752 | .nr_sources = ARRAY_SIZE(clkset_sclk_audio2_list), | ||
753 | }; | ||
754 | |||
755 | static struct clksrc_clk clk_sclk_audio2 = { | ||
756 | .clk = { | ||
757 | .name = "sclk_audio", | ||
758 | .devname = "soc-audio.2", | ||
759 | .enable = s5pv210_clk_mask0_ctrl, | ||
760 | .ctrlbit = (1 << 26), | ||
761 | }, | ||
762 | .sources = &clkset_sclk_audio2, | ||
763 | .reg_src = { .reg = S5P_CLK_SRC6, .shift = 8, .size = 4 }, | ||
764 | .reg_div = { .reg = S5P_CLK_DIV6, .shift = 8, .size = 4 }, | ||
765 | }; | ||
766 | |||
767 | static struct clk *clkset_sclk_spdif_list[] = { | ||
768 | [0] = &clk_sclk_audio0.clk, | ||
769 | [1] = &clk_sclk_audio1.clk, | ||
770 | [2] = &clk_sclk_audio2.clk, | ||
771 | }; | ||
772 | |||
773 | static struct clksrc_sources clkset_sclk_spdif = { | ||
774 | .sources = clkset_sclk_spdif_list, | ||
775 | .nr_sources = ARRAY_SIZE(clkset_sclk_spdif_list), | ||
776 | }; | ||
777 | |||
778 | static struct clksrc_clk clk_sclk_spdif = { | ||
779 | .clk = { | ||
780 | .name = "sclk_spdif", | ||
781 | .enable = s5pv210_clk_mask0_ctrl, | ||
782 | .ctrlbit = (1 << 27), | ||
783 | .ops = &s5p_sclk_spdif_ops, | ||
784 | }, | ||
785 | .sources = &clkset_sclk_spdif, | ||
786 | .reg_src = { .reg = S5P_CLK_SRC6, .shift = 12, .size = 2 }, | ||
787 | }; | ||
788 | |||
789 | static struct clk *clkset_group2_list[] = { | ||
790 | [0] = &clk_ext_xtal_mux, | ||
791 | [1] = &clk_xusbxti, | ||
792 | [2] = &clk_sclk_hdmi27m, | ||
793 | [3] = &clk_sclk_usbphy0, | ||
794 | [4] = &clk_sclk_usbphy1, | ||
795 | [5] = &clk_sclk_hdmiphy, | ||
796 | [6] = &clk_mout_mpll.clk, | ||
797 | [7] = &clk_mout_epll.clk, | ||
798 | [8] = &clk_sclk_vpll.clk, | ||
799 | }; | ||
800 | |||
801 | static struct clksrc_sources clkset_group2 = { | ||
802 | .sources = clkset_group2_list, | ||
803 | .nr_sources = ARRAY_SIZE(clkset_group2_list), | ||
804 | }; | ||
805 | |||
806 | static struct clksrc_clk clksrcs[] = { | ||
807 | { | ||
808 | .clk = { | ||
809 | .name = "sclk_dmc", | ||
810 | }, | ||
811 | .sources = &clkset_group1, | ||
812 | .reg_src = { .reg = S5P_CLK_SRC6, .shift = 24, .size = 2 }, | ||
813 | .reg_div = { .reg = S5P_CLK_DIV6, .shift = 28, .size = 4 }, | ||
814 | }, { | ||
815 | .clk = { | ||
816 | .name = "sclk_onenand", | ||
817 | }, | ||
818 | .sources = &clkset_sclk_onenand, | ||
819 | .reg_src = { .reg = S5P_CLK_SRC0, .shift = 28, .size = 1 }, | ||
820 | .reg_div = { .reg = S5P_CLK_DIV6, .shift = 12, .size = 3 }, | ||
821 | }, { | ||
822 | .clk = { | ||
823 | .name = "sclk_fimc", | ||
824 | .devname = "s5pv210-fimc.0", | ||
825 | .enable = s5pv210_clk_mask1_ctrl, | ||
826 | .ctrlbit = (1 << 2), | ||
827 | }, | ||
828 | .sources = &clkset_group2, | ||
829 | .reg_src = { .reg = S5P_CLK_SRC3, .shift = 12, .size = 4 }, | ||
830 | .reg_div = { .reg = S5P_CLK_DIV3, .shift = 12, .size = 4 }, | ||
831 | }, { | ||
832 | .clk = { | ||
833 | .name = "sclk_fimc", | ||
834 | .devname = "s5pv210-fimc.1", | ||
835 | .enable = s5pv210_clk_mask1_ctrl, | ||
836 | .ctrlbit = (1 << 3), | ||
837 | }, | ||
838 | .sources = &clkset_group2, | ||
839 | .reg_src = { .reg = S5P_CLK_SRC3, .shift = 16, .size = 4 }, | ||
840 | .reg_div = { .reg = S5P_CLK_DIV3, .shift = 16, .size = 4 }, | ||
841 | }, { | ||
842 | .clk = { | ||
843 | .name = "sclk_fimc", | ||
844 | .devname = "s5pv210-fimc.2", | ||
845 | .enable = s5pv210_clk_mask1_ctrl, | ||
846 | .ctrlbit = (1 << 4), | ||
847 | }, | ||
848 | .sources = &clkset_group2, | ||
849 | .reg_src = { .reg = S5P_CLK_SRC3, .shift = 20, .size = 4 }, | ||
850 | .reg_div = { .reg = S5P_CLK_DIV3, .shift = 20, .size = 4 }, | ||
851 | }, { | ||
852 | .clk = { | ||
853 | .name = "sclk_cam0", | ||
854 | .enable = s5pv210_clk_mask0_ctrl, | ||
855 | .ctrlbit = (1 << 3), | ||
856 | }, | ||
857 | .sources = &clkset_group2, | ||
858 | .reg_src = { .reg = S5P_CLK_SRC1, .shift = 12, .size = 4 }, | ||
859 | .reg_div = { .reg = S5P_CLK_DIV1, .shift = 12, .size = 4 }, | ||
860 | }, { | ||
861 | .clk = { | ||
862 | .name = "sclk_cam1", | ||
863 | .enable = s5pv210_clk_mask0_ctrl, | ||
864 | .ctrlbit = (1 << 4), | ||
865 | }, | ||
866 | .sources = &clkset_group2, | ||
867 | .reg_src = { .reg = S5P_CLK_SRC1, .shift = 16, .size = 4 }, | ||
868 | .reg_div = { .reg = S5P_CLK_DIV1, .shift = 16, .size = 4 }, | ||
869 | }, { | ||
870 | .clk = { | ||
871 | .name = "sclk_fimd", | ||
872 | .enable = s5pv210_clk_mask0_ctrl, | ||
873 | .ctrlbit = (1 << 5), | ||
874 | }, | ||
875 | .sources = &clkset_group2, | ||
876 | .reg_src = { .reg = S5P_CLK_SRC1, .shift = 20, .size = 4 }, | ||
877 | .reg_div = { .reg = S5P_CLK_DIV1, .shift = 20, .size = 4 }, | ||
878 | }, { | ||
879 | .clk = { | ||
880 | .name = "sclk_mfc", | ||
881 | .devname = "s5p-mfc", | ||
882 | .enable = s5pv210_clk_ip0_ctrl, | ||
883 | .ctrlbit = (1 << 16), | ||
884 | }, | ||
885 | .sources = &clkset_group1, | ||
886 | .reg_src = { .reg = S5P_CLK_SRC2, .shift = 4, .size = 2 }, | ||
887 | .reg_div = { .reg = S5P_CLK_DIV2, .shift = 4, .size = 4 }, | ||
888 | }, { | ||
889 | .clk = { | ||
890 | .name = "sclk_g2d", | ||
891 | .enable = s5pv210_clk_ip0_ctrl, | ||
892 | .ctrlbit = (1 << 12), | ||
893 | }, | ||
894 | .sources = &clkset_group1, | ||
895 | .reg_src = { .reg = S5P_CLK_SRC2, .shift = 8, .size = 2 }, | ||
896 | .reg_div = { .reg = S5P_CLK_DIV2, .shift = 8, .size = 4 }, | ||
897 | }, { | ||
898 | .clk = { | ||
899 | .name = "sclk_g3d", | ||
900 | .enable = s5pv210_clk_ip0_ctrl, | ||
901 | .ctrlbit = (1 << 8), | ||
902 | }, | ||
903 | .sources = &clkset_group1, | ||
904 | .reg_src = { .reg = S5P_CLK_SRC2, .shift = 0, .size = 2 }, | ||
905 | .reg_div = { .reg = S5P_CLK_DIV2, .shift = 0, .size = 4 }, | ||
906 | }, { | ||
907 | .clk = { | ||
908 | .name = "sclk_csis", | ||
909 | .enable = s5pv210_clk_mask0_ctrl, | ||
910 | .ctrlbit = (1 << 6), | ||
911 | }, | ||
912 | .sources = &clkset_group2, | ||
913 | .reg_src = { .reg = S5P_CLK_SRC1, .shift = 24, .size = 4 }, | ||
914 | .reg_div = { .reg = S5P_CLK_DIV1, .shift = 28, .size = 4 }, | ||
915 | }, { | ||
916 | .clk = { | ||
917 | .name = "sclk_pwi", | ||
918 | .enable = s5pv210_clk_mask0_ctrl, | ||
919 | .ctrlbit = (1 << 29), | ||
920 | }, | ||
921 | .sources = &clkset_group2, | ||
922 | .reg_src = { .reg = S5P_CLK_SRC6, .shift = 20, .size = 4 }, | ||
923 | .reg_div = { .reg = S5P_CLK_DIV6, .shift = 24, .size = 4 }, | ||
924 | }, { | ||
925 | .clk = { | ||
926 | .name = "sclk_pwm", | ||
927 | .enable = s5pv210_clk_mask0_ctrl, | ||
928 | .ctrlbit = (1 << 19), | ||
929 | }, | ||
930 | .sources = &clkset_group2, | ||
931 | .reg_src = { .reg = S5P_CLK_SRC5, .shift = 12, .size = 4 }, | ||
932 | .reg_div = { .reg = S5P_CLK_DIV5, .shift = 12, .size = 4 }, | ||
933 | }, | ||
934 | }; | ||
935 | |||
936 | static struct clksrc_clk clk_sclk_uart0 = { | ||
937 | .clk = { | ||
938 | .name = "uclk1", | ||
939 | .devname = "s5pv210-uart.0", | ||
940 | .enable = s5pv210_clk_mask0_ctrl, | ||
941 | .ctrlbit = (1 << 12), | ||
942 | }, | ||
943 | .sources = &clkset_uart, | ||
944 | .reg_src = { .reg = S5P_CLK_SRC4, .shift = 16, .size = 4 }, | ||
945 | .reg_div = { .reg = S5P_CLK_DIV4, .shift = 16, .size = 4 }, | ||
946 | }; | ||
947 | |||
948 | static struct clksrc_clk clk_sclk_uart1 = { | ||
949 | .clk = { | ||
950 | .name = "uclk1", | ||
951 | .devname = "s5pv210-uart.1", | ||
952 | .enable = s5pv210_clk_mask0_ctrl, | ||
953 | .ctrlbit = (1 << 13), | ||
954 | }, | ||
955 | .sources = &clkset_uart, | ||
956 | .reg_src = { .reg = S5P_CLK_SRC4, .shift = 20, .size = 4 }, | ||
957 | .reg_div = { .reg = S5P_CLK_DIV4, .shift = 20, .size = 4 }, | ||
958 | }; | ||
959 | |||
960 | static struct clksrc_clk clk_sclk_uart2 = { | ||
961 | .clk = { | ||
962 | .name = "uclk1", | ||
963 | .devname = "s5pv210-uart.2", | ||
964 | .enable = s5pv210_clk_mask0_ctrl, | ||
965 | .ctrlbit = (1 << 14), | ||
966 | }, | ||
967 | .sources = &clkset_uart, | ||
968 | .reg_src = { .reg = S5P_CLK_SRC4, .shift = 24, .size = 4 }, | ||
969 | .reg_div = { .reg = S5P_CLK_DIV4, .shift = 24, .size = 4 }, | ||
970 | }; | ||
971 | |||
972 | static struct clksrc_clk clk_sclk_uart3 = { | ||
973 | .clk = { | ||
974 | .name = "uclk1", | ||
975 | .devname = "s5pv210-uart.3", | ||
976 | .enable = s5pv210_clk_mask0_ctrl, | ||
977 | .ctrlbit = (1 << 15), | ||
978 | }, | ||
979 | .sources = &clkset_uart, | ||
980 | .reg_src = { .reg = S5P_CLK_SRC4, .shift = 28, .size = 4 }, | ||
981 | .reg_div = { .reg = S5P_CLK_DIV4, .shift = 28, .size = 4 }, | ||
982 | }; | ||
983 | |||
984 | static struct clksrc_clk clk_sclk_mmc0 = { | ||
985 | .clk = { | ||
986 | .name = "sclk_mmc", | ||
987 | .devname = "s3c-sdhci.0", | ||
988 | .enable = s5pv210_clk_mask0_ctrl, | ||
989 | .ctrlbit = (1 << 8), | ||
990 | }, | ||
991 | .sources = &clkset_group2, | ||
992 | .reg_src = { .reg = S5P_CLK_SRC4, .shift = 0, .size = 4 }, | ||
993 | .reg_div = { .reg = S5P_CLK_DIV4, .shift = 0, .size = 4 }, | ||
994 | }; | ||
995 | |||
996 | static struct clksrc_clk clk_sclk_mmc1 = { | ||
997 | .clk = { | ||
998 | .name = "sclk_mmc", | ||
999 | .devname = "s3c-sdhci.1", | ||
1000 | .enable = s5pv210_clk_mask0_ctrl, | ||
1001 | .ctrlbit = (1 << 9), | ||
1002 | }, | ||
1003 | .sources = &clkset_group2, | ||
1004 | .reg_src = { .reg = S5P_CLK_SRC4, .shift = 4, .size = 4 }, | ||
1005 | .reg_div = { .reg = S5P_CLK_DIV4, .shift = 4, .size = 4 }, | ||
1006 | }; | ||
1007 | |||
1008 | static struct clksrc_clk clk_sclk_mmc2 = { | ||
1009 | .clk = { | ||
1010 | .name = "sclk_mmc", | ||
1011 | .devname = "s3c-sdhci.2", | ||
1012 | .enable = s5pv210_clk_mask0_ctrl, | ||
1013 | .ctrlbit = (1 << 10), | ||
1014 | }, | ||
1015 | .sources = &clkset_group2, | ||
1016 | .reg_src = { .reg = S5P_CLK_SRC4, .shift = 8, .size = 4 }, | ||
1017 | .reg_div = { .reg = S5P_CLK_DIV4, .shift = 8, .size = 4 }, | ||
1018 | }; | ||
1019 | |||
1020 | static struct clksrc_clk clk_sclk_mmc3 = { | ||
1021 | .clk = { | ||
1022 | .name = "sclk_mmc", | ||
1023 | .devname = "s3c-sdhci.3", | ||
1024 | .enable = s5pv210_clk_mask0_ctrl, | ||
1025 | .ctrlbit = (1 << 11), | ||
1026 | }, | ||
1027 | .sources = &clkset_group2, | ||
1028 | .reg_src = { .reg = S5P_CLK_SRC4, .shift = 12, .size = 4 }, | ||
1029 | .reg_div = { .reg = S5P_CLK_DIV4, .shift = 12, .size = 4 }, | ||
1030 | }; | ||
1031 | |||
1032 | static struct clksrc_clk clk_sclk_spi0 = { | ||
1033 | .clk = { | ||
1034 | .name = "sclk_spi", | ||
1035 | .devname = "s5pv210-spi.0", | ||
1036 | .enable = s5pv210_clk_mask0_ctrl, | ||
1037 | .ctrlbit = (1 << 16), | ||
1038 | }, | ||
1039 | .sources = &clkset_group2, | ||
1040 | .reg_src = { .reg = S5P_CLK_SRC5, .shift = 0, .size = 4 }, | ||
1041 | .reg_div = { .reg = S5P_CLK_DIV5, .shift = 0, .size = 4 }, | ||
1042 | }; | ||
1043 | |||
1044 | static struct clksrc_clk clk_sclk_spi1 = { | ||
1045 | .clk = { | ||
1046 | .name = "sclk_spi", | ||
1047 | .devname = "s5pv210-spi.1", | ||
1048 | .enable = s5pv210_clk_mask0_ctrl, | ||
1049 | .ctrlbit = (1 << 17), | ||
1050 | }, | ||
1051 | .sources = &clkset_group2, | ||
1052 | .reg_src = { .reg = S5P_CLK_SRC5, .shift = 4, .size = 4 }, | ||
1053 | .reg_div = { .reg = S5P_CLK_DIV5, .shift = 4, .size = 4 }, | ||
1054 | }; | ||
1055 | |||
1056 | |||
1057 | static struct clksrc_clk *clksrc_cdev[] = { | ||
1058 | &clk_sclk_uart0, | ||
1059 | &clk_sclk_uart1, | ||
1060 | &clk_sclk_uart2, | ||
1061 | &clk_sclk_uart3, | ||
1062 | &clk_sclk_mmc0, | ||
1063 | &clk_sclk_mmc1, | ||
1064 | &clk_sclk_mmc2, | ||
1065 | &clk_sclk_mmc3, | ||
1066 | &clk_sclk_spi0, | ||
1067 | &clk_sclk_spi1, | ||
1068 | }; | ||
1069 | |||
1070 | static struct clk *clk_cdev[] = { | ||
1071 | &clk_hsmmc0, | ||
1072 | &clk_hsmmc1, | ||
1073 | &clk_hsmmc2, | ||
1074 | &clk_hsmmc3, | ||
1075 | &clk_pdma0, | ||
1076 | &clk_pdma1, | ||
1077 | }; | ||
1078 | |||
1079 | /* Clock initialisation code */ | ||
1080 | static struct clksrc_clk *sysclks[] = { | ||
1081 | &clk_mout_apll, | ||
1082 | &clk_mout_epll, | ||
1083 | &clk_mout_mpll, | ||
1084 | &clk_armclk, | ||
1085 | &clk_hclk_msys, | ||
1086 | &clk_sclk_a2m, | ||
1087 | &clk_hclk_dsys, | ||
1088 | &clk_hclk_psys, | ||
1089 | &clk_pclk_msys, | ||
1090 | &clk_pclk_dsys, | ||
1091 | &clk_pclk_psys, | ||
1092 | &clk_vpllsrc, | ||
1093 | &clk_sclk_vpll, | ||
1094 | &clk_mout_dmc0, | ||
1095 | &clk_sclk_dmc0, | ||
1096 | &clk_sclk_audio0, | ||
1097 | &clk_sclk_audio1, | ||
1098 | &clk_sclk_audio2, | ||
1099 | &clk_sclk_spdif, | ||
1100 | }; | ||
1101 | |||
1102 | static u32 epll_div[][6] = { | ||
1103 | { 48000000, 0, 48, 3, 3, 0 }, | ||
1104 | { 96000000, 0, 48, 3, 2, 0 }, | ||
1105 | { 144000000, 1, 72, 3, 2, 0 }, | ||
1106 | { 192000000, 0, 48, 3, 1, 0 }, | ||
1107 | { 288000000, 1, 72, 3, 1, 0 }, | ||
1108 | { 32750000, 1, 65, 3, 4, 35127 }, | ||
1109 | { 32768000, 1, 65, 3, 4, 35127 }, | ||
1110 | { 45158400, 0, 45, 3, 3, 10355 }, | ||
1111 | { 45000000, 0, 45, 3, 3, 10355 }, | ||
1112 | { 45158000, 0, 45, 3, 3, 10355 }, | ||
1113 | { 49125000, 0, 49, 3, 3, 9961 }, | ||
1114 | { 49152000, 0, 49, 3, 3, 9961 }, | ||
1115 | { 67737600, 1, 67, 3, 3, 48366 }, | ||
1116 | { 67738000, 1, 67, 3, 3, 48366 }, | ||
1117 | { 73800000, 1, 73, 3, 3, 47710 }, | ||
1118 | { 73728000, 1, 73, 3, 3, 47710 }, | ||
1119 | { 36000000, 1, 32, 3, 4, 0 }, | ||
1120 | { 60000000, 1, 60, 3, 3, 0 }, | ||
1121 | { 72000000, 1, 72, 3, 3, 0 }, | ||
1122 | { 80000000, 1, 80, 3, 3, 0 }, | ||
1123 | { 84000000, 0, 42, 3, 2, 0 }, | ||
1124 | { 50000000, 0, 50, 3, 3, 0 }, | ||
1125 | }; | ||
1126 | |||
1127 | static int s5pv210_epll_set_rate(struct clk *clk, unsigned long rate) | ||
1128 | { | ||
1129 | unsigned int epll_con, epll_con_k; | ||
1130 | unsigned int i; | ||
1131 | |||
1132 | /* Return if nothing changed */ | ||
1133 | if (clk->rate == rate) | ||
1134 | return 0; | ||
1135 | |||
1136 | epll_con = __raw_readl(S5P_EPLL_CON); | ||
1137 | epll_con_k = __raw_readl(S5P_EPLL_CON1); | ||
1138 | |||
1139 | epll_con_k &= ~PLL46XX_KDIV_MASK; | ||
1140 | epll_con &= ~(1 << 27 | | ||
1141 | PLL46XX_MDIV_MASK << PLL46XX_MDIV_SHIFT | | ||
1142 | PLL46XX_PDIV_MASK << PLL46XX_PDIV_SHIFT | | ||
1143 | PLL46XX_SDIV_MASK << PLL46XX_SDIV_SHIFT); | ||
1144 | |||
1145 | for (i = 0; i < ARRAY_SIZE(epll_div); i++) { | ||
1146 | if (epll_div[i][0] == rate) { | ||
1147 | epll_con_k |= epll_div[i][5] << 0; | ||
1148 | epll_con |= (epll_div[i][1] << 27 | | ||
1149 | epll_div[i][2] << PLL46XX_MDIV_SHIFT | | ||
1150 | epll_div[i][3] << PLL46XX_PDIV_SHIFT | | ||
1151 | epll_div[i][4] << PLL46XX_SDIV_SHIFT); | ||
1152 | break; | ||
1153 | } | ||
1154 | } | ||
1155 | |||
1156 | if (i == ARRAY_SIZE(epll_div)) { | ||
1157 | printk(KERN_ERR "%s: Invalid Clock EPLL Frequency\n", | ||
1158 | __func__); | ||
1159 | return -EINVAL; | ||
1160 | } | ||
1161 | |||
1162 | __raw_writel(epll_con, S5P_EPLL_CON); | ||
1163 | __raw_writel(epll_con_k, S5P_EPLL_CON1); | ||
1164 | |||
1165 | printk(KERN_WARNING "EPLL Rate changes from %lu to %lu\n", | ||
1166 | clk->rate, rate); | ||
1167 | |||
1168 | clk->rate = rate; | ||
1169 | |||
1170 | return 0; | ||
1171 | } | ||
1172 | |||
1173 | static struct clk_ops s5pv210_epll_ops = { | ||
1174 | .set_rate = s5pv210_epll_set_rate, | ||
1175 | .get_rate = s5p_epll_get_rate, | ||
1176 | }; | ||
1177 | |||
1178 | static u32 vpll_div[][5] = { | ||
1179 | { 54000000, 3, 53, 3, 0 }, | ||
1180 | { 108000000, 3, 53, 2, 0 }, | ||
1181 | }; | ||
1182 | |||
1183 | static unsigned long s5pv210_vpll_get_rate(struct clk *clk) | ||
1184 | { | ||
1185 | return clk->rate; | ||
1186 | } | ||
1187 | |||
1188 | static int s5pv210_vpll_set_rate(struct clk *clk, unsigned long rate) | ||
1189 | { | ||
1190 | unsigned int vpll_con; | ||
1191 | unsigned int i; | ||
1192 | |||
1193 | /* Return if nothing changed */ | ||
1194 | if (clk->rate == rate) | ||
1195 | return 0; | ||
1196 | |||
1197 | vpll_con = __raw_readl(S5P_VPLL_CON); | ||
1198 | vpll_con &= ~(0x1 << 27 | \ | ||
1199 | PLL90XX_MDIV_MASK << PLL90XX_MDIV_SHIFT | \ | ||
1200 | PLL90XX_PDIV_MASK << PLL90XX_PDIV_SHIFT | \ | ||
1201 | PLL90XX_SDIV_MASK << PLL90XX_SDIV_SHIFT); | ||
1202 | |||
1203 | for (i = 0; i < ARRAY_SIZE(vpll_div); i++) { | ||
1204 | if (vpll_div[i][0] == rate) { | ||
1205 | vpll_con |= vpll_div[i][1] << PLL90XX_PDIV_SHIFT; | ||
1206 | vpll_con |= vpll_div[i][2] << PLL90XX_MDIV_SHIFT; | ||
1207 | vpll_con |= vpll_div[i][3] << PLL90XX_SDIV_SHIFT; | ||
1208 | vpll_con |= vpll_div[i][4] << 27; | ||
1209 | break; | ||
1210 | } | ||
1211 | } | ||
1212 | |||
1213 | if (i == ARRAY_SIZE(vpll_div)) { | ||
1214 | printk(KERN_ERR "%s: Invalid Clock VPLL Frequency\n", | ||
1215 | __func__); | ||
1216 | return -EINVAL; | ||
1217 | } | ||
1218 | |||
1219 | __raw_writel(vpll_con, S5P_VPLL_CON); | ||
1220 | |||
1221 | /* Wait for VPLL lock */ | ||
1222 | while (!(__raw_readl(S5P_VPLL_CON) & (1 << PLL90XX_LOCKED_SHIFT))) | ||
1223 | continue; | ||
1224 | |||
1225 | clk->rate = rate; | ||
1226 | return 0; | ||
1227 | } | ||
1228 | static struct clk_ops s5pv210_vpll_ops = { | ||
1229 | .get_rate = s5pv210_vpll_get_rate, | ||
1230 | .set_rate = s5pv210_vpll_set_rate, | ||
1231 | }; | ||
1232 | |||
1233 | void __init_or_cpufreq s5pv210_setup_clocks(void) | ||
1234 | { | ||
1235 | struct clk *xtal_clk; | ||
1236 | unsigned long vpllsrc; | ||
1237 | unsigned long armclk; | ||
1238 | unsigned long hclk_msys; | ||
1239 | unsigned long hclk_dsys; | ||
1240 | unsigned long hclk_psys; | ||
1241 | unsigned long pclk_msys; | ||
1242 | unsigned long pclk_dsys; | ||
1243 | unsigned long pclk_psys; | ||
1244 | unsigned long apll; | ||
1245 | unsigned long mpll; | ||
1246 | unsigned long epll; | ||
1247 | unsigned long vpll; | ||
1248 | unsigned int ptr; | ||
1249 | u32 clkdiv0, clkdiv1; | ||
1250 | |||
1251 | /* Set functions for clk_fout_epll */ | ||
1252 | clk_fout_epll.enable = s5p_epll_enable; | ||
1253 | clk_fout_epll.ops = &s5pv210_epll_ops; | ||
1254 | |||
1255 | printk(KERN_DEBUG "%s: registering clocks\n", __func__); | ||
1256 | |||
1257 | clkdiv0 = __raw_readl(S5P_CLK_DIV0); | ||
1258 | clkdiv1 = __raw_readl(S5P_CLK_DIV1); | ||
1259 | |||
1260 | printk(KERN_DEBUG "%s: clkdiv0 = %08x, clkdiv1 = %08x\n", | ||
1261 | __func__, clkdiv0, clkdiv1); | ||
1262 | |||
1263 | xtal_clk = clk_get(NULL, "xtal"); | ||
1264 | BUG_ON(IS_ERR(xtal_clk)); | ||
1265 | |||
1266 | xtal = clk_get_rate(xtal_clk); | ||
1267 | clk_put(xtal_clk); | ||
1268 | |||
1269 | printk(KERN_DEBUG "%s: xtal is %ld\n", __func__, xtal); | ||
1270 | |||
1271 | apll = s5p_get_pll45xx(xtal, __raw_readl(S5P_APLL_CON), pll_4508); | ||
1272 | mpll = s5p_get_pll45xx(xtal, __raw_readl(S5P_MPLL_CON), pll_4502); | ||
1273 | epll = s5p_get_pll46xx(xtal, __raw_readl(S5P_EPLL_CON), | ||
1274 | __raw_readl(S5P_EPLL_CON1), pll_4600); | ||
1275 | vpllsrc = clk_get_rate(&clk_vpllsrc.clk); | ||
1276 | vpll = s5p_get_pll45xx(vpllsrc, __raw_readl(S5P_VPLL_CON), pll_4502); | ||
1277 | |||
1278 | clk_fout_apll.ops = &clk_fout_apll_ops; | ||
1279 | clk_fout_mpll.rate = mpll; | ||
1280 | clk_fout_epll.rate = epll; | ||
1281 | clk_fout_vpll.ops = &s5pv210_vpll_ops; | ||
1282 | clk_fout_vpll.rate = vpll; | ||
1283 | |||
1284 | printk(KERN_INFO "S5PV210: PLL settings, A=%ld, M=%ld, E=%ld V=%ld", | ||
1285 | apll, mpll, epll, vpll); | ||
1286 | |||
1287 | armclk = clk_get_rate(&clk_armclk.clk); | ||
1288 | hclk_msys = clk_get_rate(&clk_hclk_msys.clk); | ||
1289 | hclk_dsys = clk_get_rate(&clk_hclk_dsys.clk); | ||
1290 | hclk_psys = clk_get_rate(&clk_hclk_psys.clk); | ||
1291 | pclk_msys = clk_get_rate(&clk_pclk_msys.clk); | ||
1292 | pclk_dsys = clk_get_rate(&clk_pclk_dsys.clk); | ||
1293 | pclk_psys = clk_get_rate(&clk_pclk_psys.clk); | ||
1294 | |||
1295 | printk(KERN_INFO "S5PV210: ARMCLK=%ld, HCLKM=%ld, HCLKD=%ld\n" | ||
1296 | "HCLKP=%ld, PCLKM=%ld, PCLKD=%ld, PCLKP=%ld\n", | ||
1297 | armclk, hclk_msys, hclk_dsys, hclk_psys, | ||
1298 | pclk_msys, pclk_dsys, pclk_psys); | ||
1299 | |||
1300 | clk_f.rate = armclk; | ||
1301 | clk_h.rate = hclk_psys; | ||
1302 | clk_p.rate = pclk_psys; | ||
1303 | |||
1304 | for (ptr = 0; ptr < ARRAY_SIZE(clksrcs); ptr++) | ||
1305 | s3c_set_clksrc(&clksrcs[ptr], true); | ||
1306 | } | ||
1307 | |||
1308 | static struct clk *clks[] __initdata = { | ||
1309 | &clk_sclk_hdmi27m, | ||
1310 | &clk_sclk_hdmiphy, | ||
1311 | &clk_sclk_usbphy0, | ||
1312 | &clk_sclk_usbphy1, | ||
1313 | &clk_pcmcdclk0, | ||
1314 | &clk_pcmcdclk1, | ||
1315 | &clk_pcmcdclk2, | ||
1316 | }; | ||
1317 | |||
1318 | static struct clk_lookup s5pv210_clk_lookup[] = { | ||
1319 | CLKDEV_INIT(NULL, "clk_uart_baud0", &clk_p), | ||
1320 | CLKDEV_INIT("s5pv210-uart.0", "clk_uart_baud1", &clk_sclk_uart0.clk), | ||
1321 | CLKDEV_INIT("s5pv210-uart.1", "clk_uart_baud1", &clk_sclk_uart1.clk), | ||
1322 | CLKDEV_INIT("s5pv210-uart.2", "clk_uart_baud1", &clk_sclk_uart2.clk), | ||
1323 | CLKDEV_INIT("s5pv210-uart.3", "clk_uart_baud1", &clk_sclk_uart3.clk), | ||
1324 | CLKDEV_INIT("s3c-sdhci.0", "mmc_busclk.0", &clk_hsmmc0), | ||
1325 | CLKDEV_INIT("s3c-sdhci.1", "mmc_busclk.0", &clk_hsmmc1), | ||
1326 | CLKDEV_INIT("s3c-sdhci.2", "mmc_busclk.0", &clk_hsmmc2), | ||
1327 | CLKDEV_INIT("s3c-sdhci.3", "mmc_busclk.0", &clk_hsmmc3), | ||
1328 | CLKDEV_INIT("s3c-sdhci.0", "mmc_busclk.2", &clk_sclk_mmc0.clk), | ||
1329 | CLKDEV_INIT("s3c-sdhci.1", "mmc_busclk.2", &clk_sclk_mmc1.clk), | ||
1330 | CLKDEV_INIT("s3c-sdhci.2", "mmc_busclk.2", &clk_sclk_mmc2.clk), | ||
1331 | CLKDEV_INIT("s3c-sdhci.3", "mmc_busclk.2", &clk_sclk_mmc3.clk), | ||
1332 | CLKDEV_INIT(NULL, "spi_busclk0", &clk_p), | ||
1333 | CLKDEV_INIT("s5pv210-spi.0", "spi_busclk1", &clk_sclk_spi0.clk), | ||
1334 | CLKDEV_INIT("s5pv210-spi.1", "spi_busclk1", &clk_sclk_spi1.clk), | ||
1335 | CLKDEV_INIT("dma-pl330.0", "apb_pclk", &clk_pdma0), | ||
1336 | CLKDEV_INIT("dma-pl330.1", "apb_pclk", &clk_pdma1), | ||
1337 | }; | ||
1338 | |||
1339 | void __init s5pv210_register_clocks(void) | ||
1340 | { | ||
1341 | int ptr; | ||
1342 | |||
1343 | s3c24xx_register_clocks(clks, ARRAY_SIZE(clks)); | ||
1344 | |||
1345 | for (ptr = 0; ptr < ARRAY_SIZE(sysclks); ptr++) | ||
1346 | s3c_register_clksrc(sysclks[ptr], 1); | ||
1347 | |||
1348 | for (ptr = 0; ptr < ARRAY_SIZE(sclk_tv); ptr++) | ||
1349 | s3c_register_clksrc(sclk_tv[ptr], 1); | ||
1350 | |||
1351 | for (ptr = 0; ptr < ARRAY_SIZE(clksrc_cdev); ptr++) | ||
1352 | s3c_register_clksrc(clksrc_cdev[ptr], 1); | ||
1353 | |||
1354 | s3c_register_clksrc(clksrcs, ARRAY_SIZE(clksrcs)); | ||
1355 | s3c_register_clocks(init_clocks, ARRAY_SIZE(init_clocks)); | ||
1356 | |||
1357 | s3c_register_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off)); | ||
1358 | s3c_disable_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off)); | ||
1359 | clkdev_add_table(s5pv210_clk_lookup, ARRAY_SIZE(s5pv210_clk_lookup)); | ||
1360 | |||
1361 | s3c24xx_register_clocks(clk_cdev, ARRAY_SIZE(clk_cdev)); | ||
1362 | for (ptr = 0; ptr < ARRAY_SIZE(clk_cdev); ptr++) | ||
1363 | s3c_disable_clocks(clk_cdev[ptr], 1); | ||
1364 | |||
1365 | } | ||
diff --git a/arch/arm/mach-s5pv210/common.c b/arch/arm/mach-s5pv210/common.c deleted file mode 100644 index 7024dcd0e40a..000000000000 --- a/arch/arm/mach-s5pv210/common.c +++ /dev/null | |||
@@ -1,279 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2009-2011 Samsung Electronics Co., Ltd. | ||
3 | * http://www.samsung.com | ||
4 | * | ||
5 | * Common Codes for S5PV210 | ||
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 | |||
12 | #include <linux/kernel.h> | ||
13 | #include <linux/types.h> | ||
14 | #include <linux/interrupt.h> | ||
15 | #include <linux/list.h> | ||
16 | #include <linux/timer.h> | ||
17 | #include <linux/init.h> | ||
18 | #include <linux/module.h> | ||
19 | #include <linux/clk.h> | ||
20 | #include <linux/io.h> | ||
21 | #include <linux/device.h> | ||
22 | #include <clocksource/samsung_pwm.h> | ||
23 | #include <linux/platform_device.h> | ||
24 | #include <linux/sched.h> | ||
25 | #include <linux/dma-mapping.h> | ||
26 | #include <linux/serial_core.h> | ||
27 | #include <linux/serial_s3c.h> | ||
28 | |||
29 | #include <asm/proc-fns.h> | ||
30 | #include <asm/mach/arch.h> | ||
31 | #include <asm/mach/map.h> | ||
32 | #include <asm/mach/irq.h> | ||
33 | |||
34 | #include <mach/map.h> | ||
35 | #include <mach/regs-clock.h> | ||
36 | |||
37 | #include <plat/cpu.h> | ||
38 | #include <plat/clock.h> | ||
39 | #include <plat/devs.h> | ||
40 | #include <plat/sdhci.h> | ||
41 | #include <plat/adc-core.h> | ||
42 | #include <plat/ata-core.h> | ||
43 | #include <plat/fb-core.h> | ||
44 | #include <plat/fimc-core.h> | ||
45 | #include <plat/iic-core.h> | ||
46 | #include <plat/keypad-core.h> | ||
47 | #include <plat/pwm-core.h> | ||
48 | #include <plat/tv-core.h> | ||
49 | #include <plat/spi-core.h> | ||
50 | |||
51 | #include "common.h" | ||
52 | |||
53 | static const char name_s5pv210[] = "S5PV210/S5PC110"; | ||
54 | |||
55 | static struct cpu_table cpu_ids[] __initdata = { | ||
56 | { | ||
57 | .idcode = S5PV210_CPU_ID, | ||
58 | .idmask = S5PV210_CPU_MASK, | ||
59 | .map_io = s5pv210_map_io, | ||
60 | .init_clocks = s5pv210_init_clocks, | ||
61 | .init_uarts = s5pv210_init_uarts, | ||
62 | .init = s5pv210_init, | ||
63 | .name = name_s5pv210, | ||
64 | }, | ||
65 | }; | ||
66 | |||
67 | /* Initial IO mappings */ | ||
68 | |||
69 | static struct map_desc s5pv210_iodesc[] __initdata = { | ||
70 | { | ||
71 | .virtual = (unsigned long)S5P_VA_CHIPID, | ||
72 | .pfn = __phys_to_pfn(S5PV210_PA_CHIPID), | ||
73 | .length = SZ_4K, | ||
74 | .type = MT_DEVICE, | ||
75 | }, { | ||
76 | .virtual = (unsigned long)S3C_VA_SYS, | ||
77 | .pfn = __phys_to_pfn(S5PV210_PA_SYSCON), | ||
78 | .length = SZ_64K, | ||
79 | .type = MT_DEVICE, | ||
80 | }, { | ||
81 | .virtual = (unsigned long)S3C_VA_TIMER, | ||
82 | .pfn = __phys_to_pfn(S5PV210_PA_TIMER), | ||
83 | .length = SZ_16K, | ||
84 | .type = MT_DEVICE, | ||
85 | }, { | ||
86 | .virtual = (unsigned long)S3C_VA_WATCHDOG, | ||
87 | .pfn = __phys_to_pfn(S5PV210_PA_WATCHDOG), | ||
88 | .length = SZ_4K, | ||
89 | .type = MT_DEVICE, | ||
90 | }, { | ||
91 | .virtual = (unsigned long)S5P_VA_SROMC, | ||
92 | .pfn = __phys_to_pfn(S5PV210_PA_SROMC), | ||
93 | .length = SZ_4K, | ||
94 | .type = MT_DEVICE, | ||
95 | }, { | ||
96 | .virtual = (unsigned long)S5P_VA_SYSTIMER, | ||
97 | .pfn = __phys_to_pfn(S5PV210_PA_SYSTIMER), | ||
98 | .length = SZ_4K, | ||
99 | .type = MT_DEVICE, | ||
100 | }, { | ||
101 | .virtual = (unsigned long)S5P_VA_GPIO, | ||
102 | .pfn = __phys_to_pfn(S5PV210_PA_GPIO), | ||
103 | .length = SZ_4K, | ||
104 | .type = MT_DEVICE, | ||
105 | }, { | ||
106 | .virtual = (unsigned long)VA_VIC0, | ||
107 | .pfn = __phys_to_pfn(S5PV210_PA_VIC0), | ||
108 | .length = SZ_16K, | ||
109 | .type = MT_DEVICE, | ||
110 | }, { | ||
111 | .virtual = (unsigned long)VA_VIC1, | ||
112 | .pfn = __phys_to_pfn(S5PV210_PA_VIC1), | ||
113 | .length = SZ_16K, | ||
114 | .type = MT_DEVICE, | ||
115 | }, { | ||
116 | .virtual = (unsigned long)VA_VIC2, | ||
117 | .pfn = __phys_to_pfn(S5PV210_PA_VIC2), | ||
118 | .length = SZ_16K, | ||
119 | .type = MT_DEVICE, | ||
120 | }, { | ||
121 | .virtual = (unsigned long)VA_VIC3, | ||
122 | .pfn = __phys_to_pfn(S5PV210_PA_VIC3), | ||
123 | .length = SZ_16K, | ||
124 | .type = MT_DEVICE, | ||
125 | }, { | ||
126 | .virtual = (unsigned long)S3C_VA_UART, | ||
127 | .pfn = __phys_to_pfn(S3C_PA_UART), | ||
128 | .length = SZ_512K, | ||
129 | .type = MT_DEVICE, | ||
130 | }, { | ||
131 | .virtual = (unsigned long)S5P_VA_DMC0, | ||
132 | .pfn = __phys_to_pfn(S5PV210_PA_DMC0), | ||
133 | .length = SZ_4K, | ||
134 | .type = MT_DEVICE, | ||
135 | }, { | ||
136 | .virtual = (unsigned long)S5P_VA_DMC1, | ||
137 | .pfn = __phys_to_pfn(S5PV210_PA_DMC1), | ||
138 | .length = SZ_4K, | ||
139 | .type = MT_DEVICE, | ||
140 | }, { | ||
141 | .virtual = (unsigned long)S3C_VA_USB_HSPHY, | ||
142 | .pfn =__phys_to_pfn(S5PV210_PA_HSPHY), | ||
143 | .length = SZ_4K, | ||
144 | .type = MT_DEVICE, | ||
145 | } | ||
146 | }; | ||
147 | |||
148 | void s5pv210_restart(enum reboot_mode mode, const char *cmd) | ||
149 | { | ||
150 | __raw_writel(0x1, S5P_SWRESET); | ||
151 | } | ||
152 | |||
153 | static struct samsung_pwm_variant s5pv210_pwm_variant = { | ||
154 | .bits = 32, | ||
155 | .div_base = 0, | ||
156 | .has_tint_cstat = true, | ||
157 | .tclk_mask = (1 << 5), | ||
158 | }; | ||
159 | |||
160 | void __init samsung_set_timer_source(unsigned int event, unsigned int source) | ||
161 | { | ||
162 | s5pv210_pwm_variant.output_mask = BIT(SAMSUNG_PWM_NUM) - 1; | ||
163 | s5pv210_pwm_variant.output_mask &= ~(BIT(event) | BIT(source)); | ||
164 | } | ||
165 | |||
166 | void __init samsung_timer_init(void) | ||
167 | { | ||
168 | unsigned int timer_irqs[SAMSUNG_PWM_NUM] = { | ||
169 | IRQ_TIMER0_VIC, IRQ_TIMER1_VIC, IRQ_TIMER2_VIC, | ||
170 | IRQ_TIMER3_VIC, IRQ_TIMER4_VIC, | ||
171 | }; | ||
172 | |||
173 | samsung_pwm_clocksource_init(S3C_VA_TIMER, | ||
174 | timer_irqs, &s5pv210_pwm_variant); | ||
175 | } | ||
176 | |||
177 | /* | ||
178 | * s5pv210_map_io | ||
179 | * | ||
180 | * register the standard cpu IO areas | ||
181 | */ | ||
182 | |||
183 | void __init s5pv210_init_io(struct map_desc *mach_desc, int size) | ||
184 | { | ||
185 | /* initialize the io descriptors we need for initialization */ | ||
186 | iotable_init(s5pv210_iodesc, ARRAY_SIZE(s5pv210_iodesc)); | ||
187 | if (mach_desc) | ||
188 | iotable_init(mach_desc, size); | ||
189 | |||
190 | /* detect cpu id and rev. */ | ||
191 | s5p_init_cpu(S5P_VA_CHIPID); | ||
192 | |||
193 | s3c_init_cpu(samsung_cpu_id, cpu_ids, ARRAY_SIZE(cpu_ids)); | ||
194 | |||
195 | samsung_pwm_set_platdata(&s5pv210_pwm_variant); | ||
196 | } | ||
197 | |||
198 | void __init s5pv210_map_io(void) | ||
199 | { | ||
200 | /* initialise device information early */ | ||
201 | s5pv210_default_sdhci0(); | ||
202 | s5pv210_default_sdhci1(); | ||
203 | s5pv210_default_sdhci2(); | ||
204 | s5pv210_default_sdhci3(); | ||
205 | |||
206 | s3c_adc_setname("samsung-adc-v3"); | ||
207 | |||
208 | s3c_cfcon_setname("s5pv210-pata"); | ||
209 | |||
210 | s3c_fimc_setname(0, "s5pv210-fimc"); | ||
211 | s3c_fimc_setname(1, "s5pv210-fimc"); | ||
212 | s3c_fimc_setname(2, "s5pv210-fimc"); | ||
213 | |||
214 | /* the i2c devices are directly compatible with s3c2440 */ | ||
215 | s3c_i2c0_setname("s3c2440-i2c"); | ||
216 | s3c_i2c1_setname("s3c2440-i2c"); | ||
217 | s3c_i2c2_setname("s3c2440-i2c"); | ||
218 | |||
219 | s3c_fb_setname("s5pv210-fb"); | ||
220 | |||
221 | /* Use s5pv210-keypad instead of samsung-keypad */ | ||
222 | samsung_keypad_setname("s5pv210-keypad"); | ||
223 | |||
224 | /* setup TV devices */ | ||
225 | s5p_hdmi_setname("s5pv210-hdmi"); | ||
226 | |||
227 | s3c64xx_spi_setname("s5pv210-spi"); | ||
228 | } | ||
229 | |||
230 | void __init s5pv210_init_clocks(int xtal) | ||
231 | { | ||
232 | printk(KERN_DEBUG "%s: initializing clocks\n", __func__); | ||
233 | |||
234 | s3c24xx_register_baseclocks(xtal); | ||
235 | s5p_register_clocks(xtal); | ||
236 | s5pv210_register_clocks(); | ||
237 | s5pv210_setup_clocks(); | ||
238 | } | ||
239 | |||
240 | void __init s5pv210_init_irq(void) | ||
241 | { | ||
242 | u32 vic[4]; /* S5PV210 supports 4 VIC */ | ||
243 | |||
244 | /* All the VICs are fully populated. */ | ||
245 | vic[0] = ~0; | ||
246 | vic[1] = ~0; | ||
247 | vic[2] = ~0; | ||
248 | vic[3] = ~0; | ||
249 | |||
250 | s5p_init_irq(vic, ARRAY_SIZE(vic)); | ||
251 | } | ||
252 | |||
253 | struct bus_type s5pv210_subsys = { | ||
254 | .name = "s5pv210-core", | ||
255 | .dev_name = "s5pv210-core", | ||
256 | }; | ||
257 | |||
258 | static struct device s5pv210_dev = { | ||
259 | .bus = &s5pv210_subsys, | ||
260 | }; | ||
261 | |||
262 | static int __init s5pv210_core_init(void) | ||
263 | { | ||
264 | return subsys_system_register(&s5pv210_subsys, NULL); | ||
265 | } | ||
266 | core_initcall(s5pv210_core_init); | ||
267 | |||
268 | int __init s5pv210_init(void) | ||
269 | { | ||
270 | printk(KERN_INFO "S5PV210: Initializing architecture\n"); | ||
271 | return device_register(&s5pv210_dev); | ||
272 | } | ||
273 | |||
274 | /* uart registration process */ | ||
275 | |||
276 | void __init s5pv210_init_uarts(struct s3c2410_uartcfg *cfg, int no) | ||
277 | { | ||
278 | s3c24xx_init_uartdevs("s5pv210-uart", s5p_uart_resources, cfg, no); | ||
279 | } | ||
diff --git a/arch/arm/mach-s5pv210/common.h b/arch/arm/mach-s5pv210/common.h index fe1beb54e548..2ad387c1ecf0 100644 --- a/arch/arm/mach-s5pv210/common.h +++ b/arch/arm/mach-s5pv210/common.h | |||
@@ -12,19 +12,12 @@ | |||
12 | #ifndef __ARCH_ARM_MACH_S5PV210_COMMON_H | 12 | #ifndef __ARCH_ARM_MACH_S5PV210_COMMON_H |
13 | #define __ARCH_ARM_MACH_S5PV210_COMMON_H | 13 | #define __ARCH_ARM_MACH_S5PV210_COMMON_H |
14 | 14 | ||
15 | #include <linux/reboot.h> | 15 | #ifdef CONFIG_PM_SLEEP |
16 | 16 | u32 exynos_get_eint_wake_mask(void); | |
17 | void s5pv210_init_io(struct map_desc *mach_desc, int size); | 17 | void s5pv210_cpu_resume(void); |
18 | void s5pv210_init_irq(void); | 18 | void s5pv210_pm_init(void); |
19 | 19 | #else | |
20 | void s5pv210_register_clocks(void); | 20 | static inline void s5pv210_pm_init(void) {} |
21 | void s5pv210_setup_clocks(void); | 21 | #endif |
22 | |||
23 | void s5pv210_restart(enum reboot_mode mode, const char *cmd); | ||
24 | |||
25 | extern int s5pv210_init(void); | ||
26 | extern void s5pv210_map_io(void); | ||
27 | extern void s5pv210_init_clocks(int xtal); | ||
28 | extern void s5pv210_init_uarts(struct s3c2410_uartcfg *cfg, int no); | ||
29 | 22 | ||
30 | #endif /* __ARCH_ARM_MACH_S5PV210_COMMON_H */ | 23 | #endif /* __ARCH_ARM_MACH_S5PV210_COMMON_H */ |
diff --git a/arch/arm/mach-s5pv210/dev-audio.c b/arch/arm/mach-s5pv210/dev-audio.c deleted file mode 100644 index 90356ad10c54..000000000000 --- a/arch/arm/mach-s5pv210/dev-audio.c +++ /dev/null | |||
@@ -1,246 +0,0 @@ | |||
1 | /* linux/arch/arm/mach-s5pv210/dev-audio.c | ||
2 | * | ||
3 | * Copyright (c) 2010 Samsung Electronics Co. Ltd | ||
4 | * Jaswinder Singh <jassi.brar@samsung.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/dma-mapping.h> | ||
13 | |||
14 | #include <plat/gpio-cfg.h> | ||
15 | #include <linux/platform_data/asoc-s3c.h> | ||
16 | |||
17 | #include <mach/map.h> | ||
18 | #include <mach/dma.h> | ||
19 | #include <mach/irqs.h> | ||
20 | #include <mach/gpio-samsung.h> | ||
21 | |||
22 | #define S5PV210_AUDSS_INT_MEM (0xC0000000) | ||
23 | |||
24 | static int s5pv210_cfg_i2s(struct platform_device *pdev) | ||
25 | { | ||
26 | /* configure GPIO for i2s port */ | ||
27 | switch (pdev->id) { | ||
28 | case 0: | ||
29 | s3c_gpio_cfgpin_range(S5PV210_GPI(0), 7, S3C_GPIO_SFN(2)); | ||
30 | break; | ||
31 | case 1: | ||
32 | s3c_gpio_cfgpin_range(S5PV210_GPC0(0), 5, S3C_GPIO_SFN(2)); | ||
33 | break; | ||
34 | case 2: | ||
35 | s3c_gpio_cfgpin_range(S5PV210_GPC1(0), 5, S3C_GPIO_SFN(4)); | ||
36 | break; | ||
37 | default: | ||
38 | printk(KERN_ERR "Invalid Device %d\n", pdev->id); | ||
39 | return -EINVAL; | ||
40 | } | ||
41 | |||
42 | return 0; | ||
43 | } | ||
44 | |||
45 | static struct s3c_audio_pdata i2sv5_pdata = { | ||
46 | .cfg_gpio = s5pv210_cfg_i2s, | ||
47 | .type = { | ||
48 | .i2s = { | ||
49 | .quirks = QUIRK_PRI_6CHAN | QUIRK_SEC_DAI | ||
50 | | QUIRK_NEED_RSTCLR, | ||
51 | .idma_addr = S5PV210_AUDSS_INT_MEM, | ||
52 | }, | ||
53 | }, | ||
54 | }; | ||
55 | |||
56 | static struct resource s5pv210_iis0_resource[] = { | ||
57 | [0] = DEFINE_RES_MEM(S5PV210_PA_IIS0, SZ_256), | ||
58 | [1] = DEFINE_RES_DMA(DMACH_I2S0_TX), | ||
59 | [2] = DEFINE_RES_DMA(DMACH_I2S0_RX), | ||
60 | [3] = DEFINE_RES_DMA(DMACH_I2S0S_TX), | ||
61 | }; | ||
62 | |||
63 | struct platform_device s5pv210_device_iis0 = { | ||
64 | .name = "samsung-i2s", | ||
65 | .id = 0, | ||
66 | .num_resources = ARRAY_SIZE(s5pv210_iis0_resource), | ||
67 | .resource = s5pv210_iis0_resource, | ||
68 | .dev = { | ||
69 | .platform_data = &i2sv5_pdata, | ||
70 | }, | ||
71 | }; | ||
72 | |||
73 | static struct s3c_audio_pdata i2sv3_pdata = { | ||
74 | .cfg_gpio = s5pv210_cfg_i2s, | ||
75 | }; | ||
76 | |||
77 | static struct resource s5pv210_iis1_resource[] = { | ||
78 | [0] = DEFINE_RES_MEM(S5PV210_PA_IIS1, SZ_256), | ||
79 | [1] = DEFINE_RES_DMA(DMACH_I2S1_TX), | ||
80 | [2] = DEFINE_RES_DMA(DMACH_I2S1_RX), | ||
81 | }; | ||
82 | |||
83 | struct platform_device s5pv210_device_iis1 = { | ||
84 | .name = "samsung-i2s", | ||
85 | .id = 1, | ||
86 | .num_resources = ARRAY_SIZE(s5pv210_iis1_resource), | ||
87 | .resource = s5pv210_iis1_resource, | ||
88 | .dev = { | ||
89 | .platform_data = &i2sv3_pdata, | ||
90 | }, | ||
91 | }; | ||
92 | |||
93 | static struct resource s5pv210_iis2_resource[] = { | ||
94 | [0] = DEFINE_RES_MEM(S5PV210_PA_IIS2, SZ_256), | ||
95 | [1] = DEFINE_RES_DMA(DMACH_I2S2_TX), | ||
96 | [2] = DEFINE_RES_DMA(DMACH_I2S2_RX), | ||
97 | }; | ||
98 | |||
99 | struct platform_device s5pv210_device_iis2 = { | ||
100 | .name = "samsung-i2s", | ||
101 | .id = 2, | ||
102 | .num_resources = ARRAY_SIZE(s5pv210_iis2_resource), | ||
103 | .resource = s5pv210_iis2_resource, | ||
104 | .dev = { | ||
105 | .platform_data = &i2sv3_pdata, | ||
106 | }, | ||
107 | }; | ||
108 | |||
109 | /* PCM Controller platform_devices */ | ||
110 | |||
111 | static int s5pv210_pcm_cfg_gpio(struct platform_device *pdev) | ||
112 | { | ||
113 | switch (pdev->id) { | ||
114 | case 0: | ||
115 | s3c_gpio_cfgpin_range(S5PV210_GPI(0), 5, S3C_GPIO_SFN(3)); | ||
116 | break; | ||
117 | case 1: | ||
118 | s3c_gpio_cfgpin_range(S5PV210_GPC0(0), 5, S3C_GPIO_SFN(3)); | ||
119 | break; | ||
120 | case 2: | ||
121 | s3c_gpio_cfgpin_range(S5PV210_GPC1(0), 5, S3C_GPIO_SFN(2)); | ||
122 | break; | ||
123 | default: | ||
124 | printk(KERN_DEBUG "Invalid PCM Controller number!"); | ||
125 | return -EINVAL; | ||
126 | } | ||
127 | |||
128 | return 0; | ||
129 | } | ||
130 | |||
131 | static struct s3c_audio_pdata s3c_pcm_pdata = { | ||
132 | .cfg_gpio = s5pv210_pcm_cfg_gpio, | ||
133 | }; | ||
134 | |||
135 | static struct resource s5pv210_pcm0_resource[] = { | ||
136 | [0] = DEFINE_RES_MEM(S5PV210_PA_PCM0, SZ_256), | ||
137 | [1] = DEFINE_RES_DMA(DMACH_PCM0_TX), | ||
138 | [2] = DEFINE_RES_DMA(DMACH_PCM0_RX), | ||
139 | }; | ||
140 | |||
141 | struct platform_device s5pv210_device_pcm0 = { | ||
142 | .name = "samsung-pcm", | ||
143 | .id = 0, | ||
144 | .num_resources = ARRAY_SIZE(s5pv210_pcm0_resource), | ||
145 | .resource = s5pv210_pcm0_resource, | ||
146 | .dev = { | ||
147 | .platform_data = &s3c_pcm_pdata, | ||
148 | }, | ||
149 | }; | ||
150 | |||
151 | static struct resource s5pv210_pcm1_resource[] = { | ||
152 | [0] = DEFINE_RES_MEM(S5PV210_PA_PCM1, SZ_256), | ||
153 | [1] = DEFINE_RES_DMA(DMACH_PCM1_TX), | ||
154 | [2] = DEFINE_RES_DMA(DMACH_PCM1_RX), | ||
155 | }; | ||
156 | |||
157 | struct platform_device s5pv210_device_pcm1 = { | ||
158 | .name = "samsung-pcm", | ||
159 | .id = 1, | ||
160 | .num_resources = ARRAY_SIZE(s5pv210_pcm1_resource), | ||
161 | .resource = s5pv210_pcm1_resource, | ||
162 | .dev = { | ||
163 | .platform_data = &s3c_pcm_pdata, | ||
164 | }, | ||
165 | }; | ||
166 | |||
167 | static struct resource s5pv210_pcm2_resource[] = { | ||
168 | [0] = DEFINE_RES_MEM(S5PV210_PA_PCM2, SZ_256), | ||
169 | [1] = DEFINE_RES_DMA(DMACH_PCM2_TX), | ||
170 | [2] = DEFINE_RES_DMA(DMACH_PCM2_RX), | ||
171 | }; | ||
172 | |||
173 | struct platform_device s5pv210_device_pcm2 = { | ||
174 | .name = "samsung-pcm", | ||
175 | .id = 2, | ||
176 | .num_resources = ARRAY_SIZE(s5pv210_pcm2_resource), | ||
177 | .resource = s5pv210_pcm2_resource, | ||
178 | .dev = { | ||
179 | .platform_data = &s3c_pcm_pdata, | ||
180 | }, | ||
181 | }; | ||
182 | |||
183 | /* AC97 Controller platform devices */ | ||
184 | |||
185 | static int s5pv210_ac97_cfg_gpio(struct platform_device *pdev) | ||
186 | { | ||
187 | return s3c_gpio_cfgpin_range(S5PV210_GPC0(0), 5, S3C_GPIO_SFN(4)); | ||
188 | } | ||
189 | |||
190 | static struct resource s5pv210_ac97_resource[] = { | ||
191 | [0] = DEFINE_RES_MEM(S5PV210_PA_AC97, SZ_256), | ||
192 | [1] = DEFINE_RES_DMA(DMACH_AC97_PCMOUT), | ||
193 | [2] = DEFINE_RES_DMA(DMACH_AC97_PCMIN), | ||
194 | [3] = DEFINE_RES_DMA(DMACH_AC97_MICIN), | ||
195 | [4] = DEFINE_RES_IRQ(IRQ_AC97), | ||
196 | }; | ||
197 | |||
198 | static struct s3c_audio_pdata s3c_ac97_pdata = { | ||
199 | .cfg_gpio = s5pv210_ac97_cfg_gpio, | ||
200 | }; | ||
201 | |||
202 | static u64 s5pv210_ac97_dmamask = DMA_BIT_MASK(32); | ||
203 | |||
204 | struct platform_device s5pv210_device_ac97 = { | ||
205 | .name = "samsung-ac97", | ||
206 | .id = -1, | ||
207 | .num_resources = ARRAY_SIZE(s5pv210_ac97_resource), | ||
208 | .resource = s5pv210_ac97_resource, | ||
209 | .dev = { | ||
210 | .platform_data = &s3c_ac97_pdata, | ||
211 | .dma_mask = &s5pv210_ac97_dmamask, | ||
212 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
213 | }, | ||
214 | }; | ||
215 | |||
216 | /* S/PDIF Controller platform_device */ | ||
217 | |||
218 | static int s5pv210_spdif_cfg_gpio(struct platform_device *pdev) | ||
219 | { | ||
220 | s3c_gpio_cfgpin_range(S5PV210_GPC1(0), 2, S3C_GPIO_SFN(3)); | ||
221 | |||
222 | return 0; | ||
223 | } | ||
224 | |||
225 | static struct resource s5pv210_spdif_resource[] = { | ||
226 | [0] = DEFINE_RES_MEM(S5PV210_PA_SPDIF, SZ_256), | ||
227 | [1] = DEFINE_RES_DMA(DMACH_SPDIF), | ||
228 | }; | ||
229 | |||
230 | static struct s3c_audio_pdata samsung_spdif_pdata = { | ||
231 | .cfg_gpio = s5pv210_spdif_cfg_gpio, | ||
232 | }; | ||
233 | |||
234 | static u64 s5pv210_spdif_dmamask = DMA_BIT_MASK(32); | ||
235 | |||
236 | struct platform_device s5pv210_device_spdif = { | ||
237 | .name = "samsung-spdif", | ||
238 | .id = -1, | ||
239 | .num_resources = ARRAY_SIZE(s5pv210_spdif_resource), | ||
240 | .resource = s5pv210_spdif_resource, | ||
241 | .dev = { | ||
242 | .platform_data = &samsung_spdif_pdata, | ||
243 | .dma_mask = &s5pv210_spdif_dmamask, | ||
244 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
245 | }, | ||
246 | }; | ||
diff --git a/arch/arm/mach-s5pv210/dma.c b/arch/arm/mach-s5pv210/dma.c deleted file mode 100644 index b8337e248b09..000000000000 --- a/arch/arm/mach-s5pv210/dma.c +++ /dev/null | |||
@@ -1,130 +0,0 @@ | |||
1 | /* linux/arch/arm/mach-s5pv210/dma.c | ||
2 | * | ||
3 | * Copyright (c) 2011 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com | ||
5 | * | ||
6 | * Copyright (C) 2010 Samsung Electronics Co. Ltd. | ||
7 | * Jaswinder Singh <jassi.brar@samsung.com> | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License as published by | ||
11 | * the Free Software Foundation; either version 2 of the License, or | ||
12 | * (at your option) any later version. | ||
13 | * | ||
14 | * This program is distributed in the hope that it will be useful, | ||
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | * GNU General Public License for more details. | ||
18 | * | ||
19 | * You should have received a copy of the GNU General Public License | ||
20 | * along with this program; if not, write to the Free Software | ||
21 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
22 | */ | ||
23 | |||
24 | #include <linux/dma-mapping.h> | ||
25 | #include <linux/amba/bus.h> | ||
26 | #include <linux/amba/pl330.h> | ||
27 | |||
28 | #include <asm/irq.h> | ||
29 | #include <plat/devs.h> | ||
30 | #include <plat/irqs.h> | ||
31 | |||
32 | #include <mach/map.h> | ||
33 | #include <mach/irqs.h> | ||
34 | #include <mach/dma.h> | ||
35 | |||
36 | static u8 pdma0_peri[] = { | ||
37 | DMACH_UART0_RX, | ||
38 | DMACH_UART0_TX, | ||
39 | DMACH_UART1_RX, | ||
40 | DMACH_UART1_TX, | ||
41 | DMACH_UART2_RX, | ||
42 | DMACH_UART2_TX, | ||
43 | DMACH_UART3_RX, | ||
44 | DMACH_UART3_TX, | ||
45 | DMACH_MAX, | ||
46 | DMACH_I2S0_RX, | ||
47 | DMACH_I2S0_TX, | ||
48 | DMACH_I2S0S_TX, | ||
49 | DMACH_I2S1_RX, | ||
50 | DMACH_I2S1_TX, | ||
51 | DMACH_MAX, | ||
52 | DMACH_MAX, | ||
53 | DMACH_SPI0_RX, | ||
54 | DMACH_SPI0_TX, | ||
55 | DMACH_SPI1_RX, | ||
56 | DMACH_SPI1_TX, | ||
57 | DMACH_MAX, | ||
58 | DMACH_MAX, | ||
59 | DMACH_AC97_MICIN, | ||
60 | DMACH_AC97_PCMIN, | ||
61 | DMACH_AC97_PCMOUT, | ||
62 | DMACH_MAX, | ||
63 | DMACH_PWM, | ||
64 | DMACH_SPDIF, | ||
65 | }; | ||
66 | |||
67 | static struct dma_pl330_platdata s5pv210_pdma0_pdata = { | ||
68 | .nr_valid_peri = ARRAY_SIZE(pdma0_peri), | ||
69 | .peri_id = pdma0_peri, | ||
70 | }; | ||
71 | |||
72 | static AMBA_AHB_DEVICE(s5pv210_pdma0, "dma-pl330.0", 0x00041330, | ||
73 | S5PV210_PA_PDMA0, {IRQ_PDMA0}, &s5pv210_pdma0_pdata); | ||
74 | |||
75 | static u8 pdma1_peri[] = { | ||
76 | DMACH_UART0_RX, | ||
77 | DMACH_UART0_TX, | ||
78 | DMACH_UART1_RX, | ||
79 | DMACH_UART1_TX, | ||
80 | DMACH_UART2_RX, | ||
81 | DMACH_UART2_TX, | ||
82 | DMACH_UART3_RX, | ||
83 | DMACH_UART3_TX, | ||
84 | DMACH_MAX, | ||
85 | DMACH_I2S0_RX, | ||
86 | DMACH_I2S0_TX, | ||
87 | DMACH_I2S0S_TX, | ||
88 | DMACH_I2S1_RX, | ||
89 | DMACH_I2S1_TX, | ||
90 | DMACH_I2S2_RX, | ||
91 | DMACH_I2S2_TX, | ||
92 | DMACH_SPI0_RX, | ||
93 | DMACH_SPI0_TX, | ||
94 | DMACH_SPI1_RX, | ||
95 | DMACH_SPI1_TX, | ||
96 | DMACH_MAX, | ||
97 | DMACH_MAX, | ||
98 | DMACH_PCM0_RX, | ||
99 | DMACH_PCM0_TX, | ||
100 | DMACH_PCM1_RX, | ||
101 | DMACH_PCM1_TX, | ||
102 | DMACH_MSM_REQ0, | ||
103 | DMACH_MSM_REQ1, | ||
104 | DMACH_MSM_REQ2, | ||
105 | DMACH_MSM_REQ3, | ||
106 | DMACH_PCM2_RX, | ||
107 | DMACH_PCM2_TX, | ||
108 | }; | ||
109 | |||
110 | static struct dma_pl330_platdata s5pv210_pdma1_pdata = { | ||
111 | .nr_valid_peri = ARRAY_SIZE(pdma1_peri), | ||
112 | .peri_id = pdma1_peri, | ||
113 | }; | ||
114 | |||
115 | static AMBA_AHB_DEVICE(s5pv210_pdma1, "dma-pl330.1", 0x00041330, | ||
116 | S5PV210_PA_PDMA1, {IRQ_PDMA1}, &s5pv210_pdma1_pdata); | ||
117 | |||
118 | static int __init s5pv210_dma_init(void) | ||
119 | { | ||
120 | dma_cap_set(DMA_SLAVE, s5pv210_pdma0_pdata.cap_mask); | ||
121 | dma_cap_set(DMA_CYCLIC, s5pv210_pdma0_pdata.cap_mask); | ||
122 | amba_device_register(&s5pv210_pdma0_device, &iomem_resource); | ||
123 | |||
124 | dma_cap_set(DMA_SLAVE, s5pv210_pdma1_pdata.cap_mask); | ||
125 | dma_cap_set(DMA_CYCLIC, s5pv210_pdma1_pdata.cap_mask); | ||
126 | amba_device_register(&s5pv210_pdma1_device, &iomem_resource); | ||
127 | |||
128 | return 0; | ||
129 | } | ||
130 | arch_initcall(s5pv210_dma_init); | ||
diff --git a/arch/arm/mach-s5pv210/include/mach/gpio-samsung.h b/arch/arm/mach-s5pv210/include/mach/gpio-samsung.h deleted file mode 100644 index e193b891e7b2..000000000000 --- a/arch/arm/mach-s5pv210/include/mach/gpio-samsung.h +++ /dev/null | |||
@@ -1,135 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
3 | * http://www.samsung.com/ | ||
4 | * | ||
5 | * S5PV210 - GPIO lib support | ||
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 | |||
12 | #ifndef __ASM_ARCH_GPIO_H | ||
13 | #define __ASM_ARCH_GPIO_H __FILE__ | ||
14 | |||
15 | /* Practically, GPIO banks up to MP03 are the configurable gpio banks */ | ||
16 | |||
17 | /* GPIO bank sizes */ | ||
18 | #define S5PV210_GPIO_A0_NR (8) | ||
19 | #define S5PV210_GPIO_A1_NR (4) | ||
20 | #define S5PV210_GPIO_B_NR (8) | ||
21 | #define S5PV210_GPIO_C0_NR (5) | ||
22 | #define S5PV210_GPIO_C1_NR (5) | ||
23 | #define S5PV210_GPIO_D0_NR (4) | ||
24 | #define S5PV210_GPIO_D1_NR (6) | ||
25 | #define S5PV210_GPIO_E0_NR (8) | ||
26 | #define S5PV210_GPIO_E1_NR (5) | ||
27 | #define S5PV210_GPIO_F0_NR (8) | ||
28 | #define S5PV210_GPIO_F1_NR (8) | ||
29 | #define S5PV210_GPIO_F2_NR (8) | ||
30 | #define S5PV210_GPIO_F3_NR (6) | ||
31 | #define S5PV210_GPIO_G0_NR (7) | ||
32 | #define S5PV210_GPIO_G1_NR (7) | ||
33 | #define S5PV210_GPIO_G2_NR (7) | ||
34 | #define S5PV210_GPIO_G3_NR (7) | ||
35 | #define S5PV210_GPIO_H0_NR (8) | ||
36 | #define S5PV210_GPIO_H1_NR (8) | ||
37 | #define S5PV210_GPIO_H2_NR (8) | ||
38 | #define S5PV210_GPIO_H3_NR (8) | ||
39 | #define S5PV210_GPIO_I_NR (7) | ||
40 | #define S5PV210_GPIO_J0_NR (8) | ||
41 | #define S5PV210_GPIO_J1_NR (6) | ||
42 | #define S5PV210_GPIO_J2_NR (8) | ||
43 | #define S5PV210_GPIO_J3_NR (8) | ||
44 | #define S5PV210_GPIO_J4_NR (5) | ||
45 | |||
46 | #define S5PV210_GPIO_MP01_NR (8) | ||
47 | #define S5PV210_GPIO_MP02_NR (4) | ||
48 | #define S5PV210_GPIO_MP03_NR (8) | ||
49 | #define S5PV210_GPIO_MP04_NR (8) | ||
50 | #define S5PV210_GPIO_MP05_NR (8) | ||
51 | |||
52 | /* GPIO bank numbers */ | ||
53 | |||
54 | /* CONFIG_S3C_GPIO_SPACE allows the user to select extra | ||
55 | * space for debugging purposes so that any accidental | ||
56 | * change from one gpio bank to another can be caught. | ||
57 | */ | ||
58 | |||
59 | #define S5PV210_GPIO_NEXT(__gpio) \ | ||
60 | ((__gpio##_START) + (__gpio##_NR) + CONFIG_S3C_GPIO_SPACE + 1) | ||
61 | |||
62 | enum s5p_gpio_number { | ||
63 | S5PV210_GPIO_A0_START = 0, | ||
64 | S5PV210_GPIO_A1_START = S5PV210_GPIO_NEXT(S5PV210_GPIO_A0), | ||
65 | S5PV210_GPIO_B_START = S5PV210_GPIO_NEXT(S5PV210_GPIO_A1), | ||
66 | S5PV210_GPIO_C0_START = S5PV210_GPIO_NEXT(S5PV210_GPIO_B), | ||
67 | S5PV210_GPIO_C1_START = S5PV210_GPIO_NEXT(S5PV210_GPIO_C0), | ||
68 | S5PV210_GPIO_D0_START = S5PV210_GPIO_NEXT(S5PV210_GPIO_C1), | ||
69 | S5PV210_GPIO_D1_START = S5PV210_GPIO_NEXT(S5PV210_GPIO_D0), | ||
70 | S5PV210_GPIO_E0_START = S5PV210_GPIO_NEXT(S5PV210_GPIO_D1), | ||
71 | S5PV210_GPIO_E1_START = S5PV210_GPIO_NEXT(S5PV210_GPIO_E0), | ||
72 | S5PV210_GPIO_F0_START = S5PV210_GPIO_NEXT(S5PV210_GPIO_E1), | ||
73 | S5PV210_GPIO_F1_START = S5PV210_GPIO_NEXT(S5PV210_GPIO_F0), | ||
74 | S5PV210_GPIO_F2_START = S5PV210_GPIO_NEXT(S5PV210_GPIO_F1), | ||
75 | S5PV210_GPIO_F3_START = S5PV210_GPIO_NEXT(S5PV210_GPIO_F2), | ||
76 | S5PV210_GPIO_G0_START = S5PV210_GPIO_NEXT(S5PV210_GPIO_F3), | ||
77 | S5PV210_GPIO_G1_START = S5PV210_GPIO_NEXT(S5PV210_GPIO_G0), | ||
78 | S5PV210_GPIO_G2_START = S5PV210_GPIO_NEXT(S5PV210_GPIO_G1), | ||
79 | S5PV210_GPIO_G3_START = S5PV210_GPIO_NEXT(S5PV210_GPIO_G2), | ||
80 | S5PV210_GPIO_H0_START = S5PV210_GPIO_NEXT(S5PV210_GPIO_G3), | ||
81 | S5PV210_GPIO_H1_START = S5PV210_GPIO_NEXT(S5PV210_GPIO_H0), | ||
82 | S5PV210_GPIO_H2_START = S5PV210_GPIO_NEXT(S5PV210_GPIO_H1), | ||
83 | S5PV210_GPIO_H3_START = S5PV210_GPIO_NEXT(S5PV210_GPIO_H2), | ||
84 | S5PV210_GPIO_I_START = S5PV210_GPIO_NEXT(S5PV210_GPIO_H3), | ||
85 | S5PV210_GPIO_J0_START = S5PV210_GPIO_NEXT(S5PV210_GPIO_I), | ||
86 | S5PV210_GPIO_J1_START = S5PV210_GPIO_NEXT(S5PV210_GPIO_J0), | ||
87 | S5PV210_GPIO_J2_START = S5PV210_GPIO_NEXT(S5PV210_GPIO_J1), | ||
88 | S5PV210_GPIO_J3_START = S5PV210_GPIO_NEXT(S5PV210_GPIO_J2), | ||
89 | S5PV210_GPIO_J4_START = S5PV210_GPIO_NEXT(S5PV210_GPIO_J3), | ||
90 | S5PV210_GPIO_MP01_START = S5PV210_GPIO_NEXT(S5PV210_GPIO_J4), | ||
91 | S5PV210_GPIO_MP02_START = S5PV210_GPIO_NEXT(S5PV210_GPIO_MP01), | ||
92 | S5PV210_GPIO_MP03_START = S5PV210_GPIO_NEXT(S5PV210_GPIO_MP02), | ||
93 | S5PV210_GPIO_MP04_START = S5PV210_GPIO_NEXT(S5PV210_GPIO_MP03), | ||
94 | S5PV210_GPIO_MP05_START = S5PV210_GPIO_NEXT(S5PV210_GPIO_MP04), | ||
95 | }; | ||
96 | |||
97 | /* S5PV210 GPIO number definitions */ | ||
98 | #define S5PV210_GPA0(_nr) (S5PV210_GPIO_A0_START + (_nr)) | ||
99 | #define S5PV210_GPA1(_nr) (S5PV210_GPIO_A1_START + (_nr)) | ||
100 | #define S5PV210_GPB(_nr) (S5PV210_GPIO_B_START + (_nr)) | ||
101 | #define S5PV210_GPC0(_nr) (S5PV210_GPIO_C0_START + (_nr)) | ||
102 | #define S5PV210_GPC1(_nr) (S5PV210_GPIO_C1_START + (_nr)) | ||
103 | #define S5PV210_GPD0(_nr) (S5PV210_GPIO_D0_START + (_nr)) | ||
104 | #define S5PV210_GPD1(_nr) (S5PV210_GPIO_D1_START + (_nr)) | ||
105 | #define S5PV210_GPE0(_nr) (S5PV210_GPIO_E0_START + (_nr)) | ||
106 | #define S5PV210_GPE1(_nr) (S5PV210_GPIO_E1_START + (_nr)) | ||
107 | #define S5PV210_GPF0(_nr) (S5PV210_GPIO_F0_START + (_nr)) | ||
108 | #define S5PV210_GPF1(_nr) (S5PV210_GPIO_F1_START + (_nr)) | ||
109 | #define S5PV210_GPF2(_nr) (S5PV210_GPIO_F2_START + (_nr)) | ||
110 | #define S5PV210_GPF3(_nr) (S5PV210_GPIO_F3_START + (_nr)) | ||
111 | #define S5PV210_GPG0(_nr) (S5PV210_GPIO_G0_START + (_nr)) | ||
112 | #define S5PV210_GPG1(_nr) (S5PV210_GPIO_G1_START + (_nr)) | ||
113 | #define S5PV210_GPG2(_nr) (S5PV210_GPIO_G2_START + (_nr)) | ||
114 | #define S5PV210_GPG3(_nr) (S5PV210_GPIO_G3_START + (_nr)) | ||
115 | #define S5PV210_GPH0(_nr) (S5PV210_GPIO_H0_START + (_nr)) | ||
116 | #define S5PV210_GPH1(_nr) (S5PV210_GPIO_H1_START + (_nr)) | ||
117 | #define S5PV210_GPH2(_nr) (S5PV210_GPIO_H2_START + (_nr)) | ||
118 | #define S5PV210_GPH3(_nr) (S5PV210_GPIO_H3_START + (_nr)) | ||
119 | #define S5PV210_GPI(_nr) (S5PV210_GPIO_I_START + (_nr)) | ||
120 | #define S5PV210_GPJ0(_nr) (S5PV210_GPIO_J0_START + (_nr)) | ||
121 | #define S5PV210_GPJ1(_nr) (S5PV210_GPIO_J1_START + (_nr)) | ||
122 | #define S5PV210_GPJ2(_nr) (S5PV210_GPIO_J2_START + (_nr)) | ||
123 | #define S5PV210_GPJ3(_nr) (S5PV210_GPIO_J3_START + (_nr)) | ||
124 | #define S5PV210_GPJ4(_nr) (S5PV210_GPIO_J4_START + (_nr)) | ||
125 | #define S5PV210_MP01(_nr) (S5PV210_GPIO_MP01_START + (_nr)) | ||
126 | #define S5PV210_MP02(_nr) (S5PV210_GPIO_MP02_START + (_nr)) | ||
127 | #define S5PV210_MP03(_nr) (S5PV210_GPIO_MP03_START + (_nr)) | ||
128 | #define S5PV210_MP04(_nr) (S5PV210_GPIO_MP04_START + (_nr)) | ||
129 | #define S5PV210_MP05(_nr) (S5PV210_GPIO_MP05_START + (_nr)) | ||
130 | |||
131 | /* the end of the S5PV210 specific gpios */ | ||
132 | #define S5PV210_GPIO_END (S5PV210_MP05(S5PV210_GPIO_MP05_NR) + 1) | ||
133 | #define S3C_GPIO_END S5PV210_GPIO_END | ||
134 | |||
135 | #endif /* __ASM_ARCH_GPIO_H */ | ||
diff --git a/arch/arm/mach-s5pv210/include/mach/hardware.h b/arch/arm/mach-s5pv210/include/mach/hardware.h deleted file mode 100644 index fada7a392d09..000000000000 --- a/arch/arm/mach-s5pv210/include/mach/hardware.h +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | /* linux/arch/arm/mach-s5pv210/include/mach/hardware.h | ||
2 | * | ||
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com/ | ||
5 | * | ||
6 | * S5PV210 - Hardware support | ||
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 version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #ifndef __ASM_ARCH_HARDWARE_H | ||
14 | #define __ASM_ARCH_HARDWARE_H __FILE__ | ||
15 | |||
16 | /* currently nothing here, placeholder */ | ||
17 | |||
18 | #endif /* __ASM_ARCH_HARDWARE_H */ | ||
diff --git a/arch/arm/mach-s5pv210/include/mach/irqs.h b/arch/arm/mach-s5pv210/include/mach/irqs.h deleted file mode 100644 index 5e0de3a31f3d..000000000000 --- a/arch/arm/mach-s5pv210/include/mach/irqs.h +++ /dev/null | |||
@@ -1,137 +0,0 @@ | |||
1 | /* linux/arch/arm/mach-s5pv210/include/mach/irqs.h | ||
2 | * | ||
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com/ | ||
5 | * | ||
6 | * S5PV210 - IRQ definitions | ||
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 version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #ifndef __ASM_ARCH_IRQS_H | ||
14 | #define __ASM_ARCH_IRQS_H __FILE__ | ||
15 | |||
16 | #include <plat/irqs.h> | ||
17 | |||
18 | /* VIC0: System, DMA, Timer */ | ||
19 | |||
20 | #define IRQ_EINT16_31 S5P_IRQ_VIC0(16) | ||
21 | #define IRQ_BATF S5P_IRQ_VIC0(17) | ||
22 | #define IRQ_MDMA S5P_IRQ_VIC0(18) | ||
23 | #define IRQ_PDMA0 S5P_IRQ_VIC0(19) | ||
24 | #define IRQ_PDMA1 S5P_IRQ_VIC0(20) | ||
25 | #define IRQ_TIMER0_VIC S5P_IRQ_VIC0(21) | ||
26 | #define IRQ_TIMER1_VIC S5P_IRQ_VIC0(22) | ||
27 | #define IRQ_TIMER2_VIC S5P_IRQ_VIC0(23) | ||
28 | #define IRQ_TIMER3_VIC S5P_IRQ_VIC0(24) | ||
29 | #define IRQ_TIMER4_VIC S5P_IRQ_VIC0(25) | ||
30 | #define IRQ_SYSTIMER S5P_IRQ_VIC0(26) | ||
31 | #define IRQ_WDT S5P_IRQ_VIC0(27) | ||
32 | #define IRQ_RTC_ALARM S5P_IRQ_VIC0(28) | ||
33 | #define IRQ_RTC_TIC S5P_IRQ_VIC0(29) | ||
34 | #define IRQ_GPIOINT S5P_IRQ_VIC0(30) | ||
35 | #define IRQ_FIMC3 S5P_IRQ_VIC0(31) | ||
36 | |||
37 | /* VIC1: ARM, Power, Memory, Connectivity, Storage */ | ||
38 | |||
39 | #define IRQ_PMU S5P_IRQ_VIC1(0) | ||
40 | #define IRQ_CORTEX1 S5P_IRQ_VIC1(1) | ||
41 | #define IRQ_CORTEX2 S5P_IRQ_VIC1(2) | ||
42 | #define IRQ_CORTEX3 S5P_IRQ_VIC1(3) | ||
43 | #define IRQ_CORTEX4 S5P_IRQ_VIC1(4) | ||
44 | #define IRQ_IEMAPC S5P_IRQ_VIC1(5) | ||
45 | #define IRQ_IEMIEC S5P_IRQ_VIC1(6) | ||
46 | #define IRQ_ONENAND S5P_IRQ_VIC1(7) | ||
47 | #define IRQ_NFC S5P_IRQ_VIC1(8) | ||
48 | #define IRQ_CFCON S5P_IRQ_VIC1(9) | ||
49 | #define IRQ_UART0 S5P_IRQ_VIC1(10) | ||
50 | #define IRQ_UART1 S5P_IRQ_VIC1(11) | ||
51 | #define IRQ_UART2 S5P_IRQ_VIC1(12) | ||
52 | #define IRQ_UART3 S5P_IRQ_VIC1(13) | ||
53 | #define IRQ_IIC S5P_IRQ_VIC1(14) | ||
54 | #define IRQ_SPI0 S5P_IRQ_VIC1(15) | ||
55 | #define IRQ_SPI1 S5P_IRQ_VIC1(16) | ||
56 | #define IRQ_SPI2 S5P_IRQ_VIC1(17) | ||
57 | #define IRQ_IRDA S5P_IRQ_VIC1(18) | ||
58 | #define IRQ_IIC2 S5P_IRQ_VIC1(19) | ||
59 | #define IRQ_IIC_HDMIPHY S5P_IRQ_VIC1(20) | ||
60 | #define IRQ_HSIRX S5P_IRQ_VIC1(21) | ||
61 | #define IRQ_HSITX S5P_IRQ_VIC1(22) | ||
62 | #define IRQ_UHOST S5P_IRQ_VIC1(23) | ||
63 | #define IRQ_OTG S5P_IRQ_VIC1(24) | ||
64 | #define IRQ_MSM S5P_IRQ_VIC1(25) | ||
65 | #define IRQ_HSMMC0 S5P_IRQ_VIC1(26) | ||
66 | #define IRQ_HSMMC1 S5P_IRQ_VIC1(27) | ||
67 | #define IRQ_HSMMC2 S5P_IRQ_VIC1(28) | ||
68 | #define IRQ_MIPI_CSIS S5P_IRQ_VIC1(29) | ||
69 | #define IRQ_MIPIDSI S5P_IRQ_VIC1(30) | ||
70 | #define IRQ_ONENAND_AUDI S5P_IRQ_VIC1(31) | ||
71 | |||
72 | /* VIC2: Multimedia, Audio, Security */ | ||
73 | |||
74 | #define IRQ_LCD0 S5P_IRQ_VIC2(0) | ||
75 | #define IRQ_LCD1 S5P_IRQ_VIC2(1) | ||
76 | #define IRQ_LCD2 S5P_IRQ_VIC2(2) | ||
77 | #define IRQ_LCD3 S5P_IRQ_VIC2(3) | ||
78 | #define IRQ_ROTATOR S5P_IRQ_VIC2(4) | ||
79 | #define IRQ_FIMC0 S5P_IRQ_VIC2(5) | ||
80 | #define IRQ_FIMC1 S5P_IRQ_VIC2(6) | ||
81 | #define IRQ_FIMC2 S5P_IRQ_VIC2(7) | ||
82 | #define IRQ_JPEG S5P_IRQ_VIC2(8) | ||
83 | #define IRQ_2D S5P_IRQ_VIC2(9) | ||
84 | #define IRQ_3D S5P_IRQ_VIC2(10) | ||
85 | #define IRQ_MIXER S5P_IRQ_VIC2(11) | ||
86 | #define IRQ_HDMI S5P_IRQ_VIC2(12) | ||
87 | #define IRQ_IIC1 S5P_IRQ_VIC2(13) | ||
88 | #define IRQ_MFC S5P_IRQ_VIC2(14) | ||
89 | #define IRQ_SDO S5P_IRQ_VIC2(15) | ||
90 | #define IRQ_I2S0 S5P_IRQ_VIC2(16) | ||
91 | #define IRQ_I2S1 S5P_IRQ_VIC2(17) | ||
92 | #define IRQ_I2S2 S5P_IRQ_VIC2(18) | ||
93 | #define IRQ_AC97 S5P_IRQ_VIC2(19) | ||
94 | #define IRQ_PCM0 S5P_IRQ_VIC2(20) | ||
95 | #define IRQ_PCM1 S5P_IRQ_VIC2(21) | ||
96 | #define IRQ_SPDIF S5P_IRQ_VIC2(22) | ||
97 | #define IRQ_ADC S5P_IRQ_VIC2(23) | ||
98 | #define IRQ_PENDN S5P_IRQ_VIC2(24) | ||
99 | #define IRQ_TC IRQ_PENDN | ||
100 | #define IRQ_KEYPAD S5P_IRQ_VIC2(25) | ||
101 | #define IRQ_CG S5P_IRQ_VIC2(26) | ||
102 | #define IRQ_SSS_INT S5P_IRQ_VIC2(27) | ||
103 | #define IRQ_SSS_HASH S5P_IRQ_VIC2(28) | ||
104 | #define IRQ_PCM2 S5P_IRQ_VIC2(29) | ||
105 | #define IRQ_SDMIRQ S5P_IRQ_VIC2(30) | ||
106 | #define IRQ_SDMFIQ S5P_IRQ_VIC2(31) | ||
107 | |||
108 | /* VIC3: Etc */ | ||
109 | |||
110 | #define IRQ_IPC S5P_IRQ_VIC3(0) | ||
111 | #define IRQ_HOSTIF S5P_IRQ_VIC3(1) | ||
112 | #define IRQ_HSMMC3 S5P_IRQ_VIC3(2) | ||
113 | #define IRQ_CEC S5P_IRQ_VIC3(3) | ||
114 | #define IRQ_TSI S5P_IRQ_VIC3(4) | ||
115 | #define IRQ_MDNIE0 S5P_IRQ_VIC3(5) | ||
116 | #define IRQ_MDNIE1 S5P_IRQ_VIC3(6) | ||
117 | #define IRQ_MDNIE2 S5P_IRQ_VIC3(7) | ||
118 | #define IRQ_MDNIE3 S5P_IRQ_VIC3(8) | ||
119 | #define IRQ_VIC_END S5P_IRQ_VIC3(31) | ||
120 | |||
121 | #define S5P_EINT_BASE1 (S5P_IRQ_VIC0(0)) | ||
122 | #define S5P_EINT_BASE2 (IRQ_VIC_END + 1) | ||
123 | |||
124 | /* GPIO interrupt */ | ||
125 | #define S5P_GPIOINT_BASE (IRQ_EINT(31) + 1) | ||
126 | #define S5P_GPIOINT_GROUP_MAXNR 22 | ||
127 | |||
128 | /* Set the default NR_IRQS */ | ||
129 | #define NR_IRQS (IRQ_EINT(31) + S5P_GPIOINT_COUNT + 1) | ||
130 | |||
131 | /* Compatibility */ | ||
132 | #define IRQ_LCD_FIFO IRQ_LCD0 | ||
133 | #define IRQ_LCD_VSYNC IRQ_LCD1 | ||
134 | #define IRQ_LCD_SYSTEM IRQ_LCD2 | ||
135 | #define IRQ_MIPI_CSIS0 IRQ_MIPI_CSIS | ||
136 | |||
137 | #endif /* ASM_ARCH_IRQS_H */ | ||
diff --git a/arch/arm/mach-s5pv210/include/mach/map.h b/arch/arm/mach-s5pv210/include/mach/map.h deleted file mode 100644 index 763929aca52d..000000000000 --- a/arch/arm/mach-s5pv210/include/mach/map.h +++ /dev/null | |||
@@ -1,158 +0,0 @@ | |||
1 | /* linux/arch/arm/mach-s5pv210/include/mach/map.h | ||
2 | * | ||
3 | * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com/ | ||
5 | * | ||
6 | * S5PV210 - Memory map definitions | ||
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 version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #ifndef __ASM_ARCH_MAP_H | ||
14 | #define __ASM_ARCH_MAP_H __FILE__ | ||
15 | |||
16 | #include <plat/map-base.h> | ||
17 | #include <plat/map-s5p.h> | ||
18 | |||
19 | #define S5PV210_PA_SDRAM 0x20000000 | ||
20 | |||
21 | #define S5PV210_PA_SROM_BANK5 0xA8000000 | ||
22 | |||
23 | #define S5PC110_PA_ONENAND 0xB0000000 | ||
24 | #define S5PC110_PA_ONENAND_DMA 0xB0600000 | ||
25 | |||
26 | #define S5PV210_PA_CHIPID 0xE0000000 | ||
27 | |||
28 | #define S5PV210_PA_SYSCON 0xE0100000 | ||
29 | |||
30 | #define S5PV210_PA_GPIO 0xE0200000 | ||
31 | |||
32 | #define S5PV210_PA_SPDIF 0xE1100000 | ||
33 | |||
34 | #define S5PV210_PA_SPI0 0xE1300000 | ||
35 | #define S5PV210_PA_SPI1 0xE1400000 | ||
36 | |||
37 | #define S5PV210_PA_KEYPAD 0xE1600000 | ||
38 | |||
39 | #define S5PV210_PA_ADC 0xE1700000 | ||
40 | |||
41 | #define S5PV210_PA_IIC0 0xE1800000 | ||
42 | #define S5PV210_PA_IIC1 0xFAB00000 | ||
43 | #define S5PV210_PA_IIC2 0xE1A00000 | ||
44 | |||
45 | #define S5PV210_PA_AC97 0xE2200000 | ||
46 | |||
47 | #define S5PV210_PA_PCM0 0xE2300000 | ||
48 | #define S5PV210_PA_PCM1 0xE1200000 | ||
49 | #define S5PV210_PA_PCM2 0xE2B00000 | ||
50 | |||
51 | #define S5PV210_PA_TIMER 0xE2500000 | ||
52 | #define S5PV210_PA_SYSTIMER 0xE2600000 | ||
53 | #define S5PV210_PA_WATCHDOG 0xE2700000 | ||
54 | #define S5PV210_PA_RTC 0xE2800000 | ||
55 | |||
56 | #define S5PV210_PA_UART 0xE2900000 | ||
57 | |||
58 | #define S5PV210_PA_SROMC 0xE8000000 | ||
59 | |||
60 | #define S5PV210_PA_CFCON 0xE8200000 | ||
61 | |||
62 | #define S5PV210_PA_MFC 0xF1700000 | ||
63 | |||
64 | #define S5PV210_PA_HSMMC(x) (0xEB000000 + ((x) * 0x100000)) | ||
65 | |||
66 | #define S5PV210_PA_HSOTG 0xEC000000 | ||
67 | #define S5PV210_PA_HSPHY 0xEC100000 | ||
68 | |||
69 | #define S5PV210_PA_IIS0 0xEEE30000 | ||
70 | #define S5PV210_PA_IIS1 0xE2100000 | ||
71 | #define S5PV210_PA_IIS2 0xE2A00000 | ||
72 | |||
73 | #define S5PV210_PA_DMC0 0xF0000000 | ||
74 | #define S5PV210_PA_DMC1 0xF1400000 | ||
75 | |||
76 | #define S5PV210_PA_VIC0 0xF2000000 | ||
77 | #define S5PV210_PA_VIC1 0xF2100000 | ||
78 | #define S5PV210_PA_VIC2 0xF2200000 | ||
79 | #define S5PV210_PA_VIC3 0xF2300000 | ||
80 | |||
81 | #define S5PV210_PA_FB 0xF8000000 | ||
82 | |||
83 | #define S5PV210_PA_MDMA 0xFA200000 | ||
84 | #define S5PV210_PA_PDMA0 0xE0900000 | ||
85 | #define S5PV210_PA_PDMA1 0xE0A00000 | ||
86 | |||
87 | #define S5PV210_PA_MIPI_CSIS 0xFA600000 | ||
88 | |||
89 | #define S5PV210_PA_FIMC0 0xFB200000 | ||
90 | #define S5PV210_PA_FIMC1 0xFB300000 | ||
91 | #define S5PV210_PA_FIMC2 0xFB400000 | ||
92 | |||
93 | #define S5PV210_PA_JPEG 0xFB600000 | ||
94 | |||
95 | #define S5PV210_PA_SDO 0xF9000000 | ||
96 | #define S5PV210_PA_VP 0xF9100000 | ||
97 | #define S5PV210_PA_MIXER 0xF9200000 | ||
98 | #define S5PV210_PA_HDMI 0xFA100000 | ||
99 | #define S5PV210_PA_IIC_HDMIPHY 0xFA900000 | ||
100 | |||
101 | /* Compatibiltiy Defines */ | ||
102 | |||
103 | #define S3C_PA_FB S5PV210_PA_FB | ||
104 | #define S3C_PA_HSMMC0 S5PV210_PA_HSMMC(0) | ||
105 | #define S3C_PA_HSMMC1 S5PV210_PA_HSMMC(1) | ||
106 | #define S3C_PA_HSMMC2 S5PV210_PA_HSMMC(2) | ||
107 | #define S3C_PA_HSMMC3 S5PV210_PA_HSMMC(3) | ||
108 | #define S3C_PA_IIC S5PV210_PA_IIC0 | ||
109 | #define S3C_PA_IIC1 S5PV210_PA_IIC1 | ||
110 | #define S3C_PA_IIC2 S5PV210_PA_IIC2 | ||
111 | #define S3C_PA_RTC S5PV210_PA_RTC | ||
112 | #define S3C_PA_USB_HSOTG S5PV210_PA_HSOTG | ||
113 | #define S3C_PA_WDT S5PV210_PA_WATCHDOG | ||
114 | #define S3C_PA_SPI0 S5PV210_PA_SPI0 | ||
115 | #define S3C_PA_SPI1 S5PV210_PA_SPI1 | ||
116 | |||
117 | #define S5P_PA_CHIPID S5PV210_PA_CHIPID | ||
118 | #define S5P_PA_FIMC0 S5PV210_PA_FIMC0 | ||
119 | #define S5P_PA_FIMC1 S5PV210_PA_FIMC1 | ||
120 | #define S5P_PA_FIMC2 S5PV210_PA_FIMC2 | ||
121 | #define S5P_PA_MIPI_CSIS0 S5PV210_PA_MIPI_CSIS | ||
122 | #define S5P_PA_MFC S5PV210_PA_MFC | ||
123 | #define S5P_PA_IIC_HDMIPHY S5PV210_PA_IIC_HDMIPHY | ||
124 | |||
125 | #define S5P_PA_SDO S5PV210_PA_SDO | ||
126 | #define S5P_PA_VP S5PV210_PA_VP | ||
127 | #define S5P_PA_MIXER S5PV210_PA_MIXER | ||
128 | #define S5P_PA_HDMI S5PV210_PA_HDMI | ||
129 | |||
130 | #define S5P_PA_ONENAND S5PC110_PA_ONENAND | ||
131 | #define S5P_PA_ONENAND_DMA S5PC110_PA_ONENAND_DMA | ||
132 | #define S5P_PA_SDRAM S5PV210_PA_SDRAM | ||
133 | #define S5P_PA_SROMC S5PV210_PA_SROMC | ||
134 | #define S5P_PA_SYSCON S5PV210_PA_SYSCON | ||
135 | #define S5P_PA_TIMER S5PV210_PA_TIMER | ||
136 | |||
137 | #define S5P_PA_JPEG S5PV210_PA_JPEG | ||
138 | |||
139 | #define SAMSUNG_PA_ADC S5PV210_PA_ADC | ||
140 | #define SAMSUNG_PA_CFCON S5PV210_PA_CFCON | ||
141 | #define SAMSUNG_PA_KEYPAD S5PV210_PA_KEYPAD | ||
142 | #define SAMSUNG_PA_TIMER S5PV210_PA_TIMER | ||
143 | |||
144 | /* UART */ | ||
145 | |||
146 | #define S3C_VA_UARTx(x) (S3C_VA_UART + ((x) * S3C_UART_OFFSET)) | ||
147 | |||
148 | #define S3C_PA_UART S5PV210_PA_UART | ||
149 | |||
150 | #define S5P_PA_UART(x) (S3C_PA_UART + ((x) * S3C_UART_OFFSET)) | ||
151 | #define S5P_PA_UART0 S5P_PA_UART(0) | ||
152 | #define S5P_PA_UART1 S5P_PA_UART(1) | ||
153 | #define S5P_PA_UART2 S5P_PA_UART(2) | ||
154 | #define S5P_PA_UART3 S5P_PA_UART(3) | ||
155 | |||
156 | #define S5P_SZ_UART SZ_256 | ||
157 | |||
158 | #endif /* __ASM_ARCH_MAP_H */ | ||
diff --git a/arch/arm/mach-s5pv210/include/mach/memory.h b/arch/arm/mach-s5pv210/include/mach/memory.h deleted file mode 100644 index d584fac9156b..000000000000 --- a/arch/arm/mach-s5pv210/include/mach/memory.h +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | /* linux/arch/arm/mach-s5pv210/include/mach/memory.h | ||
2 | * | ||
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com/ | ||
5 | * | ||
6 | * S5PV210 - Memory definitions | ||
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 version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #ifndef __ASM_ARCH_MEMORY_H | ||
14 | #define __ASM_ARCH_MEMORY_H | ||
15 | |||
16 | /* | ||
17 | * Sparsemem support | ||
18 | * Physical memory can be located from 0x20000000 to 0x7fffffff, | ||
19 | * so MAX_PHYSMEM_BITS is 31. | ||
20 | */ | ||
21 | |||
22 | #define MAX_PHYSMEM_BITS 31 | ||
23 | #define SECTION_SIZE_BITS 28 | ||
24 | |||
25 | #endif /* __ASM_ARCH_MEMORY_H */ | ||
diff --git a/arch/arm/mach-s5pv210/include/mach/pm-core.h b/arch/arm/mach-s5pv210/include/mach/pm-core.h deleted file mode 100644 index eba8aea63ed8..000000000000 --- a/arch/arm/mach-s5pv210/include/mach/pm-core.h +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | /* linux/arch/arm/mach-s5pv210/include/mach/pm-core.h | ||
2 | * | ||
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com | ||
5 | * | ||
6 | * Based on arch/arm/mach-s3c2410/include/mach/pm-core.h, | ||
7 | * Copyright 2008 Simtec Electronics | ||
8 | * Ben Dooks <ben@simtec.co.uk> | ||
9 | * http://armlinux.simtec.co.uk/ | ||
10 | * | ||
11 | * S5PV210 - PM core support for arch/arm/plat-s5p/pm.c | ||
12 | * | ||
13 | * This program is free software; you can redistribute it and/or modify | ||
14 | * it under the terms of the GNU General Public License version 2 as | ||
15 | * published by the Free Software Foundation. | ||
16 | */ | ||
17 | |||
18 | static inline void s3c_pm_debug_init_uart(void) | ||
19 | { | ||
20 | /* nothing here yet */ | ||
21 | } | ||
22 | |||
23 | static inline void s3c_pm_arch_prepare_irqs(void) | ||
24 | { | ||
25 | __raw_writel(s3c_irqwake_intmask, S5P_WAKEUP_MASK); | ||
26 | __raw_writel(s3c_irqwake_eintmask, S5P_EINT_WAKEUP_MASK); | ||
27 | } | ||
28 | |||
29 | static inline void s3c_pm_arch_stop_clocks(void) | ||
30 | { | ||
31 | /* nothing here yet */ | ||
32 | } | ||
33 | |||
34 | static inline void s3c_pm_arch_show_resume_irqs(void) | ||
35 | { | ||
36 | /* nothing here yet */ | ||
37 | } | ||
38 | |||
39 | static inline void s3c_pm_arch_update_uart(void __iomem *regs, | ||
40 | struct pm_uart_save *save) | ||
41 | { | ||
42 | /* nothing here yet */ | ||
43 | } | ||
44 | |||
45 | static inline void s3c_pm_restored_gpios(void) { } | ||
46 | static inline void samsung_pm_saved_gpios(void) { } | ||
diff --git a/arch/arm/mach-s5pv210/include/mach/regs-clock.h b/arch/arm/mach-s5pv210/include/mach/regs-clock.h index e345584d4c34..b14ffcd7f6cc 100644 --- a/arch/arm/mach-s5pv210/include/mach/regs-clock.h +++ b/arch/arm/mach-s5pv210/include/mach/regs-clock.h | |||
@@ -13,7 +13,7 @@ | |||
13 | #ifndef __ASM_ARCH_REGS_CLOCK_H | 13 | #ifndef __ASM_ARCH_REGS_CLOCK_H |
14 | #define __ASM_ARCH_REGS_CLOCK_H __FILE__ | 14 | #define __ASM_ARCH_REGS_CLOCK_H __FILE__ |
15 | 15 | ||
16 | #include <mach/map.h> | 16 | #include <plat/map-base.h> |
17 | 17 | ||
18 | #define S5P_CLKREG(x) (S3C_VA_SYS + (x)) | 18 | #define S5P_CLKREG(x) (S3C_VA_SYS + (x)) |
19 | 19 | ||
diff --git a/arch/arm/mach-s5pv210/include/mach/regs-gpio.h b/arch/arm/mach-s5pv210/include/mach/regs-gpio.h deleted file mode 100644 index de0c89976078..000000000000 --- a/arch/arm/mach-s5pv210/include/mach/regs-gpio.h +++ /dev/null | |||
@@ -1,41 +0,0 @@ | |||
1 | /* linux/arch/arm/mach-s5pv210/include/mach/regs-gpio.h | ||
2 | * | ||
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com | ||
5 | * | ||
6 | * S5PV210 - GPIO (including EINT) register definitions | ||
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 version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #ifndef __ASM_ARCH_REGS_GPIO_H | ||
14 | #define __ASM_ARCH_REGS_GPIO_H __FILE__ | ||
15 | |||
16 | #include <mach/map.h> | ||
17 | |||
18 | #define S5PV210_EINT30CON (S5P_VA_GPIO + 0xE00) | ||
19 | #define S5P_EINT_CON(x) (S5PV210_EINT30CON + ((x) * 0x4)) | ||
20 | |||
21 | #define S5PV210_EINT30FLTCON0 (S5P_VA_GPIO + 0xE80) | ||
22 | #define S5P_EINT_FLTCON(x) (S5PV210_EINT30FLTCON0 + ((x) * 0x4)) | ||
23 | |||
24 | #define S5PV210_EINT30MASK (S5P_VA_GPIO + 0xF00) | ||
25 | #define S5P_EINT_MASK(x) (S5PV210_EINT30MASK + ((x) * 0x4)) | ||
26 | |||
27 | #define S5PV210_EINT30PEND (S5P_VA_GPIO + 0xF40) | ||
28 | #define S5P_EINT_PEND(x) (S5PV210_EINT30PEND + ((x) * 0x4)) | ||
29 | |||
30 | #define EINT_REG_NR(x) (EINT_OFFSET(x) >> 3) | ||
31 | |||
32 | #define eint_irq_to_bit(irq) (1 << (EINT_OFFSET(irq) & 0x7)) | ||
33 | |||
34 | #define EINT_MODE S3C_GPIO_SFN(0xf) | ||
35 | |||
36 | #define EINT_GPIO_0(x) S5PV210_GPH0(x) | ||
37 | #define EINT_GPIO_1(x) S5PV210_GPH1(x) | ||
38 | #define EINT_GPIO_2(x) S5PV210_GPH2(x) | ||
39 | #define EINT_GPIO_3(x) S5PV210_GPH3(x) | ||
40 | |||
41 | #endif /* __ASM_ARCH_REGS_GPIO_H */ | ||
diff --git a/arch/arm/mach-s5pv210/include/mach/regs-irq.h b/arch/arm/mach-s5pv210/include/mach/regs-irq.h deleted file mode 100644 index d8bc1e6c7aaa..000000000000 --- a/arch/arm/mach-s5pv210/include/mach/regs-irq.h +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | /* linux/arch/arm/mach-s5pv210/include/mach/regs-irq.h | ||
2 | * | ||
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com/ | ||
5 | * | ||
6 | * S5PV210 - IRQ register definitions | ||
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 version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #ifndef __ASM_ARCH_REGS_IRQ_H | ||
14 | #define __ASM_ARCH_REGS_IRQ_H __FILE__ | ||
15 | |||
16 | #include <mach/map.h> | ||
17 | |||
18 | #endif /* __ASM_ARCH_REGS_IRQ_H */ | ||
diff --git a/arch/arm/mach-s5pv210/mach-aquila.c b/arch/arm/mach-s5pv210/mach-aquila.c deleted file mode 100644 index 4262d8ff1988..000000000000 --- a/arch/arm/mach-s5pv210/mach-aquila.c +++ /dev/null | |||
@@ -1,688 +0,0 @@ | |||
1 | /* linux/arch/arm/mach-s5pv210/mach-aquila.c | ||
2 | * | ||
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.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/kernel.h> | ||
12 | #include <linux/types.h> | ||
13 | #include <linux/init.h> | ||
14 | #include <linux/serial_core.h> | ||
15 | #include <linux/serial_s3c.h> | ||
16 | #include <linux/fb.h> | ||
17 | #include <linux/i2c.h> | ||
18 | #include <linux/i2c-gpio.h> | ||
19 | #include <linux/mfd/max8998.h> | ||
20 | #include <linux/mfd/wm8994/pdata.h> | ||
21 | #include <linux/regulator/fixed.h> | ||
22 | #include <linux/gpio_keys.h> | ||
23 | #include <linux/input.h> | ||
24 | #include <linux/gpio.h> | ||
25 | |||
26 | #include <asm/mach/arch.h> | ||
27 | #include <asm/mach/map.h> | ||
28 | #include <asm/setup.h> | ||
29 | #include <asm/mach-types.h> | ||
30 | |||
31 | #include <video/samsung_fimd.h> | ||
32 | #include <mach/map.h> | ||
33 | #include <mach/regs-clock.h> | ||
34 | #include <mach/gpio-samsung.h> | ||
35 | |||
36 | #include <plat/gpio-cfg.h> | ||
37 | #include <plat/devs.h> | ||
38 | #include <plat/cpu.h> | ||
39 | #include <plat/fb.h> | ||
40 | #include <plat/fimc-core.h> | ||
41 | #include <plat/sdhci.h> | ||
42 | #include <plat/samsung-time.h> | ||
43 | |||
44 | #include "common.h" | ||
45 | |||
46 | /* Following are default values for UCON, ULCON and UFCON UART registers */ | ||
47 | #define AQUILA_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ | ||
48 | S3C2410_UCON_RXILEVEL | \ | ||
49 | S3C2410_UCON_TXIRQMODE | \ | ||
50 | S3C2410_UCON_RXIRQMODE | \ | ||
51 | S3C2410_UCON_RXFIFO_TOI | \ | ||
52 | S3C2443_UCON_RXERR_IRQEN) | ||
53 | |||
54 | #define AQUILA_ULCON_DEFAULT S3C2410_LCON_CS8 | ||
55 | |||
56 | #define AQUILA_UFCON_DEFAULT S3C2410_UFCON_FIFOMODE | ||
57 | |||
58 | static struct s3c2410_uartcfg aquila_uartcfgs[] __initdata = { | ||
59 | [0] = { | ||
60 | .hwport = 0, | ||
61 | .flags = 0, | ||
62 | .ucon = AQUILA_UCON_DEFAULT, | ||
63 | .ulcon = AQUILA_ULCON_DEFAULT, | ||
64 | /* | ||
65 | * Actually UART0 can support 256 bytes fifo, but aquila board | ||
66 | * supports 128 bytes fifo because of initial chip bug | ||
67 | */ | ||
68 | .ufcon = AQUILA_UFCON_DEFAULT | | ||
69 | S5PV210_UFCON_TXTRIG128 | S5PV210_UFCON_RXTRIG128, | ||
70 | }, | ||
71 | [1] = { | ||
72 | .hwport = 1, | ||
73 | .flags = 0, | ||
74 | .ucon = AQUILA_UCON_DEFAULT, | ||
75 | .ulcon = AQUILA_ULCON_DEFAULT, | ||
76 | .ufcon = AQUILA_UFCON_DEFAULT | | ||
77 | S5PV210_UFCON_TXTRIG64 | S5PV210_UFCON_RXTRIG64, | ||
78 | }, | ||
79 | [2] = { | ||
80 | .hwport = 2, | ||
81 | .flags = 0, | ||
82 | .ucon = AQUILA_UCON_DEFAULT, | ||
83 | .ulcon = AQUILA_ULCON_DEFAULT, | ||
84 | .ufcon = AQUILA_UFCON_DEFAULT | | ||
85 | S5PV210_UFCON_TXTRIG16 | S5PV210_UFCON_RXTRIG16, | ||
86 | }, | ||
87 | [3] = { | ||
88 | .hwport = 3, | ||
89 | .flags = 0, | ||
90 | .ucon = AQUILA_UCON_DEFAULT, | ||
91 | .ulcon = AQUILA_ULCON_DEFAULT, | ||
92 | .ufcon = AQUILA_UFCON_DEFAULT | | ||
93 | S5PV210_UFCON_TXTRIG16 | S5PV210_UFCON_RXTRIG16, | ||
94 | }, | ||
95 | }; | ||
96 | |||
97 | /* Frame Buffer */ | ||
98 | static struct s3c_fb_pd_win aquila_fb_win0 = { | ||
99 | .max_bpp = 32, | ||
100 | .default_bpp = 16, | ||
101 | .xres = 480, | ||
102 | .yres = 800, | ||
103 | }; | ||
104 | |||
105 | static struct s3c_fb_pd_win aquila_fb_win1 = { | ||
106 | .max_bpp = 32, | ||
107 | .default_bpp = 16, | ||
108 | .xres = 480, | ||
109 | .yres = 800, | ||
110 | }; | ||
111 | |||
112 | static struct fb_videomode aquila_lcd_timing = { | ||
113 | .left_margin = 16, | ||
114 | .right_margin = 16, | ||
115 | .upper_margin = 3, | ||
116 | .lower_margin = 28, | ||
117 | .hsync_len = 2, | ||
118 | .vsync_len = 2, | ||
119 | .xres = 480, | ||
120 | .yres = 800, | ||
121 | }; | ||
122 | |||
123 | static struct s3c_fb_platdata aquila_lcd_pdata __initdata = { | ||
124 | .win[0] = &aquila_fb_win0, | ||
125 | .win[1] = &aquila_fb_win1, | ||
126 | .vtiming = &aquila_lcd_timing, | ||
127 | .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB, | ||
128 | .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC | | ||
129 | VIDCON1_INV_VCLK | VIDCON1_INV_VDEN, | ||
130 | .setup_gpio = s5pv210_fb_gpio_setup_24bpp, | ||
131 | }; | ||
132 | |||
133 | /* MAX8998 regulators */ | ||
134 | #if defined(CONFIG_REGULATOR_MAX8998) || defined(CONFIG_REGULATOR_MAX8998_MODULE) | ||
135 | |||
136 | static struct regulator_init_data aquila_ldo2_data = { | ||
137 | .constraints = { | ||
138 | .name = "VALIVE_1.1V", | ||
139 | .min_uV = 1100000, | ||
140 | .max_uV = 1100000, | ||
141 | .apply_uV = 1, | ||
142 | .always_on = 1, | ||
143 | .state_mem = { | ||
144 | .enabled = 1, | ||
145 | }, | ||
146 | }, | ||
147 | }; | ||
148 | |||
149 | static struct regulator_init_data aquila_ldo3_data = { | ||
150 | .constraints = { | ||
151 | .name = "VUSB+MIPI_1.1V", | ||
152 | .min_uV = 1100000, | ||
153 | .max_uV = 1100000, | ||
154 | .apply_uV = 1, | ||
155 | .always_on = 1, | ||
156 | }, | ||
157 | }; | ||
158 | |||
159 | static struct regulator_init_data aquila_ldo4_data = { | ||
160 | .constraints = { | ||
161 | .name = "VDAC_3.3V", | ||
162 | .min_uV = 3300000, | ||
163 | .max_uV = 3300000, | ||
164 | .apply_uV = 1, | ||
165 | }, | ||
166 | }; | ||
167 | |||
168 | static struct regulator_init_data aquila_ldo5_data = { | ||
169 | .constraints = { | ||
170 | .name = "VTF_2.8V", | ||
171 | .min_uV = 2800000, | ||
172 | .max_uV = 2800000, | ||
173 | .apply_uV = 1, | ||
174 | }, | ||
175 | }; | ||
176 | |||
177 | static struct regulator_init_data aquila_ldo6_data = { | ||
178 | .constraints = { | ||
179 | .name = "VCC_3.3V", | ||
180 | .min_uV = 3300000, | ||
181 | .max_uV = 3300000, | ||
182 | .apply_uV = 1, | ||
183 | }, | ||
184 | }; | ||
185 | |||
186 | static struct regulator_init_data aquila_ldo7_data = { | ||
187 | .constraints = { | ||
188 | .name = "VCC_3.0V", | ||
189 | .min_uV = 3000000, | ||
190 | .max_uV = 3000000, | ||
191 | .apply_uV = 1, | ||
192 | .boot_on = 1, | ||
193 | .always_on = 1, | ||
194 | }, | ||
195 | }; | ||
196 | |||
197 | static struct regulator_init_data aquila_ldo8_data = { | ||
198 | .constraints = { | ||
199 | .name = "VUSB+VADC_3.3V", | ||
200 | .min_uV = 3300000, | ||
201 | .max_uV = 3300000, | ||
202 | .apply_uV = 1, | ||
203 | .always_on = 1, | ||
204 | }, | ||
205 | }; | ||
206 | |||
207 | static struct regulator_init_data aquila_ldo9_data = { | ||
208 | .constraints = { | ||
209 | .name = "VCC+VCAM_2.8V", | ||
210 | .min_uV = 2800000, | ||
211 | .max_uV = 2800000, | ||
212 | .apply_uV = 1, | ||
213 | .always_on = 1, | ||
214 | }, | ||
215 | }; | ||
216 | |||
217 | static struct regulator_init_data aquila_ldo10_data = { | ||
218 | .constraints = { | ||
219 | .name = "VPLL_1.1V", | ||
220 | .min_uV = 1100000, | ||
221 | .max_uV = 1100000, | ||
222 | .apply_uV = 1, | ||
223 | .boot_on = 1, | ||
224 | }, | ||
225 | }; | ||
226 | |||
227 | static struct regulator_init_data aquila_ldo11_data = { | ||
228 | .constraints = { | ||
229 | .name = "CAM_IO_2.8V", | ||
230 | .min_uV = 2800000, | ||
231 | .max_uV = 2800000, | ||
232 | .apply_uV = 1, | ||
233 | .always_on = 1, | ||
234 | }, | ||
235 | }; | ||
236 | |||
237 | static struct regulator_init_data aquila_ldo12_data = { | ||
238 | .constraints = { | ||
239 | .name = "CAM_ISP_1.2V", | ||
240 | .min_uV = 1200000, | ||
241 | .max_uV = 1200000, | ||
242 | .apply_uV = 1, | ||
243 | .always_on = 1, | ||
244 | }, | ||
245 | }; | ||
246 | |||
247 | static struct regulator_init_data aquila_ldo13_data = { | ||
248 | .constraints = { | ||
249 | .name = "CAM_A_2.8V", | ||
250 | .min_uV = 2800000, | ||
251 | .max_uV = 2800000, | ||
252 | .apply_uV = 1, | ||
253 | .always_on = 1, | ||
254 | }, | ||
255 | }; | ||
256 | |||
257 | static struct regulator_init_data aquila_ldo14_data = { | ||
258 | .constraints = { | ||
259 | .name = "CAM_CIF_1.8V", | ||
260 | .min_uV = 1800000, | ||
261 | .max_uV = 1800000, | ||
262 | .apply_uV = 1, | ||
263 | .always_on = 1, | ||
264 | }, | ||
265 | }; | ||
266 | |||
267 | static struct regulator_init_data aquila_ldo15_data = { | ||
268 | .constraints = { | ||
269 | .name = "CAM_AF_3.3V", | ||
270 | .min_uV = 3300000, | ||
271 | .max_uV = 3300000, | ||
272 | .apply_uV = 1, | ||
273 | .always_on = 1, | ||
274 | }, | ||
275 | }; | ||
276 | |||
277 | static struct regulator_init_data aquila_ldo16_data = { | ||
278 | .constraints = { | ||
279 | .name = "VMIPI_1.8V", | ||
280 | .min_uV = 1800000, | ||
281 | .max_uV = 1800000, | ||
282 | .apply_uV = 1, | ||
283 | .always_on = 1, | ||
284 | }, | ||
285 | }; | ||
286 | |||
287 | static struct regulator_init_data aquila_ldo17_data = { | ||
288 | .constraints = { | ||
289 | .name = "CAM_8M_1.8V", | ||
290 | .min_uV = 1800000, | ||
291 | .max_uV = 1800000, | ||
292 | .apply_uV = 1, | ||
293 | .always_on = 1, | ||
294 | }, | ||
295 | }; | ||
296 | |||
297 | /* BUCK */ | ||
298 | static struct regulator_consumer_supply buck1_consumer = | ||
299 | REGULATOR_SUPPLY("vddarm", NULL); | ||
300 | |||
301 | static struct regulator_consumer_supply buck2_consumer = | ||
302 | REGULATOR_SUPPLY("vddint", NULL); | ||
303 | |||
304 | static struct regulator_init_data aquila_buck1_data = { | ||
305 | .constraints = { | ||
306 | .name = "VARM_1.2V", | ||
307 | .min_uV = 1200000, | ||
308 | .max_uV = 1200000, | ||
309 | .apply_uV = 1, | ||
310 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | | ||
311 | REGULATOR_CHANGE_STATUS, | ||
312 | }, | ||
313 | .num_consumer_supplies = 1, | ||
314 | .consumer_supplies = &buck1_consumer, | ||
315 | }; | ||
316 | |||
317 | static struct regulator_init_data aquila_buck2_data = { | ||
318 | .constraints = { | ||
319 | .name = "VINT_1.2V", | ||
320 | .min_uV = 1200000, | ||
321 | .max_uV = 1200000, | ||
322 | .apply_uV = 1, | ||
323 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | | ||
324 | REGULATOR_CHANGE_STATUS, | ||
325 | }, | ||
326 | .num_consumer_supplies = 1, | ||
327 | .consumer_supplies = &buck2_consumer, | ||
328 | }; | ||
329 | |||
330 | static struct regulator_init_data aquila_buck3_data = { | ||
331 | .constraints = { | ||
332 | .name = "VCC_1.8V", | ||
333 | .min_uV = 1800000, | ||
334 | .max_uV = 1800000, | ||
335 | .apply_uV = 1, | ||
336 | .state_mem = { | ||
337 | .enabled = 1, | ||
338 | }, | ||
339 | }, | ||
340 | }; | ||
341 | |||
342 | static struct regulator_init_data aquila_buck4_data = { | ||
343 | .constraints = { | ||
344 | .name = "CAM_CORE_1.2V", | ||
345 | .min_uV = 1200000, | ||
346 | .max_uV = 1200000, | ||
347 | .apply_uV = 1, | ||
348 | .always_on = 1, | ||
349 | }, | ||
350 | }; | ||
351 | |||
352 | static struct max8998_regulator_data aquila_regulators[] = { | ||
353 | { MAX8998_LDO2, &aquila_ldo2_data }, | ||
354 | { MAX8998_LDO3, &aquila_ldo3_data }, | ||
355 | { MAX8998_LDO4, &aquila_ldo4_data }, | ||
356 | { MAX8998_LDO5, &aquila_ldo5_data }, | ||
357 | { MAX8998_LDO6, &aquila_ldo6_data }, | ||
358 | { MAX8998_LDO7, &aquila_ldo7_data }, | ||
359 | { MAX8998_LDO8, &aquila_ldo8_data }, | ||
360 | { MAX8998_LDO9, &aquila_ldo9_data }, | ||
361 | { MAX8998_LDO10, &aquila_ldo10_data }, | ||
362 | { MAX8998_LDO11, &aquila_ldo11_data }, | ||
363 | { MAX8998_LDO12, &aquila_ldo12_data }, | ||
364 | { MAX8998_LDO13, &aquila_ldo13_data }, | ||
365 | { MAX8998_LDO14, &aquila_ldo14_data }, | ||
366 | { MAX8998_LDO15, &aquila_ldo15_data }, | ||
367 | { MAX8998_LDO16, &aquila_ldo16_data }, | ||
368 | { MAX8998_LDO17, &aquila_ldo17_data }, | ||
369 | { MAX8998_BUCK1, &aquila_buck1_data }, | ||
370 | { MAX8998_BUCK2, &aquila_buck2_data }, | ||
371 | { MAX8998_BUCK3, &aquila_buck3_data }, | ||
372 | { MAX8998_BUCK4, &aquila_buck4_data }, | ||
373 | }; | ||
374 | |||
375 | static struct max8998_platform_data aquila_max8998_pdata = { | ||
376 | .num_regulators = ARRAY_SIZE(aquila_regulators), | ||
377 | .regulators = aquila_regulators, | ||
378 | .buck1_set1 = S5PV210_GPH0(3), | ||
379 | .buck1_set2 = S5PV210_GPH0(4), | ||
380 | .buck2_set3 = S5PV210_GPH0(5), | ||
381 | .buck1_voltage = { 1200000, 1200000, 1200000, 1200000 }, | ||
382 | .buck2_voltage = { 1200000, 1200000 }, | ||
383 | }; | ||
384 | #endif | ||
385 | |||
386 | static struct regulator_consumer_supply wm8994_fixed_voltage0_supplies[] = { | ||
387 | REGULATOR_SUPPLY("DBVDD", "5-001a"), | ||
388 | REGULATOR_SUPPLY("AVDD2", "5-001a"), | ||
389 | REGULATOR_SUPPLY("CPVDD", "5-001a"), | ||
390 | }; | ||
391 | |||
392 | static struct regulator_consumer_supply wm8994_fixed_voltage1_supplies[] = { | ||
393 | REGULATOR_SUPPLY("SPKVDD1", "5-001a"), | ||
394 | REGULATOR_SUPPLY("SPKVDD2", "5-001a"), | ||
395 | }; | ||
396 | |||
397 | static struct regulator_init_data wm8994_fixed_voltage0_init_data = { | ||
398 | .constraints = { | ||
399 | .always_on = 1, | ||
400 | }, | ||
401 | .num_consumer_supplies = ARRAY_SIZE(wm8994_fixed_voltage0_supplies), | ||
402 | .consumer_supplies = wm8994_fixed_voltage0_supplies, | ||
403 | }; | ||
404 | |||
405 | static struct regulator_init_data wm8994_fixed_voltage1_init_data = { | ||
406 | .constraints = { | ||
407 | .always_on = 1, | ||
408 | }, | ||
409 | .num_consumer_supplies = ARRAY_SIZE(wm8994_fixed_voltage1_supplies), | ||
410 | .consumer_supplies = wm8994_fixed_voltage1_supplies, | ||
411 | }; | ||
412 | |||
413 | static struct fixed_voltage_config wm8994_fixed_voltage0_config = { | ||
414 | .supply_name = "VCC_1.8V_PDA", | ||
415 | .microvolts = 1800000, | ||
416 | .gpio = -EINVAL, | ||
417 | .init_data = &wm8994_fixed_voltage0_init_data, | ||
418 | }; | ||
419 | |||
420 | static struct fixed_voltage_config wm8994_fixed_voltage1_config = { | ||
421 | .supply_name = "V_BAT", | ||
422 | .microvolts = 3700000, | ||
423 | .gpio = -EINVAL, | ||
424 | .init_data = &wm8994_fixed_voltage1_init_data, | ||
425 | }; | ||
426 | |||
427 | static struct platform_device wm8994_fixed_voltage0 = { | ||
428 | .name = "reg-fixed-voltage", | ||
429 | .id = 0, | ||
430 | .dev = { | ||
431 | .platform_data = &wm8994_fixed_voltage0_config, | ||
432 | }, | ||
433 | }; | ||
434 | |||
435 | static struct platform_device wm8994_fixed_voltage1 = { | ||
436 | .name = "reg-fixed-voltage", | ||
437 | .id = 1, | ||
438 | .dev = { | ||
439 | .platform_data = &wm8994_fixed_voltage1_config, | ||
440 | }, | ||
441 | }; | ||
442 | |||
443 | static struct regulator_consumer_supply wm8994_avdd1_supply = | ||
444 | REGULATOR_SUPPLY("AVDD1", "5-001a"); | ||
445 | |||
446 | static struct regulator_consumer_supply wm8994_dcvdd_supply = | ||
447 | REGULATOR_SUPPLY("DCVDD", "5-001a"); | ||
448 | |||
449 | static struct regulator_init_data wm8994_ldo1_data = { | ||
450 | .constraints = { | ||
451 | .name = "AVDD1_3.0V", | ||
452 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | ||
453 | }, | ||
454 | .num_consumer_supplies = 1, | ||
455 | .consumer_supplies = &wm8994_avdd1_supply, | ||
456 | }; | ||
457 | |||
458 | static struct regulator_init_data wm8994_ldo2_data = { | ||
459 | .constraints = { | ||
460 | .name = "DCVDD_1.0V", | ||
461 | }, | ||
462 | .num_consumer_supplies = 1, | ||
463 | .consumer_supplies = &wm8994_dcvdd_supply, | ||
464 | }; | ||
465 | |||
466 | static struct wm8994_pdata wm8994_platform_data = { | ||
467 | /* configure gpio1 function: 0x0001(Logic level input/output) */ | ||
468 | .gpio_defaults[0] = 0x0001, | ||
469 | /* configure gpio3/4/5/7 function for AIF2 voice */ | ||
470 | .gpio_defaults[2] = 0x8100, | ||
471 | .gpio_defaults[3] = 0x8100, | ||
472 | .gpio_defaults[4] = 0x8100, | ||
473 | .gpio_defaults[6] = 0x0100, | ||
474 | /* configure gpio8/9/10/11 function for AIF3 BT */ | ||
475 | .gpio_defaults[7] = 0x8100, | ||
476 | .gpio_defaults[8] = 0x0100, | ||
477 | .gpio_defaults[9] = 0x0100, | ||
478 | .gpio_defaults[10] = 0x0100, | ||
479 | .ldo[0] = { S5PV210_MP03(6), &wm8994_ldo1_data }, /* XM0FRNB_2 */ | ||
480 | .ldo[1] = { 0, &wm8994_ldo2_data }, | ||
481 | }; | ||
482 | |||
483 | /* GPIO I2C PMIC */ | ||
484 | #define AP_I2C_GPIO_PMIC_BUS_4 4 | ||
485 | static struct i2c_gpio_platform_data aquila_i2c_gpio_pmic_data = { | ||
486 | .sda_pin = S5PV210_GPJ4(0), /* XMSMCSN */ | ||
487 | .scl_pin = S5PV210_GPJ4(3), /* XMSMIRQN */ | ||
488 | }; | ||
489 | |||
490 | static struct platform_device aquila_i2c_gpio_pmic = { | ||
491 | .name = "i2c-gpio", | ||
492 | .id = AP_I2C_GPIO_PMIC_BUS_4, | ||
493 | .dev = { | ||
494 | .platform_data = &aquila_i2c_gpio_pmic_data, | ||
495 | }, | ||
496 | }; | ||
497 | |||
498 | static struct i2c_board_info i2c_gpio_pmic_devs[] __initdata = { | ||
499 | #if defined(CONFIG_REGULATOR_MAX8998) || defined(CONFIG_REGULATOR_MAX8998_MODULE) | ||
500 | { | ||
501 | /* 0xCC when SRAD = 0 */ | ||
502 | I2C_BOARD_INFO("max8998", 0xCC >> 1), | ||
503 | .platform_data = &aquila_max8998_pdata, | ||
504 | }, | ||
505 | #endif | ||
506 | }; | ||
507 | |||
508 | /* GPIO I2C AP 1.8V */ | ||
509 | #define AP_I2C_GPIO_BUS_5 5 | ||
510 | static struct i2c_gpio_platform_data aquila_i2c_gpio5_data = { | ||
511 | .sda_pin = S5PV210_MP05(3), /* XM0ADDR_11 */ | ||
512 | .scl_pin = S5PV210_MP05(2), /* XM0ADDR_10 */ | ||
513 | }; | ||
514 | |||
515 | static struct platform_device aquila_i2c_gpio5 = { | ||
516 | .name = "i2c-gpio", | ||
517 | .id = AP_I2C_GPIO_BUS_5, | ||
518 | .dev = { | ||
519 | .platform_data = &aquila_i2c_gpio5_data, | ||
520 | }, | ||
521 | }; | ||
522 | |||
523 | static struct i2c_board_info i2c_gpio5_devs[] __initdata = { | ||
524 | { | ||
525 | /* CS/ADDR = low 0x34 (FYI: high = 0x36) */ | ||
526 | I2C_BOARD_INFO("wm8994", 0x1a), | ||
527 | .platform_data = &wm8994_platform_data, | ||
528 | }, | ||
529 | }; | ||
530 | |||
531 | /* PMIC Power button */ | ||
532 | static struct gpio_keys_button aquila_gpio_keys_table[] = { | ||
533 | { | ||
534 | .code = KEY_POWER, | ||
535 | .gpio = S5PV210_GPH2(6), | ||
536 | .desc = "gpio-keys: KEY_POWER", | ||
537 | .type = EV_KEY, | ||
538 | .active_low = 1, | ||
539 | .wakeup = 1, | ||
540 | .debounce_interval = 1, | ||
541 | }, | ||
542 | }; | ||
543 | |||
544 | static struct gpio_keys_platform_data aquila_gpio_keys_data = { | ||
545 | .buttons = aquila_gpio_keys_table, | ||
546 | .nbuttons = ARRAY_SIZE(aquila_gpio_keys_table), | ||
547 | }; | ||
548 | |||
549 | static struct platform_device aquila_device_gpiokeys = { | ||
550 | .name = "gpio-keys", | ||
551 | .dev = { | ||
552 | .platform_data = &aquila_gpio_keys_data, | ||
553 | }, | ||
554 | }; | ||
555 | |||
556 | static void __init aquila_pmic_init(void) | ||
557 | { | ||
558 | /* AP_PMIC_IRQ: EINT7 */ | ||
559 | s3c_gpio_cfgpin(S5PV210_GPH0(7), S3C_GPIO_SFN(0xf)); | ||
560 | s3c_gpio_setpull(S5PV210_GPH0(7), S3C_GPIO_PULL_UP); | ||
561 | |||
562 | /* nPower: EINT22 */ | ||
563 | s3c_gpio_cfgpin(S5PV210_GPH2(6), S3C_GPIO_SFN(0xf)); | ||
564 | s3c_gpio_setpull(S5PV210_GPH2(6), S3C_GPIO_PULL_UP); | ||
565 | } | ||
566 | |||
567 | /* MoviNAND */ | ||
568 | static struct s3c_sdhci_platdata aquila_hsmmc0_data __initdata = { | ||
569 | .max_width = 4, | ||
570 | .cd_type = S3C_SDHCI_CD_PERMANENT, | ||
571 | }; | ||
572 | |||
573 | /* Wireless LAN */ | ||
574 | static struct s3c_sdhci_platdata aquila_hsmmc1_data __initdata = { | ||
575 | .max_width = 4, | ||
576 | .cd_type = S3C_SDHCI_CD_EXTERNAL, | ||
577 | /* ext_cd_{init,cleanup} callbacks will be added later */ | ||
578 | }; | ||
579 | |||
580 | /* External Flash */ | ||
581 | #define AQUILA_EXT_FLASH_EN S5PV210_MP05(4) | ||
582 | #define AQUILA_EXT_FLASH_CD S5PV210_GPH3(4) | ||
583 | static struct s3c_sdhci_platdata aquila_hsmmc2_data __initdata = { | ||
584 | .max_width = 4, | ||
585 | .cd_type = S3C_SDHCI_CD_GPIO, | ||
586 | .ext_cd_gpio = AQUILA_EXT_FLASH_CD, | ||
587 | .ext_cd_gpio_invert = 1, | ||
588 | }; | ||
589 | |||
590 | static void aquila_setup_sdhci(void) | ||
591 | { | ||
592 | gpio_request_one(AQUILA_EXT_FLASH_EN, GPIOF_OUT_INIT_HIGH, "FLASH_EN"); | ||
593 | |||
594 | s3c_sdhci0_set_platdata(&aquila_hsmmc0_data); | ||
595 | s3c_sdhci1_set_platdata(&aquila_hsmmc1_data); | ||
596 | s3c_sdhci2_set_platdata(&aquila_hsmmc2_data); | ||
597 | }; | ||
598 | |||
599 | /* Audio device */ | ||
600 | static struct platform_device aquila_device_audio = { | ||
601 | .name = "smdk-audio", | ||
602 | .id = -1, | ||
603 | }; | ||
604 | |||
605 | static struct platform_device *aquila_devices[] __initdata = { | ||
606 | &aquila_i2c_gpio_pmic, | ||
607 | &aquila_i2c_gpio5, | ||
608 | &aquila_device_gpiokeys, | ||
609 | &aquila_device_audio, | ||
610 | &s3c_device_fb, | ||
611 | &s5p_device_onenand, | ||
612 | &s3c_device_hsmmc0, | ||
613 | &s3c_device_hsmmc1, | ||
614 | &s3c_device_hsmmc2, | ||
615 | &s5p_device_fimc0, | ||
616 | &s5p_device_fimc1, | ||
617 | &s5p_device_fimc2, | ||
618 | &s5p_device_fimc_md, | ||
619 | &s5pv210_device_iis0, | ||
620 | &wm8994_fixed_voltage0, | ||
621 | &wm8994_fixed_voltage1, | ||
622 | }; | ||
623 | |||
624 | static void __init aquila_sound_init(void) | ||
625 | { | ||
626 | unsigned int gpio; | ||
627 | |||
628 | /* CODEC_XTAL_EN | ||
629 | * | ||
630 | * The Aquila board have a oscillator which provide main clock | ||
631 | * to WM8994 codec. The oscillator provide 24MHz clock to WM8994 | ||
632 | * clock. Set gpio setting of "CODEC_XTAL_EN" to enable a oscillator. | ||
633 | * */ | ||
634 | gpio = S5PV210_GPH3(2); /* XEINT_26 */ | ||
635 | gpio_request(gpio, "CODEC_XTAL_EN"); | ||
636 | s3c_gpio_cfgpin(gpio, S3C_GPIO_OUTPUT); | ||
637 | s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); | ||
638 | |||
639 | /* Ths main clock of WM8994 codec uses the output of CLKOUT pin. | ||
640 | * The CLKOUT[9:8] set to 0x3(XUSBXTI) of 0xE010E000(OTHERS) | ||
641 | * because it needs 24MHz clock to operate WM8994 codec. | ||
642 | */ | ||
643 | __raw_writel(__raw_readl(S5P_OTHERS) | (0x3 << 8), S5P_OTHERS); | ||
644 | } | ||
645 | |||
646 | static void __init aquila_map_io(void) | ||
647 | { | ||
648 | s5pv210_init_io(NULL, 0); | ||
649 | s3c24xx_init_clocks(24000000); | ||
650 | s3c24xx_init_uarts(aquila_uartcfgs, ARRAY_SIZE(aquila_uartcfgs)); | ||
651 | samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); | ||
652 | } | ||
653 | |||
654 | static void __init aquila_machine_init(void) | ||
655 | { | ||
656 | /* PMIC */ | ||
657 | aquila_pmic_init(); | ||
658 | i2c_register_board_info(AP_I2C_GPIO_PMIC_BUS_4, i2c_gpio_pmic_devs, | ||
659 | ARRAY_SIZE(i2c_gpio_pmic_devs)); | ||
660 | /* SDHCI */ | ||
661 | aquila_setup_sdhci(); | ||
662 | |||
663 | s3c_fimc_setname(0, "s5p-fimc"); | ||
664 | s3c_fimc_setname(1, "s5p-fimc"); | ||
665 | s3c_fimc_setname(2, "s5p-fimc"); | ||
666 | |||
667 | /* SOUND */ | ||
668 | aquila_sound_init(); | ||
669 | i2c_register_board_info(AP_I2C_GPIO_BUS_5, i2c_gpio5_devs, | ||
670 | ARRAY_SIZE(i2c_gpio5_devs)); | ||
671 | |||
672 | /* FB */ | ||
673 | s3c_fb_set_platdata(&aquila_lcd_pdata); | ||
674 | |||
675 | platform_add_devices(aquila_devices, ARRAY_SIZE(aquila_devices)); | ||
676 | } | ||
677 | |||
678 | MACHINE_START(AQUILA, "Aquila") | ||
679 | /* Maintainers: | ||
680 | Marek Szyprowski <m.szyprowski@samsung.com> | ||
681 | Kyungmin Park <kyungmin.park@samsung.com> */ | ||
682 | .atag_offset = 0x100, | ||
683 | .init_irq = s5pv210_init_irq, | ||
684 | .map_io = aquila_map_io, | ||
685 | .init_machine = aquila_machine_init, | ||
686 | .init_time = samsung_timer_init, | ||
687 | .restart = s5pv210_restart, | ||
688 | MACHINE_END | ||
diff --git a/arch/arm/mach-s5pv210/mach-goni.c b/arch/arm/mach-s5pv210/mach-goni.c deleted file mode 100644 index 096a8173a1d9..000000000000 --- a/arch/arm/mach-s5pv210/mach-goni.c +++ /dev/null | |||
@@ -1,917 +0,0 @@ | |||
1 | /* linux/arch/arm/mach-s5pv210/mach-goni.c | ||
2 | * | ||
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.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/kernel.h> | ||
12 | #include <linux/types.h> | ||
13 | #include <linux/init.h> | ||
14 | #include <linux/serial_core.h> | ||
15 | #include <linux/serial_s3c.h> | ||
16 | #include <linux/fb.h> | ||
17 | #include <linux/i2c.h> | ||
18 | #include <linux/i2c-gpio.h> | ||
19 | #include <linux/i2c/atmel_mxt_ts.h> | ||
20 | #include <linux/mfd/max8998.h> | ||
21 | #include <linux/mfd/wm8994/pdata.h> | ||
22 | #include <linux/regulator/fixed.h> | ||
23 | #include <linux/spi/spi.h> | ||
24 | #include <linux/spi/spi_gpio.h> | ||
25 | #include <linux/lcd.h> | ||
26 | #include <linux/gpio_keys.h> | ||
27 | #include <linux/input.h> | ||
28 | #include <linux/gpio.h> | ||
29 | #include <linux/mmc/host.h> | ||
30 | #include <linux/interrupt.h> | ||
31 | #include <linux/platform_data/s3c-hsotg.h> | ||
32 | |||
33 | #include <asm/mach/arch.h> | ||
34 | #include <asm/mach/map.h> | ||
35 | #include <asm/setup.h> | ||
36 | #include <asm/mach-types.h> | ||
37 | |||
38 | #include <video/samsung_fimd.h> | ||
39 | #include <mach/map.h> | ||
40 | #include <mach/regs-clock.h> | ||
41 | #include <mach/gpio-samsung.h> | ||
42 | |||
43 | #include <plat/gpio-cfg.h> | ||
44 | #include <plat/devs.h> | ||
45 | #include <plat/cpu.h> | ||
46 | #include <plat/fb.h> | ||
47 | #include <linux/platform_data/i2c-s3c2410.h> | ||
48 | #include <plat/keypad.h> | ||
49 | #include <plat/sdhci.h> | ||
50 | #include <plat/clock.h> | ||
51 | #include <plat/samsung-time.h> | ||
52 | #include <plat/mfc.h> | ||
53 | |||
54 | #include "common.h" | ||
55 | |||
56 | /* Following are default values for UCON, ULCON and UFCON UART registers */ | ||
57 | #define GONI_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ | ||
58 | S3C2410_UCON_RXILEVEL | \ | ||
59 | S3C2410_UCON_TXIRQMODE | \ | ||
60 | S3C2410_UCON_RXIRQMODE | \ | ||
61 | S3C2410_UCON_RXFIFO_TOI | \ | ||
62 | S3C2443_UCON_RXERR_IRQEN) | ||
63 | |||
64 | #define GONI_ULCON_DEFAULT S3C2410_LCON_CS8 | ||
65 | |||
66 | #define GONI_UFCON_DEFAULT S3C2410_UFCON_FIFOMODE | ||
67 | |||
68 | static struct s3c2410_uartcfg goni_uartcfgs[] __initdata = { | ||
69 | [0] = { | ||
70 | .hwport = 0, | ||
71 | .flags = 0, | ||
72 | .ucon = GONI_UCON_DEFAULT, | ||
73 | .ulcon = GONI_ULCON_DEFAULT, | ||
74 | .ufcon = GONI_UFCON_DEFAULT | | ||
75 | S5PV210_UFCON_TXTRIG256 | S5PV210_UFCON_RXTRIG256, | ||
76 | }, | ||
77 | [1] = { | ||
78 | .hwport = 1, | ||
79 | .flags = 0, | ||
80 | .ucon = GONI_UCON_DEFAULT, | ||
81 | .ulcon = GONI_ULCON_DEFAULT, | ||
82 | .ufcon = GONI_UFCON_DEFAULT | | ||
83 | S5PV210_UFCON_TXTRIG64 | S5PV210_UFCON_RXTRIG64, | ||
84 | }, | ||
85 | [2] = { | ||
86 | .hwport = 2, | ||
87 | .flags = 0, | ||
88 | .ucon = GONI_UCON_DEFAULT, | ||
89 | .ulcon = GONI_ULCON_DEFAULT, | ||
90 | .ufcon = GONI_UFCON_DEFAULT | | ||
91 | S5PV210_UFCON_TXTRIG16 | S5PV210_UFCON_RXTRIG16, | ||
92 | }, | ||
93 | [3] = { | ||
94 | .hwport = 3, | ||
95 | .flags = 0, | ||
96 | .ucon = GONI_UCON_DEFAULT, | ||
97 | .ulcon = GONI_ULCON_DEFAULT, | ||
98 | .ufcon = GONI_UFCON_DEFAULT | | ||
99 | S5PV210_UFCON_TXTRIG16 | S5PV210_UFCON_RXTRIG16, | ||
100 | }, | ||
101 | }; | ||
102 | |||
103 | /* Frame Buffer */ | ||
104 | static struct s3c_fb_pd_win goni_fb_win0 = { | ||
105 | .max_bpp = 32, | ||
106 | .default_bpp = 16, | ||
107 | .xres = 480, | ||
108 | .yres = 800, | ||
109 | .virtual_x = 480, | ||
110 | .virtual_y = 2 * 800, | ||
111 | }; | ||
112 | |||
113 | static struct fb_videomode goni_lcd_timing = { | ||
114 | .left_margin = 16, | ||
115 | .right_margin = 16, | ||
116 | .upper_margin = 2, | ||
117 | .lower_margin = 28, | ||
118 | .hsync_len = 2, | ||
119 | .vsync_len = 1, | ||
120 | .xres = 480, | ||
121 | .yres = 800, | ||
122 | .refresh = 55, | ||
123 | }; | ||
124 | |||
125 | static struct s3c_fb_platdata goni_lcd_pdata __initdata = { | ||
126 | .win[0] = &goni_fb_win0, | ||
127 | .vtiming = &goni_lcd_timing, | ||
128 | .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB | | ||
129 | VIDCON0_CLKSEL_LCD, | ||
130 | .vidcon1 = VIDCON1_INV_VCLK | VIDCON1_INV_VDEN | ||
131 | | VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC, | ||
132 | .setup_gpio = s5pv210_fb_gpio_setup_24bpp, | ||
133 | }; | ||
134 | |||
135 | static int lcd_power_on(struct lcd_device *ld, int enable) | ||
136 | { | ||
137 | return 1; | ||
138 | } | ||
139 | |||
140 | static int reset_lcd(struct lcd_device *ld) | ||
141 | { | ||
142 | static unsigned int first = 1; | ||
143 | int reset_gpio = -1; | ||
144 | |||
145 | reset_gpio = S5PV210_MP05(5); | ||
146 | |||
147 | if (first) { | ||
148 | gpio_request(reset_gpio, "MLCD_RST"); | ||
149 | first = 0; | ||
150 | } | ||
151 | |||
152 | gpio_direction_output(reset_gpio, 1); | ||
153 | return 1; | ||
154 | } | ||
155 | |||
156 | static struct lcd_platform_data goni_lcd_platform_data = { | ||
157 | .reset = reset_lcd, | ||
158 | .power_on = lcd_power_on, | ||
159 | .lcd_enabled = 0, | ||
160 | .reset_delay = 120, /* 120ms */ | ||
161 | .power_on_delay = 25, /* 25ms */ | ||
162 | .power_off_delay = 200, /* 200ms */ | ||
163 | }; | ||
164 | |||
165 | #define LCD_BUS_NUM 3 | ||
166 | static struct spi_board_info spi_board_info[] __initdata = { | ||
167 | { | ||
168 | .modalias = "s6e63m0", | ||
169 | .platform_data = &goni_lcd_platform_data, | ||
170 | .max_speed_hz = 1200000, | ||
171 | .bus_num = LCD_BUS_NUM, | ||
172 | .chip_select = 0, | ||
173 | .mode = SPI_MODE_3, | ||
174 | .controller_data = (void *)S5PV210_MP01(1), /* DISPLAY_CS */ | ||
175 | }, | ||
176 | }; | ||
177 | |||
178 | static struct spi_gpio_platform_data lcd_spi_gpio_data = { | ||
179 | .sck = S5PV210_MP04(1), /* DISPLAY_CLK */ | ||
180 | .mosi = S5PV210_MP04(3), /* DISPLAY_SI */ | ||
181 | .miso = SPI_GPIO_NO_MISO, | ||
182 | .num_chipselect = 1, | ||
183 | }; | ||
184 | |||
185 | static struct platform_device goni_spi_gpio = { | ||
186 | .name = "spi_gpio", | ||
187 | .id = LCD_BUS_NUM, | ||
188 | .dev = { | ||
189 | .parent = &s3c_device_fb.dev, | ||
190 | .platform_data = &lcd_spi_gpio_data, | ||
191 | }, | ||
192 | }; | ||
193 | |||
194 | /* KEYPAD */ | ||
195 | static uint32_t keymap[] __initdata = { | ||
196 | /* KEY(row, col, keycode) */ | ||
197 | KEY(0, 1, KEY_MENU), /* Send */ | ||
198 | KEY(0, 2, KEY_BACK), /* End */ | ||
199 | KEY(1, 1, KEY_CONFIG), /* Half shot */ | ||
200 | KEY(1, 2, KEY_VOLUMEUP), | ||
201 | KEY(2, 1, KEY_CAMERA), /* Full shot */ | ||
202 | KEY(2, 2, KEY_VOLUMEDOWN), | ||
203 | }; | ||
204 | |||
205 | static struct matrix_keymap_data keymap_data __initdata = { | ||
206 | .keymap = keymap, | ||
207 | .keymap_size = ARRAY_SIZE(keymap), | ||
208 | }; | ||
209 | |||
210 | static struct samsung_keypad_platdata keypad_data __initdata = { | ||
211 | .keymap_data = &keymap_data, | ||
212 | .rows = 3, | ||
213 | .cols = 3, | ||
214 | }; | ||
215 | |||
216 | /* Radio */ | ||
217 | static struct i2c_board_info i2c1_devs[] __initdata = { | ||
218 | { | ||
219 | I2C_BOARD_INFO("si470x", 0x10), | ||
220 | }, | ||
221 | }; | ||
222 | |||
223 | static void __init goni_radio_init(void) | ||
224 | { | ||
225 | int gpio; | ||
226 | |||
227 | gpio = S5PV210_GPJ2(4); /* XMSMDATA_4 */ | ||
228 | gpio_request(gpio, "FM_INT"); | ||
229 | s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(0xf)); | ||
230 | i2c1_devs[0].irq = gpio_to_irq(gpio); | ||
231 | |||
232 | gpio = S5PV210_GPJ2(5); /* XMSMDATA_5 */ | ||
233 | gpio_request_one(gpio, GPIOF_OUT_INIT_HIGH, "FM_RST"); | ||
234 | } | ||
235 | |||
236 | /* TSP */ | ||
237 | static struct mxt_platform_data qt602240_platform_data = { | ||
238 | .irqflags = IRQF_TRIGGER_FALLING, | ||
239 | }; | ||
240 | |||
241 | static struct s3c2410_platform_i2c i2c2_data __initdata = { | ||
242 | .flags = 0, | ||
243 | .bus_num = 2, | ||
244 | .slave_addr = 0x10, | ||
245 | .frequency = 400 * 1000, | ||
246 | .sda_delay = 100, | ||
247 | }; | ||
248 | |||
249 | static struct i2c_board_info i2c2_devs[] __initdata = { | ||
250 | { | ||
251 | I2C_BOARD_INFO("qt602240_ts", 0x4a), | ||
252 | .platform_data = &qt602240_platform_data, | ||
253 | }, | ||
254 | }; | ||
255 | |||
256 | static void __init goni_tsp_init(void) | ||
257 | { | ||
258 | int gpio; | ||
259 | |||
260 | gpio = S5PV210_GPJ1(3); /* XMSMADDR_11 */ | ||
261 | gpio_request_one(gpio, GPIOF_OUT_INIT_HIGH, "TSP_LDO_ON"); | ||
262 | gpio_export(gpio, 0); | ||
263 | |||
264 | gpio = S5PV210_GPJ0(5); /* XMSMADDR_5 */ | ||
265 | gpio_request(gpio, "TSP_INT"); | ||
266 | |||
267 | s5p_register_gpio_interrupt(gpio); | ||
268 | s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(0xf)); | ||
269 | s3c_gpio_setpull(gpio, S3C_GPIO_PULL_UP); | ||
270 | i2c2_devs[0].irq = gpio_to_irq(gpio); | ||
271 | } | ||
272 | |||
273 | /* USB OTG */ | ||
274 | static struct s3c_hsotg_plat goni_hsotg_pdata; | ||
275 | |||
276 | /* MAX8998 regulators */ | ||
277 | #if defined(CONFIG_REGULATOR_MAX8998) || defined(CONFIG_REGULATOR_MAX8998_MODULE) | ||
278 | |||
279 | static struct regulator_consumer_supply goni_ldo3_consumers[] = { | ||
280 | REGULATOR_SUPPLY("vusb_a", "s3c-hsotg"), | ||
281 | }; | ||
282 | |||
283 | static struct regulator_consumer_supply goni_ldo5_consumers[] = { | ||
284 | REGULATOR_SUPPLY("vmmc", "s3c-sdhci.0"), | ||
285 | }; | ||
286 | |||
287 | static struct regulator_consumer_supply goni_ldo8_consumers[] = { | ||
288 | REGULATOR_SUPPLY("vusb_d", "s3c-hsotg"), | ||
289 | REGULATOR_SUPPLY("vdd33a_dac", "s5p-sdo"), | ||
290 | }; | ||
291 | |||
292 | static struct regulator_consumer_supply goni_ldo11_consumers[] = { | ||
293 | REGULATOR_SUPPLY("vddio", "0-0030"), /* "CAM_IO_2.8V" */ | ||
294 | }; | ||
295 | |||
296 | static struct regulator_consumer_supply goni_ldo13_consumers[] = { | ||
297 | REGULATOR_SUPPLY("vdda", "0-0030"), /* "CAM_A_2.8V" */ | ||
298 | }; | ||
299 | |||
300 | static struct regulator_consumer_supply goni_ldo14_consumers[] = { | ||
301 | REGULATOR_SUPPLY("vdd_core", "0-0030"), /* "CAM_CIF_1.8V" */ | ||
302 | }; | ||
303 | |||
304 | static struct regulator_init_data goni_ldo2_data = { | ||
305 | .constraints = { | ||
306 | .name = "VALIVE_1.1V", | ||
307 | .min_uV = 1100000, | ||
308 | .max_uV = 1100000, | ||
309 | .apply_uV = 1, | ||
310 | .always_on = 1, | ||
311 | .state_mem = { | ||
312 | .enabled = 1, | ||
313 | }, | ||
314 | }, | ||
315 | }; | ||
316 | |||
317 | static struct regulator_init_data goni_ldo3_data = { | ||
318 | .constraints = { | ||
319 | .name = "VUSB+MIPI_1.1V", | ||
320 | .min_uV = 1100000, | ||
321 | .max_uV = 1100000, | ||
322 | .apply_uV = 1, | ||
323 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | ||
324 | }, | ||
325 | .num_consumer_supplies = ARRAY_SIZE(goni_ldo3_consumers), | ||
326 | .consumer_supplies = goni_ldo3_consumers, | ||
327 | }; | ||
328 | |||
329 | static struct regulator_init_data goni_ldo4_data = { | ||
330 | .constraints = { | ||
331 | .name = "VDAC_3.3V", | ||
332 | .min_uV = 3300000, | ||
333 | .max_uV = 3300000, | ||
334 | .apply_uV = 1, | ||
335 | }, | ||
336 | }; | ||
337 | |||
338 | static struct regulator_init_data goni_ldo5_data = { | ||
339 | .constraints = { | ||
340 | .name = "VTF_2.8V", | ||
341 | .min_uV = 2800000, | ||
342 | .max_uV = 2800000, | ||
343 | .apply_uV = 1, | ||
344 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | ||
345 | }, | ||
346 | .num_consumer_supplies = ARRAY_SIZE(goni_ldo5_consumers), | ||
347 | .consumer_supplies = goni_ldo5_consumers, | ||
348 | }; | ||
349 | |||
350 | static struct regulator_init_data goni_ldo6_data = { | ||
351 | .constraints = { | ||
352 | .name = "VCC_3.3V", | ||
353 | .min_uV = 3300000, | ||
354 | .max_uV = 3300000, | ||
355 | .apply_uV = 1, | ||
356 | }, | ||
357 | }; | ||
358 | |||
359 | static struct regulator_init_data goni_ldo7_data = { | ||
360 | .constraints = { | ||
361 | .name = "VLCD_1.8V", | ||
362 | .min_uV = 1800000, | ||
363 | .max_uV = 1800000, | ||
364 | .apply_uV = 1, | ||
365 | .always_on = 1, | ||
366 | }, | ||
367 | }; | ||
368 | |||
369 | static struct regulator_init_data goni_ldo8_data = { | ||
370 | .constraints = { | ||
371 | .name = "VUSB+VADC_3.3V", | ||
372 | .min_uV = 3300000, | ||
373 | .max_uV = 3300000, | ||
374 | .apply_uV = 1, | ||
375 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | ||
376 | }, | ||
377 | .num_consumer_supplies = ARRAY_SIZE(goni_ldo8_consumers), | ||
378 | .consumer_supplies = goni_ldo8_consumers, | ||
379 | }; | ||
380 | |||
381 | static struct regulator_init_data goni_ldo9_data = { | ||
382 | .constraints = { | ||
383 | .name = "VCC+VCAM_2.8V", | ||
384 | .min_uV = 2800000, | ||
385 | .max_uV = 2800000, | ||
386 | .apply_uV = 1, | ||
387 | }, | ||
388 | }; | ||
389 | |||
390 | static struct regulator_init_data goni_ldo10_data = { | ||
391 | .constraints = { | ||
392 | .name = "VPLL_1.1V", | ||
393 | .min_uV = 1100000, | ||
394 | .max_uV = 1100000, | ||
395 | .apply_uV = 1, | ||
396 | .boot_on = 1, | ||
397 | }, | ||
398 | }; | ||
399 | |||
400 | static struct regulator_init_data goni_ldo11_data = { | ||
401 | .constraints = { | ||
402 | .name = "CAM_IO_2.8V", | ||
403 | .min_uV = 2800000, | ||
404 | .max_uV = 2800000, | ||
405 | .apply_uV = 1, | ||
406 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | ||
407 | }, | ||
408 | .num_consumer_supplies = ARRAY_SIZE(goni_ldo11_consumers), | ||
409 | .consumer_supplies = goni_ldo11_consumers, | ||
410 | }; | ||
411 | |||
412 | static struct regulator_init_data goni_ldo12_data = { | ||
413 | .constraints = { | ||
414 | .name = "CAM_ISP_1.2V", | ||
415 | .min_uV = 1200000, | ||
416 | .max_uV = 1200000, | ||
417 | .apply_uV = 1, | ||
418 | }, | ||
419 | }; | ||
420 | |||
421 | static struct regulator_init_data goni_ldo13_data = { | ||
422 | .constraints = { | ||
423 | .name = "CAM_A_2.8V", | ||
424 | .min_uV = 2800000, | ||
425 | .max_uV = 2800000, | ||
426 | .apply_uV = 1, | ||
427 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | ||
428 | }, | ||
429 | .num_consumer_supplies = ARRAY_SIZE(goni_ldo13_consumers), | ||
430 | .consumer_supplies = goni_ldo13_consumers, | ||
431 | }; | ||
432 | |||
433 | static struct regulator_init_data goni_ldo14_data = { | ||
434 | .constraints = { | ||
435 | .name = "CAM_CIF_1.8V", | ||
436 | .min_uV = 1800000, | ||
437 | .max_uV = 1800000, | ||
438 | .apply_uV = 1, | ||
439 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | ||
440 | }, | ||
441 | .num_consumer_supplies = ARRAY_SIZE(goni_ldo14_consumers), | ||
442 | .consumer_supplies = goni_ldo14_consumers, | ||
443 | }; | ||
444 | |||
445 | static struct regulator_init_data goni_ldo15_data = { | ||
446 | .constraints = { | ||
447 | .name = "CAM_AF_3.3V", | ||
448 | .min_uV = 3300000, | ||
449 | .max_uV = 3300000, | ||
450 | .apply_uV = 1, | ||
451 | }, | ||
452 | }; | ||
453 | |||
454 | static struct regulator_init_data goni_ldo16_data = { | ||
455 | .constraints = { | ||
456 | .name = "VMIPI_1.8V", | ||
457 | .min_uV = 1800000, | ||
458 | .max_uV = 1800000, | ||
459 | .apply_uV = 1, | ||
460 | }, | ||
461 | }; | ||
462 | |||
463 | static struct regulator_init_data goni_ldo17_data = { | ||
464 | .constraints = { | ||
465 | .name = "VCC_3.0V_LCD", | ||
466 | .min_uV = 3000000, | ||
467 | .max_uV = 3000000, | ||
468 | .apply_uV = 1, | ||
469 | .always_on = 1, | ||
470 | }, | ||
471 | }; | ||
472 | |||
473 | /* BUCK */ | ||
474 | static struct regulator_consumer_supply buck1_consumer = | ||
475 | REGULATOR_SUPPLY("vddarm", NULL); | ||
476 | |||
477 | static struct regulator_consumer_supply buck2_consumer = | ||
478 | REGULATOR_SUPPLY("vddint", NULL); | ||
479 | |||
480 | static struct regulator_consumer_supply buck3_consumer = | ||
481 | REGULATOR_SUPPLY("vdet", "s5p-sdo"); | ||
482 | |||
483 | |||
484 | static struct regulator_init_data goni_buck1_data = { | ||
485 | .constraints = { | ||
486 | .name = "VARM_1.2V", | ||
487 | .min_uV = 1200000, | ||
488 | .max_uV = 1200000, | ||
489 | .apply_uV = 1, | ||
490 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | | ||
491 | REGULATOR_CHANGE_STATUS, | ||
492 | }, | ||
493 | .num_consumer_supplies = 1, | ||
494 | .consumer_supplies = &buck1_consumer, | ||
495 | }; | ||
496 | |||
497 | static struct regulator_init_data goni_buck2_data = { | ||
498 | .constraints = { | ||
499 | .name = "VINT_1.2V", | ||
500 | .min_uV = 1200000, | ||
501 | .max_uV = 1200000, | ||
502 | .apply_uV = 1, | ||
503 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | | ||
504 | REGULATOR_CHANGE_STATUS, | ||
505 | }, | ||
506 | .num_consumer_supplies = 1, | ||
507 | .consumer_supplies = &buck2_consumer, | ||
508 | }; | ||
509 | |||
510 | static struct regulator_init_data goni_buck3_data = { | ||
511 | .constraints = { | ||
512 | .name = "VCC_1.8V", | ||
513 | .min_uV = 1800000, | ||
514 | .max_uV = 1800000, | ||
515 | .apply_uV = 1, | ||
516 | .state_mem = { | ||
517 | .enabled = 1, | ||
518 | }, | ||
519 | }, | ||
520 | .num_consumer_supplies = 1, | ||
521 | .consumer_supplies = &buck3_consumer, | ||
522 | }; | ||
523 | |||
524 | static struct regulator_init_data goni_buck4_data = { | ||
525 | .constraints = { | ||
526 | .name = "CAM_CORE_1.2V", | ||
527 | .min_uV = 1200000, | ||
528 | .max_uV = 1200000, | ||
529 | .apply_uV = 1, | ||
530 | .always_on = 1, | ||
531 | }, | ||
532 | }; | ||
533 | |||
534 | static struct max8998_regulator_data goni_regulators[] = { | ||
535 | { MAX8998_LDO2, &goni_ldo2_data }, | ||
536 | { MAX8998_LDO3, &goni_ldo3_data }, | ||
537 | { MAX8998_LDO4, &goni_ldo4_data }, | ||
538 | { MAX8998_LDO5, &goni_ldo5_data }, | ||
539 | { MAX8998_LDO6, &goni_ldo6_data }, | ||
540 | { MAX8998_LDO7, &goni_ldo7_data }, | ||
541 | { MAX8998_LDO8, &goni_ldo8_data }, | ||
542 | { MAX8998_LDO9, &goni_ldo9_data }, | ||
543 | { MAX8998_LDO10, &goni_ldo10_data }, | ||
544 | { MAX8998_LDO11, &goni_ldo11_data }, | ||
545 | { MAX8998_LDO12, &goni_ldo12_data }, | ||
546 | { MAX8998_LDO13, &goni_ldo13_data }, | ||
547 | { MAX8998_LDO14, &goni_ldo14_data }, | ||
548 | { MAX8998_LDO15, &goni_ldo15_data }, | ||
549 | { MAX8998_LDO16, &goni_ldo16_data }, | ||
550 | { MAX8998_LDO17, &goni_ldo17_data }, | ||
551 | { MAX8998_BUCK1, &goni_buck1_data }, | ||
552 | { MAX8998_BUCK2, &goni_buck2_data }, | ||
553 | { MAX8998_BUCK3, &goni_buck3_data }, | ||
554 | { MAX8998_BUCK4, &goni_buck4_data }, | ||
555 | }; | ||
556 | |||
557 | static struct max8998_platform_data goni_max8998_pdata = { | ||
558 | .num_regulators = ARRAY_SIZE(goni_regulators), | ||
559 | .regulators = goni_regulators, | ||
560 | .buck1_set1 = S5PV210_GPH0(3), | ||
561 | .buck1_set2 = S5PV210_GPH0(4), | ||
562 | .buck2_set3 = S5PV210_GPH0(5), | ||
563 | .buck1_voltage = { 1200000, 1200000, 1200000, 1200000 }, | ||
564 | .buck2_voltage = { 1200000, 1200000 }, | ||
565 | }; | ||
566 | #endif | ||
567 | |||
568 | static struct regulator_consumer_supply wm8994_fixed_voltage0_supplies[] = { | ||
569 | REGULATOR_SUPPLY("DBVDD", "5-001a"), | ||
570 | REGULATOR_SUPPLY("AVDD2", "5-001a"), | ||
571 | REGULATOR_SUPPLY("CPVDD", "5-001a"), | ||
572 | }; | ||
573 | |||
574 | static struct regulator_consumer_supply wm8994_fixed_voltage1_supplies[] = { | ||
575 | REGULATOR_SUPPLY("SPKVDD1", "5-001a"), | ||
576 | REGULATOR_SUPPLY("SPKVDD2", "5-001a"), | ||
577 | }; | ||
578 | |||
579 | static struct regulator_init_data wm8994_fixed_voltage0_init_data = { | ||
580 | .constraints = { | ||
581 | .always_on = 1, | ||
582 | }, | ||
583 | .num_consumer_supplies = ARRAY_SIZE(wm8994_fixed_voltage0_supplies), | ||
584 | .consumer_supplies = wm8994_fixed_voltage0_supplies, | ||
585 | }; | ||
586 | |||
587 | static struct regulator_init_data wm8994_fixed_voltage1_init_data = { | ||
588 | .constraints = { | ||
589 | .always_on = 1, | ||
590 | }, | ||
591 | .num_consumer_supplies = ARRAY_SIZE(wm8994_fixed_voltage1_supplies), | ||
592 | .consumer_supplies = wm8994_fixed_voltage1_supplies, | ||
593 | }; | ||
594 | |||
595 | static struct fixed_voltage_config wm8994_fixed_voltage0_config = { | ||
596 | .supply_name = "VCC_1.8V_PDA", | ||
597 | .microvolts = 1800000, | ||
598 | .gpio = -EINVAL, | ||
599 | .init_data = &wm8994_fixed_voltage0_init_data, | ||
600 | }; | ||
601 | |||
602 | static struct fixed_voltage_config wm8994_fixed_voltage1_config = { | ||
603 | .supply_name = "V_BAT", | ||
604 | .microvolts = 3700000, | ||
605 | .gpio = -EINVAL, | ||
606 | .init_data = &wm8994_fixed_voltage1_init_data, | ||
607 | }; | ||
608 | |||
609 | static struct platform_device wm8994_fixed_voltage0 = { | ||
610 | .name = "reg-fixed-voltage", | ||
611 | .id = 0, | ||
612 | .dev = { | ||
613 | .platform_data = &wm8994_fixed_voltage0_config, | ||
614 | }, | ||
615 | }; | ||
616 | |||
617 | static struct platform_device wm8994_fixed_voltage1 = { | ||
618 | .name = "reg-fixed-voltage", | ||
619 | .id = 1, | ||
620 | .dev = { | ||
621 | .platform_data = &wm8994_fixed_voltage1_config, | ||
622 | }, | ||
623 | }; | ||
624 | |||
625 | static struct regulator_consumer_supply wm8994_avdd1_supply = | ||
626 | REGULATOR_SUPPLY("AVDD1", "5-001a"); | ||
627 | |||
628 | static struct regulator_consumer_supply wm8994_dcvdd_supply = | ||
629 | REGULATOR_SUPPLY("DCVDD", "5-001a"); | ||
630 | |||
631 | static struct regulator_init_data wm8994_ldo1_data = { | ||
632 | .constraints = { | ||
633 | .name = "AVDD1_3.0V", | ||
634 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | ||
635 | }, | ||
636 | .num_consumer_supplies = 1, | ||
637 | .consumer_supplies = &wm8994_avdd1_supply, | ||
638 | }; | ||
639 | |||
640 | static struct regulator_init_data wm8994_ldo2_data = { | ||
641 | .constraints = { | ||
642 | .name = "DCVDD_1.0V", | ||
643 | }, | ||
644 | .num_consumer_supplies = 1, | ||
645 | .consumer_supplies = &wm8994_dcvdd_supply, | ||
646 | }; | ||
647 | |||
648 | static struct wm8994_pdata wm8994_platform_data = { | ||
649 | /* configure gpio1 function: 0x0001(Logic level input/output) */ | ||
650 | .gpio_defaults[0] = 0x0001, | ||
651 | /* configure gpio3/4/5/7 function for AIF2 voice */ | ||
652 | .gpio_defaults[2] = 0x8100, | ||
653 | .gpio_defaults[3] = 0x8100, | ||
654 | .gpio_defaults[4] = 0x8100, | ||
655 | .gpio_defaults[6] = 0x0100, | ||
656 | /* configure gpio8/9/10/11 function for AIF3 BT */ | ||
657 | .gpio_defaults[7] = 0x8100, | ||
658 | .gpio_defaults[8] = 0x0100, | ||
659 | .gpio_defaults[9] = 0x0100, | ||
660 | .gpio_defaults[10] = 0x0100, | ||
661 | .ldo[0] = { S5PV210_MP03(6), &wm8994_ldo1_data }, /* XM0FRNB_2 */ | ||
662 | .ldo[1] = { 0, &wm8994_ldo2_data }, | ||
663 | }; | ||
664 | |||
665 | /* GPIO I2C PMIC */ | ||
666 | #define AP_I2C_GPIO_PMIC_BUS_4 4 | ||
667 | static struct i2c_gpio_platform_data goni_i2c_gpio_pmic_data = { | ||
668 | .sda_pin = S5PV210_GPJ4(0), /* XMSMCSN */ | ||
669 | .scl_pin = S5PV210_GPJ4(3), /* XMSMIRQN */ | ||
670 | }; | ||
671 | |||
672 | static struct platform_device goni_i2c_gpio_pmic = { | ||
673 | .name = "i2c-gpio", | ||
674 | .id = AP_I2C_GPIO_PMIC_BUS_4, | ||
675 | .dev = { | ||
676 | .platform_data = &goni_i2c_gpio_pmic_data, | ||
677 | }, | ||
678 | }; | ||
679 | |||
680 | static struct i2c_board_info i2c_gpio_pmic_devs[] __initdata = { | ||
681 | #if defined(CONFIG_REGULATOR_MAX8998) || defined(CONFIG_REGULATOR_MAX8998_MODULE) | ||
682 | { | ||
683 | /* 0xCC when SRAD = 0 */ | ||
684 | I2C_BOARD_INFO("max8998", 0xCC >> 1), | ||
685 | .platform_data = &goni_max8998_pdata, | ||
686 | }, | ||
687 | #endif | ||
688 | }; | ||
689 | |||
690 | /* GPIO I2C AP 1.8V */ | ||
691 | #define AP_I2C_GPIO_BUS_5 5 | ||
692 | static struct i2c_gpio_platform_data goni_i2c_gpio5_data = { | ||
693 | .sda_pin = S5PV210_MP05(3), /* XM0ADDR_11 */ | ||
694 | .scl_pin = S5PV210_MP05(2), /* XM0ADDR_10 */ | ||
695 | }; | ||
696 | |||
697 | static struct platform_device goni_i2c_gpio5 = { | ||
698 | .name = "i2c-gpio", | ||
699 | .id = AP_I2C_GPIO_BUS_5, | ||
700 | .dev = { | ||
701 | .platform_data = &goni_i2c_gpio5_data, | ||
702 | }, | ||
703 | }; | ||
704 | |||
705 | static struct i2c_board_info i2c_gpio5_devs[] __initdata = { | ||
706 | { | ||
707 | /* CS/ADDR = low 0x34 (FYI: high = 0x36) */ | ||
708 | I2C_BOARD_INFO("wm8994", 0x1a), | ||
709 | .platform_data = &wm8994_platform_data, | ||
710 | }, | ||
711 | }; | ||
712 | |||
713 | /* PMIC Power button */ | ||
714 | static struct gpio_keys_button goni_gpio_keys_table[] = { | ||
715 | { | ||
716 | .code = KEY_POWER, | ||
717 | .gpio = S5PV210_GPH2(6), | ||
718 | .desc = "gpio-keys: KEY_POWER", | ||
719 | .type = EV_KEY, | ||
720 | .active_low = 1, | ||
721 | .wakeup = 1, | ||
722 | .debounce_interval = 1, | ||
723 | }, | ||
724 | }; | ||
725 | |||
726 | static struct gpio_keys_platform_data goni_gpio_keys_data = { | ||
727 | .buttons = goni_gpio_keys_table, | ||
728 | .nbuttons = ARRAY_SIZE(goni_gpio_keys_table), | ||
729 | }; | ||
730 | |||
731 | static struct platform_device goni_device_gpiokeys = { | ||
732 | .name = "gpio-keys", | ||
733 | .dev = { | ||
734 | .platform_data = &goni_gpio_keys_data, | ||
735 | }, | ||
736 | }; | ||
737 | |||
738 | static void __init goni_pmic_init(void) | ||
739 | { | ||
740 | /* AP_PMIC_IRQ: EINT7 */ | ||
741 | s3c_gpio_cfgpin(S5PV210_GPH0(7), S3C_GPIO_SFN(0xf)); | ||
742 | s3c_gpio_setpull(S5PV210_GPH0(7), S3C_GPIO_PULL_UP); | ||
743 | |||
744 | /* nPower: EINT22 */ | ||
745 | s3c_gpio_cfgpin(S5PV210_GPH2(6), S3C_GPIO_SFN(0xf)); | ||
746 | s3c_gpio_setpull(S5PV210_GPH2(6), S3C_GPIO_PULL_UP); | ||
747 | } | ||
748 | |||
749 | /* MoviNAND */ | ||
750 | static struct s3c_sdhci_platdata goni_hsmmc0_data __initdata = { | ||
751 | .max_width = 4, | ||
752 | .cd_type = S3C_SDHCI_CD_PERMANENT, | ||
753 | }; | ||
754 | |||
755 | /* Wireless LAN */ | ||
756 | static struct s3c_sdhci_platdata goni_hsmmc1_data __initdata = { | ||
757 | .max_width = 4, | ||
758 | .cd_type = S3C_SDHCI_CD_EXTERNAL, | ||
759 | /* ext_cd_{init,cleanup} callbacks will be added later */ | ||
760 | }; | ||
761 | |||
762 | /* External Flash */ | ||
763 | #define GONI_EXT_FLASH_EN S5PV210_MP05(4) | ||
764 | #define GONI_EXT_FLASH_CD S5PV210_GPH3(4) | ||
765 | static struct s3c_sdhci_platdata goni_hsmmc2_data __initdata = { | ||
766 | .max_width = 4, | ||
767 | .cd_type = S3C_SDHCI_CD_GPIO, | ||
768 | .ext_cd_gpio = GONI_EXT_FLASH_CD, | ||
769 | .ext_cd_gpio_invert = 1, | ||
770 | }; | ||
771 | |||
772 | static struct regulator_consumer_supply mmc2_supplies[] = { | ||
773 | REGULATOR_SUPPLY("vmmc", "s3c-sdhci.2"), | ||
774 | }; | ||
775 | |||
776 | static struct regulator_init_data mmc2_fixed_voltage_init_data = { | ||
777 | .constraints = { | ||
778 | .name = "V_TF_2.8V", | ||
779 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | ||
780 | }, | ||
781 | .num_consumer_supplies = ARRAY_SIZE(mmc2_supplies), | ||
782 | .consumer_supplies = mmc2_supplies, | ||
783 | }; | ||
784 | |||
785 | static struct fixed_voltage_config mmc2_fixed_voltage_config = { | ||
786 | .supply_name = "EXT_FLASH_EN", | ||
787 | .microvolts = 2800000, | ||
788 | .gpio = GONI_EXT_FLASH_EN, | ||
789 | .enable_high = true, | ||
790 | .init_data = &mmc2_fixed_voltage_init_data, | ||
791 | }; | ||
792 | |||
793 | static struct platform_device mmc2_fixed_voltage = { | ||
794 | .name = "reg-fixed-voltage", | ||
795 | .id = 2, | ||
796 | .dev = { | ||
797 | .platform_data = &mmc2_fixed_voltage_config, | ||
798 | }, | ||
799 | }; | ||
800 | |||
801 | static void goni_setup_sdhci(void) | ||
802 | { | ||
803 | s3c_sdhci0_set_platdata(&goni_hsmmc0_data); | ||
804 | s3c_sdhci1_set_platdata(&goni_hsmmc1_data); | ||
805 | s3c_sdhci2_set_platdata(&goni_hsmmc2_data); | ||
806 | }; | ||
807 | |||
808 | /* Audio device */ | ||
809 | static struct platform_device goni_device_audio = { | ||
810 | .name = "smdk-audio", | ||
811 | .id = -1, | ||
812 | }; | ||
813 | |||
814 | static struct platform_device *goni_devices[] __initdata = { | ||
815 | &s3c_device_fb, | ||
816 | &s5p_device_onenand, | ||
817 | &goni_spi_gpio, | ||
818 | &goni_i2c_gpio_pmic, | ||
819 | &goni_i2c_gpio5, | ||
820 | &goni_device_audio, | ||
821 | &mmc2_fixed_voltage, | ||
822 | &goni_device_gpiokeys, | ||
823 | &s5p_device_mfc, | ||
824 | &s5p_device_mfc_l, | ||
825 | &s5p_device_mfc_r, | ||
826 | &s5p_device_mixer, | ||
827 | &s5p_device_sdo, | ||
828 | &s3c_device_i2c0, | ||
829 | &s3c_device_hsmmc0, | ||
830 | &s3c_device_hsmmc1, | ||
831 | &s3c_device_hsmmc2, | ||
832 | &s5pv210_device_iis0, | ||
833 | &s3c_device_usb_hsotg, | ||
834 | &samsung_device_keypad, | ||
835 | &s3c_device_i2c1, | ||
836 | &s3c_device_i2c2, | ||
837 | &wm8994_fixed_voltage0, | ||
838 | &wm8994_fixed_voltage1, | ||
839 | }; | ||
840 | |||
841 | static void __init goni_sound_init(void) | ||
842 | { | ||
843 | /* Ths main clock of WM8994 codec uses the output of CLKOUT pin. | ||
844 | * The CLKOUT[9:8] set to 0x3(XUSBXTI) of 0xE010E000(OTHERS) | ||
845 | * because it needs 24MHz clock to operate WM8994 codec. | ||
846 | */ | ||
847 | __raw_writel(__raw_readl(S5P_OTHERS) | (0x3 << 8), S5P_OTHERS); | ||
848 | } | ||
849 | |||
850 | static void __init goni_map_io(void) | ||
851 | { | ||
852 | s5pv210_init_io(NULL, 0); | ||
853 | s3c24xx_init_clocks(clk_xusbxti.rate); | ||
854 | s3c24xx_init_uarts(goni_uartcfgs, ARRAY_SIZE(goni_uartcfgs)); | ||
855 | samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); | ||
856 | } | ||
857 | |||
858 | static void __init goni_reserve(void) | ||
859 | { | ||
860 | s5p_mfc_reserve_mem(0x43000000, 8 << 20, 0x51000000, 8 << 20); | ||
861 | } | ||
862 | |||
863 | static void __init goni_machine_init(void) | ||
864 | { | ||
865 | /* Radio: call before I2C 1 registeration */ | ||
866 | goni_radio_init(); | ||
867 | |||
868 | /* I2C0 */ | ||
869 | s3c_i2c0_set_platdata(NULL); | ||
870 | |||
871 | /* I2C1 */ | ||
872 | s3c_i2c1_set_platdata(NULL); | ||
873 | i2c_register_board_info(1, i2c1_devs, ARRAY_SIZE(i2c1_devs)); | ||
874 | |||
875 | /* TSP: call before I2C 2 registeration */ | ||
876 | goni_tsp_init(); | ||
877 | |||
878 | /* I2C2 */ | ||
879 | s3c_i2c2_set_platdata(&i2c2_data); | ||
880 | i2c_register_board_info(2, i2c2_devs, ARRAY_SIZE(i2c2_devs)); | ||
881 | |||
882 | /* PMIC */ | ||
883 | goni_pmic_init(); | ||
884 | i2c_register_board_info(AP_I2C_GPIO_PMIC_BUS_4, i2c_gpio_pmic_devs, | ||
885 | ARRAY_SIZE(i2c_gpio_pmic_devs)); | ||
886 | /* SDHCI */ | ||
887 | goni_setup_sdhci(); | ||
888 | |||
889 | /* SOUND */ | ||
890 | goni_sound_init(); | ||
891 | i2c_register_board_info(AP_I2C_GPIO_BUS_5, i2c_gpio5_devs, | ||
892 | ARRAY_SIZE(i2c_gpio5_devs)); | ||
893 | |||
894 | /* FB */ | ||
895 | s3c_fb_set_platdata(&goni_lcd_pdata); | ||
896 | |||
897 | s3c_hsotg_set_platdata(&goni_hsotg_pdata); | ||
898 | |||
899 | /* SPI */ | ||
900 | spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info)); | ||
901 | |||
902 | /* KEYPAD */ | ||
903 | samsung_keypad_set_platdata(&keypad_data); | ||
904 | |||
905 | platform_add_devices(goni_devices, ARRAY_SIZE(goni_devices)); | ||
906 | } | ||
907 | |||
908 | MACHINE_START(GONI, "GONI") | ||
909 | /* Maintainers: Kyungmin Park <kyungmin.park@samsung.com> */ | ||
910 | .atag_offset = 0x100, | ||
911 | .init_irq = s5pv210_init_irq, | ||
912 | .map_io = goni_map_io, | ||
913 | .init_machine = goni_machine_init, | ||
914 | .init_time = samsung_timer_init, | ||
915 | .reserve = &goni_reserve, | ||
916 | .restart = s5pv210_restart, | ||
917 | MACHINE_END | ||
diff --git a/arch/arm/mach-s5pv210/mach-smdkc110.c b/arch/arm/mach-s5pv210/mach-smdkc110.c deleted file mode 100644 index 448e1d2eeed6..000000000000 --- a/arch/arm/mach-s5pv210/mach-smdkc110.c +++ /dev/null | |||
@@ -1,159 +0,0 @@ | |||
1 | /* linux/arch/arm/mach-s5pv210/mach-smdkc110.c | ||
2 | * | ||
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.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/kernel.h> | ||
12 | #include <linux/types.h> | ||
13 | #include <linux/init.h> | ||
14 | #include <linux/serial_core.h> | ||
15 | #include <linux/serial_s3c.h> | ||
16 | #include <linux/i2c.h> | ||
17 | #include <linux/device.h> | ||
18 | |||
19 | #include <asm/mach/arch.h> | ||
20 | #include <asm/mach/map.h> | ||
21 | #include <asm/setup.h> | ||
22 | #include <asm/mach-types.h> | ||
23 | |||
24 | #include <mach/map.h> | ||
25 | #include <mach/regs-clock.h> | ||
26 | |||
27 | #include <plat/devs.h> | ||
28 | #include <plat/cpu.h> | ||
29 | #include <linux/platform_data/ata-samsung_cf.h> | ||
30 | #include <linux/platform_data/i2c-s3c2410.h> | ||
31 | #include <plat/pm.h> | ||
32 | #include <plat/samsung-time.h> | ||
33 | #include <plat/mfc.h> | ||
34 | |||
35 | #include "common.h" | ||
36 | |||
37 | /* Following are default values for UCON, ULCON and UFCON UART registers */ | ||
38 | #define SMDKC110_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ | ||
39 | S3C2410_UCON_RXILEVEL | \ | ||
40 | S3C2410_UCON_TXIRQMODE | \ | ||
41 | S3C2410_UCON_RXIRQMODE | \ | ||
42 | S3C2410_UCON_RXFIFO_TOI | \ | ||
43 | S3C2443_UCON_RXERR_IRQEN) | ||
44 | |||
45 | #define SMDKC110_ULCON_DEFAULT S3C2410_LCON_CS8 | ||
46 | |||
47 | #define SMDKC110_UFCON_DEFAULT (S3C2410_UFCON_FIFOMODE | \ | ||
48 | S5PV210_UFCON_TXTRIG4 | \ | ||
49 | S5PV210_UFCON_RXTRIG4) | ||
50 | |||
51 | static struct s3c2410_uartcfg smdkv210_uartcfgs[] __initdata = { | ||
52 | [0] = { | ||
53 | .hwport = 0, | ||
54 | .flags = 0, | ||
55 | .ucon = SMDKC110_UCON_DEFAULT, | ||
56 | .ulcon = SMDKC110_ULCON_DEFAULT, | ||
57 | .ufcon = SMDKC110_UFCON_DEFAULT, | ||
58 | }, | ||
59 | [1] = { | ||
60 | .hwport = 1, | ||
61 | .flags = 0, | ||
62 | .ucon = SMDKC110_UCON_DEFAULT, | ||
63 | .ulcon = SMDKC110_ULCON_DEFAULT, | ||
64 | .ufcon = SMDKC110_UFCON_DEFAULT, | ||
65 | }, | ||
66 | [2] = { | ||
67 | .hwport = 2, | ||
68 | .flags = 0, | ||
69 | .ucon = SMDKC110_UCON_DEFAULT, | ||
70 | .ulcon = SMDKC110_ULCON_DEFAULT, | ||
71 | .ufcon = SMDKC110_UFCON_DEFAULT, | ||
72 | }, | ||
73 | [3] = { | ||
74 | .hwport = 3, | ||
75 | .flags = 0, | ||
76 | .ucon = SMDKC110_UCON_DEFAULT, | ||
77 | .ulcon = SMDKC110_ULCON_DEFAULT, | ||
78 | .ufcon = SMDKC110_UFCON_DEFAULT, | ||
79 | }, | ||
80 | }; | ||
81 | |||
82 | static struct s3c_ide_platdata smdkc110_ide_pdata __initdata = { | ||
83 | .setup_gpio = s5pv210_ide_setup_gpio, | ||
84 | }; | ||
85 | |||
86 | static struct platform_device *smdkc110_devices[] __initdata = { | ||
87 | &s5pv210_device_iis0, | ||
88 | &s5pv210_device_ac97, | ||
89 | &s5pv210_device_spdif, | ||
90 | &s3c_device_cfcon, | ||
91 | &s3c_device_i2c0, | ||
92 | &s3c_device_i2c1, | ||
93 | &s3c_device_i2c2, | ||
94 | &s3c_device_rtc, | ||
95 | &s3c_device_wdt, | ||
96 | &s5p_device_fimc0, | ||
97 | &s5p_device_fimc1, | ||
98 | &s5p_device_fimc2, | ||
99 | &s5p_device_fimc_md, | ||
100 | &s5p_device_mfc, | ||
101 | &s5p_device_mfc_l, | ||
102 | &s5p_device_mfc_r, | ||
103 | }; | ||
104 | |||
105 | static struct i2c_board_info smdkc110_i2c_devs0[] __initdata = { | ||
106 | { I2C_BOARD_INFO("24c08", 0x50), }, /* Samsung S524AD0XD1 */ | ||
107 | { I2C_BOARD_INFO("wm8580", 0x1b), }, | ||
108 | }; | ||
109 | |||
110 | static struct i2c_board_info smdkc110_i2c_devs1[] __initdata = { | ||
111 | /* To Be Updated */ | ||
112 | }; | ||
113 | |||
114 | static struct i2c_board_info smdkc110_i2c_devs2[] __initdata = { | ||
115 | /* To Be Updated */ | ||
116 | }; | ||
117 | |||
118 | static void __init smdkc110_map_io(void) | ||
119 | { | ||
120 | s5pv210_init_io(NULL, 0); | ||
121 | s3c24xx_init_clocks(24000000); | ||
122 | s3c24xx_init_uarts(smdkv210_uartcfgs, ARRAY_SIZE(smdkv210_uartcfgs)); | ||
123 | samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); | ||
124 | } | ||
125 | |||
126 | static void __init smdkc110_reserve(void) | ||
127 | { | ||
128 | s5p_mfc_reserve_mem(0x43000000, 8 << 20, 0x51000000, 8 << 20); | ||
129 | } | ||
130 | |||
131 | static void __init smdkc110_machine_init(void) | ||
132 | { | ||
133 | s3c_pm_init(); | ||
134 | |||
135 | s3c_i2c0_set_platdata(NULL); | ||
136 | s3c_i2c1_set_platdata(NULL); | ||
137 | s3c_i2c2_set_platdata(NULL); | ||
138 | i2c_register_board_info(0, smdkc110_i2c_devs0, | ||
139 | ARRAY_SIZE(smdkc110_i2c_devs0)); | ||
140 | i2c_register_board_info(1, smdkc110_i2c_devs1, | ||
141 | ARRAY_SIZE(smdkc110_i2c_devs1)); | ||
142 | i2c_register_board_info(2, smdkc110_i2c_devs2, | ||
143 | ARRAY_SIZE(smdkc110_i2c_devs2)); | ||
144 | |||
145 | s3c_ide_set_platdata(&smdkc110_ide_pdata); | ||
146 | |||
147 | platform_add_devices(smdkc110_devices, ARRAY_SIZE(smdkc110_devices)); | ||
148 | } | ||
149 | |||
150 | MACHINE_START(SMDKC110, "SMDKC110") | ||
151 | /* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */ | ||
152 | .atag_offset = 0x100, | ||
153 | .init_irq = s5pv210_init_irq, | ||
154 | .map_io = smdkc110_map_io, | ||
155 | .init_machine = smdkc110_machine_init, | ||
156 | .init_time = samsung_timer_init, | ||
157 | .restart = s5pv210_restart, | ||
158 | .reserve = &smdkc110_reserve, | ||
159 | MACHINE_END | ||
diff --git a/arch/arm/mach-s5pv210/mach-smdkv210.c b/arch/arm/mach-s5pv210/mach-smdkv210.c deleted file mode 100644 index a146089c9ee6..000000000000 --- a/arch/arm/mach-s5pv210/mach-smdkv210.c +++ /dev/null | |||
@@ -1,338 +0,0 @@ | |||
1 | /* linux/arch/arm/mach-s5pv210/mach-smdkv210.c | ||
2 | * | ||
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.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/kernel.h> | ||
12 | #include <linux/types.h> | ||
13 | #include <linux/i2c.h> | ||
14 | #include <linux/init.h> | ||
15 | #include <linux/serial_core.h> | ||
16 | #include <linux/serial_s3c.h> | ||
17 | #include <linux/device.h> | ||
18 | #include <linux/dm9000.h> | ||
19 | #include <linux/fb.h> | ||
20 | #include <linux/gpio.h> | ||
21 | #include <linux/delay.h> | ||
22 | #include <linux/pwm_backlight.h> | ||
23 | #include <linux/platform_data/s3c-hsotg.h> | ||
24 | |||
25 | #include <asm/mach/arch.h> | ||
26 | #include <asm/mach/map.h> | ||
27 | #include <asm/setup.h> | ||
28 | #include <asm/mach-types.h> | ||
29 | |||
30 | #include <video/platform_lcd.h> | ||
31 | #include <video/samsung_fimd.h> | ||
32 | |||
33 | #include <mach/map.h> | ||
34 | #include <mach/regs-clock.h> | ||
35 | #include <mach/gpio-samsung.h> | ||
36 | |||
37 | #include <plat/regs-srom.h> | ||
38 | #include <plat/gpio-cfg.h> | ||
39 | #include <plat/devs.h> | ||
40 | #include <plat/cpu.h> | ||
41 | #include <plat/adc.h> | ||
42 | #include <linux/platform_data/touchscreen-s3c2410.h> | ||
43 | #include <linux/platform_data/ata-samsung_cf.h> | ||
44 | #include <linux/platform_data/i2c-s3c2410.h> | ||
45 | #include <plat/keypad.h> | ||
46 | #include <plat/pm.h> | ||
47 | #include <plat/fb.h> | ||
48 | #include <plat/samsung-time.h> | ||
49 | #include <plat/backlight.h> | ||
50 | #include <plat/mfc.h> | ||
51 | #include <plat/clock.h> | ||
52 | |||
53 | #include "common.h" | ||
54 | |||
55 | /* Following are default values for UCON, ULCON and UFCON UART registers */ | ||
56 | #define SMDKV210_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ | ||
57 | S3C2410_UCON_RXILEVEL | \ | ||
58 | S3C2410_UCON_TXIRQMODE | \ | ||
59 | S3C2410_UCON_RXIRQMODE | \ | ||
60 | S3C2410_UCON_RXFIFO_TOI | \ | ||
61 | S3C2443_UCON_RXERR_IRQEN) | ||
62 | |||
63 | #define SMDKV210_ULCON_DEFAULT S3C2410_LCON_CS8 | ||
64 | |||
65 | #define SMDKV210_UFCON_DEFAULT (S3C2410_UFCON_FIFOMODE | \ | ||
66 | S5PV210_UFCON_TXTRIG4 | \ | ||
67 | S5PV210_UFCON_RXTRIG4) | ||
68 | |||
69 | static struct s3c2410_uartcfg smdkv210_uartcfgs[] __initdata = { | ||
70 | [0] = { | ||
71 | .hwport = 0, | ||
72 | .flags = 0, | ||
73 | .ucon = SMDKV210_UCON_DEFAULT, | ||
74 | .ulcon = SMDKV210_ULCON_DEFAULT, | ||
75 | .ufcon = SMDKV210_UFCON_DEFAULT, | ||
76 | }, | ||
77 | [1] = { | ||
78 | .hwport = 1, | ||
79 | .flags = 0, | ||
80 | .ucon = SMDKV210_UCON_DEFAULT, | ||
81 | .ulcon = SMDKV210_ULCON_DEFAULT, | ||
82 | .ufcon = SMDKV210_UFCON_DEFAULT, | ||
83 | }, | ||
84 | [2] = { | ||
85 | .hwport = 2, | ||
86 | .flags = 0, | ||
87 | .ucon = SMDKV210_UCON_DEFAULT, | ||
88 | .ulcon = SMDKV210_ULCON_DEFAULT, | ||
89 | .ufcon = SMDKV210_UFCON_DEFAULT, | ||
90 | }, | ||
91 | [3] = { | ||
92 | .hwport = 3, | ||
93 | .flags = 0, | ||
94 | .ucon = SMDKV210_UCON_DEFAULT, | ||
95 | .ulcon = SMDKV210_ULCON_DEFAULT, | ||
96 | .ufcon = SMDKV210_UFCON_DEFAULT, | ||
97 | }, | ||
98 | }; | ||
99 | |||
100 | static struct s3c_ide_platdata smdkv210_ide_pdata __initdata = { | ||
101 | .setup_gpio = s5pv210_ide_setup_gpio, | ||
102 | }; | ||
103 | |||
104 | static uint32_t smdkv210_keymap[] __initdata = { | ||
105 | /* KEY(row, col, keycode) */ | ||
106 | KEY(0, 3, KEY_1), KEY(0, 4, KEY_2), KEY(0, 5, KEY_3), | ||
107 | KEY(0, 6, KEY_4), KEY(0, 7, KEY_5), | ||
108 | KEY(1, 3, KEY_A), KEY(1, 4, KEY_B), KEY(1, 5, KEY_C), | ||
109 | KEY(1, 6, KEY_D), KEY(1, 7, KEY_E) | ||
110 | }; | ||
111 | |||
112 | static struct matrix_keymap_data smdkv210_keymap_data __initdata = { | ||
113 | .keymap = smdkv210_keymap, | ||
114 | .keymap_size = ARRAY_SIZE(smdkv210_keymap), | ||
115 | }; | ||
116 | |||
117 | static struct samsung_keypad_platdata smdkv210_keypad_data __initdata = { | ||
118 | .keymap_data = &smdkv210_keymap_data, | ||
119 | .rows = 8, | ||
120 | .cols = 8, | ||
121 | }; | ||
122 | |||
123 | static struct resource smdkv210_dm9000_resources[] = { | ||
124 | [0] = DEFINE_RES_MEM(S5PV210_PA_SROM_BANK5, 1), | ||
125 | [1] = DEFINE_RES_MEM(S5PV210_PA_SROM_BANK5 + 2, 1), | ||
126 | [2] = DEFINE_RES_NAMED(IRQ_EINT(9), 1, NULL, IORESOURCE_IRQ \ | ||
127 | | IORESOURCE_IRQ_HIGHLEVEL), | ||
128 | }; | ||
129 | |||
130 | static struct dm9000_plat_data smdkv210_dm9000_platdata = { | ||
131 | .flags = DM9000_PLATF_16BITONLY | DM9000_PLATF_NO_EEPROM, | ||
132 | .dev_addr = { 0x00, 0x09, 0xc0, 0xff, 0xec, 0x48 }, | ||
133 | }; | ||
134 | |||
135 | static struct platform_device smdkv210_dm9000 = { | ||
136 | .name = "dm9000", | ||
137 | .id = -1, | ||
138 | .num_resources = ARRAY_SIZE(smdkv210_dm9000_resources), | ||
139 | .resource = smdkv210_dm9000_resources, | ||
140 | .dev = { | ||
141 | .platform_data = &smdkv210_dm9000_platdata, | ||
142 | }, | ||
143 | }; | ||
144 | |||
145 | static void smdkv210_lte480wv_set_power(struct plat_lcd_data *pd, | ||
146 | unsigned int power) | ||
147 | { | ||
148 | if (power) { | ||
149 | #if !defined(CONFIG_BACKLIGHT_PWM) | ||
150 | gpio_request_one(S5PV210_GPD0(3), GPIOF_OUT_INIT_HIGH, "GPD0"); | ||
151 | gpio_free(S5PV210_GPD0(3)); | ||
152 | #endif | ||
153 | |||
154 | /* fire nRESET on power up */ | ||
155 | gpio_request_one(S5PV210_GPH0(6), GPIOF_OUT_INIT_HIGH, "GPH0"); | ||
156 | |||
157 | gpio_set_value(S5PV210_GPH0(6), 0); | ||
158 | mdelay(10); | ||
159 | |||
160 | gpio_set_value(S5PV210_GPH0(6), 1); | ||
161 | mdelay(10); | ||
162 | |||
163 | gpio_free(S5PV210_GPH0(6)); | ||
164 | } else { | ||
165 | #if !defined(CONFIG_BACKLIGHT_PWM) | ||
166 | gpio_request_one(S5PV210_GPD0(3), GPIOF_OUT_INIT_LOW, "GPD0"); | ||
167 | gpio_free(S5PV210_GPD0(3)); | ||
168 | #endif | ||
169 | } | ||
170 | } | ||
171 | |||
172 | static struct plat_lcd_data smdkv210_lcd_lte480wv_data = { | ||
173 | .set_power = smdkv210_lte480wv_set_power, | ||
174 | }; | ||
175 | |||
176 | static struct platform_device smdkv210_lcd_lte480wv = { | ||
177 | .name = "platform-lcd", | ||
178 | .dev.parent = &s3c_device_fb.dev, | ||
179 | .dev.platform_data = &smdkv210_lcd_lte480wv_data, | ||
180 | }; | ||
181 | |||
182 | static struct s3c_fb_pd_win smdkv210_fb_win0 = { | ||
183 | .max_bpp = 32, | ||
184 | .default_bpp = 24, | ||
185 | .xres = 800, | ||
186 | .yres = 480, | ||
187 | }; | ||
188 | |||
189 | static struct fb_videomode smdkv210_lcd_timing = { | ||
190 | .left_margin = 13, | ||
191 | .right_margin = 8, | ||
192 | .upper_margin = 7, | ||
193 | .lower_margin = 5, | ||
194 | .hsync_len = 3, | ||
195 | .vsync_len = 1, | ||
196 | .xres = 800, | ||
197 | .yres = 480, | ||
198 | }; | ||
199 | |||
200 | static struct s3c_fb_platdata smdkv210_lcd0_pdata __initdata = { | ||
201 | .win[0] = &smdkv210_fb_win0, | ||
202 | .vtiming = &smdkv210_lcd_timing, | ||
203 | .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB, | ||
204 | .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC, | ||
205 | .setup_gpio = s5pv210_fb_gpio_setup_24bpp, | ||
206 | }; | ||
207 | |||
208 | /* USB OTG */ | ||
209 | static struct s3c_hsotg_plat smdkv210_hsotg_pdata; | ||
210 | |||
211 | static struct platform_device *smdkv210_devices[] __initdata = { | ||
212 | &s3c_device_adc, | ||
213 | &s3c_device_cfcon, | ||
214 | &s3c_device_fb, | ||
215 | &s3c_device_hsmmc0, | ||
216 | &s3c_device_hsmmc1, | ||
217 | &s3c_device_hsmmc2, | ||
218 | &s3c_device_hsmmc3, | ||
219 | &s3c_device_i2c0, | ||
220 | &s3c_device_i2c1, | ||
221 | &s3c_device_i2c2, | ||
222 | &samsung_device_pwm, | ||
223 | &s3c_device_rtc, | ||
224 | &s3c_device_ts, | ||
225 | &s3c_device_usb_hsotg, | ||
226 | &s3c_device_wdt, | ||
227 | &s5p_device_fimc0, | ||
228 | &s5p_device_fimc1, | ||
229 | &s5p_device_fimc2, | ||
230 | &s5p_device_fimc_md, | ||
231 | &s5p_device_jpeg, | ||
232 | &s5p_device_mfc, | ||
233 | &s5p_device_mfc_l, | ||
234 | &s5p_device_mfc_r, | ||
235 | &s5pv210_device_ac97, | ||
236 | &s5pv210_device_iis0, | ||
237 | &s5pv210_device_spdif, | ||
238 | &samsung_asoc_idma, | ||
239 | &samsung_device_keypad, | ||
240 | &smdkv210_dm9000, | ||
241 | &smdkv210_lcd_lte480wv, | ||
242 | }; | ||
243 | |||
244 | static void __init smdkv210_dm9000_init(void) | ||
245 | { | ||
246 | unsigned int tmp; | ||
247 | |||
248 | gpio_request(S5PV210_MP01(5), "nCS5"); | ||
249 | s3c_gpio_cfgpin(S5PV210_MP01(5), S3C_GPIO_SFN(2)); | ||
250 | gpio_free(S5PV210_MP01(5)); | ||
251 | |||
252 | tmp = (5 << S5P_SROM_BCX__TACC__SHIFT); | ||
253 | __raw_writel(tmp, S5P_SROM_BC5); | ||
254 | |||
255 | tmp = __raw_readl(S5P_SROM_BW); | ||
256 | tmp &= (S5P_SROM_BW__CS_MASK << S5P_SROM_BW__NCS5__SHIFT); | ||
257 | tmp |= (1 << S5P_SROM_BW__NCS5__SHIFT); | ||
258 | __raw_writel(tmp, S5P_SROM_BW); | ||
259 | } | ||
260 | |||
261 | static struct i2c_board_info smdkv210_i2c_devs0[] __initdata = { | ||
262 | { I2C_BOARD_INFO("24c08", 0x50), }, /* Samsung S524AD0XD1 */ | ||
263 | { I2C_BOARD_INFO("wm8580", 0x1b), }, | ||
264 | }; | ||
265 | |||
266 | static struct i2c_board_info smdkv210_i2c_devs1[] __initdata = { | ||
267 | /* To Be Updated */ | ||
268 | }; | ||
269 | |||
270 | static struct i2c_board_info smdkv210_i2c_devs2[] __initdata = { | ||
271 | /* To Be Updated */ | ||
272 | }; | ||
273 | |||
274 | /* LCD Backlight data */ | ||
275 | static struct samsung_bl_gpio_info smdkv210_bl_gpio_info = { | ||
276 | .no = S5PV210_GPD0(3), | ||
277 | .func = S3C_GPIO_SFN(2), | ||
278 | }; | ||
279 | |||
280 | static struct platform_pwm_backlight_data smdkv210_bl_data = { | ||
281 | .pwm_id = 3, | ||
282 | .pwm_period_ns = 1000, | ||
283 | .enable_gpio = -1, | ||
284 | }; | ||
285 | |||
286 | static void __init smdkv210_map_io(void) | ||
287 | { | ||
288 | s5pv210_init_io(NULL, 0); | ||
289 | s3c24xx_init_clocks(clk_xusbxti.rate); | ||
290 | s3c24xx_init_uarts(smdkv210_uartcfgs, ARRAY_SIZE(smdkv210_uartcfgs)); | ||
291 | samsung_set_timer_source(SAMSUNG_PWM2, SAMSUNG_PWM4); | ||
292 | } | ||
293 | |||
294 | static void __init smdkv210_reserve(void) | ||
295 | { | ||
296 | s5p_mfc_reserve_mem(0x43000000, 8 << 20, 0x51000000, 8 << 20); | ||
297 | } | ||
298 | |||
299 | static void __init smdkv210_machine_init(void) | ||
300 | { | ||
301 | s3c_pm_init(); | ||
302 | |||
303 | smdkv210_dm9000_init(); | ||
304 | |||
305 | samsung_keypad_set_platdata(&smdkv210_keypad_data); | ||
306 | s3c24xx_ts_set_platdata(NULL); | ||
307 | |||
308 | s3c_i2c0_set_platdata(NULL); | ||
309 | s3c_i2c1_set_platdata(NULL); | ||
310 | s3c_i2c2_set_platdata(NULL); | ||
311 | i2c_register_board_info(0, smdkv210_i2c_devs0, | ||
312 | ARRAY_SIZE(smdkv210_i2c_devs0)); | ||
313 | i2c_register_board_info(1, smdkv210_i2c_devs1, | ||
314 | ARRAY_SIZE(smdkv210_i2c_devs1)); | ||
315 | i2c_register_board_info(2, smdkv210_i2c_devs2, | ||
316 | ARRAY_SIZE(smdkv210_i2c_devs2)); | ||
317 | |||
318 | s3c_ide_set_platdata(&smdkv210_ide_pdata); | ||
319 | |||
320 | s3c_fb_set_platdata(&smdkv210_lcd0_pdata); | ||
321 | |||
322 | s3c_hsotg_set_platdata(&smdkv210_hsotg_pdata); | ||
323 | |||
324 | platform_add_devices(smdkv210_devices, ARRAY_SIZE(smdkv210_devices)); | ||
325 | |||
326 | samsung_bl_set(&smdkv210_bl_gpio_info, &smdkv210_bl_data); | ||
327 | } | ||
328 | |||
329 | MACHINE_START(SMDKV210, "SMDKV210") | ||
330 | /* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */ | ||
331 | .atag_offset = 0x100, | ||
332 | .init_irq = s5pv210_init_irq, | ||
333 | .map_io = smdkv210_map_io, | ||
334 | .init_machine = smdkv210_machine_init, | ||
335 | .init_time = samsung_timer_init, | ||
336 | .restart = s5pv210_restart, | ||
337 | .reserve = &smdkv210_reserve, | ||
338 | MACHINE_END | ||
diff --git a/arch/arm/mach-s5pv210/mach-torbreck.c b/arch/arm/mach-s5pv210/mach-torbreck.c deleted file mode 100644 index 157805529f26..000000000000 --- a/arch/arm/mach-s5pv210/mach-torbreck.c +++ /dev/null | |||
@@ -1,135 +0,0 @@ | |||
1 | /* linux/arch/arm/mach-s5pv210/mach-torbreck.c | ||
2 | * | ||
3 | * Copyright (c) 2010 aESOP Community | ||
4 | * http://www.aesop.or.kr/ | ||
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/kernel.h> | ||
12 | #include <linux/types.h> | ||
13 | #include <linux/i2c.h> | ||
14 | #include <linux/init.h> | ||
15 | #include <linux/serial_core.h> | ||
16 | #include <linux/serial_s3c.h> | ||
17 | |||
18 | #include <asm/mach/arch.h> | ||
19 | #include <asm/mach/map.h> | ||
20 | #include <asm/setup.h> | ||
21 | #include <asm/mach-types.h> | ||
22 | |||
23 | #include <mach/map.h> | ||
24 | #include <mach/regs-clock.h> | ||
25 | |||
26 | #include <plat/devs.h> | ||
27 | #include <plat/cpu.h> | ||
28 | #include <linux/platform_data/i2c-s3c2410.h> | ||
29 | #include <plat/samsung-time.h> | ||
30 | |||
31 | #include "common.h" | ||
32 | |||
33 | /* Following are default values for UCON, ULCON and UFCON UART registers */ | ||
34 | #define TORBRECK_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ | ||
35 | S3C2410_UCON_RXILEVEL | \ | ||
36 | S3C2410_UCON_TXIRQMODE | \ | ||
37 | S3C2410_UCON_RXIRQMODE | \ | ||
38 | S3C2410_UCON_RXFIFO_TOI | \ | ||
39 | S3C2443_UCON_RXERR_IRQEN) | ||
40 | |||
41 | #define TORBRECK_ULCON_DEFAULT S3C2410_LCON_CS8 | ||
42 | |||
43 | #define TORBRECK_UFCON_DEFAULT (S3C2410_UFCON_FIFOMODE | \ | ||
44 | S5PV210_UFCON_TXTRIG4 | \ | ||
45 | S5PV210_UFCON_RXTRIG4) | ||
46 | |||
47 | static struct s3c2410_uartcfg torbreck_uartcfgs[] __initdata = { | ||
48 | [0] = { | ||
49 | .hwport = 0, | ||
50 | .flags = 0, | ||
51 | .ucon = TORBRECK_UCON_DEFAULT, | ||
52 | .ulcon = TORBRECK_ULCON_DEFAULT, | ||
53 | .ufcon = TORBRECK_UFCON_DEFAULT, | ||
54 | }, | ||
55 | [1] = { | ||
56 | .hwport = 1, | ||
57 | .flags = 0, | ||
58 | .ucon = TORBRECK_UCON_DEFAULT, | ||
59 | .ulcon = TORBRECK_ULCON_DEFAULT, | ||
60 | .ufcon = TORBRECK_UFCON_DEFAULT, | ||
61 | }, | ||
62 | [2] = { | ||
63 | .hwport = 2, | ||
64 | .flags = 0, | ||
65 | .ucon = TORBRECK_UCON_DEFAULT, | ||
66 | .ulcon = TORBRECK_ULCON_DEFAULT, | ||
67 | .ufcon = TORBRECK_UFCON_DEFAULT, | ||
68 | }, | ||
69 | [3] = { | ||
70 | .hwport = 3, | ||
71 | .flags = 0, | ||
72 | .ucon = TORBRECK_UCON_DEFAULT, | ||
73 | .ulcon = TORBRECK_ULCON_DEFAULT, | ||
74 | .ufcon = TORBRECK_UFCON_DEFAULT, | ||
75 | }, | ||
76 | }; | ||
77 | |||
78 | static struct platform_device *torbreck_devices[] __initdata = { | ||
79 | &s5pv210_device_iis0, | ||
80 | &s3c_device_cfcon, | ||
81 | &s3c_device_hsmmc0, | ||
82 | &s3c_device_hsmmc1, | ||
83 | &s3c_device_hsmmc2, | ||
84 | &s3c_device_hsmmc3, | ||
85 | &s3c_device_i2c0, | ||
86 | &s3c_device_i2c1, | ||
87 | &s3c_device_i2c2, | ||
88 | &s3c_device_rtc, | ||
89 | &s3c_device_wdt, | ||
90 | }; | ||
91 | |||
92 | static struct i2c_board_info torbreck_i2c_devs0[] __initdata = { | ||
93 | /* To Be Updated */ | ||
94 | }; | ||
95 | |||
96 | static struct i2c_board_info torbreck_i2c_devs1[] __initdata = { | ||
97 | /* To Be Updated */ | ||
98 | }; | ||
99 | |||
100 | static struct i2c_board_info torbreck_i2c_devs2[] __initdata = { | ||
101 | /* To Be Updated */ | ||
102 | }; | ||
103 | |||
104 | static void __init torbreck_map_io(void) | ||
105 | { | ||
106 | s5pv210_init_io(NULL, 0); | ||
107 | s3c24xx_init_clocks(24000000); | ||
108 | s3c24xx_init_uarts(torbreck_uartcfgs, ARRAY_SIZE(torbreck_uartcfgs)); | ||
109 | samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); | ||
110 | } | ||
111 | |||
112 | static void __init torbreck_machine_init(void) | ||
113 | { | ||
114 | s3c_i2c0_set_platdata(NULL); | ||
115 | s3c_i2c1_set_platdata(NULL); | ||
116 | s3c_i2c2_set_platdata(NULL); | ||
117 | i2c_register_board_info(0, torbreck_i2c_devs0, | ||
118 | ARRAY_SIZE(torbreck_i2c_devs0)); | ||
119 | i2c_register_board_info(1, torbreck_i2c_devs1, | ||
120 | ARRAY_SIZE(torbreck_i2c_devs1)); | ||
121 | i2c_register_board_info(2, torbreck_i2c_devs2, | ||
122 | ARRAY_SIZE(torbreck_i2c_devs2)); | ||
123 | |||
124 | platform_add_devices(torbreck_devices, ARRAY_SIZE(torbreck_devices)); | ||
125 | } | ||
126 | |||
127 | MACHINE_START(TORBRECK, "TORBRECK") | ||
128 | /* Maintainer: Hyunchul Ko <ghcstop@gmail.com> */ | ||
129 | .atag_offset = 0x100, | ||
130 | .init_irq = s5pv210_init_irq, | ||
131 | .map_io = torbreck_map_io, | ||
132 | .init_machine = torbreck_machine_init, | ||
133 | .init_time = samsung_timer_init, | ||
134 | .restart = s5pv210_restart, | ||
135 | MACHINE_END | ||
diff --git a/arch/arm/mach-s5pv210/pm.c b/arch/arm/mach-s5pv210/pm.c index 3cf3f9c8ddd1..123163dd2ab0 100644 --- a/arch/arm/mach-s5pv210/pm.c +++ b/arch/arm/mach-s5pv210/pm.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* linux/arch/arm/mach-s5pv210/pm.c | 1 | /* linux/arch/arm/mach-s5pv210/pm.c |
2 | * | 2 | * |
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | 3 | * Copyright (c) 2010-2014 Samsung Electronics Co., Ltd. |
4 | * http://www.samsung.com | 4 | * http://www.samsung.com |
5 | * | 5 | * |
6 | * S5PV210 - Power Management support | 6 | * S5PV210 - Power Management support |
@@ -19,65 +19,28 @@ | |||
19 | #include <linux/syscore_ops.h> | 19 | #include <linux/syscore_ops.h> |
20 | #include <linux/io.h> | 20 | #include <linux/io.h> |
21 | 21 | ||
22 | #include <plat/cpu.h> | 22 | #include <asm/cacheflush.h> |
23 | #include <plat/pm.h> | 23 | #include <asm/suspend.h> |
24 | |||
25 | #include <plat/pm-common.h> | ||
24 | 26 | ||
25 | #include <mach/regs-irq.h> | ||
26 | #include <mach/regs-clock.h> | 27 | #include <mach/regs-clock.h> |
27 | 28 | ||
28 | static struct sleep_save s5pv210_core_save[] = { | 29 | #include "common.h" |
29 | /* Clock source */ | ||
30 | SAVE_ITEM(S5P_CLK_SRC0), | ||
31 | SAVE_ITEM(S5P_CLK_SRC1), | ||
32 | SAVE_ITEM(S5P_CLK_SRC2), | ||
33 | SAVE_ITEM(S5P_CLK_SRC3), | ||
34 | SAVE_ITEM(S5P_CLK_SRC4), | ||
35 | SAVE_ITEM(S5P_CLK_SRC5), | ||
36 | SAVE_ITEM(S5P_CLK_SRC6), | ||
37 | |||
38 | /* Clock source Mask */ | ||
39 | SAVE_ITEM(S5P_CLK_SRC_MASK0), | ||
40 | SAVE_ITEM(S5P_CLK_SRC_MASK1), | ||
41 | |||
42 | /* Clock Divider */ | ||
43 | SAVE_ITEM(S5P_CLK_DIV0), | ||
44 | SAVE_ITEM(S5P_CLK_DIV1), | ||
45 | SAVE_ITEM(S5P_CLK_DIV2), | ||
46 | SAVE_ITEM(S5P_CLK_DIV3), | ||
47 | SAVE_ITEM(S5P_CLK_DIV4), | ||
48 | SAVE_ITEM(S5P_CLK_DIV5), | ||
49 | SAVE_ITEM(S5P_CLK_DIV6), | ||
50 | SAVE_ITEM(S5P_CLK_DIV7), | ||
51 | |||
52 | /* Clock Main Gate */ | ||
53 | SAVE_ITEM(S5P_CLKGATE_MAIN0), | ||
54 | SAVE_ITEM(S5P_CLKGATE_MAIN1), | ||
55 | SAVE_ITEM(S5P_CLKGATE_MAIN2), | ||
56 | |||
57 | /* Clock source Peri Gate */ | ||
58 | SAVE_ITEM(S5P_CLKGATE_PERI0), | ||
59 | SAVE_ITEM(S5P_CLKGATE_PERI1), | ||
60 | |||
61 | /* Clock source SCLK Gate */ | ||
62 | SAVE_ITEM(S5P_CLKGATE_SCLK0), | ||
63 | SAVE_ITEM(S5P_CLKGATE_SCLK1), | ||
64 | |||
65 | /* Clock IP Clock gate */ | ||
66 | SAVE_ITEM(S5P_CLKGATE_IP0), | ||
67 | SAVE_ITEM(S5P_CLKGATE_IP1), | ||
68 | SAVE_ITEM(S5P_CLKGATE_IP2), | ||
69 | SAVE_ITEM(S5P_CLKGATE_IP3), | ||
70 | SAVE_ITEM(S5P_CLKGATE_IP4), | ||
71 | |||
72 | /* Clock Blcok and Bus gate */ | ||
73 | SAVE_ITEM(S5P_CLKGATE_BLOCK), | ||
74 | SAVE_ITEM(S5P_CLKGATE_BUS0), | ||
75 | 30 | ||
31 | static struct sleep_save s5pv210_core_save[] = { | ||
76 | /* Clock ETC */ | 32 | /* Clock ETC */ |
77 | SAVE_ITEM(S5P_CLK_OUT), | ||
78 | SAVE_ITEM(S5P_MDNIE_SEL), | 33 | SAVE_ITEM(S5P_MDNIE_SEL), |
79 | }; | 34 | }; |
80 | 35 | ||
36 | /* | ||
37 | * VIC wake-up support (TODO) | ||
38 | */ | ||
39 | static u32 s5pv210_irqwake_intmask = 0xffffffff; | ||
40 | |||
41 | /* | ||
42 | * Suspend helpers. | ||
43 | */ | ||
81 | static int s5pv210_cpu_suspend(unsigned long arg) | 44 | static int s5pv210_cpu_suspend(unsigned long arg) |
82 | { | 45 | { |
83 | unsigned long tmp; | 46 | unsigned long tmp; |
@@ -102,8 +65,12 @@ static void s5pv210_pm_prepare(void) | |||
102 | { | 65 | { |
103 | unsigned int tmp; | 66 | unsigned int tmp; |
104 | 67 | ||
68 | /* Set wake-up mask registers */ | ||
69 | __raw_writel(exynos_get_eint_wake_mask(), S5P_EINT_WAKEUP_MASK); | ||
70 | __raw_writel(s5pv210_irqwake_intmask, S5P_WAKEUP_MASK); | ||
71 | |||
105 | /* ensure at least INFORM0 has the resume address */ | 72 | /* ensure at least INFORM0 has the resume address */ |
106 | __raw_writel(virt_to_phys(s3c_cpu_resume), S5P_INFORM0); | 73 | __raw_writel(virt_to_phys(s5pv210_cpu_resume), S5P_INFORM0); |
107 | 74 | ||
108 | tmp = __raw_readl(S5P_SLEEP_CFG); | 75 | tmp = __raw_readl(S5P_SLEEP_CFG); |
109 | tmp &= ~(S5P_SLEEP_CFG_OSC_EN | S5P_SLEEP_CFG_USBOSC_EN); | 76 | tmp &= ~(S5P_SLEEP_CFG_OSC_EN | S5P_SLEEP_CFG_USBOSC_EN); |
@@ -123,26 +90,70 @@ static void s5pv210_pm_prepare(void) | |||
123 | s3c_pm_do_save(s5pv210_core_save, ARRAY_SIZE(s5pv210_core_save)); | 90 | s3c_pm_do_save(s5pv210_core_save, ARRAY_SIZE(s5pv210_core_save)); |
124 | } | 91 | } |
125 | 92 | ||
126 | static int s5pv210_pm_add(struct device *dev, struct subsys_interface *sif) | 93 | /* |
94 | * Suspend operations. | ||
95 | */ | ||
96 | static int s5pv210_suspend_enter(suspend_state_t state) | ||
127 | { | 97 | { |
128 | pm_cpu_prep = s5pv210_pm_prepare; | 98 | int ret; |
129 | pm_cpu_sleep = s5pv210_cpu_suspend; | 99 | |
100 | s3c_pm_debug_init(); | ||
101 | |||
102 | S3C_PMDBG("%s: suspending the system...\n", __func__); | ||
103 | |||
104 | S3C_PMDBG("%s: wakeup masks: %08x,%08x\n", __func__, | ||
105 | s5pv210_irqwake_intmask, exynos_get_eint_wake_mask()); | ||
106 | |||
107 | if (s5pv210_irqwake_intmask == -1U | ||
108 | && exynos_get_eint_wake_mask() == -1U) { | ||
109 | pr_err("%s: No wake-up sources!\n", __func__); | ||
110 | pr_err("%s: Aborting sleep\n", __func__); | ||
111 | return -EINVAL; | ||
112 | } | ||
113 | |||
114 | s3c_pm_save_uarts(); | ||
115 | s5pv210_pm_prepare(); | ||
116 | flush_cache_all(); | ||
117 | s3c_pm_check_store(); | ||
118 | |||
119 | ret = cpu_suspend(0, s5pv210_cpu_suspend); | ||
120 | if (ret) | ||
121 | return ret; | ||
122 | |||
123 | s3c_pm_restore_uarts(); | ||
124 | |||
125 | S3C_PMDBG("%s: wakeup stat: %08x\n", __func__, | ||
126 | __raw_readl(S5P_WAKEUP_STAT)); | ||
127 | |||
128 | s3c_pm_check_restore(); | ||
129 | |||
130 | S3C_PMDBG("%s: resuming the system...\n", __func__); | ||
130 | 131 | ||
131 | return 0; | 132 | return 0; |
132 | } | 133 | } |
133 | 134 | ||
134 | static struct subsys_interface s5pv210_pm_interface = { | 135 | static int s5pv210_suspend_prepare(void) |
135 | .name = "s5pv210_pm", | 136 | { |
136 | .subsys = &s5pv210_subsys, | 137 | s3c_pm_check_prepare(); |
137 | .add_dev = s5pv210_pm_add, | ||
138 | }; | ||
139 | 138 | ||
140 | static __init int s5pv210_pm_drvinit(void) | 139 | return 0; |
140 | } | ||
141 | |||
142 | static void s5pv210_suspend_finish(void) | ||
141 | { | 143 | { |
142 | return subsys_interface_register(&s5pv210_pm_interface); | 144 | s3c_pm_check_cleanup(); |
143 | } | 145 | } |
144 | arch_initcall(s5pv210_pm_drvinit); | ||
145 | 146 | ||
147 | static const struct platform_suspend_ops s5pv210_suspend_ops = { | ||
148 | .enter = s5pv210_suspend_enter, | ||
149 | .prepare = s5pv210_suspend_prepare, | ||
150 | .finish = s5pv210_suspend_finish, | ||
151 | .valid = suspend_valid_only_mem, | ||
152 | }; | ||
153 | |||
154 | /* | ||
155 | * Syscore operations used to delay restore of certain registers. | ||
156 | */ | ||
146 | static void s5pv210_pm_resume(void) | 157 | static void s5pv210_pm_resume(void) |
147 | { | 158 | { |
148 | u32 tmp; | 159 | u32 tmp; |
@@ -159,9 +170,11 @@ static struct syscore_ops s5pv210_pm_syscore_ops = { | |||
159 | .resume = s5pv210_pm_resume, | 170 | .resume = s5pv210_pm_resume, |
160 | }; | 171 | }; |
161 | 172 | ||
162 | static __init int s5pv210_pm_syscore_init(void) | 173 | /* |
174 | * Initialization entry point. | ||
175 | */ | ||
176 | void __init s5pv210_pm_init(void) | ||
163 | { | 177 | { |
164 | register_syscore_ops(&s5pv210_pm_syscore_ops); | 178 | register_syscore_ops(&s5pv210_pm_syscore_ops); |
165 | return 0; | 179 | suspend_set_ops(&s5pv210_suspend_ops); |
166 | } | 180 | } |
167 | arch_initcall(s5pv210_pm_syscore_init); | ||
diff --git a/arch/arm/mach-s5pv210/s5pv210.c b/arch/arm/mach-s5pv210/s5pv210.c new file mode 100644 index 000000000000..53feff33d129 --- /dev/null +++ b/arch/arm/mach-s5pv210/s5pv210.c | |||
@@ -0,0 +1,77 @@ | |||
1 | /* | ||
2 | * Samsung's S5PC110/S5PV210 flattened device tree enabled machine. | ||
3 | * | ||
4 | * Copyright (c) 2013-2014 Samsung Electronics Co., Ltd. | ||
5 | * Mateusz Krawczuk <m.krawczuk@partner.samsung.com> | ||
6 | * Tomasz Figa <t.figa@samsung.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 version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #include <linux/of_fdt.h> | ||
14 | #include <linux/of_platform.h> | ||
15 | |||
16 | #include <asm/mach/arch.h> | ||
17 | #include <asm/mach/map.h> | ||
18 | #include <asm/system_misc.h> | ||
19 | |||
20 | #include <plat/map-base.h> | ||
21 | #include <mach/regs-clock.h> | ||
22 | |||
23 | #include "common.h" | ||
24 | |||
25 | static int __init s5pv210_fdt_map_sys(unsigned long node, const char *uname, | ||
26 | int depth, void *data) | ||
27 | { | ||
28 | struct map_desc iodesc; | ||
29 | const __be32 *reg; | ||
30 | int len; | ||
31 | |||
32 | if (!of_flat_dt_is_compatible(node, "samsung,s5pv210-clock")) | ||
33 | return 0; | ||
34 | |||
35 | reg = of_get_flat_dt_prop(node, "reg", &len); | ||
36 | if (reg == NULL || len != (sizeof(unsigned long) * 2)) | ||
37 | return 0; | ||
38 | |||
39 | iodesc.pfn = __phys_to_pfn(be32_to_cpu(reg[0])); | ||
40 | iodesc.length = be32_to_cpu(reg[1]) - 1; | ||
41 | iodesc.virtual = (unsigned long)S3C_VA_SYS; | ||
42 | iodesc.type = MT_DEVICE; | ||
43 | iotable_init(&iodesc, 1); | ||
44 | |||
45 | return 1; | ||
46 | } | ||
47 | |||
48 | static void __init s5pv210_dt_map_io(void) | ||
49 | { | ||
50 | debug_ll_io_init(); | ||
51 | |||
52 | of_scan_flat_dt(s5pv210_fdt_map_sys, NULL); | ||
53 | } | ||
54 | |||
55 | static void s5pv210_dt_restart(enum reboot_mode mode, const char *cmd) | ||
56 | { | ||
57 | __raw_writel(0x1, S5P_SWRESET); | ||
58 | } | ||
59 | |||
60 | static void __init s5pv210_dt_init_late(void) | ||
61 | { | ||
62 | platform_device_register_simple("s5pv210-cpufreq", -1, NULL, 0); | ||
63 | s5pv210_pm_init(); | ||
64 | } | ||
65 | |||
66 | static char const *s5pv210_dt_compat[] __initconst = { | ||
67 | "samsung,s5pc110", | ||
68 | "samsung,s5pv210", | ||
69 | NULL | ||
70 | }; | ||
71 | |||
72 | DT_MACHINE_START(S5PV210_DT, "Samsung S5PC110/S5PV210-based board") | ||
73 | .dt_compat = s5pv210_dt_compat, | ||
74 | .map_io = s5pv210_dt_map_io, | ||
75 | .restart = s5pv210_dt_restart, | ||
76 | .init_late = s5pv210_dt_init_late, | ||
77 | MACHINE_END | ||
diff --git a/arch/arm/mach-s5pv210/setup-fb-24bpp.c b/arch/arm/mach-s5pv210/setup-fb-24bpp.c deleted file mode 100644 index 815e329f70c4..000000000000 --- a/arch/arm/mach-s5pv210/setup-fb-24bpp.c +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | /* linux/arch/arm/plat-s5pv210/setup-fb-24bpp.c | ||
2 | * | ||
3 | * Copyright (c) 2009-2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com/ | ||
5 | * | ||
6 | * Base s5pv210 setup information for 24bpp LCD framebuffer | ||
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 version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #include <linux/kernel.h> | ||
14 | #include <linux/types.h> | ||
15 | #include <linux/fb.h> | ||
16 | |||
17 | #include <mach/map.h> | ||
18 | #include <plat/fb.h> | ||
19 | #include <mach/regs-clock.h> | ||
20 | #include <plat/gpio-cfg.h> | ||
21 | #include <mach/gpio-samsung.h> | ||
22 | |||
23 | static void s5pv210_fb_cfg_gpios(unsigned int base, unsigned int nr) | ||
24 | { | ||
25 | s3c_gpio_cfgrange_nopull(base, nr, S3C_GPIO_SFN(2)); | ||
26 | |||
27 | for (; nr > 0; nr--, base++) | ||
28 | s5p_gpio_set_drvstr(base, S5P_GPIO_DRVSTR_LV4); | ||
29 | } | ||
30 | |||
31 | |||
32 | void s5pv210_fb_gpio_setup_24bpp(void) | ||
33 | { | ||
34 | s5pv210_fb_cfg_gpios(S5PV210_GPF0(0), 8); | ||
35 | s5pv210_fb_cfg_gpios(S5PV210_GPF1(0), 8); | ||
36 | s5pv210_fb_cfg_gpios(S5PV210_GPF2(0), 8); | ||
37 | s5pv210_fb_cfg_gpios(S5PV210_GPF3(0), 4); | ||
38 | |||
39 | /* Set DISPLAY_CONTROL register for Display path selection. | ||
40 | * | ||
41 | * ouput | RGB | I80 | ITU | ||
42 | * ----------------------------------- | ||
43 | * 00 | MIE | FIMD | FIMD | ||
44 | * 01 | MDNIE | MDNIE | FIMD | ||
45 | * 10 | FIMD | FIMD | FIMD | ||
46 | * 11 | FIMD | FIMD | FIMD | ||
47 | */ | ||
48 | writel(0x2, S5P_MDNIE_SEL); | ||
49 | } | ||
diff --git a/arch/arm/mach-s5pv210/setup-fimc.c b/arch/arm/mach-s5pv210/setup-fimc.c deleted file mode 100644 index 36945ec437f8..000000000000 --- a/arch/arm/mach-s5pv210/setup-fimc.c +++ /dev/null | |||
@@ -1,44 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2011 Samsung Electronics Co., Ltd. | ||
3 | * | ||
4 | * S5PV210 camera interface GPIO configuration. | ||
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/kernel.h> | ||
12 | #include <plat/gpio-cfg.h> | ||
13 | #include <plat/camport.h> | ||
14 | #include <mach/gpio-samsung.h> | ||
15 | |||
16 | int s5pv210_fimc_setup_gpio(enum s5p_camport_id id) | ||
17 | { | ||
18 | u32 gpio8, gpio5; | ||
19 | int ret; | ||
20 | |||
21 | switch (id) { | ||
22 | case S5P_CAMPORT_A: | ||
23 | gpio8 = S5PV210_GPE0(0); | ||
24 | gpio5 = S5PV210_GPE1(0); | ||
25 | break; | ||
26 | |||
27 | case S5P_CAMPORT_B: | ||
28 | gpio8 = S5PV210_GPJ0(0); | ||
29 | gpio5 = S5PV210_GPJ1(0); | ||
30 | break; | ||
31 | |||
32 | default: | ||
33 | WARN(1, "Wrong camport id: %d\n", id); | ||
34 | return -EINVAL; | ||
35 | } | ||
36 | |||
37 | ret = s3c_gpio_cfgall_range(gpio8, 8, S3C_GPIO_SFN(2), | ||
38 | S3C_GPIO_PULL_UP); | ||
39 | if (ret) | ||
40 | return ret; | ||
41 | |||
42 | return s3c_gpio_cfgall_range(gpio5, 5, S3C_GPIO_SFN(2), | ||
43 | S3C_GPIO_PULL_UP); | ||
44 | } | ||
diff --git a/arch/arm/mach-s5pv210/setup-i2c0.c b/arch/arm/mach-s5pv210/setup-i2c0.c deleted file mode 100644 index b0f2b69ac743..000000000000 --- a/arch/arm/mach-s5pv210/setup-i2c0.c +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | /* linux/arch/arm/mach-s5pv210/setup-i2c0.c | ||
2 | * | ||
3 | * Copyright (c) 2009-2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com/ | ||
5 | * | ||
6 | * I2C0 GPIO configuration. | ||
7 | * | ||
8 | * Based on plat-s3c64xx/setup-i2c0.c | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #include <linux/kernel.h> | ||
16 | #include <linux/types.h> | ||
17 | |||
18 | struct platform_device; /* don't need the contents */ | ||
19 | |||
20 | #include <linux/platform_data/i2c-s3c2410.h> | ||
21 | #include <plat/gpio-cfg.h> | ||
22 | #include <mach/gpio-samsung.h> | ||
23 | |||
24 | void s3c_i2c0_cfg_gpio(struct platform_device *dev) | ||
25 | { | ||
26 | s3c_gpio_cfgall_range(S5PV210_GPD1(0), 2, | ||
27 | S3C_GPIO_SFN(2), S3C_GPIO_PULL_UP); | ||
28 | } | ||
diff --git a/arch/arm/mach-s5pv210/setup-i2c1.c b/arch/arm/mach-s5pv210/setup-i2c1.c deleted file mode 100644 index aac1da7b9071..000000000000 --- a/arch/arm/mach-s5pv210/setup-i2c1.c +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | /* linux/arch/arm/mach-s5pv210/setup-i2c1.c | ||
2 | * | ||
3 | * Copyright (c) 2009-2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com/ | ||
5 | * | ||
6 | * I2C1 GPIO configuration. | ||
7 | * | ||
8 | * Based on plat-s3c64xx/setup-i2c1.c | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #include <linux/kernel.h> | ||
16 | #include <linux/types.h> | ||
17 | |||
18 | struct platform_device; /* don't need the contents */ | ||
19 | |||
20 | #include <linux/platform_data/i2c-s3c2410.h> | ||
21 | #include <plat/gpio-cfg.h> | ||
22 | #include <mach/gpio-samsung.h> | ||
23 | |||
24 | void s3c_i2c1_cfg_gpio(struct platform_device *dev) | ||
25 | { | ||
26 | s3c_gpio_cfgall_range(S5PV210_GPD1(2), 2, | ||
27 | S3C_GPIO_SFN(2), S3C_GPIO_PULL_UP); | ||
28 | } | ||
diff --git a/arch/arm/mach-s5pv210/setup-i2c2.c b/arch/arm/mach-s5pv210/setup-i2c2.c deleted file mode 100644 index eff4503b903f..000000000000 --- a/arch/arm/mach-s5pv210/setup-i2c2.c +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | /* linux/arch/arm/mach-s5pv210/setup-i2c2.c | ||
2 | * | ||
3 | * Copyright (c) 2009-2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com/ | ||
5 | * | ||
6 | * I2C2 GPIO configuration. | ||
7 | * | ||
8 | * Based on plat-s3c64xx/setup-i2c0.c | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #include <linux/kernel.h> | ||
16 | #include <linux/types.h> | ||
17 | |||
18 | struct platform_device; /* don't need the contents */ | ||
19 | |||
20 | #include <linux/platform_data/i2c-s3c2410.h> | ||
21 | #include <plat/gpio-cfg.h> | ||
22 | #include <mach/gpio-samsung.h> | ||
23 | |||
24 | void s3c_i2c2_cfg_gpio(struct platform_device *dev) | ||
25 | { | ||
26 | s3c_gpio_cfgall_range(S5PV210_GPD1(4), 2, | ||
27 | S3C_GPIO_SFN(2), S3C_GPIO_PULL_UP); | ||
28 | } | ||
diff --git a/arch/arm/mach-s5pv210/setup-ide.c b/arch/arm/mach-s5pv210/setup-ide.c deleted file mode 100644 index 5b6042d97892..000000000000 --- a/arch/arm/mach-s5pv210/setup-ide.c +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | /* linux/arch/arm/mach-s5pv210/setup-ide.c | ||
2 | * | ||
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com | ||
5 | * | ||
6 | * S5PV210 setup information for IDE | ||
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 version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #include <linux/kernel.h> | ||
14 | |||
15 | #include <plat/gpio-cfg.h> | ||
16 | #include <mach/gpio-samsung.h> | ||
17 | |||
18 | static void s5pv210_ide_cfg_gpios(unsigned int base, unsigned int nr) | ||
19 | { | ||
20 | s3c_gpio_cfgrange_nopull(base, nr, S3C_GPIO_SFN(4)); | ||
21 | |||
22 | for (; nr > 0; nr--, base++) | ||
23 | s5p_gpio_set_drvstr(base, S5P_GPIO_DRVSTR_LV4); | ||
24 | } | ||
25 | |||
26 | void s5pv210_ide_setup_gpio(void) | ||
27 | { | ||
28 | /* CF_Add[0 - 2], CF_IORDY, CF_INTRQ, CF_DMARQ, CF_DMARST, CF_DMACK */ | ||
29 | s5pv210_ide_cfg_gpios(S5PV210_GPJ0(0), 8); | ||
30 | |||
31 | /* CF_Data[0 - 7] */ | ||
32 | s5pv210_ide_cfg_gpios(S5PV210_GPJ2(0), 8); | ||
33 | |||
34 | /* CF_Data[8 - 15] */ | ||
35 | s5pv210_ide_cfg_gpios(S5PV210_GPJ3(0), 8); | ||
36 | |||
37 | /* CF_CS0, CF_CS1, CF_IORD, CF_IOWR */ | ||
38 | s5pv210_ide_cfg_gpios(S5PV210_GPJ4(0), 4); | ||
39 | } | ||
diff --git a/arch/arm/mach-s5pv210/setup-keypad.c b/arch/arm/mach-s5pv210/setup-keypad.c deleted file mode 100644 index faf6178f3a1b..000000000000 --- a/arch/arm/mach-s5pv210/setup-keypad.c +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-s5pv210/setup-keypad.c | ||
3 | * | ||
4 | * Copyright (C) 2010 Samsung Electronics Co.Ltd | ||
5 | * Author: Joonyoung Shim <jy0922.shim@samsung.com> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License as published by the | ||
9 | * Free Software Foundation; either version 2 of the License, or (at your | ||
10 | * option) any later version. | ||
11 | * | ||
12 | */ | ||
13 | |||
14 | #include <plat/gpio-cfg.h> | ||
15 | #include <mach/gpio-samsung.h> | ||
16 | |||
17 | void samsung_keypad_cfg_gpio(unsigned int rows, unsigned int cols) | ||
18 | { | ||
19 | /* Set all the necessary GPH3 pins to special-function 3: KP_ROW[x] */ | ||
20 | s3c_gpio_cfgrange_nopull(S5PV210_GPH3(0), rows, S3C_GPIO_SFN(3)); | ||
21 | |||
22 | /* Set all the necessary GPH2 pins to special-function 3: KP_COL[x] */ | ||
23 | s3c_gpio_cfgrange_nopull(S5PV210_GPH2(0), cols, S3C_GPIO_SFN(3)); | ||
24 | } | ||
diff --git a/arch/arm/mach-s5pv210/setup-sdhci-gpio.c b/arch/arm/mach-s5pv210/setup-sdhci-gpio.c deleted file mode 100644 index 0dd055b47579..000000000000 --- a/arch/arm/mach-s5pv210/setup-sdhci-gpio.c +++ /dev/null | |||
@@ -1,103 +0,0 @@ | |||
1 | /* linux/arch/arm/plat-s5pc1xx/setup-sdhci-gpio.c | ||
2 | * | ||
3 | * Copyright (c) 2009-2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com/ | ||
5 | * | ||
6 | * S5PV210 - Helper functions for setting up SDHCI device(s) GPIO (HSMMC) | ||
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 version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #include <linux/kernel.h> | ||
14 | #include <linux/types.h> | ||
15 | #include <linux/interrupt.h> | ||
16 | #include <linux/platform_device.h> | ||
17 | #include <linux/io.h> | ||
18 | #include <linux/mmc/host.h> | ||
19 | #include <linux/mmc/card.h> | ||
20 | |||
21 | #include <plat/gpio-cfg.h> | ||
22 | #include <plat/sdhci.h> | ||
23 | #include <mach/gpio-samsung.h> | ||
24 | |||
25 | void s5pv210_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width) | ||
26 | { | ||
27 | struct s3c_sdhci_platdata *pdata = dev->dev.platform_data; | ||
28 | |||
29 | /* Set all the necessary GPG0/GPG1 pins to special-function 2 */ | ||
30 | s3c_gpio_cfgrange_nopull(S5PV210_GPG0(0), 2, S3C_GPIO_SFN(2)); | ||
31 | |||
32 | switch (width) { | ||
33 | case 8: | ||
34 | /* GPG1[3:6] special-function 3 */ | ||
35 | s3c_gpio_cfgrange_nopull(S5PV210_GPG1(3), 4, S3C_GPIO_SFN(3)); | ||
36 | case 4: | ||
37 | /* GPG0[3:6] special-function 2 */ | ||
38 | s3c_gpio_cfgrange_nopull(S5PV210_GPG0(3), 4, S3C_GPIO_SFN(2)); | ||
39 | default: | ||
40 | break; | ||
41 | } | ||
42 | |||
43 | if (pdata->cd_type == S3C_SDHCI_CD_INTERNAL) { | ||
44 | s3c_gpio_setpull(S5PV210_GPG0(2), S3C_GPIO_PULL_UP); | ||
45 | s3c_gpio_cfgpin(S5PV210_GPG0(2), S3C_GPIO_SFN(2)); | ||
46 | } | ||
47 | } | ||
48 | |||
49 | void s5pv210_setup_sdhci1_cfg_gpio(struct platform_device *dev, int width) | ||
50 | { | ||
51 | struct s3c_sdhci_platdata *pdata = dev->dev.platform_data; | ||
52 | |||
53 | /* Set all the necessary GPG1[0:1] pins to special-function 2 */ | ||
54 | s3c_gpio_cfgrange_nopull(S5PV210_GPG1(0), 2, S3C_GPIO_SFN(2)); | ||
55 | |||
56 | /* Data pin GPG1[3:6] to special-function 2 */ | ||
57 | s3c_gpio_cfgrange_nopull(S5PV210_GPG1(3), 4, S3C_GPIO_SFN(2)); | ||
58 | |||
59 | if (pdata->cd_type == S3C_SDHCI_CD_INTERNAL) { | ||
60 | s3c_gpio_setpull(S5PV210_GPG1(2), S3C_GPIO_PULL_UP); | ||
61 | s3c_gpio_cfgpin(S5PV210_GPG1(2), S3C_GPIO_SFN(2)); | ||
62 | } | ||
63 | } | ||
64 | |||
65 | void s5pv210_setup_sdhci2_cfg_gpio(struct platform_device *dev, int width) | ||
66 | { | ||
67 | struct s3c_sdhci_platdata *pdata = dev->dev.platform_data; | ||
68 | |||
69 | /* Set all the necessary GPG2[0:1] pins to special-function 2 */ | ||
70 | s3c_gpio_cfgrange_nopull(S5PV210_GPG2(0), 2, S3C_GPIO_SFN(2)); | ||
71 | |||
72 | switch (width) { | ||
73 | case 8: | ||
74 | /* Data pin GPG3[3:6] to special-function 3 */ | ||
75 | s3c_gpio_cfgrange_nopull(S5PV210_GPG3(3), 4, S3C_GPIO_SFN(3)); | ||
76 | case 4: | ||
77 | /* Data pin GPG2[3:6] to special-function 2 */ | ||
78 | s3c_gpio_cfgrange_nopull(S5PV210_GPG2(3), 4, S3C_GPIO_SFN(2)); | ||
79 | default: | ||
80 | break; | ||
81 | } | ||
82 | |||
83 | if (pdata->cd_type == S3C_SDHCI_CD_INTERNAL) { | ||
84 | s3c_gpio_setpull(S5PV210_GPG2(2), S3C_GPIO_PULL_UP); | ||
85 | s3c_gpio_cfgpin(S5PV210_GPG2(2), S3C_GPIO_SFN(2)); | ||
86 | } | ||
87 | } | ||
88 | |||
89 | void s5pv210_setup_sdhci3_cfg_gpio(struct platform_device *dev, int width) | ||
90 | { | ||
91 | struct s3c_sdhci_platdata *pdata = dev->dev.platform_data; | ||
92 | |||
93 | /* Set all the necessary GPG3[0:1] pins to special-function 2 */ | ||
94 | s3c_gpio_cfgrange_nopull(S5PV210_GPG3(0), 2, S3C_GPIO_SFN(2)); | ||
95 | |||
96 | /* Data pin GPG3[3:6] to special-function 2 */ | ||
97 | s3c_gpio_cfgrange_nopull(S5PV210_GPG3(3), 4, S3C_GPIO_SFN(2)); | ||
98 | |||
99 | if (pdata->cd_type == S3C_SDHCI_CD_INTERNAL) { | ||
100 | s3c_gpio_setpull(S5PV210_GPG3(2), S3C_GPIO_PULL_UP); | ||
101 | s3c_gpio_cfgpin(S5PV210_GPG3(2), S3C_GPIO_SFN(2)); | ||
102 | } | ||
103 | } | ||
diff --git a/arch/arm/mach-s5pv210/setup-spi.c b/arch/arm/mach-s5pv210/setup-spi.c deleted file mode 100644 index e1faf8ea4502..000000000000 --- a/arch/arm/mach-s5pv210/setup-spi.c +++ /dev/null | |||
@@ -1,34 +0,0 @@ | |||
1 | /* linux/arch/arm/mach-s5pv210/setup-spi.c | ||
2 | * | ||
3 | * Copyright (C) 2011 Samsung Electronics Ltd. | ||
4 | * http://www.samsung.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 <plat/gpio-cfg.h> | ||
12 | #include <mach/gpio-samsung.h> | ||
13 | |||
14 | #ifdef CONFIG_S3C64XX_DEV_SPI0 | ||
15 | int s3c64xx_spi0_cfg_gpio(void) | ||
16 | { | ||
17 | s3c_gpio_cfgpin(S5PV210_GPB(0), S3C_GPIO_SFN(2)); | ||
18 | s3c_gpio_setpull(S5PV210_GPB(0), S3C_GPIO_PULL_UP); | ||
19 | s3c_gpio_cfgall_range(S5PV210_GPB(2), 2, | ||
20 | S3C_GPIO_SFN(2), S3C_GPIO_PULL_UP); | ||
21 | return 0; | ||
22 | } | ||
23 | #endif | ||
24 | |||
25 | #ifdef CONFIG_S3C64XX_DEV_SPI1 | ||
26 | int s3c64xx_spi1_cfg_gpio(void) | ||
27 | { | ||
28 | s3c_gpio_cfgpin(S5PV210_GPB(4), S3C_GPIO_SFN(2)); | ||
29 | s3c_gpio_setpull(S5PV210_GPB(4), S3C_GPIO_PULL_UP); | ||
30 | s3c_gpio_cfgall_range(S5PV210_GPB(6), 2, | ||
31 | S3C_GPIO_SFN(2), S3C_GPIO_PULL_UP); | ||
32 | return 0; | ||
33 | } | ||
34 | #endif | ||
diff --git a/arch/arm/mach-s5pv210/setup-usb-phy.c b/arch/arm/mach-s5pv210/setup-usb-phy.c deleted file mode 100644 index b2ee5333f89c..000000000000 --- a/arch/arm/mach-s5pv210/setup-usb-phy.c +++ /dev/null | |||
@@ -1,95 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2012 Samsung Electronics Co.Ltd | ||
3 | * Author: Joonyoung Shim <jy0922.shim@samsung.com> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License version 2 as | ||
7 | * published by the Free Software Foundationr | ||
8 | */ | ||
9 | |||
10 | #include <linux/clk.h> | ||
11 | #include <linux/delay.h> | ||
12 | #include <linux/err.h> | ||
13 | #include <linux/io.h> | ||
14 | #include <linux/platform_device.h> | ||
15 | |||
16 | #include <mach/map.h> | ||
17 | |||
18 | #include <plat/cpu.h> | ||
19 | #include <plat/regs-usb-hsotg-phy.h> | ||
20 | #include <plat/usb-phy.h> | ||
21 | |||
22 | #define S5PV210_USB_PHY_CON (S3C_VA_SYS + 0xE80C) | ||
23 | #define S5PV210_USB_PHY0_EN (1 << 0) | ||
24 | #define S5PV210_USB_PHY1_EN (1 << 1) | ||
25 | |||
26 | static int s5pv210_usb_otgphy_init(struct platform_device *pdev) | ||
27 | { | ||
28 | struct clk *xusbxti; | ||
29 | u32 phyclk; | ||
30 | |||
31 | writel(readl(S5PV210_USB_PHY_CON) | S5PV210_USB_PHY0_EN, | ||
32 | S5PV210_USB_PHY_CON); | ||
33 | |||
34 | /* set clock frequency for PLL */ | ||
35 | phyclk = readl(S3C_PHYCLK) & ~S3C_PHYCLK_CLKSEL_MASK; | ||
36 | |||
37 | xusbxti = clk_get(&pdev->dev, "xusbxti"); | ||
38 | if (xusbxti && !IS_ERR(xusbxti)) { | ||
39 | switch (clk_get_rate(xusbxti)) { | ||
40 | case 12 * MHZ: | ||
41 | phyclk |= S3C_PHYCLK_CLKSEL_12M; | ||
42 | break; | ||
43 | case 24 * MHZ: | ||
44 | phyclk |= S3C_PHYCLK_CLKSEL_24M; | ||
45 | break; | ||
46 | default: | ||
47 | case 48 * MHZ: | ||
48 | /* default reference clock */ | ||
49 | break; | ||
50 | } | ||
51 | clk_put(xusbxti); | ||
52 | } | ||
53 | |||
54 | /* TODO: select external clock/oscillator */ | ||
55 | writel(phyclk | S3C_PHYCLK_CLK_FORCE, S3C_PHYCLK); | ||
56 | |||
57 | /* set to normal OTG PHY */ | ||
58 | writel((readl(S3C_PHYPWR) & ~S3C_PHYPWR_NORMAL_MASK), S3C_PHYPWR); | ||
59 | mdelay(1); | ||
60 | |||
61 | /* reset OTG PHY and Link */ | ||
62 | writel(S3C_RSTCON_PHY | S3C_RSTCON_HCLK | S3C_RSTCON_PHYCLK, | ||
63 | S3C_RSTCON); | ||
64 | udelay(20); /* at-least 10uS */ | ||
65 | writel(0, S3C_RSTCON); | ||
66 | |||
67 | return 0; | ||
68 | } | ||
69 | |||
70 | static int s5pv210_usb_otgphy_exit(struct platform_device *pdev) | ||
71 | { | ||
72 | writel((readl(S3C_PHYPWR) | S3C_PHYPWR_ANALOG_POWERDOWN | | ||
73 | S3C_PHYPWR_OTG_DISABLE), S3C_PHYPWR); | ||
74 | |||
75 | writel(readl(S5PV210_USB_PHY_CON) & ~S5PV210_USB_PHY0_EN, | ||
76 | S5PV210_USB_PHY_CON); | ||
77 | |||
78 | return 0; | ||
79 | } | ||
80 | |||
81 | int s5p_usb_phy_init(struct platform_device *pdev, int type) | ||
82 | { | ||
83 | if (type == USB_PHY_TYPE_DEVICE) | ||
84 | return s5pv210_usb_otgphy_init(pdev); | ||
85 | |||
86 | return -EINVAL; | ||
87 | } | ||
88 | |||
89 | int s5p_usb_phy_exit(struct platform_device *pdev, int type) | ||
90 | { | ||
91 | if (type == USB_PHY_TYPE_DEVICE) | ||
92 | return s5pv210_usb_otgphy_exit(pdev); | ||
93 | |||
94 | return -EINVAL; | ||
95 | } | ||
diff --git a/arch/arm/plat-samsung/s5p-sleep.S b/arch/arm/mach-s5pv210/sleep.S index 25c68ceb9e2b..7c43ddd33ba8 100644 --- a/arch/arm/plat-samsung/s5p-sleep.S +++ b/arch/arm/mach-s5pv210/sleep.S | |||
@@ -1,8 +1,8 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2011 Samsung Electronics Co., Ltd. | 2 | * Copyright (c) 2011-2014 Samsung Electronics Co., Ltd. |
3 | * http://www.samsung.com | 3 | * http://www.samsung.com |
4 | * | 4 | * |
5 | * Common S5P Sleep Code | 5 | * S5PV210 Sleep Code |
6 | * Based on S3C64XX sleep code by: | 6 | * Based on S3C64XX sleep code by: |
7 | * Ben Dooks, (c) 2008 Simtec Electronics | 7 | * Ben Dooks, (c) 2008 Simtec Electronics |
8 | * | 8 | * |
@@ -10,16 +10,7 @@ | |||
10 | * it under the terms of the GNU General Public License as published by | 10 | * it under the terms of the GNU General Public License as published by |
11 | * the Free Software Foundation; either version 2 of the License, or | 11 | * the Free Software Foundation; either version 2 of the License, or |
12 | * (at your option) any later version. | 12 | * (at your option) any later version. |
13 | * | 13 | */ |
14 | * This program is distributed in the hope that it will be useful, | ||
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | * GNU General Public License for more details. | ||
18 | * | ||
19 | * You should have received a copy of the GNU General Public License | ||
20 | * along with this program; if not, write to the Free Software | ||
21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
22 | */ | ||
23 | 14 | ||
24 | #include <linux/linkage.h> | 15 | #include <linux/linkage.h> |
25 | 16 | ||
@@ -40,6 +31,6 @@ | |||
40 | * resume code entry for bootloader to call | 31 | * resume code entry for bootloader to call |
41 | */ | 32 | */ |
42 | 33 | ||
43 | ENTRY(s3c_cpu_resume) | 34 | ENTRY(s5pv210_cpu_resume) |
44 | b cpu_resume | 35 | b cpu_resume |
45 | ENDPROC(s3c_cpu_resume) | 36 | ENDPROC(s5pv210_cpu_resume) |
diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig index 3a6e3c20a86d..e15dff790dbb 100644 --- a/arch/arm/mach-shmobile/Kconfig +++ b/arch/arm/mach-shmobile/Kconfig | |||
@@ -12,6 +12,7 @@ menuconfig 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 | ||
@@ -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 | ||
@@ -233,19 +244,6 @@ config MACH_MARZEN | |||
233 | select REGULATOR_FIXED_VOLTAGE if REGULATOR | 244 | select REGULATOR_FIXED_VOLTAGE if REGULATOR |
234 | select USE_OF | 245 | select USE_OF |
235 | 246 | ||
236 | config MACH_MARZEN_REFERENCE | ||
237 | bool "MARZEN board - Reference Device Tree Implementation" | ||
238 | depends on ARCH_R8A7779 | ||
239 | select ARCH_REQUIRE_GPIOLIB | ||
240 | select REGULATOR_FIXED_VOLTAGE if REGULATOR | ||
241 | select USE_OF | ||
242 | ---help--- | ||
243 | Use reference implementation of Marzen board support | ||
244 | which makes use of device tree at the expense | ||
245 | of not supporting a number of devices. | ||
246 | |||
247 | This is intended to aid developers | ||
248 | |||
249 | config MACH_LAGER | 247 | config MACH_LAGER |
250 | bool "Lager board" | 248 | bool "Lager board" |
251 | depends on ARCH_R8A7790 | 249 | depends on ARCH_R8A7790 |
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-koelsch-reference.c b/arch/arm/mach-shmobile/board-koelsch-reference.c index 1d3f67d4ccd6..0b1fb2345aa1 100644 --- a/arch/arm/mach-shmobile/board-koelsch-reference.c +++ b/arch/arm/mach-shmobile/board-koelsch-reference.c | |||
@@ -23,11 +23,13 @@ | |||
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/r8a7791.h> | 26 | |
27 | #include <asm/mach/arch.h> | 27 | #include <asm/mach/arch.h> |
28 | |||
28 | #include "clock.h" | 29 | #include "clock.h" |
29 | #include "common.h" | 30 | #include "common.h" |
30 | #include "irqs.h" | 31 | #include "irqs.h" |
32 | #include "r8a7791.h" | ||
31 | #include "rcar-gen2.h" | 33 | #include "rcar-gen2.h" |
32 | 34 | ||
33 | /* DU */ | 35 | /* DU */ |
diff --git a/arch/arm/mach-shmobile/board-koelsch.c b/arch/arm/mach-shmobile/board-koelsch.c index c932f2ca85b1..766442f82948 100644 --- a/arch/arm/mach-shmobile/board-koelsch.c +++ b/arch/arm/mach-shmobile/board-koelsch.c | |||
@@ -45,11 +45,13 @@ | |||
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/r8a7791.h> | 48 | |
49 | #include <asm/mach-types.h> | 49 | #include <asm/mach-types.h> |
50 | #include <asm/mach/arch.h> | 50 | #include <asm/mach/arch.h> |
51 | |||
51 | #include "common.h" | 52 | #include "common.h" |
52 | #include "irqs.h" | 53 | #include "irqs.h" |
54 | #include "r8a7791.h" | ||
53 | #include "rcar-gen2.h" | 55 | #include "rcar-gen2.h" |
54 | 56 | ||
55 | /* DU */ | 57 | /* DU */ |
diff --git a/arch/arm/mach-shmobile/board-marzen-reference.c b/arch/arm/mach-shmobile/board-marzen-reference.c index 94bd57203ff5..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 <linux/clocksource.h> | ||
24 | #include <linux/of_platform.h> | ||
25 | |||
23 | #include <asm/irq.h> | 26 | #include <asm/irq.h> |
24 | #include <asm/mach/arch.h> | 27 | #include <asm/mach/arch.h> |
28 | |||
29 | #include "clock.h" | ||
25 | #include "common.h" | 30 | #include "common.h" |
26 | #include "irqs.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 | }; | ||
27 | 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 d0b5b746fe05..e5cf4201e769 100644 --- a/arch/arm/mach-shmobile/board-marzen.c +++ b/arch/arm/mach-shmobile/board-marzen.c | |||
@@ -41,13 +41,15 @@ | |||
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 <asm/mach-types.h> | 46 | #include <asm/mach-types.h> |
47 | #include <asm/mach/arch.h> | 47 | #include <asm/mach/arch.h> |
48 | #include <asm/traps.h> | 48 | #include <asm/traps.h> |
49 | |||
49 | #include "common.h" | 50 | #include "common.h" |
50 | #include "irqs.h" | 51 | #include "irqs.h" |
52 | #include "r8a7779.h" | ||
51 | 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[] = { |
diff --git a/arch/arm/mach-shmobile/clock-r8a73a4.c b/arch/arm/mach-shmobile/clock-r8a73a4.c index 0f431498229b..49d139748aa6 100644 --- a/arch/arm/mach-shmobile/clock-r8a73a4.c +++ b/arch/arm/mach-shmobile/clock-r8a73a4.c | |||
@@ -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 789091cfa37a..a60c324df64e 100644 --- a/arch/arm/mach-shmobile/clock-r8a7740.c +++ b/arch/arm/mach-shmobile/clock-r8a7740.c | |||
@@ -556,27 +556,27 @@ static struct clk_lookup lookups[] = { | |||
556 | CLKDEV_DEV_ID("sh_mobile_ceu.1", &mstp_clks[MSTP128]), | 556 | CLKDEV_DEV_ID("sh_mobile_ceu.1", &mstp_clks[MSTP128]), |
557 | 557 | ||
558 | CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP200]), | 558 | CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP200]), |
559 | CLKDEV_DEV_ID("e6c80000.sci", &mstp_clks[MSTP200]), | 559 | CLKDEV_DEV_ID("e6c80000.serial", &mstp_clks[MSTP200]), |
560 | CLKDEV_DEV_ID("sh-sci.3", &mstp_clks[MSTP201]), | 560 | CLKDEV_DEV_ID("sh-sci.3", &mstp_clks[MSTP201]), |
561 | CLKDEV_DEV_ID("e6c70000.sci", &mstp_clks[MSTP201]), | 561 | CLKDEV_DEV_ID("e6c70000.serial", &mstp_clks[MSTP201]), |
562 | CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP202]), | 562 | CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP202]), |
563 | CLKDEV_DEV_ID("e6c60000.sci", &mstp_clks[MSTP202]), | 563 | CLKDEV_DEV_ID("e6c60000.serial", &mstp_clks[MSTP202]), |
564 | CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP203]), | 564 | CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP203]), |
565 | CLKDEV_DEV_ID("e6c50000.sci", &mstp_clks[MSTP203]), | 565 | CLKDEV_DEV_ID("e6c50000.serial", &mstp_clks[MSTP203]), |
566 | CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP204]), | 566 | CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP204]), |
567 | CLKDEV_DEV_ID("e6c40000.sci", &mstp_clks[MSTP204]), | 567 | CLKDEV_DEV_ID("e6c40000.serial", &mstp_clks[MSTP204]), |
568 | CLKDEV_DEV_ID("sh-sci.8", &mstp_clks[MSTP206]), | 568 | CLKDEV_DEV_ID("sh-sci.8", &mstp_clks[MSTP206]), |
569 | CLKDEV_DEV_ID("e6c30000.sci", &mstp_clks[MSTP206]), | 569 | CLKDEV_DEV_ID("e6c30000.serial", &mstp_clks[MSTP206]), |
570 | CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP207]), | 570 | CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP207]), |
571 | CLKDEV_DEV_ID("e6cb0000.sci", &mstp_clks[MSTP207]), | 571 | CLKDEV_DEV_ID("e6cb0000.serial", &mstp_clks[MSTP207]), |
572 | CLKDEV_DEV_ID("sh-dma-engine.3", &mstp_clks[MSTP214]), | 572 | CLKDEV_DEV_ID("sh-dma-engine.3", &mstp_clks[MSTP214]), |
573 | CLKDEV_DEV_ID("sh-dma-engine.2", &mstp_clks[MSTP216]), | 573 | CLKDEV_DEV_ID("sh-dma-engine.2", &mstp_clks[MSTP216]), |
574 | CLKDEV_DEV_ID("sh-dma-engine.1", &mstp_clks[MSTP217]), | 574 | CLKDEV_DEV_ID("sh-dma-engine.1", &mstp_clks[MSTP217]), |
575 | CLKDEV_DEV_ID("sh-dma-engine.0", &mstp_clks[MSTP218]), | 575 | CLKDEV_DEV_ID("sh-dma-engine.0", &mstp_clks[MSTP218]), |
576 | CLKDEV_DEV_ID("sh-sci.7", &mstp_clks[MSTP222]), | 576 | CLKDEV_DEV_ID("sh-sci.7", &mstp_clks[MSTP222]), |
577 | CLKDEV_DEV_ID("e6cd0000.sci", &mstp_clks[MSTP222]), | 577 | CLKDEV_DEV_ID("e6cd0000.serial", &mstp_clks[MSTP222]), |
578 | CLKDEV_DEV_ID("sh-sci.6", &mstp_clks[MSTP230]), | 578 | CLKDEV_DEV_ID("sh-sci.6", &mstp_clks[MSTP230]), |
579 | CLKDEV_DEV_ID("e6cc0000.sci", &mstp_clks[MSTP230]), | 579 | CLKDEV_DEV_ID("e6cc0000.serial", &mstp_clks[MSTP230]), |
580 | 580 | ||
581 | CLKDEV_DEV_ID("sh_fsi2", &mstp_clks[MSTP328]), | 581 | CLKDEV_DEV_ID("sh_fsi2", &mstp_clks[MSTP328]), |
582 | 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 16bbc94a1520..95579073cfce 100644 --- a/arch/arm/mach-shmobile/clock-r8a7778.c +++ b/arch/arm/mach-shmobile/clock-r8a7778.c | |||
@@ -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 d81539a26dbd..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 <linux/sh_timer.h> | ||
27 | |||
26 | #include "clock.h" | 28 | #include "clock.h" |
27 | #include "common.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-sh73a0.c b/arch/arm/mach-shmobile/clock-sh73a0.c index 37f48383e05a..9433a4e2c88e 100644 --- a/arch/arm/mach-shmobile/clock-sh73a0.c +++ b/arch/arm/mach-shmobile/clock-sh73a0.c | |||
@@ -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/common.h b/arch/arm/mach-shmobile/common.h index f7a360edcc35..98056081f0da 100644 --- a/arch/arm/mach-shmobile/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/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/headsmp.S b/arch/arm/mach-shmobile/headsmp.S index 293007579b8e..50c491567e11 100644 --- a/arch/arm/mach-shmobile/headsmp.S +++ b/arch/arm/mach-shmobile/headsmp.S | |||
@@ -10,15 +10,18 @@ | |||
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/assembler.h> | 16 | #include <asm/assembler.h> |
16 | #include <asm/memory.h> | 17 | #include <asm/memory.h> |
17 | 18 | ||
19 | #ifdef CONFIG_SMP | ||
18 | ENTRY(shmobile_invalidate_start) | 20 | ENTRY(shmobile_invalidate_start) |
19 | bl v7_invalidate_l1 | 21 | bl v7_invalidate_l1 |
20 | b secondary_startup | 22 | b secondary_startup |
21 | ENDPROC(shmobile_invalidate_start) | 23 | ENDPROC(shmobile_invalidate_start) |
24 | #endif | ||
22 | 25 | ||
23 | /* | 26 | /* |
24 | * Reset vector for secondary CPUs. | 27 | * Reset vector for secondary CPUs. |
@@ -69,7 +72,7 @@ shmobile_smp_boot_find_mpidr: | |||
69 | 72 | ||
70 | shmobile_smp_boot_next: | 73 | shmobile_smp_boot_next: |
71 | add r1, r1, #1 | 74 | add r1, r1, #1 |
72 | cmp r1, #CONFIG_NR_CPUS | 75 | cmp r1, #NR_CPUS |
73 | blo shmobile_smp_boot_find_mpidr | 76 | blo shmobile_smp_boot_find_mpidr |
74 | 77 | ||
75 | b shmobile_smp_sleep | 78 | b shmobile_smp_sleep |
@@ -86,10 +89,10 @@ ENDPROC(shmobile_smp_sleep) | |||
86 | 89 | ||
87 | .globl shmobile_smp_mpidr | 90 | .globl shmobile_smp_mpidr |
88 | shmobile_smp_mpidr: | 91 | shmobile_smp_mpidr: |
89 | 1: .space CONFIG_NR_CPUS * 4 | 92 | 1: .space NR_CPUS * 4 |
90 | .globl shmobile_smp_fn | 93 | .globl shmobile_smp_fn |
91 | shmobile_smp_fn: | 94 | shmobile_smp_fn: |
92 | 2: .space CONFIG_NR_CPUS * 4 | 95 | 2: .space NR_CPUS * 4 |
93 | .globl shmobile_smp_arg | 96 | .globl shmobile_smp_arg |
94 | shmobile_smp_arg: | 97 | shmobile_smp_arg: |
95 | 3: .space CONFIG_NR_CPUS * 4 | 98 | 3: .space NR_CPUS * 4 |
diff --git a/arch/arm/mach-shmobile/platsmp-apmu.c b/arch/arm/mach-shmobile/platsmp-apmu.c index fe648f5d8f06..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> |
23 | #include <asm/suspend.h> | ||
19 | #include "common.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/pm-r8a7779.c b/arch/arm/mach-shmobile/pm-r8a7779.c index f0f36cb5ffe7..69f70b7f7fb2 100644 --- a/arch/arm/mach-shmobile/pm-r8a7779.c +++ b/arch/arm/mach-shmobile/pm-r8a7779.c | |||
@@ -19,10 +19,12 @@ | |||
19 | #include <linux/irq.h> | 19 | #include <linux/irq.h> |
20 | #include <linux/interrupt.h> | 20 | #include <linux/interrupt.h> |
21 | #include <linux/console.h> | 21 | #include <linux/console.h> |
22 | |||
22 | #include <asm/io.h> | 23 | #include <asm/io.h> |
23 | #include <mach/r8a7779.h> | 24 | |
24 | #include "common.h" | 25 | #include "common.h" |
25 | #include "pm-rcar.h" | 26 | #include "pm-rcar.h" |
27 | #include "r8a7779.h" | ||
26 | 28 | ||
27 | /* SYSC */ | 29 | /* SYSC */ |
28 | #define SYSCIER 0x0c | 30 | #define SYSCIER 0x0c |
diff --git a/arch/arm/mach-shmobile/pm-r8a7790.c b/arch/arm/mach-shmobile/pm-r8a7790.c index 8845433a00b3..80e8d95e54d3 100644 --- a/arch/arm/mach-shmobile/pm-r8a7790.c +++ b/arch/arm/mach-shmobile/pm-r8a7790.c | |||
@@ -11,12 +11,22 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | 14 | #include <linux/smp.h> | |
15 | #include <asm/io.h> | 15 | #include <asm/io.h> |
16 | 16 | #include "common.h" | |
17 | #include "pm-rcar.h" | 17 | #include "pm-rcar.h" |
18 | #include "r8a7790.h" | 18 | #include "r8a7790.h" |
19 | 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 | ||
29 | |||
20 | /* SYSC */ | 30 | /* SYSC */ |
21 | #define SYSCIER 0x0c | 31 | #define SYSCIER 0x0c |
22 | #define SYSCIMR 0x10 | 32 | #define SYSCIMR 0x10 |
@@ -40,8 +50,33 @@ static inline void r8a7790_sysc_init(void) {} | |||
40 | 50 | ||
41 | void __init r8a7790_pm_init(void) | 51 | void __init r8a7790_pm_init(void) |
42 | { | 52 | { |
53 | void __iomem *p; | ||
54 | u32 bar; | ||
43 | static int once; | 55 | static int once; |
44 | 56 | ||
45 | if (!once++) | 57 | if (once++) |
46 | 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(); | ||
47 | } | 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/include/mach/r8a7779.h b/arch/arm/mach-shmobile/r8a7779.h index def10a29e09a..5415c719dc19 100644 --- a/arch/arm/mach-shmobile/include/mach/r8a7779.h +++ b/arch/arm/mach-shmobile/r8a7779.h | |||
@@ -10,7 +10,6 @@ enum { | |||
10 | HPBDMA_SLAVE_SDHI0_RX, | 10 | HPBDMA_SLAVE_SDHI0_RX, |
11 | }; | 11 | }; |
12 | 12 | ||
13 | extern void r8a7779_init_delay(void); | ||
14 | extern void r8a7779_init_irq_extpin(int irlm); | 13 | extern void r8a7779_init_irq_extpin(int irlm); |
15 | extern void r8a7779_init_irq_extpin_dt(int irlm); | 14 | extern void r8a7779_init_irq_extpin_dt(int irlm); |
16 | extern void r8a7779_init_irq_dt(void); | 15 | extern void r8a7779_init_irq_dt(void); |
@@ -20,6 +19,7 @@ extern void r8a7779_add_early_devices(void); | |||
20 | extern void r8a7779_add_standard_devices(void); | 19 | extern void r8a7779_add_standard_devices(void); |
21 | extern void r8a7779_add_standard_devices_dt(void); | 20 | extern void r8a7779_add_standard_devices_dt(void); |
22 | extern void r8a7779_init_late(void); | 21 | extern void r8a7779_init_late(void); |
22 | extern u32 r8a7779_read_mode_pins(void); | ||
23 | extern void r8a7779_clock_init(void); | 23 | extern void r8a7779_clock_init(void); |
24 | extern void r8a7779_pinmux_init(void); | 24 | extern void r8a7779_pinmux_init(void); |
25 | extern void r8a7779_pm_init(void); | 25 | extern void r8a7779_pm_init(void); |
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/rcar-gen2.h b/arch/arm/mach-shmobile/rcar-gen2.h index 43f606eb2d82..ce53cb5f53a1 100644 --- a/arch/arm/mach-shmobile/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-r8a7779.c b/arch/arm/mach-shmobile/setup-r8a7779.c index 280303cef702..236c1befb9e3 100644 --- a/arch/arm/mach-shmobile/setup-r8a7779.c +++ b/arch/arm/mach-shmobile/setup-r8a7779.c | |||
@@ -40,14 +40,16 @@ | |||
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/r8a7779.h> | 43 | |
44 | #include <asm/mach-types.h> | 44 | #include <asm/mach-types.h> |
45 | #include <asm/mach/arch.h> | 45 | #include <asm/mach/arch.h> |
46 | #include <asm/mach/time.h> | 46 | #include <asm/mach/time.h> |
47 | #include <asm/mach/map.h> | 47 | #include <asm/mach/map.h> |
48 | #include <asm/hardware/cache-l2x0.h> | 48 | #include <asm/hardware/cache-l2x0.h> |
49 | |||
49 | #include "common.h" | 50 | #include "common.h" |
50 | #include "irqs.h" | 51 | #include "irqs.h" |
52 | #include "r8a7779.h" | ||
51 | 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) */ |
@@ -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 240411b42424..0c12b01bb9e3 100644 --- a/arch/arm/mach-shmobile/setup-r8a7790.c +++ b/arch/arm/mach-shmobile/setup-r8a7790.c | |||
@@ -321,6 +321,8 @@ DT_MACHINE_START(R8A7790_DT, "Generic R8A7790 (Flattened Device Tree)") | |||
321 | .smp = smp_ops(r8a7790_smp_ops), | 321 | .smp = smp_ops(r8a7790_smp_ops), |
322 | .init_early = shmobile_init_delay, | 322 | .init_early = shmobile_init_delay, |
323 | .init_time = rcar_gen2_timer_init, | 323 | .init_time = rcar_gen2_timer_init, |
324 | .init_late = shmobile_init_late, | ||
325 | .reserve = rcar_gen2_reserve, | ||
324 | .dt_compat = r8a7790_boards_compat_dt, | 326 | .dt_compat = r8a7790_boards_compat_dt, |
325 | MACHINE_END | 327 | MACHINE_END |
326 | #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 004b11a8fd88..d47d8b16a43f 100644 --- a/arch/arm/mach-shmobile/setup-r8a7791.c +++ b/arch/arm/mach-shmobile/setup-r8a7791.c | |||
@@ -26,10 +26,12 @@ | |||
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/r8a7791.h> | 29 | |
30 | #include <asm/mach/arch.h> | 30 | #include <asm/mach/arch.h> |
31 | |||
31 | #include "common.h" | 32 | #include "common.h" |
32 | #include "irqs.h" | 33 | #include "irqs.h" |
34 | #include "r8a7791.h" | ||
33 | #include "rcar-gen2.h" | 35 | #include "rcar-gen2.h" |
34 | 36 | ||
35 | static const struct resource pfc_resources[] __initconst = { | 37 | static const struct resource pfc_resources[] __initconst = { |
@@ -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 fdc714ebc4cd..42d5b4308923 100644 --- a/arch/arm/mach-shmobile/setup-rcar-gen2.c +++ b/arch/arm/mach-shmobile/setup-rcar-gen2.c | |||
@@ -20,8 +20,11 @@ | |||
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> |
27 | #include <linux/of_fdt.h> | ||
25 | #include <asm/mach/arch.h> | 28 | #include <asm/mach/arch.h> |
26 | #include "common.h" | 29 | #include "common.h" |
27 | #include "rcar-gen2.h" | 30 | #include "rcar-gen2.h" |
@@ -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/smp-r8a7779.c b/arch/arm/mach-shmobile/smp-r8a7779.c index c230fc0c3fef..3100e355c3fd 100644 --- a/arch/arm/mach-shmobile/smp-r8a7779.c +++ b/arch/arm/mach-shmobile/smp-r8a7779.c | |||
@@ -23,13 +23,15 @@ | |||
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/r8a7779.h> | 26 | |
27 | #include <asm/cacheflush.h> | 27 | #include <asm/cacheflush.h> |
28 | #include <asm/smp_plat.h> | 28 | #include <asm/smp_plat.h> |
29 | #include <asm/smp_scu.h> | 29 | #include <asm/smp_scu.h> |
30 | #include <asm/smp_twd.h> | 30 | #include <asm/smp_twd.h> |
31 | |||
31 | #include "common.h" | 32 | #include "common.h" |
32 | #include "pm-rcar.h" | 33 | #include "pm-rcar.h" |
34 | #include "r8a7779.h" | ||
33 | 35 | ||
34 | #define AVECR IOMEM(0xfe700040) | 36 | #define AVECR IOMEM(0xfe700040) |
35 | #define R8A7779_SCU_BASE 0xf0000000 | 37 | #define R8A7779_SCU_BASE 0xf0000000 |
diff --git a/arch/arm/mach-shmobile/smp-r8a7790.c b/arch/arm/mach-shmobile/smp-r8a7790.c index c256fdfbb5b0..2311694636e1 100644 --- a/arch/arm/mach-shmobile/smp-r8a7790.c +++ b/arch/arm/mach-shmobile/smp-r8a7790.c | |||
@@ -24,13 +24,6 @@ | |||
24 | #include "pm-rcar.h" | 24 | #include "pm-rcar.h" |
25 | #include "r8a7790.h" | 25 | #include "r8a7790.h" |
26 | 26 | ||
27 | #define RST 0xe6160000 | ||
28 | #define CA15BAR 0x0020 | ||
29 | #define CA7BAR 0x0030 | ||
30 | #define CA15RESCNT 0x0040 | ||
31 | #define CA7RESCNT 0x0044 | ||
32 | #define MERAM 0xe8080000 | ||
33 | |||
34 | static struct rcar_sysc_ch r8a7790_ca15_scu = { | 27 | static struct rcar_sysc_ch r8a7790_ca15_scu = { |
35 | .chan_offs = 0x180, /* PWRSR5 .. PWRER5 */ | 28 | .chan_offs = 0x180, /* PWRSR5 .. PWRER5 */ |
36 | .isr_bit = 12, /* CA15-SCU */ | 29 | .isr_bit = 12, /* CA15-SCU */ |
@@ -43,32 +36,9 @@ static struct rcar_sysc_ch r8a7790_ca7_scu = { | |||
43 | 36 | ||
44 | static void __init r8a7790_smp_prepare_cpus(unsigned int max_cpus) | 37 | static void __init r8a7790_smp_prepare_cpus(unsigned int max_cpus) |
45 | { | 38 | { |
46 | void __iomem *p; | ||
47 | u32 bar; | ||
48 | |||
49 | /* let APMU code install data related to shmobile_boot_vector */ | 39 | /* let APMU code install data related to shmobile_boot_vector */ |
50 | shmobile_smp_apmu_prepare_cpus(max_cpus); | 40 | shmobile_smp_apmu_prepare_cpus(max_cpus); |
51 | 41 | ||
52 | /* MERAM for jump stub, because BAR requires 256KB aligned address */ | ||
53 | p = ioremap_nocache(MERAM, shmobile_boot_size); | ||
54 | memcpy_toio(p, shmobile_boot_vector, shmobile_boot_size); | ||
55 | iounmap(p); | ||
56 | |||
57 | /* setup reset vectors */ | ||
58 | p = ioremap_nocache(RST, 0x63); | ||
59 | bar = (MERAM >> 8) & 0xfffffc00; | ||
60 | writel_relaxed(bar, p + CA15BAR); | ||
61 | writel_relaxed(bar, p + CA7BAR); | ||
62 | writel_relaxed(bar | 0x10, p + CA15BAR); | ||
63 | writel_relaxed(bar | 0x10, p + CA7BAR); | ||
64 | |||
65 | /* enable clocks to all CPUs */ | ||
66 | writel_relaxed((readl_relaxed(p + CA15RESCNT) & ~0x0f) | 0xa5a50000, | ||
67 | p + CA15RESCNT); | ||
68 | writel_relaxed((readl_relaxed(p + CA7RESCNT) & ~0x0f) | 0x5a5a0000, | ||
69 | p + CA7RESCNT); | ||
70 | iounmap(p); | ||
71 | |||
72 | /* turn on power to SCU */ | 42 | /* turn on power to SCU */ |
73 | r8a7790_pm_init(); | 43 | r8a7790_pm_init(); |
74 | 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 2648d68650e4..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/r8a7791.h> | 22 | |
22 | #include "common.h" | 23 | #include "common.h" |
24 | #include "r8a7791.h" | ||
23 | #include "rcar-gen2.h" | 25 | #include "rcar-gen2.h" |
24 | 26 | ||
25 | #define RST 0xe6160000 | ||
26 | #define CA15BAR 0x0020 | ||
27 | #define CA15RESCNT 0x0040 | ||
28 | #define RAM 0xe6300000 | ||
29 | |||
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/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-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig index d46b9495cd55..1aaa1e15ef70 100644 --- a/arch/arm/mach-sunxi/Kconfig +++ b/arch/arm/mach-sunxi/Kconfig | |||
@@ -34,4 +34,12 @@ config MACH_SUN7I | |||
34 | select HAVE_ARM_ARCH_TIMER | 34 | select HAVE_ARM_ARCH_TIMER |
35 | select SUN5I_HSTIMER | 35 | select SUN5I_HSTIMER |
36 | 36 | ||
37 | config MACH_SUN8I | ||
38 | bool "Allwinner A23 (sun8i) SoCs support" | ||
39 | default ARCH_SUNXI | ||
40 | select ARCH_HAS_RESET_CONTROLLER | ||
41 | select ARM_GIC | ||
42 | select MFD_SUN6I_PRCM | ||
43 | select RESET_CONTROLLER | ||
44 | |||
37 | endif | 45 | endif |
diff --git a/arch/arm/mach-sunxi/sunxi.c b/arch/arm/mach-sunxi/sunxi.c index b6085084e0ff..42d4753683ce 100644 --- a/arch/arm/mach-sunxi/sunxi.c +++ b/arch/arm/mach-sunxi/sunxi.c | |||
@@ -130,3 +130,12 @@ DT_MACHINE_START(SUN7I_DT, "Allwinner sun7i (A20) Family") | |||
130 | .dt_compat = sun7i_board_dt_compat, | 130 | .dt_compat = sun7i_board_dt_compat, |
131 | .restart = sun4i_restart, | 131 | .restart = sun4i_restart, |
132 | MACHINE_END | 132 | MACHINE_END |
133 | |||
134 | static const char * const sun8i_board_dt_compat[] = { | ||
135 | "allwinner,sun8i-a23", | ||
136 | NULL, | ||
137 | }; | ||
138 | |||
139 | DT_MACHINE_START(SUN8I_DT, "Allwinner sun8i (A23) Family") | ||
140 | .dt_compat = sun8i_board_dt_compat, | ||
141 | MACHINE_END | ||
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/mm/Kconfig b/arch/arm/mm/Kconfig index 577039a3f6e5..ae69809a9e47 100644 --- a/arch/arm/mm/Kconfig +++ b/arch/arm/mm/Kconfig | |||
@@ -854,7 +854,7 @@ config OUTER_CACHE_SYNC | |||
854 | 854 | ||
855 | config CACHE_FEROCEON_L2 | 855 | config CACHE_FEROCEON_L2 |
856 | bool "Enable the Feroceon L2 cache controller" | 856 | bool "Enable the Feroceon L2 cache controller" |
857 | depends on ARCH_KIRKWOOD || ARCH_MV78XX0 || ARCH_MVEBU | 857 | depends on ARCH_MV78XX0 || ARCH_MVEBU |
858 | default y | 858 | default y |
859 | select OUTER_CACHE | 859 | select OUTER_CACHE |
860 | help | 860 | help |
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c index 1c98659bbf89..c2baa8ede543 100644 --- a/arch/arm/plat-omap/dma.c +++ b/arch/arm/plat-omap/dma.c | |||
@@ -2102,7 +2102,7 @@ static int omap_system_dma_probe(struct platform_device *pdev) | |||
2102 | omap_dma_set_global_params(DMA_DEFAULT_ARB_RATE, | 2102 | omap_dma_set_global_params(DMA_DEFAULT_ARB_RATE, |
2103 | DMA_DEFAULT_FIFO_DEPTH, 0); | 2103 | DMA_DEFAULT_FIFO_DEPTH, 0); |
2104 | 2104 | ||
2105 | if (dma_omap2plus()) { | 2105 | if (dma_omap2plus() && !(d->dev_caps & DMA_ENGINE_HANDLE_IRQ)) { |
2106 | strcpy(irq_name, "0"); | 2106 | strcpy(irq_name, "0"); |
2107 | dma_irq = platform_get_irq_byname(pdev, irq_name); | 2107 | dma_irq = platform_get_irq_byname(pdev, irq_name); |
2108 | if (dma_irq < 0) { | 2108 | if (dma_irq < 0) { |
@@ -2147,7 +2147,8 @@ static int omap_system_dma_remove(struct platform_device *pdev) | |||
2147 | char irq_name[4]; | 2147 | char irq_name[4]; |
2148 | strcpy(irq_name, "0"); | 2148 | strcpy(irq_name, "0"); |
2149 | dma_irq = platform_get_irq_byname(pdev, irq_name); | 2149 | dma_irq = platform_get_irq_byname(pdev, irq_name); |
2150 | remove_irq(dma_irq, &omap24xx_dma_irq); | 2150 | if (dma_irq >= 0) |
2151 | remove_irq(dma_irq, &omap24xx_dma_irq); | ||
2151 | } else { | 2152 | } else { |
2152 | int irq_rel = 0; | 2153 | int irq_rel = 0; |
2153 | for ( ; irq_rel < dma_chan_count; irq_rel++) { | 2154 | for ( ; irq_rel < dma_chan_count; irq_rel++) { |
diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig index 6910c8669742..c87aefbf3a13 100644 --- a/arch/arm/plat-samsung/Kconfig +++ b/arch/arm/plat-samsung/Kconfig | |||
@@ -6,30 +6,16 @@ | |||
6 | 6 | ||
7 | config PLAT_SAMSUNG | 7 | config PLAT_SAMSUNG |
8 | bool | 8 | bool |
9 | depends on PLAT_S3C24XX || ARCH_S3C64XX || PLAT_S5P || ARCH_EXYNOS | 9 | depends on PLAT_S3C24XX || ARCH_S3C64XX || ARCH_EXYNOS || ARCH_S5PV210 |
10 | default y | 10 | default y |
11 | select GENERIC_IRQ_CHIP | 11 | select GENERIC_IRQ_CHIP |
12 | select NO_IOPORT_MAP | 12 | select NO_IOPORT_MAP |
13 | help | 13 | help |
14 | Base platform code for all Samsung SoC based systems | 14 | Base platform code for all Samsung SoC based systems |
15 | 15 | ||
16 | config PLAT_S5P | ||
17 | bool | ||
18 | depends on ARCH_S5PV210 | ||
19 | default y | ||
20 | select ARCH_REQUIRE_GPIOLIB | ||
21 | select ARM_VIC | ||
22 | select NO_IOPORT_MAP | ||
23 | select PLAT_SAMSUNG | ||
24 | select S3C_GPIO_TRACK | ||
25 | select S5P_GPIO_DRVSTR | ||
26 | select SAMSUNG_CLKSRC if !COMMON_CLK | ||
27 | help | ||
28 | Base platform code for Samsung's S5P series SoC. | ||
29 | |||
30 | config SAMSUNG_PM | 16 | config SAMSUNG_PM |
31 | bool | 17 | bool |
32 | depends on PM && (PLAT_S3C24XX || ARCH_S3C64XX || S5P_PM) | 18 | depends on PM && (PLAT_S3C24XX || ARCH_S3C64XX) |
33 | default y | 19 | default y |
34 | help | 20 | help |
35 | Base platform power management code for samsung code | 21 | Base platform power management code for samsung code |
@@ -65,48 +51,6 @@ config SAMSUNG_ATAGS | |||
65 | 51 | ||
66 | if SAMSUNG_ATAGS | 52 | if SAMSUNG_ATAGS |
67 | 53 | ||
68 | # clock options | ||
69 | |||
70 | config SAMSUNG_CLOCK | ||
71 | bool | ||
72 | default y if !COMMON_CLK | ||
73 | |||
74 | config SAMSUNG_CLKSRC | ||
75 | bool | ||
76 | help | ||
77 | Select the clock code for the clksrc implementation | ||
78 | used by newer systems such as the S3C64XX. | ||
79 | |||
80 | config S5P_CLOCK | ||
81 | def_bool ARCH_S5PV210 | ||
82 | help | ||
83 | Support common clock part for ARCH_S5P and ARCH_EXYNOS SoCs | ||
84 | |||
85 | # options for IRQ support | ||
86 | |||
87 | config S5P_IRQ | ||
88 | def_bool ARCH_S5PV210 | ||
89 | help | ||
90 | Support common interrupt part for ARCH_S5P SoCs | ||
91 | |||
92 | config S5P_EXT_INT | ||
93 | bool | ||
94 | help | ||
95 | Use the external interrupts (other than GPIO interrupts.) | ||
96 | |||
97 | config S5P_GPIO_INT | ||
98 | bool | ||
99 | help | ||
100 | Common code for the GPIO interrupts (other than external interrupts.) | ||
101 | |||
102 | # options for gpio configuration support | ||
103 | |||
104 | config S5P_GPIO_DRVSTR | ||
105 | bool | ||
106 | help | ||
107 | Internal configuration to get and set correct GPIO driver strength | ||
108 | helper | ||
109 | |||
110 | config S3C_GPIO_SPACE | 54 | config S3C_GPIO_SPACE |
111 | int "Space between gpio banks" | 55 | int "Space between gpio banks" |
112 | default 0 | 56 | default 0 |
@@ -122,12 +66,6 @@ config S3C_GPIO_TRACK | |||
122 | Internal configuration option to enable the s3c specific gpio | 66 | Internal configuration option to enable the s3c specific gpio |
123 | chip tracking if the platform requires it. | 67 | chip tracking if the platform requires it. |
124 | 68 | ||
125 | # uart options | ||
126 | |||
127 | config S5P_DEV_UART | ||
128 | def_bool y | ||
129 | depends on ARCH_S5PV210 | ||
130 | |||
131 | # ADC driver | 69 | # ADC driver |
132 | 70 | ||
133 | config S3C_ADC | 71 | config S3C_ADC |
@@ -285,66 +223,6 @@ config SAMSUNG_DEV_BACKLIGHT | |||
285 | help | 223 | help |
286 | Compile in platform device definition LCD backlight with PWM Timer | 224 | Compile in platform device definition LCD backlight with PWM Timer |
287 | 225 | ||
288 | config S5P_DEV_CSIS0 | ||
289 | bool | ||
290 | help | ||
291 | Compile in platform device definitions for MIPI-CSIS channel 0 | ||
292 | |||
293 | config S5P_DEV_CSIS1 | ||
294 | bool | ||
295 | help | ||
296 | Compile in platform device definitions for MIPI-CSIS channel 1 | ||
297 | |||
298 | config S5P_DEV_FIMC0 | ||
299 | bool | ||
300 | help | ||
301 | Compile in platform device definitions for FIMC controller 0 | ||
302 | |||
303 | config S5P_DEV_FIMC1 | ||
304 | bool | ||
305 | help | ||
306 | Compile in platform device definitions for FIMC controller 1 | ||
307 | |||
308 | config S5P_DEV_FIMC2 | ||
309 | bool | ||
310 | help | ||
311 | Compile in platform device definitions for FIMC controller 2 | ||
312 | |||
313 | config S5P_DEV_FIMC3 | ||
314 | bool | ||
315 | help | ||
316 | Compile in platform device definitions for FIMC controller 3 | ||
317 | |||
318 | config S5P_DEV_FIMD0 | ||
319 | bool | ||
320 | help | ||
321 | Compile in platform device definitions for FIMD controller 0 | ||
322 | |||
323 | config S5P_DEV_G2D | ||
324 | bool | ||
325 | help | ||
326 | Compile in platform device definitions for G2D device | ||
327 | |||
328 | config S5P_DEV_I2C_HDMIPHY | ||
329 | bool | ||
330 | help | ||
331 | Compile in platform device definitions for I2C HDMIPHY controller | ||
332 | |||
333 | config S5P_DEV_JPEG | ||
334 | bool | ||
335 | help | ||
336 | Compile in platform device definitions for JPEG codec | ||
337 | |||
338 | config S5P_DEV_ONENAND | ||
339 | bool | ||
340 | help | ||
341 | Compile in platform device definition for OneNAND controller | ||
342 | |||
343 | config S5P_DEV_TV | ||
344 | bool | ||
345 | help | ||
346 | Compile in platform device definition for TV interface | ||
347 | |||
348 | config S3C24XX_PWM | 226 | config S3C24XX_PWM |
349 | bool "PWM device support" | 227 | bool "PWM device support" |
350 | select PWM | 228 | select PWM |
@@ -365,12 +243,6 @@ config S3C_DMA | |||
365 | help | 243 | help |
366 | Internal configuration for S3C DMA core | 244 | Internal configuration for S3C DMA core |
367 | 245 | ||
368 | config S5P_IRQ_PM | ||
369 | bool | ||
370 | default y if S5P_PM | ||
371 | help | ||
372 | Legacy IRQ power management for S5P platforms | ||
373 | |||
374 | config SAMSUNG_PM_GPIO | 246 | config SAMSUNG_PM_GPIO |
375 | bool | 247 | bool |
376 | default y if GPIO_SAMSUNG && PM | 248 | default y if GPIO_SAMSUNG && PM |
@@ -453,17 +325,6 @@ config SAMSUNG_WDT_RESET | |||
453 | Compile support for system restart by triggering watchdog reset. | 325 | Compile support for system restart by triggering watchdog reset. |
454 | Used on SoCs that do not provide dedicated reset control. | 326 | Used on SoCs that do not provide dedicated reset control. |
455 | 327 | ||
456 | config S5P_PM | ||
457 | bool | ||
458 | help | ||
459 | Common code for power management support on S5P and newer SoCs | ||
460 | |||
461 | config S5P_SLEEP | ||
462 | bool | ||
463 | help | ||
464 | Internal config node to apply common S5P sleep management code. | ||
465 | Can be selected by S5P and newer SoCs with similar sleep procedure. | ||
466 | |||
467 | config DEBUG_S3C_UART | 328 | config DEBUG_S3C_UART |
468 | depends on PLAT_SAMSUNG | 329 | depends on PLAT_SAMSUNG |
469 | int | 330 | int |
diff --git a/arch/arm/plat-samsung/Makefile b/arch/arm/plat-samsung/Makefile index 5e5beaa9ae15..5fe175017f07 100644 --- a/arch/arm/plat-samsung/Makefile +++ b/arch/arm/plat-samsung/Makefile | |||
@@ -5,7 +5,6 @@ | |||
5 | # Licensed under GPLv2 | 5 | # Licensed under GPLv2 |
6 | 6 | ||
7 | ccflags-$(CONFIG_ARCH_MULTI_V7) += -I$(srctree)/$(src)/include | 7 | ccflags-$(CONFIG_ARCH_MULTI_V7) += -I$(srctree)/$(src)/include |
8 | ccflags-$(CONFIG_ARCH_EXYNOS) += -I$(srctree)/arch/arm/mach-exynos/include | ||
9 | 8 | ||
10 | obj-y := | 9 | obj-y := |
11 | obj-m := | 10 | obj-m := |
@@ -16,15 +15,6 @@ obj- := | |||
16 | 15 | ||
17 | obj-y += init.o cpu.o | 16 | obj-y += init.o cpu.o |
18 | 17 | ||
19 | obj-$(CONFIG_SAMSUNG_CLOCK) += clock.o | ||
20 | |||
21 | obj-$(CONFIG_SAMSUNG_CLKSRC) += clock-clksrc.o | ||
22 | obj-$(CONFIG_S5P_CLOCK) += s5p-clock.o | ||
23 | |||
24 | obj-$(CONFIG_S5P_IRQ) += s5p-irq.o | ||
25 | obj-$(CONFIG_S5P_EXT_INT) += s5p-irq-eint.o | ||
26 | obj-$(CONFIG_S5P_GPIO_INT) += s5p-irq-gpioint.o | ||
27 | |||
28 | # ADC | 18 | # ADC |
29 | 19 | ||
30 | obj-$(CONFIG_S3C_ADC) += adc.o | 20 | obj-$(CONFIG_S3C_ADC) += adc.o |
@@ -36,7 +26,6 @@ obj-$(CONFIG_SAMSUNG_ATAGS) += platformdata.o | |||
36 | obj-$(CONFIG_SAMSUNG_ATAGS) += devs.o | 26 | obj-$(CONFIG_SAMSUNG_ATAGS) += devs.o |
37 | obj-$(CONFIG_SAMSUNG_ATAGS) += dev-uart.o | 27 | obj-$(CONFIG_SAMSUNG_ATAGS) += dev-uart.o |
38 | obj-$(CONFIG_S5P_DEV_MFC) += s5p-dev-mfc.o | 28 | obj-$(CONFIG_S5P_DEV_MFC) += s5p-dev-mfc.o |
39 | obj-$(CONFIG_S5P_DEV_UART) += s5p-dev-uart.o | ||
40 | 29 | ||
41 | obj-$(CONFIG_SAMSUNG_DEV_BACKLIGHT) += dev-backlight.o | 30 | obj-$(CONFIG_SAMSUNG_DEV_BACKLIGHT) += dev-backlight.o |
42 | 31 | ||
@@ -58,7 +47,3 @@ obj-$(CONFIG_SAMSUNG_PM_DEBUG) += pm-debug.o | |||
58 | 47 | ||
59 | obj-$(CONFIG_SAMSUNG_WAKEMASK) += wakeup-mask.o | 48 | obj-$(CONFIG_SAMSUNG_WAKEMASK) += wakeup-mask.o |
60 | obj-$(CONFIG_SAMSUNG_WDT_RESET) += watchdog-reset.o | 49 | obj-$(CONFIG_SAMSUNG_WDT_RESET) += watchdog-reset.o |
61 | |||
62 | obj-$(CONFIG_S5P_PM) += s5p-pm.o | ||
63 | obj-$(CONFIG_S5P_IRQ_PM) += s5p-irq-pm.o | ||
64 | obj-$(CONFIG_S5P_SLEEP) += s5p-sleep.o | ||
diff --git a/arch/arm/plat-samsung/clock-clksrc.c b/arch/arm/plat-samsung/clock-clksrc.c deleted file mode 100644 index 786a4107a157..000000000000 --- a/arch/arm/plat-samsung/clock-clksrc.c +++ /dev/null | |||
@@ -1,212 +0,0 @@ | |||
1 | /* linux/arch/arm/plat-samsung/clock-clksrc.c | ||
2 | * | ||
3 | * Copyright 2008 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * http://armlinux.simtec.co.uk/ | ||
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 | |||
12 | #include <linux/init.h> | ||
13 | #include <linux/module.h> | ||
14 | #include <linux/kernel.h> | ||
15 | #include <linux/list.h> | ||
16 | #include <linux/errno.h> | ||
17 | #include <linux/err.h> | ||
18 | #include <linux/clk.h> | ||
19 | #include <linux/device.h> | ||
20 | #include <linux/io.h> | ||
21 | |||
22 | #include <plat/clock.h> | ||
23 | #include <plat/clock-clksrc.h> | ||
24 | #include <plat/cpu-freq.h> | ||
25 | |||
26 | static inline struct clksrc_clk *to_clksrc(struct clk *clk) | ||
27 | { | ||
28 | return container_of(clk, struct clksrc_clk, clk); | ||
29 | } | ||
30 | |||
31 | static inline u32 bit_mask(u32 shift, u32 nr_bits) | ||
32 | { | ||
33 | u32 mask = 0xffffffff >> (32 - nr_bits); | ||
34 | |||
35 | return mask << shift; | ||
36 | } | ||
37 | |||
38 | static unsigned long s3c_getrate_clksrc(struct clk *clk) | ||
39 | { | ||
40 | struct clksrc_clk *sclk = to_clksrc(clk); | ||
41 | unsigned long rate = clk_get_rate(clk->parent); | ||
42 | u32 clkdiv = __raw_readl(sclk->reg_div.reg); | ||
43 | u32 mask = bit_mask(sclk->reg_div.shift, sclk->reg_div.size); | ||
44 | |||
45 | clkdiv &= mask; | ||
46 | clkdiv >>= sclk->reg_div.shift; | ||
47 | clkdiv++; | ||
48 | |||
49 | rate /= clkdiv; | ||
50 | return rate; | ||
51 | } | ||
52 | |||
53 | static int s3c_setrate_clksrc(struct clk *clk, unsigned long rate) | ||
54 | { | ||
55 | struct clksrc_clk *sclk = to_clksrc(clk); | ||
56 | void __iomem *reg = sclk->reg_div.reg; | ||
57 | unsigned int div; | ||
58 | u32 mask = bit_mask(sclk->reg_div.shift, sclk->reg_div.size); | ||
59 | u32 val; | ||
60 | |||
61 | rate = clk_round_rate(clk, rate); | ||
62 | div = clk_get_rate(clk->parent) / rate; | ||
63 | if (div > (1 << sclk->reg_div.size)) | ||
64 | return -EINVAL; | ||
65 | |||
66 | val = __raw_readl(reg); | ||
67 | val &= ~mask; | ||
68 | val |= (div - 1) << sclk->reg_div.shift; | ||
69 | __raw_writel(val, reg); | ||
70 | |||
71 | return 0; | ||
72 | } | ||
73 | |||
74 | static int s3c_setparent_clksrc(struct clk *clk, struct clk *parent) | ||
75 | { | ||
76 | struct clksrc_clk *sclk = to_clksrc(clk); | ||
77 | struct clksrc_sources *srcs = sclk->sources; | ||
78 | u32 clksrc = __raw_readl(sclk->reg_src.reg); | ||
79 | u32 mask = bit_mask(sclk->reg_src.shift, sclk->reg_src.size); | ||
80 | int src_nr = -1; | ||
81 | int ptr; | ||
82 | |||
83 | for (ptr = 0; ptr < srcs->nr_sources; ptr++) | ||
84 | if (srcs->sources[ptr] == parent) { | ||
85 | src_nr = ptr; | ||
86 | break; | ||
87 | } | ||
88 | |||
89 | if (src_nr >= 0) { | ||
90 | clk->parent = parent; | ||
91 | |||
92 | clksrc &= ~mask; | ||
93 | clksrc |= src_nr << sclk->reg_src.shift; | ||
94 | |||
95 | __raw_writel(clksrc, sclk->reg_src.reg); | ||
96 | return 0; | ||
97 | } | ||
98 | |||
99 | return -EINVAL; | ||
100 | } | ||
101 | |||
102 | static unsigned long s3c_roundrate_clksrc(struct clk *clk, | ||
103 | unsigned long rate) | ||
104 | { | ||
105 | struct clksrc_clk *sclk = to_clksrc(clk); | ||
106 | unsigned long parent_rate = clk_get_rate(clk->parent); | ||
107 | int max_div = 1 << sclk->reg_div.size; | ||
108 | int div; | ||
109 | |||
110 | if (rate >= parent_rate) | ||
111 | rate = parent_rate; | ||
112 | else { | ||
113 | div = parent_rate / rate; | ||
114 | if (parent_rate % rate) | ||
115 | div++; | ||
116 | |||
117 | if (div == 0) | ||
118 | div = 1; | ||
119 | if (div > max_div) | ||
120 | div = max_div; | ||
121 | |||
122 | rate = parent_rate / div; | ||
123 | } | ||
124 | |||
125 | return rate; | ||
126 | } | ||
127 | |||
128 | /* Clock initialisation code */ | ||
129 | |||
130 | void __init_or_cpufreq s3c_set_clksrc(struct clksrc_clk *clk, bool announce) | ||
131 | { | ||
132 | struct clksrc_sources *srcs = clk->sources; | ||
133 | u32 mask = bit_mask(clk->reg_src.shift, clk->reg_src.size); | ||
134 | u32 clksrc; | ||
135 | |||
136 | if (!clk->reg_src.reg) { | ||
137 | if (!clk->clk.parent) | ||
138 | printk(KERN_ERR "%s: no parent clock specified\n", | ||
139 | clk->clk.name); | ||
140 | return; | ||
141 | } | ||
142 | |||
143 | clksrc = __raw_readl(clk->reg_src.reg); | ||
144 | clksrc &= mask; | ||
145 | clksrc >>= clk->reg_src.shift; | ||
146 | |||
147 | if (clksrc > srcs->nr_sources || !srcs->sources[clksrc]) { | ||
148 | printk(KERN_ERR "%s: bad source %d\n", | ||
149 | clk->clk.name, clksrc); | ||
150 | return; | ||
151 | } | ||
152 | |||
153 | clk->clk.parent = srcs->sources[clksrc]; | ||
154 | |||
155 | if (announce) | ||
156 | printk(KERN_INFO "%s: source is %s (%d), rate is %ld\n", | ||
157 | clk->clk.name, clk->clk.parent->name, clksrc, | ||
158 | clk_get_rate(&clk->clk)); | ||
159 | } | ||
160 | |||
161 | static struct clk_ops clksrc_ops = { | ||
162 | .set_parent = s3c_setparent_clksrc, | ||
163 | .get_rate = s3c_getrate_clksrc, | ||
164 | .set_rate = s3c_setrate_clksrc, | ||
165 | .round_rate = s3c_roundrate_clksrc, | ||
166 | }; | ||
167 | |||
168 | static struct clk_ops clksrc_ops_nodiv = { | ||
169 | .set_parent = s3c_setparent_clksrc, | ||
170 | }; | ||
171 | |||
172 | static struct clk_ops clksrc_ops_nosrc = { | ||
173 | .get_rate = s3c_getrate_clksrc, | ||
174 | .set_rate = s3c_setrate_clksrc, | ||
175 | .round_rate = s3c_roundrate_clksrc, | ||
176 | }; | ||
177 | |||
178 | void __init s3c_register_clksrc(struct clksrc_clk *clksrc, int size) | ||
179 | { | ||
180 | int ret; | ||
181 | |||
182 | for (; size > 0; size--, clksrc++) { | ||
183 | if (!clksrc->reg_div.reg && !clksrc->reg_src.reg) | ||
184 | printk(KERN_ERR "%s: clock %s has no registers set\n", | ||
185 | __func__, clksrc->clk.name); | ||
186 | |||
187 | /* fill in the default functions */ | ||
188 | |||
189 | if (!clksrc->clk.ops) { | ||
190 | if (!clksrc->reg_div.reg) | ||
191 | clksrc->clk.ops = &clksrc_ops_nodiv; | ||
192 | else if (!clksrc->reg_src.reg) | ||
193 | clksrc->clk.ops = &clksrc_ops_nosrc; | ||
194 | else | ||
195 | clksrc->clk.ops = &clksrc_ops; | ||
196 | } | ||
197 | |||
198 | /* setup the clocksource, but do not announce it | ||
199 | * as it may be re-set by the setup routines | ||
200 | * called after the rest of the clocks have been | ||
201 | * registered | ||
202 | */ | ||
203 | s3c_set_clksrc(clksrc, false); | ||
204 | |||
205 | ret = s3c24xx_register_clock(&clksrc->clk); | ||
206 | |||
207 | if (ret < 0) { | ||
208 | printk(KERN_ERR "%s: failed to register %s (%d)\n", | ||
209 | __func__, clksrc->clk.name, ret); | ||
210 | } | ||
211 | } | ||
212 | } | ||
diff --git a/arch/arm/plat-samsung/clock.c b/arch/arm/plat-samsung/clock.c deleted file mode 100644 index d103ac1a52af..000000000000 --- a/arch/arm/plat-samsung/clock.c +++ /dev/null | |||
@@ -1,539 +0,0 @@ | |||
1 | /* linux/arch/arm/plat-s3c24xx/clock.c | ||
2 | * | ||
3 | * Copyright 2004-2005 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * | ||
6 | * S3C24XX Core clock control support | ||
7 | * | ||
8 | * Based on, and code from linux/arch/arm/mach-versatile/clock.c | ||
9 | ** | ||
10 | ** Copyright (C) 2004 ARM Limited. | ||
11 | ** Written by Deep Blue Solutions Limited. | ||
12 | * | ||
13 | * | ||
14 | * This program is free software; you can redistribute it and/or modify | ||
15 | * it under the terms of the GNU General Public License as published by | ||
16 | * the Free Software Foundation; either version 2 of the License, or | ||
17 | * (at your option) any later version. | ||
18 | * | ||
19 | * This program is distributed in the hope that it will be useful, | ||
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
22 | * GNU General Public License for more details. | ||
23 | * | ||
24 | * You should have received a copy of the GNU General Public License | ||
25 | * along with this program; if not, write to the Free Software | ||
26 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
27 | */ | ||
28 | |||
29 | #include <linux/init.h> | ||
30 | #include <linux/module.h> | ||
31 | #include <linux/kernel.h> | ||
32 | #include <linux/list.h> | ||
33 | #include <linux/errno.h> | ||
34 | #include <linux/err.h> | ||
35 | #include <linux/platform_device.h> | ||
36 | #include <linux/device.h> | ||
37 | #include <linux/interrupt.h> | ||
38 | #include <linux/ioport.h> | ||
39 | #include <linux/clk.h> | ||
40 | #include <linux/spinlock.h> | ||
41 | #include <linux/io.h> | ||
42 | #if defined(CONFIG_DEBUG_FS) | ||
43 | #include <linux/debugfs.h> | ||
44 | #endif | ||
45 | |||
46 | #include <asm/irq.h> | ||
47 | |||
48 | #include <plat/cpu-freq.h> | ||
49 | |||
50 | #include <plat/clock.h> | ||
51 | #include <plat/cpu.h> | ||
52 | |||
53 | #include <linux/serial_core.h> | ||
54 | #include <linux/serial_s3c.h> /* for s3c24xx_uart_devs */ | ||
55 | |||
56 | /* clock information */ | ||
57 | |||
58 | static LIST_HEAD(clocks); | ||
59 | |||
60 | /* We originally used an mutex here, but some contexts (see resume) | ||
61 | * are calling functions such as clk_set_parent() with IRQs disabled | ||
62 | * causing an BUG to be triggered. | ||
63 | */ | ||
64 | DEFINE_SPINLOCK(clocks_lock); | ||
65 | |||
66 | /* Global watchdog clock used by arch_wtd_reset() callback */ | ||
67 | struct clk *s3c2410_wdtclk; | ||
68 | static int __init s3c_wdt_reset_init(void) | ||
69 | { | ||
70 | s3c2410_wdtclk = clk_get(NULL, "watchdog"); | ||
71 | if (IS_ERR(s3c2410_wdtclk)) | ||
72 | printk(KERN_WARNING "%s: warning: cannot get watchdog clock\n", __func__); | ||
73 | return 0; | ||
74 | } | ||
75 | arch_initcall(s3c_wdt_reset_init); | ||
76 | |||
77 | /* enable and disable calls for use with the clk struct */ | ||
78 | |||
79 | static int clk_null_enable(struct clk *clk, int enable) | ||
80 | { | ||
81 | return 0; | ||
82 | } | ||
83 | |||
84 | int clk_enable(struct clk *clk) | ||
85 | { | ||
86 | unsigned long flags; | ||
87 | |||
88 | if (IS_ERR(clk) || clk == NULL) | ||
89 | return -EINVAL; | ||
90 | |||
91 | clk_enable(clk->parent); | ||
92 | |||
93 | spin_lock_irqsave(&clocks_lock, flags); | ||
94 | |||
95 | if ((clk->usage++) == 0) | ||
96 | (clk->enable)(clk, 1); | ||
97 | |||
98 | spin_unlock_irqrestore(&clocks_lock, flags); | ||
99 | return 0; | ||
100 | } | ||
101 | |||
102 | void clk_disable(struct clk *clk) | ||
103 | { | ||
104 | unsigned long flags; | ||
105 | |||
106 | if (IS_ERR(clk) || clk == NULL) | ||
107 | return; | ||
108 | |||
109 | spin_lock_irqsave(&clocks_lock, flags); | ||
110 | |||
111 | if ((--clk->usage) == 0) | ||
112 | (clk->enable)(clk, 0); | ||
113 | |||
114 | spin_unlock_irqrestore(&clocks_lock, flags); | ||
115 | clk_disable(clk->parent); | ||
116 | } | ||
117 | |||
118 | |||
119 | unsigned long clk_get_rate(struct clk *clk) | ||
120 | { | ||
121 | if (IS_ERR_OR_NULL(clk)) | ||
122 | return 0; | ||
123 | |||
124 | if (clk->rate != 0) | ||
125 | return clk->rate; | ||
126 | |||
127 | if (clk->ops != NULL && clk->ops->get_rate != NULL) | ||
128 | return (clk->ops->get_rate)(clk); | ||
129 | |||
130 | if (clk->parent != NULL) | ||
131 | return clk_get_rate(clk->parent); | ||
132 | |||
133 | return clk->rate; | ||
134 | } | ||
135 | |||
136 | long clk_round_rate(struct clk *clk, unsigned long rate) | ||
137 | { | ||
138 | if (!IS_ERR_OR_NULL(clk) && clk->ops && clk->ops->round_rate) | ||
139 | return (clk->ops->round_rate)(clk, rate); | ||
140 | |||
141 | return rate; | ||
142 | } | ||
143 | |||
144 | int clk_set_rate(struct clk *clk, unsigned long rate) | ||
145 | { | ||
146 | unsigned long flags; | ||
147 | int ret; | ||
148 | |||
149 | if (IS_ERR_OR_NULL(clk)) | ||
150 | return -EINVAL; | ||
151 | |||
152 | /* We do not default just do a clk->rate = rate as | ||
153 | * the clock may have been made this way by choice. | ||
154 | */ | ||
155 | |||
156 | WARN_ON(clk->ops == NULL); | ||
157 | WARN_ON(clk->ops && clk->ops->set_rate == NULL); | ||
158 | |||
159 | if (clk->ops == NULL || clk->ops->set_rate == NULL) | ||
160 | return -EINVAL; | ||
161 | |||
162 | spin_lock_irqsave(&clocks_lock, flags); | ||
163 | ret = (clk->ops->set_rate)(clk, rate); | ||
164 | spin_unlock_irqrestore(&clocks_lock, flags); | ||
165 | |||
166 | return ret; | ||
167 | } | ||
168 | |||
169 | struct clk *clk_get_parent(struct clk *clk) | ||
170 | { | ||
171 | return clk->parent; | ||
172 | } | ||
173 | |||
174 | int clk_set_parent(struct clk *clk, struct clk *parent) | ||
175 | { | ||
176 | unsigned long flags; | ||
177 | int ret = 0; | ||
178 | |||
179 | if (IS_ERR_OR_NULL(clk) || IS_ERR_OR_NULL(parent)) | ||
180 | return -EINVAL; | ||
181 | |||
182 | spin_lock_irqsave(&clocks_lock, flags); | ||
183 | |||
184 | if (clk->ops && clk->ops->set_parent) | ||
185 | ret = (clk->ops->set_parent)(clk, parent); | ||
186 | |||
187 | spin_unlock_irqrestore(&clocks_lock, flags); | ||
188 | |||
189 | return ret; | ||
190 | } | ||
191 | |||
192 | EXPORT_SYMBOL(clk_enable); | ||
193 | EXPORT_SYMBOL(clk_disable); | ||
194 | EXPORT_SYMBOL(clk_get_rate); | ||
195 | EXPORT_SYMBOL(clk_round_rate); | ||
196 | EXPORT_SYMBOL(clk_set_rate); | ||
197 | EXPORT_SYMBOL(clk_get_parent); | ||
198 | EXPORT_SYMBOL(clk_set_parent); | ||
199 | |||
200 | /* base clocks */ | ||
201 | |||
202 | int clk_default_setrate(struct clk *clk, unsigned long rate) | ||
203 | { | ||
204 | clk->rate = rate; | ||
205 | return 0; | ||
206 | } | ||
207 | |||
208 | struct clk_ops clk_ops_def_setrate = { | ||
209 | .set_rate = clk_default_setrate, | ||
210 | }; | ||
211 | |||
212 | struct clk clk_xtal = { | ||
213 | .name = "xtal", | ||
214 | .rate = 0, | ||
215 | .parent = NULL, | ||
216 | .ctrlbit = 0, | ||
217 | }; | ||
218 | |||
219 | struct clk clk_ext = { | ||
220 | .name = "ext", | ||
221 | }; | ||
222 | |||
223 | struct clk clk_epll = { | ||
224 | .name = "epll", | ||
225 | }; | ||
226 | |||
227 | struct clk clk_mpll = { | ||
228 | .name = "mpll", | ||
229 | .ops = &clk_ops_def_setrate, | ||
230 | }; | ||
231 | |||
232 | struct clk clk_upll = { | ||
233 | .name = "upll", | ||
234 | .parent = NULL, | ||
235 | .ctrlbit = 0, | ||
236 | }; | ||
237 | |||
238 | struct clk clk_f = { | ||
239 | .name = "fclk", | ||
240 | .rate = 0, | ||
241 | .parent = &clk_mpll, | ||
242 | .ctrlbit = 0, | ||
243 | }; | ||
244 | |||
245 | struct clk clk_h = { | ||
246 | .name = "hclk", | ||
247 | .rate = 0, | ||
248 | .parent = NULL, | ||
249 | .ctrlbit = 0, | ||
250 | .ops = &clk_ops_def_setrate, | ||
251 | }; | ||
252 | |||
253 | struct clk clk_p = { | ||
254 | .name = "pclk", | ||
255 | .rate = 0, | ||
256 | .parent = NULL, | ||
257 | .ctrlbit = 0, | ||
258 | .ops = &clk_ops_def_setrate, | ||
259 | }; | ||
260 | |||
261 | struct clk clk_usb_bus = { | ||
262 | .name = "usb-bus", | ||
263 | .rate = 0, | ||
264 | .parent = &clk_upll, | ||
265 | }; | ||
266 | |||
267 | |||
268 | struct clk s3c24xx_uclk = { | ||
269 | .name = "uclk", | ||
270 | }; | ||
271 | |||
272 | /* initialise the clock system */ | ||
273 | |||
274 | /** | ||
275 | * s3c24xx_register_clock() - register a clock | ||
276 | * @clk: The clock to register | ||
277 | * | ||
278 | * Add the specified clock to the list of clocks known by the system. | ||
279 | */ | ||
280 | int s3c24xx_register_clock(struct clk *clk) | ||
281 | { | ||
282 | if (clk->enable == NULL) | ||
283 | clk->enable = clk_null_enable; | ||
284 | |||
285 | /* fill up the clk_lookup structure and register it*/ | ||
286 | clk->lookup.dev_id = clk->devname; | ||
287 | clk->lookup.con_id = clk->name; | ||
288 | clk->lookup.clk = clk; | ||
289 | clkdev_add(&clk->lookup); | ||
290 | |||
291 | return 0; | ||
292 | } | ||
293 | |||
294 | /** | ||
295 | * s3c24xx_register_clocks() - register an array of clock pointers | ||
296 | * @clks: Pointer to an array of struct clk pointers | ||
297 | * @nr_clks: The number of clocks in the @clks array. | ||
298 | * | ||
299 | * Call s3c24xx_register_clock() for all the clock pointers contained | ||
300 | * in the @clks list. Returns the number of failures. | ||
301 | */ | ||
302 | int s3c24xx_register_clocks(struct clk **clks, int nr_clks) | ||
303 | { | ||
304 | int fails = 0; | ||
305 | |||
306 | for (; nr_clks > 0; nr_clks--, clks++) { | ||
307 | if (s3c24xx_register_clock(*clks) < 0) { | ||
308 | struct clk *clk = *clks; | ||
309 | printk(KERN_ERR "%s: failed to register %p: %s\n", | ||
310 | __func__, clk, clk->name); | ||
311 | fails++; | ||
312 | } | ||
313 | } | ||
314 | |||
315 | return fails; | ||
316 | } | ||
317 | |||
318 | /** | ||
319 | * s3c_register_clocks() - register an array of clocks | ||
320 | * @clkp: Pointer to the first clock in the array. | ||
321 | * @nr_clks: Number of clocks to register. | ||
322 | * | ||
323 | * Call s3c24xx_register_clock() on the @clkp array given, printing an | ||
324 | * error if it fails to register the clock (unlikely). | ||
325 | */ | ||
326 | void __init s3c_register_clocks(struct clk *clkp, int nr_clks) | ||
327 | { | ||
328 | int ret; | ||
329 | |||
330 | for (; nr_clks > 0; nr_clks--, clkp++) { | ||
331 | ret = s3c24xx_register_clock(clkp); | ||
332 | |||
333 | if (ret < 0) { | ||
334 | printk(KERN_ERR "Failed to register clock %s (%d)\n", | ||
335 | clkp->name, ret); | ||
336 | } | ||
337 | } | ||
338 | } | ||
339 | |||
340 | /** | ||
341 | * s3c_disable_clocks() - disable an array of clocks | ||
342 | * @clkp: Pointer to the first clock in the array. | ||
343 | * @nr_clks: Number of clocks to register. | ||
344 | * | ||
345 | * for internal use only at initialisation time. disable the clocks in the | ||
346 | * @clkp array. | ||
347 | */ | ||
348 | |||
349 | void __init s3c_disable_clocks(struct clk *clkp, int nr_clks) | ||
350 | { | ||
351 | for (; nr_clks > 0; nr_clks--, clkp++) | ||
352 | (clkp->enable)(clkp, 0); | ||
353 | } | ||
354 | |||
355 | /* initialise all the clocks */ | ||
356 | |||
357 | int __init s3c24xx_register_baseclocks(unsigned long xtal) | ||
358 | { | ||
359 | printk(KERN_INFO "S3C24XX Clocks, Copyright 2004 Simtec Electronics\n"); | ||
360 | |||
361 | clk_xtal.rate = xtal; | ||
362 | |||
363 | /* register our clocks */ | ||
364 | |||
365 | if (s3c24xx_register_clock(&clk_xtal) < 0) | ||
366 | printk(KERN_ERR "failed to register master xtal\n"); | ||
367 | |||
368 | if (s3c24xx_register_clock(&clk_mpll) < 0) | ||
369 | printk(KERN_ERR "failed to register mpll clock\n"); | ||
370 | |||
371 | if (s3c24xx_register_clock(&clk_upll) < 0) | ||
372 | printk(KERN_ERR "failed to register upll clock\n"); | ||
373 | |||
374 | if (s3c24xx_register_clock(&clk_f) < 0) | ||
375 | printk(KERN_ERR "failed to register cpu fclk\n"); | ||
376 | |||
377 | if (s3c24xx_register_clock(&clk_h) < 0) | ||
378 | printk(KERN_ERR "failed to register cpu hclk\n"); | ||
379 | |||
380 | if (s3c24xx_register_clock(&clk_p) < 0) | ||
381 | printk(KERN_ERR "failed to register cpu pclk\n"); | ||
382 | |||
383 | return 0; | ||
384 | } | ||
385 | |||
386 | #if defined(CONFIG_PM_DEBUG) && defined(CONFIG_DEBUG_FS) | ||
387 | /* debugfs support to trace clock tree hierarchy and attributes */ | ||
388 | |||
389 | static struct dentry *clk_debugfs_root; | ||
390 | |||
391 | static void clock_tree_show_one(struct seq_file *s, struct clk *c, int level) | ||
392 | { | ||
393 | struct clk *child; | ||
394 | const char *state; | ||
395 | char buf[255] = { 0 }; | ||
396 | int n = 0; | ||
397 | |||
398 | if (c->name) | ||
399 | n = snprintf(buf, sizeof(buf) - 1, "%s", c->name); | ||
400 | |||
401 | if (c->devname) | ||
402 | n += snprintf(buf + n, sizeof(buf) - 1 - n, ":%s", c->devname); | ||
403 | |||
404 | state = (c->usage > 0) ? "on" : "off"; | ||
405 | |||
406 | seq_printf(s, "%*s%-*s %-6s %-3d %-10lu\n", | ||
407 | level * 3 + 1, "", | ||
408 | 50 - level * 3, buf, | ||
409 | state, c->usage, clk_get_rate(c)); | ||
410 | |||
411 | list_for_each_entry(child, &clocks, list) { | ||
412 | if (child->parent != c) | ||
413 | continue; | ||
414 | |||
415 | clock_tree_show_one(s, child, level + 1); | ||
416 | } | ||
417 | } | ||
418 | |||
419 | static int clock_tree_show(struct seq_file *s, void *data) | ||
420 | { | ||
421 | struct clk *c; | ||
422 | unsigned long flags; | ||
423 | |||
424 | seq_printf(s, " clock state ref rate\n"); | ||
425 | seq_printf(s, "----------------------------------------------------\n"); | ||
426 | |||
427 | spin_lock_irqsave(&clocks_lock, flags); | ||
428 | |||
429 | list_for_each_entry(c, &clocks, list) | ||
430 | if (c->parent == NULL) | ||
431 | clock_tree_show_one(s, c, 0); | ||
432 | |||
433 | spin_unlock_irqrestore(&clocks_lock, flags); | ||
434 | return 0; | ||
435 | } | ||
436 | |||
437 | static int clock_tree_open(struct inode *inode, struct file *file) | ||
438 | { | ||
439 | return single_open(file, clock_tree_show, inode->i_private); | ||
440 | } | ||
441 | |||
442 | static const struct file_operations clock_tree_fops = { | ||
443 | .open = clock_tree_open, | ||
444 | .read = seq_read, | ||
445 | .llseek = seq_lseek, | ||
446 | .release = single_release, | ||
447 | }; | ||
448 | |||
449 | static int clock_rate_show(void *data, u64 *val) | ||
450 | { | ||
451 | struct clk *c = data; | ||
452 | *val = clk_get_rate(c); | ||
453 | return 0; | ||
454 | } | ||
455 | DEFINE_SIMPLE_ATTRIBUTE(clock_rate_fops, clock_rate_show, NULL, "%llu\n"); | ||
456 | |||
457 | static int clk_debugfs_register_one(struct clk *c) | ||
458 | { | ||
459 | int err; | ||
460 | struct dentry *d; | ||
461 | struct clk *pa = c->parent; | ||
462 | char s[255]; | ||
463 | char *p = s; | ||
464 | |||
465 | p += sprintf(p, "%s", c->devname); | ||
466 | |||
467 | d = debugfs_create_dir(s, pa ? pa->dent : clk_debugfs_root); | ||
468 | if (!d) | ||
469 | return -ENOMEM; | ||
470 | |||
471 | c->dent = d; | ||
472 | |||
473 | d = debugfs_create_u8("usecount", S_IRUGO, c->dent, (u8 *)&c->usage); | ||
474 | if (!d) { | ||
475 | err = -ENOMEM; | ||
476 | goto err_out; | ||
477 | } | ||
478 | |||
479 | d = debugfs_create_file("rate", S_IRUGO, c->dent, c, &clock_rate_fops); | ||
480 | if (!d) { | ||
481 | err = -ENOMEM; | ||
482 | goto err_out; | ||
483 | } | ||
484 | return 0; | ||
485 | |||
486 | err_out: | ||
487 | debugfs_remove_recursive(c->dent); | ||
488 | return err; | ||
489 | } | ||
490 | |||
491 | static int clk_debugfs_register(struct clk *c) | ||
492 | { | ||
493 | int err; | ||
494 | struct clk *pa = c->parent; | ||
495 | |||
496 | if (pa && !pa->dent) { | ||
497 | err = clk_debugfs_register(pa); | ||
498 | if (err) | ||
499 | return err; | ||
500 | } | ||
501 | |||
502 | if (!c->dent) { | ||
503 | err = clk_debugfs_register_one(c); | ||
504 | if (err) | ||
505 | return err; | ||
506 | } | ||
507 | return 0; | ||
508 | } | ||
509 | |||
510 | static int __init clk_debugfs_init(void) | ||
511 | { | ||
512 | struct clk *c; | ||
513 | struct dentry *d; | ||
514 | int err = -ENOMEM; | ||
515 | |||
516 | d = debugfs_create_dir("clock", NULL); | ||
517 | if (!d) | ||
518 | return -ENOMEM; | ||
519 | clk_debugfs_root = d; | ||
520 | |||
521 | d = debugfs_create_file("clock_tree", S_IRUGO, clk_debugfs_root, NULL, | ||
522 | &clock_tree_fops); | ||
523 | if (!d) | ||
524 | goto err_out; | ||
525 | |||
526 | list_for_each_entry(c, &clocks, list) { | ||
527 | err = clk_debugfs_register(c); | ||
528 | if (err) | ||
529 | goto err_out; | ||
530 | } | ||
531 | return 0; | ||
532 | |||
533 | err_out: | ||
534 | debugfs_remove_recursive(clk_debugfs_root); | ||
535 | return err; | ||
536 | } | ||
537 | late_initcall(clk_debugfs_init); | ||
538 | |||
539 | #endif /* defined(CONFIG_PM_DEBUG) && defined(CONFIG_DEBUG_FS) */ | ||
diff --git a/arch/arm/plat-samsung/cpu.c b/arch/arm/plat-samsung/cpu.c index 364963a0a344..360618ee39e5 100644 --- a/arch/arm/plat-samsung/cpu.c +++ b/arch/arm/plat-samsung/cpu.c | |||
@@ -15,8 +15,7 @@ | |||
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/io.h> | 16 | #include <linux/io.h> |
17 | 17 | ||
18 | 18 | #include <plat/map-base.h> | |
19 | #include <mach/map.h> | ||
20 | #include <plat/cpu.h> | 19 | #include <plat/cpu.h> |
21 | 20 | ||
22 | unsigned long samsung_cpu_id; | 21 | unsigned long samsung_cpu_id; |
diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c index ead4f1c94058..83c7d154bde0 100644 --- a/arch/arm/plat-samsung/devs.c +++ b/arch/arm/plat-samsung/devs.c | |||
@@ -53,7 +53,6 @@ | |||
53 | #include <linux/platform_data/ata-samsung_cf.h> | 53 | #include <linux/platform_data/ata-samsung_cf.h> |
54 | #include <plat/fb.h> | 54 | #include <plat/fb.h> |
55 | #include <plat/fb-s3c2410.h> | 55 | #include <plat/fb-s3c2410.h> |
56 | #include <plat/hdmi.h> | ||
57 | #include <linux/platform_data/hwmon-s3c.h> | 56 | #include <linux/platform_data/hwmon-s3c.h> |
58 | #include <linux/platform_data/i2c-s3c2410.h> | 57 | #include <linux/platform_data/i2c-s3c2410.h> |
59 | #include <plat/keypad.h> | 58 | #include <plat/keypad.h> |
@@ -145,23 +144,6 @@ struct platform_device s3c_device_camif = { | |||
145 | }; | 144 | }; |
146 | #endif /* CONFIG_CPU_S3C2440 */ | 145 | #endif /* CONFIG_CPU_S3C2440 */ |
147 | 146 | ||
148 | /* ASOC DMA */ | ||
149 | |||
150 | #ifdef CONFIG_PLAT_S5P | ||
151 | static struct resource samsung_asoc_idma_resource = DEFINE_RES_IRQ(IRQ_I2S0); | ||
152 | |||
153 | struct platform_device samsung_asoc_idma = { | ||
154 | .name = "samsung-idma", | ||
155 | .id = -1, | ||
156 | .num_resources = 1, | ||
157 | .resource = &samsung_asoc_idma_resource, | ||
158 | .dev = { | ||
159 | .dma_mask = &samsung_device_dma_mask, | ||
160 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
161 | } | ||
162 | }; | ||
163 | #endif | ||
164 | |||
165 | /* FB */ | 147 | /* FB */ |
166 | 148 | ||
167 | #ifdef CONFIG_S3C_DEV_FB | 149 | #ifdef CONFIG_S3C_DEV_FB |
@@ -190,151 +172,6 @@ void __init s3c_fb_set_platdata(struct s3c_fb_platdata *pd) | |||
190 | } | 172 | } |
191 | #endif /* CONFIG_S3C_DEV_FB */ | 173 | #endif /* CONFIG_S3C_DEV_FB */ |
192 | 174 | ||
193 | /* FIMC */ | ||
194 | |||
195 | #ifdef CONFIG_S5P_DEV_FIMC0 | ||
196 | static struct resource s5p_fimc0_resource[] = { | ||
197 | [0] = DEFINE_RES_MEM(S5P_PA_FIMC0, SZ_4K), | ||
198 | [1] = DEFINE_RES_IRQ(IRQ_FIMC0), | ||
199 | }; | ||
200 | |||
201 | struct platform_device s5p_device_fimc0 = { | ||
202 | .name = "s5p-fimc", | ||
203 | .id = 0, | ||
204 | .num_resources = ARRAY_SIZE(s5p_fimc0_resource), | ||
205 | .resource = s5p_fimc0_resource, | ||
206 | .dev = { | ||
207 | .dma_mask = &samsung_device_dma_mask, | ||
208 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
209 | }, | ||
210 | }; | ||
211 | |||
212 | struct platform_device s5p_device_fimc_md = { | ||
213 | .name = "s5p-fimc-md", | ||
214 | .id = -1, | ||
215 | }; | ||
216 | #endif /* CONFIG_S5P_DEV_FIMC0 */ | ||
217 | |||
218 | #ifdef CONFIG_S5P_DEV_FIMC1 | ||
219 | static struct resource s5p_fimc1_resource[] = { | ||
220 | [0] = DEFINE_RES_MEM(S5P_PA_FIMC1, SZ_4K), | ||
221 | [1] = DEFINE_RES_IRQ(IRQ_FIMC1), | ||
222 | }; | ||
223 | |||
224 | struct platform_device s5p_device_fimc1 = { | ||
225 | .name = "s5p-fimc", | ||
226 | .id = 1, | ||
227 | .num_resources = ARRAY_SIZE(s5p_fimc1_resource), | ||
228 | .resource = s5p_fimc1_resource, | ||
229 | .dev = { | ||
230 | .dma_mask = &samsung_device_dma_mask, | ||
231 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
232 | }, | ||
233 | }; | ||
234 | #endif /* CONFIG_S5P_DEV_FIMC1 */ | ||
235 | |||
236 | #ifdef CONFIG_S5P_DEV_FIMC2 | ||
237 | static struct resource s5p_fimc2_resource[] = { | ||
238 | [0] = DEFINE_RES_MEM(S5P_PA_FIMC2, SZ_4K), | ||
239 | [1] = DEFINE_RES_IRQ(IRQ_FIMC2), | ||
240 | }; | ||
241 | |||
242 | struct platform_device s5p_device_fimc2 = { | ||
243 | .name = "s5p-fimc", | ||
244 | .id = 2, | ||
245 | .num_resources = ARRAY_SIZE(s5p_fimc2_resource), | ||
246 | .resource = s5p_fimc2_resource, | ||
247 | .dev = { | ||
248 | .dma_mask = &samsung_device_dma_mask, | ||
249 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
250 | }, | ||
251 | }; | ||
252 | #endif /* CONFIG_S5P_DEV_FIMC2 */ | ||
253 | |||
254 | #ifdef CONFIG_S5P_DEV_FIMC3 | ||
255 | static struct resource s5p_fimc3_resource[] = { | ||
256 | [0] = DEFINE_RES_MEM(S5P_PA_FIMC3, SZ_4K), | ||
257 | [1] = DEFINE_RES_IRQ(IRQ_FIMC3), | ||
258 | }; | ||
259 | |||
260 | struct platform_device s5p_device_fimc3 = { | ||
261 | .name = "s5p-fimc", | ||
262 | .id = 3, | ||
263 | .num_resources = ARRAY_SIZE(s5p_fimc3_resource), | ||
264 | .resource = s5p_fimc3_resource, | ||
265 | .dev = { | ||
266 | .dma_mask = &samsung_device_dma_mask, | ||
267 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
268 | }, | ||
269 | }; | ||
270 | #endif /* CONFIG_S5P_DEV_FIMC3 */ | ||
271 | |||
272 | /* G2D */ | ||
273 | |||
274 | #ifdef CONFIG_S5P_DEV_G2D | ||
275 | static struct resource s5p_g2d_resource[] = { | ||
276 | [0] = DEFINE_RES_MEM(S5P_PA_G2D, SZ_4K), | ||
277 | [1] = DEFINE_RES_IRQ(IRQ_2D), | ||
278 | }; | ||
279 | |||
280 | struct platform_device s5p_device_g2d = { | ||
281 | .name = "s5p-g2d", | ||
282 | .id = 0, | ||
283 | .num_resources = ARRAY_SIZE(s5p_g2d_resource), | ||
284 | .resource = s5p_g2d_resource, | ||
285 | .dev = { | ||
286 | .dma_mask = &samsung_device_dma_mask, | ||
287 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
288 | }, | ||
289 | }; | ||
290 | #endif /* CONFIG_S5P_DEV_G2D */ | ||
291 | |||
292 | #ifdef CONFIG_S5P_DEV_JPEG | ||
293 | static struct resource s5p_jpeg_resource[] = { | ||
294 | [0] = DEFINE_RES_MEM(S5P_PA_JPEG, SZ_4K), | ||
295 | [1] = DEFINE_RES_IRQ(IRQ_JPEG), | ||
296 | }; | ||
297 | |||
298 | struct platform_device s5p_device_jpeg = { | ||
299 | .name = "s5p-jpeg", | ||
300 | .id = 0, | ||
301 | .num_resources = ARRAY_SIZE(s5p_jpeg_resource), | ||
302 | .resource = s5p_jpeg_resource, | ||
303 | .dev = { | ||
304 | .dma_mask = &samsung_device_dma_mask, | ||
305 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
306 | }, | ||
307 | }; | ||
308 | #endif /* CONFIG_S5P_DEV_JPEG */ | ||
309 | |||
310 | /* FIMD0 */ | ||
311 | |||
312 | #ifdef CONFIG_S5P_DEV_FIMD0 | ||
313 | static struct resource s5p_fimd0_resource[] = { | ||
314 | [0] = DEFINE_RES_MEM(S5P_PA_FIMD0, SZ_32K), | ||
315 | [1] = DEFINE_RES_IRQ_NAMED(IRQ_FIMD0_VSYNC, "vsync"), | ||
316 | [2] = DEFINE_RES_IRQ_NAMED(IRQ_FIMD0_FIFO, "fifo"), | ||
317 | [3] = DEFINE_RES_IRQ_NAMED(IRQ_FIMD0_SYSTEM, "lcd_sys"), | ||
318 | }; | ||
319 | |||
320 | struct platform_device s5p_device_fimd0 = { | ||
321 | .name = "s5p-fb", | ||
322 | .id = 0, | ||
323 | .num_resources = ARRAY_SIZE(s5p_fimd0_resource), | ||
324 | .resource = s5p_fimd0_resource, | ||
325 | .dev = { | ||
326 | .dma_mask = &samsung_device_dma_mask, | ||
327 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
328 | }, | ||
329 | }; | ||
330 | |||
331 | void __init s5p_fimd0_set_platdata(struct s3c_fb_platdata *pd) | ||
332 | { | ||
333 | s3c_set_platdata(pd, sizeof(struct s3c_fb_platdata), | ||
334 | &s5p_device_fimd0); | ||
335 | } | ||
336 | #endif /* CONFIG_S5P_DEV_FIMD0 */ | ||
337 | |||
338 | /* HWMON */ | 175 | /* HWMON */ |
339 | 176 | ||
340 | #ifdef CONFIG_S3C_DEV_HWMON | 177 | #ifdef CONFIG_S3C_DEV_HWMON |
@@ -722,60 +559,6 @@ void __init s3c_i2c7_set_platdata(struct s3c2410_platform_i2c *pd) | |||
722 | } | 559 | } |
723 | #endif /* CONFIG_S3C_DEV_I2C7 */ | 560 | #endif /* CONFIG_S3C_DEV_I2C7 */ |
724 | 561 | ||
725 | /* I2C HDMIPHY */ | ||
726 | |||
727 | #ifdef CONFIG_S5P_DEV_I2C_HDMIPHY | ||
728 | static struct resource s5p_i2c_resource[] = { | ||
729 | [0] = DEFINE_RES_MEM(S5P_PA_IIC_HDMIPHY, SZ_4K), | ||
730 | [1] = DEFINE_RES_IRQ(IRQ_IIC_HDMIPHY), | ||
731 | }; | ||
732 | |||
733 | struct platform_device s5p_device_i2c_hdmiphy = { | ||
734 | .name = "s3c2440-hdmiphy-i2c", | ||
735 | .id = -1, | ||
736 | .num_resources = ARRAY_SIZE(s5p_i2c_resource), | ||
737 | .resource = s5p_i2c_resource, | ||
738 | }; | ||
739 | |||
740 | void __init s5p_i2c_hdmiphy_set_platdata(struct s3c2410_platform_i2c *pd) | ||
741 | { | ||
742 | struct s3c2410_platform_i2c *npd; | ||
743 | |||
744 | if (!pd) { | ||
745 | pd = &default_i2c_data; | ||
746 | |||
747 | if (soc_is_s5pv210()) | ||
748 | pd->bus_num = 3; | ||
749 | else | ||
750 | pd->bus_num = 0; | ||
751 | } | ||
752 | |||
753 | npd = s3c_set_platdata(pd, sizeof(struct s3c2410_platform_i2c), | ||
754 | &s5p_device_i2c_hdmiphy); | ||
755 | } | ||
756 | |||
757 | static struct s5p_hdmi_platform_data s5p_hdmi_def_platdata; | ||
758 | |||
759 | void __init s5p_hdmi_set_platdata(struct i2c_board_info *hdmiphy_info, | ||
760 | struct i2c_board_info *mhl_info, int mhl_bus) | ||
761 | { | ||
762 | struct s5p_hdmi_platform_data *pd = &s5p_hdmi_def_platdata; | ||
763 | |||
764 | if (soc_is_s5pv210()) | ||
765 | pd->hdmiphy_bus = 3; | ||
766 | else | ||
767 | pd->hdmiphy_bus = 0; | ||
768 | |||
769 | pd->hdmiphy_info = hdmiphy_info; | ||
770 | pd->mhl_info = mhl_info; | ||
771 | pd->mhl_bus = mhl_bus; | ||
772 | |||
773 | s3c_set_platdata(pd, sizeof(struct s5p_hdmi_platform_data), | ||
774 | &s5p_device_hdmi); | ||
775 | } | ||
776 | |||
777 | #endif /* CONFIG_S5P_DEV_I2C_HDMIPHY */ | ||
778 | |||
779 | /* I2S */ | 562 | /* I2S */ |
780 | 563 | ||
781 | #ifdef CONFIG_PLAT_S3C24XX | 564 | #ifdef CONFIG_PLAT_S3C24XX |
@@ -879,36 +662,6 @@ void __init s3c24xx_fb_set_platdata(struct s3c2410fb_mach_info *pd) | |||
879 | } | 662 | } |
880 | #endif /* CONFIG_PLAT_S3C24XX */ | 663 | #endif /* CONFIG_PLAT_S3C24XX */ |
881 | 664 | ||
882 | /* MIPI CSIS */ | ||
883 | |||
884 | #ifdef CONFIG_S5P_DEV_CSIS0 | ||
885 | static struct resource s5p_mipi_csis0_resource[] = { | ||
886 | [0] = DEFINE_RES_MEM(S5P_PA_MIPI_CSIS0, SZ_16K), | ||
887 | [1] = DEFINE_RES_IRQ(IRQ_MIPI_CSIS0), | ||
888 | }; | ||
889 | |||
890 | struct platform_device s5p_device_mipi_csis0 = { | ||
891 | .name = "s5p-mipi-csis", | ||
892 | .id = 0, | ||
893 | .num_resources = ARRAY_SIZE(s5p_mipi_csis0_resource), | ||
894 | .resource = s5p_mipi_csis0_resource, | ||
895 | }; | ||
896 | #endif /* CONFIG_S5P_DEV_CSIS0 */ | ||
897 | |||
898 | #ifdef CONFIG_S5P_DEV_CSIS1 | ||
899 | static struct resource s5p_mipi_csis1_resource[] = { | ||
900 | [0] = DEFINE_RES_MEM(S5P_PA_MIPI_CSIS1, SZ_16K), | ||
901 | [1] = DEFINE_RES_IRQ(IRQ_MIPI_CSIS1), | ||
902 | }; | ||
903 | |||
904 | struct platform_device s5p_device_mipi_csis1 = { | ||
905 | .name = "s5p-mipi-csis", | ||
906 | .id = 1, | ||
907 | .num_resources = ARRAY_SIZE(s5p_mipi_csis1_resource), | ||
908 | .resource = s5p_mipi_csis1_resource, | ||
909 | }; | ||
910 | #endif | ||
911 | |||
912 | /* NAND */ | 665 | /* NAND */ |
913 | 666 | ||
914 | #ifdef CONFIG_S3C_DEV_NAND | 667 | #ifdef CONFIG_S3C_DEV_NAND |
@@ -1052,43 +805,6 @@ void __init s3c64xx_onenand1_set_platdata(struct onenand_platform_data *pdata) | |||
1052 | } | 805 | } |
1053 | #endif /* CONFIG_S3C64XX_DEV_ONENAND1 */ | 806 | #endif /* CONFIG_S3C64XX_DEV_ONENAND1 */ |
1054 | 807 | ||
1055 | #ifdef CONFIG_S5P_DEV_ONENAND | ||
1056 | static struct resource s5p_onenand_resources[] = { | ||
1057 | [0] = DEFINE_RES_MEM(S5P_PA_ONENAND, SZ_128K), | ||
1058 | [1] = DEFINE_RES_MEM(S5P_PA_ONENAND_DMA, SZ_8K), | ||
1059 | [2] = DEFINE_RES_IRQ(IRQ_ONENAND_AUDI), | ||
1060 | }; | ||
1061 | |||
1062 | struct platform_device s5p_device_onenand = { | ||
1063 | .name = "s5pc110-onenand", | ||
1064 | .id = -1, | ||
1065 | .num_resources = ARRAY_SIZE(s5p_onenand_resources), | ||
1066 | .resource = s5p_onenand_resources, | ||
1067 | }; | ||
1068 | #endif /* CONFIG_S5P_DEV_ONENAND */ | ||
1069 | |||
1070 | /* PMU */ | ||
1071 | |||
1072 | #if defined(CONFIG_PLAT_S5P) && !defined(CONFIG_ARCH_EXYNOS) | ||
1073 | static struct resource s5p_pmu_resource[] = { | ||
1074 | DEFINE_RES_IRQ(IRQ_PMU) | ||
1075 | }; | ||
1076 | |||
1077 | static struct platform_device s5p_device_pmu = { | ||
1078 | .name = "arm-pmu", | ||
1079 | .id = -1, | ||
1080 | .num_resources = ARRAY_SIZE(s5p_pmu_resource), | ||
1081 | .resource = s5p_pmu_resource, | ||
1082 | }; | ||
1083 | |||
1084 | static int __init s5p_pmu_init(void) | ||
1085 | { | ||
1086 | platform_device_register(&s5p_device_pmu); | ||
1087 | return 0; | ||
1088 | } | ||
1089 | arch_initcall(s5p_pmu_init); | ||
1090 | #endif /* CONFIG_PLAT_S5P */ | ||
1091 | |||
1092 | /* PWM Timer */ | 808 | /* PWM Timer */ |
1093 | 809 | ||
1094 | #ifdef CONFIG_SAMSUNG_DEV_PWM | 810 | #ifdef CONFIG_SAMSUNG_DEV_PWM |
@@ -1251,52 +967,6 @@ void __init s3c24xx_ts_set_platdata(struct s3c2410_ts_mach_info *pd) | |||
1251 | } | 967 | } |
1252 | #endif /* CONFIG_SAMSUNG_DEV_TS */ | 968 | #endif /* CONFIG_SAMSUNG_DEV_TS */ |
1253 | 969 | ||
1254 | /* TV */ | ||
1255 | |||
1256 | #ifdef CONFIG_S5P_DEV_TV | ||
1257 | |||
1258 | static struct resource s5p_hdmi_resources[] = { | ||
1259 | [0] = DEFINE_RES_MEM(S5P_PA_HDMI, SZ_1M), | ||
1260 | [1] = DEFINE_RES_IRQ(IRQ_HDMI), | ||
1261 | }; | ||
1262 | |||
1263 | struct platform_device s5p_device_hdmi = { | ||
1264 | .name = "s5p-hdmi", | ||
1265 | .id = -1, | ||
1266 | .num_resources = ARRAY_SIZE(s5p_hdmi_resources), | ||
1267 | .resource = s5p_hdmi_resources, | ||
1268 | }; | ||
1269 | |||
1270 | static struct resource s5p_sdo_resources[] = { | ||
1271 | [0] = DEFINE_RES_MEM(S5P_PA_SDO, SZ_64K), | ||
1272 | [1] = DEFINE_RES_IRQ(IRQ_SDO), | ||
1273 | }; | ||
1274 | |||
1275 | struct platform_device s5p_device_sdo = { | ||
1276 | .name = "s5p-sdo", | ||
1277 | .id = -1, | ||
1278 | .num_resources = ARRAY_SIZE(s5p_sdo_resources), | ||
1279 | .resource = s5p_sdo_resources, | ||
1280 | }; | ||
1281 | |||
1282 | static struct resource s5p_mixer_resources[] = { | ||
1283 | [0] = DEFINE_RES_MEM_NAMED(S5P_PA_MIXER, SZ_64K, "mxr"), | ||
1284 | [1] = DEFINE_RES_MEM_NAMED(S5P_PA_VP, SZ_64K, "vp"), | ||
1285 | [2] = DEFINE_RES_IRQ_NAMED(IRQ_MIXER, "irq"), | ||
1286 | }; | ||
1287 | |||
1288 | struct platform_device s5p_device_mixer = { | ||
1289 | .name = "s5p-mixer", | ||
1290 | .id = -1, | ||
1291 | .num_resources = ARRAY_SIZE(s5p_mixer_resources), | ||
1292 | .resource = s5p_mixer_resources, | ||
1293 | .dev = { | ||
1294 | .dma_mask = &samsung_device_dma_mask, | ||
1295 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
1296 | } | ||
1297 | }; | ||
1298 | #endif /* CONFIG_S5P_DEV_TV */ | ||
1299 | |||
1300 | /* USB */ | 970 | /* USB */ |
1301 | 971 | ||
1302 | #ifdef CONFIG_S3C_DEV_USB_HOST | 972 | #ifdef CONFIG_S3C_DEV_USB_HOST |
diff --git a/arch/arm/plat-samsung/include/plat/camport.h b/arch/arm/plat-samsung/include/plat/camport.h deleted file mode 100644 index a5708bf84b3a..000000000000 --- a/arch/arm/plat-samsung/include/plat/camport.h +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2011 Samsung Electronics Co., Ltd. | ||
3 | * | ||
4 | * S5P series camera interface helper functions | ||
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 | #ifndef __PLAT_SAMSUNG_CAMPORT_H_ | ||
12 | #define __PLAT_SAMSUNG_CAMPORT_H_ __FILE__ | ||
13 | |||
14 | enum s5p_camport_id { | ||
15 | S5P_CAMPORT_A, | ||
16 | S5P_CAMPORT_B, | ||
17 | }; | ||
18 | |||
19 | /* | ||
20 | * The helper functions to configure GPIO for the camera parallel bus. | ||
21 | * The camera port can be multiplexed with any FIMC entity, even multiple | ||
22 | * FIMC entities are allowed to be attached to a single port simultaneously. | ||
23 | * These functions are to be used in the board setup code. | ||
24 | */ | ||
25 | int s5pv210_fimc_setup_gpio(enum s5p_camport_id id); | ||
26 | int exynos4_fimc_setup_gpio(enum s5p_camport_id id); | ||
27 | |||
28 | #endif /* __PLAT_SAMSUNG_CAMPORT_H */ | ||
diff --git a/arch/arm/plat-samsung/include/plat/clock-clksrc.h b/arch/arm/plat-samsung/include/plat/clock-clksrc.h deleted file mode 100644 index 50a8ca7c3760..000000000000 --- a/arch/arm/plat-samsung/include/plat/clock-clksrc.h +++ /dev/null | |||
@@ -1,83 +0,0 @@ | |||
1 | /* linux/arch/arm/plat-samsung/include/plat/clock-clksrc.h | ||
2 | * | ||
3 | * Parts taken from arch/arm/plat-s3c64xx/clock.c | ||
4 | * Copyright 2008 Openmoko, Inc. | ||
5 | * Copyright 2008 Simtec Electronics | ||
6 | * Ben Dooks <ben@simtec.co.uk> | ||
7 | * http://armlinux.simtec.co.uk/ | ||
8 | * | ||
9 | * Copyright 2009 Ben Dooks <ben-linux@fluff.org> | ||
10 | * Copyright 2009 Harald Welte | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or modify | ||
13 | * it under the terms of the GNU General Public License version 2 as | ||
14 | * published by the Free Software Foundation. | ||
15 | */ | ||
16 | |||
17 | /** | ||
18 | * struct clksrc_sources - list of sources for a given clock | ||
19 | * @sources: array of pointers to clocks | ||
20 | * @nr_sources: The size of @sources | ||
21 | */ | ||
22 | struct clksrc_sources { | ||
23 | unsigned int nr_sources; | ||
24 | struct clk **sources; | ||
25 | }; | ||
26 | |||
27 | /** | ||
28 | * struct clksrc_reg - register definition for clock control bits | ||
29 | * @reg: pointer to the register in virtual memory. | ||
30 | * @shift: the shift in bits to where the bitfield is. | ||
31 | * @size: the size in bits of the bitfield. | ||
32 | * | ||
33 | * This specifies the size and position of the bits we are interested | ||
34 | * in within the register specified by @reg. | ||
35 | */ | ||
36 | struct clksrc_reg { | ||
37 | void __iomem *reg; | ||
38 | unsigned short shift; | ||
39 | unsigned short size; | ||
40 | }; | ||
41 | |||
42 | /** | ||
43 | * struct clksrc_clk - class of clock for newer style samsung devices. | ||
44 | * @clk: the standard clock representation | ||
45 | * @sources: the sources for this clock | ||
46 | * @reg_src: the register definition for selecting the clock's source | ||
47 | * @reg_div: the register definition for the clock's output divisor | ||
48 | * | ||
49 | * This clock implements the features required by the newer SoCs where | ||
50 | * the standard clock block provides an input mux and a post-mux divisor | ||
51 | * to provide the periperhal's clock. | ||
52 | * | ||
53 | * The array of @sources provides the mapping of mux position to the | ||
54 | * clock, and @reg_src shows the code where to modify to change the mux | ||
55 | * position. The @reg_div defines how to change the divider settings on | ||
56 | * the output. | ||
57 | */ | ||
58 | struct clksrc_clk { | ||
59 | struct clk clk; | ||
60 | struct clksrc_sources *sources; | ||
61 | |||
62 | struct clksrc_reg reg_src; | ||
63 | struct clksrc_reg reg_div; | ||
64 | }; | ||
65 | |||
66 | /** | ||
67 | * s3c_set_clksrc() - setup the clock from the register settings | ||
68 | * @clk: The clock to setup. | ||
69 | * @announce: true to announce the setting to printk(). | ||
70 | * | ||
71 | * Setup the clock from the current register settings, for when the | ||
72 | * kernel boots or if it is resuming from a possibly unknown state. | ||
73 | */ | ||
74 | extern void s3c_set_clksrc(struct clksrc_clk *clk, bool announce); | ||
75 | |||
76 | /** | ||
77 | * s3c_register_clksrc() register clocks from an array of clksrc clocks | ||
78 | * @srcs: The array of clocks to register | ||
79 | * @size: The size of the @srcs array. | ||
80 | * | ||
81 | * Initialise and register the array of clocks described by @srcs. | ||
82 | */ | ||
83 | extern void s3c_register_clksrc(struct clksrc_clk *srcs, int size); | ||
diff --git a/arch/arm/plat-samsung/include/plat/clock.h b/arch/arm/plat-samsung/include/plat/clock.h deleted file mode 100644 index 63239f409807..000000000000 --- a/arch/arm/plat-samsung/include/plat/clock.h +++ /dev/null | |||
@@ -1,152 +0,0 @@ | |||
1 | /* linux/arch/arm/plat-s3c/include/plat/clock.h | ||
2 | * | ||
3 | * Copyright (c) 2004-2005 Simtec Electronics | ||
4 | * http://www.simtec.co.uk/products/SWLINUX/ | ||
5 | * Written by Ben Dooks, <ben@simtec.co.uk> | ||
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 | |||
12 | #ifndef __ASM_PLAT_CLOCK_H | ||
13 | #define __ASM_PLAT_CLOCK_H __FILE__ | ||
14 | |||
15 | #include <linux/spinlock.h> | ||
16 | #include <linux/clkdev.h> | ||
17 | |||
18 | struct clk; | ||
19 | |||
20 | /** | ||
21 | * struct clk_ops - standard clock operations | ||
22 | * @set_rate: set the clock rate, see clk_set_rate(). | ||
23 | * @get_rate: get the clock rate, see clk_get_rate(). | ||
24 | * @round_rate: round a given clock rate, see clk_round_rate(). | ||
25 | * @set_parent: set the clock's parent, see clk_set_parent(). | ||
26 | * | ||
27 | * Group the common clock implementations together so that we | ||
28 | * don't have to keep setting the same fields again. We leave | ||
29 | * enable in struct clk. | ||
30 | * | ||
31 | * Adding an extra layer of indirection into the process should | ||
32 | * not be a problem as it is unlikely these operations are going | ||
33 | * to need to be called quickly. | ||
34 | */ | ||
35 | struct clk_ops { | ||
36 | int (*set_rate)(struct clk *c, unsigned long rate); | ||
37 | unsigned long (*get_rate)(struct clk *c); | ||
38 | unsigned long (*round_rate)(struct clk *c, unsigned long rate); | ||
39 | int (*set_parent)(struct clk *c, struct clk *parent); | ||
40 | }; | ||
41 | |||
42 | struct clk { | ||
43 | struct list_head list; | ||
44 | struct module *owner; | ||
45 | struct clk *parent; | ||
46 | const char *name; | ||
47 | const char *devname; | ||
48 | int id; | ||
49 | int usage; | ||
50 | unsigned long rate; | ||
51 | unsigned long ctrlbit; | ||
52 | |||
53 | struct clk_ops *ops; | ||
54 | int (*enable)(struct clk *, int enable); | ||
55 | struct clk_lookup lookup; | ||
56 | #if defined(CONFIG_PM_DEBUG) && defined(CONFIG_DEBUG_FS) | ||
57 | struct dentry *dent; /* For visible tree hierarchy */ | ||
58 | #endif | ||
59 | }; | ||
60 | |||
61 | /* other clocks which may be registered by board support */ | ||
62 | |||
63 | extern struct clk s3c24xx_dclk0; | ||
64 | extern struct clk s3c24xx_dclk1; | ||
65 | extern struct clk s3c24xx_clkout0; | ||
66 | extern struct clk s3c24xx_clkout1; | ||
67 | extern struct clk s3c24xx_uclk; | ||
68 | |||
69 | extern struct clk clk_usb_bus; | ||
70 | |||
71 | /* core clock support */ | ||
72 | |||
73 | extern struct clk clk_f; | ||
74 | extern struct clk clk_h; | ||
75 | extern struct clk clk_p; | ||
76 | extern struct clk clk_mpll; | ||
77 | extern struct clk clk_upll; | ||
78 | extern struct clk clk_epll; | ||
79 | extern struct clk clk_xtal; | ||
80 | extern struct clk clk_ext; | ||
81 | |||
82 | /* S3C2443/S3C2416 specific clocks */ | ||
83 | extern struct clksrc_clk clk_epllref; | ||
84 | extern struct clksrc_clk clk_esysclk; | ||
85 | |||
86 | /* S3C24XX UART clocks */ | ||
87 | extern struct clk s3c24xx_clk_uart0; | ||
88 | extern struct clk s3c24xx_clk_uart1; | ||
89 | extern struct clk s3c24xx_clk_uart2; | ||
90 | |||
91 | /* S3C64XX specific clocks */ | ||
92 | extern struct clk clk_h2; | ||
93 | extern struct clk clk_27m; | ||
94 | extern struct clk clk_48m; | ||
95 | extern struct clk clk_xusbxti; | ||
96 | |||
97 | extern int clk_default_setrate(struct clk *clk, unsigned long rate); | ||
98 | extern struct clk_ops clk_ops_def_setrate; | ||
99 | |||
100 | /* exports for arch/arm/mach-s3c2410 | ||
101 | * | ||
102 | * Please DO NOT use these outside of arch/arm/mach-s3c2410 | ||
103 | */ | ||
104 | |||
105 | extern spinlock_t clocks_lock; | ||
106 | |||
107 | extern int s3c2410_clkcon_enable(struct clk *clk, int enable); | ||
108 | |||
109 | extern int s3c24xx_register_clock(struct clk *clk); | ||
110 | extern int s3c24xx_register_clocks(struct clk **clk, int nr_clks); | ||
111 | |||
112 | extern void s3c_register_clocks(struct clk *clk, int nr_clks); | ||
113 | extern void s3c_disable_clocks(struct clk *clkp, int nr_clks); | ||
114 | |||
115 | extern int s3c24xx_register_baseclocks(unsigned long xtal); | ||
116 | |||
117 | extern void s5p_register_clocks(unsigned long xtal_freq); | ||
118 | |||
119 | extern void s3c24xx_setup_clocks(unsigned long fclk, | ||
120 | unsigned long hclk, | ||
121 | unsigned long pclk); | ||
122 | |||
123 | extern void s3c2410_setup_clocks(void); | ||
124 | extern void s3c2412_setup_clocks(void); | ||
125 | extern void s3c244x_setup_clocks(void); | ||
126 | |||
127 | /* S3C2410 specific clock functions */ | ||
128 | |||
129 | extern int s3c2410_baseclk_add(void); | ||
130 | |||
131 | /* S3C2443/S3C2416 specific clock functions */ | ||
132 | |||
133 | typedef unsigned int (*pll_fn)(unsigned int reg, unsigned int base); | ||
134 | |||
135 | extern void s3c2443_common_setup_clocks(pll_fn get_mpll); | ||
136 | extern void s3c2443_common_init_clocks(int xtal, pll_fn get_mpll, | ||
137 | unsigned int *divs, int nr_divs, | ||
138 | int divmask); | ||
139 | |||
140 | extern int s3c2443_clkcon_enable_h(struct clk *clk, int enable); | ||
141 | extern int s3c2443_clkcon_enable_p(struct clk *clk, int enable); | ||
142 | extern int s3c2443_clkcon_enable_s(struct clk *clk, int enable); | ||
143 | |||
144 | /* S3C64XX specific functions and clocks */ | ||
145 | |||
146 | extern int s3c64xx_sclk_ctrl(struct clk *clk, int enable); | ||
147 | |||
148 | /* Global watchdog clock used by arch_wtd_reset() callback */ | ||
149 | |||
150 | extern struct clk *s3c2410_wdtclk; | ||
151 | |||
152 | #endif /* __ASM_PLAT_CLOCK_H */ | ||
diff --git a/arch/arm/plat-samsung/include/plat/cpu-freq-core.h b/arch/arm/plat-samsung/include/plat/cpu-freq-core.h index 72d4178ad23b..317c52303288 100644 --- a/arch/arm/plat-samsung/include/plat/cpu-freq-core.h +++ b/arch/arm/plat-samsung/include/plat/cpu-freq-core.h | |||
@@ -140,7 +140,6 @@ struct s3c_cpufreq_config { | |||
140 | * any frequency changes. This is really only need by devices like the | 140 | * any frequency changes. This is really only need by devices like the |
141 | * S3C2410 where there is no or limited divider between the PLL and the | 141 | * S3C2410 where there is no or limited divider between the PLL and the |
142 | * ARMCLK. | 142 | * ARMCLK. |
143 | * @resume_clocks: Update the clocks on resume. | ||
144 | * @get_iotiming: Get the current IO timing data, mainly for use at start. | 143 | * @get_iotiming: Get the current IO timing data, mainly for use at start. |
145 | * @set_iotiming: Update the IO timings from the cached copies calculated | 144 | * @set_iotiming: Update the IO timings from the cached copies calculated |
146 | * from the @calc_iotiming entry when changing the frequency. | 145 | * from the @calc_iotiming entry when changing the frequency. |
@@ -169,8 +168,6 @@ struct s3c_cpufreq_info { | |||
169 | 168 | ||
170 | /* driver routines */ | 169 | /* driver routines */ |
171 | 170 | ||
172 | void (*resume_clocks)(void); | ||
173 | |||
174 | int (*get_iotiming)(struct s3c_cpufreq_config *cfg, | 171 | int (*get_iotiming)(struct s3c_cpufreq_config *cfg, |
175 | struct s3c_iotimings *timings); | 172 | struct s3c_iotimings *timings); |
176 | 173 | ||
diff --git a/arch/arm/plat-samsung/include/plat/cpu.h b/arch/arm/plat-samsung/include/plat/cpu.h index d1d4659025bb..61d14f3a0426 100644 --- a/arch/arm/plat-samsung/include/plat/cpu.h +++ b/arch/arm/plat-samsung/include/plat/cpu.h | |||
@@ -47,7 +47,6 @@ IS_SAMSUNG_CPU(s3c24xx, S3C24XX_CPU_ID, S3C24XX_CPU_MASK) | |||
47 | IS_SAMSUNG_CPU(s3c2412, S3C2412_CPU_ID, S3C2412_CPU_MASK) | 47 | IS_SAMSUNG_CPU(s3c2412, S3C2412_CPU_ID, S3C2412_CPU_MASK) |
48 | IS_SAMSUNG_CPU(s3c6400, S3C6400_CPU_ID, S3C64XX_CPU_MASK) | 48 | IS_SAMSUNG_CPU(s3c6400, S3C6400_CPU_ID, S3C64XX_CPU_MASK) |
49 | IS_SAMSUNG_CPU(s3c6410, S3C6410_CPU_ID, S3C64XX_CPU_MASK) | 49 | IS_SAMSUNG_CPU(s3c6410, S3C6410_CPU_ID, S3C64XX_CPU_MASK) |
50 | IS_SAMSUNG_CPU(s5pv210, S5PV210_CPU_ID, S5PV210_CPU_MASK) | ||
51 | 50 | ||
52 | #if defined(CONFIG_CPU_S3C2410) || defined(CONFIG_CPU_S3C2412) || \ | 51 | #if defined(CONFIG_CPU_S3C2410) || defined(CONFIG_CPU_S3C2412) || \ |
53 | defined(CONFIG_CPU_S3C2416) || defined(CONFIG_CPU_S3C2440) || \ | 52 | defined(CONFIG_CPU_S3C2416) || defined(CONFIG_CPU_S3C2440) || \ |
@@ -76,12 +75,6 @@ IS_SAMSUNG_CPU(s5pv210, S5PV210_CPU_ID, S5PV210_CPU_MASK) | |||
76 | # define soc_is_s3c64xx() 0 | 75 | # define soc_is_s3c64xx() 0 |
77 | #endif | 76 | #endif |
78 | 77 | ||
79 | #if defined(CONFIG_CPU_S5PV210) | ||
80 | # define soc_is_s5pv210() is_samsung_s5pv210() | ||
81 | #else | ||
82 | # define soc_is_s5pv210() 0 | ||
83 | #endif | ||
84 | |||
85 | #define IODESC_ENT(x) { (unsigned long)S3C24XX_VA_##x, __phys_to_pfn(S3C24XX_PA_##x), S3C24XX_SZ_##x, MT_DEVICE } | 78 | #define IODESC_ENT(x) { (unsigned long)S3C24XX_VA_##x, __phys_to_pfn(S3C24XX_PA_##x), S3C24XX_SZ_##x, MT_DEVICE } |
86 | 79 | ||
87 | #ifndef KHZ | 80 | #ifndef KHZ |
@@ -117,12 +110,9 @@ extern void s3c_init_cpu(unsigned long idcode, | |||
117 | 110 | ||
118 | /* core initialisation functions */ | 111 | /* core initialisation functions */ |
119 | 112 | ||
120 | extern void s5p_init_irq(u32 *vic, u32 num_vic); | ||
121 | |||
122 | extern void s3c24xx_init_io(struct map_desc *mach_desc, int size); | 113 | extern void s3c24xx_init_io(struct map_desc *mach_desc, int size); |
123 | 114 | ||
124 | extern void s3c64xx_init_cpu(void); | 115 | extern void s3c64xx_init_cpu(void); |
125 | extern void s5p_init_cpu(void __iomem *cpuid_addr); | ||
126 | 116 | ||
127 | extern unsigned int samsung_rev(void); | 117 | extern unsigned int samsung_rev(void); |
128 | 118 | ||
@@ -149,8 +139,5 @@ extern struct bus_type s3c2440_subsys; | |||
149 | extern struct bus_type s3c2442_subsys; | 139 | extern struct bus_type s3c2442_subsys; |
150 | extern struct bus_type s3c2443_subsys; | 140 | extern struct bus_type s3c2443_subsys; |
151 | extern struct bus_type s3c6410_subsys; | 141 | extern struct bus_type s3c6410_subsys; |
152 | extern struct bus_type s5pv210_subsys; | ||
153 | |||
154 | extern void (*s5pc1xx_idle)(void); | ||
155 | 142 | ||
156 | #endif | 143 | #endif |
diff --git a/arch/arm/plat-samsung/include/plat/devs.h b/arch/arm/plat-samsung/include/plat/devs.h index 5f5a28d08c2e..e23fed311e5f 100644 --- a/arch/arm/plat-samsung/include/plat/devs.h +++ b/arch/arm/plat-samsung/include/plat/devs.h | |||
@@ -25,9 +25,6 @@ struct s3c24xx_uart_resources { | |||
25 | 25 | ||
26 | extern struct s3c24xx_uart_resources s3c2410_uart_resources[]; | 26 | extern struct s3c24xx_uart_resources s3c2410_uart_resources[]; |
27 | extern struct s3c24xx_uart_resources s3c64xx_uart_resources[]; | 27 | extern struct s3c24xx_uart_resources s3c64xx_uart_resources[]; |
28 | extern struct s3c24xx_uart_resources s5p_uart_resources[]; | ||
29 | extern struct s3c24xx_uart_resources exynos4_uart_resources[]; | ||
30 | extern struct s3c24xx_uart_resources exynos5_uart_resources[]; | ||
31 | 28 | ||
32 | extern struct platform_device *s3c24xx_uart_devs[]; | 29 | extern struct platform_device *s3c24xx_uart_devs[]; |
33 | extern struct platform_device *s3c24xx_uart_src[]; | 30 | extern struct platform_device *s3c24xx_uart_src[]; |
@@ -75,45 +72,6 @@ extern struct platform_device s3c_device_usb_hsotg; | |||
75 | extern struct platform_device s3c_device_usb_hsudc; | 72 | extern struct platform_device s3c_device_usb_hsudc; |
76 | extern struct platform_device s3c_device_wdt; | 73 | extern struct platform_device s3c_device_wdt; |
77 | 74 | ||
78 | extern struct platform_device s5p_device_fimc0; | ||
79 | extern struct platform_device s5p_device_fimc1; | ||
80 | extern struct platform_device s5p_device_fimc2; | ||
81 | extern struct platform_device s5p_device_fimc3; | ||
82 | extern struct platform_device s5p_device_fimc_md; | ||
83 | extern struct platform_device s5p_device_jpeg; | ||
84 | extern struct platform_device s5p_device_g2d; | ||
85 | extern struct platform_device s5p_device_fimd0; | ||
86 | extern struct platform_device s5p_device_hdmi; | ||
87 | extern struct platform_device s5p_device_i2c_hdmiphy; | ||
88 | extern struct platform_device s5p_device_mfc; | ||
89 | extern struct platform_device s5p_device_mfc_l; | ||
90 | extern struct platform_device s5p_device_mfc_r; | ||
91 | extern struct platform_device s5p_device_mipi_csis0; | ||
92 | extern struct platform_device s5p_device_mipi_csis1; | ||
93 | extern struct platform_device s5p_device_mixer; | ||
94 | extern struct platform_device s5p_device_onenand; | ||
95 | extern struct platform_device s5p_device_sdo; | ||
96 | |||
97 | extern struct platform_device s5pv210_device_ac97; | ||
98 | extern struct platform_device s5pv210_device_iis0; | ||
99 | extern struct platform_device s5pv210_device_iis1; | ||
100 | extern struct platform_device s5pv210_device_iis2; | ||
101 | extern struct platform_device s5pv210_device_pcm0; | ||
102 | extern struct platform_device s5pv210_device_pcm1; | ||
103 | extern struct platform_device s5pv210_device_pcm2; | ||
104 | extern struct platform_device s5pv210_device_spdif; | ||
105 | |||
106 | extern struct platform_device exynos4_device_ac97; | ||
107 | extern struct platform_device exynos4_device_ahci; | ||
108 | extern struct platform_device exynos4_device_i2s0; | ||
109 | extern struct platform_device exynos4_device_i2s1; | ||
110 | extern struct platform_device exynos4_device_i2s2; | ||
111 | extern struct platform_device exynos4_device_ohci; | ||
112 | extern struct platform_device exynos4_device_pcm0; | ||
113 | extern struct platform_device exynos4_device_pcm1; | ||
114 | extern struct platform_device exynos4_device_pcm2; | ||
115 | extern struct platform_device exynos4_device_spdif; | ||
116 | |||
117 | extern struct platform_device samsung_asoc_idma; | 75 | extern struct platform_device samsung_asoc_idma; |
118 | extern struct platform_device samsung_device_keypad; | 76 | extern struct platform_device samsung_device_keypad; |
119 | extern struct platform_device samsung_device_pwm; | 77 | extern struct platform_device samsung_device_pwm; |
diff --git a/arch/arm/plat-samsung/include/plat/fb-core.h b/arch/arm/plat-samsung/include/plat/fb-core.h index 6abcbf139cee..bca383efcf6d 100644 --- a/arch/arm/plat-samsung/include/plat/fb-core.h +++ b/arch/arm/plat-samsung/include/plat/fb-core.h | |||
@@ -26,19 +26,4 @@ static inline void s3c_fb_setname(char *name) | |||
26 | #endif | 26 | #endif |
27 | } | 27 | } |
28 | 28 | ||
29 | /* Re-define device name depending on support. */ | ||
30 | static inline void s5p_fb_setname(int id, char *name) | ||
31 | { | ||
32 | switch (id) { | ||
33 | #ifdef CONFIG_S5P_DEV_FIMD0 | ||
34 | case 0: | ||
35 | s5p_device_fimd0.name = name; | ||
36 | break; | ||
37 | #endif | ||
38 | default: | ||
39 | printk(KERN_ERR "%s: invalid device id(%d)\n", __func__, id); | ||
40 | break; | ||
41 | } | ||
42 | } | ||
43 | |||
44 | #endif /* __ASM_PLAT_FB_CORE_H */ | 29 | #endif /* __ASM_PLAT_FB_CORE_H */ |
diff --git a/arch/arm/plat-samsung/include/plat/fb.h b/arch/arm/plat-samsung/include/plat/fb.h index 5a0e26afb961..b89f8f208515 100644 --- a/arch/arm/plat-samsung/include/plat/fb.h +++ b/arch/arm/plat-samsung/include/plat/fb.h | |||
@@ -26,32 +26,10 @@ | |||
26 | extern void s3c_fb_set_platdata(struct s3c_fb_platdata *pd); | 26 | extern void s3c_fb_set_platdata(struct s3c_fb_platdata *pd); |
27 | 27 | ||
28 | /** | 28 | /** |
29 | * s5p_fimd0_set_platdata() - Setup the FB device with platform data. | ||
30 | * @pd: The platform data to set. The data is copied from the passed structure | ||
31 | * so the machine data can mark the data __initdata so that any unused | ||
32 | * machines will end up dumping their data at runtime. | ||
33 | */ | ||
34 | extern void s5p_fimd0_set_platdata(struct s3c_fb_platdata *pd); | ||
35 | |||
36 | /** | ||
37 | * s3c64xx_fb_gpio_setup_24bpp() - S3C64XX setup function for 24bpp LCD | 29 | * s3c64xx_fb_gpio_setup_24bpp() - S3C64XX setup function for 24bpp LCD |
38 | * | 30 | * |
39 | * Initialise the GPIO for an 24bpp LCD display on the RGB interface. | 31 | * Initialise the GPIO for an 24bpp LCD display on the RGB interface. |
40 | */ | 32 | */ |
41 | extern void s3c64xx_fb_gpio_setup_24bpp(void); | 33 | extern void s3c64xx_fb_gpio_setup_24bpp(void); |
42 | 34 | ||
43 | /** | ||
44 | * s5pv210_fb_gpio_setup_24bpp() - S5PV210/S5PC110 setup function for 24bpp LCD | ||
45 | * | ||
46 | * Initialise the GPIO for an 24bpp LCD display on the RGB interface. | ||
47 | */ | ||
48 | extern void s5pv210_fb_gpio_setup_24bpp(void); | ||
49 | |||
50 | /** | ||
51 | * exynos4_fimd0_gpio_setup_24bpp() - Exynos4 setup function for 24bpp LCD0 | ||
52 | * | ||
53 | * Initialise the GPIO for an 24bpp LCD display on the RGB interface 0. | ||
54 | */ | ||
55 | extern void exynos4_fimd0_gpio_setup_24bpp(void); | ||
56 | |||
57 | #endif /* __PLAT_S3C_FB_H */ | 35 | #endif /* __PLAT_S3C_FB_H */ |
diff --git a/arch/arm/plat-samsung/include/plat/fimc-core.h b/arch/arm/plat-samsung/include/plat/fimc-core.h deleted file mode 100644 index 1d6cb2b8b094..000000000000 --- a/arch/arm/plat-samsung/include/plat/fimc-core.h +++ /dev/null | |||
@@ -1,51 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/plat-samsung/include/plat/fimc-core.h | ||
3 | * | ||
4 | * Copyright 2010 Samsung Electronics Co., Ltd. | ||
5 | * Sylwester Nawrocki <s.nawrocki@samsung.com> | ||
6 | * | ||
7 | * Samsung camera interface driver core functions | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License version 2 as | ||
11 | * published by the Free Software Foundation. | ||
12 | */ | ||
13 | |||
14 | #ifndef __ASM_PLAT_FIMC_CORE_H | ||
15 | #define __ASM_PLAT_FIMC_CORE_H __FILE__ | ||
16 | |||
17 | /* | ||
18 | * These functions are only for use with the core support code, such as | ||
19 | * the CPU-specific initialization code. | ||
20 | */ | ||
21 | |||
22 | /* Re-define device name to differentiate the subsystem in various SoCs. */ | ||
23 | static inline void s3c_fimc_setname(int id, char *name) | ||
24 | { | ||
25 | switch (id) { | ||
26 | #ifdef CONFIG_S5P_DEV_FIMC0 | ||
27 | case 0: | ||
28 | s5p_device_fimc0.name = name; | ||
29 | break; | ||
30 | #endif | ||
31 | #ifdef CONFIG_S5P_DEV_FIMC1 | ||
32 | case 1: | ||
33 | s5p_device_fimc1.name = name; | ||
34 | break; | ||
35 | #endif | ||
36 | #ifdef CONFIG_S5P_DEV_FIMC2 | ||
37 | case 2: | ||
38 | s5p_device_fimc2.name = name; | ||
39 | break; | ||
40 | #endif | ||
41 | #ifdef CONFIG_S5P_DEV_FIMC3 | ||
42 | case 3: | ||
43 | s5p_device_fimc3.name = name; | ||
44 | break; | ||
45 | #endif | ||
46 | default: | ||
47 | break; | ||
48 | } | ||
49 | } | ||
50 | |||
51 | #endif /* __ASM_PLAT_FIMC_CORE_H */ | ||
diff --git a/arch/arm/plat-samsung/include/plat/gpio-cfg.h b/arch/arm/plat-samsung/include/plat/gpio-cfg.h index 08740eed050c..b5294eff18b5 100644 --- a/arch/arm/plat-samsung/include/plat/gpio-cfg.h +++ b/arch/arm/plat-samsung/include/plat/gpio-cfg.h | |||
@@ -27,7 +27,6 @@ | |||
27 | #include <linux/types.h> | 27 | #include <linux/types.h> |
28 | 28 | ||
29 | typedef unsigned int __bitwise__ samsung_gpio_pull_t; | 29 | typedef unsigned int __bitwise__ samsung_gpio_pull_t; |
30 | typedef unsigned int __bitwise__ s5p_gpio_drvstr_t; | ||
31 | 30 | ||
32 | /* forward declaration if gpio-core.h hasn't been included */ | 31 | /* forward declaration if gpio-core.h hasn't been included */ |
33 | struct samsung_gpio_chip; | 32 | struct samsung_gpio_chip; |
@@ -180,67 +179,4 @@ static inline int s3c_gpio_cfgrange_nopull(unsigned int pin, unsigned int size, | |||
180 | return s3c_gpio_cfgall_range(pin, size, cfg, S3C_GPIO_PULL_NONE); | 179 | return s3c_gpio_cfgall_range(pin, size, cfg, S3C_GPIO_PULL_NONE); |
181 | } | 180 | } |
182 | 181 | ||
183 | /* Define values for the drvstr available for each gpio pin. | ||
184 | * | ||
185 | * These values control the value of the output signal driver strength, | ||
186 | * configurable on most pins on the S5P series. | ||
187 | */ | ||
188 | #define S5P_GPIO_DRVSTR_LV1 ((__force s5p_gpio_drvstr_t)0x0) | ||
189 | #define S5P_GPIO_DRVSTR_LV2 ((__force s5p_gpio_drvstr_t)0x2) | ||
190 | #define S5P_GPIO_DRVSTR_LV3 ((__force s5p_gpio_drvstr_t)0x1) | ||
191 | #define S5P_GPIO_DRVSTR_LV4 ((__force s5p_gpio_drvstr_t)0x3) | ||
192 | |||
193 | /** | ||
194 | * s5c_gpio_get_drvstr() - get the driver streght value of a gpio pin | ||
195 | * @pin: The pin number to get the settings for | ||
196 | * | ||
197 | * Read the driver streght value for the specified pin. | ||
198 | */ | ||
199 | extern s5p_gpio_drvstr_t s5p_gpio_get_drvstr(unsigned int pin); | ||
200 | |||
201 | /** | ||
202 | * s3c_gpio_set_drvstr() - set the driver streght value of a gpio pin | ||
203 | * @pin: The pin number to configure the driver streght value | ||
204 | * @drvstr: The new value of the driver strength | ||
205 | * | ||
206 | * This function sets the driver strength value for the specified pin. | ||
207 | * It will return 0 if successful, or a negative error code if the pin | ||
208 | * cannot support the requested setting. | ||
209 | */ | ||
210 | extern int s5p_gpio_set_drvstr(unsigned int pin, s5p_gpio_drvstr_t drvstr); | ||
211 | |||
212 | /** | ||
213 | * s5p_register_gpio_interrupt() - register interrupt support for a gpio group | ||
214 | * @pin: The pin number from the group to be registered | ||
215 | * | ||
216 | * This function registers gpio interrupt support for the group that the | ||
217 | * specified pin belongs to. | ||
218 | * | ||
219 | * The total number of gpio pins is quite large ob s5p series. Registering | ||
220 | * irq support for all of them would be a resource waste. Because of that the | ||
221 | * interrupt support for standard gpio pins is registered dynamically. | ||
222 | * | ||
223 | * It will return the irq number of the interrupt that has been registered | ||
224 | * or -ENOMEM if no more gpio interrupts can be registered. It is allowed | ||
225 | * to call this function more than once for the same gpio group (the group | ||
226 | * will be registered only once). | ||
227 | */ | ||
228 | extern int s5p_register_gpio_interrupt(int pin); | ||
229 | |||
230 | /** s5p_register_gpioint_bank() - add gpio bank for further gpio interrupt | ||
231 | * registration (see s5p_register_gpio_interrupt function) | ||
232 | * @chain_irq: chained irq number for the gpio int handler for this bank | ||
233 | * @start: start gpio group number of this bank | ||
234 | * @nr_groups: number of gpio groups handled by this bank | ||
235 | * | ||
236 | * This functions registers initial information about gpio banks that | ||
237 | * can be later used by the s5p_register_gpio_interrupt() function to | ||
238 | * enable support for gpio interrupt for particular gpio group. | ||
239 | */ | ||
240 | #ifdef CONFIG_S5P_GPIO_INT | ||
241 | extern int s5p_register_gpioint_bank(int chain_irq, int start, int nr_groups); | ||
242 | #else | ||
243 | #define s5p_register_gpioint_bank(chain_irq, start, nr_groups) do { } while (0) | ||
244 | #endif | ||
245 | |||
246 | #endif /* __PLAT_GPIO_CFG_H */ | 182 | #endif /* __PLAT_GPIO_CFG_H */ |
diff --git a/arch/arm/plat-samsung/include/plat/hdmi.h b/arch/arm/plat-samsung/include/plat/hdmi.h deleted file mode 100644 index 331d046ac2c5..000000000000 --- a/arch/arm/plat-samsung/include/plat/hdmi.h +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2012 Samsung Electronics Co.Ltd | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify it | ||
5 | * under the terms of the GNU General Public License as published by the | ||
6 | * Free Software Foundation; either version 2 of the License, or (at your | ||
7 | * option) any later version. | ||
8 | */ | ||
9 | |||
10 | #ifndef __PLAT_SAMSUNG_HDMI_H | ||
11 | #define __PLAT_SAMSUNG_HDMI_H __FILE__ | ||
12 | |||
13 | extern void s5p_hdmi_set_platdata(struct i2c_board_info *hdmiphy_info, | ||
14 | struct i2c_board_info *mhl_info, int mhl_bus); | ||
15 | |||
16 | #endif /* __PLAT_SAMSUNG_HDMI_H */ | ||
diff --git a/arch/arm/plat-samsung/include/plat/irqs.h b/arch/arm/plat-samsung/include/plat/irqs.h deleted file mode 100644 index 039001c0ef05..000000000000 --- a/arch/arm/plat-samsung/include/plat/irqs.h +++ /dev/null | |||
@@ -1,72 +0,0 @@ | |||
1 | /* linux/arch/arm/plat-samsung/include/plat/irqs.h | ||
2 | * | ||
3 | * Copyright (c) 2009 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com/ | ||
5 | * | ||
6 | * S5P Common IRQ support | ||
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 version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #ifndef __PLAT_SAMSUNG_IRQS_H | ||
14 | #define __PLAT_SAMSUNG_IRQS_H __FILE__ | ||
15 | |||
16 | /* we keep the first set of CPU IRQs out of the range of | ||
17 | * the ISA space, so that the PC104 has them to itself | ||
18 | * and we don't end up having to do horrible things to the | ||
19 | * standard ISA drivers.... | ||
20 | * | ||
21 | * note, since we're using the VICs, our start must be a | ||
22 | * mulitple of 32 to allow the common code to work | ||
23 | */ | ||
24 | |||
25 | #define S5P_IRQ_OFFSET (32) | ||
26 | |||
27 | #define S5P_IRQ(x) ((x) + S5P_IRQ_OFFSET) | ||
28 | |||
29 | #define S5P_VIC0_BASE S5P_IRQ(0) | ||
30 | #define S5P_VIC1_BASE S5P_IRQ(32) | ||
31 | #define S5P_VIC2_BASE S5P_IRQ(64) | ||
32 | #define S5P_VIC3_BASE S5P_IRQ(96) | ||
33 | |||
34 | #define VIC_BASE(x) (S5P_VIC0_BASE + ((x)*32)) | ||
35 | |||
36 | #define IRQ_VIC0_BASE S5P_VIC0_BASE | ||
37 | #define IRQ_VIC1_BASE S5P_VIC1_BASE | ||
38 | #define IRQ_VIC2_BASE S5P_VIC2_BASE | ||
39 | |||
40 | /* VIC based IRQs */ | ||
41 | |||
42 | #define S5P_IRQ_VIC0(x) (S5P_VIC0_BASE + (x)) | ||
43 | #define S5P_IRQ_VIC1(x) (S5P_VIC1_BASE + (x)) | ||
44 | #define S5P_IRQ_VIC2(x) (S5P_VIC2_BASE + (x)) | ||
45 | #define S5P_IRQ_VIC3(x) (S5P_VIC3_BASE + (x)) | ||
46 | |||
47 | #define IRQ_EINT(x) ((x) < 16 ? ((x) + S5P_EINT_BASE1) \ | ||
48 | : ((x) - 16 + S5P_EINT_BASE2)) | ||
49 | |||
50 | #define EINT_OFFSET(irq) ((irq) < S5P_EINT_BASE2 ? \ | ||
51 | ((irq) - S5P_EINT_BASE1) : \ | ||
52 | ((irq) + 16 - S5P_EINT_BASE2)) | ||
53 | |||
54 | #define IRQ_EINT_BIT(x) EINT_OFFSET(x) | ||
55 | |||
56 | /* Typically only a few gpio chips require gpio interrupt support. | ||
57 | To avoid memory waste irq descriptors are allocated only for | ||
58 | S5P_GPIOINT_GROUP_COUNT chips, each with total number of | ||
59 | S5P_GPIOINT_GROUP_SIZE pins/irqs. Each GPIOINT group can be assiged | ||
60 | to any gpio chip with the s5p_register_gpio_interrupt() function */ | ||
61 | #define S5P_GPIOINT_GROUP_COUNT 4 | ||
62 | #define S5P_GPIOINT_GROUP_SIZE 8 | ||
63 | #define S5P_GPIOINT_COUNT (S5P_GPIOINT_GROUP_COUNT * S5P_GPIOINT_GROUP_SIZE) | ||
64 | |||
65 | /* IRQ types common for all s5p platforms */ | ||
66 | #define S5P_IRQ_TYPE_LEVEL_LOW (0x00) | ||
67 | #define S5P_IRQ_TYPE_LEVEL_HIGH (0x01) | ||
68 | #define S5P_IRQ_TYPE_EDGE_FALLING (0x02) | ||
69 | #define S5P_IRQ_TYPE_EDGE_RISING (0x03) | ||
70 | #define S5P_IRQ_TYPE_EDGE_BOTH (0x04) | ||
71 | |||
72 | #endif /* __PLAT_SAMSUNG_IRQS_H */ | ||
diff --git a/arch/arm/plat-samsung/include/plat/map-s5p.h b/arch/arm/plat-samsung/include/plat/map-s5p.h index c18678610bc0..f5b9d3ff9cd4 100644 --- a/arch/arm/plat-samsung/include/plat/map-s5p.h +++ b/arch/arm/plat-samsung/include/plat/map-s5p.h | |||
@@ -15,7 +15,6 @@ | |||
15 | 15 | ||
16 | #define S5P_VA_CHIPID S3C_ADDR(0x02000000) | 16 | #define S5P_VA_CHIPID S3C_ADDR(0x02000000) |
17 | #define S5P_VA_CMU S3C_ADDR(0x02100000) | 17 | #define S5P_VA_CMU S3C_ADDR(0x02100000) |
18 | #define S5P_VA_PMU S3C_ADDR(0x02180000) | ||
19 | #define S5P_VA_GPIO S3C_ADDR(0x02200000) | 18 | #define S5P_VA_GPIO S3C_ADDR(0x02200000) |
20 | #define S5P_VA_GPIO1 S5P_VA_GPIO | 19 | #define S5P_VA_GPIO1 S5P_VA_GPIO |
21 | #define S5P_VA_GPIO2 S3C_ADDR(0x02240000) | 20 | #define S5P_VA_GPIO2 S3C_ADDR(0x02240000) |
diff --git a/arch/arm/plat-samsung/include/plat/mfc.h b/arch/arm/plat-samsung/include/plat/mfc.h deleted file mode 100644 index 033654e91e22..000000000000 --- a/arch/arm/plat-samsung/include/plat/mfc.h +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2011 Samsung Electronics Co.Ltd | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify it | ||
5 | * under the terms of the GNU General Public License as published by the | ||
6 | * Free Software Foundation; either version 2 of the License, or (at your | ||
7 | * option) any later version. | ||
8 | */ | ||
9 | |||
10 | #ifndef __PLAT_SAMSUNG_MFC_H | ||
11 | #define __PLAT_SAMSUNG_MFC_H __FILE__ | ||
12 | |||
13 | struct s5p_mfc_dt_meminfo { | ||
14 | unsigned long loff; | ||
15 | unsigned long lsize; | ||
16 | unsigned long roff; | ||
17 | unsigned long rsize; | ||
18 | char *compatible; | ||
19 | }; | ||
20 | |||
21 | /** | ||
22 | * s5p_mfc_reserve_mem - function to early reserve memory for MFC driver | ||
23 | * @rbase: base address for MFC 'right' memory interface | ||
24 | * @rsize: size of the memory reserved for MFC 'right' interface | ||
25 | * @lbase: base address for MFC 'left' memory interface | ||
26 | * @lsize: size of the memory reserved for MFC 'left' interface | ||
27 | * | ||
28 | * This function reserves system memory for both MFC device memory | ||
29 | * interfaces and registers it to respective struct device entries as | ||
30 | * coherent memory. | ||
31 | */ | ||
32 | void __init s5p_mfc_reserve_mem(phys_addr_t rbase, unsigned int rsize, | ||
33 | phys_addr_t lbase, unsigned int lsize); | ||
34 | |||
35 | #endif /* __PLAT_SAMSUNG_MFC_H */ | ||
diff --git a/arch/arm/plat-samsung/include/plat/pll.h b/arch/arm/plat-samsung/include/plat/pll.h deleted file mode 100644 index 357af7c1c664..000000000000 --- a/arch/arm/plat-samsung/include/plat/pll.h +++ /dev/null | |||
@@ -1,323 +0,0 @@ | |||
1 | /* linux/arch/arm/plat-samsung/include/plat/pll.h | ||
2 | * | ||
3 | * Copyright (c) 2009-2011 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com/ | ||
5 | * | ||
6 | * Copyright 2008 Openmoko, Inc. | ||
7 | * Copyright 2008 Simtec Electronics | ||
8 | * Ben Dooks <ben@simtec.co.uk> | ||
9 | * http://armlinux.simtec.co.uk/ | ||
10 | * | ||
11 | * Samsung PLL codes | ||
12 | * | ||
13 | * This program is free software; you can redistribute it and/or modify | ||
14 | * it under the terms of the GNU General Public License version 2 as | ||
15 | * published by the Free Software Foundation. | ||
16 | */ | ||
17 | |||
18 | #include <asm/div64.h> | ||
19 | |||
20 | #define S3C24XX_PLL_MDIV_MASK (0xFF) | ||
21 | #define S3C24XX_PLL_PDIV_MASK (0x1F) | ||
22 | #define S3C24XX_PLL_SDIV_MASK (0x3) | ||
23 | #define S3C24XX_PLL_MDIV_SHIFT (12) | ||
24 | #define S3C24XX_PLL_PDIV_SHIFT (4) | ||
25 | #define S3C24XX_PLL_SDIV_SHIFT (0) | ||
26 | |||
27 | static inline unsigned int s3c24xx_get_pll(unsigned int pllval, | ||
28 | unsigned int baseclk) | ||
29 | { | ||
30 | unsigned int mdiv, pdiv, sdiv; | ||
31 | uint64_t fvco; | ||
32 | |||
33 | mdiv = (pllval >> S3C24XX_PLL_MDIV_SHIFT) & S3C24XX_PLL_MDIV_MASK; | ||
34 | pdiv = (pllval >> S3C24XX_PLL_PDIV_SHIFT) & S3C24XX_PLL_PDIV_MASK; | ||
35 | sdiv = (pllval >> S3C24XX_PLL_SDIV_SHIFT) & S3C24XX_PLL_SDIV_MASK; | ||
36 | |||
37 | fvco = (uint64_t)baseclk * (mdiv + 8); | ||
38 | do_div(fvco, (pdiv + 2) << sdiv); | ||
39 | |||
40 | return (unsigned int)fvco; | ||
41 | } | ||
42 | |||
43 | #define S3C2416_PLL_MDIV_MASK (0x3FF) | ||
44 | #define S3C2416_PLL_PDIV_MASK (0x3F) | ||
45 | #define S3C2416_PLL_SDIV_MASK (0x7) | ||
46 | #define S3C2416_PLL_MDIV_SHIFT (14) | ||
47 | #define S3C2416_PLL_PDIV_SHIFT (5) | ||
48 | #define S3C2416_PLL_SDIV_SHIFT (0) | ||
49 | |||
50 | static inline unsigned int s3c2416_get_pll(unsigned int pllval, | ||
51 | unsigned int baseclk) | ||
52 | { | ||
53 | unsigned int mdiv, pdiv, sdiv; | ||
54 | uint64_t fvco; | ||
55 | |||
56 | mdiv = (pllval >> S3C2416_PLL_MDIV_SHIFT) & S3C2416_PLL_MDIV_MASK; | ||
57 | pdiv = (pllval >> S3C2416_PLL_PDIV_SHIFT) & S3C2416_PLL_PDIV_MASK; | ||
58 | sdiv = (pllval >> S3C2416_PLL_SDIV_SHIFT) & S3C2416_PLL_SDIV_MASK; | ||
59 | |||
60 | fvco = (uint64_t)baseclk * mdiv; | ||
61 | do_div(fvco, (pdiv << sdiv)); | ||
62 | |||
63 | return (unsigned int)fvco; | ||
64 | } | ||
65 | |||
66 | #define S3C6400_PLL_MDIV_MASK (0x3FF) | ||
67 | #define S3C6400_PLL_PDIV_MASK (0x3F) | ||
68 | #define S3C6400_PLL_SDIV_MASK (0x7) | ||
69 | #define S3C6400_PLL_MDIV_SHIFT (16) | ||
70 | #define S3C6400_PLL_PDIV_SHIFT (8) | ||
71 | #define S3C6400_PLL_SDIV_SHIFT (0) | ||
72 | |||
73 | static inline unsigned long s3c6400_get_pll(unsigned long baseclk, | ||
74 | u32 pllcon) | ||
75 | { | ||
76 | u32 mdiv, pdiv, sdiv; | ||
77 | u64 fvco = baseclk; | ||
78 | |||
79 | mdiv = (pllcon >> S3C6400_PLL_MDIV_SHIFT) & S3C6400_PLL_MDIV_MASK; | ||
80 | pdiv = (pllcon >> S3C6400_PLL_PDIV_SHIFT) & S3C6400_PLL_PDIV_MASK; | ||
81 | sdiv = (pllcon >> S3C6400_PLL_SDIV_SHIFT) & S3C6400_PLL_SDIV_MASK; | ||
82 | |||
83 | fvco *= mdiv; | ||
84 | do_div(fvco, (pdiv << sdiv)); | ||
85 | |||
86 | return (unsigned long)fvco; | ||
87 | } | ||
88 | |||
89 | #define PLL6553X_MDIV_MASK (0x7F) | ||
90 | #define PLL6553X_PDIV_MASK (0x1F) | ||
91 | #define PLL6553X_SDIV_MASK (0x3) | ||
92 | #define PLL6553X_KDIV_MASK (0xFFFF) | ||
93 | #define PLL6553X_MDIV_SHIFT (16) | ||
94 | #define PLL6553X_PDIV_SHIFT (8) | ||
95 | #define PLL6553X_SDIV_SHIFT (0) | ||
96 | |||
97 | static inline unsigned long s3c_get_pll6553x(unsigned long baseclk, | ||
98 | u32 pll_con0, u32 pll_con1) | ||
99 | { | ||
100 | unsigned long result; | ||
101 | u32 mdiv, pdiv, sdiv, kdiv; | ||
102 | u64 tmp; | ||
103 | |||
104 | mdiv = (pll_con0 >> PLL6553X_MDIV_SHIFT) & PLL6553X_MDIV_MASK; | ||
105 | pdiv = (pll_con0 >> PLL6553X_PDIV_SHIFT) & PLL6553X_PDIV_MASK; | ||
106 | sdiv = (pll_con0 >> PLL6553X_SDIV_SHIFT) & PLL6553X_SDIV_MASK; | ||
107 | kdiv = pll_con1 & PLL6553X_KDIV_MASK; | ||
108 | |||
109 | /* | ||
110 | * We need to multiple baseclk by mdiv (the integer part) and kdiv | ||
111 | * which is in 2^16ths, so shift mdiv up (does not overflow) and | ||
112 | * add kdiv before multiplying. The use of tmp is to avoid any | ||
113 | * overflows before shifting bac down into result when multipling | ||
114 | * by the mdiv and kdiv pair. | ||
115 | */ | ||
116 | |||
117 | tmp = baseclk; | ||
118 | tmp *= (mdiv << 16) + kdiv; | ||
119 | do_div(tmp, (pdiv << sdiv)); | ||
120 | result = tmp >> 16; | ||
121 | |||
122 | return result; | ||
123 | } | ||
124 | |||
125 | #define PLL35XX_MDIV_MASK (0x3FF) | ||
126 | #define PLL35XX_PDIV_MASK (0x3F) | ||
127 | #define PLL35XX_SDIV_MASK (0x7) | ||
128 | #define PLL35XX_MDIV_SHIFT (16) | ||
129 | #define PLL35XX_PDIV_SHIFT (8) | ||
130 | #define PLL35XX_SDIV_SHIFT (0) | ||
131 | |||
132 | static inline unsigned long s5p_get_pll35xx(unsigned long baseclk, u32 pll_con) | ||
133 | { | ||
134 | u32 mdiv, pdiv, sdiv; | ||
135 | u64 fvco = baseclk; | ||
136 | |||
137 | mdiv = (pll_con >> PLL35XX_MDIV_SHIFT) & PLL35XX_MDIV_MASK; | ||
138 | pdiv = (pll_con >> PLL35XX_PDIV_SHIFT) & PLL35XX_PDIV_MASK; | ||
139 | sdiv = (pll_con >> PLL35XX_SDIV_SHIFT) & PLL35XX_SDIV_MASK; | ||
140 | |||
141 | fvco *= mdiv; | ||
142 | do_div(fvco, (pdiv << sdiv)); | ||
143 | |||
144 | return (unsigned long)fvco; | ||
145 | } | ||
146 | |||
147 | #define PLL36XX_KDIV_MASK (0xFFFF) | ||
148 | #define PLL36XX_MDIV_MASK (0x1FF) | ||
149 | #define PLL36XX_PDIV_MASK (0x3F) | ||
150 | #define PLL36XX_SDIV_MASK (0x7) | ||
151 | #define PLL36XX_MDIV_SHIFT (16) | ||
152 | #define PLL36XX_PDIV_SHIFT (8) | ||
153 | #define PLL36XX_SDIV_SHIFT (0) | ||
154 | |||
155 | static inline unsigned long s5p_get_pll36xx(unsigned long baseclk, | ||
156 | u32 pll_con0, u32 pll_con1) | ||
157 | { | ||
158 | unsigned long result; | ||
159 | u32 mdiv, pdiv, sdiv, kdiv; | ||
160 | u64 tmp; | ||
161 | |||
162 | mdiv = (pll_con0 >> PLL36XX_MDIV_SHIFT) & PLL36XX_MDIV_MASK; | ||
163 | pdiv = (pll_con0 >> PLL36XX_PDIV_SHIFT) & PLL36XX_PDIV_MASK; | ||
164 | sdiv = (pll_con0 >> PLL36XX_SDIV_SHIFT) & PLL36XX_SDIV_MASK; | ||
165 | kdiv = pll_con1 & PLL36XX_KDIV_MASK; | ||
166 | |||
167 | tmp = baseclk; | ||
168 | |||
169 | tmp *= (mdiv << 16) + kdiv; | ||
170 | do_div(tmp, (pdiv << sdiv)); | ||
171 | result = tmp >> 16; | ||
172 | |||
173 | return result; | ||
174 | } | ||
175 | |||
176 | #define PLL45XX_MDIV_MASK (0x3FF) | ||
177 | #define PLL45XX_PDIV_MASK (0x3F) | ||
178 | #define PLL45XX_SDIV_MASK (0x7) | ||
179 | #define PLL45XX_MDIV_SHIFT (16) | ||
180 | #define PLL45XX_PDIV_SHIFT (8) | ||
181 | #define PLL45XX_SDIV_SHIFT (0) | ||
182 | |||
183 | enum pll45xx_type_t { | ||
184 | pll_4500, | ||
185 | pll_4502, | ||
186 | pll_4508 | ||
187 | }; | ||
188 | |||
189 | static inline unsigned long s5p_get_pll45xx(unsigned long baseclk, u32 pll_con, | ||
190 | enum pll45xx_type_t pll_type) | ||
191 | { | ||
192 | u32 mdiv, pdiv, sdiv; | ||
193 | u64 fvco = baseclk; | ||
194 | |||
195 | mdiv = (pll_con >> PLL45XX_MDIV_SHIFT) & PLL45XX_MDIV_MASK; | ||
196 | pdiv = (pll_con >> PLL45XX_PDIV_SHIFT) & PLL45XX_PDIV_MASK; | ||
197 | sdiv = (pll_con >> PLL45XX_SDIV_SHIFT) & PLL45XX_SDIV_MASK; | ||
198 | |||
199 | if (pll_type == pll_4508) | ||
200 | sdiv = sdiv - 1; | ||
201 | |||
202 | fvco *= mdiv; | ||
203 | do_div(fvco, (pdiv << sdiv)); | ||
204 | |||
205 | return (unsigned long)fvco; | ||
206 | } | ||
207 | |||
208 | /* CON0 bit-fields */ | ||
209 | #define PLL46XX_MDIV_MASK (0x1FF) | ||
210 | #define PLL46XX_PDIV_MASK (0x3F) | ||
211 | #define PLL46XX_SDIV_MASK (0x7) | ||
212 | #define PLL46XX_LOCKED_SHIFT (29) | ||
213 | #define PLL46XX_MDIV_SHIFT (16) | ||
214 | #define PLL46XX_PDIV_SHIFT (8) | ||
215 | #define PLL46XX_SDIV_SHIFT (0) | ||
216 | |||
217 | /* CON1 bit-fields */ | ||
218 | #define PLL46XX_MRR_MASK (0x1F) | ||
219 | #define PLL46XX_MFR_MASK (0x3F) | ||
220 | #define PLL46XX_KDIV_MASK (0xFFFF) | ||
221 | #define PLL4650C_KDIV_MASK (0xFFF) | ||
222 | #define PLL46XX_MRR_SHIFT (24) | ||
223 | #define PLL46XX_MFR_SHIFT (16) | ||
224 | #define PLL46XX_KDIV_SHIFT (0) | ||
225 | |||
226 | enum pll46xx_type_t { | ||
227 | pll_4600, | ||
228 | pll_4650, | ||
229 | pll_4650c, | ||
230 | }; | ||
231 | |||
232 | static inline unsigned long s5p_get_pll46xx(unsigned long baseclk, | ||
233 | u32 pll_con0, u32 pll_con1, | ||
234 | enum pll46xx_type_t pll_type) | ||
235 | { | ||
236 | unsigned long result; | ||
237 | u32 mdiv, pdiv, sdiv, kdiv; | ||
238 | u64 tmp; | ||
239 | |||
240 | mdiv = (pll_con0 >> PLL46XX_MDIV_SHIFT) & PLL46XX_MDIV_MASK; | ||
241 | pdiv = (pll_con0 >> PLL46XX_PDIV_SHIFT) & PLL46XX_PDIV_MASK; | ||
242 | sdiv = (pll_con0 >> PLL46XX_SDIV_SHIFT) & PLL46XX_SDIV_MASK; | ||
243 | kdiv = pll_con1 & PLL46XX_KDIV_MASK; | ||
244 | |||
245 | if (pll_type == pll_4650c) | ||
246 | kdiv = pll_con1 & PLL4650C_KDIV_MASK; | ||
247 | else | ||
248 | kdiv = pll_con1 & PLL46XX_KDIV_MASK; | ||
249 | |||
250 | tmp = baseclk; | ||
251 | |||
252 | if (pll_type == pll_4600) { | ||
253 | tmp *= (mdiv << 16) + kdiv; | ||
254 | do_div(tmp, (pdiv << sdiv)); | ||
255 | result = tmp >> 16; | ||
256 | } else { | ||
257 | tmp *= (mdiv << 10) + kdiv; | ||
258 | do_div(tmp, (pdiv << sdiv)); | ||
259 | result = tmp >> 10; | ||
260 | } | ||
261 | |||
262 | return result; | ||
263 | } | ||
264 | |||
265 | #define PLL90XX_MDIV_MASK (0xFF) | ||
266 | #define PLL90XX_PDIV_MASK (0x3F) | ||
267 | #define PLL90XX_SDIV_MASK (0x7) | ||
268 | #define PLL90XX_KDIV_MASK (0xffff) | ||
269 | #define PLL90XX_LOCKED_SHIFT (29) | ||
270 | #define PLL90XX_MDIV_SHIFT (16) | ||
271 | #define PLL90XX_PDIV_SHIFT (8) | ||
272 | #define PLL90XX_SDIV_SHIFT (0) | ||
273 | #define PLL90XX_KDIV_SHIFT (0) | ||
274 | |||
275 | static inline unsigned long s5p_get_pll90xx(unsigned long baseclk, | ||
276 | u32 pll_con, u32 pll_conk) | ||
277 | { | ||
278 | unsigned long result; | ||
279 | u32 mdiv, pdiv, sdiv, kdiv; | ||
280 | u64 tmp; | ||
281 | |||
282 | mdiv = (pll_con >> PLL90XX_MDIV_SHIFT) & PLL90XX_MDIV_MASK; | ||
283 | pdiv = (pll_con >> PLL90XX_PDIV_SHIFT) & PLL90XX_PDIV_MASK; | ||
284 | sdiv = (pll_con >> PLL90XX_SDIV_SHIFT) & PLL90XX_SDIV_MASK; | ||
285 | kdiv = pll_conk & PLL90XX_KDIV_MASK; | ||
286 | |||
287 | /* | ||
288 | * We need to multiple baseclk by mdiv (the integer part) and kdiv | ||
289 | * which is in 2^16ths, so shift mdiv up (does not overflow) and | ||
290 | * add kdiv before multiplying. The use of tmp is to avoid any | ||
291 | * overflows before shifting bac down into result when multipling | ||
292 | * by the mdiv and kdiv pair. | ||
293 | */ | ||
294 | |||
295 | tmp = baseclk; | ||
296 | tmp *= (mdiv << 16) + kdiv; | ||
297 | do_div(tmp, (pdiv << sdiv)); | ||
298 | result = tmp >> 16; | ||
299 | |||
300 | return result; | ||
301 | } | ||
302 | |||
303 | #define PLL65XX_MDIV_MASK (0x3FF) | ||
304 | #define PLL65XX_PDIV_MASK (0x3F) | ||
305 | #define PLL65XX_SDIV_MASK (0x7) | ||
306 | #define PLL65XX_MDIV_SHIFT (16) | ||
307 | #define PLL65XX_PDIV_SHIFT (8) | ||
308 | #define PLL65XX_SDIV_SHIFT (0) | ||
309 | |||
310 | static inline unsigned long s5p_get_pll65xx(unsigned long baseclk, u32 pll_con) | ||
311 | { | ||
312 | u32 mdiv, pdiv, sdiv; | ||
313 | u64 fvco = baseclk; | ||
314 | |||
315 | mdiv = (pll_con >> PLL65XX_MDIV_SHIFT) & PLL65XX_MDIV_MASK; | ||
316 | pdiv = (pll_con >> PLL65XX_PDIV_SHIFT) & PLL65XX_PDIV_MASK; | ||
317 | sdiv = (pll_con >> PLL65XX_SDIV_SHIFT) & PLL65XX_SDIV_MASK; | ||
318 | |||
319 | fvco *= mdiv; | ||
320 | do_div(fvco, (pdiv << sdiv)); | ||
321 | |||
322 | return (unsigned long)fvco; | ||
323 | } | ||
diff --git a/arch/arm/plat-samsung/include/plat/s5p-clock.h b/arch/arm/plat-samsung/include/plat/s5p-clock.h deleted file mode 100644 index acacc4b88a39..000000000000 --- a/arch/arm/plat-samsung/include/plat/s5p-clock.h +++ /dev/null | |||
@@ -1,65 +0,0 @@ | |||
1 | /* linux/arch/arm/plat-samsung/include/plat/s5p-clock.h | ||
2 | * | ||
3 | * Copyright (c) 2009-2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com | ||
5 | * | ||
6 | * Header file for s5p clock support | ||
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 version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #ifndef __ASM_PLAT_S5P_CLOCK_H | ||
14 | #define __ASM_PLAT_S5P_CLOCK_H __FILE__ | ||
15 | |||
16 | #include <linux/clk.h> | ||
17 | |||
18 | #define GET_DIV(clk, field) ((((clk) & field##_MASK) >> field##_SHIFT) + 1) | ||
19 | |||
20 | #define clk_fin_apll clk_ext_xtal_mux | ||
21 | #define clk_fin_bpll clk_ext_xtal_mux | ||
22 | #define clk_fin_cpll clk_ext_xtal_mux | ||
23 | #define clk_fin_mpll clk_ext_xtal_mux | ||
24 | #define clk_fin_epll clk_ext_xtal_mux | ||
25 | #define clk_fin_dpll clk_ext_xtal_mux | ||
26 | #define clk_fin_vpll clk_ext_xtal_mux | ||
27 | #define clk_fin_hpll clk_ext_xtal_mux | ||
28 | |||
29 | extern struct clk clk_ext_xtal_mux; | ||
30 | extern struct clk clk_xusbxti; | ||
31 | extern struct clk clk_48m; | ||
32 | extern struct clk s5p_clk_27m; | ||
33 | extern struct clk clk_fout_apll; | ||
34 | extern struct clk clk_fout_bpll; | ||
35 | extern struct clk clk_fout_bpll_div2; | ||
36 | extern struct clk clk_fout_cpll; | ||
37 | extern struct clk clk_fout_mpll; | ||
38 | extern struct clk clk_fout_mpll_div2; | ||
39 | extern struct clk clk_fout_epll; | ||
40 | extern struct clk clk_fout_dpll; | ||
41 | extern struct clk clk_fout_vpll; | ||
42 | extern struct clk clk_arm; | ||
43 | extern struct clk clk_vpll; | ||
44 | |||
45 | extern struct clksrc_sources clk_src_apll; | ||
46 | extern struct clksrc_sources clk_src_bpll; | ||
47 | extern struct clksrc_sources clk_src_bpll_fout; | ||
48 | extern struct clksrc_sources clk_src_cpll; | ||
49 | extern struct clksrc_sources clk_src_mpll; | ||
50 | extern struct clksrc_sources clk_src_mpll_fout; | ||
51 | extern struct clksrc_sources clk_src_epll; | ||
52 | extern struct clksrc_sources clk_src_dpll; | ||
53 | |||
54 | extern int s5p_gatectrl(void __iomem *reg, struct clk *clk, int enable); | ||
55 | |||
56 | /* Common EPLL operations for S5P platform */ | ||
57 | extern int s5p_epll_enable(struct clk *clk, int enable); | ||
58 | extern unsigned long s5p_epll_get_rate(struct clk *clk); | ||
59 | |||
60 | /* SPDIF clk operations common for S5PV210/C110 and Exynos4 */ | ||
61 | extern int s5p_spdif_set_rate(struct clk *clk, unsigned long rate); | ||
62 | extern unsigned long s5p_spdif_get_rate(struct clk *clk); | ||
63 | |||
64 | extern struct clk_ops s5p_sclk_spdif_ops; | ||
65 | #endif /* __ASM_PLAT_S5P_CLOCK_H */ | ||
diff --git a/arch/arm/plat-samsung/include/plat/sdhci.h b/arch/arm/plat-samsung/include/plat/sdhci.h index f84b6cbc8745..2787553c3ae2 100644 --- a/arch/arm/plat-samsung/include/plat/sdhci.h +++ b/arch/arm/plat-samsung/include/plat/sdhci.h | |||
@@ -57,14 +57,6 @@ extern void s3c2416_setup_sdhci1_cfg_gpio(struct platform_device *, int w); | |||
57 | extern void s3c64xx_setup_sdhci0_cfg_gpio(struct platform_device *, int w); | 57 | extern void s3c64xx_setup_sdhci0_cfg_gpio(struct platform_device *, int w); |
58 | extern void s3c64xx_setup_sdhci1_cfg_gpio(struct platform_device *, int w); | 58 | extern void s3c64xx_setup_sdhci1_cfg_gpio(struct platform_device *, int w); |
59 | extern void s3c64xx_setup_sdhci2_cfg_gpio(struct platform_device *, int w); | 59 | extern void s3c64xx_setup_sdhci2_cfg_gpio(struct platform_device *, int w); |
60 | extern void s5pv210_setup_sdhci0_cfg_gpio(struct platform_device *, int w); | ||
61 | extern void s5pv210_setup_sdhci1_cfg_gpio(struct platform_device *, int w); | ||
62 | extern void s5pv210_setup_sdhci2_cfg_gpio(struct platform_device *, int w); | ||
63 | extern void s5pv210_setup_sdhci3_cfg_gpio(struct platform_device *, int w); | ||
64 | extern void exynos4_setup_sdhci0_cfg_gpio(struct platform_device *, int w); | ||
65 | extern void exynos4_setup_sdhci1_cfg_gpio(struct platform_device *, int w); | ||
66 | extern void exynos4_setup_sdhci2_cfg_gpio(struct platform_device *, int w); | ||
67 | extern void exynos4_setup_sdhci3_cfg_gpio(struct platform_device *, int w); | ||
68 | 60 | ||
69 | /* S3C2416 SDHCI setup */ | 61 | /* S3C2416 SDHCI setup */ |
70 | 62 | ||
@@ -144,45 +136,6 @@ static inline void s3c6400_default_sdhci2(void) { } | |||
144 | 136 | ||
145 | #endif /* CONFIG_S3C64XX_SETUP_SDHCI */ | 137 | #endif /* CONFIG_S3C64XX_SETUP_SDHCI */ |
146 | 138 | ||
147 | /* S5PV210 SDHCI setup */ | ||
148 | |||
149 | #ifdef CONFIG_S5PV210_SETUP_SDHCI | ||
150 | static inline void s5pv210_default_sdhci0(void) | ||
151 | { | ||
152 | #ifdef CONFIG_S3C_DEV_HSMMC | ||
153 | s3c_hsmmc0_def_platdata.cfg_gpio = s5pv210_setup_sdhci0_cfg_gpio; | ||
154 | #endif | ||
155 | } | ||
156 | |||
157 | static inline void s5pv210_default_sdhci1(void) | ||
158 | { | ||
159 | #ifdef CONFIG_S3C_DEV_HSMMC1 | ||
160 | s3c_hsmmc1_def_platdata.cfg_gpio = s5pv210_setup_sdhci1_cfg_gpio; | ||
161 | #endif | ||
162 | } | ||
163 | |||
164 | static inline void s5pv210_default_sdhci2(void) | ||
165 | { | ||
166 | #ifdef CONFIG_S3C_DEV_HSMMC2 | ||
167 | s3c_hsmmc2_def_platdata.cfg_gpio = s5pv210_setup_sdhci2_cfg_gpio; | ||
168 | #endif | ||
169 | } | ||
170 | |||
171 | static inline void s5pv210_default_sdhci3(void) | ||
172 | { | ||
173 | #ifdef CONFIG_S3C_DEV_HSMMC3 | ||
174 | s3c_hsmmc3_def_platdata.cfg_gpio = s5pv210_setup_sdhci3_cfg_gpio; | ||
175 | #endif | ||
176 | } | ||
177 | |||
178 | #else | ||
179 | static inline void s5pv210_default_sdhci0(void) { } | ||
180 | static inline void s5pv210_default_sdhci1(void) { } | ||
181 | static inline void s5pv210_default_sdhci2(void) { } | ||
182 | static inline void s5pv210_default_sdhci3(void) { } | ||
183 | |||
184 | #endif /* CONFIG_S5PV210_SETUP_SDHCI */ | ||
185 | |||
186 | static inline void s3c_sdhci_setname(int id, char *name) | 139 | static inline void s3c_sdhci_setname(int id, char *name) |
187 | { | 140 | { |
188 | switch (id) { | 141 | switch (id) { |
diff --git a/arch/arm/plat-samsung/include/plat/tv-core.h b/arch/arm/plat-samsung/include/plat/tv-core.h deleted file mode 100644 index 3bc34f3ce28f..000000000000 --- a/arch/arm/plat-samsung/include/plat/tv-core.h +++ /dev/null | |||
@@ -1,44 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/plat-samsung/include/plat/tv.h | ||
3 | * | ||
4 | * Copyright 2011 Samsung Electronics Co., Ltd. | ||
5 | * Tomasz Stanislawski <t.stanislaws@samsung.com> | ||
6 | * | ||
7 | * Samsung TV driver core functions | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License version 2 as | ||
11 | * published by the Free Software Foundation. | ||
12 | */ | ||
13 | |||
14 | #ifndef __SAMSUNG_PLAT_TV_H | ||
15 | #define __SAMSUNG_PLAT_TV_H __FILE__ | ||
16 | |||
17 | /* | ||
18 | * These functions are only for use with the core support code, such as | ||
19 | * the CPU-specific initialization code. | ||
20 | */ | ||
21 | |||
22 | /* Re-define device name to differentiate the subsystem in various SoCs. */ | ||
23 | static inline void s5p_hdmi_setname(char *name) | ||
24 | { | ||
25 | #ifdef CONFIG_S5P_DEV_TV | ||
26 | s5p_device_hdmi.name = name; | ||
27 | #endif | ||
28 | } | ||
29 | |||
30 | static inline void s5p_mixer_setname(char *name) | ||
31 | { | ||
32 | #ifdef CONFIG_S5P_DEV_TV | ||
33 | s5p_device_mixer.name = name; | ||
34 | #endif | ||
35 | } | ||
36 | |||
37 | static inline void s5p_sdo_setname(char *name) | ||
38 | { | ||
39 | #ifdef CONFIG_S5P_DEV_TV | ||
40 | s5p_device_sdo.name = name; | ||
41 | #endif | ||
42 | } | ||
43 | |||
44 | #endif /* __SAMSUNG_PLAT_TV_H */ | ||
diff --git a/arch/arm/plat-samsung/init.c b/arch/arm/plat-samsung/init.c index a1f925f3121f..11fbbc26e49f 100644 --- a/arch/arm/plat-samsung/init.c +++ b/arch/arm/plat-samsung/init.c | |||
@@ -30,7 +30,6 @@ | |||
30 | 30 | ||
31 | #include <plat/cpu.h> | 31 | #include <plat/cpu.h> |
32 | #include <plat/devs.h> | 32 | #include <plat/devs.h> |
33 | #include <plat/clock.h> | ||
34 | 33 | ||
35 | static struct cpu_table *cpu; | 34 | static struct cpu_table *cpu; |
36 | 35 | ||
diff --git a/arch/arm/plat-samsung/pm-gpio.c b/arch/arm/plat-samsung/pm-gpio.c index adc91662f72b..f9a09262f2fa 100644 --- a/arch/arm/plat-samsung/pm-gpio.c +++ b/arch/arm/plat-samsung/pm-gpio.c | |||
@@ -194,7 +194,7 @@ struct samsung_gpio_pm samsung_gpio_pm_2bit = { | |||
194 | .resume = samsung_gpio_pm_2bit_resume, | 194 | .resume = samsung_gpio_pm_2bit_resume, |
195 | }; | 195 | }; |
196 | 196 | ||
197 | #if defined(CONFIG_ARCH_S3C64XX) || defined(CONFIG_PLAT_S5P) | 197 | #if defined(CONFIG_ARCH_S3C64XX) |
198 | static void samsung_gpio_pm_4bit_save(struct samsung_gpio_chip *chip) | 198 | static void samsung_gpio_pm_4bit_save(struct samsung_gpio_chip *chip) |
199 | { | 199 | { |
200 | chip->pm_save[1] = __raw_readl(chip->base + OFFS_CON); | 200 | chip->pm_save[1] = __raw_readl(chip->base + OFFS_CON); |
@@ -304,7 +304,7 @@ struct samsung_gpio_pm samsung_gpio_pm_4bit = { | |||
304 | .save = samsung_gpio_pm_4bit_save, | 304 | .save = samsung_gpio_pm_4bit_save, |
305 | .resume = samsung_gpio_pm_4bit_resume, | 305 | .resume = samsung_gpio_pm_4bit_resume, |
306 | }; | 306 | }; |
307 | #endif /* CONFIG_ARCH_S3C64XX || CONFIG_PLAT_S5P */ | 307 | #endif /* CONFIG_ARCH_S3C64XX */ |
308 | 308 | ||
309 | /** | 309 | /** |
310 | * samsung_pm_save_gpio() - save gpio chip data for suspend | 310 | * samsung_pm_save_gpio() - save gpio chip data for suspend |
diff --git a/arch/arm/plat-samsung/s5p-clock.c b/arch/arm/plat-samsung/s5p-clock.c deleted file mode 100644 index 48a159911037..000000000000 --- a/arch/arm/plat-samsung/s5p-clock.c +++ /dev/null | |||
@@ -1,294 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2009 Samsung Electronics Co., Ltd. | ||
3 | * http://www.samsung.com/ | ||
4 | * | ||
5 | * S5P - Common clock support | ||
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 | |||
12 | #include <linux/init.h> | ||
13 | #include <linux/module.h> | ||
14 | #include <linux/kernel.h> | ||
15 | #include <linux/list.h> | ||
16 | #include <linux/errno.h> | ||
17 | #include <linux/err.h> | ||
18 | #include <linux/clk.h> | ||
19 | #include <linux/device.h> | ||
20 | #include <linux/io.h> | ||
21 | #include <asm/div64.h> | ||
22 | |||
23 | #include <mach/regs-clock.h> | ||
24 | |||
25 | #include <plat/clock.h> | ||
26 | #include <plat/clock-clksrc.h> | ||
27 | #include <plat/s5p-clock.h> | ||
28 | |||
29 | /* fin_apll, fin_mpll and fin_epll are all the same clock, which we call | ||
30 | * clk_ext_xtal_mux. | ||
31 | */ | ||
32 | struct clk clk_ext_xtal_mux = { | ||
33 | .name = "ext_xtal", | ||
34 | .id = -1, | ||
35 | }; | ||
36 | |||
37 | struct clk clk_xusbxti = { | ||
38 | .name = "xusbxti", | ||
39 | .id = -1, | ||
40 | .rate = 24000000, | ||
41 | }; | ||
42 | |||
43 | struct clk s5p_clk_27m = { | ||
44 | .name = "clk_27m", | ||
45 | .id = -1, | ||
46 | .rate = 27000000, | ||
47 | }; | ||
48 | |||
49 | /* 48MHz USB Phy clock output */ | ||
50 | struct clk clk_48m = { | ||
51 | .name = "clk_48m", | ||
52 | .id = -1, | ||
53 | .rate = 48000000, | ||
54 | }; | ||
55 | |||
56 | /* APLL clock output | ||
57 | * No need .ctrlbit, this is always on | ||
58 | */ | ||
59 | struct clk clk_fout_apll = { | ||
60 | .name = "fout_apll", | ||
61 | .id = -1, | ||
62 | }; | ||
63 | |||
64 | /* BPLL clock output */ | ||
65 | |||
66 | struct clk clk_fout_bpll = { | ||
67 | .name = "fout_bpll", | ||
68 | .id = -1, | ||
69 | }; | ||
70 | |||
71 | struct clk clk_fout_bpll_div2 = { | ||
72 | .name = "fout_bpll_div2", | ||
73 | .id = -1, | ||
74 | }; | ||
75 | |||
76 | /* CPLL clock output */ | ||
77 | |||
78 | struct clk clk_fout_cpll = { | ||
79 | .name = "fout_cpll", | ||
80 | .id = -1, | ||
81 | }; | ||
82 | |||
83 | /* MPLL clock output | ||
84 | * No need .ctrlbit, this is always on | ||
85 | */ | ||
86 | struct clk clk_fout_mpll = { | ||
87 | .name = "fout_mpll", | ||
88 | .id = -1, | ||
89 | }; | ||
90 | |||
91 | struct clk clk_fout_mpll_div2 = { | ||
92 | .name = "fout_mpll_div2", | ||
93 | .id = -1, | ||
94 | }; | ||
95 | |||
96 | /* EPLL clock output */ | ||
97 | struct clk clk_fout_epll = { | ||
98 | .name = "fout_epll", | ||
99 | .id = -1, | ||
100 | .ctrlbit = (1 << 31), | ||
101 | }; | ||
102 | |||
103 | /* DPLL clock output */ | ||
104 | struct clk clk_fout_dpll = { | ||
105 | .name = "fout_dpll", | ||
106 | .id = -1, | ||
107 | .ctrlbit = (1 << 31), | ||
108 | }; | ||
109 | |||
110 | /* VPLL clock output */ | ||
111 | struct clk clk_fout_vpll = { | ||
112 | .name = "fout_vpll", | ||
113 | .id = -1, | ||
114 | .ctrlbit = (1 << 31), | ||
115 | }; | ||
116 | |||
117 | /* Possible clock sources for APLL Mux */ | ||
118 | static struct clk *clk_src_apll_list[] = { | ||
119 | [0] = &clk_fin_apll, | ||
120 | [1] = &clk_fout_apll, | ||
121 | }; | ||
122 | |||
123 | struct clksrc_sources clk_src_apll = { | ||
124 | .sources = clk_src_apll_list, | ||
125 | .nr_sources = ARRAY_SIZE(clk_src_apll_list), | ||
126 | }; | ||
127 | |||
128 | /* Possible clock sources for BPLL Mux */ | ||
129 | static struct clk *clk_src_bpll_list[] = { | ||
130 | [0] = &clk_fin_bpll, | ||
131 | [1] = &clk_fout_bpll, | ||
132 | }; | ||
133 | |||
134 | struct clksrc_sources clk_src_bpll = { | ||
135 | .sources = clk_src_bpll_list, | ||
136 | .nr_sources = ARRAY_SIZE(clk_src_bpll_list), | ||
137 | }; | ||
138 | |||
139 | static struct clk *clk_src_bpll_fout_list[] = { | ||
140 | [0] = &clk_fout_bpll_div2, | ||
141 | [1] = &clk_fout_bpll, | ||
142 | }; | ||
143 | |||
144 | struct clksrc_sources clk_src_bpll_fout = { | ||
145 | .sources = clk_src_bpll_fout_list, | ||
146 | .nr_sources = ARRAY_SIZE(clk_src_bpll_fout_list), | ||
147 | }; | ||
148 | |||
149 | /* Possible clock sources for CPLL Mux */ | ||
150 | static struct clk *clk_src_cpll_list[] = { | ||
151 | [0] = &clk_fin_cpll, | ||
152 | [1] = &clk_fout_cpll, | ||
153 | }; | ||
154 | |||
155 | struct clksrc_sources clk_src_cpll = { | ||
156 | .sources = clk_src_cpll_list, | ||
157 | .nr_sources = ARRAY_SIZE(clk_src_cpll_list), | ||
158 | }; | ||
159 | |||
160 | /* Possible clock sources for MPLL Mux */ | ||
161 | static struct clk *clk_src_mpll_list[] = { | ||
162 | [0] = &clk_fin_mpll, | ||
163 | [1] = &clk_fout_mpll, | ||
164 | }; | ||
165 | |||
166 | struct clksrc_sources clk_src_mpll = { | ||
167 | .sources = clk_src_mpll_list, | ||
168 | .nr_sources = ARRAY_SIZE(clk_src_mpll_list), | ||
169 | }; | ||
170 | |||
171 | static struct clk *clk_src_mpll_fout_list[] = { | ||
172 | [0] = &clk_fout_mpll_div2, | ||
173 | [1] = &clk_fout_mpll, | ||
174 | }; | ||
175 | |||
176 | struct clksrc_sources clk_src_mpll_fout = { | ||
177 | .sources = clk_src_mpll_fout_list, | ||
178 | .nr_sources = ARRAY_SIZE(clk_src_mpll_fout_list), | ||
179 | }; | ||
180 | |||
181 | /* Possible clock sources for EPLL Mux */ | ||
182 | static struct clk *clk_src_epll_list[] = { | ||
183 | [0] = &clk_fin_epll, | ||
184 | [1] = &clk_fout_epll, | ||
185 | }; | ||
186 | |||
187 | struct clksrc_sources clk_src_epll = { | ||
188 | .sources = clk_src_epll_list, | ||
189 | .nr_sources = ARRAY_SIZE(clk_src_epll_list), | ||
190 | }; | ||
191 | |||
192 | /* Possible clock sources for DPLL Mux */ | ||
193 | static struct clk *clk_src_dpll_list[] = { | ||
194 | [0] = &clk_fin_dpll, | ||
195 | [1] = &clk_fout_dpll, | ||
196 | }; | ||
197 | |||
198 | struct clksrc_sources clk_src_dpll = { | ||
199 | .sources = clk_src_dpll_list, | ||
200 | .nr_sources = ARRAY_SIZE(clk_src_dpll_list), | ||
201 | }; | ||
202 | |||
203 | struct clk clk_vpll = { | ||
204 | .name = "vpll", | ||
205 | .id = -1, | ||
206 | }; | ||
207 | |||
208 | int s5p_gatectrl(void __iomem *reg, struct clk *clk, int enable) | ||
209 | { | ||
210 | unsigned int ctrlbit = clk->ctrlbit; | ||
211 | u32 con; | ||
212 | |||
213 | con = __raw_readl(reg); | ||
214 | con = enable ? (con | ctrlbit) : (con & ~ctrlbit); | ||
215 | __raw_writel(con, reg); | ||
216 | return 0; | ||
217 | } | ||
218 | |||
219 | int s5p_epll_enable(struct clk *clk, int enable) | ||
220 | { | ||
221 | unsigned int ctrlbit = clk->ctrlbit; | ||
222 | unsigned int epll_con = __raw_readl(S5P_EPLL_CON) & ~ctrlbit; | ||
223 | |||
224 | if (enable) | ||
225 | __raw_writel(epll_con | ctrlbit, S5P_EPLL_CON); | ||
226 | else | ||
227 | __raw_writel(epll_con, S5P_EPLL_CON); | ||
228 | |||
229 | return 0; | ||
230 | } | ||
231 | |||
232 | unsigned long s5p_epll_get_rate(struct clk *clk) | ||
233 | { | ||
234 | return clk->rate; | ||
235 | } | ||
236 | |||
237 | int s5p_spdif_set_rate(struct clk *clk, unsigned long rate) | ||
238 | { | ||
239 | struct clk *pclk; | ||
240 | int ret; | ||
241 | |||
242 | pclk = clk_get_parent(clk); | ||
243 | if (IS_ERR(pclk)) | ||
244 | return -EINVAL; | ||
245 | |||
246 | ret = pclk->ops->set_rate(pclk, rate); | ||
247 | clk_put(pclk); | ||
248 | |||
249 | return ret; | ||
250 | } | ||
251 | |||
252 | unsigned long s5p_spdif_get_rate(struct clk *clk) | ||
253 | { | ||
254 | struct clk *pclk; | ||
255 | int rate; | ||
256 | |||
257 | pclk = clk_get_parent(clk); | ||
258 | if (IS_ERR(pclk)) | ||
259 | return -EINVAL; | ||
260 | |||
261 | rate = pclk->ops->get_rate(pclk); | ||
262 | clk_put(pclk); | ||
263 | |||
264 | return rate; | ||
265 | } | ||
266 | |||
267 | struct clk_ops s5p_sclk_spdif_ops = { | ||
268 | .set_rate = s5p_spdif_set_rate, | ||
269 | .get_rate = s5p_spdif_get_rate, | ||
270 | }; | ||
271 | |||
272 | static struct clk *s5p_clks[] __initdata = { | ||
273 | &clk_ext_xtal_mux, | ||
274 | &clk_48m, | ||
275 | &s5p_clk_27m, | ||
276 | &clk_fout_apll, | ||
277 | &clk_fout_mpll, | ||
278 | &clk_fout_epll, | ||
279 | &clk_fout_dpll, | ||
280 | &clk_fout_vpll, | ||
281 | &clk_vpll, | ||
282 | &clk_xusbxti, | ||
283 | }; | ||
284 | |||
285 | void __init s5p_register_clocks(unsigned long xtal_freq) | ||
286 | { | ||
287 | int ret; | ||
288 | |||
289 | clk_ext_xtal_mux.rate = xtal_freq; | ||
290 | |||
291 | ret = s3c24xx_register_clocks(s5p_clks, ARRAY_SIZE(s5p_clks)); | ||
292 | if (ret > 0) | ||
293 | printk(KERN_ERR "Failed to register s5p clocks\n"); | ||
294 | } | ||
diff --git a/arch/arm/plat-samsung/s5p-dev-mfc.c b/arch/arm/plat-samsung/s5p-dev-mfc.c index 469b86260fe3..0b04b6b0fa30 100644 --- a/arch/arm/plat-samsung/s5p-dev-mfc.c +++ b/arch/arm/plat-samsung/s5p-dev-mfc.c | |||
@@ -17,56 +17,16 @@ | |||
17 | #include <linux/of_fdt.h> | 17 | #include <linux/of_fdt.h> |
18 | #include <linux/of.h> | 18 | #include <linux/of.h> |
19 | 19 | ||
20 | #include <plat/mfc.h> | ||
21 | |||
22 | #ifdef CONFIG_SAMSUNG_ATAGS | ||
23 | #include <mach/map.h> | ||
24 | #include <mach/irqs.h> | ||
25 | #include <plat/devs.h> | ||
26 | |||
27 | static struct resource s5p_mfc_resource[] = { | ||
28 | [0] = DEFINE_RES_MEM(S5P_PA_MFC, SZ_64K), | ||
29 | [1] = DEFINE_RES_IRQ(IRQ_MFC), | ||
30 | }; | ||
31 | |||
32 | struct platform_device s5p_device_mfc = { | ||
33 | .name = "s5p-mfc", | ||
34 | .id = -1, | ||
35 | .num_resources = ARRAY_SIZE(s5p_mfc_resource), | ||
36 | .resource = s5p_mfc_resource, | ||
37 | }; | ||
38 | |||
39 | /* | ||
40 | * MFC hardware has 2 memory interfaces which are modelled as two separate | ||
41 | * platform devices to let dma-mapping distinguish between them. | ||
42 | * | ||
43 | * MFC parent device (s5p_device_mfc) must be registered before memory | ||
44 | * interface specific devices (s5p_device_mfc_l and s5p_device_mfc_r). | ||
45 | */ | ||
46 | |||
47 | struct platform_device s5p_device_mfc_l = { | ||
48 | .name = "s5p-mfc-l", | ||
49 | .id = -1, | ||
50 | .dev = { | ||
51 | .parent = &s5p_device_mfc.dev, | ||
52 | .dma_mask = &s5p_device_mfc_l.dev.coherent_dma_mask, | ||
53 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
54 | }, | ||
55 | }; | ||
56 | |||
57 | struct platform_device s5p_device_mfc_r = { | ||
58 | .name = "s5p-mfc-r", | ||
59 | .id = -1, | ||
60 | .dev = { | ||
61 | .parent = &s5p_device_mfc.dev, | ||
62 | .dma_mask = &s5p_device_mfc_r.dev.coherent_dma_mask, | ||
63 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
64 | }, | ||
65 | }; | ||
66 | #else | ||
67 | static struct platform_device s5p_device_mfc_l; | 20 | static struct platform_device s5p_device_mfc_l; |
68 | static struct platform_device s5p_device_mfc_r; | 21 | static struct platform_device s5p_device_mfc_r; |
69 | #endif | 22 | |
23 | struct s5p_mfc_dt_meminfo { | ||
24 | unsigned long loff; | ||
25 | unsigned long lsize; | ||
26 | unsigned long roff; | ||
27 | unsigned long rsize; | ||
28 | char *compatible; | ||
29 | }; | ||
70 | 30 | ||
71 | struct s5p_mfc_reserved_mem { | 31 | struct s5p_mfc_reserved_mem { |
72 | phys_addr_t base; | 32 | phys_addr_t base; |
@@ -77,7 +37,7 @@ struct s5p_mfc_reserved_mem { | |||
77 | static struct s5p_mfc_reserved_mem s5p_mfc_mem[2] __initdata; | 37 | static struct s5p_mfc_reserved_mem s5p_mfc_mem[2] __initdata; |
78 | 38 | ||
79 | 39 | ||
80 | void __init s5p_mfc_reserve_mem(phys_addr_t rbase, unsigned int rsize, | 40 | static void __init s5p_mfc_reserve_mem(phys_addr_t rbase, unsigned int rsize, |
81 | phys_addr_t lbase, unsigned int lsize) | 41 | phys_addr_t lbase, unsigned int lsize) |
82 | { | 42 | { |
83 | int i; | 43 | int i; |
@@ -100,28 +60,6 @@ void __init s5p_mfc_reserve_mem(phys_addr_t rbase, unsigned int rsize, | |||
100 | } | 60 | } |
101 | } | 61 | } |
102 | 62 | ||
103 | #ifdef CONFIG_SAMSUNG_ATAGS | ||
104 | static int __init s5p_mfc_memory_init(void) | ||
105 | { | ||
106 | int i; | ||
107 | |||
108 | for (i = 0; i < ARRAY_SIZE(s5p_mfc_mem); i++) { | ||
109 | struct s5p_mfc_reserved_mem *area = &s5p_mfc_mem[i]; | ||
110 | if (!area->base) | ||
111 | continue; | ||
112 | |||
113 | if (dma_declare_coherent_memory(area->dev, area->base, | ||
114 | area->base, area->size, | ||
115 | DMA_MEMORY_MAP | DMA_MEMORY_EXCLUSIVE) == 0) | ||
116 | printk(KERN_ERR "Failed to declare coherent memory for MFC device (%ld bytes at 0x%08lx)\n", | ||
117 | area->size, (unsigned long) area->base); | ||
118 | } | ||
119 | return 0; | ||
120 | } | ||
121 | device_initcall(s5p_mfc_memory_init); | ||
122 | #endif | ||
123 | |||
124 | #ifdef CONFIG_OF | ||
125 | int __init s5p_fdt_alloc_mfc_mem(unsigned long node, const char *uname, | 63 | int __init s5p_fdt_alloc_mfc_mem(unsigned long node, const char *uname, |
126 | int depth, void *data) | 64 | int depth, void *data) |
127 | { | 65 | { |
@@ -154,4 +92,3 @@ int __init s5p_fdt_alloc_mfc_mem(unsigned long node, const char *uname, | |||
154 | 92 | ||
155 | return 1; | 93 | return 1; |
156 | } | 94 | } |
157 | #endif | ||
diff --git a/arch/arm/plat-samsung/s5p-dev-uart.c b/arch/arm/plat-samsung/s5p-dev-uart.c deleted file mode 100644 index 8c4487af98c8..000000000000 --- a/arch/arm/plat-samsung/s5p-dev-uart.c +++ /dev/null | |||
@@ -1,88 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2009,2012 Samsung Electronics Co., Ltd. | ||
3 | * http://www.samsung.com/ | ||
4 | * | ||
5 | * Base S5P UART resource and device definitions | ||
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 | |||
12 | #include <linux/kernel.h> | ||
13 | #include <linux/types.h> | ||
14 | #include <linux/interrupt.h> | ||
15 | #include <linux/list.h> | ||
16 | #include <linux/ioport.h> | ||
17 | #include <linux/platform_device.h> | ||
18 | |||
19 | #include <asm/mach/arch.h> | ||
20 | #include <asm/mach/irq.h> | ||
21 | #include <mach/map.h> | ||
22 | |||
23 | #include <plat/devs.h> | ||
24 | |||
25 | /* Serial port registrations */ | ||
26 | |||
27 | static struct resource s5p_uart0_resource[] = { | ||
28 | [0] = DEFINE_RES_MEM(S5P_PA_UART0, S5P_SZ_UART), | ||
29 | [1] = DEFINE_RES_IRQ(IRQ_UART0), | ||
30 | }; | ||
31 | |||
32 | static struct resource s5p_uart1_resource[] = { | ||
33 | [0] = DEFINE_RES_MEM(S5P_PA_UART1, S5P_SZ_UART), | ||
34 | [1] = DEFINE_RES_IRQ(IRQ_UART1), | ||
35 | }; | ||
36 | |||
37 | static struct resource s5p_uart2_resource[] = { | ||
38 | [0] = DEFINE_RES_MEM(S5P_PA_UART2, S5P_SZ_UART), | ||
39 | [1] = DEFINE_RES_IRQ(IRQ_UART2), | ||
40 | }; | ||
41 | |||
42 | static struct resource s5p_uart3_resource[] = { | ||
43 | #if CONFIG_SERIAL_SAMSUNG_UARTS > 3 | ||
44 | [0] = DEFINE_RES_MEM(S5P_PA_UART3, S5P_SZ_UART), | ||
45 | [1] = DEFINE_RES_IRQ(IRQ_UART3), | ||
46 | #endif | ||
47 | }; | ||
48 | |||
49 | static struct resource s5p_uart4_resource[] = { | ||
50 | #if CONFIG_SERIAL_SAMSUNG_UARTS > 4 | ||
51 | [0] = DEFINE_RES_MEM(S5P_PA_UART4, S5P_SZ_UART), | ||
52 | [1] = DEFINE_RES_IRQ(IRQ_UART4), | ||
53 | #endif | ||
54 | }; | ||
55 | |||
56 | static struct resource s5p_uart5_resource[] = { | ||
57 | #if CONFIG_SERIAL_SAMSUNG_UARTS > 5 | ||
58 | [0] = DEFINE_RES_MEM(S5P_PA_UART5, S5P_SZ_UART), | ||
59 | [1] = DEFINE_RES_IRQ(IRQ_UART5), | ||
60 | #endif | ||
61 | }; | ||
62 | |||
63 | struct s3c24xx_uart_resources s5p_uart_resources[] __initdata = { | ||
64 | [0] = { | ||
65 | .resources = s5p_uart0_resource, | ||
66 | .nr_resources = ARRAY_SIZE(s5p_uart0_resource), | ||
67 | }, | ||
68 | [1] = { | ||
69 | .resources = s5p_uart1_resource, | ||
70 | .nr_resources = ARRAY_SIZE(s5p_uart1_resource), | ||
71 | }, | ||
72 | [2] = { | ||
73 | .resources = s5p_uart2_resource, | ||
74 | .nr_resources = ARRAY_SIZE(s5p_uart2_resource), | ||
75 | }, | ||
76 | [3] = { | ||
77 | .resources = s5p_uart3_resource, | ||
78 | .nr_resources = ARRAY_SIZE(s5p_uart3_resource), | ||
79 | }, | ||
80 | [4] = { | ||
81 | .resources = s5p_uart4_resource, | ||
82 | .nr_resources = ARRAY_SIZE(s5p_uart4_resource), | ||
83 | }, | ||
84 | [5] = { | ||
85 | .resources = s5p_uart5_resource, | ||
86 | .nr_resources = ARRAY_SIZE(s5p_uart5_resource), | ||
87 | }, | ||
88 | }; | ||
diff --git a/arch/arm/plat-samsung/s5p-irq-eint.c b/arch/arm/plat-samsung/s5p-irq-eint.c deleted file mode 100644 index dcd8c2cbf5bb..000000000000 --- a/arch/arm/plat-samsung/s5p-irq-eint.c +++ /dev/null | |||
@@ -1,221 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
3 | * http://www.samsung.com | ||
4 | * | ||
5 | * S5P - IRQ EINT support | ||
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 | |||
12 | #include <linux/kernel.h> | ||
13 | #include <linux/interrupt.h> | ||
14 | #include <linux/irq.h> | ||
15 | #include <linux/io.h> | ||
16 | #include <linux/device.h> | ||
17 | #include <linux/irqchip/arm-vic.h> | ||
18 | #include <linux/of.h> | ||
19 | |||
20 | #include <plat/regs-irqtype.h> | ||
21 | |||
22 | #include <mach/map.h> | ||
23 | #include <plat/cpu.h> | ||
24 | #include <plat/pm.h> | ||
25 | |||
26 | #include <plat/gpio-cfg.h> | ||
27 | #include <mach/regs-gpio.h> | ||
28 | #include <mach/gpio-samsung.h> | ||
29 | |||
30 | static inline void s5p_irq_eint_mask(struct irq_data *data) | ||
31 | { | ||
32 | u32 mask; | ||
33 | |||
34 | mask = __raw_readl(S5P_EINT_MASK(EINT_REG_NR(data->irq))); | ||
35 | mask |= eint_irq_to_bit(data->irq); | ||
36 | __raw_writel(mask, S5P_EINT_MASK(EINT_REG_NR(data->irq))); | ||
37 | } | ||
38 | |||
39 | static void s5p_irq_eint_unmask(struct irq_data *data) | ||
40 | { | ||
41 | u32 mask; | ||
42 | |||
43 | mask = __raw_readl(S5P_EINT_MASK(EINT_REG_NR(data->irq))); | ||
44 | mask &= ~(eint_irq_to_bit(data->irq)); | ||
45 | __raw_writel(mask, S5P_EINT_MASK(EINT_REG_NR(data->irq))); | ||
46 | } | ||
47 | |||
48 | static inline void s5p_irq_eint_ack(struct irq_data *data) | ||
49 | { | ||
50 | __raw_writel(eint_irq_to_bit(data->irq), | ||
51 | S5P_EINT_PEND(EINT_REG_NR(data->irq))); | ||
52 | } | ||
53 | |||
54 | static void s5p_irq_eint_maskack(struct irq_data *data) | ||
55 | { | ||
56 | /* compiler should in-line these */ | ||
57 | s5p_irq_eint_mask(data); | ||
58 | s5p_irq_eint_ack(data); | ||
59 | } | ||
60 | |||
61 | static int s5p_irq_eint_set_type(struct irq_data *data, unsigned int type) | ||
62 | { | ||
63 | int offs = EINT_OFFSET(data->irq); | ||
64 | int shift; | ||
65 | u32 ctrl, mask; | ||
66 | u32 newvalue = 0; | ||
67 | |||
68 | switch (type) { | ||
69 | case IRQ_TYPE_EDGE_RISING: | ||
70 | newvalue = S5P_IRQ_TYPE_EDGE_RISING; | ||
71 | break; | ||
72 | |||
73 | case IRQ_TYPE_EDGE_FALLING: | ||
74 | newvalue = S5P_IRQ_TYPE_EDGE_FALLING; | ||
75 | break; | ||
76 | |||
77 | case IRQ_TYPE_EDGE_BOTH: | ||
78 | newvalue = S5P_IRQ_TYPE_EDGE_BOTH; | ||
79 | break; | ||
80 | |||
81 | case IRQ_TYPE_LEVEL_LOW: | ||
82 | newvalue = S5P_IRQ_TYPE_LEVEL_LOW; | ||
83 | break; | ||
84 | |||
85 | case IRQ_TYPE_LEVEL_HIGH: | ||
86 | newvalue = S5P_IRQ_TYPE_LEVEL_HIGH; | ||
87 | break; | ||
88 | |||
89 | default: | ||
90 | printk(KERN_ERR "No such irq type %d", type); | ||
91 | return -EINVAL; | ||
92 | } | ||
93 | |||
94 | shift = (offs & 0x7) * 4; | ||
95 | mask = 0x7 << shift; | ||
96 | |||
97 | ctrl = __raw_readl(S5P_EINT_CON(EINT_REG_NR(data->irq))); | ||
98 | ctrl &= ~mask; | ||
99 | ctrl |= newvalue << shift; | ||
100 | __raw_writel(ctrl, S5P_EINT_CON(EINT_REG_NR(data->irq))); | ||
101 | |||
102 | if ((0 <= offs) && (offs < 8)) | ||
103 | s3c_gpio_cfgpin(EINT_GPIO_0(offs & 0x7), EINT_MODE); | ||
104 | |||
105 | else if ((8 <= offs) && (offs < 16)) | ||
106 | s3c_gpio_cfgpin(EINT_GPIO_1(offs & 0x7), EINT_MODE); | ||
107 | |||
108 | else if ((16 <= offs) && (offs < 24)) | ||
109 | s3c_gpio_cfgpin(EINT_GPIO_2(offs & 0x7), EINT_MODE); | ||
110 | |||
111 | else if ((24 <= offs) && (offs < 32)) | ||
112 | s3c_gpio_cfgpin(EINT_GPIO_3(offs & 0x7), EINT_MODE); | ||
113 | |||
114 | else | ||
115 | printk(KERN_ERR "No such irq number %d", offs); | ||
116 | |||
117 | return 0; | ||
118 | } | ||
119 | |||
120 | static struct irq_chip s5p_irq_eint = { | ||
121 | .name = "s5p-eint", | ||
122 | .irq_mask = s5p_irq_eint_mask, | ||
123 | .irq_unmask = s5p_irq_eint_unmask, | ||
124 | .irq_mask_ack = s5p_irq_eint_maskack, | ||
125 | .irq_ack = s5p_irq_eint_ack, | ||
126 | .irq_set_type = s5p_irq_eint_set_type, | ||
127 | #ifdef CONFIG_PM | ||
128 | .irq_set_wake = s3c_irqext_wake, | ||
129 | #endif | ||
130 | }; | ||
131 | |||
132 | /* s5p_irq_demux_eint | ||
133 | * | ||
134 | * This function demuxes the IRQ from the group0 external interrupts, | ||
135 | * from EINTs 16 to 31. It is designed to be inlined into the specific | ||
136 | * handler s5p_irq_demux_eintX_Y. | ||
137 | * | ||
138 | * Each EINT pend/mask registers handle eight of them. | ||
139 | */ | ||
140 | static inline void s5p_irq_demux_eint(unsigned int start) | ||
141 | { | ||
142 | u32 status = __raw_readl(S5P_EINT_PEND(EINT_REG_NR(start))); | ||
143 | u32 mask = __raw_readl(S5P_EINT_MASK(EINT_REG_NR(start))); | ||
144 | unsigned int irq; | ||
145 | |||
146 | status &= ~mask; | ||
147 | status &= 0xff; | ||
148 | |||
149 | while (status) { | ||
150 | irq = fls(status) - 1; | ||
151 | generic_handle_irq(irq + start); | ||
152 | status &= ~(1 << irq); | ||
153 | } | ||
154 | } | ||
155 | |||
156 | static void s5p_irq_demux_eint16_31(unsigned int irq, struct irq_desc *desc) | ||
157 | { | ||
158 | s5p_irq_demux_eint(IRQ_EINT(16)); | ||
159 | s5p_irq_demux_eint(IRQ_EINT(24)); | ||
160 | } | ||
161 | |||
162 | static inline void s5p_irq_vic_eint_mask(struct irq_data *data) | ||
163 | { | ||
164 | void __iomem *base = irq_data_get_irq_chip_data(data); | ||
165 | |||
166 | s5p_irq_eint_mask(data); | ||
167 | writel(1 << EINT_OFFSET(data->irq), base + VIC_INT_ENABLE_CLEAR); | ||
168 | } | ||
169 | |||
170 | static void s5p_irq_vic_eint_unmask(struct irq_data *data) | ||
171 | { | ||
172 | void __iomem *base = irq_data_get_irq_chip_data(data); | ||
173 | |||
174 | s5p_irq_eint_unmask(data); | ||
175 | writel(1 << EINT_OFFSET(data->irq), base + VIC_INT_ENABLE); | ||
176 | } | ||
177 | |||
178 | static inline void s5p_irq_vic_eint_ack(struct irq_data *data) | ||
179 | { | ||
180 | __raw_writel(eint_irq_to_bit(data->irq), | ||
181 | S5P_EINT_PEND(EINT_REG_NR(data->irq))); | ||
182 | } | ||
183 | |||
184 | static void s5p_irq_vic_eint_maskack(struct irq_data *data) | ||
185 | { | ||
186 | s5p_irq_vic_eint_mask(data); | ||
187 | s5p_irq_vic_eint_ack(data); | ||
188 | } | ||
189 | |||
190 | static struct irq_chip s5p_irq_vic_eint = { | ||
191 | .name = "s5p_vic_eint", | ||
192 | .irq_mask = s5p_irq_vic_eint_mask, | ||
193 | .irq_unmask = s5p_irq_vic_eint_unmask, | ||
194 | .irq_mask_ack = s5p_irq_vic_eint_maskack, | ||
195 | .irq_ack = s5p_irq_vic_eint_ack, | ||
196 | .irq_set_type = s5p_irq_eint_set_type, | ||
197 | #ifdef CONFIG_PM | ||
198 | .irq_set_wake = s3c_irqext_wake, | ||
199 | #endif | ||
200 | }; | ||
201 | |||
202 | static int __init s5p_init_irq_eint(void) | ||
203 | { | ||
204 | int irq; | ||
205 | |||
206 | if (of_have_populated_dt()) | ||
207 | return -ENODEV; | ||
208 | |||
209 | for (irq = IRQ_EINT(0); irq <= IRQ_EINT(15); irq++) | ||
210 | irq_set_chip(irq, &s5p_irq_vic_eint); | ||
211 | |||
212 | for (irq = IRQ_EINT(16); irq <= IRQ_EINT(31); irq++) { | ||
213 | irq_set_chip_and_handler(irq, &s5p_irq_eint, handle_level_irq); | ||
214 | set_irq_flags(irq, IRQF_VALID); | ||
215 | } | ||
216 | |||
217 | irq_set_chained_handler(IRQ_EINT16_31, s5p_irq_demux_eint16_31); | ||
218 | return 0; | ||
219 | } | ||
220 | |||
221 | arch_initcall(s5p_init_irq_eint); | ||
diff --git a/arch/arm/plat-samsung/s5p-irq-gpioint.c b/arch/arm/plat-samsung/s5p-irq-gpioint.c deleted file mode 100644 index fafdb059043a..000000000000 --- a/arch/arm/plat-samsung/s5p-irq-gpioint.c +++ /dev/null | |||
@@ -1,218 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
3 | * Author: Kyungmin Park <kyungmin.park@samsung.com> | ||
4 | * Author: Joonyoung Shim <jy0922.shim@samsung.com> | ||
5 | * Author: Marek Szyprowski <m.szyprowski@samsung.com> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License as published by the | ||
9 | * Free Software Foundation; either version 2 of the License, or (at your | ||
10 | * option) any later version. | ||
11 | * | ||
12 | */ | ||
13 | |||
14 | #include <linux/kernel.h> | ||
15 | #include <linux/interrupt.h> | ||
16 | #include <linux/irq.h> | ||
17 | #include <linux/irqchip/chained_irq.h> | ||
18 | #include <linux/io.h> | ||
19 | #include <linux/gpio.h> | ||
20 | #include <linux/slab.h> | ||
21 | |||
22 | #include <mach/map.h> | ||
23 | #include <plat/gpio-core.h> | ||
24 | #include <plat/gpio-cfg.h> | ||
25 | |||
26 | #define GPIO_BASE(chip) ((void __iomem *)((unsigned long)((chip)->base) & 0xFFFFF000u)) | ||
27 | |||
28 | #define CON_OFFSET 0x700 | ||
29 | #define MASK_OFFSET 0x900 | ||
30 | #define PEND_OFFSET 0xA00 | ||
31 | #define REG_OFFSET(x) ((x) << 2) | ||
32 | |||
33 | struct s5p_gpioint_bank { | ||
34 | struct list_head list; | ||
35 | int start; | ||
36 | int nr_groups; | ||
37 | int irq; | ||
38 | struct samsung_gpio_chip **chips; | ||
39 | void (*handler)(unsigned int, struct irq_desc *); | ||
40 | }; | ||
41 | |||
42 | static LIST_HEAD(banks); | ||
43 | |||
44 | static int s5p_gpioint_set_type(struct irq_data *d, unsigned int type) | ||
45 | { | ||
46 | struct irq_chip_generic *gc = irq_data_get_irq_chip_data(d); | ||
47 | struct irq_chip_type *ct = gc->chip_types; | ||
48 | unsigned int shift = (d->irq - gc->irq_base) << 2; | ||
49 | |||
50 | switch (type) { | ||
51 | case IRQ_TYPE_EDGE_RISING: | ||
52 | type = S5P_IRQ_TYPE_EDGE_RISING; | ||
53 | break; | ||
54 | case IRQ_TYPE_EDGE_FALLING: | ||
55 | type = S5P_IRQ_TYPE_EDGE_FALLING; | ||
56 | break; | ||
57 | case IRQ_TYPE_EDGE_BOTH: | ||
58 | type = S5P_IRQ_TYPE_EDGE_BOTH; | ||
59 | break; | ||
60 | case IRQ_TYPE_LEVEL_HIGH: | ||
61 | type = S5P_IRQ_TYPE_LEVEL_HIGH; | ||
62 | break; | ||
63 | case IRQ_TYPE_LEVEL_LOW: | ||
64 | type = S5P_IRQ_TYPE_LEVEL_LOW; | ||
65 | break; | ||
66 | case IRQ_TYPE_NONE: | ||
67 | default: | ||
68 | printk(KERN_WARNING "No irq type\n"); | ||
69 | return -EINVAL; | ||
70 | } | ||
71 | |||
72 | gc->type_cache &= ~(0x7 << shift); | ||
73 | gc->type_cache |= type << shift; | ||
74 | writel(gc->type_cache, gc->reg_base + ct->regs.type); | ||
75 | return 0; | ||
76 | } | ||
77 | |||
78 | static void s5p_gpioint_handler(unsigned int irq, struct irq_desc *desc) | ||
79 | { | ||
80 | struct s5p_gpioint_bank *bank = irq_get_handler_data(irq); | ||
81 | int group, pend_offset, mask_offset; | ||
82 | unsigned int pend, mask; | ||
83 | |||
84 | struct irq_chip *chip = irq_get_chip(irq); | ||
85 | chained_irq_enter(chip, desc); | ||
86 | |||
87 | for (group = 0; group < bank->nr_groups; group++) { | ||
88 | struct samsung_gpio_chip *chip = bank->chips[group]; | ||
89 | if (!chip) | ||
90 | continue; | ||
91 | |||
92 | pend_offset = REG_OFFSET(group); | ||
93 | pend = __raw_readl(GPIO_BASE(chip) + PEND_OFFSET + pend_offset); | ||
94 | if (!pend) | ||
95 | continue; | ||
96 | |||
97 | mask_offset = REG_OFFSET(group); | ||
98 | mask = __raw_readl(GPIO_BASE(chip) + MASK_OFFSET + mask_offset); | ||
99 | pend &= ~mask; | ||
100 | |||
101 | while (pend) { | ||
102 | int offset = fls(pend) - 1; | ||
103 | int real_irq = chip->irq_base + offset; | ||
104 | generic_handle_irq(real_irq); | ||
105 | pend &= ~BIT(offset); | ||
106 | } | ||
107 | } | ||
108 | chained_irq_exit(chip, desc); | ||
109 | } | ||
110 | |||
111 | static __init int s5p_gpioint_add(struct samsung_gpio_chip *chip) | ||
112 | { | ||
113 | static int used_gpioint_groups = 0; | ||
114 | int group = chip->group; | ||
115 | struct s5p_gpioint_bank *b, *bank = NULL; | ||
116 | struct irq_chip_generic *gc; | ||
117 | struct irq_chip_type *ct; | ||
118 | |||
119 | if (used_gpioint_groups >= S5P_GPIOINT_GROUP_COUNT) | ||
120 | return -ENOMEM; | ||
121 | |||
122 | list_for_each_entry(b, &banks, list) { | ||
123 | if (group >= b->start && group < b->start + b->nr_groups) { | ||
124 | bank = b; | ||
125 | break; | ||
126 | } | ||
127 | } | ||
128 | if (!bank) | ||
129 | return -EINVAL; | ||
130 | |||
131 | if (!bank->handler) { | ||
132 | bank->chips = kzalloc(sizeof(struct samsung_gpio_chip *) * | ||
133 | bank->nr_groups, GFP_KERNEL); | ||
134 | if (!bank->chips) | ||
135 | return -ENOMEM; | ||
136 | |||
137 | irq_set_chained_handler(bank->irq, s5p_gpioint_handler); | ||
138 | irq_set_handler_data(bank->irq, bank); | ||
139 | bank->handler = s5p_gpioint_handler; | ||
140 | printk(KERN_INFO "Registered chained gpio int handler for interrupt %d.\n", | ||
141 | bank->irq); | ||
142 | } | ||
143 | |||
144 | /* | ||
145 | * chained GPIO irq has been successfully registered, allocate new gpio | ||
146 | * int group and assign irq nubmers | ||
147 | */ | ||
148 | chip->irq_base = S5P_GPIOINT_BASE + | ||
149 | used_gpioint_groups * S5P_GPIOINT_GROUP_SIZE; | ||
150 | used_gpioint_groups++; | ||
151 | |||
152 | bank->chips[group - bank->start] = chip; | ||
153 | |||
154 | gc = irq_alloc_generic_chip("s5p_gpioint", 1, chip->irq_base, | ||
155 | GPIO_BASE(chip), | ||
156 | handle_level_irq); | ||
157 | if (!gc) | ||
158 | return -ENOMEM; | ||
159 | ct = gc->chip_types; | ||
160 | ct->chip.irq_ack = irq_gc_ack_set_bit; | ||
161 | ct->chip.irq_mask = irq_gc_mask_set_bit; | ||
162 | ct->chip.irq_unmask = irq_gc_mask_clr_bit; | ||
163 | ct->chip.irq_set_type = s5p_gpioint_set_type, | ||
164 | ct->regs.ack = PEND_OFFSET + REG_OFFSET(group - bank->start); | ||
165 | ct->regs.mask = MASK_OFFSET + REG_OFFSET(group - bank->start); | ||
166 | ct->regs.type = CON_OFFSET + REG_OFFSET(group - bank->start); | ||
167 | irq_setup_generic_chip(gc, IRQ_MSK(chip->chip.ngpio), | ||
168 | IRQ_GC_INIT_MASK_CACHE, | ||
169 | IRQ_NOREQUEST | IRQ_NOPROBE, 0); | ||
170 | return 0; | ||
171 | } | ||
172 | |||
173 | int __init s5p_register_gpio_interrupt(int pin) | ||
174 | { | ||
175 | struct samsung_gpio_chip *my_chip = samsung_gpiolib_getchip(pin); | ||
176 | int offset, group; | ||
177 | int ret; | ||
178 | |||
179 | if (!my_chip) | ||
180 | return -EINVAL; | ||
181 | |||
182 | offset = pin - my_chip->chip.base; | ||
183 | group = my_chip->group; | ||
184 | |||
185 | /* check if the group has been already registered */ | ||
186 | if (my_chip->irq_base) | ||
187 | goto success; | ||
188 | |||
189 | /* register gpio group */ | ||
190 | ret = s5p_gpioint_add(my_chip); | ||
191 | if (ret == 0) { | ||
192 | my_chip->chip.to_irq = samsung_gpiolib_to_irq; | ||
193 | printk(KERN_INFO "Registered interrupt support for gpio group %d.\n", | ||
194 | group); | ||
195 | goto success; | ||
196 | } | ||
197 | return ret; | ||
198 | success: | ||
199 | my_chip->bitmap_gpio_int |= BIT(offset); | ||
200 | |||
201 | return my_chip->irq_base + offset; | ||
202 | } | ||
203 | |||
204 | int __init s5p_register_gpioint_bank(int chain_irq, int start, int nr_groups) | ||
205 | { | ||
206 | struct s5p_gpioint_bank *bank; | ||
207 | |||
208 | bank = kzalloc(sizeof(*bank), GFP_KERNEL); | ||
209 | if (!bank) | ||
210 | return -ENOMEM; | ||
211 | |||
212 | bank->start = start; | ||
213 | bank->nr_groups = nr_groups; | ||
214 | bank->irq = chain_irq; | ||
215 | |||
216 | list_add_tail(&bank->list, &banks); | ||
217 | return 0; | ||
218 | } | ||
diff --git a/arch/arm/plat-samsung/s5p-irq-pm.c b/arch/arm/plat-samsung/s5p-irq-pm.c deleted file mode 100644 index 52b16943617e..000000000000 --- a/arch/arm/plat-samsung/s5p-irq-pm.c +++ /dev/null | |||
@@ -1,92 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
3 | * http://www.samsung.com | ||
4 | * | ||
5 | * Based on arch/arm/plat-s3c24xx/irq-pm.c, | ||
6 | * Copyright (c) 2003,2004 Simtec Electronics | ||
7 | * Ben Dooks <ben@simtec.co.uk> | ||
8 | * http://armlinux.simtec.co.uk/ | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #include <linux/init.h> | ||
16 | #include <linux/module.h> | ||
17 | #include <linux/interrupt.h> | ||
18 | |||
19 | #include <plat/cpu.h> | ||
20 | #include <plat/irqs.h> | ||
21 | #include <plat/pm.h> | ||
22 | #include <mach/map.h> | ||
23 | |||
24 | #include <mach/regs-gpio.h> | ||
25 | #include <mach/regs-irq.h> | ||
26 | |||
27 | /* state for IRQs over sleep */ | ||
28 | |||
29 | /* default is to allow for EINT0..EINT31, and IRQ_RTC_TIC, IRQ_RTC_ALARM, | ||
30 | * as wakeup sources | ||
31 | * | ||
32 | * set bit to 1 in allow bitfield to enable the wakeup settings on it | ||
33 | */ | ||
34 | |||
35 | unsigned long s3c_irqwake_intallow = 0x00000006L; | ||
36 | unsigned long s3c_irqwake_eintallow = 0xffffffffL; | ||
37 | |||
38 | int s3c_irq_wake(struct irq_data *data, unsigned int state) | ||
39 | { | ||
40 | unsigned long irqbit; | ||
41 | unsigned int irq_rtc_tic, irq_rtc_alarm; | ||
42 | |||
43 | irq_rtc_tic = IRQ_RTC_TIC; | ||
44 | irq_rtc_alarm = IRQ_RTC_ALARM; | ||
45 | |||
46 | if (data->irq == irq_rtc_tic || data->irq == irq_rtc_alarm) { | ||
47 | irqbit = 1 << (data->irq + 1 - irq_rtc_alarm); | ||
48 | |||
49 | if (!state) | ||
50 | s3c_irqwake_intmask |= irqbit; | ||
51 | else | ||
52 | s3c_irqwake_intmask &= ~irqbit; | ||
53 | } else { | ||
54 | return -ENOENT; | ||
55 | } | ||
56 | |||
57 | return 0; | ||
58 | } | ||
59 | |||
60 | static struct sleep_save eint_save[] = { | ||
61 | SAVE_ITEM(S5P_EINT_CON(0)), | ||
62 | SAVE_ITEM(S5P_EINT_CON(1)), | ||
63 | SAVE_ITEM(S5P_EINT_CON(2)), | ||
64 | SAVE_ITEM(S5P_EINT_CON(3)), | ||
65 | |||
66 | SAVE_ITEM(S5P_EINT_FLTCON(0)), | ||
67 | SAVE_ITEM(S5P_EINT_FLTCON(1)), | ||
68 | SAVE_ITEM(S5P_EINT_FLTCON(2)), | ||
69 | SAVE_ITEM(S5P_EINT_FLTCON(3)), | ||
70 | SAVE_ITEM(S5P_EINT_FLTCON(4)), | ||
71 | SAVE_ITEM(S5P_EINT_FLTCON(5)), | ||
72 | SAVE_ITEM(S5P_EINT_FLTCON(6)), | ||
73 | SAVE_ITEM(S5P_EINT_FLTCON(7)), | ||
74 | |||
75 | SAVE_ITEM(S5P_EINT_MASK(0)), | ||
76 | SAVE_ITEM(S5P_EINT_MASK(1)), | ||
77 | SAVE_ITEM(S5P_EINT_MASK(2)), | ||
78 | SAVE_ITEM(S5P_EINT_MASK(3)), | ||
79 | }; | ||
80 | |||
81 | int s3c24xx_irq_suspend(void) | ||
82 | { | ||
83 | s3c_pm_do_save(eint_save, ARRAY_SIZE(eint_save)); | ||
84 | |||
85 | return 0; | ||
86 | } | ||
87 | |||
88 | void s3c24xx_irq_resume(void) | ||
89 | { | ||
90 | s3c_pm_do_restore(eint_save, ARRAY_SIZE(eint_save)); | ||
91 | } | ||
92 | |||
diff --git a/arch/arm/plat-samsung/s5p-irq.c b/arch/arm/plat-samsung/s5p-irq.c deleted file mode 100644 index ddfaca9c79d8..000000000000 --- a/arch/arm/plat-samsung/s5p-irq.c +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2009 Samsung Electronics Co., Ltd. | ||
3 | * http://www.samsung.com/ | ||
4 | * | ||
5 | * S5P - Interrupt handling | ||
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 | |||
12 | #include <linux/kernel.h> | ||
13 | #include <linux/interrupt.h> | ||
14 | #include <linux/irq.h> | ||
15 | #include <linux/io.h> | ||
16 | #include <linux/irqchip/arm-vic.h> | ||
17 | |||
18 | #include <mach/irqs.h> | ||
19 | #include <mach/map.h> | ||
20 | #include <plat/cpu.h> | ||
21 | |||
22 | void __init s5p_init_irq(u32 *vic, u32 num_vic) | ||
23 | { | ||
24 | #ifdef CONFIG_ARM_VIC | ||
25 | int irq; | ||
26 | |||
27 | /* initialize the VICs */ | ||
28 | for (irq = 0; irq < num_vic; irq++) | ||
29 | vic_init(VA_VIC(irq), VIC_BASE(irq), vic[irq], 0); | ||
30 | #endif | ||
31 | } | ||
diff --git a/arch/arm/plat-samsung/s5p-pm.c b/arch/arm/plat-samsung/s5p-pm.c deleted file mode 100644 index 0747468f0936..000000000000 --- a/arch/arm/plat-samsung/s5p-pm.c +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
3 | * http://www.samsung.com | ||
4 | * | ||
5 | * S5P Power Manager (Suspend-To-RAM) support | ||
6 | * | ||
7 | * Based on arch/arm/plat-s3c24xx/pm.c | ||
8 | * Copyright (c) 2004,2006 Simtec Electronics | ||
9 | * Ben Dooks <ben@simtec.co.uk> | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify | ||
12 | * it under the terms of the GNU General Public License version 2 as | ||
13 | * published by the Free Software Foundation. | ||
14 | */ | ||
15 | |||
16 | #include <linux/suspend.h> | ||
17 | #include <plat/pm.h> | ||
18 | |||
19 | #define PFX "s5p pm: " | ||
20 | |||
21 | /* s3c_pm_configure_extint | ||
22 | * | ||
23 | * configure all external interrupt pins | ||
24 | */ | ||
25 | |||
26 | void s3c_pm_configure_extint(void) | ||
27 | { | ||
28 | /* nothing here yet */ | ||
29 | } | ||
30 | |||
31 | void s3c_pm_restore_core(void) | ||
32 | { | ||
33 | /* nothing here yet */ | ||
34 | } | ||
35 | |||
36 | void s3c_pm_save_core(void) | ||
37 | { | ||
38 | /* nothing here yet */ | ||
39 | } | ||
40 | |||