aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2012-11-16 10:21:27 -0500
committerSascha Hauer <s.hauer@pengutronix.de>2012-11-16 10:21:27 -0500
commit89a4150331bc07014256714678ce8e9b238fc145 (patch)
tree3a0358208775f29f9e319b506ce849c5dbdc1a06 /arch
parent77b67063bb6bce6d475e910d3b886a606d0d91f7 (diff)
parent68b25325a7fd290b5e472bba0df9cbe8c1a81d8f (diff)
Merge remote-tracking branch 'arm-soc/imx/multiplatform' into x
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/Kconfig15
-rw-r--r--arch/arm/Kconfig.debug8
-rw-r--r--arch/arm/Makefile1
-rw-r--r--arch/arm/boot/dts/imx27.dtsi4
-rw-r--r--arch/arm/boot/dts/imx51.dtsi4
-rw-r--r--arch/arm/boot/dts/imx53.dtsi6
-rw-r--r--arch/arm/boot/dts/imx6q.dtsi6
-rw-r--r--arch/arm/configs/imx_v4_v5_defconfig4
-rw-r--r--arch/arm/configs/imx_v6_v7_defconfig2
-rw-r--r--arch/arm/include/debug/imx.S (renamed from arch/arm/plat-mxc/include/mach/debug-macro.S)33
-rw-r--r--arch/arm/mach-imx/3ds_debugboard.c (renamed from arch/arm/plat-mxc/3ds_debugboard.c)2
-rw-r--r--arch/arm/mach-imx/3ds_debugboard.h (renamed from arch/arm/plat-mxc/include/mach/3ds_debugboard.h)0
-rw-r--r--arch/arm/mach-imx/Kconfig90
-rw-r--r--arch/arm/mach-imx/Makefile22
-rw-r--r--arch/arm/mach-imx/avic.c (renamed from arch/arm/plat-mxc/avic.c)5
-rw-r--r--arch/arm/mach-imx/board-mx31lilly.h (renamed from arch/arm/plat-mxc/include/mach/board-mx31lilly.h)0
-rw-r--r--arch/arm/mach-imx/board-mx31lite.h (renamed from arch/arm/plat-mxc/include/mach/board-mx31lite.h)0
-rw-r--r--arch/arm/mach-imx/board-mx31moboard.h (renamed from arch/arm/plat-mxc/include/mach/board-mx31moboard.h)0
-rw-r--r--arch/arm/mach-imx/board-pcm038.h (renamed from arch/arm/plat-mxc/include/mach/board-pcm038.h)0
-rw-r--r--arch/arm/mach-imx/clk-imx1.c17
-rw-r--r--arch/arm/mach-imx/clk-imx21.c18
-rw-r--r--arch/arm/mach-imx/clk-imx25.c26
-rw-r--r--arch/arm/mach-imx/clk-imx27.c40
-rw-r--r--arch/arm/mach-imx/clk-imx31.c21
-rw-r--r--arch/arm/mach-imx/clk-imx35.c13
-rw-r--r--arch/arm/mach-imx/clk-imx51-imx53.c15
-rw-r--r--arch/arm/mach-imx/clk-imx6q.c3
-rw-r--r--arch/arm/mach-imx/clk-pllv1.c4
-rw-r--r--arch/arm/mach-imx/common.h (renamed from arch/arm/plat-mxc/include/mach/common.h)1
-rw-r--r--arch/arm/mach-imx/cpu-imx25.c5
-rw-r--r--arch/arm/mach-imx/cpu-imx27.c2
-rw-r--r--arch/arm/mach-imx/cpu-imx31.c7
-rw-r--r--arch/arm/mach-imx/cpu-imx35.c5
-rw-r--r--arch/arm/mach-imx/cpu-imx5.c3
-rw-r--r--arch/arm/mach-imx/cpu.c (renamed from arch/arm/plat-mxc/cpu.c)3
-rw-r--r--arch/arm/mach-imx/cpu_op-mx51.c3
-rw-r--r--arch/arm/mach-imx/cpufreq.c (renamed from arch/arm/plat-mxc/cpufreq.c)3
-rw-r--r--arch/arm/mach-imx/cpuidle.c (renamed from arch/arm/plat-mxc/cpuidle.c)0
-rw-r--r--arch/arm/mach-imx/cpuidle.h (renamed from arch/arm/plat-mxc/include/mach/cpuidle.h)0
-rw-r--r--arch/arm/mach-imx/devices-imx1.h3
-rw-r--r--arch/arm/mach-imx/devices-imx21.h3
-rw-r--r--arch/arm/mach-imx/devices-imx25.h3
-rw-r--r--arch/arm/mach-imx/devices-imx27.h3
-rw-r--r--arch/arm/mach-imx/devices-imx31.h3
-rw-r--r--arch/arm/mach-imx/devices-imx35.h3
-rw-r--r--arch/arm/mach-imx/devices-imx50.h3
-rw-r--r--arch/arm/mach-imx/devices-imx51.h3
-rw-r--r--arch/arm/mach-imx/devices/Kconfig (renamed from arch/arm/plat-mxc/devices/Kconfig)0
-rw-r--r--arch/arm/mach-imx/devices/Makefile (renamed from arch/arm/plat-mxc/devices/Makefile)2
-rw-r--r--arch/arm/mach-imx/devices/devices-common.h (renamed from arch/arm/plat-mxc/include/mach/devices-common.h)9
-rw-r--r--arch/arm/mach-imx/devices/devices.c (renamed from arch/arm/plat-mxc/devices.c)4
-rw-r--r--arch/arm/mach-imx/devices/platform-ahci-imx.c (renamed from arch/arm/plat-mxc/devices/platform-ahci-imx.c)5
-rw-r--r--arch/arm/mach-imx/devices/platform-fec.c (renamed from arch/arm/plat-mxc/devices/platform-fec.c)5
-rw-r--r--arch/arm/mach-imx/devices/platform-flexcan.c (renamed from arch/arm/plat-mxc/devices/platform-flexcan.c)4
-rw-r--r--arch/arm/mach-imx/devices/platform-fsl-usb2-udc.c (renamed from arch/arm/plat-mxc/devices/platform-fsl-usb2-udc.c)5
-rw-r--r--arch/arm/mach-imx/devices/platform-gpio-mxc.c (renamed from arch/arm/plat-mxc/devices/platform-gpio-mxc.c)2
-rw-r--r--arch/arm/mach-imx/devices/platform-gpio_keys.c (renamed from arch/arm/plat-mxc/devices/platform-gpio_keys.c)5
-rw-r--r--arch/arm/mach-imx/devices/platform-imx-dma.c (renamed from arch/arm/plat-mxc/devices/platform-imx-dma.c)23
-rw-r--r--arch/arm/mach-imx/devices/platform-imx-fb.c (renamed from arch/arm/plat-mxc/devices/platform-imx-fb.c)16
-rw-r--r--arch/arm/mach-imx/devices/platform-imx-i2c.c (renamed from arch/arm/plat-mxc/devices/platform-imx-i2c.c)32
-rw-r--r--arch/arm/mach-imx/devices/platform-imx-keypad.c (renamed from arch/arm/plat-mxc/devices/platform-imx-keypad.c)4
-rw-r--r--arch/arm/mach-imx/devices/platform-imx-ssi.c (renamed from arch/arm/plat-mxc/devices/platform-imx-ssi.c)4
-rw-r--r--arch/arm/mach-imx/devices/platform-imx-uart.c (renamed from arch/arm/plat-mxc/devices/platform-imx-uart.c)4
-rw-r--r--arch/arm/mach-imx/devices/platform-imx2-wdt.c (renamed from arch/arm/plat-mxc/devices/platform-imx2-wdt.c)5
-rw-r--r--arch/arm/mach-imx/devices/platform-imx21-hcd.c (renamed from arch/arm/plat-mxc/devices/platform-imx21-hcd.c)4
-rw-r--r--arch/arm/mach-imx/devices/platform-imx27-coda.c (renamed from arch/arm/plat-mxc/devices/platform-imx27-coda.c)4
-rw-r--r--arch/arm/mach-imx/devices/platform-imx_udc.c (renamed from arch/arm/plat-mxc/devices/platform-imx_udc.c)4
-rw-r--r--arch/arm/mach-imx/devices/platform-imxdi_rtc.c (renamed from arch/arm/plat-mxc/devices/platform-imxdi_rtc.c)5
-rw-r--r--arch/arm/mach-imx/devices/platform-ipu-core.c (renamed from arch/arm/plat-mxc/devices/platform-ipu-core.c)5
-rw-r--r--arch/arm/mach-imx/devices/platform-mx1-camera.c (renamed from arch/arm/plat-mxc/devices/platform-mx1-camera.c)4
-rw-r--r--arch/arm/mach-imx/devices/platform-mx2-camera.c (renamed from arch/arm/plat-mxc/devices/platform-mx2-camera.c)16
-rw-r--r--arch/arm/mach-imx/devices/platform-mxc-ehci.c (renamed from arch/arm/plat-mxc/devices/platform-mxc-ehci.c)5
-rw-r--r--arch/arm/mach-imx/devices/platform-mxc-mmc.c (renamed from arch/arm/plat-mxc/devices/platform-mxc-mmc.c)20
-rw-r--r--arch/arm/mach-imx/devices/platform-mxc_nand.c (renamed from arch/arm/plat-mxc/devices/platform-mxc_nand.c)25
-rw-r--r--arch/arm/mach-imx/devices/platform-mxc_pwm.c (renamed from arch/arm/plat-mxc/devices/platform-mxc_pwm.c)4
-rw-r--r--arch/arm/mach-imx/devices/platform-mxc_rnga.c (renamed from arch/arm/plat-mxc/devices/platform-mxc_rnga.c)4
-rw-r--r--arch/arm/mach-imx/devices/platform-mxc_rtc.c (renamed from arch/arm/plat-mxc/devices/platform-mxc_rtc.c)13
-rw-r--r--arch/arm/mach-imx/devices/platform-mxc_w1.c (renamed from arch/arm/plat-mxc/devices/platform-mxc_w1.c)4
-rw-r--r--arch/arm/mach-imx/devices/platform-pata_imx.c (renamed from arch/arm/plat-mxc/devices/platform-pata_imx.c)4
-rw-r--r--arch/arm/mach-imx/devices/platform-sdhci-esdhc-imx.c (renamed from arch/arm/plat-mxc/devices/platform-sdhci-esdhc-imx.c)5
-rw-r--r--arch/arm/mach-imx/devices/platform-spi_imx.c (renamed from arch/arm/plat-mxc/devices/platform-spi_imx.c)4
-rw-r--r--arch/arm/mach-imx/ehci-imx25.c4
-rw-r--r--arch/arm/mach-imx/ehci-imx27.c4
-rw-r--r--arch/arm/mach-imx/ehci-imx31.c4
-rw-r--r--arch/arm/mach-imx/ehci-imx35.c4
-rw-r--r--arch/arm/mach-imx/ehci-imx5.c4
-rw-r--r--arch/arm/mach-imx/epit.c (renamed from arch/arm/plat-mxc/epit.c)6
-rw-r--r--arch/arm/mach-imx/eukrea-baseboards.h (renamed from arch/arm/plat-mxc/include/mach/eukrea-baseboards.h)0
-rw-r--r--arch/arm/mach-imx/eukrea_mbimx27-baseboard.c7
-rw-r--r--arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c8
-rw-r--r--arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c7
-rw-r--r--arch/arm/mach-imx/eukrea_mbimxsd51-baseboard.c7
-rw-r--r--arch/arm/mach-imx/hardware.h (renamed from arch/arm/plat-mxc/include/mach/hardware.h)26
-rw-r--r--arch/arm/mach-imx/hotplug.c3
-rw-r--r--arch/arm/mach-imx/iim.h (renamed from arch/arm/plat-mxc/include/mach/iim.h)0
-rw-r--r--arch/arm/mach-imx/imx27-dt.c11
-rw-r--r--arch/arm/mach-imx/imx31-dt.c5
-rw-r--r--arch/arm/mach-imx/imx51-dt.c9
-rw-r--r--arch/arm/mach-imx/include/mach/dma-mx1-mx2.h10
-rw-r--r--arch/arm/mach-imx/iomux-imx31.c5
-rw-r--r--arch/arm/mach-imx/iomux-mx1.h (renamed from arch/arm/plat-mxc/include/mach/iomux-mx1.h)2
-rw-r--r--arch/arm/mach-imx/iomux-mx21.h (renamed from arch/arm/plat-mxc/include/mach/iomux-mx21.h)4
-rw-r--r--arch/arm/mach-imx/iomux-mx25.h (renamed from arch/arm/plat-mxc/include/mach/iomux-mx25.h)2
-rw-r--r--arch/arm/mach-imx/iomux-mx27.h (renamed from arch/arm/plat-mxc/include/mach/iomux-mx27.h)4
-rw-r--r--arch/arm/mach-imx/iomux-mx2x.h (renamed from arch/arm/plat-mxc/include/mach/iomux-mx2x.h)0
-rw-r--r--arch/arm/mach-imx/iomux-mx3.h (renamed from arch/arm/plat-mxc/include/mach/iomux-mx3.h)0
-rw-r--r--arch/arm/mach-imx/iomux-mx35.h (renamed from arch/arm/plat-mxc/include/mach/iomux-mx35.h)2
-rw-r--r--arch/arm/mach-imx/iomux-mx50.h (renamed from arch/arm/plat-mxc/include/mach/iomux-mx50.h)2
-rw-r--r--arch/arm/mach-imx/iomux-mx51.h (renamed from arch/arm/plat-mxc/include/mach/iomux-mx51.h)2
-rw-r--r--arch/arm/mach-imx/iomux-v1.c (renamed from arch/arm/plat-mxc/iomux-v1.c)5
-rw-r--r--arch/arm/mach-imx/iomux-v1.h (renamed from arch/arm/plat-mxc/include/mach/iomux-v1.h)0
-rw-r--r--arch/arm/mach-imx/iomux-v3.c (renamed from arch/arm/plat-mxc/iomux-v3.c)5
-rw-r--r--arch/arm/mach-imx/iomux-v3.h (renamed from arch/arm/plat-mxc/include/mach/iomux-v3.h)0
-rw-r--r--arch/arm/mach-imx/iram.h (renamed from arch/arm/plat-mxc/include/mach/iram.h)0
-rw-r--r--arch/arm/mach-imx/iram_alloc.c (renamed from arch/arm/plat-mxc/iram_alloc.c)3
-rw-r--r--arch/arm/mach-imx/irq-common.c (renamed from arch/arm/plat-mxc/irq-common.c)0
-rw-r--r--arch/arm/mach-imx/irq-common.h (renamed from arch/arm/plat-mxc/irq-common.h)3
-rw-r--r--arch/arm/mach-imx/lluart.c3
-rw-r--r--arch/arm/mach-imx/mach-apf9328.c7
-rw-r--r--arch/arm/mach-imx/mach-armadillo5x0.c9
-rw-r--r--arch/arm/mach-imx/mach-bug.c7
-rw-r--r--arch/arm/mach-imx/mach-cpuimx27.c11
-rw-r--r--arch/arm/mach-imx/mach-cpuimx35.c9
-rw-r--r--arch/arm/mach-imx/mach-cpuimx51sd.c9
-rw-r--r--arch/arm/mach-imx/mach-eukrea_cpuimx25.c10
-rw-r--r--arch/arm/mach-imx/mach-imx27_visstrim_m10.c6
-rw-r--r--arch/arm/mach-imx/mach-imx27ipcam.c6
-rw-r--r--arch/arm/mach-imx/mach-imx27lite.c6
-rw-r--r--arch/arm/mach-imx/mach-imx53.c11
-rw-r--r--arch/arm/mach-imx/mach-imx6q.c6
-rw-r--r--arch/arm/mach-imx/mach-kzm_arm11_01.c7
-rw-r--r--arch/arm/mach-imx/mach-mx1ads.c7
-rw-r--r--arch/arm/mach-imx/mach-mx21ads.c6
-rw-r--r--arch/arm/mach-imx/mach-mx25_3ds.c8
-rw-r--r--arch/arm/mach-imx/mach-mx27_3ds.c10
-rw-r--r--arch/arm/mach-imx/mach-mx27ads.c6
-rw-r--r--arch/arm/mach-imx/mach-mx31_3ds.c12
-rw-r--r--arch/arm/mach-imx/mach-mx31ads.c5
-rw-r--r--arch/arm/mach-imx/mach-mx31lilly.c11
-rw-r--r--arch/arm/mach-imx/mach-mx31lite.c11
-rw-r--r--arch/arm/mach-imx/mach-mx31moboard.c14
-rw-r--r--arch/arm/mach-imx/mach-mx35_3ds.c8
-rw-r--r--arch/arm/mach-imx/mach-mx50_rdp.c7
-rw-r--r--arch/arm/mach-imx/mach-mx51_3ds.c9
-rw-r--r--arch/arm/mach-imx/mach-mx51_babbage.c7
-rw-r--r--arch/arm/mach-imx/mach-mxt_td60.c6
-rw-r--r--arch/arm/mach-imx/mach-pca100.c8
-rw-r--r--arch/arm/mach-imx/mach-pcm037.c8
-rw-r--r--arch/arm/mach-imx/mach-pcm037_eet.c5
-rw-r--r--arch/arm/mach-imx/mach-pcm038.c13
-rw-r--r--arch/arm/mach-imx/mach-pcm043.c9
-rw-r--r--arch/arm/mach-imx/mach-qong.c6
-rw-r--r--arch/arm/mach-imx/mach-scb9328.c7
-rw-r--r--arch/arm/mach-imx/mach-vpr200.c7
-rw-r--r--arch/arm/mach-imx/mm-imx1.c9
-rw-r--r--arch/arm/mach-imx/mm-imx21.c14
-rw-r--r--arch/arm/mach-imx/mm-imx25.c12
-rw-r--r--arch/arm/mach-imx/mm-imx27.c14
-rw-r--r--arch/arm/mach-imx/mm-imx3.c13
-rw-r--r--arch/arm/mach-imx/mm-imx5.c12
-rw-r--r--arch/arm/mach-imx/mx1.h (renamed from arch/arm/plat-mxc/include/mach/mx1.h)0
-rw-r--r--arch/arm/mach-imx/mx21.h (renamed from arch/arm/plat-mxc/include/mach/mx21.h)0
-rw-r--r--arch/arm/mach-imx/mx25.h (renamed from arch/arm/plat-mxc/include/mach/mx25.h)0
-rw-r--r--arch/arm/mach-imx/mx27.h (renamed from arch/arm/plat-mxc/include/mach/mx27.h)0
-rw-r--r--arch/arm/mach-imx/mx2x.h (renamed from arch/arm/plat-mxc/include/mach/mx2x.h)0
-rw-r--r--arch/arm/mach-imx/mx31.h (renamed from arch/arm/plat-mxc/include/mach/mx31.h)0
-rw-r--r--arch/arm/mach-imx/mx31lilly-db.c9
-rw-r--r--arch/arm/mach-imx/mx31lite-db.c9
-rw-r--r--arch/arm/mach-imx/mx31moboard-devboard.c9
-rw-r--r--arch/arm/mach-imx/mx31moboard-marxbot.c9
-rw-r--r--arch/arm/mach-imx/mx31moboard-smartbot.c11
-rw-r--r--arch/arm/mach-imx/mx35.h (renamed from arch/arm/plat-mxc/include/mach/mx35.h)0
-rw-r--r--arch/arm/mach-imx/mx3x.h (renamed from arch/arm/plat-mxc/include/mach/mx3x.h)0
-rw-r--r--arch/arm/mach-imx/mx50.h (renamed from arch/arm/plat-mxc/include/mach/mx50.h)0
-rw-r--r--arch/arm/mach-imx/mx51.h (renamed from arch/arm/plat-mxc/include/mach/mx51.h)0
-rw-r--r--arch/arm/mach-imx/mx53.h (renamed from arch/arm/plat-mxc/include/mach/mx53.h)0
-rw-r--r--arch/arm/mach-imx/mx6q.h (renamed from arch/arm/plat-mxc/include/mach/mx6q.h)0
-rw-r--r--arch/arm/mach-imx/mxc.h (renamed from arch/arm/plat-mxc/include/mach/mxc.h)0
-rw-r--r--arch/arm/mach-imx/pcm970-baseboard.c7
-rw-r--r--arch/arm/mach-imx/platsmp.c5
-rw-r--r--arch/arm/mach-imx/pm-imx27.c3
-rw-r--r--arch/arm/mach-imx/pm-imx3.c7
-rw-r--r--arch/arm/mach-imx/pm-imx5.c7
-rw-r--r--arch/arm/mach-imx/pm-imx6q.c5
-rw-r--r--arch/arm/mach-imx/ssi-fiq-ksym.c (renamed from arch/arm/plat-mxc/ssi-fiq-ksym.c)0
-rw-r--r--arch/arm/mach-imx/ssi-fiq.S (renamed from arch/arm/plat-mxc/ssi-fiq.S)0
-rw-r--r--arch/arm/mach-imx/system.c (renamed from arch/arm/plat-mxc/system.c)5
-rw-r--r--arch/arm/mach-imx/time.c (renamed from arch/arm/plat-mxc/time.c)5
-rw-r--r--arch/arm/mach-imx/tzic.c (renamed from arch/arm/plat-mxc/tzic.c)6
-rw-r--r--arch/arm/mach-imx/ulpi.c (renamed from arch/arm/plat-mxc/ulpi.c)2
-rw-r--r--arch/arm/mach-imx/ulpi.h (renamed from arch/arm/plat-mxc/include/mach/ulpi.h)0
-rw-r--r--arch/arm/plat-mxc/Kconfig89
-rw-r--r--arch/arm/plat-mxc/Makefile24
-rw-r--r--arch/arm/plat-mxc/include/mach/ipu.h177
-rw-r--r--arch/arm/plat-mxc/include/mach/irqs.h21
-rw-r--r--arch/arm/plat-mxc/include/mach/timex.h22
-rw-r--r--arch/arm/plat-mxc/include/mach/uncompress.h132
197 files changed, 731 insertions, 1036 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index ade7e924bef5..f0430deae197 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -433,19 +433,6 @@ config ARCH_FOOTBRIDGE
433 Support for systems based on the DC21285 companion chip 433 Support for systems based on the DC21285 companion chip
434 ("FootBridge"), such as the Simtec CATS and the Rebel NetWinder. 434 ("FootBridge"), such as the Simtec CATS and the Rebel NetWinder.
435 435
436config ARCH_MXC
437 bool "Freescale MXC/iMX-based"
438 select ARCH_REQUIRE_GPIOLIB
439 select CLKDEV_LOOKUP
440 select CLKSRC_MMIO
441 select GENERIC_CLOCKEVENTS
442 select GENERIC_IRQ_CHIP
443 select MULTI_IRQ_HANDLER
444 select SPARSE_IRQ
445 select USE_OF
446 help
447 Support for Freescale MXC/iMX-based family of processors
448
449config ARCH_MXS 436config ARCH_MXS
450 bool "Freescale MXS-based" 437 bool "Freescale MXS-based"
451 select ARCH_REQUIRE_GPIOLIB 438 select ARCH_REQUIRE_GPIOLIB
@@ -1058,7 +1045,7 @@ source "arch/arm/mach-msm/Kconfig"
1058 1045
1059source "arch/arm/mach-mv78xx0/Kconfig" 1046source "arch/arm/mach-mv78xx0/Kconfig"
1060 1047
1061source "arch/arm/plat-mxc/Kconfig" 1048source "arch/arm/mach-imx/Kconfig"
1062 1049
1063source "arch/arm/mach-mxs/Kconfig" 1050source "arch/arm/mach-mxs/Kconfig"
1064 1051
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index b0f3857b3a4c..5566520686a5 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -412,6 +412,14 @@ endchoice
412config DEBUG_LL_INCLUDE 412config DEBUG_LL_INCLUDE
413 string 413 string
414 default "debug/icedcc.S" if DEBUG_ICEDCC 414 default "debug/icedcc.S" if DEBUG_ICEDCC
415 default "debug/imx.S" if DEBUG_IMX1_UART || \
416 DEBUG_IMX25_UART || \
417 DEBUG_IMX21_IMX27_UART || \
418 DEBUG_IMX31_IMX35_UART || \
419 DEBUG_IMX51_UART || \
420 DEBUG_IMX50_IMX53_UART ||\
421 DEBUG_IMX6Q_UART2 || \
422 DEBUG_IMX6Q_UART4
415 default "debug/highbank.S" if DEBUG_HIGHBANK_UART 423 default "debug/highbank.S" if DEBUG_HIGHBANK_UART
416 default "debug/mvebu.S" if DEBUG_MVEBU_UART 424 default "debug/mvebu.S" if DEBUG_MVEBU_UART
417 default "debug/picoxcell.S" if DEBUG_PICOXCELL_UART 425 default "debug/picoxcell.S" if DEBUG_PICOXCELL_UART
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 5f914fca911b..3353b7613208 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -196,7 +196,6 @@ machine-$(CONFIG_ARCH_ZYNQ) += zynq
196 196
197# Platform directory name. This list is sorted alphanumerically 197# Platform directory name. This list is sorted alphanumerically
198# by CONFIG_* macro name. 198# by CONFIG_* macro name.
199plat-$(CONFIG_ARCH_MXC) += mxc
200plat-$(CONFIG_ARCH_OMAP) += omap 199plat-$(CONFIG_ARCH_OMAP) += omap
201plat-$(CONFIG_ARCH_S3C64XX) += samsung 200plat-$(CONFIG_ARCH_S3C64XX) += samsung
202plat-$(CONFIG_ARCH_ZYNQ) += versatile 201plat-$(CONFIG_ARCH_ZYNQ) += versatile
diff --git a/arch/arm/boot/dts/imx27.dtsi b/arch/arm/boot/dts/imx27.dtsi
index 3e54f1498841..67d672792b0d 100644
--- a/arch/arm/boot/dts/imx27.dtsi
+++ b/arch/arm/boot/dts/imx27.dtsi
@@ -113,7 +113,7 @@
113 i2c1: i2c@10012000 { 113 i2c1: i2c@10012000 {
114 #address-cells = <1>; 114 #address-cells = <1>;
115 #size-cells = <0>; 115 #size-cells = <0>;
116 compatible = "fsl,imx27-i2c", "fsl,imx1-i2c"; 116 compatible = "fsl,imx27-i2c", "fsl,imx21-i2c";
117 reg = <0x10012000 0x1000>; 117 reg = <0x10012000 0x1000>;
118 interrupts = <12>; 118 interrupts = <12>;
119 status = "disabled"; 119 status = "disabled";
@@ -205,7 +205,7 @@
205 i2c2: i2c@1001d000 { 205 i2c2: i2c@1001d000 {
206 #address-cells = <1>; 206 #address-cells = <1>;
207 #size-cells = <0>; 207 #size-cells = <0>;
208 compatible = "fsl,imx27-i2c", "fsl,imx1-i2c"; 208 compatible = "fsl,imx27-i2c", "fsl,imx21-i2c";
209 reg = <0x1001d000 0x1000>; 209 reg = <0x1001d000 0x1000>;
210 interrupts = <1>; 210 interrupts = <1>;
211 status = "disabled"; 211 status = "disabled";
diff --git a/arch/arm/boot/dts/imx51.dtsi b/arch/arm/boot/dts/imx51.dtsi
index 75d069fcf897..54aea74769a1 100644
--- a/arch/arm/boot/dts/imx51.dtsi
+++ b/arch/arm/boot/dts/imx51.dtsi
@@ -377,7 +377,7 @@
377 i2c@83fc4000 { /* I2C2 */ 377 i2c@83fc4000 { /* I2C2 */
378 #address-cells = <1>; 378 #address-cells = <1>;
379 #size-cells = <0>; 379 #size-cells = <0>;
380 compatible = "fsl,imx51-i2c", "fsl,imx1-i2c"; 380 compatible = "fsl,imx51-i2c", "fsl,imx21-i2c";
381 reg = <0x83fc4000 0x4000>; 381 reg = <0x83fc4000 0x4000>;
382 interrupts = <63>; 382 interrupts = <63>;
383 status = "disabled"; 383 status = "disabled";
@@ -386,7 +386,7 @@
386 i2c@83fc8000 { /* I2C1 */ 386 i2c@83fc8000 { /* I2C1 */
387 #address-cells = <1>; 387 #address-cells = <1>;
388 #size-cells = <0>; 388 #size-cells = <0>;
389 compatible = "fsl,imx51-i2c", "fsl,imx1-i2c"; 389 compatible = "fsl,imx51-i2c", "fsl,imx21-i2c";
390 reg = <0x83fc8000 0x4000>; 390 reg = <0x83fc8000 0x4000>;
391 interrupts = <62>; 391 interrupts = <62>;
392 status = "disabled"; 392 status = "disabled";
diff --git a/arch/arm/boot/dts/imx53.dtsi b/arch/arm/boot/dts/imx53.dtsi
index 76ebb1ad2675..caf09ff73f10 100644
--- a/arch/arm/boot/dts/imx53.dtsi
+++ b/arch/arm/boot/dts/imx53.dtsi
@@ -432,7 +432,7 @@
432 i2c@53fec000 { /* I2C3 */ 432 i2c@53fec000 { /* I2C3 */
433 #address-cells = <1>; 433 #address-cells = <1>;
434 #size-cells = <0>; 434 #size-cells = <0>;
435 compatible = "fsl,imx53-i2c", "fsl,imx1-i2c"; 435 compatible = "fsl,imx53-i2c", "fsl,imx21-i2c";
436 reg = <0x53fec000 0x4000>; 436 reg = <0x53fec000 0x4000>;
437 interrupts = <64>; 437 interrupts = <64>;
438 status = "disabled"; 438 status = "disabled";
@@ -488,7 +488,7 @@
488 i2c@63fc4000 { /* I2C2 */ 488 i2c@63fc4000 { /* I2C2 */
489 #address-cells = <1>; 489 #address-cells = <1>;
490 #size-cells = <0>; 490 #size-cells = <0>;
491 compatible = "fsl,imx53-i2c", "fsl,imx1-i2c"; 491 compatible = "fsl,imx53-i2c", "fsl,imx21-i2c";
492 reg = <0x63fc4000 0x4000>; 492 reg = <0x63fc4000 0x4000>;
493 interrupts = <63>; 493 interrupts = <63>;
494 status = "disabled"; 494 status = "disabled";
@@ -497,7 +497,7 @@
497 i2c@63fc8000 { /* I2C1 */ 497 i2c@63fc8000 { /* I2C1 */
498 #address-cells = <1>; 498 #address-cells = <1>;
499 #size-cells = <0>; 499 #size-cells = <0>;
500 compatible = "fsl,imx53-i2c", "fsl,imx1-i2c"; 500 compatible = "fsl,imx53-i2c", "fsl,imx21-i2c";
501 reg = <0x63fc8000 0x4000>; 501 reg = <0x63fc8000 0x4000>;
502 interrupts = <62>; 502 interrupts = <62>;
503 status = "disabled"; 503 status = "disabled";
diff --git a/arch/arm/boot/dts/imx6q.dtsi b/arch/arm/boot/dts/imx6q.dtsi
index f3990b04fecf..f604a44a5c66 100644
--- a/arch/arm/boot/dts/imx6q.dtsi
+++ b/arch/arm/boot/dts/imx6q.dtsi
@@ -882,7 +882,7 @@
882 i2c@021a0000 { /* I2C1 */ 882 i2c@021a0000 { /* I2C1 */
883 #address-cells = <1>; 883 #address-cells = <1>;
884 #size-cells = <0>; 884 #size-cells = <0>;
885 compatible = "fsl,imx6q-i2c", "fsl,imx1-i2c"; 885 compatible = "fsl,imx6q-i2c", "fsl,imx21-i2c";
886 reg = <0x021a0000 0x4000>; 886 reg = <0x021a0000 0x4000>;
887 interrupts = <0 36 0x04>; 887 interrupts = <0 36 0x04>;
888 clocks = <&clks 125>; 888 clocks = <&clks 125>;
@@ -892,7 +892,7 @@
892 i2c@021a4000 { /* I2C2 */ 892 i2c@021a4000 { /* I2C2 */
893 #address-cells = <1>; 893 #address-cells = <1>;
894 #size-cells = <0>; 894 #size-cells = <0>;
895 compatible = "fsl,imx6q-i2c", "fsl,imx1-i2c"; 895 compatible = "fsl,imx6q-i2c", "fsl,imx21-i2c";
896 reg = <0x021a4000 0x4000>; 896 reg = <0x021a4000 0x4000>;
897 interrupts = <0 37 0x04>; 897 interrupts = <0 37 0x04>;
898 clocks = <&clks 126>; 898 clocks = <&clks 126>;
@@ -902,7 +902,7 @@
902 i2c@021a8000 { /* I2C3 */ 902 i2c@021a8000 { /* I2C3 */
903 #address-cells = <1>; 903 #address-cells = <1>;
904 #size-cells = <0>; 904 #size-cells = <0>;
905 compatible = "fsl,imx6q-i2c", "fsl,imx1-i2c"; 905 compatible = "fsl,imx6q-i2c", "fsl,imx21-i2c";
906 reg = <0x021a8000 0x4000>; 906 reg = <0x021a8000 0x4000>;
907 interrupts = <0 38 0x04>; 907 interrupts = <0 38 0x04>;
908 clocks = <&clks 127>; 908 clocks = <&clks 127>;
diff --git a/arch/arm/configs/imx_v4_v5_defconfig b/arch/arm/configs/imx_v4_v5_defconfig
index 78ed575feb1a..f71302c3ac33 100644
--- a/arch/arm/configs/imx_v4_v5_defconfig
+++ b/arch/arm/configs/imx_v4_v5_defconfig
@@ -18,7 +18,9 @@ CONFIG_MODULE_UNLOAD=y
18# CONFIG_IOSCHED_DEADLINE is not set 18# CONFIG_IOSCHED_DEADLINE is not set
19# CONFIG_IOSCHED_CFQ is not set 19# CONFIG_IOSCHED_CFQ is not set
20CONFIG_ARCH_MXC=y 20CONFIG_ARCH_MXC=y
21CONFIG_ARCH_IMX_V4_V5=y 21CONFIG_ARCH_MULTI_V4T=y
22CONFIG_ARCH_MULTI_V5=y
23# CONFIG_ARCH_MULTI_V7 is not set
22CONFIG_ARCH_MX1ADS=y 24CONFIG_ARCH_MX1ADS=y
23CONFIG_MACH_SCB9328=y 25CONFIG_MACH_SCB9328=y
24CONFIG_MACH_APF9328=y 26CONFIG_MACH_APF9328=y
diff --git a/arch/arm/configs/imx_v6_v7_defconfig b/arch/arm/configs/imx_v6_v7_defconfig
index 394ded624e37..44f117aab52c 100644
--- a/arch/arm/configs/imx_v6_v7_defconfig
+++ b/arch/arm/configs/imx_v6_v7_defconfig
@@ -17,6 +17,8 @@ CONFIG_MODVERSIONS=y
17CONFIG_MODULE_SRCVERSION_ALL=y 17CONFIG_MODULE_SRCVERSION_ALL=y
18# CONFIG_BLK_DEV_BSG is not set 18# CONFIG_BLK_DEV_BSG is not set
19CONFIG_ARCH_MXC=y 19CONFIG_ARCH_MXC=y
20CONFIG_ARCH_MULTI_V6=y
21CONFIG_ARCH_MULTI_V7=y
20CONFIG_MACH_MX31LILLY=y 22CONFIG_MACH_MX31LILLY=y
21CONFIG_MACH_MX31LITE=y 23CONFIG_MACH_MX31LITE=y
22CONFIG_MACH_PCM037=y 24CONFIG_MACH_PCM037=y
diff --git a/arch/arm/plat-mxc/include/mach/debug-macro.S b/arch/arm/include/debug/imx.S
index 761e45f9456f..0b65d792f664 100644
--- a/arch/arm/plat-mxc/include/mach/debug-macro.S
+++ b/arch/arm/include/debug/imx.S
@@ -10,27 +10,38 @@
10 * published by the Free Software Foundation. 10 * published by the Free Software Foundation.
11 * 11 *
12 */ 12 */
13#include <mach/hardware.h>
14
15#ifdef CONFIG_DEBUG_IMX1_UART 13#ifdef CONFIG_DEBUG_IMX1_UART
16#define UART_PADDR MX1_UART1_BASE_ADDR 14#define UART_PADDR 0x00206000
17#elif defined (CONFIG_DEBUG_IMX25_UART) 15#elif defined (CONFIG_DEBUG_IMX25_UART)
18#define UART_PADDR MX25_UART1_BASE_ADDR 16#define UART_PADDR 0x43f90000
19#elif defined (CONFIG_DEBUG_IMX21_IMX27_UART) 17#elif defined (CONFIG_DEBUG_IMX21_IMX27_UART)
20#define UART_PADDR MX2x_UART1_BASE_ADDR 18#define UART_PADDR 0x1000a000
21#elif defined (CONFIG_DEBUG_IMX31_IMX35_UART) 19#elif defined (CONFIG_DEBUG_IMX31_IMX35_UART)
22#define UART_PADDR MX3x_UART1_BASE_ADDR 20#define UART_PADDR 0x43f90000
23#elif defined (CONFIG_DEBUG_IMX51_UART) 21#elif defined (CONFIG_DEBUG_IMX51_UART)
24#define UART_PADDR MX51_UART1_BASE_ADDR 22#define UART_PADDR 0x73fbc000
25#elif defined (CONFIG_DEBUG_IMX50_IMX53_UART) 23#elif defined (CONFIG_DEBUG_IMX50_IMX53_UART)
26#define UART_PADDR MX53_UART1_BASE_ADDR 24#define UART_PADDR 0x53fbc000
27#elif defined (CONFIG_DEBUG_IMX6Q_UART2) 25#elif defined (CONFIG_DEBUG_IMX6Q_UART2)
28#define UART_PADDR MX6Q_UART2_BASE_ADDR 26#define UART_PADDR 0x021e8000
29#elif defined (CONFIG_DEBUG_IMX6Q_UART4) 27#elif defined (CONFIG_DEBUG_IMX6Q_UART4)
30#define UART_PADDR MX6Q_UART4_BASE_ADDR 28#define UART_PADDR 0x021f0000
31#endif 29#endif
32 30
33#define UART_VADDR IMX_IO_ADDRESS(UART_PADDR) 31/*
32 * FIXME: This is a copy of IMX_IO_P2V in hardware.h, and needs to
33 * stay sync with that. It's hard to maintain, and should be fixed
34 * globally for multi-platform build to use a fixed virtual address
35 * for low-level debug uart port across platforms.
36 */
37#define IMX_IO_P2V(x) ( \
38 (((x) & 0x80000000) >> 7) | \
39 (0xf4000000 + \
40 (((x) & 0x50000000) >> 6) + \
41 (((x) & 0x0b000000) >> 4) + \
42 (((x) & 0x000fffff))))
43
44#define UART_VADDR IMX_IO_P2V(UART_PADDR)
34 45
35 .macro addruart, rp, rv, tmp 46 .macro addruart, rp, rv, tmp
36 ldr \rp, =UART_PADDR @ physical 47 ldr \rp, =UART_PADDR @ physical
diff --git a/arch/arm/plat-mxc/3ds_debugboard.c b/arch/arm/mach-imx/3ds_debugboard.c
index 5c10ad05df74..134377352966 100644
--- a/arch/arm/plat-mxc/3ds_debugboard.c
+++ b/arch/arm/mach-imx/3ds_debugboard.c
@@ -21,7 +21,7 @@
21#include <linux/regulator/machine.h> 21#include <linux/regulator/machine.h>
22#include <linux/regulator/fixed.h> 22#include <linux/regulator/fixed.h>
23 23
24#include <mach/hardware.h> 24#include "hardware.h"
25 25
26/* LAN9217 ethernet base address */ 26/* LAN9217 ethernet base address */
27#define LAN9217_BASE_ADDR(n) (n + 0x0) 27#define LAN9217_BASE_ADDR(n) (n + 0x0)
diff --git a/arch/arm/plat-mxc/include/mach/3ds_debugboard.h b/arch/arm/mach-imx/3ds_debugboard.h
index 9fd6cb3f8fad..9fd6cb3f8fad 100644
--- a/arch/arm/plat-mxc/include/mach/3ds_debugboard.h
+++ b/arch/arm/mach-imx/3ds_debugboard.h
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index 8d276584650e..f1bf610e2900 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -1,3 +1,70 @@
1config ARCH_MXC
2 bool "Freescale i.MX family" if ARCH_MULTI_V4_V5 || ARCH_MULTI_V6_V7
3 select ARCH_REQUIRE_GPIOLIB
4 select ARM_PATCH_PHYS_VIRT
5 select AUTO_ZRELADDR if !ZBOOT_ROM
6 select CLKDEV_LOOKUP
7 select CLKSRC_MMIO
8 select GENERIC_CLOCKEVENTS
9 select GENERIC_IRQ_CHIP
10 select MULTI_IRQ_HANDLER
11 select SPARSE_IRQ
12 select USE_OF
13 help
14 Support for Freescale MXC/iMX-based family of processors
15
16menu "Freescale i.MX support"
17 depends on ARCH_MXC
18
19config MXC_IRQ_PRIOR
20 bool "Use IRQ priority"
21 help
22 Select this if you want to use prioritized IRQ handling.
23 This feature prevents higher priority ISR to be interrupted
24 by lower priority IRQ even IRQF_DISABLED flag is not set.
25 This may be useful in embedded applications, where are strong
26 requirements for timing.
27 Say N here, unless you have a specialized requirement.
28
29config MXC_TZIC
30 bool
31
32config MXC_AVIC
33 bool
34
35config MXC_DEBUG_BOARD
36 bool "Enable MXC debug board(for 3-stack)"
37 help
38 The debug board is an integral part of the MXC 3-stack(PDK)
39 platforms, it can be attached or removed from the peripheral
40 board. On debug board, several debug devices(ethernet, UART,
41 buttons, LEDs and JTAG) are implemented. Between the MCU and
42 these devices, a CPLD is added as a bridge which performs
43 data/address de-multiplexing and decode, signal level shift,
44 interrupt control and various board functions.
45
46config HAVE_EPIT
47 bool
48
49config MXC_USE_EPIT
50 bool "Use EPIT instead of GPT"
51 depends on HAVE_EPIT
52 help
53 Use EPIT as the system timer on systems that have it. Normally you
54 don't have a reason to do so as the EPIT has the same features and
55 uses the same clocks as the GPT. Anyway, on some systems the GPT
56 may be in use for other purposes.
57
58config MXC_ULPI
59 bool
60
61config ARCH_HAS_RNGA
62 bool
63
64config IRAM_ALLOC
65 bool
66 select GENERIC_ALLOCATOR
67
1config HAVE_IMX_GPC 68config HAVE_IMX_GPC
2 bool 69 bool
3 70
@@ -5,6 +72,12 @@ config HAVE_IMX_MMDC
5 bool 72 bool
6 73
7config HAVE_IMX_SRC 74config HAVE_IMX_SRC
75 def_bool y if SMP
76
77config IMX_HAVE_IOMUX_V1
78 bool
79
80config ARCH_MXC_IOMUX_V3
8 bool 81 bool
9 82
10config ARCH_MX1 83config ARCH_MX1
@@ -104,7 +177,7 @@ config SOC_IMX51
104 select PINCTRL_IMX51 177 select PINCTRL_IMX51
105 select SOC_IMX5 178 select SOC_IMX5
106 179
107if ARCH_IMX_V4_V5 180if ARCH_MULTI_V4T
108 181
109comment "MX1 platforms:" 182comment "MX1 platforms:"
110config MACH_MXLADS 183config MACH_MXLADS
@@ -133,6 +206,10 @@ config MACH_APF9328
133 help 206 help
134 Say Yes here if you are using the Armadeus APF9328 development board 207 Say Yes here if you are using the Armadeus APF9328 development board
135 208
209endif
210
211if ARCH_MULTI_V5
212
136comment "MX21 platforms:" 213comment "MX21 platforms:"
137 214
138config MACH_MX21ADS 215config MACH_MX21ADS
@@ -384,7 +461,7 @@ config MACH_IMX27_DT
384 461
385endif 462endif
386 463
387if ARCH_IMX_V6_V7 464if ARCH_MULTI_V6
388 465
389comment "MX31 platforms:" 466comment "MX31 platforms:"
390 467
@@ -649,6 +726,10 @@ config MACH_VPR200
649 Include support for VPR200 platform. This includes specific 726 Include support for VPR200 platform. This includes specific
650 configurations for the board and its peripherals. 727 configurations for the board and its peripherals.
651 728
729endif
730
731if ARCH_MULTI_V7
732
652comment "i.MX5 platforms:" 733comment "i.MX5 platforms:"
653 734
654config MACH_MX50_RDP 735config MACH_MX50_RDP
@@ -756,7 +837,6 @@ config SOC_IMX6Q
756 select HAVE_CAN_FLEXCAN if CAN 837 select HAVE_CAN_FLEXCAN if CAN
757 select HAVE_IMX_GPC 838 select HAVE_IMX_GPC
758 select HAVE_IMX_MMDC 839 select HAVE_IMX_MMDC
759 select HAVE_IMX_SRC
760 select HAVE_SMP 840 select HAVE_SMP
761 select MFD_SYSCON 841 select MFD_SYSCON
762 select PINCTRL 842 select PINCTRL
@@ -766,3 +846,7 @@ config SOC_IMX6Q
766 This enables support for Freescale i.MX6 Quad processor. 846 This enables support for Freescale i.MX6 Quad processor.
767 847
768endif 848endif
849
850source "arch/arm/mach-imx/devices/Kconfig"
851
852endmenu
diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile
index 895754aeb4f3..fe47b71469c9 100644
--- a/arch/arm/mach-imx/Makefile
+++ b/arch/arm/mach-imx/Makefile
@@ -1,3 +1,5 @@
1obj-y := time.o cpu.o system.o irq-common.o
2
1obj-$(CONFIG_SOC_IMX1) += clk-imx1.o mm-imx1.o 3obj-$(CONFIG_SOC_IMX1) += clk-imx1.o mm-imx1.o
2obj-$(CONFIG_SOC_IMX21) += clk-imx21.o mm-imx21.o 4obj-$(CONFIG_SOC_IMX21) += clk-imx21.o mm-imx21.o
3 5
@@ -15,6 +17,24 @@ obj-$(CONFIG_SOC_IMX5) += cpu-imx5.o mm-imx5.o clk-imx51-imx53.o ehci-imx5.o $(i
15obj-$(CONFIG_COMMON_CLK) += clk-pllv1.o clk-pllv2.o clk-pllv3.o clk-gate2.o \ 17obj-$(CONFIG_COMMON_CLK) += clk-pllv1.o clk-pllv2.o clk-pllv3.o clk-gate2.o \
16 clk-pfd.o clk-busy.o clk.o 18 clk-pfd.o clk-busy.o clk.o
17 19
20obj-$(CONFIG_IMX_HAVE_IOMUX_V1) += iomux-v1.o
21obj-$(CONFIG_ARCH_MXC_IOMUX_V3) += iomux-v3.o
22
23obj-$(CONFIG_MXC_TZIC) += tzic.o
24obj-$(CONFIG_MXC_AVIC) += avic.o
25
26obj-$(CONFIG_IRAM_ALLOC) += iram_alloc.o
27obj-$(CONFIG_MXC_ULPI) += ulpi.o
28obj-$(CONFIG_MXC_USE_EPIT) += epit.o
29obj-$(CONFIG_MXC_DEBUG_BOARD) += 3ds_debugboard.o
30obj-$(CONFIG_CPU_FREQ_IMX) += cpufreq.o
31obj-$(CONFIG_CPU_IDLE) += cpuidle.o
32
33ifdef CONFIG_SND_IMX_SOC
34obj-y += ssi-fiq.o
35obj-y += ssi-fiq-ksym.o
36endif
37
18# Support for CMOS sensor interface 38# Support for CMOS sensor interface
19obj-$(CONFIG_MX1_VIDEO) += mx1-camera-fiq.o mx1-camera-fiq-ksym.o 39obj-$(CONFIG_MX1_VIDEO) += mx1-camera-fiq.o mx1-camera-fiq-ksym.o
20 40
@@ -89,3 +109,5 @@ obj-$(CONFIG_MACH_MX50_RDP) += mach-mx50_rdp.o
89 109
90obj-$(CONFIG_MACH_IMX51_DT) += imx51-dt.o 110obj-$(CONFIG_MACH_IMX51_DT) += imx51-dt.o
91obj-$(CONFIG_SOC_IMX53) += mach-imx53.o 111obj-$(CONFIG_SOC_IMX53) += mach-imx53.o
112
113obj-y += devices/
diff --git a/arch/arm/plat-mxc/avic.c b/arch/arm/mach-imx/avic.c
index cbd55c36def3..0eff23ed92b9 100644
--- a/arch/arm/plat-mxc/avic.c
+++ b/arch/arm/mach-imx/avic.c
@@ -22,12 +22,11 @@
22#include <linux/irqdomain.h> 22#include <linux/irqdomain.h>
23#include <linux/io.h> 23#include <linux/io.h>
24#include <linux/of.h> 24#include <linux/of.h>
25#include <mach/common.h>
26#include <asm/mach/irq.h> 25#include <asm/mach/irq.h>
27#include <asm/exception.h> 26#include <asm/exception.h>
28#include <mach/hardware.h>
29#include <mach/irqs.h>
30 27
28#include "common.h"
29#include "hardware.h"
31#include "irq-common.h" 30#include "irq-common.h"
32 31
33#define AVIC_INTCNTL 0x00 /* int control reg */ 32#define AVIC_INTCNTL 0x00 /* int control reg */
diff --git a/arch/arm/plat-mxc/include/mach/board-mx31lilly.h b/arch/arm/mach-imx/board-mx31lilly.h
index 0df71bfefbb1..0df71bfefbb1 100644
--- a/arch/arm/plat-mxc/include/mach/board-mx31lilly.h
+++ b/arch/arm/mach-imx/board-mx31lilly.h
diff --git a/arch/arm/plat-mxc/include/mach/board-mx31lite.h b/arch/arm/mach-imx/board-mx31lite.h
index c1ad0ae807cc..c1ad0ae807cc 100644
--- a/arch/arm/plat-mxc/include/mach/board-mx31lite.h
+++ b/arch/arm/mach-imx/board-mx31lite.h
diff --git a/arch/arm/plat-mxc/include/mach/board-mx31moboard.h b/arch/arm/mach-imx/board-mx31moboard.h
index de14543891cf..de14543891cf 100644
--- a/arch/arm/plat-mxc/include/mach/board-mx31moboard.h
+++ b/arch/arm/mach-imx/board-mx31moboard.h
diff --git a/arch/arm/plat-mxc/include/mach/board-pcm038.h b/arch/arm/mach-imx/board-pcm038.h
index 6f371e35753d..6f371e35753d 100644
--- a/arch/arm/plat-mxc/include/mach/board-pcm038.h
+++ b/arch/arm/mach-imx/board-pcm038.h
diff --git a/arch/arm/mach-imx/clk-imx1.c b/arch/arm/mach-imx/clk-imx1.c
index 516ddee1948e..15f9d223cf0b 100644
--- a/arch/arm/mach-imx/clk-imx1.c
+++ b/arch/arm/mach-imx/clk-imx1.c
@@ -22,9 +22,9 @@
22#include <linux/clkdev.h> 22#include <linux/clkdev.h>
23#include <linux/err.h> 23#include <linux/err.h>
24 24
25#include <mach/hardware.h>
26#include <mach/common.h>
27#include "clk.h" 25#include "clk.h"
26#include "common.h"
27#include "hardware.h"
28 28
29/* CCM register addresses */ 29/* CCM register addresses */
30#define IO_ADDR_CCM(off) (MX1_IO_ADDRESS(MX1_CCM_BASE_ADDR + (off))) 30#define IO_ADDR_CCM(off) (MX1_IO_ADDRESS(MX1_CCM_BASE_ADDR + (off)))
@@ -82,7 +82,8 @@ int __init mx1_clocks_init(unsigned long fref)
82 pr_err("imx1 clk %d: register failed with %ld\n", 82 pr_err("imx1 clk %d: register failed with %ld\n",
83 i, PTR_ERR(clk[i])); 83 i, PTR_ERR(clk[i]));
84 84
85 clk_register_clkdev(clk[dma_gate], "ahb", "imx-dma"); 85 clk_register_clkdev(clk[dma_gate], "ahb", "imx1-dma");
86 clk_register_clkdev(clk[hclk], "ipg", "imx1-dma");
86 clk_register_clkdev(clk[csi_gate], NULL, "mx1-camera.0"); 87 clk_register_clkdev(clk[csi_gate], NULL, "mx1-camera.0");
87 clk_register_clkdev(clk[mma_gate], "mma", NULL); 88 clk_register_clkdev(clk[mma_gate], "mma", NULL);
88 clk_register_clkdev(clk[usbd_gate], NULL, "imx_udc.0"); 89 clk_register_clkdev(clk[usbd_gate], NULL, "imx_udc.0");
@@ -94,18 +95,18 @@ int __init mx1_clocks_init(unsigned long fref)
94 clk_register_clkdev(clk[hclk], "ipg", "imx1-uart.1"); 95 clk_register_clkdev(clk[hclk], "ipg", "imx1-uart.1");
95 clk_register_clkdev(clk[per1], "per", "imx1-uart.2"); 96 clk_register_clkdev(clk[per1], "per", "imx1-uart.2");
96 clk_register_clkdev(clk[hclk], "ipg", "imx1-uart.2"); 97 clk_register_clkdev(clk[hclk], "ipg", "imx1-uart.2");
97 clk_register_clkdev(clk[hclk], NULL, "imx-i2c.0"); 98 clk_register_clkdev(clk[hclk], NULL, "imx1-i2c.0");
98 clk_register_clkdev(clk[per2], "per", "imx1-cspi.0"); 99 clk_register_clkdev(clk[per2], "per", "imx1-cspi.0");
99 clk_register_clkdev(clk[dummy], "ipg", "imx1-cspi.0"); 100 clk_register_clkdev(clk[dummy], "ipg", "imx1-cspi.0");
100 clk_register_clkdev(clk[per2], "per", "imx1-cspi.1"); 101 clk_register_clkdev(clk[per2], "per", "imx1-cspi.1");
101 clk_register_clkdev(clk[dummy], "ipg", "imx1-cspi.1"); 102 clk_register_clkdev(clk[dummy], "ipg", "imx1-cspi.1");
102 clk_register_clkdev(clk[per2], NULL, "imx-mmc.0"); 103 clk_register_clkdev(clk[per2], NULL, "imx-mmc.0");
103 clk_register_clkdev(clk[per2], "per", "imx-fb.0"); 104 clk_register_clkdev(clk[per2], "per", "imx1-fb.0");
104 clk_register_clkdev(clk[dummy], "ipg", "imx-fb.0"); 105 clk_register_clkdev(clk[dummy], "ipg", "imx1-fb.0");
105 clk_register_clkdev(clk[dummy], "ahb", "imx-fb.0"); 106 clk_register_clkdev(clk[dummy], "ahb", "imx1-fb.0");
106 clk_register_clkdev(clk[hclk], "mshc", NULL); 107 clk_register_clkdev(clk[hclk], "mshc", NULL);
107 clk_register_clkdev(clk[per3], "ssi", NULL); 108 clk_register_clkdev(clk[per3], "ssi", NULL);
108 clk_register_clkdev(clk[clk32], NULL, "mxc_rtc.0"); 109 clk_register_clkdev(clk[clk32], NULL, "imx1-rtc.0");
109 clk_register_clkdev(clk[clko], "clko", NULL); 110 clk_register_clkdev(clk[clko], "clko", NULL);
110 111
111 mxc_timer_init(MX1_IO_ADDRESS(MX1_TIM1_BASE_ADDR), MX1_TIM1_INT); 112 mxc_timer_init(MX1_IO_ADDRESS(MX1_TIM1_BASE_ADDR), MX1_TIM1_INT);
diff --git a/arch/arm/mach-imx/clk-imx21.c b/arch/arm/mach-imx/clk-imx21.c
index cf65148bc519..d7ed66091a2a 100644
--- a/arch/arm/mach-imx/clk-imx21.c
+++ b/arch/arm/mach-imx/clk-imx21.c
@@ -25,9 +25,9 @@
25#include <linux/module.h> 25#include <linux/module.h>
26#include <linux/err.h> 26#include <linux/err.h>
27 27
28#include <mach/hardware.h>
29#include <mach/common.h>
30#include "clk.h" 28#include "clk.h"
29#include "common.h"
30#include "hardware.h"
31 31
32#define IO_ADDR_CCM(off) (MX21_IO_ADDRESS(MX21_CCM_BASE_ADDR + (off))) 32#define IO_ADDR_CCM(off) (MX21_IO_ADDRESS(MX21_CCM_BASE_ADDR + (off)))
33 33
@@ -156,16 +156,16 @@ int __init mx21_clocks_init(unsigned long lref, unsigned long href)
156 clk_register_clkdev(clk[cspi2_ipg_gate], "ipg", "imx21-cspi.1"); 156 clk_register_clkdev(clk[cspi2_ipg_gate], "ipg", "imx21-cspi.1");
157 clk_register_clkdev(clk[per2], "per", "imx21-cspi.2"); 157 clk_register_clkdev(clk[per2], "per", "imx21-cspi.2");
158 clk_register_clkdev(clk[cspi3_ipg_gate], "ipg", "imx21-cspi.2"); 158 clk_register_clkdev(clk[cspi3_ipg_gate], "ipg", "imx21-cspi.2");
159 clk_register_clkdev(clk[per3], "per", "imx-fb.0"); 159 clk_register_clkdev(clk[per3], "per", "imx21-fb.0");
160 clk_register_clkdev(clk[lcdc_ipg_gate], "ipg", "imx-fb.0"); 160 clk_register_clkdev(clk[lcdc_ipg_gate], "ipg", "imx21-fb.0");
161 clk_register_clkdev(clk[lcdc_hclk_gate], "ahb", "imx-fb.0"); 161 clk_register_clkdev(clk[lcdc_hclk_gate], "ahb", "imx21-fb.0");
162 clk_register_clkdev(clk[usb_gate], "per", "imx21-hcd.0"); 162 clk_register_clkdev(clk[usb_gate], "per", "imx21-hcd.0");
163 clk_register_clkdev(clk[usb_hclk_gate], "ahb", "imx21-hcd.0"); 163 clk_register_clkdev(clk[usb_hclk_gate], "ahb", "imx21-hcd.0");
164 clk_register_clkdev(clk[nfc_gate], NULL, "mxc_nand.0"); 164 clk_register_clkdev(clk[nfc_gate], NULL, "imx21-nand.0");
165 clk_register_clkdev(clk[dma_hclk_gate], "ahb", "imx-dma"); 165 clk_register_clkdev(clk[dma_hclk_gate], "ahb", "imx21-dma");
166 clk_register_clkdev(clk[dma_gate], "ipg", "imx-dma"); 166 clk_register_clkdev(clk[dma_gate], "ipg", "imx21-dma");
167 clk_register_clkdev(clk[wdog_gate], NULL, "imx2-wdt.0"); 167 clk_register_clkdev(clk[wdog_gate], NULL, "imx2-wdt.0");
168 clk_register_clkdev(clk[i2c_gate], NULL, "imx-i2c.0"); 168 clk_register_clkdev(clk[i2c_gate], NULL, "imx21-i2c.0");
169 clk_register_clkdev(clk[kpp_gate], NULL, "mxc-keypad"); 169 clk_register_clkdev(clk[kpp_gate], NULL, "mxc-keypad");
170 clk_register_clkdev(clk[owire_gate], NULL, "mxc_w1.0"); 170 clk_register_clkdev(clk[owire_gate], NULL, "mxc_w1.0");
171 clk_register_clkdev(clk[brom_gate], "brom", NULL); 171 clk_register_clkdev(clk[brom_gate], "brom", NULL);
diff --git a/arch/arm/mach-imx/clk-imx25.c b/arch/arm/mach-imx/clk-imx25.c
index 01e2f843bf2e..bc885801cd68 100644
--- a/arch/arm/mach-imx/clk-imx25.c
+++ b/arch/arm/mach-imx/clk-imx25.c
@@ -24,10 +24,10 @@
24#include <linux/clkdev.h> 24#include <linux/clkdev.h>
25#include <linux/err.h> 25#include <linux/err.h>
26 26
27#include <mach/hardware.h>
28#include <mach/common.h>
29#include <mach/mx25.h>
30#include "clk.h" 27#include "clk.h"
28#include "common.h"
29#include "hardware.h"
30#include "mx25.h"
31 31
32#define CRM_BASE MX25_IO_ADDRESS(MX25_CRM_BASE_ADDR) 32#define CRM_BASE MX25_IO_ADDRESS(MX25_CRM_BASE_ADDR)
33 33
@@ -197,7 +197,7 @@ int __init mx25_clocks_init(void)
197 clk_register_clkdev(clk[ipg], "ipg", "fsl-usb2-udc"); 197 clk_register_clkdev(clk[ipg], "ipg", "fsl-usb2-udc");
198 clk_register_clkdev(clk[usbotg_ahb], "ahb", "fsl-usb2-udc"); 198 clk_register_clkdev(clk[usbotg_ahb], "ahb", "fsl-usb2-udc");
199 clk_register_clkdev(clk[usb_div], "per", "fsl-usb2-udc"); 199 clk_register_clkdev(clk[usb_div], "per", "fsl-usb2-udc");
200 clk_register_clkdev(clk[nfc_ipg_per], NULL, "mxc_nand.0"); 200 clk_register_clkdev(clk[nfc_ipg_per], NULL, "imx25-nand.0");
201 /* i.mx25 has the i.mx35 type cspi */ 201 /* i.mx25 has the i.mx35 type cspi */
202 clk_register_clkdev(clk[cspi1_ipg], NULL, "imx35-cspi.0"); 202 clk_register_clkdev(clk[cspi1_ipg], NULL, "imx35-cspi.0");
203 clk_register_clkdev(clk[cspi2_ipg], NULL, "imx35-cspi.1"); 203 clk_register_clkdev(clk[cspi2_ipg], NULL, "imx35-cspi.1");
@@ -212,15 +212,15 @@ int __init mx25_clocks_init(void)
212 clk_register_clkdev(clk[per10], "per", "mxc_pwm.3"); 212 clk_register_clkdev(clk[per10], "per", "mxc_pwm.3");
213 clk_register_clkdev(clk[kpp_ipg], NULL, "imx-keypad"); 213 clk_register_clkdev(clk[kpp_ipg], NULL, "imx-keypad");
214 clk_register_clkdev(clk[tsc_ipg], NULL, "mx25-adc"); 214 clk_register_clkdev(clk[tsc_ipg], NULL, "mx25-adc");
215 clk_register_clkdev(clk[i2c_ipg_per], NULL, "imx-i2c.0"); 215 clk_register_clkdev(clk[i2c_ipg_per], NULL, "imx21-i2c.0");
216 clk_register_clkdev(clk[i2c_ipg_per], NULL, "imx-i2c.1"); 216 clk_register_clkdev(clk[i2c_ipg_per], NULL, "imx21-i2c.1");
217 clk_register_clkdev(clk[i2c_ipg_per], NULL, "imx-i2c.2"); 217 clk_register_clkdev(clk[i2c_ipg_per], NULL, "imx21-i2c.2");
218 clk_register_clkdev(clk[fec_ipg], "ipg", "imx25-fec.0"); 218 clk_register_clkdev(clk[fec_ipg], "ipg", "imx25-fec.0");
219 clk_register_clkdev(clk[fec_ahb], "ahb", "imx25-fec.0"); 219 clk_register_clkdev(clk[fec_ahb], "ahb", "imx25-fec.0");
220 clk_register_clkdev(clk[dryice_ipg], NULL, "imxdi_rtc.0"); 220 clk_register_clkdev(clk[dryice_ipg], NULL, "imxdi_rtc.0");
221 clk_register_clkdev(clk[lcdc_ipg_per], "per", "imx-fb.0"); 221 clk_register_clkdev(clk[lcdc_ipg_per], "per", "imx21-fb.0");
222 clk_register_clkdev(clk[lcdc_ipg], "ipg", "imx-fb.0"); 222 clk_register_clkdev(clk[lcdc_ipg], "ipg", "imx21-fb.0");
223 clk_register_clkdev(clk[lcdc_ahb], "ahb", "imx-fb.0"); 223 clk_register_clkdev(clk[lcdc_ahb], "ahb", "imx21-fb.0");
224 clk_register_clkdev(clk[wdt_ipg], NULL, "imx2-wdt.0"); 224 clk_register_clkdev(clk[wdt_ipg], NULL, "imx2-wdt.0");
225 clk_register_clkdev(clk[ssi1_ipg], NULL, "imx-ssi.0"); 225 clk_register_clkdev(clk[ssi1_ipg], NULL, "imx-ssi.0");
226 clk_register_clkdev(clk[ssi2_ipg], NULL, "imx-ssi.1"); 226 clk_register_clkdev(clk[ssi2_ipg], NULL, "imx-ssi.1");
@@ -230,9 +230,9 @@ int __init mx25_clocks_init(void)
230 clk_register_clkdev(clk[esdhc2_ipg_per], "per", "sdhci-esdhc-imx25.1"); 230 clk_register_clkdev(clk[esdhc2_ipg_per], "per", "sdhci-esdhc-imx25.1");
231 clk_register_clkdev(clk[esdhc2_ipg], "ipg", "sdhci-esdhc-imx25.1"); 231 clk_register_clkdev(clk[esdhc2_ipg], "ipg", "sdhci-esdhc-imx25.1");
232 clk_register_clkdev(clk[esdhc2_ahb], "ahb", "sdhci-esdhc-imx25.1"); 232 clk_register_clkdev(clk[esdhc2_ahb], "ahb", "sdhci-esdhc-imx25.1");
233 clk_register_clkdev(clk[csi_ipg_per], "per", "mx2-camera.0"); 233 clk_register_clkdev(clk[csi_ipg_per], "per", "imx25-camera.0");
234 clk_register_clkdev(clk[csi_ipg], "ipg", "mx2-camera.0"); 234 clk_register_clkdev(clk[csi_ipg], "ipg", "imx25-camera.0");
235 clk_register_clkdev(clk[csi_ahb], "ahb", "mx2-camera.0"); 235 clk_register_clkdev(clk[csi_ahb], "ahb", "imx25-camera.0");
236 clk_register_clkdev(clk[dummy], "audmux", NULL); 236 clk_register_clkdev(clk[dummy], "audmux", NULL);
237 clk_register_clkdev(clk[can1_ipg], NULL, "flexcan.0"); 237 clk_register_clkdev(clk[can1_ipg], NULL, "flexcan.0");
238 clk_register_clkdev(clk[can2_ipg], NULL, "flexcan.1"); 238 clk_register_clkdev(clk[can2_ipg], NULL, "flexcan.1");
diff --git a/arch/arm/mach-imx/clk-imx27.c b/arch/arm/mach-imx/clk-imx27.c
index 366e5d59d886..585ab256c58f 100644
--- a/arch/arm/mach-imx/clk-imx27.c
+++ b/arch/arm/mach-imx/clk-imx27.c
@@ -6,9 +6,9 @@
6#include <linux/clk-provider.h> 6#include <linux/clk-provider.h>
7#include <linux/of.h> 7#include <linux/of.h>
8 8
9#include <mach/common.h>
10#include <mach/hardware.h>
11#include "clk.h" 9#include "clk.h"
10#include "common.h"
11#include "hardware.h"
12 12
13#define IO_ADDR_CCM(off) (MX27_IO_ADDRESS(MX27_CCM_BASE_ADDR + (off))) 13#define IO_ADDR_CCM(off) (MX27_IO_ADDRESS(MX27_CCM_BASE_ADDR + (off)))
14 14
@@ -211,19 +211,19 @@ int __init mx27_clocks_init(unsigned long fref)
211 clk_register_clkdev(clk[gpt6_ipg_gate], "ipg", "imx-gpt.5"); 211 clk_register_clkdev(clk[gpt6_ipg_gate], "ipg", "imx-gpt.5");
212 clk_register_clkdev(clk[per1_gate], "per", "imx-gpt.5"); 212 clk_register_clkdev(clk[per1_gate], "per", "imx-gpt.5");
213 clk_register_clkdev(clk[pwm_ipg_gate], NULL, "mxc_pwm.0"); 213 clk_register_clkdev(clk[pwm_ipg_gate], NULL, "mxc_pwm.0");
214 clk_register_clkdev(clk[per2_gate], "per", "mxc-mmc.0"); 214 clk_register_clkdev(clk[per2_gate], "per", "imx21-mmc.0");
215 clk_register_clkdev(clk[sdhc1_ipg_gate], "ipg", "mxc-mmc.0"); 215 clk_register_clkdev(clk[sdhc1_ipg_gate], "ipg", "imx21-mmc.0");
216 clk_register_clkdev(clk[per2_gate], "per", "mxc-mmc.1"); 216 clk_register_clkdev(clk[per2_gate], "per", "imx21-mmc.1");
217 clk_register_clkdev(clk[sdhc2_ipg_gate], "ipg", "mxc-mmc.1"); 217 clk_register_clkdev(clk[sdhc2_ipg_gate], "ipg", "imx21-mmc.1");
218 clk_register_clkdev(clk[per2_gate], "per", "mxc-mmc.2"); 218 clk_register_clkdev(clk[per2_gate], "per", "imx21-mmc.2");
219 clk_register_clkdev(clk[sdhc2_ipg_gate], "ipg", "mxc-mmc.2"); 219 clk_register_clkdev(clk[sdhc2_ipg_gate], "ipg", "imx21-mmc.2");
220 clk_register_clkdev(clk[cspi1_ipg_gate], NULL, "imx27-cspi.0"); 220 clk_register_clkdev(clk[cspi1_ipg_gate], NULL, "imx27-cspi.0");
221 clk_register_clkdev(clk[cspi2_ipg_gate], NULL, "imx27-cspi.1"); 221 clk_register_clkdev(clk[cspi2_ipg_gate], NULL, "imx27-cspi.1");
222 clk_register_clkdev(clk[cspi3_ipg_gate], NULL, "imx27-cspi.2"); 222 clk_register_clkdev(clk[cspi3_ipg_gate], NULL, "imx27-cspi.2");
223 clk_register_clkdev(clk[per3_gate], "per", "imx-fb.0"); 223 clk_register_clkdev(clk[per3_gate], "per", "imx21-fb.0");
224 clk_register_clkdev(clk[lcdc_ipg_gate], "ipg", "imx-fb.0"); 224 clk_register_clkdev(clk[lcdc_ipg_gate], "ipg", "imx21-fb.0");
225 clk_register_clkdev(clk[lcdc_ahb_gate], "ahb", "imx-fb.0"); 225 clk_register_clkdev(clk[lcdc_ahb_gate], "ahb", "imx21-fb.0");
226 clk_register_clkdev(clk[csi_ahb_gate], "ahb", "mx2-camera.0"); 226 clk_register_clkdev(clk[csi_ahb_gate], "ahb", "imx27-camera.0");
227 clk_register_clkdev(clk[usb_div], "per", "fsl-usb2-udc"); 227 clk_register_clkdev(clk[usb_div], "per", "fsl-usb2-udc");
228 clk_register_clkdev(clk[usb_ipg_gate], "ipg", "fsl-usb2-udc"); 228 clk_register_clkdev(clk[usb_ipg_gate], "ipg", "fsl-usb2-udc");
229 clk_register_clkdev(clk[usb_ahb_gate], "ahb", "fsl-usb2-udc"); 229 clk_register_clkdev(clk[usb_ahb_gate], "ahb", "fsl-usb2-udc");
@@ -238,27 +238,27 @@ int __init mx27_clocks_init(unsigned long fref)
238 clk_register_clkdev(clk[usb_ahb_gate], "ahb", "mxc-ehci.2"); 238 clk_register_clkdev(clk[usb_ahb_gate], "ahb", "mxc-ehci.2");
239 clk_register_clkdev(clk[ssi1_ipg_gate], NULL, "imx-ssi.0"); 239 clk_register_clkdev(clk[ssi1_ipg_gate], NULL, "imx-ssi.0");
240 clk_register_clkdev(clk[ssi2_ipg_gate], NULL, "imx-ssi.1"); 240 clk_register_clkdev(clk[ssi2_ipg_gate], NULL, "imx-ssi.1");
241 clk_register_clkdev(clk[nfc_baud_gate], NULL, "mxc_nand.0"); 241 clk_register_clkdev(clk[nfc_baud_gate], NULL, "imx27-nand.0");
242 clk_register_clkdev(clk[vpu_baud_gate], "per", "coda-imx27.0"); 242 clk_register_clkdev(clk[vpu_baud_gate], "per", "coda-imx27.0");
243 clk_register_clkdev(clk[vpu_ahb_gate], "ahb", "coda-imx27.0"); 243 clk_register_clkdev(clk[vpu_ahb_gate], "ahb", "coda-imx27.0");
244 clk_register_clkdev(clk[dma_ahb_gate], "ahb", "imx-dma"); 244 clk_register_clkdev(clk[dma_ahb_gate], "ahb", "imx27-dma");
245 clk_register_clkdev(clk[dma_ipg_gate], "ipg", "imx-dma"); 245 clk_register_clkdev(clk[dma_ipg_gate], "ipg", "imx27-dma");
246 clk_register_clkdev(clk[fec_ipg_gate], "ipg", "imx27-fec.0"); 246 clk_register_clkdev(clk[fec_ipg_gate], "ipg", "imx27-fec.0");
247 clk_register_clkdev(clk[fec_ahb_gate], "ahb", "imx27-fec.0"); 247 clk_register_clkdev(clk[fec_ahb_gate], "ahb", "imx27-fec.0");
248 clk_register_clkdev(clk[wdog_ipg_gate], NULL, "imx2-wdt.0"); 248 clk_register_clkdev(clk[wdog_ipg_gate], NULL, "imx2-wdt.0");
249 clk_register_clkdev(clk[i2c1_ipg_gate], NULL, "imx-i2c.0"); 249 clk_register_clkdev(clk[i2c1_ipg_gate], NULL, "imx21-i2c.0");
250 clk_register_clkdev(clk[i2c2_ipg_gate], NULL, "imx-i2c.1"); 250 clk_register_clkdev(clk[i2c2_ipg_gate], NULL, "imx21-i2c.1");
251 clk_register_clkdev(clk[owire_ipg_gate], NULL, "mxc_w1.0"); 251 clk_register_clkdev(clk[owire_ipg_gate], NULL, "mxc_w1.0");
252 clk_register_clkdev(clk[kpp_ipg_gate], NULL, "imx-keypad"); 252 clk_register_clkdev(clk[kpp_ipg_gate], NULL, "imx-keypad");
253 clk_register_clkdev(clk[emma_ahb_gate], "emma-ahb", "mx2-camera.0"); 253 clk_register_clkdev(clk[emma_ahb_gate], "emma-ahb", "imx27-camera.0");
254 clk_register_clkdev(clk[emma_ipg_gate], "emma-ipg", "mx2-camera.0"); 254 clk_register_clkdev(clk[emma_ipg_gate], "emma-ipg", "imx27-camera.0");
255 clk_register_clkdev(clk[emma_ahb_gate], "ahb", "m2m-emmaprp.0"); 255 clk_register_clkdev(clk[emma_ahb_gate], "ahb", "m2m-emmaprp.0");
256 clk_register_clkdev(clk[emma_ipg_gate], "ipg", "m2m-emmaprp.0"); 256 clk_register_clkdev(clk[emma_ipg_gate], "ipg", "m2m-emmaprp.0");
257 clk_register_clkdev(clk[iim_ipg_gate], "iim", NULL); 257 clk_register_clkdev(clk[iim_ipg_gate], "iim", NULL);
258 clk_register_clkdev(clk[gpio_ipg_gate], "gpio", NULL); 258 clk_register_clkdev(clk[gpio_ipg_gate], "gpio", NULL);
259 clk_register_clkdev(clk[brom_ahb_gate], "brom", NULL); 259 clk_register_clkdev(clk[brom_ahb_gate], "brom", NULL);
260 clk_register_clkdev(clk[ata_ahb_gate], "ata", NULL); 260 clk_register_clkdev(clk[ata_ahb_gate], "ata", NULL);
261 clk_register_clkdev(clk[rtc_ipg_gate], NULL, "mxc_rtc"); 261 clk_register_clkdev(clk[rtc_ipg_gate], NULL, "imx21-rtc");
262 clk_register_clkdev(clk[scc_ipg_gate], "scc", NULL); 262 clk_register_clkdev(clk[scc_ipg_gate], "scc", NULL);
263 clk_register_clkdev(clk[cpu_div], "cpu", NULL); 263 clk_register_clkdev(clk[cpu_div], "cpu", NULL);
264 clk_register_clkdev(clk[emi_ahb_gate], "emi_ahb" , NULL); 264 clk_register_clkdev(clk[emi_ahb_gate], "emi_ahb" , NULL);
diff --git a/arch/arm/mach-imx/clk-imx31.c b/arch/arm/mach-imx/clk-imx31.c
index 1253af2d9971..8be64e0a4ace 100644
--- a/arch/arm/mach-imx/clk-imx31.c
+++ b/arch/arm/mach-imx/clk-imx31.c
@@ -22,12 +22,11 @@
22#include <linux/err.h> 22#include <linux/err.h>
23#include <linux/of.h> 23#include <linux/of.h>
24 24
25#include <mach/hardware.h>
26#include <mach/mx31.h>
27#include <mach/common.h>
28
29#include "clk.h" 25#include "clk.h"
26#include "common.h"
30#include "crmregs-imx3.h" 27#include "crmregs-imx3.h"
28#include "hardware.h"
29#include "mx31.h"
31 30
32static const char *mcu_main_sel[] = { "spll", "mpll", }; 31static const char *mcu_main_sel[] = { "spll", "mpll", };
33static const char *per_sel[] = { "per_div", "ipg", }; 32static const char *per_sel[] = { "per_div", "ipg", };
@@ -124,10 +123,10 @@ int __init mx31_clocks_init(unsigned long fref)
124 clk_register_clkdev(clk[cspi3_gate], NULL, "imx31-cspi.2"); 123 clk_register_clkdev(clk[cspi3_gate], NULL, "imx31-cspi.2");
125 clk_register_clkdev(clk[pwm_gate], "pwm", NULL); 124 clk_register_clkdev(clk[pwm_gate], "pwm", NULL);
126 clk_register_clkdev(clk[wdog_gate], NULL, "imx2-wdt.0"); 125 clk_register_clkdev(clk[wdog_gate], NULL, "imx2-wdt.0");
127 clk_register_clkdev(clk[rtc_gate], NULL, "mxc_rtc"); 126 clk_register_clkdev(clk[rtc_gate], NULL, "imx21-rtc");
128 clk_register_clkdev(clk[epit1_gate], "epit", NULL); 127 clk_register_clkdev(clk[epit1_gate], "epit", NULL);
129 clk_register_clkdev(clk[epit2_gate], "epit", NULL); 128 clk_register_clkdev(clk[epit2_gate], "epit", NULL);
130 clk_register_clkdev(clk[nfc], NULL, "mxc_nand.0"); 129 clk_register_clkdev(clk[nfc], NULL, "imx27-nand.0");
131 clk_register_clkdev(clk[ipu_gate], NULL, "ipu-core"); 130 clk_register_clkdev(clk[ipu_gate], NULL, "ipu-core");
132 clk_register_clkdev(clk[ipu_gate], NULL, "mx3_sdc_fb"); 131 clk_register_clkdev(clk[ipu_gate], NULL, "mx3_sdc_fb");
133 clk_register_clkdev(clk[kpp_gate], NULL, "imx-keypad"); 132 clk_register_clkdev(clk[kpp_gate], NULL, "imx-keypad");
@@ -155,12 +154,12 @@ int __init mx31_clocks_init(unsigned long fref)
155 clk_register_clkdev(clk[ipg], "ipg", "imx21-uart.3"); 154 clk_register_clkdev(clk[ipg], "ipg", "imx21-uart.3");
156 clk_register_clkdev(clk[uart5_gate], "per", "imx21-uart.4"); 155 clk_register_clkdev(clk[uart5_gate], "per", "imx21-uart.4");
157 clk_register_clkdev(clk[ipg], "ipg", "imx21-uart.4"); 156 clk_register_clkdev(clk[ipg], "ipg", "imx21-uart.4");
158 clk_register_clkdev(clk[i2c1_gate], NULL, "imx-i2c.0"); 157 clk_register_clkdev(clk[i2c1_gate], NULL, "imx21-i2c.0");
159 clk_register_clkdev(clk[i2c2_gate], NULL, "imx-i2c.1"); 158 clk_register_clkdev(clk[i2c2_gate], NULL, "imx21-i2c.1");
160 clk_register_clkdev(clk[i2c3_gate], NULL, "imx-i2c.2"); 159 clk_register_clkdev(clk[i2c3_gate], NULL, "imx21-i2c.2");
161 clk_register_clkdev(clk[owire_gate], NULL, "mxc_w1.0"); 160 clk_register_clkdev(clk[owire_gate], NULL, "mxc_w1.0");
162 clk_register_clkdev(clk[sdhc1_gate], NULL, "mxc-mmc.0"); 161 clk_register_clkdev(clk[sdhc1_gate], NULL, "imx31-mmc.0");
163 clk_register_clkdev(clk[sdhc2_gate], NULL, "mxc-mmc.1"); 162 clk_register_clkdev(clk[sdhc2_gate], NULL, "imx31-mmc.1");
164 clk_register_clkdev(clk[ssi1_gate], NULL, "imx-ssi.0"); 163 clk_register_clkdev(clk[ssi1_gate], NULL, "imx-ssi.0");
165 clk_register_clkdev(clk[ssi2_gate], NULL, "imx-ssi.1"); 164 clk_register_clkdev(clk[ssi2_gate], NULL, "imx-ssi.1");
166 clk_register_clkdev(clk[firi_gate], "firi", NULL); 165 clk_register_clkdev(clk[firi_gate], "firi", NULL);
diff --git a/arch/arm/mach-imx/clk-imx35.c b/arch/arm/mach-imx/clk-imx35.c
index 177259b523cd..66f3d65ea275 100644
--- a/arch/arm/mach-imx/clk-imx35.c
+++ b/arch/arm/mach-imx/clk-imx35.c
@@ -14,11 +14,10 @@
14#include <linux/of.h> 14#include <linux/of.h>
15#include <linux/err.h> 15#include <linux/err.h>
16 16
17#include <mach/hardware.h>
18#include <mach/common.h>
19
20#include "crmregs-imx3.h" 17#include "crmregs-imx3.h"
21#include "clk.h" 18#include "clk.h"
19#include "common.h"
20#include "hardware.h"
22 21
23struct arm_ahb_div { 22struct arm_ahb_div {
24 unsigned char arm, ahb, sel; 23 unsigned char arm, ahb, sel;
@@ -226,9 +225,9 @@ int __init mx35_clocks_init()
226 clk_register_clkdev(clk[fec_gate], NULL, "imx27-fec.0"); 225 clk_register_clkdev(clk[fec_gate], NULL, "imx27-fec.0");
227 clk_register_clkdev(clk[gpt_gate], "per", "imx-gpt.0"); 226 clk_register_clkdev(clk[gpt_gate], "per", "imx-gpt.0");
228 clk_register_clkdev(clk[ipg], "ipg", "imx-gpt.0"); 227 clk_register_clkdev(clk[ipg], "ipg", "imx-gpt.0");
229 clk_register_clkdev(clk[i2c1_gate], NULL, "imx-i2c.0"); 228 clk_register_clkdev(clk[i2c1_gate], NULL, "imx21-i2c.0");
230 clk_register_clkdev(clk[i2c2_gate], NULL, "imx-i2c.1"); 229 clk_register_clkdev(clk[i2c2_gate], NULL, "imx21-i2c.1");
231 clk_register_clkdev(clk[i2c3_gate], NULL, "imx-i2c.2"); 230 clk_register_clkdev(clk[i2c3_gate], NULL, "imx21-i2c.2");
232 clk_register_clkdev(clk[ipu_gate], NULL, "ipu-core"); 231 clk_register_clkdev(clk[ipu_gate], NULL, "ipu-core");
233 clk_register_clkdev(clk[ipu_gate], NULL, "mx3_sdc_fb"); 232 clk_register_clkdev(clk[ipu_gate], NULL, "mx3_sdc_fb");
234 clk_register_clkdev(clk[kpp_gate], NULL, "imx-keypad"); 233 clk_register_clkdev(clk[kpp_gate], NULL, "imx-keypad");
@@ -256,7 +255,7 @@ int __init mx35_clocks_init()
256 clk_register_clkdev(clk[ipg], "ipg", "fsl-usb2-udc"); 255 clk_register_clkdev(clk[ipg], "ipg", "fsl-usb2-udc");
257 clk_register_clkdev(clk[usbotg_gate], "ahb", "fsl-usb2-udc"); 256 clk_register_clkdev(clk[usbotg_gate], "ahb", "fsl-usb2-udc");
258 clk_register_clkdev(clk[wdog_gate], NULL, "imx2-wdt.0"); 257 clk_register_clkdev(clk[wdog_gate], NULL, "imx2-wdt.0");
259 clk_register_clkdev(clk[nfc_div], NULL, "mxc_nand.0"); 258 clk_register_clkdev(clk[nfc_div], NULL, "imx25-nand.0");
260 clk_register_clkdev(clk[csi_gate], NULL, "mx3-camera.0"); 259 clk_register_clkdev(clk[csi_gate], NULL, "mx3-camera.0");
261 260
262 clk_prepare_enable(clk[spba_gate]); 261 clk_prepare_enable(clk[spba_gate]);
diff --git a/arch/arm/mach-imx/clk-imx51-imx53.c b/arch/arm/mach-imx/clk-imx51-imx53.c
index a0bf84803eac..abb71f6b4d60 100644
--- a/arch/arm/mach-imx/clk-imx51-imx53.c
+++ b/arch/arm/mach-imx/clk-imx51-imx53.c
@@ -14,11 +14,10 @@
14#include <linux/of.h> 14#include <linux/of.h>
15#include <linux/err.h> 15#include <linux/err.h>
16 16
17#include <mach/hardware.h>
18#include <mach/common.h>
19
20#include "crm-regs-imx5.h" 17#include "crm-regs-imx5.h"
21#include "clk.h" 18#include "clk.h"
19#include "common.h"
20#include "hardware.h"
22 21
23/* Low-power Audio Playback Mode clock */ 22/* Low-power Audio Playback Mode clock */
24static const char *lp_apm_sel[] = { "osc", }; 23static const char *lp_apm_sel[] = { "osc", };
@@ -258,8 +257,8 @@ static void __init mx5_clocks_common_init(unsigned long rate_ckil,
258 clk_register_clkdev(clk[cspi_ipg_gate], NULL, "imx35-cspi.2"); 257 clk_register_clkdev(clk[cspi_ipg_gate], NULL, "imx35-cspi.2");
259 clk_register_clkdev(clk[pwm1_ipg_gate], "pwm", "mxc_pwm.0"); 258 clk_register_clkdev(clk[pwm1_ipg_gate], "pwm", "mxc_pwm.0");
260 clk_register_clkdev(clk[pwm2_ipg_gate], "pwm", "mxc_pwm.1"); 259 clk_register_clkdev(clk[pwm2_ipg_gate], "pwm", "mxc_pwm.1");
261 clk_register_clkdev(clk[i2c1_gate], NULL, "imx-i2c.0"); 260 clk_register_clkdev(clk[i2c1_gate], NULL, "imx21-i2c.0");
262 clk_register_clkdev(clk[i2c2_gate], NULL, "imx-i2c.1"); 261 clk_register_clkdev(clk[i2c2_gate], NULL, "imx21-i2c.1");
263 clk_register_clkdev(clk[usboh3_per_gate], "per", "mxc-ehci.0"); 262 clk_register_clkdev(clk[usboh3_per_gate], "per", "mxc-ehci.0");
264 clk_register_clkdev(clk[usboh3_gate], "ipg", "mxc-ehci.0"); 263 clk_register_clkdev(clk[usboh3_gate], "ipg", "mxc-ehci.0");
265 clk_register_clkdev(clk[usboh3_gate], "ahb", "mxc-ehci.0"); 264 clk_register_clkdev(clk[usboh3_gate], "ahb", "mxc-ehci.0");
@@ -272,7 +271,7 @@ static void __init mx5_clocks_common_init(unsigned long rate_ckil,
272 clk_register_clkdev(clk[usboh3_per_gate], "per", "fsl-usb2-udc"); 271 clk_register_clkdev(clk[usboh3_per_gate], "per", "fsl-usb2-udc");
273 clk_register_clkdev(clk[usboh3_gate], "ipg", "fsl-usb2-udc"); 272 clk_register_clkdev(clk[usboh3_gate], "ipg", "fsl-usb2-udc");
274 clk_register_clkdev(clk[usboh3_gate], "ahb", "fsl-usb2-udc"); 273 clk_register_clkdev(clk[usboh3_gate], "ahb", "fsl-usb2-udc");
275 clk_register_clkdev(clk[nfc_gate], NULL, "mxc_nand"); 274 clk_register_clkdev(clk[nfc_gate], NULL, "imx51-nand");
276 clk_register_clkdev(clk[ssi1_ipg_gate], NULL, "imx-ssi.0"); 275 clk_register_clkdev(clk[ssi1_ipg_gate], NULL, "imx-ssi.0");
277 clk_register_clkdev(clk[ssi2_ipg_gate], NULL, "imx-ssi.1"); 276 clk_register_clkdev(clk[ssi2_ipg_gate], NULL, "imx-ssi.1");
278 clk_register_clkdev(clk[ssi3_ipg_gate], NULL, "imx-ssi.2"); 277 clk_register_clkdev(clk[ssi3_ipg_gate], NULL, "imx-ssi.2");
@@ -345,7 +344,7 @@ int __init mx51_clocks_init(unsigned long rate_ckil, unsigned long rate_osc,
345 344
346 mx5_clocks_common_init(rate_ckil, rate_osc, rate_ckih1, rate_ckih2); 345 mx5_clocks_common_init(rate_ckil, rate_osc, rate_ckih1, rate_ckih2);
347 346
348 clk_register_clkdev(clk[hsi2c_gate], NULL, "imx-i2c.2"); 347 clk_register_clkdev(clk[hsi2c_gate], NULL, "imx21-i2c.2");
349 clk_register_clkdev(clk[mx51_mipi], "mipi_hsp", NULL); 348 clk_register_clkdev(clk[mx51_mipi], "mipi_hsp", NULL);
350 clk_register_clkdev(clk[vpu_gate], NULL, "imx51-vpu.0"); 349 clk_register_clkdev(clk[vpu_gate], NULL, "imx51-vpu.0");
351 clk_register_clkdev(clk[fec_gate], NULL, "imx27-fec.0"); 350 clk_register_clkdev(clk[fec_gate], NULL, "imx27-fec.0");
@@ -440,7 +439,7 @@ int __init mx53_clocks_init(unsigned long rate_ckil, unsigned long rate_osc,
440 mx5_clocks_common_init(rate_ckil, rate_osc, rate_ckih1, rate_ckih2); 439 mx5_clocks_common_init(rate_ckil, rate_osc, rate_ckih1, rate_ckih2);
441 440
442 clk_register_clkdev(clk[vpu_gate], NULL, "imx53-vpu.0"); 441 clk_register_clkdev(clk[vpu_gate], NULL, "imx53-vpu.0");
443 clk_register_clkdev(clk[i2c3_gate], NULL, "imx-i2c.2"); 442 clk_register_clkdev(clk[i2c3_gate], NULL, "imx21-i2c.2");
444 clk_register_clkdev(clk[fec_gate], NULL, "imx25-fec.0"); 443 clk_register_clkdev(clk[fec_gate], NULL, "imx25-fec.0");
445 clk_register_clkdev(clk[ipu_gate], "bus", "imx53-ipu"); 444 clk_register_clkdev(clk[ipu_gate], "bus", "imx53-ipu");
446 clk_register_clkdev(clk[ipu_di0_gate], "di0", "imx53-ipu"); 445 clk_register_clkdev(clk[ipu_di0_gate], "di0", "imx53-ipu");
diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c
index 3ec242f3341e..e5a82bb95b52 100644
--- a/arch/arm/mach-imx/clk-imx6q.c
+++ b/arch/arm/mach-imx/clk-imx6q.c
@@ -19,8 +19,9 @@
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 <mach/common.h> 22
23#include "clk.h" 23#include "clk.h"
24#include "common.h"
24 25
25#define CCGR0 0x68 26#define CCGR0 0x68
26#define CCGR1 0x6c 27#define CCGR1 0x6c
diff --git a/arch/arm/mach-imx/clk-pllv1.c b/arch/arm/mach-imx/clk-pllv1.c
index 02be73178912..abff350ba24c 100644
--- a/arch/arm/mach-imx/clk-pllv1.c
+++ b/arch/arm/mach-imx/clk-pllv1.c
@@ -4,10 +4,10 @@
4#include <linux/slab.h> 4#include <linux/slab.h>
5#include <linux/kernel.h> 5#include <linux/kernel.h>
6#include <linux/err.h> 6#include <linux/err.h>
7#include <mach/common.h>
8#include <mach/hardware.h>
9 7
10#include "clk.h" 8#include "clk.h"
9#include "common.h"
10#include "hardware.h"
11 11
12/** 12/**
13 * pll v1 13 * pll v1
diff --git a/arch/arm/plat-mxc/include/mach/common.h b/arch/arm/mach-imx/common.h
index ead901814c0d..ef8db6b34841 100644
--- a/arch/arm/plat-mxc/include/mach/common.h
+++ b/arch/arm/mach-imx/common.h
@@ -79,6 +79,7 @@ extern void mxc_arch_reset_init(void __iomem *);
79extern int mx53_revision(void); 79extern int mx53_revision(void);
80extern int mx53_display_revision(void); 80extern int mx53_display_revision(void);
81extern void imx_set_aips(void __iomem *); 81extern void imx_set_aips(void __iomem *);
82extern int mxc_device_init(void);
82 83
83enum mxc_cpu_pwr_mode { 84enum mxc_cpu_pwr_mode {
84 WAIT_CLOCKED, /* wfi only */ 85 WAIT_CLOCKED, /* wfi only */
diff --git a/arch/arm/mach-imx/cpu-imx25.c b/arch/arm/mach-imx/cpu-imx25.c
index 6914bcbf84e4..96ec64b5ff7d 100644
--- a/arch/arm/mach-imx/cpu-imx25.c
+++ b/arch/arm/mach-imx/cpu-imx25.c
@@ -11,8 +11,9 @@
11 */ 11 */
12#include <linux/module.h> 12#include <linux/module.h>
13#include <linux/io.h> 13#include <linux/io.h>
14#include <mach/hardware.h> 14
15#include <mach/iim.h> 15#include "iim.h"
16#include "hardware.h"
16 17
17static int mx25_cpu_rev = -1; 18static int mx25_cpu_rev = -1;
18 19
diff --git a/arch/arm/mach-imx/cpu-imx27.c b/arch/arm/mach-imx/cpu-imx27.c
index ff38e1505f67..fe8d36f7e30e 100644
--- a/arch/arm/mach-imx/cpu-imx27.c
+++ b/arch/arm/mach-imx/cpu-imx27.c
@@ -24,7 +24,7 @@
24#include <linux/io.h> 24#include <linux/io.h>
25#include <linux/module.h> 25#include <linux/module.h>
26 26
27#include <mach/hardware.h> 27#include "hardware.h"
28 28
29static int mx27_cpu_rev = -1; 29static int mx27_cpu_rev = -1;
30static int mx27_cpu_partnumber; 30static int mx27_cpu_partnumber;
diff --git a/arch/arm/mach-imx/cpu-imx31.c b/arch/arm/mach-imx/cpu-imx31.c
index 3f2345f0cdaf..fde1860a2521 100644
--- a/arch/arm/mach-imx/cpu-imx31.c
+++ b/arch/arm/mach-imx/cpu-imx31.c
@@ -11,9 +11,10 @@
11 11
12#include <linux/module.h> 12#include <linux/module.h>
13#include <linux/io.h> 13#include <linux/io.h>
14#include <mach/hardware.h> 14
15#include <mach/iim.h> 15#include "common.h"
16#include <mach/common.h> 16#include "hardware.h"
17#include "iim.h"
17 18
18static int mx31_cpu_rev = -1; 19static int mx31_cpu_rev = -1;
19 20
diff --git a/arch/arm/mach-imx/cpu-imx35.c b/arch/arm/mach-imx/cpu-imx35.c
index 846e46eb8cbf..ec3aaa098c17 100644
--- a/arch/arm/mach-imx/cpu-imx35.c
+++ b/arch/arm/mach-imx/cpu-imx35.c
@@ -10,8 +10,9 @@
10 */ 10 */
11#include <linux/module.h> 11#include <linux/module.h>
12#include <linux/io.h> 12#include <linux/io.h>
13#include <mach/hardware.h> 13
14#include <mach/iim.h> 14#include "hardware.h"
15#include "iim.h"
15 16
16static int mx35_cpu_rev = -1; 17static int mx35_cpu_rev = -1;
17 18
diff --git a/arch/arm/mach-imx/cpu-imx5.c b/arch/arm/mach-imx/cpu-imx5.c
index 8eb15a2fcaf9..d88760014ff9 100644
--- a/arch/arm/mach-imx/cpu-imx5.c
+++ b/arch/arm/mach-imx/cpu-imx5.c
@@ -15,9 +15,10 @@
15#include <linux/kernel.h> 15#include <linux/kernel.h>
16#include <linux/init.h> 16#include <linux/init.h>
17#include <linux/module.h> 17#include <linux/module.h>
18#include <mach/hardware.h>
19#include <linux/io.h> 18#include <linux/io.h>
20 19
20#include "hardware.h"
21
21static int mx5_cpu_rev = -1; 22static int mx5_cpu_rev = -1;
22 23
23#define IIM_SREV 0x24 24#define IIM_SREV 0x24
diff --git a/arch/arm/plat-mxc/cpu.c b/arch/arm/mach-imx/cpu.c
index 220dd6f93126..03fcbd082593 100644
--- a/arch/arm/plat-mxc/cpu.c
+++ b/arch/arm/mach-imx/cpu.c
@@ -1,7 +1,8 @@
1 1
2#include <linux/module.h> 2#include <linux/module.h>
3#include <linux/io.h> 3#include <linux/io.h>
4#include <mach/hardware.h> 4
5#include "hardware.h"
5 6
6unsigned int __mxc_cpu_type; 7unsigned int __mxc_cpu_type;
7EXPORT_SYMBOL(__mxc_cpu_type); 8EXPORT_SYMBOL(__mxc_cpu_type);
diff --git a/arch/arm/mach-imx/cpu_op-mx51.c b/arch/arm/mach-imx/cpu_op-mx51.c
index 7b92cd6da6d3..b9ef692b61a2 100644
--- a/arch/arm/mach-imx/cpu_op-mx51.c
+++ b/arch/arm/mach-imx/cpu_op-mx51.c
@@ -13,9 +13,10 @@
13 13
14#include <linux/bug.h> 14#include <linux/bug.h>
15#include <linux/types.h> 15#include <linux/types.h>
16#include <mach/hardware.h>
17#include <linux/kernel.h> 16#include <linux/kernel.h>
18 17
18#include "hardware.h"
19
19static struct cpu_op mx51_cpu_op[] = { 20static struct cpu_op mx51_cpu_op[] = {
20 { 21 {
21 .cpu_rate = 160000000,}, 22 .cpu_rate = 160000000,},
diff --git a/arch/arm/plat-mxc/cpufreq.c b/arch/arm/mach-imx/cpufreq.c
index b5b6f8083130..36e8b3994470 100644
--- a/arch/arm/plat-mxc/cpufreq.c
+++ b/arch/arm/mach-imx/cpufreq.c
@@ -22,7 +22,8 @@
22#include <linux/clk.h> 22#include <linux/clk.h>
23#include <linux/err.h> 23#include <linux/err.h>
24#include <linux/slab.h> 24#include <linux/slab.h>
25#include <mach/hardware.h> 25
26#include "hardware.h"
26 27
27#define CLK32_FREQ 32768 28#define CLK32_FREQ 32768
28#define NANOSECOND (1000 * 1000 * 1000) 29#define NANOSECOND (1000 * 1000 * 1000)
diff --git a/arch/arm/plat-mxc/cpuidle.c b/arch/arm/mach-imx/cpuidle.c
index d4cb511a44a8..d4cb511a44a8 100644
--- a/arch/arm/plat-mxc/cpuidle.c
+++ b/arch/arm/mach-imx/cpuidle.c
diff --git a/arch/arm/plat-mxc/include/mach/cpuidle.h b/arch/arm/mach-imx/cpuidle.h
index bc932d1af372..bc932d1af372 100644
--- a/arch/arm/plat-mxc/include/mach/cpuidle.h
+++ b/arch/arm/mach-imx/cpuidle.h
diff --git a/arch/arm/mach-imx/devices-imx1.h b/arch/arm/mach-imx/devices-imx1.h
index 3aad1e70de96..f9b5afc6bcd1 100644
--- a/arch/arm/mach-imx/devices-imx1.h
+++ b/arch/arm/mach-imx/devices-imx1.h
@@ -6,8 +6,7 @@
6 * the terms of the GNU General Public License version 2 as published by the 6 * the terms of the GNU General Public License version 2 as published by the
7 * Free Software Foundation. 7 * Free Software Foundation.
8 */ 8 */
9#include <mach/mx1.h> 9#include "devices/devices-common.h"
10#include <mach/devices-common.h>
11 10
12extern const struct imx_imx_fb_data imx1_imx_fb_data; 11extern const struct imx_imx_fb_data imx1_imx_fb_data;
13#define imx1_add_imx_fb(pdata) \ 12#define imx1_add_imx_fb(pdata) \
diff --git a/arch/arm/mach-imx/devices-imx21.h b/arch/arm/mach-imx/devices-imx21.h
index 93ece55f75df..bd9393280159 100644
--- a/arch/arm/mach-imx/devices-imx21.h
+++ b/arch/arm/mach-imx/devices-imx21.h
@@ -6,8 +6,7 @@
6 * the terms of the GNU General Public License version 2 as published by the 6 * the terms of the GNU General Public License version 2 as published by the
7 * Free Software Foundation. 7 * Free Software Foundation.
8 */ 8 */
9#include <mach/mx21.h> 9#include "devices/devices-common.h"
10#include <mach/devices-common.h>
11 10
12extern const struct imx_imx21_hcd_data imx21_imx21_hcd_data; 11extern const struct imx_imx21_hcd_data imx21_imx21_hcd_data;
13#define imx21_add_imx21_hcd(pdata) \ 12#define imx21_add_imx21_hcd(pdata) \
diff --git a/arch/arm/mach-imx/devices-imx25.h b/arch/arm/mach-imx/devices-imx25.h
index f8e03dd1f116..0d2922bc575c 100644
--- a/arch/arm/mach-imx/devices-imx25.h
+++ b/arch/arm/mach-imx/devices-imx25.h
@@ -6,8 +6,7 @@
6 * the terms of the GNU General Public License version 2 as published by the 6 * the terms of the GNU General Public License version 2 as published by the
7 * Free Software Foundation. 7 * Free Software Foundation.
8 */ 8 */
9#include <mach/mx25.h> 9#include "devices/devices-common.h"
10#include <mach/devices-common.h>
11 10
12extern const struct imx_fec_data imx25_fec_data; 11extern const struct imx_fec_data imx25_fec_data;
13#define imx25_add_fec(pdata) \ 12#define imx25_add_fec(pdata) \
diff --git a/arch/arm/mach-imx/devices-imx27.h b/arch/arm/mach-imx/devices-imx27.h
index 04822932cdd1..8a1ad7972d4c 100644
--- a/arch/arm/mach-imx/devices-imx27.h
+++ b/arch/arm/mach-imx/devices-imx27.h
@@ -6,8 +6,7 @@
6 * the terms of the GNU General Public License version 2 as published by the 6 * the terms of the GNU General Public License version 2 as published by the
7 * Free Software Foundation. 7 * Free Software Foundation.
8 */ 8 */
9#include <mach/mx27.h> 9#include "devices/devices-common.h"
10#include <mach/devices-common.h>
11 10
12extern const struct imx_fec_data imx27_fec_data; 11extern const struct imx_fec_data imx27_fec_data;
13#define imx27_add_fec(pdata) \ 12#define imx27_add_fec(pdata) \
diff --git a/arch/arm/mach-imx/devices-imx31.h b/arch/arm/mach-imx/devices-imx31.h
index 8b2ceb45bb83..e8d1611bbc8e 100644
--- a/arch/arm/mach-imx/devices-imx31.h
+++ b/arch/arm/mach-imx/devices-imx31.h
@@ -6,8 +6,7 @@
6 * the terms of the GNU General Public License version 2 as published by the 6 * the terms of the GNU General Public License version 2 as published by the
7 * Free Software Foundation. 7 * Free Software Foundation.
8 */ 8 */
9#include <mach/mx31.h> 9#include "devices/devices-common.h"
10#include <mach/devices-common.h>
11 10
12extern const struct imx_fsl_usb2_udc_data imx31_fsl_usb2_udc_data; 11extern const struct imx_fsl_usb2_udc_data imx31_fsl_usb2_udc_data;
13#define imx31_add_fsl_usb2_udc(pdata) \ 12#define imx31_add_fsl_usb2_udc(pdata) \
diff --git a/arch/arm/mach-imx/devices-imx35.h b/arch/arm/mach-imx/devices-imx35.h
index c3e9f206ac2b..e2675f1b141c 100644
--- a/arch/arm/mach-imx/devices-imx35.h
+++ b/arch/arm/mach-imx/devices-imx35.h
@@ -6,8 +6,7 @@
6 * the terms of the GNU General Public License version 2 as published by the 6 * the terms of the GNU General Public License version 2 as published by the
7 * Free Software Foundation. 7 * Free Software Foundation.
8 */ 8 */
9#include <mach/mx35.h> 9#include "devices/devices-common.h"
10#include <mach/devices-common.h>
11 10
12extern const struct imx_fec_data imx35_fec_data; 11extern const struct imx_fec_data imx35_fec_data;
13#define imx35_add_fec(pdata) \ 12#define imx35_add_fec(pdata) \
diff --git a/arch/arm/mach-imx/devices-imx50.h b/arch/arm/mach-imx/devices-imx50.h
index 7216667eaafc..2c290391f298 100644
--- a/arch/arm/mach-imx/devices-imx50.h
+++ b/arch/arm/mach-imx/devices-imx50.h
@@ -18,8 +18,7 @@
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 */ 19 */
20 20
21#include <mach/mx50.h> 21#include "devices/devices-common.h"
22#include <mach/devices-common.h>
23 22
24extern const struct imx_imx_uart_1irq_data imx50_imx_uart_data[]; 23extern const struct imx_imx_uart_1irq_data imx50_imx_uart_data[];
25#define imx50_add_imx_uart(id, pdata) \ 24#define imx50_add_imx_uart(id, pdata) \
diff --git a/arch/arm/mach-imx/devices-imx51.h b/arch/arm/mach-imx/devices-imx51.h
index 9f1718725195..deee5baee88c 100644
--- a/arch/arm/mach-imx/devices-imx51.h
+++ b/arch/arm/mach-imx/devices-imx51.h
@@ -6,8 +6,7 @@
6 * the terms of the GNU General Public License version 2 as published by the 6 * the terms of the GNU General Public License version 2 as published by the
7 * Free Software Foundation. 7 * Free Software Foundation.
8 */ 8 */
9#include <mach/mx51.h> 9#include "devices/devices-common.h"
10#include <mach/devices-common.h>
11 10
12extern const struct imx_fec_data imx51_fec_data; 11extern const struct imx_fec_data imx51_fec_data;
13#define imx51_add_fec(pdata) \ 12#define imx51_add_fec(pdata) \
diff --git a/arch/arm/plat-mxc/devices/Kconfig b/arch/arm/mach-imx/devices/Kconfig
index a35d9841f494..a35d9841f494 100644
--- a/arch/arm/plat-mxc/devices/Kconfig
+++ b/arch/arm/mach-imx/devices/Kconfig
diff --git a/arch/arm/plat-mxc/devices/Makefile b/arch/arm/mach-imx/devices/Makefile
index 76f3195475d0..2abe2a5144d0 100644
--- a/arch/arm/plat-mxc/devices/Makefile
+++ b/arch/arm/mach-imx/devices/Makefile
@@ -1,3 +1,5 @@
1obj-y := devices.o
2
1obj-$(CONFIG_IMX_HAVE_PLATFORM_FEC) += platform-fec.o 3obj-$(CONFIG_IMX_HAVE_PLATFORM_FEC) += platform-fec.o
2obj-$(CONFIG_IMX_HAVE_PLATFORM_FLEXCAN) += platform-flexcan.o 4obj-$(CONFIG_IMX_HAVE_PLATFORM_FLEXCAN) += platform-flexcan.o
3obj-$(CONFIG_IMX_HAVE_PLATFORM_FSL_USB2_UDC) += platform-fsl-usb2-udc.o 5obj-$(CONFIG_IMX_HAVE_PLATFORM_FSL_USB2_UDC) += platform-fsl-usb2-udc.o
diff --git a/arch/arm/plat-mxc/include/mach/devices-common.h b/arch/arm/mach-imx/devices/devices-common.h
index eaf79d220c9a..e4b790b9e2aa 100644
--- a/arch/arm/plat-mxc/include/mach/devices-common.h
+++ b/arch/arm/mach-imx/devices/devices-common.h
@@ -108,6 +108,7 @@ struct platform_device *__init imx_add_imxdi_rtc(
108 108
109#include <linux/platform_data/video-imxfb.h> 109#include <linux/platform_data/video-imxfb.h>
110struct imx_imx_fb_data { 110struct imx_imx_fb_data {
111 const char *devid;
111 resource_size_t iobase; 112 resource_size_t iobase;
112 resource_size_t iosize; 113 resource_size_t iosize;
113 resource_size_t irq; 114 resource_size_t irq;
@@ -118,6 +119,7 @@ struct platform_device *__init imx_add_imx_fb(
118 119
119#include <linux/platform_data/i2c-imx.h> 120#include <linux/platform_data/i2c-imx.h>
120struct imx_imx_i2c_data { 121struct imx_imx_i2c_data {
122 const char *devid;
121 int id; 123 int id;
122 resource_size_t iobase; 124 resource_size_t iobase;
123 resource_size_t iosize; 125 resource_size_t iosize;
@@ -219,6 +221,7 @@ struct platform_device *__init imx_add_mx1_camera(
219 221
220#include <linux/platform_data/camera-mx2.h> 222#include <linux/platform_data/camera-mx2.h>
221struct imx_mx2_camera_data { 223struct imx_mx2_camera_data {
224 const char *devid;
222 resource_size_t iobasecsi; 225 resource_size_t iobasecsi;
223 resource_size_t iosizecsi; 226 resource_size_t iosizecsi;
224 resource_size_t irqcsi; 227 resource_size_t irqcsi;
@@ -244,6 +247,7 @@ struct platform_device *__init imx_add_mxc_ehci(
244 247
245#include <linux/platform_data/mmc-mxcmmc.h> 248#include <linux/platform_data/mmc-mxcmmc.h>
246struct imx_mxc_mmc_data { 249struct imx_mxc_mmc_data {
250 const char *devid;
247 int id; 251 int id;
248 resource_size_t iobase; 252 resource_size_t iobase;
249 resource_size_t iosize; 253 resource_size_t iosize;
@@ -256,6 +260,7 @@ struct platform_device *__init imx_add_mxc_mmc(
256 260
257#include <linux/platform_data/mtd-mxc_nand.h> 261#include <linux/platform_data/mtd-mxc_nand.h>
258struct imx_mxc_nand_data { 262struct imx_mxc_nand_data {
263 const char *devid;
259 /* 264 /*
260 * id is traditionally 0, but -1 is more appropriate. We use -1 for new 265 * id is traditionally 0, but -1 is more appropriate. We use -1 for new
261 * machines but don't change existing devices as the nand device usually 266 * machines but don't change existing devices as the nand device usually
@@ -290,6 +295,7 @@ struct platform_device *__init imx_add_mxc_pwm(
290 295
291/* mxc_rtc */ 296/* mxc_rtc */
292struct imx_mxc_rtc_data { 297struct imx_mxc_rtc_data {
298 const char *devid;
293 resource_size_t iobase; 299 resource_size_t iobase;
294 resource_size_t irq; 300 resource_size_t irq;
295}; 301};
@@ -326,7 +332,8 @@ struct platform_device *__init imx_add_spi_imx(
326 const struct imx_spi_imx_data *data, 332 const struct imx_spi_imx_data *data,
327 const struct spi_imx_master *pdata); 333 const struct spi_imx_master *pdata);
328 334
329struct platform_device *imx_add_imx_dma(void); 335struct platform_device *imx_add_imx_dma(char *name, resource_size_t iobase,
336 int irq, int irq_err);
330struct platform_device *imx_add_imx_sdma(char *name, 337struct platform_device *imx_add_imx_sdma(char *name,
331 resource_size_t iobase, int irq, struct sdma_platform_data *pdata); 338 resource_size_t iobase, int irq, struct sdma_platform_data *pdata);
332 339
diff --git a/arch/arm/plat-mxc/devices.c b/arch/arm/mach-imx/devices/devices.c
index 4d55a7a26e98..1b37482407f9 100644
--- a/arch/arm/plat-mxc/devices.c
+++ b/arch/arm/mach-imx/devices/devices.c
@@ -21,7 +21,6 @@
21#include <linux/init.h> 21#include <linux/init.h>
22#include <linux/err.h> 22#include <linux/err.h>
23#include <linux/platform_device.h> 23#include <linux/platform_device.h>
24#include <mach/common.h>
25 24
26struct device mxc_aips_bus = { 25struct device mxc_aips_bus = {
27 .init_name = "mxc_aips", 26 .init_name = "mxc_aips",
@@ -33,7 +32,7 @@ struct device mxc_ahb_bus = {
33 .parent = &platform_bus, 32 .parent = &platform_bus,
34}; 33};
35 34
36static int __init mxc_device_init(void) 35int __init mxc_device_init(void)
37{ 36{
38 int ret; 37 int ret;
39 38
@@ -46,4 +45,3 @@ static int __init mxc_device_init(void)
46done: 45done:
47 return ret; 46 return ret;
48} 47}
49core_initcall(mxc_device_init);
diff --git a/arch/arm/plat-mxc/devices/platform-ahci-imx.c b/arch/arm/mach-imx/devices/platform-ahci-imx.c
index ade4a1c4e2a3..3d87dd9c284a 100644
--- a/arch/arm/plat-mxc/devices/platform-ahci-imx.c
+++ b/arch/arm/mach-imx/devices/platform-ahci-imx.c
@@ -24,8 +24,9 @@
24#include <linux/device.h> 24#include <linux/device.h>
25#include <linux/dma-mapping.h> 25#include <linux/dma-mapping.h>
26#include <asm/sizes.h> 26#include <asm/sizes.h>
27#include <mach/hardware.h> 27
28#include <mach/devices-common.h> 28#include "../hardware.h"
29#include "devices-common.h"
29 30
30#define imx_ahci_imx_data_entry_single(soc, _devid) \ 31#define imx_ahci_imx_data_entry_single(soc, _devid) \
31 { \ 32 { \
diff --git a/arch/arm/plat-mxc/devices/platform-fec.c b/arch/arm/mach-imx/devices/platform-fec.c
index 0bae44e890db..2cb188ad9a0a 100644
--- a/arch/arm/plat-mxc/devices/platform-fec.c
+++ b/arch/arm/mach-imx/devices/platform-fec.c
@@ -8,8 +8,9 @@
8 */ 8 */
9#include <linux/dma-mapping.h> 9#include <linux/dma-mapping.h>
10#include <asm/sizes.h> 10#include <asm/sizes.h>
11#include <mach/hardware.h> 11
12#include <mach/devices-common.h> 12#include "../hardware.h"
13#include "devices-common.h"
13 14
14#define imx_fec_data_entry_single(soc, _devid) \ 15#define imx_fec_data_entry_single(soc, _devid) \
15 { \ 16 { \
diff --git a/arch/arm/plat-mxc/devices/platform-flexcan.c b/arch/arm/mach-imx/devices/platform-flexcan.c
index 4e8497af2eb1..1078bf0a94ef 100644
--- a/arch/arm/plat-mxc/devices/platform-flexcan.c
+++ b/arch/arm/mach-imx/devices/platform-flexcan.c
@@ -5,8 +5,8 @@
5 * the terms of the GNU General Public License version 2 as published by the 5 * the terms of the GNU General Public License version 2 as published by the
6 * Free Software Foundation. 6 * Free Software Foundation.
7 */ 7 */
8#include <mach/hardware.h> 8#include "../hardware.h"
9#include <mach/devices-common.h> 9#include "devices-common.h"
10 10
11#define imx_flexcan_data_entry_single(soc, _id, _hwid, _size) \ 11#define imx_flexcan_data_entry_single(soc, _id, _hwid, _size) \
12 { \ 12 { \
diff --git a/arch/arm/plat-mxc/devices/platform-fsl-usb2-udc.c b/arch/arm/mach-imx/devices/platform-fsl-usb2-udc.c
index 848038f301fd..37e44398197b 100644
--- a/arch/arm/plat-mxc/devices/platform-fsl-usb2-udc.c
+++ b/arch/arm/mach-imx/devices/platform-fsl-usb2-udc.c
@@ -7,8 +7,9 @@
7 * Free Software Foundation. 7 * Free Software Foundation.
8 */ 8 */
9#include <linux/dma-mapping.h> 9#include <linux/dma-mapping.h>
10#include <mach/hardware.h> 10
11#include <mach/devices-common.h> 11#include "../hardware.h"
12#include "devices-common.h"
12 13
13#define imx_fsl_usb2_udc_data_entry_single(soc) \ 14#define imx_fsl_usb2_udc_data_entry_single(soc) \
14 { \ 15 { \
diff --git a/arch/arm/plat-mxc/devices/platform-gpio-mxc.c b/arch/arm/mach-imx/devices/platform-gpio-mxc.c
index a7919a241032..26483fa94b75 100644
--- a/arch/arm/plat-mxc/devices/platform-gpio-mxc.c
+++ b/arch/arm/mach-imx/devices/platform-gpio-mxc.c
@@ -6,7 +6,7 @@
6 * the terms of the GNU General Public License version 2 as published by the 6 * the terms of the GNU General Public License version 2 as published by the
7 * Free Software Foundation. 7 * Free Software Foundation.
8 */ 8 */
9#include <mach/devices-common.h> 9#include "devices-common.h"
10 10
11struct platform_device *__init mxc_register_gpio(char *name, int id, 11struct platform_device *__init mxc_register_gpio(char *name, int id,
12 resource_size_t iobase, resource_size_t iosize, int irq, int irq_high) 12 resource_size_t iobase, resource_size_t iosize, int irq, int irq_high)
diff --git a/arch/arm/plat-mxc/devices/platform-gpio_keys.c b/arch/arm/mach-imx/devices/platform-gpio_keys.c
index 1c53a532ea0e..486282539c76 100644
--- a/arch/arm/plat-mxc/devices/platform-gpio_keys.c
+++ b/arch/arm/mach-imx/devices/platform-gpio_keys.c
@@ -16,8 +16,9 @@
16 * Boston, MA 02110-1301, USA. 16 * Boston, MA 02110-1301, USA.
17 */ 17 */
18#include <asm/sizes.h> 18#include <asm/sizes.h>
19#include <mach/hardware.h> 19
20#include <mach/devices-common.h> 20#include "../hardware.h"
21#include "devices-common.h"
21 22
22struct platform_device *__init imx_add_gpio_keys( 23struct platform_device *__init imx_add_gpio_keys(
23 const struct gpio_keys_platform_data *pdata) 24 const struct gpio_keys_platform_data *pdata)
diff --git a/arch/arm/plat-mxc/devices/platform-imx-dma.c b/arch/arm/mach-imx/devices/platform-imx-dma.c
index 7fa7e9c92468..ccdb5dc4ddbd 100644
--- a/arch/arm/plat-mxc/devices/platform-imx-dma.c
+++ b/arch/arm/mach-imx/devices/platform-imx-dma.c
@@ -6,12 +6,29 @@
6 * the terms of the GNU General Public License version 2 as published by the 6 * the terms of the GNU General Public License version 2 as published by the
7 * Free Software Foundation. 7 * Free Software Foundation.
8 */ 8 */
9#include <mach/devices-common.h> 9#include "devices-common.h"
10 10
11struct platform_device __init __maybe_unused *imx_add_imx_dma(void) 11struct platform_device __init __maybe_unused *imx_add_imx_dma(char *name,
12 resource_size_t iobase, int irq, int irq_err)
12{ 13{
14 struct resource res[] = {
15 {
16 .start = iobase,
17 .end = iobase + SZ_4K - 1,
18 .flags = IORESOURCE_MEM,
19 }, {
20 .start = irq,
21 .end = irq,
22 .flags = IORESOURCE_IRQ,
23 }, {
24 .start = irq_err,
25 .end = irq_err,
26 .flags = IORESOURCE_IRQ,
27 },
28 };
29
13 return platform_device_register_resndata(&mxc_ahb_bus, 30 return platform_device_register_resndata(&mxc_ahb_bus,
14 "imx-dma", -1, NULL, 0, NULL, 0); 31 name, -1, res, ARRAY_SIZE(res), NULL, 0);
15} 32}
16 33
17struct platform_device __init __maybe_unused *imx_add_imx_sdma(char *name, 34struct platform_device __init __maybe_unused *imx_add_imx_sdma(char *name,
diff --git a/arch/arm/plat-mxc/devices/platform-imx-fb.c b/arch/arm/mach-imx/devices/platform-imx-fb.c
index 2b0b5e0aa998..10b0ed39f07f 100644
--- a/arch/arm/plat-mxc/devices/platform-imx-fb.c
+++ b/arch/arm/mach-imx/devices/platform-imx-fb.c
@@ -7,11 +7,13 @@
7 * Free Software Foundation. 7 * Free Software Foundation.
8 */ 8 */
9#include <linux/dma-mapping.h> 9#include <linux/dma-mapping.h>
10#include <mach/hardware.h>
11#include <mach/devices-common.h>
12 10
13#define imx_imx_fb_data_entry_single(soc, _size) \ 11#include "../hardware.h"
12#include "devices-common.h"
13
14#define imx_imx_fb_data_entry_single(soc, _devid, _size) \
14 { \ 15 { \
16 .devid = _devid, \
15 .iobase = soc ## _LCDC_BASE_ADDR, \ 17 .iobase = soc ## _LCDC_BASE_ADDR, \
16 .iosize = _size, \ 18 .iosize = _size, \
17 .irq = soc ## _INT_LCDC, \ 19 .irq = soc ## _INT_LCDC, \
@@ -19,22 +21,22 @@
19 21
20#ifdef CONFIG_SOC_IMX1 22#ifdef CONFIG_SOC_IMX1
21const struct imx_imx_fb_data imx1_imx_fb_data __initconst = 23const struct imx_imx_fb_data imx1_imx_fb_data __initconst =
22 imx_imx_fb_data_entry_single(MX1, SZ_4K); 24 imx_imx_fb_data_entry_single(MX1, "imx1-fb", SZ_4K);
23#endif /* ifdef CONFIG_SOC_IMX1 */ 25#endif /* ifdef CONFIG_SOC_IMX1 */
24 26
25#ifdef CONFIG_SOC_IMX21 27#ifdef CONFIG_SOC_IMX21
26const struct imx_imx_fb_data imx21_imx_fb_data __initconst = 28const struct imx_imx_fb_data imx21_imx_fb_data __initconst =
27 imx_imx_fb_data_entry_single(MX21, SZ_4K); 29 imx_imx_fb_data_entry_single(MX21, "imx21-fb", SZ_4K);
28#endif /* ifdef CONFIG_SOC_IMX21 */ 30#endif /* ifdef CONFIG_SOC_IMX21 */
29 31
30#ifdef CONFIG_SOC_IMX25 32#ifdef CONFIG_SOC_IMX25
31const struct imx_imx_fb_data imx25_imx_fb_data __initconst = 33const struct imx_imx_fb_data imx25_imx_fb_data __initconst =
32 imx_imx_fb_data_entry_single(MX25, SZ_16K); 34 imx_imx_fb_data_entry_single(MX25, "imx21-fb", SZ_16K);
33#endif /* ifdef CONFIG_SOC_IMX25 */ 35#endif /* ifdef CONFIG_SOC_IMX25 */
34 36
35#ifdef CONFIG_SOC_IMX27 37#ifdef CONFIG_SOC_IMX27
36const struct imx_imx_fb_data imx27_imx_fb_data __initconst = 38const struct imx_imx_fb_data imx27_imx_fb_data __initconst =
37 imx_imx_fb_data_entry_single(MX27, SZ_4K); 39 imx_imx_fb_data_entry_single(MX27, "imx21-fb", SZ_4K);
38#endif /* ifdef CONFIG_SOC_IMX27 */ 40#endif /* ifdef CONFIG_SOC_IMX27 */
39 41
40struct platform_device *__init imx_add_imx_fb( 42struct platform_device *__init imx_add_imx_fb(
diff --git a/arch/arm/plat-mxc/devices/platform-imx-i2c.c b/arch/arm/mach-imx/devices/platform-imx-i2c.c
index 19ad580c0be3..8e30e5703cd2 100644
--- a/arch/arm/plat-mxc/devices/platform-imx-i2c.c
+++ b/arch/arm/mach-imx/devices/platform-imx-i2c.c
@@ -6,34 +6,35 @@
6 * the terms of the GNU General Public License version 2 as published by the 6 * the terms of the GNU General Public License version 2 as published by the
7 * Free Software Foundation. 7 * Free Software Foundation.
8 */ 8 */
9#include <mach/hardware.h> 9#include "../hardware.h"
10#include <mach/devices-common.h> 10#include "devices-common.h"
11 11
12#define imx_imx_i2c_data_entry_single(soc, _id, _hwid, _size) \ 12#define imx_imx_i2c_data_entry_single(soc, _devid, _id, _hwid, _size) \
13 { \ 13 { \
14 .devid = _devid, \
14 .id = _id, \ 15 .id = _id, \
15 .iobase = soc ## _I2C ## _hwid ## _BASE_ADDR, \ 16 .iobase = soc ## _I2C ## _hwid ## _BASE_ADDR, \
16 .iosize = _size, \ 17 .iosize = _size, \
17 .irq = soc ## _INT_I2C ## _hwid, \ 18 .irq = soc ## _INT_I2C ## _hwid, \
18 } 19 }
19 20
20#define imx_imx_i2c_data_entry(soc, _id, _hwid, _size) \ 21#define imx_imx_i2c_data_entry(soc, _devid, _id, _hwid, _size) \
21 [_id] = imx_imx_i2c_data_entry_single(soc, _id, _hwid, _size) 22 [_id] = imx_imx_i2c_data_entry_single(soc, _devid, _id, _hwid, _size)
22 23
23#ifdef CONFIG_SOC_IMX1 24#ifdef CONFIG_SOC_IMX1
24const struct imx_imx_i2c_data imx1_imx_i2c_data __initconst = 25const struct imx_imx_i2c_data imx1_imx_i2c_data __initconst =
25 imx_imx_i2c_data_entry_single(MX1, 0, , SZ_4K); 26 imx_imx_i2c_data_entry_single(MX1, "imx1-i2c", 0, , SZ_4K);
26#endif /* ifdef CONFIG_SOC_IMX1 */ 27#endif /* ifdef CONFIG_SOC_IMX1 */
27 28
28#ifdef CONFIG_SOC_IMX21 29#ifdef CONFIG_SOC_IMX21
29const struct imx_imx_i2c_data imx21_imx_i2c_data __initconst = 30const struct imx_imx_i2c_data imx21_imx_i2c_data __initconst =
30 imx_imx_i2c_data_entry_single(MX21, 0, , SZ_4K); 31 imx_imx_i2c_data_entry_single(MX21, "imx21-i2c", 0, , SZ_4K);
31#endif /* ifdef CONFIG_SOC_IMX21 */ 32#endif /* ifdef CONFIG_SOC_IMX21 */
32 33
33#ifdef CONFIG_SOC_IMX25 34#ifdef CONFIG_SOC_IMX25
34const struct imx_imx_i2c_data imx25_imx_i2c_data[] __initconst = { 35const struct imx_imx_i2c_data imx25_imx_i2c_data[] __initconst = {
35#define imx25_imx_i2c_data_entry(_id, _hwid) \ 36#define imx25_imx_i2c_data_entry(_id, _hwid) \
36 imx_imx_i2c_data_entry(MX25, _id, _hwid, SZ_16K) 37 imx_imx_i2c_data_entry(MX25, "imx21-i2c", _id, _hwid, SZ_16K)
37 imx25_imx_i2c_data_entry(0, 1), 38 imx25_imx_i2c_data_entry(0, 1),
38 imx25_imx_i2c_data_entry(1, 2), 39 imx25_imx_i2c_data_entry(1, 2),
39 imx25_imx_i2c_data_entry(2, 3), 40 imx25_imx_i2c_data_entry(2, 3),
@@ -43,7 +44,7 @@ const struct imx_imx_i2c_data imx25_imx_i2c_data[] __initconst = {
43#ifdef CONFIG_SOC_IMX27 44#ifdef CONFIG_SOC_IMX27
44const struct imx_imx_i2c_data imx27_imx_i2c_data[] __initconst = { 45const struct imx_imx_i2c_data imx27_imx_i2c_data[] __initconst = {
45#define imx27_imx_i2c_data_entry(_id, _hwid) \ 46#define imx27_imx_i2c_data_entry(_id, _hwid) \
46 imx_imx_i2c_data_entry(MX27, _id, _hwid, SZ_4K) 47 imx_imx_i2c_data_entry(MX27, "imx21-i2c", _id, _hwid, SZ_4K)
47 imx27_imx_i2c_data_entry(0, 1), 48 imx27_imx_i2c_data_entry(0, 1),
48 imx27_imx_i2c_data_entry(1, 2), 49 imx27_imx_i2c_data_entry(1, 2),
49}; 50};
@@ -52,7 +53,7 @@ const struct imx_imx_i2c_data imx27_imx_i2c_data[] __initconst = {
52#ifdef CONFIG_SOC_IMX31 53#ifdef CONFIG_SOC_IMX31
53const struct imx_imx_i2c_data imx31_imx_i2c_data[] __initconst = { 54const struct imx_imx_i2c_data imx31_imx_i2c_data[] __initconst = {
54#define imx31_imx_i2c_data_entry(_id, _hwid) \ 55#define imx31_imx_i2c_data_entry(_id, _hwid) \
55 imx_imx_i2c_data_entry(MX31, _id, _hwid, SZ_4K) 56 imx_imx_i2c_data_entry(MX31, "imx21-i2c", _id, _hwid, SZ_4K)
56 imx31_imx_i2c_data_entry(0, 1), 57 imx31_imx_i2c_data_entry(0, 1),
57 imx31_imx_i2c_data_entry(1, 2), 58 imx31_imx_i2c_data_entry(1, 2),
58 imx31_imx_i2c_data_entry(2, 3), 59 imx31_imx_i2c_data_entry(2, 3),
@@ -62,7 +63,7 @@ const struct imx_imx_i2c_data imx31_imx_i2c_data[] __initconst = {
62#ifdef CONFIG_SOC_IMX35 63#ifdef CONFIG_SOC_IMX35
63const struct imx_imx_i2c_data imx35_imx_i2c_data[] __initconst = { 64const struct imx_imx_i2c_data imx35_imx_i2c_data[] __initconst = {
64#define imx35_imx_i2c_data_entry(_id, _hwid) \ 65#define imx35_imx_i2c_data_entry(_id, _hwid) \
65 imx_imx_i2c_data_entry(MX35, _id, _hwid, SZ_4K) 66 imx_imx_i2c_data_entry(MX35, "imx21-i2c", _id, _hwid, SZ_4K)
66 imx35_imx_i2c_data_entry(0, 1), 67 imx35_imx_i2c_data_entry(0, 1),
67 imx35_imx_i2c_data_entry(1, 2), 68 imx35_imx_i2c_data_entry(1, 2),
68 imx35_imx_i2c_data_entry(2, 3), 69 imx35_imx_i2c_data_entry(2, 3),
@@ -72,7 +73,7 @@ const struct imx_imx_i2c_data imx35_imx_i2c_data[] __initconst = {
72#ifdef CONFIG_SOC_IMX50 73#ifdef CONFIG_SOC_IMX50
73const struct imx_imx_i2c_data imx50_imx_i2c_data[] __initconst = { 74const struct imx_imx_i2c_data imx50_imx_i2c_data[] __initconst = {
74#define imx50_imx_i2c_data_entry(_id, _hwid) \ 75#define imx50_imx_i2c_data_entry(_id, _hwid) \
75 imx_imx_i2c_data_entry(MX50, _id, _hwid, SZ_4K) 76 imx_imx_i2c_data_entry(MX50, "imx21-i2c", _id, _hwid, SZ_4K)
76 imx50_imx_i2c_data_entry(0, 1), 77 imx50_imx_i2c_data_entry(0, 1),
77 imx50_imx_i2c_data_entry(1, 2), 78 imx50_imx_i2c_data_entry(1, 2),
78 imx50_imx_i2c_data_entry(2, 3), 79 imx50_imx_i2c_data_entry(2, 3),
@@ -82,10 +83,11 @@ const struct imx_imx_i2c_data imx50_imx_i2c_data[] __initconst = {
82#ifdef CONFIG_SOC_IMX51 83#ifdef CONFIG_SOC_IMX51
83const struct imx_imx_i2c_data imx51_imx_i2c_data[] __initconst = { 84const struct imx_imx_i2c_data imx51_imx_i2c_data[] __initconst = {
84#define imx51_imx_i2c_data_entry(_id, _hwid) \ 85#define imx51_imx_i2c_data_entry(_id, _hwid) \
85 imx_imx_i2c_data_entry(MX51, _id, _hwid, SZ_4K) 86 imx_imx_i2c_data_entry(MX51, "imx21-i2c", _id, _hwid, SZ_4K)
86 imx51_imx_i2c_data_entry(0, 1), 87 imx51_imx_i2c_data_entry(0, 1),
87 imx51_imx_i2c_data_entry(1, 2), 88 imx51_imx_i2c_data_entry(1, 2),
88 { 89 {
90 .devid = "imx21-i2c",
89 .id = 2, 91 .id = 2,
90 .iobase = MX51_HSI2C_DMA_BASE_ADDR, 92 .iobase = MX51_HSI2C_DMA_BASE_ADDR,
91 .iosize = SZ_16K, 93 .iosize = SZ_16K,
@@ -97,7 +99,7 @@ const struct imx_imx_i2c_data imx51_imx_i2c_data[] __initconst = {
97#ifdef CONFIG_SOC_IMX53 99#ifdef CONFIG_SOC_IMX53
98const struct imx_imx_i2c_data imx53_imx_i2c_data[] __initconst = { 100const struct imx_imx_i2c_data imx53_imx_i2c_data[] __initconst = {
99#define imx53_imx_i2c_data_entry(_id, _hwid) \ 101#define imx53_imx_i2c_data_entry(_id, _hwid) \
100 imx_imx_i2c_data_entry(MX53, _id, _hwid, SZ_4K) 102 imx_imx_i2c_data_entry(MX53, "imx21-i2c", _id, _hwid, SZ_4K)
101 imx53_imx_i2c_data_entry(0, 1), 103 imx53_imx_i2c_data_entry(0, 1),
102 imx53_imx_i2c_data_entry(1, 2), 104 imx53_imx_i2c_data_entry(1, 2),
103 imx53_imx_i2c_data_entry(2, 3), 105 imx53_imx_i2c_data_entry(2, 3),
@@ -120,7 +122,7 @@ struct platform_device *__init imx_add_imx_i2c(
120 }, 122 },
121 }; 123 };
122 124
123 return imx_add_platform_device("imx-i2c", data->id, 125 return imx_add_platform_device(data->devid, data->id,
124 res, ARRAY_SIZE(res), 126 res, ARRAY_SIZE(res),
125 pdata, sizeof(*pdata)); 127 pdata, sizeof(*pdata));
126} 128}
diff --git a/arch/arm/plat-mxc/devices/platform-imx-keypad.c b/arch/arm/mach-imx/devices/platform-imx-keypad.c
index 479c3e9f771f..8f22a4c98a4c 100644
--- a/arch/arm/plat-mxc/devices/platform-imx-keypad.c
+++ b/arch/arm/mach-imx/devices/platform-imx-keypad.c
@@ -6,8 +6,8 @@
6 * the terms of the GNU General Public License version 2 as published by the 6 * the terms of the GNU General Public License version 2 as published by the
7 * Free Software Foundation. 7 * Free Software Foundation.
8 */ 8 */
9#include <mach/hardware.h> 9#include "../hardware.h"
10#include <mach/devices-common.h> 10#include "devices-common.h"
11 11
12#define imx_imx_keypad_data_entry_single(soc, _size) \ 12#define imx_imx_keypad_data_entry_single(soc, _size) \
13 { \ 13 { \
diff --git a/arch/arm/plat-mxc/devices/platform-imx-ssi.c b/arch/arm/mach-imx/devices/platform-imx-ssi.c
index 21c6f30e1017..bfcb8f3dfa8d 100644
--- a/arch/arm/plat-mxc/devices/platform-imx-ssi.c
+++ b/arch/arm/mach-imx/devices/platform-imx-ssi.c
@@ -6,8 +6,8 @@
6 * the terms of the GNU General Public License version 2 as published by the 6 * the terms of the GNU General Public License version 2 as published by the
7 * Free Software Foundation. 7 * Free Software Foundation.
8 */ 8 */
9#include <mach/hardware.h> 9#include "../hardware.h"
10#include <mach/devices-common.h> 10#include "devices-common.h"
11 11
12#define imx_imx_ssi_data_entry(soc, _id, _hwid, _size) \ 12#define imx_imx_ssi_data_entry(soc, _id, _hwid, _size) \
13 [_id] = { \ 13 [_id] = { \
diff --git a/arch/arm/plat-mxc/devices/platform-imx-uart.c b/arch/arm/mach-imx/devices/platform-imx-uart.c
index d390f00bd294..67bf866a2cb6 100644
--- a/arch/arm/plat-mxc/devices/platform-imx-uart.c
+++ b/arch/arm/mach-imx/devices/platform-imx-uart.c
@@ -6,8 +6,8 @@
6 * the terms of the GNU General Public License version 2 as published by the 6 * the terms of the GNU General Public License version 2 as published by the
7 * Free Software Foundation. 7 * Free Software Foundation.
8 */ 8 */
9#include <mach/hardware.h> 9#include "../hardware.h"
10#include <mach/devices-common.h> 10#include "devices-common.h"
11 11
12#define imx_imx_uart_3irq_data_entry(soc, _id, _hwid, _size) \ 12#define imx_imx_uart_3irq_data_entry(soc, _id, _hwid, _size) \
13 [_id] = { \ 13 [_id] = { \
diff --git a/arch/arm/plat-mxc/devices/platform-imx2-wdt.c b/arch/arm/mach-imx/devices/platform-imx2-wdt.c
index 5e07ef2bf1c4..ec75d6413686 100644
--- a/arch/arm/plat-mxc/devices/platform-imx2-wdt.c
+++ b/arch/arm/mach-imx/devices/platform-imx2-wdt.c
@@ -7,8 +7,9 @@
7 * Free Software Foundation. 7 * Free Software Foundation.
8 */ 8 */
9#include <asm/sizes.h> 9#include <asm/sizes.h>
10#include <mach/hardware.h> 10
11#include <mach/devices-common.h> 11#include "../hardware.h"
12#include "devices-common.h"
12 13
13#define imx_imx2_wdt_data_entry_single(soc, _id, _hwid, _size) \ 14#define imx_imx2_wdt_data_entry_single(soc, _id, _hwid, _size) \
14 { \ 15 { \
diff --git a/arch/arm/plat-mxc/devices/platform-imx21-hcd.c b/arch/arm/mach-imx/devices/platform-imx21-hcd.c
index 5770a42f33bf..30c81616a9a1 100644
--- a/arch/arm/plat-mxc/devices/platform-imx21-hcd.c
+++ b/arch/arm/mach-imx/devices/platform-imx21-hcd.c
@@ -6,8 +6,8 @@
6 * the terms of the GNU General Public License version 2 as published by the 6 * the terms of the GNU General Public License version 2 as published by the
7 * Free Software Foundation. 7 * Free Software Foundation.
8 */ 8 */
9#include <mach/hardware.h> 9#include "../hardware.h"
10#include <mach/devices-common.h> 10#include "devices-common.h"
11 11
12#define imx_imx21_hcd_data_entry_single(soc) \ 12#define imx_imx21_hcd_data_entry_single(soc) \
13 { \ 13 { \
diff --git a/arch/arm/plat-mxc/devices/platform-imx27-coda.c b/arch/arm/mach-imx/devices/platform-imx27-coda.c
index 8b12aacdf396..25bebc29e546 100644
--- a/arch/arm/plat-mxc/devices/platform-imx27-coda.c
+++ b/arch/arm/mach-imx/devices/platform-imx27-coda.c
@@ -7,8 +7,8 @@
7 * Free Software Foundation. 7 * Free Software Foundation.
8 */ 8 */
9 9
10#include <mach/hardware.h> 10#include "../hardware.h"
11#include <mach/devices-common.h> 11#include "devices-common.h"
12 12
13#ifdef CONFIG_SOC_IMX27 13#ifdef CONFIG_SOC_IMX27
14const struct imx_imx27_coda_data imx27_coda_data __initconst = { 14const struct imx_imx27_coda_data imx27_coda_data __initconst = {
diff --git a/arch/arm/plat-mxc/devices/platform-imx_udc.c b/arch/arm/mach-imx/devices/platform-imx_udc.c
index 6fd675dfce14..5ced7e4e2c71 100644
--- a/arch/arm/plat-mxc/devices/platform-imx_udc.c
+++ b/arch/arm/mach-imx/devices/platform-imx_udc.c
@@ -6,8 +6,8 @@
6 * the terms of the GNU General Public License version 2 as published by the 6 * the terms of the GNU General Public License version 2 as published by the
7 * Free Software Foundation. 7 * Free Software Foundation.
8 */ 8 */
9#include <mach/hardware.h> 9#include "../hardware.h"
10#include <mach/devices-common.h> 10#include "devices-common.h"
11 11
12#define imx_imx_udc_data_entry_single(soc, _size) \ 12#define imx_imx_udc_data_entry_single(soc, _size) \
13 { \ 13 { \
diff --git a/arch/arm/plat-mxc/devices/platform-imxdi_rtc.c b/arch/arm/mach-imx/devices/platform-imxdi_rtc.c
index 805336fdc252..5bb490d556ea 100644
--- a/arch/arm/plat-mxc/devices/platform-imxdi_rtc.c
+++ b/arch/arm/mach-imx/devices/platform-imxdi_rtc.c
@@ -7,8 +7,9 @@
7 * Free Software Foundation. 7 * Free Software Foundation.
8 */ 8 */
9#include <asm/sizes.h> 9#include <asm/sizes.h>
10#include <mach/hardware.h> 10
11#include <mach/devices-common.h> 11#include "../hardware.h"
12#include "devices-common.h"
12 13
13#define imx_imxdi_rtc_data_entry_single(soc) \ 14#define imx_imxdi_rtc_data_entry_single(soc) \
14 { \ 15 { \
diff --git a/arch/arm/plat-mxc/devices/platform-ipu-core.c b/arch/arm/mach-imx/devices/platform-ipu-core.c
index d1e33cc6f12e..fc4dd7cedc11 100644
--- a/arch/arm/plat-mxc/devices/platform-ipu-core.c
+++ b/arch/arm/mach-imx/devices/platform-ipu-core.c
@@ -7,8 +7,9 @@
7 * Free Software Foundation. 7 * Free Software Foundation.
8 */ 8 */
9#include <linux/dma-mapping.h> 9#include <linux/dma-mapping.h>
10#include <mach/hardware.h> 10
11#include <mach/devices-common.h> 11#include "../hardware.h"
12#include "devices-common.h"
12 13
13#define imx_ipu_core_entry_single(soc) \ 14#define imx_ipu_core_entry_single(soc) \
14{ \ 15{ \
diff --git a/arch/arm/plat-mxc/devices/platform-mx1-camera.c b/arch/arm/mach-imx/devices/platform-mx1-camera.c
index edcc581a30a9..2c6788131080 100644
--- a/arch/arm/plat-mxc/devices/platform-mx1-camera.c
+++ b/arch/arm/mach-imx/devices/platform-mx1-camera.c
@@ -6,8 +6,8 @@
6 * the terms of the GNU General Public License version 2 as published by the 6 * the terms of the GNU General Public License version 2 as published by the
7 * Free Software Foundation. 7 * Free Software Foundation.
8 */ 8 */
9#include <mach/hardware.h> 9#include "../hardware.h"
10#include <mach/devices-common.h> 10#include "devices-common.h"
11 11
12#define imx_mx1_camera_data_entry_single(soc, _size) \ 12#define imx_mx1_camera_data_entry_single(soc, _size) \
13 { \ 13 { \
diff --git a/arch/arm/plat-mxc/devices/platform-mx2-camera.c b/arch/arm/mach-imx/devices/platform-mx2-camera.c
index 11eace953a09..f4910160346b 100644
--- a/arch/arm/plat-mxc/devices/platform-mx2-camera.c
+++ b/arch/arm/mach-imx/devices/platform-mx2-camera.c
@@ -6,17 +6,19 @@
6 * the terms of the GNU General Public License version 2 as published by the 6 * the terms of the GNU General Public License version 2 as published by the
7 * Free Software Foundation. 7 * Free Software Foundation.
8 */ 8 */
9#include <mach/hardware.h> 9#include "../hardware.h"
10#include <mach/devices-common.h> 10#include "devices-common.h"
11 11
12#define imx_mx2_camera_data_entry_single(soc) \ 12#define imx_mx2_camera_data_entry_single(soc, _devid) \
13 { \ 13 { \
14 .devid = _devid, \
14 .iobasecsi = soc ## _CSI_BASE_ADDR, \ 15 .iobasecsi = soc ## _CSI_BASE_ADDR, \
15 .iosizecsi = SZ_4K, \ 16 .iosizecsi = SZ_4K, \
16 .irqcsi = soc ## _INT_CSI, \ 17 .irqcsi = soc ## _INT_CSI, \
17 } 18 }
18#define imx_mx2_camera_data_entry_single_emma(soc) \ 19#define imx_mx2_camera_data_entry_single_emma(soc, _devid) \
19 { \ 20 { \
21 .devid = _devid, \
20 .iobasecsi = soc ## _CSI_BASE_ADDR, \ 22 .iobasecsi = soc ## _CSI_BASE_ADDR, \
21 .iosizecsi = SZ_32, \ 23 .iosizecsi = SZ_32, \
22 .irqcsi = soc ## _INT_CSI, \ 24 .irqcsi = soc ## _INT_CSI, \
@@ -27,12 +29,12 @@
27 29
28#ifdef CONFIG_SOC_IMX25 30#ifdef CONFIG_SOC_IMX25
29const struct imx_mx2_camera_data imx25_mx2_camera_data __initconst = 31const struct imx_mx2_camera_data imx25_mx2_camera_data __initconst =
30 imx_mx2_camera_data_entry_single(MX25); 32 imx_mx2_camera_data_entry_single(MX25, "imx25-camera");
31#endif /* ifdef CONFIG_SOC_IMX25 */ 33#endif /* ifdef CONFIG_SOC_IMX25 */
32 34
33#ifdef CONFIG_SOC_IMX27 35#ifdef CONFIG_SOC_IMX27
34const struct imx_mx2_camera_data imx27_mx2_camera_data __initconst = 36const struct imx_mx2_camera_data imx27_mx2_camera_data __initconst =
35 imx_mx2_camera_data_entry_single_emma(MX27); 37 imx_mx2_camera_data_entry_single_emma(MX27, "imx27-camera");
36#endif /* ifdef CONFIG_SOC_IMX27 */ 38#endif /* ifdef CONFIG_SOC_IMX27 */
37 39
38struct platform_device *__init imx_add_mx2_camera( 40struct platform_device *__init imx_add_mx2_camera(
@@ -58,7 +60,7 @@ struct platform_device *__init imx_add_mx2_camera(
58 .flags = IORESOURCE_IRQ, 60 .flags = IORESOURCE_IRQ,
59 }, 61 },
60 }; 62 };
61 return imx_add_platform_device_dmamask("mx2-camera", 0, 63 return imx_add_platform_device_dmamask(data->devid, 0,
62 res, data->iobaseemmaprp ? 4 : 2, 64 res, data->iobaseemmaprp ? 4 : 2,
63 pdata, sizeof(*pdata), DMA_BIT_MASK(32)); 65 pdata, sizeof(*pdata), DMA_BIT_MASK(32));
64} 66}
diff --git a/arch/arm/plat-mxc/devices/platform-mxc-ehci.c b/arch/arm/mach-imx/devices/platform-mxc-ehci.c
index 35851d889aca..5d4bbbfde641 100644
--- a/arch/arm/plat-mxc/devices/platform-mxc-ehci.c
+++ b/arch/arm/mach-imx/devices/platform-mxc-ehci.c
@@ -7,8 +7,9 @@
7 * Free Software Foundation. 7 * Free Software Foundation.
8 */ 8 */
9#include <linux/dma-mapping.h> 9#include <linux/dma-mapping.h>
10#include <mach/hardware.h> 10
11#include <mach/devices-common.h> 11#include "../hardware.h"
12#include "devices-common.h"
12 13
13#define imx_mxc_ehci_data_entry_single(soc, _id, hs) \ 14#define imx_mxc_ehci_data_entry_single(soc, _id, hs) \
14 { \ 15 { \
diff --git a/arch/arm/plat-mxc/devices/platform-mxc-mmc.c b/arch/arm/mach-imx/devices/platform-mxc-mmc.c
index e7b920b58675..b8203c760c8f 100644
--- a/arch/arm/plat-mxc/devices/platform-mxc-mmc.c
+++ b/arch/arm/mach-imx/devices/platform-mxc-mmc.c
@@ -7,24 +7,26 @@
7 * Free Software Foundation. 7 * Free Software Foundation.
8 */ 8 */
9#include <linux/dma-mapping.h> 9#include <linux/dma-mapping.h>
10#include <mach/hardware.h>
11#include <mach/devices-common.h>
12 10
13#define imx_mxc_mmc_data_entry_single(soc, _id, _hwid, _size) \ 11#include "../hardware.h"
12#include "devices-common.h"
13
14#define imx_mxc_mmc_data_entry_single(soc, _devid, _id, _hwid, _size) \
14 { \ 15 { \
16 .devid = _devid, \
15 .id = _id, \ 17 .id = _id, \
16 .iobase = soc ## _SDHC ## _hwid ## _BASE_ADDR, \ 18 .iobase = soc ## _SDHC ## _hwid ## _BASE_ADDR, \
17 .iosize = _size, \ 19 .iosize = _size, \
18 .irq = soc ## _INT_SDHC ## _hwid, \ 20 .irq = soc ## _INT_SDHC ## _hwid, \
19 .dmareq = soc ## _DMA_REQ_SDHC ## _hwid, \ 21 .dmareq = soc ## _DMA_REQ_SDHC ## _hwid, \
20 } 22 }
21#define imx_mxc_mmc_data_entry(soc, _id, _hwid, _size) \ 23#define imx_mxc_mmc_data_entry(soc, _devid, _id, _hwid, _size) \
22 [_id] = imx_mxc_mmc_data_entry_single(soc, _id, _hwid, _size) 24 [_id] = imx_mxc_mmc_data_entry_single(soc, _devid, _id, _hwid, _size)
23 25
24#ifdef CONFIG_SOC_IMX21 26#ifdef CONFIG_SOC_IMX21
25const struct imx_mxc_mmc_data imx21_mxc_mmc_data[] __initconst = { 27const struct imx_mxc_mmc_data imx21_mxc_mmc_data[] __initconst = {
26#define imx21_mxc_mmc_data_entry(_id, _hwid) \ 28#define imx21_mxc_mmc_data_entry(_id, _hwid) \
27 imx_mxc_mmc_data_entry(MX21, _id, _hwid, SZ_4K) 29 imx_mxc_mmc_data_entry(MX21, "imx21-mmc", _id, _hwid, SZ_4K)
28 imx21_mxc_mmc_data_entry(0, 1), 30 imx21_mxc_mmc_data_entry(0, 1),
29 imx21_mxc_mmc_data_entry(1, 2), 31 imx21_mxc_mmc_data_entry(1, 2),
30}; 32};
@@ -33,7 +35,7 @@ const struct imx_mxc_mmc_data imx21_mxc_mmc_data[] __initconst = {
33#ifdef CONFIG_SOC_IMX27 35#ifdef CONFIG_SOC_IMX27
34const struct imx_mxc_mmc_data imx27_mxc_mmc_data[] __initconst = { 36const struct imx_mxc_mmc_data imx27_mxc_mmc_data[] __initconst = {
35#define imx27_mxc_mmc_data_entry(_id, _hwid) \ 37#define imx27_mxc_mmc_data_entry(_id, _hwid) \
36 imx_mxc_mmc_data_entry(MX27, _id, _hwid, SZ_4K) 38 imx_mxc_mmc_data_entry(MX27, "imx21-mmc", _id, _hwid, SZ_4K)
37 imx27_mxc_mmc_data_entry(0, 1), 39 imx27_mxc_mmc_data_entry(0, 1),
38 imx27_mxc_mmc_data_entry(1, 2), 40 imx27_mxc_mmc_data_entry(1, 2),
39}; 41};
@@ -42,7 +44,7 @@ const struct imx_mxc_mmc_data imx27_mxc_mmc_data[] __initconst = {
42#ifdef CONFIG_SOC_IMX31 44#ifdef CONFIG_SOC_IMX31
43const struct imx_mxc_mmc_data imx31_mxc_mmc_data[] __initconst = { 45const struct imx_mxc_mmc_data imx31_mxc_mmc_data[] __initconst = {
44#define imx31_mxc_mmc_data_entry(_id, _hwid) \ 46#define imx31_mxc_mmc_data_entry(_id, _hwid) \
45 imx_mxc_mmc_data_entry(MX31, _id, _hwid, SZ_16K) 47 imx_mxc_mmc_data_entry(MX31, "imx31-mmc", _id, _hwid, SZ_16K)
46 imx31_mxc_mmc_data_entry(0, 1), 48 imx31_mxc_mmc_data_entry(0, 1),
47 imx31_mxc_mmc_data_entry(1, 2), 49 imx31_mxc_mmc_data_entry(1, 2),
48}; 50};
@@ -67,7 +69,7 @@ struct platform_device *__init imx_add_mxc_mmc(
67 .flags = IORESOURCE_DMA, 69 .flags = IORESOURCE_DMA,
68 }, 70 },
69 }; 71 };
70 return imx_add_platform_device_dmamask("mxc-mmc", data->id, 72 return imx_add_platform_device_dmamask(data->devid, data->id,
71 res, ARRAY_SIZE(res), 73 res, ARRAY_SIZE(res),
72 pdata, sizeof(*pdata), DMA_BIT_MASK(32)); 74 pdata, sizeof(*pdata), DMA_BIT_MASK(32));
73} 75}
diff --git a/arch/arm/plat-mxc/devices/platform-mxc_nand.c b/arch/arm/mach-imx/devices/platform-mxc_nand.c
index 95b75cc70515..7af1c53e42b5 100644
--- a/arch/arm/plat-mxc/devices/platform-mxc_nand.c
+++ b/arch/arm/mach-imx/devices/platform-mxc_nand.c
@@ -7,18 +7,21 @@
7 * Free Software Foundation. 7 * Free Software Foundation.
8 */ 8 */
9#include <asm/sizes.h> 9#include <asm/sizes.h>
10#include <mach/hardware.h>
11#include <mach/devices-common.h>
12 10
13#define imx_mxc_nand_data_entry_single(soc, _size) \ 11#include "../hardware.h"
12#include "devices-common.h"
13
14#define imx_mxc_nand_data_entry_single(soc, _devid, _size) \
14 { \ 15 { \
16 .devid = _devid, \
15 .iobase = soc ## _NFC_BASE_ADDR, \ 17 .iobase = soc ## _NFC_BASE_ADDR, \
16 .iosize = _size, \ 18 .iosize = _size, \
17 .irq = soc ## _INT_NFC \ 19 .irq = soc ## _INT_NFC \
18 } 20 }
19 21
20#define imx_mxc_nandv3_data_entry_single(soc, _size) \ 22#define imx_mxc_nandv3_data_entry_single(soc, _devid, _size) \
21 { \ 23 { \
24 .devid = _devid, \
22 .id = -1, \ 25 .id = -1, \
23 .iobase = soc ## _NFC_BASE_ADDR, \ 26 .iobase = soc ## _NFC_BASE_ADDR, \
24 .iosize = _size, \ 27 .iosize = _size, \
@@ -28,32 +31,32 @@
28 31
29#ifdef CONFIG_SOC_IMX21 32#ifdef CONFIG_SOC_IMX21
30const struct imx_mxc_nand_data imx21_mxc_nand_data __initconst = 33const struct imx_mxc_nand_data imx21_mxc_nand_data __initconst =
31 imx_mxc_nand_data_entry_single(MX21, SZ_4K); 34 imx_mxc_nand_data_entry_single(MX21, "imx21-nand", SZ_4K);
32#endif /* ifdef CONFIG_SOC_IMX21 */ 35#endif /* ifdef CONFIG_SOC_IMX21 */
33 36
34#ifdef CONFIG_SOC_IMX25 37#ifdef CONFIG_SOC_IMX25
35const struct imx_mxc_nand_data imx25_mxc_nand_data __initconst = 38const struct imx_mxc_nand_data imx25_mxc_nand_data __initconst =
36 imx_mxc_nand_data_entry_single(MX25, SZ_8K); 39 imx_mxc_nand_data_entry_single(MX25, "imx25-nand", SZ_8K);
37#endif /* ifdef CONFIG_SOC_IMX25 */ 40#endif /* ifdef CONFIG_SOC_IMX25 */
38 41
39#ifdef CONFIG_SOC_IMX27 42#ifdef CONFIG_SOC_IMX27
40const struct imx_mxc_nand_data imx27_mxc_nand_data __initconst = 43const struct imx_mxc_nand_data imx27_mxc_nand_data __initconst =
41 imx_mxc_nand_data_entry_single(MX27, SZ_4K); 44 imx_mxc_nand_data_entry_single(MX27, "imx27-nand", SZ_4K);
42#endif /* ifdef CONFIG_SOC_IMX27 */ 45#endif /* ifdef CONFIG_SOC_IMX27 */
43 46
44#ifdef CONFIG_SOC_IMX31 47#ifdef CONFIG_SOC_IMX31
45const struct imx_mxc_nand_data imx31_mxc_nand_data __initconst = 48const struct imx_mxc_nand_data imx31_mxc_nand_data __initconst =
46 imx_mxc_nand_data_entry_single(MX31, SZ_4K); 49 imx_mxc_nand_data_entry_single(MX31, "imx27-nand", SZ_4K);
47#endif 50#endif
48 51
49#ifdef CONFIG_SOC_IMX35 52#ifdef CONFIG_SOC_IMX35
50const struct imx_mxc_nand_data imx35_mxc_nand_data __initconst = 53const struct imx_mxc_nand_data imx35_mxc_nand_data __initconst =
51 imx_mxc_nand_data_entry_single(MX35, SZ_8K); 54 imx_mxc_nand_data_entry_single(MX35, "imx25-nand", SZ_8K);
52#endif 55#endif
53 56
54#ifdef CONFIG_SOC_IMX51 57#ifdef CONFIG_SOC_IMX51
55const struct imx_mxc_nand_data imx51_mxc_nand_data __initconst = 58const struct imx_mxc_nand_data imx51_mxc_nand_data __initconst =
56 imx_mxc_nandv3_data_entry_single(MX51, SZ_16K); 59 imx_mxc_nandv3_data_entry_single(MX51, "imx51-nand", SZ_16K);
57#endif 60#endif
58 61
59struct platform_device *__init imx_add_mxc_nand( 62struct platform_device *__init imx_add_mxc_nand(
@@ -76,7 +79,7 @@ struct platform_device *__init imx_add_mxc_nand(
76 .flags = IORESOURCE_MEM, 79 .flags = IORESOURCE_MEM,
77 }, 80 },
78 }; 81 };
79 return imx_add_platform_device("mxc_nand", data->id, 82 return imx_add_platform_device(data->devid, data->id,
80 res, ARRAY_SIZE(res) - !data->axibase, 83 res, ARRAY_SIZE(res) - !data->axibase,
81 pdata, sizeof(*pdata)); 84 pdata, sizeof(*pdata));
82} 85}
diff --git a/arch/arm/plat-mxc/devices/platform-mxc_pwm.c b/arch/arm/mach-imx/devices/platform-mxc_pwm.c
index b0c4ae298111..dcd289777687 100644
--- a/arch/arm/plat-mxc/devices/platform-mxc_pwm.c
+++ b/arch/arm/mach-imx/devices/platform-mxc_pwm.c
@@ -6,8 +6,8 @@
6 * the terms of the GNU General Public License version 2 as published by the 6 * the terms of the GNU General Public License version 2 as published by the
7 * Free Software Foundation. 7 * Free Software Foundation.
8 */ 8 */
9#include <mach/hardware.h> 9#include "../hardware.h"
10#include <mach/devices-common.h> 10#include "devices-common.h"
11 11
12#define imx_mxc_pwm_data_entry_single(soc, _id, _hwid, _size) \ 12#define imx_mxc_pwm_data_entry_single(soc, _id, _hwid, _size) \
13 { \ 13 { \
diff --git a/arch/arm/plat-mxc/devices/platform-mxc_rnga.c b/arch/arm/mach-imx/devices/platform-mxc_rnga.c
index b4b7612b6e17..c58404badb59 100644
--- a/arch/arm/plat-mxc/devices/platform-mxc_rnga.c
+++ b/arch/arm/mach-imx/devices/platform-mxc_rnga.c
@@ -6,8 +6,8 @@
6 * the terms of the GNU General Public License version 2 as published by the 6 * the terms of the GNU General Public License version 2 as published by the
7 * Free Software Foundation. 7 * Free Software Foundation.
8 */ 8 */
9#include <mach/hardware.h> 9#include "../hardware.h"
10#include <mach/devices-common.h> 10#include "devices-common.h"
11 11
12struct imx_mxc_rnga_data { 12struct imx_mxc_rnga_data {
13 resource_size_t iobase; 13 resource_size_t iobase;
diff --git a/arch/arm/plat-mxc/devices/platform-mxc_rtc.c b/arch/arm/mach-imx/devices/platform-mxc_rtc.c
index a5c9ad5721c2..c7fffaadf847 100644
--- a/arch/arm/plat-mxc/devices/platform-mxc_rtc.c
+++ b/arch/arm/mach-imx/devices/platform-mxc_rtc.c
@@ -6,23 +6,24 @@
6 * the terms of the GNU General Public License version 2 as published by the 6 * the terms of the GNU General Public License version 2 as published by the
7 * Free Software Foundation. 7 * Free Software Foundation.
8 */ 8 */
9#include <mach/hardware.h> 9#include "../hardware.h"
10#include <mach/devices-common.h> 10#include "devices-common.h"
11 11
12#define imx_mxc_rtc_data_entry_single(soc) \ 12#define imx_mxc_rtc_data_entry_single(soc, _devid) \
13 { \ 13 { \
14 .devid = _devid, \
14 .iobase = soc ## _RTC_BASE_ADDR, \ 15 .iobase = soc ## _RTC_BASE_ADDR, \
15 .irq = soc ## _INT_RTC, \ 16 .irq = soc ## _INT_RTC, \
16 } 17 }
17 18
18#ifdef CONFIG_SOC_IMX31 19#ifdef CONFIG_SOC_IMX31
19const struct imx_mxc_rtc_data imx31_mxc_rtc_data __initconst = 20const struct imx_mxc_rtc_data imx31_mxc_rtc_data __initconst =
20 imx_mxc_rtc_data_entry_single(MX31); 21 imx_mxc_rtc_data_entry_single(MX31, "imx21-rtc");
21#endif /* ifdef CONFIG_SOC_IMX31 */ 22#endif /* ifdef CONFIG_SOC_IMX31 */
22 23
23#ifdef CONFIG_SOC_IMX35 24#ifdef CONFIG_SOC_IMX35
24const struct imx_mxc_rtc_data imx35_mxc_rtc_data __initconst = 25const struct imx_mxc_rtc_data imx35_mxc_rtc_data __initconst =
25 imx_mxc_rtc_data_entry_single(MX35); 26 imx_mxc_rtc_data_entry_single(MX35, "imx21-rtc");
26#endif /* ifdef CONFIG_SOC_IMX35 */ 27#endif /* ifdef CONFIG_SOC_IMX35 */
27 28
28struct platform_device *__init imx_add_mxc_rtc( 29struct platform_device *__init imx_add_mxc_rtc(
@@ -40,6 +41,6 @@ struct platform_device *__init imx_add_mxc_rtc(
40 }, 41 },
41 }; 42 };
42 43
43 return imx_add_platform_device("mxc_rtc", -1, 44 return imx_add_platform_device(data->devid, -1,
44 res, ARRAY_SIZE(res), NULL, 0); 45 res, ARRAY_SIZE(res), NULL, 0);
45} 46}
diff --git a/arch/arm/plat-mxc/devices/platform-mxc_w1.c b/arch/arm/mach-imx/devices/platform-mxc_w1.c
index 96fa5ea91fe8..88c18b720d63 100644
--- a/arch/arm/plat-mxc/devices/platform-mxc_w1.c
+++ b/arch/arm/mach-imx/devices/platform-mxc_w1.c
@@ -6,8 +6,8 @@
6 * the terms of the GNU General Public License version 2 as published by the 6 * the terms of the GNU General Public License version 2 as published by the
7 * Free Software Foundation. 7 * Free Software Foundation.
8 */ 8 */
9#include <mach/hardware.h> 9#include "../hardware.h"
10#include <mach/devices-common.h> 10#include "devices-common.h"
11 11
12#define imx_mxc_w1_data_entry_single(soc) \ 12#define imx_mxc_w1_data_entry_single(soc) \
13 { \ 13 { \
diff --git a/arch/arm/plat-mxc/devices/platform-pata_imx.c b/arch/arm/mach-imx/devices/platform-pata_imx.c
index 70e2f2a44714..e4ec11c8ce55 100644
--- a/arch/arm/plat-mxc/devices/platform-pata_imx.c
+++ b/arch/arm/mach-imx/devices/platform-pata_imx.c
@@ -3,8 +3,8 @@
3 * the terms of the GNU General Public License version 2 as published by the 3 * the terms of the GNU General Public License version 2 as published by the
4 * Free Software Foundation. 4 * Free Software Foundation.
5 */ 5 */
6#include <mach/hardware.h> 6#include "../hardware.h"
7#include <mach/devices-common.h> 7#include "devices-common.h"
8 8
9#define imx_pata_imx_data_entry_single(soc, _size) \ 9#define imx_pata_imx_data_entry_single(soc, _size) \
10 { \ 10 { \
diff --git a/arch/arm/plat-mxc/devices/platform-sdhci-esdhc-imx.c b/arch/arm/mach-imx/devices/platform-sdhci-esdhc-imx.c
index 3793e475cd95..e66a4e316311 100644
--- a/arch/arm/plat-mxc/devices/platform-sdhci-esdhc-imx.c
+++ b/arch/arm/mach-imx/devices/platform-sdhci-esdhc-imx.c
@@ -6,10 +6,11 @@
6 * Free Software Foundation. 6 * Free Software Foundation.
7 */ 7 */
8 8
9#include <mach/hardware.h>
10#include <mach/devices-common.h>
11#include <linux/platform_data/mmc-esdhc-imx.h> 9#include <linux/platform_data/mmc-esdhc-imx.h>
12 10
11#include "../hardware.h"
12#include "devices-common.h"
13
13#define imx_sdhci_esdhc_imx_data_entry_single(soc, _devid, _id, hwid) \ 14#define imx_sdhci_esdhc_imx_data_entry_single(soc, _devid, _id, hwid) \
14 { \ 15 { \
15 .devid = _devid, \ 16 .devid = _devid, \
diff --git a/arch/arm/plat-mxc/devices/platform-spi_imx.c b/arch/arm/mach-imx/devices/platform-spi_imx.c
index 9c50c14c8f92..8880bcb11e05 100644
--- a/arch/arm/plat-mxc/devices/platform-spi_imx.c
+++ b/arch/arm/mach-imx/devices/platform-spi_imx.c
@@ -6,8 +6,8 @@
6 * the terms of the GNU General Public License version 2 as published by the 6 * the terms of the GNU General Public License version 2 as published by the
7 * Free Software Foundation. 7 * Free Software Foundation.
8 */ 8 */
9#include <mach/hardware.h> 9#include "../hardware.h"
10#include <mach/devices-common.h> 10#include "devices-common.h"
11 11
12#define imx_spi_imx_data_entry_single(soc, type, _devid, _id, hwid, _size) \ 12#define imx_spi_imx_data_entry_single(soc, type, _devid, _id, hwid, _size) \
13 { \ 13 { \
diff --git a/arch/arm/mach-imx/ehci-imx25.c b/arch/arm/mach-imx/ehci-imx25.c
index 412c583a24b0..27e40d17de99 100644
--- a/arch/arm/mach-imx/ehci-imx25.c
+++ b/arch/arm/mach-imx/ehci-imx25.c
@@ -15,10 +15,10 @@
15 15
16#include <linux/platform_device.h> 16#include <linux/platform_device.h>
17#include <linux/io.h> 17#include <linux/io.h>
18
19#include <mach/hardware.h>
20#include <linux/platform_data/usb-ehci-mxc.h> 18#include <linux/platform_data/usb-ehci-mxc.h>
21 19
20#include "hardware.h"
21
22#define USBCTRL_OTGBASE_OFFSET 0x600 22#define USBCTRL_OTGBASE_OFFSET 0x600
23 23
24#define MX25_OTG_SIC_SHIFT 29 24#define MX25_OTG_SIC_SHIFT 29
diff --git a/arch/arm/mach-imx/ehci-imx27.c b/arch/arm/mach-imx/ehci-imx27.c
index cd6e1f81508d..448d9115539d 100644
--- a/arch/arm/mach-imx/ehci-imx27.c
+++ b/arch/arm/mach-imx/ehci-imx27.c
@@ -15,10 +15,10 @@
15 15
16#include <linux/platform_device.h> 16#include <linux/platform_device.h>
17#include <linux/io.h> 17#include <linux/io.h>
18
19#include <mach/hardware.h>
20#include <linux/platform_data/usb-ehci-mxc.h> 18#include <linux/platform_data/usb-ehci-mxc.h>
21 19
20#include "hardware.h"
21
22#define USBCTRL_OTGBASE_OFFSET 0x600 22#define USBCTRL_OTGBASE_OFFSET 0x600
23 23
24#define MX27_OTG_SIC_SHIFT 29 24#define MX27_OTG_SIC_SHIFT 29
diff --git a/arch/arm/mach-imx/ehci-imx31.c b/arch/arm/mach-imx/ehci-imx31.c
index 9a880c78af34..05de4e1e39d7 100644
--- a/arch/arm/mach-imx/ehci-imx31.c
+++ b/arch/arm/mach-imx/ehci-imx31.c
@@ -15,10 +15,10 @@
15 15
16#include <linux/platform_device.h> 16#include <linux/platform_device.h>
17#include <linux/io.h> 17#include <linux/io.h>
18
19#include <mach/hardware.h>
20#include <linux/platform_data/usb-ehci-mxc.h> 18#include <linux/platform_data/usb-ehci-mxc.h>
21 19
20#include "hardware.h"
21
22#define USBCTRL_OTGBASE_OFFSET 0x600 22#define USBCTRL_OTGBASE_OFFSET 0x600
23 23
24#define MX31_OTG_SIC_SHIFT 29 24#define MX31_OTG_SIC_SHIFT 29
diff --git a/arch/arm/mach-imx/ehci-imx35.c b/arch/arm/mach-imx/ehci-imx35.c
index 779e16eb65cb..a596f709a937 100644
--- a/arch/arm/mach-imx/ehci-imx35.c
+++ b/arch/arm/mach-imx/ehci-imx35.c
@@ -15,10 +15,10 @@
15 15
16#include <linux/platform_device.h> 16#include <linux/platform_device.h>
17#include <linux/io.h> 17#include <linux/io.h>
18
19#include <mach/hardware.h>
20#include <linux/platform_data/usb-ehci-mxc.h> 18#include <linux/platform_data/usb-ehci-mxc.h>
21 19
20#include "hardware.h"
21
22#define USBCTRL_OTGBASE_OFFSET 0x600 22#define USBCTRL_OTGBASE_OFFSET 0x600
23 23
24#define MX35_OTG_SIC_SHIFT 29 24#define MX35_OTG_SIC_SHIFT 29
diff --git a/arch/arm/mach-imx/ehci-imx5.c b/arch/arm/mach-imx/ehci-imx5.c
index cf8d00e5cce1..e49710b10c68 100644
--- a/arch/arm/mach-imx/ehci-imx5.c
+++ b/arch/arm/mach-imx/ehci-imx5.c
@@ -15,10 +15,10 @@
15 15
16#include <linux/platform_device.h> 16#include <linux/platform_device.h>
17#include <linux/io.h> 17#include <linux/io.h>
18
19#include <mach/hardware.h>
20#include <linux/platform_data/usb-ehci-mxc.h> 18#include <linux/platform_data/usb-ehci-mxc.h>
21 19
20#include "hardware.h"
21
22#define MXC_OTG_OFFSET 0 22#define MXC_OTG_OFFSET 0
23#define MXC_H1_OFFSET 0x200 23#define MXC_H1_OFFSET 0x200
24#define MXC_H2_OFFSET 0x400 24#define MXC_H2_OFFSET 0x400
diff --git a/arch/arm/plat-mxc/epit.c b/arch/arm/mach-imx/epit.c
index 88726f4dbbfa..04a5961beeac 100644
--- a/arch/arm/plat-mxc/epit.c
+++ b/arch/arm/mach-imx/epit.c
@@ -51,10 +51,10 @@
51#include <linux/clockchips.h> 51#include <linux/clockchips.h>
52#include <linux/clk.h> 52#include <linux/clk.h>
53#include <linux/err.h> 53#include <linux/err.h>
54
55#include <mach/hardware.h>
56#include <asm/mach/time.h> 54#include <asm/mach/time.h>
57#include <mach/common.h> 55
56#include "common.h"
57#include "hardware.h"
58 58
59static struct clock_event_device clockevent_epit; 59static struct clock_event_device clockevent_epit;
60static enum clock_event_mode clockevent_mode = CLOCK_EVT_MODE_UNUSED; 60static enum clock_event_mode clockevent_mode = CLOCK_EVT_MODE_UNUSED;
diff --git a/arch/arm/plat-mxc/include/mach/eukrea-baseboards.h b/arch/arm/mach-imx/eukrea-baseboards.h
index a21d3313f994..a21d3313f994 100644
--- a/arch/arm/plat-mxc/include/mach/eukrea-baseboards.h
+++ b/arch/arm/mach-imx/eukrea-baseboards.h
diff --git a/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c b/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c
index 98aef571b9f8..b4c70028d359 100644
--- a/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c
+++ b/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c
@@ -29,11 +29,10 @@
29 29
30#include <asm/mach/arch.h> 30#include <asm/mach/arch.h>
31 31
32#include <mach/common.h> 32#include "common.h"
33#include <mach/iomux-mx27.h>
34#include <mach/hardware.h>
35
36#include "devices-imx27.h" 33#include "devices-imx27.h"
34#include "hardware.h"
35#include "iomux-mx27.h"
37 36
38static const int eukrea_mbimx27_pins[] __initconst = { 37static const int eukrea_mbimx27_pins[] __initconst = {
39 /* UART2 */ 38 /* UART2 */
diff --git a/arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c b/arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c
index 0b84666792f0..e2b70f4c1a2c 100644
--- a/arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c
+++ b/arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c
@@ -26,14 +26,14 @@
26#include <linux/spi/spi.h> 26#include <linux/spi/spi.h>
27#include <video/platform_lcd.h> 27#include <video/platform_lcd.h>
28 28
29#include <mach/hardware.h>
30#include <mach/iomux-mx25.h>
31#include <mach/common.h>
32#include <asm/mach-types.h> 29#include <asm/mach-types.h>
33#include <asm/mach/arch.h> 30#include <asm/mach/arch.h>
34#include <mach/mx25.h>
35 31
32#include "common.h"
36#include "devices-imx25.h" 33#include "devices-imx25.h"
34#include "hardware.h"
35#include "iomux-mx25.h"
36#include "mx25.h"
37 37
38static iomux_v3_cfg_t eukrea_mbimxsd_pads[] = { 38static iomux_v3_cfg_t eukrea_mbimxsd_pads[] = {
39 /* LCD */ 39 /* LCD */
diff --git a/arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c b/arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c
index c6532a007d46..5a2d5ef12dd5 100644
--- a/arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c
+++ b/arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c
@@ -36,11 +36,10 @@
36#include <asm/mach/time.h> 36#include <asm/mach/time.h>
37#include <asm/mach/map.h> 37#include <asm/mach/map.h>
38 38
39#include <mach/hardware.h> 39#include "common.h"
40#include <mach/common.h>
41#include <mach/iomux-mx35.h>
42
43#include "devices-imx35.h" 40#include "devices-imx35.h"
41#include "hardware.h"
42#include "iomux-mx35.h"
44 43
45static const struct fb_videomode fb_modedb[] = { 44static const struct fb_videomode fb_modedb[] = {
46 { 45 {
diff --git a/arch/arm/mach-imx/eukrea_mbimxsd51-baseboard.c b/arch/arm/mach-imx/eukrea_mbimxsd51-baseboard.c
index 8b0de30d7a3f..9be6c1e69d68 100644
--- a/arch/arm/mach-imx/eukrea_mbimxsd51-baseboard.c
+++ b/arch/arm/mach-imx/eukrea_mbimxsd51-baseboard.c
@@ -36,11 +36,10 @@
36#include <asm/mach/time.h> 36#include <asm/mach/time.h>
37#include <asm/mach/map.h> 37#include <asm/mach/map.h>
38 38
39#include <mach/hardware.h> 39#include "common.h"
40#include <mach/common.h>
41#include <mach/iomux-mx51.h>
42
43#include "devices-imx51.h" 40#include "devices-imx51.h"
41#include "hardware.h"
42#include "iomux-mx51.h"
44 43
45static iomux_v3_cfg_t eukrea_mbimxsd51_pads[] = { 44static iomux_v3_cfg_t eukrea_mbimxsd51_pads[] = {
46 /* LED */ 45 /* LED */
diff --git a/arch/arm/plat-mxc/include/mach/hardware.h b/arch/arm/mach-imx/hardware.h
index ebf10654bb42..3ce7fa3bd43f 100644
--- a/arch/arm/plat-mxc/include/mach/hardware.h
+++ b/arch/arm/mach-imx/hardware.h
@@ -105,20 +105,20 @@
105 105
106#define IMX_IO_ADDRESS(x) IOMEM(IMX_IO_P2V(x)) 106#define IMX_IO_ADDRESS(x) IOMEM(IMX_IO_P2V(x))
107 107
108#include <mach/mxc.h> 108#include "mxc.h"
109 109
110#include <mach/mx6q.h> 110#include "mx6q.h"
111#include <mach/mx50.h> 111#include "mx50.h"
112#include <mach/mx51.h> 112#include "mx51.h"
113#include <mach/mx53.h> 113#include "mx53.h"
114#include <mach/mx3x.h> 114#include "mx3x.h"
115#include <mach/mx31.h> 115#include "mx31.h"
116#include <mach/mx35.h> 116#include "mx35.h"
117#include <mach/mx2x.h> 117#include "mx2x.h"
118#include <mach/mx21.h> 118#include "mx21.h"
119#include <mach/mx27.h> 119#include "mx27.h"
120#include <mach/mx1.h> 120#include "mx1.h"
121#include <mach/mx25.h> 121#include "mx25.h"
122 122
123#define imx_map_entry(soc, name, _type) { \ 123#define imx_map_entry(soc, name, _type) { \
124 .virtual = soc ## _IO_P2V(soc ## _ ## name ## _BASE_ADDR), \ 124 .virtual = soc ## _IO_P2V(soc ## _ ## name ## _BASE_ADDR), \
diff --git a/arch/arm/mach-imx/hotplug.c b/arch/arm/mach-imx/hotplug.c
index b07b778dc9a8..3dec962b0770 100644
--- a/arch/arm/mach-imx/hotplug.c
+++ b/arch/arm/mach-imx/hotplug.c
@@ -13,7 +13,8 @@
13#include <linux/errno.h> 13#include <linux/errno.h>
14#include <asm/cacheflush.h> 14#include <asm/cacheflush.h>
15#include <asm/cp15.h> 15#include <asm/cp15.h>
16#include <mach/common.h> 16
17#include "common.h"
17 18
18static inline void cpu_enter_lowpower(void) 19static inline void cpu_enter_lowpower(void)
19{ 20{
diff --git a/arch/arm/plat-mxc/include/mach/iim.h b/arch/arm/mach-imx/iim.h
index 315bffadafda..315bffadafda 100644
--- a/arch/arm/plat-mxc/include/mach/iim.h
+++ b/arch/arm/mach-imx/iim.h
diff --git a/arch/arm/mach-imx/imx27-dt.c b/arch/arm/mach-imx/imx27-dt.c
index e80d5235dac0..ebfae96543c4 100644
--- a/arch/arm/mach-imx/imx27-dt.c
+++ b/arch/arm/mach-imx/imx27-dt.c
@@ -14,21 +14,22 @@
14#include <linux/of_platform.h> 14#include <linux/of_platform.h>
15#include <asm/mach/arch.h> 15#include <asm/mach/arch.h>
16#include <asm/mach/time.h> 16#include <asm/mach/time.h>
17#include <mach/common.h> 17
18#include <mach/mx27.h> 18#include "common.h"
19#include "mx27.h"
19 20
20static const struct of_dev_auxdata imx27_auxdata_lookup[] __initconst = { 21static const struct of_dev_auxdata imx27_auxdata_lookup[] __initconst = {
21 OF_DEV_AUXDATA("fsl,imx27-uart", MX27_UART1_BASE_ADDR, "imx21-uart.0", NULL), 22 OF_DEV_AUXDATA("fsl,imx27-uart", MX27_UART1_BASE_ADDR, "imx21-uart.0", NULL),
22 OF_DEV_AUXDATA("fsl,imx27-uart", MX27_UART2_BASE_ADDR, "imx21-uart.1", NULL), 23 OF_DEV_AUXDATA("fsl,imx27-uart", MX27_UART2_BASE_ADDR, "imx21-uart.1", NULL),
23 OF_DEV_AUXDATA("fsl,imx27-uart", MX27_UART3_BASE_ADDR, "imx21-uart.2", NULL), 24 OF_DEV_AUXDATA("fsl,imx27-uart", MX27_UART3_BASE_ADDR, "imx21-uart.2", NULL),
24 OF_DEV_AUXDATA("fsl,imx27-fec", MX27_FEC_BASE_ADDR, "imx27-fec.0", NULL), 25 OF_DEV_AUXDATA("fsl,imx27-fec", MX27_FEC_BASE_ADDR, "imx27-fec.0", NULL),
25 OF_DEV_AUXDATA("fsl,imx27-i2c", MX27_I2C1_BASE_ADDR, "imx-i2c.0", NULL), 26 OF_DEV_AUXDATA("fsl,imx27-i2c", MX27_I2C1_BASE_ADDR, "imx21-i2c.0", NULL),
26 OF_DEV_AUXDATA("fsl,imx27-i2c", MX27_I2C2_BASE_ADDR, "imx-i2c.1", NULL), 27 OF_DEV_AUXDATA("fsl,imx27-i2c", MX27_I2C2_BASE_ADDR, "imx21-i2c.1", NULL),
27 OF_DEV_AUXDATA("fsl,imx27-cspi", MX27_CSPI1_BASE_ADDR, "imx27-cspi.0", NULL), 28 OF_DEV_AUXDATA("fsl,imx27-cspi", MX27_CSPI1_BASE_ADDR, "imx27-cspi.0", NULL),
28 OF_DEV_AUXDATA("fsl,imx27-cspi", MX27_CSPI2_BASE_ADDR, "imx27-cspi.1", NULL), 29 OF_DEV_AUXDATA("fsl,imx27-cspi", MX27_CSPI2_BASE_ADDR, "imx27-cspi.1", NULL),
29 OF_DEV_AUXDATA("fsl,imx27-cspi", MX27_CSPI3_BASE_ADDR, "imx27-cspi.2", NULL), 30 OF_DEV_AUXDATA("fsl,imx27-cspi", MX27_CSPI3_BASE_ADDR, "imx27-cspi.2", NULL),
30 OF_DEV_AUXDATA("fsl,imx27-wdt", MX27_WDOG_BASE_ADDR, "imx2-wdt.0", NULL), 31 OF_DEV_AUXDATA("fsl,imx27-wdt", MX27_WDOG_BASE_ADDR, "imx2-wdt.0", NULL),
31 OF_DEV_AUXDATA("fsl,imx27-nand", MX27_NFC_BASE_ADDR, "mxc_nand.0", NULL), 32 OF_DEV_AUXDATA("fsl,imx27-nand", MX27_NFC_BASE_ADDR, "imx27-nand.0", NULL),
32 { /* sentinel */ } 33 { /* sentinel */ }
33}; 34};
34 35
diff --git a/arch/arm/mach-imx/imx31-dt.c b/arch/arm/mach-imx/imx31-dt.c
index a68ba207b2b7..af476de2570e 100644
--- a/arch/arm/mach-imx/imx31-dt.c
+++ b/arch/arm/mach-imx/imx31-dt.c
@@ -14,8 +14,9 @@
14#include <linux/of_platform.h> 14#include <linux/of_platform.h>
15#include <asm/mach/arch.h> 15#include <asm/mach/arch.h>
16#include <asm/mach/time.h> 16#include <asm/mach/time.h>
17#include <mach/common.h> 17
18#include <mach/mx31.h> 18#include "common.h"
19#include "mx31.h"
19 20
20static const struct of_dev_auxdata imx31_auxdata_lookup[] __initconst = { 21static const struct of_dev_auxdata imx31_auxdata_lookup[] __initconst = {
21 OF_DEV_AUXDATA("fsl,imx31-uart", MX31_UART1_BASE_ADDR, 22 OF_DEV_AUXDATA("fsl,imx31-uart", MX31_UART1_BASE_ADDR,
diff --git a/arch/arm/mach-imx/imx51-dt.c b/arch/arm/mach-imx/imx51-dt.c
index f233b4bb2342..50742990a136 100644
--- a/arch/arm/mach-imx/imx51-dt.c
+++ b/arch/arm/mach-imx/imx51-dt.c
@@ -15,8 +15,9 @@
15#include <linux/of_platform.h> 15#include <linux/of_platform.h>
16#include <asm/mach/arch.h> 16#include <asm/mach/arch.h>
17#include <asm/mach/time.h> 17#include <asm/mach/time.h>
18#include <mach/common.h> 18
19#include <mach/mx51.h> 19#include "common.h"
20#include "mx51.h"
20 21
21/* 22/*
22 * Lookup table for attaching a specific name and platform_data pointer to 23 * Lookup table for attaching a specific name and platform_data pointer to
@@ -36,8 +37,8 @@ static const struct of_dev_auxdata imx51_auxdata_lookup[] __initconst = {
36 OF_DEV_AUXDATA("fsl,imx51-ecspi", MX51_ECSPI1_BASE_ADDR, "imx51-ecspi.0", NULL), 37 OF_DEV_AUXDATA("fsl,imx51-ecspi", MX51_ECSPI1_BASE_ADDR, "imx51-ecspi.0", NULL),
37 OF_DEV_AUXDATA("fsl,imx51-ecspi", MX51_ECSPI2_BASE_ADDR, "imx51-ecspi.1", NULL), 38 OF_DEV_AUXDATA("fsl,imx51-ecspi", MX51_ECSPI2_BASE_ADDR, "imx51-ecspi.1", NULL),
38 OF_DEV_AUXDATA("fsl,imx51-cspi", MX51_CSPI_BASE_ADDR, "imx35-cspi.0", NULL), 39 OF_DEV_AUXDATA("fsl,imx51-cspi", MX51_CSPI_BASE_ADDR, "imx35-cspi.0", NULL),
39 OF_DEV_AUXDATA("fsl,imx51-i2c", MX51_I2C1_BASE_ADDR, "imx-i2c.0", NULL), 40 OF_DEV_AUXDATA("fsl,imx51-i2c", MX51_I2C1_BASE_ADDR, "imx21-i2c.0", NULL),
40 OF_DEV_AUXDATA("fsl,imx51-i2c", MX51_I2C2_BASE_ADDR, "imx-i2c.1", NULL), 41 OF_DEV_AUXDATA("fsl,imx51-i2c", MX51_I2C2_BASE_ADDR, "imx21-i2c.1", NULL),
41 OF_DEV_AUXDATA("fsl,imx51-sdma", MX51_SDMA_BASE_ADDR, "imx35-sdma", NULL), 42 OF_DEV_AUXDATA("fsl,imx51-sdma", MX51_SDMA_BASE_ADDR, "imx35-sdma", NULL),
42 OF_DEV_AUXDATA("fsl,imx51-wdt", MX51_WDOG1_BASE_ADDR, "imx2-wdt.0", NULL), 43 OF_DEV_AUXDATA("fsl,imx51-wdt", MX51_WDOG1_BASE_ADDR, "imx2-wdt.0", NULL),
43 { /* sentinel */ } 44 { /* sentinel */ }
diff --git a/arch/arm/mach-imx/include/mach/dma-mx1-mx2.h b/arch/arm/mach-imx/include/mach/dma-mx1-mx2.h
deleted file mode 100644
index df5f522da6b3..000000000000
--- a/arch/arm/mach-imx/include/mach/dma-mx1-mx2.h
+++ /dev/null
@@ -1,10 +0,0 @@
1#ifndef __MACH_DMA_MX1_MX2_H__
2#define __MACH_DMA_MX1_MX2_H__
3/*
4 * Don't use this header in new code, it will go away when all users are
5 * converted to mach/dma-v1.h
6 */
7
8#include <mach/dma-v1.h>
9
10#endif /* ifndef __MACH_DMA_MX1_MX2_H__ */
diff --git a/arch/arm/mach-imx/iomux-imx31.c b/arch/arm/mach-imx/iomux-imx31.c
index 82bd4403b450..cabefbc5e7c1 100644
--- a/arch/arm/mach-imx/iomux-imx31.c
+++ b/arch/arm/mach-imx/iomux-imx31.c
@@ -22,8 +22,9 @@
22#include <linux/spinlock.h> 22#include <linux/spinlock.h>
23#include <linux/io.h> 23#include <linux/io.h>
24#include <linux/kernel.h> 24#include <linux/kernel.h>
25#include <mach/hardware.h> 25
26#include <mach/iomux-mx3.h> 26#include "hardware.h"
27#include "iomux-mx3.h"
27 28
28/* 29/*
29 * IOMUX register (base) addresses 30 * IOMUX register (base) addresses
diff --git a/arch/arm/plat-mxc/include/mach/iomux-mx1.h b/arch/arm/mach-imx/iomux-mx1.h
index 6b1507cf378e..95f4681d85d7 100644
--- a/arch/arm/plat-mxc/include/mach/iomux-mx1.h
+++ b/arch/arm/mach-imx/iomux-mx1.h
@@ -18,7 +18,7 @@
18#ifndef __MACH_IOMUX_MX1_H__ 18#ifndef __MACH_IOMUX_MX1_H__
19#define __MACH_IOMUX_MX1_H__ 19#define __MACH_IOMUX_MX1_H__
20 20
21#include <mach/iomux-v1.h> 21#include "iomux-v1.h"
22 22
23#define PA0_AIN_SPI2_CLK (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 0) 23#define PA0_AIN_SPI2_CLK (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 0)
24#define PA0_AF_ETMTRACESYNC (GPIO_PORTA | GPIO_AF | 0) 24#define PA0_AF_ETMTRACESYNC (GPIO_PORTA | GPIO_AF | 0)
diff --git a/arch/arm/plat-mxc/include/mach/iomux-mx21.h b/arch/arm/mach-imx/iomux-mx21.h
index 1495dfda7834..a70cffceb085 100644
--- a/arch/arm/plat-mxc/include/mach/iomux-mx21.h
+++ b/arch/arm/mach-imx/iomux-mx21.h
@@ -18,8 +18,8 @@
18#ifndef __MACH_IOMUX_MX21_H__ 18#ifndef __MACH_IOMUX_MX21_H__
19#define __MACH_IOMUX_MX21_H__ 19#define __MACH_IOMUX_MX21_H__
20 20
21#include <mach/iomux-mx2x.h> 21#include "iomux-mx2x.h"
22#include <mach/iomux-v1.h> 22#include "iomux-v1.h"
23 23
24/* Primary GPIO pin functions */ 24/* Primary GPIO pin functions */
25 25
diff --git a/arch/arm/plat-mxc/include/mach/iomux-mx25.h b/arch/arm/mach-imx/iomux-mx25.h
index c61ec0fc10d4..be51e838375c 100644
--- a/arch/arm/plat-mxc/include/mach/iomux-mx25.h
+++ b/arch/arm/mach-imx/iomux-mx25.h
@@ -19,7 +19,7 @@
19#ifndef __MACH_IOMUX_MX25_H__ 19#ifndef __MACH_IOMUX_MX25_H__
20#define __MACH_IOMUX_MX25_H__ 20#define __MACH_IOMUX_MX25_H__
21 21
22#include <mach/iomux-v3.h> 22#include "iomux-v3.h"
23 23
24/* 24/*
25 * IOMUX/PAD Bit field definitions 25 * IOMUX/PAD Bit field definitions
diff --git a/arch/arm/plat-mxc/include/mach/iomux-mx27.h b/arch/arm/mach-imx/iomux-mx27.h
index d9f9a6e32d80..218e99e89e86 100644
--- a/arch/arm/plat-mxc/include/mach/iomux-mx27.h
+++ b/arch/arm/mach-imx/iomux-mx27.h
@@ -19,8 +19,8 @@
19#ifndef __MACH_IOMUX_MX27_H__ 19#ifndef __MACH_IOMUX_MX27_H__
20#define __MACH_IOMUX_MX27_H__ 20#define __MACH_IOMUX_MX27_H__
21 21
22#include <mach/iomux-mx2x.h> 22#include "iomux-mx2x.h"
23#include <mach/iomux-v1.h> 23#include "iomux-v1.h"
24 24
25/* Primary GPIO pin functions */ 25/* Primary GPIO pin functions */
26 26
diff --git a/arch/arm/plat-mxc/include/mach/iomux-mx2x.h b/arch/arm/mach-imx/iomux-mx2x.h
index 7a9b20abda09..7a9b20abda09 100644
--- a/arch/arm/plat-mxc/include/mach/iomux-mx2x.h
+++ b/arch/arm/mach-imx/iomux-mx2x.h
diff --git a/arch/arm/plat-mxc/include/mach/iomux-mx3.h b/arch/arm/mach-imx/iomux-mx3.h
index f79f78a1c0ed..f79f78a1c0ed 100644
--- a/arch/arm/plat-mxc/include/mach/iomux-mx3.h
+++ b/arch/arm/mach-imx/iomux-mx3.h
diff --git a/arch/arm/plat-mxc/include/mach/iomux-mx35.h b/arch/arm/mach-imx/iomux-mx35.h
index 3117c18bbbd9..90bfa6b5be6a 100644
--- a/arch/arm/plat-mxc/include/mach/iomux-mx35.h
+++ b/arch/arm/mach-imx/iomux-mx35.h
@@ -19,7 +19,7 @@
19#ifndef __MACH_IOMUX_MX35_H__ 19#ifndef __MACH_IOMUX_MX35_H__
20#define __MACH_IOMUX_MX35_H__ 20#define __MACH_IOMUX_MX35_H__
21 21
22#include <mach/iomux-v3.h> 22#include "iomux-v3.h"
23 23
24/* 24/*
25 * The naming convention for the pad modes is MX35_PAD_<padname>__<padmode> 25 * The naming convention for the pad modes is MX35_PAD_<padname>__<padmode>
diff --git a/arch/arm/plat-mxc/include/mach/iomux-mx50.h b/arch/arm/mach-imx/iomux-mx50.h
index 98e7fd0b9083..00f56e0e8009 100644
--- a/arch/arm/plat-mxc/include/mach/iomux-mx50.h
+++ b/arch/arm/mach-imx/iomux-mx50.h
@@ -19,7 +19,7 @@
19#ifndef __MACH_IOMUX_MX50_H__ 19#ifndef __MACH_IOMUX_MX50_H__
20#define __MACH_IOMUX_MX50_H__ 20#define __MACH_IOMUX_MX50_H__
21 21
22#include <mach/iomux-v3.h> 22#include "iomux-v3.h"
23 23
24#define MX50_ELCDIF_PAD_CTRL (PAD_CTL_PKE | PAD_CTL_DSE_HIGH) 24#define MX50_ELCDIF_PAD_CTRL (PAD_CTL_PKE | PAD_CTL_DSE_HIGH)
25 25
diff --git a/arch/arm/plat-mxc/include/mach/iomux-mx51.h b/arch/arm/mach-imx/iomux-mx51.h
index 2623e7a2e190..75bbcc4aa2d2 100644
--- a/arch/arm/plat-mxc/include/mach/iomux-mx51.h
+++ b/arch/arm/mach-imx/iomux-mx51.h
@@ -13,7 +13,7 @@
13#ifndef __MACH_IOMUX_MX51_H__ 13#ifndef __MACH_IOMUX_MX51_H__
14#define __MACH_IOMUX_MX51_H__ 14#define __MACH_IOMUX_MX51_H__
15 15
16#include <mach/iomux-v3.h> 16#include "iomux-v3.h"
17#define __NA_ 0x000 17#define __NA_ 0x000
18 18
19 19
diff --git a/arch/arm/plat-mxc/iomux-v1.c b/arch/arm/mach-imx/iomux-v1.c
index 1f73963bc13e..2b156d1d9e21 100644
--- a/arch/arm/plat-mxc/iomux-v1.c
+++ b/arch/arm/mach-imx/iomux-v1.c
@@ -28,9 +28,10 @@
28#include <linux/string.h> 28#include <linux/string.h>
29#include <linux/gpio.h> 29#include <linux/gpio.h>
30 30
31#include <mach/hardware.h>
32#include <asm/mach/map.h> 31#include <asm/mach/map.h>
33#include <mach/iomux-v1.h> 32
33#include "hardware.h"
34#include "iomux-v1.h"
34 35
35static void __iomem *imx_iomuxv1_baseaddr; 36static void __iomem *imx_iomuxv1_baseaddr;
36static unsigned imx_iomuxv1_numports; 37static unsigned imx_iomuxv1_numports;
diff --git a/arch/arm/plat-mxc/include/mach/iomux-v1.h b/arch/arm/mach-imx/iomux-v1.h
index 02651a40fe23..02651a40fe23 100644
--- a/arch/arm/plat-mxc/include/mach/iomux-v1.h
+++ b/arch/arm/mach-imx/iomux-v1.h
diff --git a/arch/arm/plat-mxc/iomux-v3.c b/arch/arm/mach-imx/iomux-v3.c
index 99a9cdb9d6be..9dae74bf47fc 100644
--- a/arch/arm/plat-mxc/iomux-v3.c
+++ b/arch/arm/mach-imx/iomux-v3.c
@@ -25,9 +25,10 @@
25#include <linux/string.h> 25#include <linux/string.h>
26#include <linux/gpio.h> 26#include <linux/gpio.h>
27 27
28#include <mach/hardware.h>
29#include <asm/mach/map.h> 28#include <asm/mach/map.h>
30#include <mach/iomux-v3.h> 29
30#include "hardware.h"
31#include "iomux-v3.h"
31 32
32static void __iomem *base; 33static void __iomem *base;
33 34
diff --git a/arch/arm/plat-mxc/include/mach/iomux-v3.h b/arch/arm/mach-imx/iomux-v3.h
index 2fa3b5430102..2fa3b5430102 100644
--- a/arch/arm/plat-mxc/include/mach/iomux-v3.h
+++ b/arch/arm/mach-imx/iomux-v3.h
diff --git a/arch/arm/plat-mxc/include/mach/iram.h b/arch/arm/mach-imx/iram.h
index 022690c33702..022690c33702 100644
--- a/arch/arm/plat-mxc/include/mach/iram.h
+++ b/arch/arm/mach-imx/iram.h
diff --git a/arch/arm/plat-mxc/iram_alloc.c b/arch/arm/mach-imx/iram_alloc.c
index 074c3869626a..6c80424f678e 100644
--- a/arch/arm/plat-mxc/iram_alloc.c
+++ b/arch/arm/mach-imx/iram_alloc.c
@@ -22,7 +22,8 @@
22#include <linux/module.h> 22#include <linux/module.h>
23#include <linux/spinlock.h> 23#include <linux/spinlock.h>
24#include <linux/genalloc.h> 24#include <linux/genalloc.h>
25#include <mach/iram.h> 25
26#include "iram.h"
26 27
27static unsigned long iram_phys_base; 28static unsigned long iram_phys_base;
28static void __iomem *iram_virt_base; 29static void __iomem *iram_virt_base;
diff --git a/arch/arm/plat-mxc/irq-common.c b/arch/arm/mach-imx/irq-common.c
index b6e11458e5ae..b6e11458e5ae 100644
--- a/arch/arm/plat-mxc/irq-common.c
+++ b/arch/arm/mach-imx/irq-common.c
diff --git a/arch/arm/plat-mxc/irq-common.h b/arch/arm/mach-imx/irq-common.h
index 6ccb3a14c693..5b2dabba330f 100644
--- a/arch/arm/plat-mxc/irq-common.h
+++ b/arch/arm/mach-imx/irq-common.h
@@ -19,6 +19,9 @@
19#ifndef __PLAT_MXC_IRQ_COMMON_H__ 19#ifndef __PLAT_MXC_IRQ_COMMON_H__
20#define __PLAT_MXC_IRQ_COMMON_H__ 20#define __PLAT_MXC_IRQ_COMMON_H__
21 21
22/* all normal IRQs can be FIQs */
23#define FIQ_START 0
24
22struct mxc_extra_irq 25struct mxc_extra_irq
23{ 26{
24 int (*set_priority)(unsigned char irq, unsigned char prio); 27 int (*set_priority)(unsigned char irq, unsigned char prio);
diff --git a/arch/arm/mach-imx/lluart.c b/arch/arm/mach-imx/lluart.c
index c40a34c00489..5f1510363ee7 100644
--- a/arch/arm/mach-imx/lluart.c
+++ b/arch/arm/mach-imx/lluart.c
@@ -14,7 +14,8 @@
14#include <asm/page.h> 14#include <asm/page.h>
15#include <asm/sizes.h> 15#include <asm/sizes.h>
16#include <asm/mach/map.h> 16#include <asm/mach/map.h>
17#include <mach/hardware.h> 17
18#include "hardware.h"
18 19
19static struct map_desc imx_lluart_desc = { 20static struct map_desc imx_lluart_desc = {
20#ifdef CONFIG_DEBUG_IMX6Q_UART2 21#ifdef CONFIG_DEBUG_IMX6Q_UART2
diff --git a/arch/arm/mach-imx/mach-apf9328.c b/arch/arm/mach-imx/mach-apf9328.c
index 7b99a79722b6..5c9bd2c66e6d 100644
--- a/arch/arm/mach-imx/mach-apf9328.c
+++ b/arch/arm/mach-imx/mach-apf9328.c
@@ -25,11 +25,10 @@
25#include <asm/mach/arch.h> 25#include <asm/mach/arch.h>
26#include <asm/mach/time.h> 26#include <asm/mach/time.h>
27 27
28#include <mach/common.h> 28#include "common.h"
29#include <mach/hardware.h>
30#include <mach/iomux-mx1.h>
31
32#include "devices-imx1.h" 29#include "devices-imx1.h"
30#include "hardware.h"
31#include "iomux-mx1.h"
33 32
34static const int apf9328_pins[] __initconst = { 33static const int apf9328_pins[] __initconst = {
35 /* UART1 */ 34 /* UART1 */
diff --git a/arch/arm/mach-imx/mach-armadillo5x0.c b/arch/arm/mach-imx/mach-armadillo5x0.c
index 5985ed1b8c98..59bd6b06a6b5 100644
--- a/arch/arm/mach-imx/mach-armadillo5x0.c
+++ b/arch/arm/mach-imx/mach-armadillo5x0.c
@@ -41,19 +41,18 @@
41#include <linux/regulator/machine.h> 41#include <linux/regulator/machine.h>
42#include <linux/regulator/fixed.h> 42#include <linux/regulator/fixed.h>
43 43
44#include <mach/hardware.h>
45#include <asm/mach-types.h> 44#include <asm/mach-types.h>
46#include <asm/mach/arch.h> 45#include <asm/mach/arch.h>
47#include <asm/mach/time.h> 46#include <asm/mach/time.h>
48#include <asm/memory.h> 47#include <asm/memory.h>
49#include <asm/mach/map.h> 48#include <asm/mach/map.h>
50 49
51#include <mach/common.h> 50#include "common.h"
52#include <mach/iomux-mx3.h>
53#include <mach/ulpi.h>
54
55#include "devices-imx31.h" 51#include "devices-imx31.h"
56#include "crmregs-imx3.h" 52#include "crmregs-imx3.h"
53#include "hardware.h"
54#include "iomux-mx3.h"
55#include "ulpi.h"
57 56
58static int armadillo5x0_pins[] = { 57static int armadillo5x0_pins[] = {
59 /* UART1 */ 58 /* UART1 */
diff --git a/arch/arm/mach-imx/mach-bug.c b/arch/arm/mach-imx/mach-bug.c
index 9a9897749dd6..3a39d5aec07a 100644
--- a/arch/arm/mach-imx/mach-bug.c
+++ b/arch/arm/mach-imx/mach-bug.c
@@ -19,15 +19,14 @@
19#include <linux/init.h> 19#include <linux/init.h>
20#include <linux/platform_device.h> 20#include <linux/platform_device.h>
21 21
22#include <mach/iomux-mx3.h>
23#include <mach/hardware.h>
24#include <mach/common.h>
25
26#include <asm/mach/time.h> 22#include <asm/mach/time.h>
27#include <asm/mach/arch.h> 23#include <asm/mach/arch.h>
28#include <asm/mach-types.h> 24#include <asm/mach-types.h>
29 25
26#include "common.h"
30#include "devices-imx31.h" 27#include "devices-imx31.h"
28#include "hardware.h"
29#include "iomux-mx3.h"
31 30
32static const struct imxuart_platform_data uart_pdata __initconst = { 31static const struct imxuart_platform_data uart_pdata __initconst = {
33 .flags = IMXUART_HAVE_RTSCTS, 32 .flags = IMXUART_HAVE_RTSCTS,
diff --git a/arch/arm/mach-imx/mach-cpuimx27.c b/arch/arm/mach-imx/mach-cpuimx27.c
index 2bb9e18d9ee1..12a370646b45 100644
--- a/arch/arm/mach-imx/mach-cpuimx27.c
+++ b/arch/arm/mach-imx/mach-cpuimx27.c
@@ -34,13 +34,12 @@
34#include <asm/mach/time.h> 34#include <asm/mach/time.h>
35#include <asm/mach/map.h> 35#include <asm/mach/map.h>
36 36
37#include <mach/eukrea-baseboards.h> 37#include "common.h"
38#include <mach/common.h>
39#include <mach/hardware.h>
40#include <mach/iomux-mx27.h>
41#include <mach/ulpi.h>
42
43#include "devices-imx27.h" 38#include "devices-imx27.h"
39#include "eukrea-baseboards.h"
40#include "hardware.h"
41#include "iomux-mx27.h"
42#include "ulpi.h"
44 43
45static const int eukrea_cpuimx27_pins[] __initconst = { 44static const int eukrea_cpuimx27_pins[] __initconst = {
46 /* UART1 */ 45 /* UART1 */
diff --git a/arch/arm/mach-imx/mach-cpuimx35.c b/arch/arm/mach-imx/mach-cpuimx35.c
index d49b0ec6bdec..5a31bf8c8f4c 100644
--- a/arch/arm/mach-imx/mach-cpuimx35.c
+++ b/arch/arm/mach-imx/mach-cpuimx35.c
@@ -37,12 +37,11 @@
37#include <asm/mach/time.h> 37#include <asm/mach/time.h>
38#include <asm/mach/map.h> 38#include <asm/mach/map.h>
39 39
40#include <mach/eukrea-baseboards.h> 40#include "common.h"
41#include <mach/hardware.h>
42#include <mach/common.h>
43#include <mach/iomux-mx35.h>
44
45#include "devices-imx35.h" 41#include "devices-imx35.h"
42#include "eukrea-baseboards.h"
43#include "hardware.h"
44#include "iomux-mx35.h"
46 45
47static const struct imxuart_platform_data uart_pdata __initconst = { 46static const struct imxuart_platform_data uart_pdata __initconst = {
48 .flags = IMXUART_HAVE_RTSCTS, 47 .flags = IMXUART_HAVE_RTSCTS,
diff --git a/arch/arm/mach-imx/mach-cpuimx51sd.c b/arch/arm/mach-imx/mach-cpuimx51sd.c
index b87cc49ab1e8..b727de029c8f 100644
--- a/arch/arm/mach-imx/mach-cpuimx51sd.c
+++ b/arch/arm/mach-imx/mach-cpuimx51sd.c
@@ -26,18 +26,17 @@
26#include <linux/spi/spi.h> 26#include <linux/spi/spi.h>
27#include <linux/can/platform/mcp251x.h> 27#include <linux/can/platform/mcp251x.h>
28 28
29#include <mach/eukrea-baseboards.h>
30#include <mach/common.h>
31#include <mach/hardware.h>
32#include <mach/iomux-mx51.h>
33
34#include <asm/setup.h> 29#include <asm/setup.h>
35#include <asm/mach-types.h> 30#include <asm/mach-types.h>
36#include <asm/mach/arch.h> 31#include <asm/mach/arch.h>
37#include <asm/mach/time.h> 32#include <asm/mach/time.h>
38 33
34#include "common.h"
39#include "devices-imx51.h" 35#include "devices-imx51.h"
40#include "cpu_op-mx51.h" 36#include "cpu_op-mx51.h"
37#include "eukrea-baseboards.h"
38#include "hardware.h"
39#include "iomux-mx51.h"
41 40
42#define USBH1_RST IMX_GPIO_NR(2, 28) 41#define USBH1_RST IMX_GPIO_NR(2, 28)
43#define ETH_RST IMX_GPIO_NR(2, 31) 42#define ETH_RST IMX_GPIO_NR(2, 31)
diff --git a/arch/arm/mach-imx/mach-eukrea_cpuimx25.c b/arch/arm/mach-imx/mach-eukrea_cpuimx25.c
index 017bbb70ea41..75027a5ad8b7 100644
--- a/arch/arm/mach-imx/mach-eukrea_cpuimx25.c
+++ b/arch/arm/mach-imx/mach-eukrea_cpuimx25.c
@@ -27,18 +27,18 @@
27#include <linux/usb/otg.h> 27#include <linux/usb/otg.h>
28#include <linux/usb/ulpi.h> 28#include <linux/usb/ulpi.h>
29 29
30#include <mach/eukrea-baseboards.h>
31#include <mach/hardware.h>
32#include <asm/mach-types.h> 30#include <asm/mach-types.h>
33#include <asm/mach/arch.h> 31#include <asm/mach/arch.h>
34#include <asm/mach/time.h> 32#include <asm/mach/time.h>
35#include <asm/memory.h> 33#include <asm/memory.h>
36#include <asm/mach/map.h> 34#include <asm/mach/map.h>
37#include <mach/common.h>
38#include <mach/mx25.h>
39#include <mach/iomux-mx25.h>
40 35
36#include "common.h"
41#include "devices-imx25.h" 37#include "devices-imx25.h"
38#include "eukrea-baseboards.h"
39#include "hardware.h"
40#include "iomux-mx25.h"
41#include "mx25.h"
42 42
43static const struct imxuart_platform_data uart_pdata __initconst = { 43static const struct imxuart_platform_data uart_pdata __initconst = {
44 .flags = IMXUART_HAVE_RTSCTS, 44 .flags = IMXUART_HAVE_RTSCTS,
diff --git a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c
index 141756f00ae5..b74422679126 100644
--- a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c
+++ b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c
@@ -40,11 +40,11 @@
40#include <asm/mach/time.h> 40#include <asm/mach/time.h>
41#include <asm/system_info.h> 41#include <asm/system_info.h>
42#include <asm/memblock.h> 42#include <asm/memblock.h>
43#include <mach/common.h>
44#include <mach/hardware.h>
45#include <mach/iomux-mx27.h>
46 43
44#include "common.h"
47#include "devices-imx27.h" 45#include "devices-imx27.h"
46#include "hardware.h"
47#include "iomux-mx27.h"
48 48
49#define TVP5150_RSTN (GPIO_PORTC + 18) 49#define TVP5150_RSTN (GPIO_PORTC + 18)
50#define TVP5150_PWDN (GPIO_PORTC + 19) 50#define TVP5150_PWDN (GPIO_PORTC + 19)
diff --git a/arch/arm/mach-imx/mach-imx27ipcam.c b/arch/arm/mach-imx/mach-imx27ipcam.c
index 7381387a8905..53a860112938 100644
--- a/arch/arm/mach-imx/mach-imx27ipcam.c
+++ b/arch/arm/mach-imx/mach-imx27ipcam.c
@@ -17,11 +17,11 @@
17#include <asm/mach-types.h> 17#include <asm/mach-types.h>
18#include <asm/mach/arch.h> 18#include <asm/mach/arch.h>
19#include <asm/mach/time.h> 19#include <asm/mach/time.h>
20#include <mach/hardware.h>
21#include <mach/common.h>
22#include <mach/iomux-mx27.h>
23 20
21#include "hardware.h"
22#include "common.h"
24#include "devices-imx27.h" 23#include "devices-imx27.h"
24#include "iomux-mx27.h"
25 25
26static const int mx27ipcam_pins[] __initconst = { 26static const int mx27ipcam_pins[] __initconst = {
27 /* UART1 */ 27 /* UART1 */
diff --git a/arch/arm/mach-imx/mach-imx27lite.c b/arch/arm/mach-imx/mach-imx27lite.c
index 1f45b9189229..fc8dce931378 100644
--- a/arch/arm/mach-imx/mach-imx27lite.c
+++ b/arch/arm/mach-imx/mach-imx27lite.c
@@ -20,11 +20,11 @@
20#include <asm/mach/arch.h> 20#include <asm/mach/arch.h>
21#include <asm/mach/time.h> 21#include <asm/mach/time.h>
22#include <asm/mach/map.h> 22#include <asm/mach/map.h>
23#include <mach/hardware.h>
24#include <mach/common.h>
25#include <mach/iomux-mx27.h>
26 23
24#include "common.h"
27#include "devices-imx27.h" 25#include "devices-imx27.h"
26#include "hardware.h"
27#include "iomux-mx27.h"
28 28
29static const int mx27lite_pins[] __initconst = { 29static const int mx27lite_pins[] __initconst = {
30 /* UART1 */ 30 /* UART1 */
diff --git a/arch/arm/mach-imx/mach-imx53.c b/arch/arm/mach-imx/mach-imx53.c
index 29711e95579f..e71e62610eba 100644
--- a/arch/arm/mach-imx/mach-imx53.c
+++ b/arch/arm/mach-imx/mach-imx53.c
@@ -19,8 +19,9 @@
19#include <linux/of_platform.h> 19#include <linux/of_platform.h>
20#include <asm/mach/arch.h> 20#include <asm/mach/arch.h>
21#include <asm/mach/time.h> 21#include <asm/mach/time.h>
22#include <mach/common.h> 22
23#include <mach/mx53.h> 23#include "common.h"
24#include "mx53.h"
24 25
25/* 26/*
26 * Lookup table for attaching a specific name and platform_data pointer to 27 * Lookup table for attaching a specific name and platform_data pointer to
@@ -42,9 +43,9 @@ static const struct of_dev_auxdata imx53_auxdata_lookup[] __initconst = {
42 OF_DEV_AUXDATA("fsl,imx53-ecspi", MX53_ECSPI1_BASE_ADDR, "imx51-ecspi.0", NULL), 43 OF_DEV_AUXDATA("fsl,imx53-ecspi", MX53_ECSPI1_BASE_ADDR, "imx51-ecspi.0", NULL),
43 OF_DEV_AUXDATA("fsl,imx53-ecspi", MX53_ECSPI2_BASE_ADDR, "imx51-ecspi.1", NULL), 44 OF_DEV_AUXDATA("fsl,imx53-ecspi", MX53_ECSPI2_BASE_ADDR, "imx51-ecspi.1", NULL),
44 OF_DEV_AUXDATA("fsl,imx53-cspi", MX53_CSPI_BASE_ADDR, "imx35-cspi.0", NULL), 45 OF_DEV_AUXDATA("fsl,imx53-cspi", MX53_CSPI_BASE_ADDR, "imx35-cspi.0", NULL),
45 OF_DEV_AUXDATA("fsl,imx53-i2c", MX53_I2C1_BASE_ADDR, "imx-i2c.0", NULL), 46 OF_DEV_AUXDATA("fsl,imx53-i2c", MX53_I2C1_BASE_ADDR, "imx21-i2c.0", NULL),
46 OF_DEV_AUXDATA("fsl,imx53-i2c", MX53_I2C2_BASE_ADDR, "imx-i2c.1", NULL), 47 OF_DEV_AUXDATA("fsl,imx53-i2c", MX53_I2C2_BASE_ADDR, "imx21-i2c.1", NULL),
47 OF_DEV_AUXDATA("fsl,imx53-i2c", MX53_I2C3_BASE_ADDR, "imx-i2c.2", NULL), 48 OF_DEV_AUXDATA("fsl,imx53-i2c", MX53_I2C3_BASE_ADDR, "imx21-i2c.2", NULL),
48 OF_DEV_AUXDATA("fsl,imx53-sdma", MX53_SDMA_BASE_ADDR, "imx35-sdma", NULL), 49 OF_DEV_AUXDATA("fsl,imx53-sdma", MX53_SDMA_BASE_ADDR, "imx35-sdma", NULL),
49 OF_DEV_AUXDATA("fsl,imx53-wdt", MX53_WDOG1_BASE_ADDR, "imx2-wdt.0", NULL), 50 OF_DEV_AUXDATA("fsl,imx53-wdt", MX53_WDOG1_BASE_ADDR, "imx2-wdt.0", NULL),
50 { /* sentinel */ } 51 { /* sentinel */ }
diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c
index 47c91f7185d2..978b6dd00de4 100644
--- a/arch/arm/mach-imx/mach-imx6q.c
+++ b/arch/arm/mach-imx/mach-imx6q.c
@@ -33,10 +33,10 @@
33#include <asm/mach/arch.h> 33#include <asm/mach/arch.h>
34#include <asm/mach/time.h> 34#include <asm/mach/time.h>
35#include <asm/system_misc.h> 35#include <asm/system_misc.h>
36#include <mach/common.h>
37#include <mach/cpuidle.h>
38#include <mach/hardware.h>
39 36
37#include "common.h"
38#include "cpuidle.h"
39#include "hardware.h"
40 40
41void imx6q_restart(char mode, const char *cmd) 41void imx6q_restart(char mode, const char *cmd)
42{ 42{
diff --git a/arch/arm/mach-imx/mach-kzm_arm11_01.c b/arch/arm/mach-imx/mach-kzm_arm11_01.c
index 0330078ff788..2e536ea53444 100644
--- a/arch/arm/mach-imx/mach-kzm_arm11_01.c
+++ b/arch/arm/mach-imx/mach-kzm_arm11_01.c
@@ -36,11 +36,10 @@
36#include <asm/mach/map.h> 36#include <asm/mach/map.h>
37#include <asm/mach/time.h> 37#include <asm/mach/time.h>
38 38
39#include <mach/common.h> 39#include "common.h"
40#include <mach/hardware.h>
41#include <mach/iomux-mx3.h>
42
43#include "devices-imx31.h" 40#include "devices-imx31.h"
41#include "hardware.h"
42#include "iomux-mx3.h"
44 43
45#define KZM_ARM11_IO_ADDRESS(x) (IOMEM( \ 44#define KZM_ARM11_IO_ADDRESS(x) (IOMEM( \
46 IMX_IO_P2V_MODULE(x, MX31_CS4) ?: \ 45 IMX_IO_P2V_MODULE(x, MX31_CS4) ?: \
diff --git a/arch/arm/mach-imx/mach-mx1ads.c b/arch/arm/mach-imx/mach-mx1ads.c
index 667f359a2e8b..06b483783e68 100644
--- a/arch/arm/mach-imx/mach-mx1ads.c
+++ b/arch/arm/mach-imx/mach-mx1ads.c
@@ -23,11 +23,10 @@
23#include <asm/mach/arch.h> 23#include <asm/mach/arch.h>
24#include <asm/mach/time.h> 24#include <asm/mach/time.h>
25 25
26#include <mach/common.h> 26#include "common.h"
27#include <mach/hardware.h>
28#include <mach/iomux-mx1.h>
29
30#include "devices-imx1.h" 27#include "devices-imx1.h"
28#include "hardware.h"
29#include "iomux-mx1.h"
31 30
32static const int mx1ads_pins[] __initconst = { 31static const int mx1ads_pins[] __initconst = {
33 /* UART1 */ 32 /* UART1 */
diff --git a/arch/arm/mach-imx/mach-mx21ads.c b/arch/arm/mach-imx/mach-mx21ads.c
index ed22e3fe6ec8..6adb3136bb08 100644
--- a/arch/arm/mach-imx/mach-mx21ads.c
+++ b/arch/arm/mach-imx/mach-mx21ads.c
@@ -18,15 +18,15 @@
18#include <linux/mtd/mtd.h> 18#include <linux/mtd/mtd.h>
19#include <linux/mtd/physmap.h> 19#include <linux/mtd/physmap.h>
20#include <linux/gpio.h> 20#include <linux/gpio.h>
21#include <mach/common.h>
22#include <mach/hardware.h>
23#include <asm/mach-types.h> 21#include <asm/mach-types.h>
24#include <asm/mach/arch.h> 22#include <asm/mach/arch.h>
25#include <asm/mach/time.h> 23#include <asm/mach/time.h>
26#include <asm/mach/map.h> 24#include <asm/mach/map.h>
27#include <mach/iomux-mx21.h>
28 25
26#include "common.h"
29#include "devices-imx21.h" 27#include "devices-imx21.h"
28#include "hardware.h"
29#include "iomux-mx21.h"
30 30
31/* 31/*
32 * Memory-mapped I/O on MX21ADS base board 32 * Memory-mapped I/O on MX21ADS base board
diff --git a/arch/arm/mach-imx/mach-mx25_3ds.c b/arch/arm/mach-imx/mach-mx25_3ds.c
index ce247fd1269a..b1b03aa55bb8 100644
--- a/arch/arm/mach-imx/mach-mx25_3ds.c
+++ b/arch/arm/mach-imx/mach-mx25_3ds.c
@@ -31,17 +31,17 @@
31#include <linux/platform_device.h> 31#include <linux/platform_device.h>
32#include <linux/usb/otg.h> 32#include <linux/usb/otg.h>
33 33
34#include <mach/hardware.h>
35#include <asm/mach-types.h> 34#include <asm/mach-types.h>
36#include <asm/mach/arch.h> 35#include <asm/mach/arch.h>
37#include <asm/mach/time.h> 36#include <asm/mach/time.h>
38#include <asm/memory.h> 37#include <asm/memory.h>
39#include <asm/mach/map.h> 38#include <asm/mach/map.h>
40#include <mach/common.h>
41#include <mach/mx25.h>
42#include <mach/iomux-mx25.h>
43 39
40#include "common.h"
44#include "devices-imx25.h" 41#include "devices-imx25.h"
42#include "hardware.h"
43#include "iomux-mx25.h"
44#include "mx25.h"
45 45
46#define MX25PDK_CAN_PWDN IMX_GPIO_NR(4, 6) 46#define MX25PDK_CAN_PWDN IMX_GPIO_NR(4, 6)
47 47
diff --git a/arch/arm/mach-imx/mach-mx27_3ds.c b/arch/arm/mach-imx/mach-mx27_3ds.c
index 05996f39005c..d0e547fa925f 100644
--- a/arch/arm/mach-imx/mach-mx27_3ds.c
+++ b/arch/arm/mach-imx/mach-mx27_3ds.c
@@ -36,13 +36,13 @@
36#include <asm/mach-types.h> 36#include <asm/mach-types.h>
37#include <asm/mach/arch.h> 37#include <asm/mach/arch.h>
38#include <asm/mach/time.h> 38#include <asm/mach/time.h>
39#include <mach/hardware.h>
40#include <mach/common.h>
41#include <mach/iomux-mx27.h>
42#include <mach/ulpi.h>
43#include <mach/3ds_debugboard.h>
44 39
40#include "3ds_debugboard.h"
41#include "common.h"
45#include "devices-imx27.h" 42#include "devices-imx27.h"
43#include "hardware.h"
44#include "iomux-mx27.h"
45#include "ulpi.h"
46 46
47#define SD1_EN_GPIO IMX_GPIO_NR(2, 25) 47#define SD1_EN_GPIO IMX_GPIO_NR(2, 25)
48#define OTG_PHY_RESET_GPIO IMX_GPIO_NR(2, 23) 48#define OTG_PHY_RESET_GPIO IMX_GPIO_NR(2, 23)
diff --git a/arch/arm/mach-imx/mach-mx27ads.c b/arch/arm/mach-imx/mach-mx27ads.c
index 7dc59bac0e55..3d036f57f0e6 100644
--- a/arch/arm/mach-imx/mach-mx27ads.c
+++ b/arch/arm/mach-imx/mach-mx27ads.c
@@ -21,15 +21,15 @@
21#include <linux/mtd/physmap.h> 21#include <linux/mtd/physmap.h>
22#include <linux/i2c.h> 22#include <linux/i2c.h>
23#include <linux/irq.h> 23#include <linux/irq.h>
24#include <mach/common.h>
25#include <mach/hardware.h>
26#include <asm/mach-types.h> 24#include <asm/mach-types.h>
27#include <asm/mach/arch.h> 25#include <asm/mach/arch.h>
28#include <asm/mach/time.h> 26#include <asm/mach/time.h>
29#include <asm/mach/map.h> 27#include <asm/mach/map.h>
30#include <mach/iomux-mx27.h>
31 28
29#include "common.h"
32#include "devices-imx27.h" 30#include "devices-imx27.h"
31#include "hardware.h"
32#include "iomux-mx27.h"
33 33
34/* 34/*
35 * Base address of PBC controller, CS4 35 * Base address of PBC controller, CS4
diff --git a/arch/arm/mach-imx/mach-mx31_3ds.c b/arch/arm/mach-imx/mach-mx31_3ds.c
index 8915f937b7d5..bc301befdd06 100644
--- a/arch/arm/mach-imx/mach-mx31_3ds.c
+++ b/arch/arm/mach-imx/mach-mx31_3ds.c
@@ -30,19 +30,19 @@
30 30
31#include <media/soc_camera.h> 31#include <media/soc_camera.h>
32 32
33#include <mach/hardware.h>
34#include <asm/mach-types.h> 33#include <asm/mach-types.h>
35#include <asm/mach/arch.h> 34#include <asm/mach/arch.h>
36#include <asm/mach/time.h> 35#include <asm/mach/time.h>
37#include <asm/memory.h> 36#include <asm/memory.h>
38#include <asm/mach/map.h> 37#include <asm/mach/map.h>
39#include <asm/memblock.h> 38#include <asm/memblock.h>
40#include <mach/common.h>
41#include <mach/iomux-mx3.h>
42#include <mach/3ds_debugboard.h>
43#include <mach/ulpi.h>
44 39
40#include "3ds_debugboard.h"
41#include "common.h"
45#include "devices-imx31.h" 42#include "devices-imx31.h"
43#include "hardware.h"
44#include "iomux-mx3.h"
45#include "ulpi.h"
46 46
47static int mx31_3ds_pins[] = { 47static int mx31_3ds_pins[] = {
48 /* UART1 */ 48 /* UART1 */
@@ -393,7 +393,7 @@ static struct regulator_init_data gpo_init = {
393}; 393};
394 394
395static struct regulator_consumer_supply vmmc2_consumers[] = { 395static struct regulator_consumer_supply vmmc2_consumers[] = {
396 REGULATOR_SUPPLY("vmmc", "mxc-mmc.0"), 396 REGULATOR_SUPPLY("vmmc", "imx31-mmc.0"),
397}; 397};
398 398
399static struct regulator_init_data vmmc2_init = { 399static struct regulator_init_data vmmc2_init = {
diff --git a/arch/arm/mach-imx/mach-mx31ads.c b/arch/arm/mach-imx/mach-mx31ads.c
index e774b07f48d3..8b56f8883f32 100644
--- a/arch/arm/mach-imx/mach-mx31ads.c
+++ b/arch/arm/mach-imx/mach-mx31ads.c
@@ -28,8 +28,6 @@
28#include <asm/mach/time.h> 28#include <asm/mach/time.h>
29#include <asm/memory.h> 29#include <asm/memory.h>
30#include <asm/mach/map.h> 30#include <asm/mach/map.h>
31#include <mach/common.h>
32#include <mach/iomux-mx3.h>
33 31
34#ifdef CONFIG_MACH_MX31ADS_WM1133_EV1 32#ifdef CONFIG_MACH_MX31ADS_WM1133_EV1
35#include <linux/mfd/wm8350/audio.h> 33#include <linux/mfd/wm8350/audio.h>
@@ -37,7 +35,10 @@
37#include <linux/mfd/wm8350/pmic.h> 35#include <linux/mfd/wm8350/pmic.h>
38#endif 36#endif
39 37
38#include "common.h"
40#include "devices-imx31.h" 39#include "devices-imx31.h"
40#include "hardware.h"
41#include "iomux-mx3.h"
41 42
42/* Base address of PBC controller */ 43/* Base address of PBC controller */
43#define PBC_BASE_ADDRESS MX31_CS4_BASE_ADDR_VIRT 44#define PBC_BASE_ADDRESS MX31_CS4_BASE_ADDR_VIRT
diff --git a/arch/arm/mach-imx/mach-mx31lilly.c b/arch/arm/mach-imx/mach-mx31lilly.c
index 34b9bf075daf..08b9965c8b36 100644
--- a/arch/arm/mach-imx/mach-mx31lilly.c
+++ b/arch/arm/mach-imx/mach-mx31lilly.c
@@ -42,13 +42,12 @@
42#include <asm/mach/time.h> 42#include <asm/mach/time.h>
43#include <asm/mach/map.h> 43#include <asm/mach/map.h>
44 44
45#include <mach/hardware.h> 45#include "board-mx31lilly.h"
46#include <mach/common.h> 46#include "common.h"
47#include <mach/iomux-mx3.h>
48#include <mach/board-mx31lilly.h>
49#include <mach/ulpi.h>
50
51#include "devices-imx31.h" 47#include "devices-imx31.h"
48#include "hardware.h"
49#include "iomux-mx3.h"
50#include "ulpi.h"
52 51
53/* 52/*
54 * This file contains module-specific initialization routines for LILLY-1131. 53 * This file contains module-specific initialization routines for LILLY-1131.
diff --git a/arch/arm/mach-imx/mach-mx31lite.c b/arch/arm/mach-imx/mach-mx31lite.c
index ef57cff5abfb..bdcd92e59518 100644
--- a/arch/arm/mach-imx/mach-mx31lite.c
+++ b/arch/arm/mach-imx/mach-mx31lite.c
@@ -39,13 +39,12 @@
39#include <asm/page.h> 39#include <asm/page.h>
40#include <asm/setup.h> 40#include <asm/setup.h>
41 41
42#include <mach/hardware.h> 42#include "board-mx31lite.h"
43#include <mach/common.h> 43#include "common.h"
44#include <mach/board-mx31lite.h>
45#include <mach/iomux-mx3.h>
46#include <mach/ulpi.h>
47
48#include "devices-imx31.h" 44#include "devices-imx31.h"
45#include "hardware.h"
46#include "iomux-mx3.h"
47#include "ulpi.h"
49 48
50/* 49/*
51 * This file contains the module-specific initialization routines. 50 * This file contains the module-specific initialization routines.
diff --git a/arch/arm/mach-imx/mach-mx31moboard.c b/arch/arm/mach-imx/mach-mx31moboard.c
index 459e754ef8c9..2517cfa9f26b 100644
--- a/arch/arm/mach-imx/mach-mx31moboard.c
+++ b/arch/arm/mach-imx/mach-mx31moboard.c
@@ -42,14 +42,14 @@
42#include <asm/mach/time.h> 42#include <asm/mach/time.h>
43#include <asm/mach/map.h> 43#include <asm/mach/map.h>
44#include <asm/memblock.h> 44#include <asm/memblock.h>
45#include <mach/board-mx31moboard.h>
46#include <mach/common.h>
47#include <mach/hardware.h>
48#include <mach/iomux-mx3.h>
49#include <mach/ulpi.h>
50#include <linux/platform_data/asoc-imx-ssi.h> 45#include <linux/platform_data/asoc-imx-ssi.h>
51 46
47#include "board-mx31moboard.h"
48#include "common.h"
52#include "devices-imx31.h" 49#include "devices-imx31.h"
50#include "hardware.h"
51#include "iomux-mx3.h"
52#include "ulpi.h"
53 53
54static unsigned int moboard_pins[] = { 54static unsigned int moboard_pins[] = {
55 /* UART0 */ 55 /* UART0 */
@@ -175,11 +175,11 @@ static const struct spi_imx_master moboard_spi1_pdata __initconst = {
175 175
176static struct regulator_consumer_supply sdhc_consumers[] = { 176static struct regulator_consumer_supply sdhc_consumers[] = {
177 { 177 {
178 .dev_name = "mxc-mmc.0", 178 .dev_name = "imx31-mmc.0",
179 .supply = "sdhc0_vcc", 179 .supply = "sdhc0_vcc",
180 }, 180 },
181 { 181 {
182 .dev_name = "mxc-mmc.1", 182 .dev_name = "imx31-mmc.1",
183 .supply = "sdhc1_vcc", 183 .supply = "sdhc1_vcc",
184 }, 184 },
185}; 185};
diff --git a/arch/arm/mach-imx/mach-mx35_3ds.c b/arch/arm/mach-imx/mach-mx35_3ds.c
index 504983c68aa8..5277da45d60c 100644
--- a/arch/arm/mach-imx/mach-mx35_3ds.c
+++ b/arch/arm/mach-imx/mach-mx35_3ds.c
@@ -43,15 +43,15 @@
43#include <asm/mach/map.h> 43#include <asm/mach/map.h>
44#include <asm/memblock.h> 44#include <asm/memblock.h>
45 45
46#include <mach/hardware.h>
47#include <mach/common.h>
48#include <mach/iomux-mx35.h>
49#include <mach/3ds_debugboard.h>
50#include <video/platform_lcd.h> 46#include <video/platform_lcd.h>
51 47
52#include <media/soc_camera.h> 48#include <media/soc_camera.h>
53 49
50#include "3ds_debugboard.h"
51#include "common.h"
54#include "devices-imx35.h" 52#include "devices-imx35.h"
53#include "hardware.h"
54#include "iomux-mx35.h"
55 55
56#define GPIO_MC9S08DZ60_GPS_ENABLE 0 56#define GPIO_MC9S08DZ60_GPS_ENABLE 0
57#define GPIO_MC9S08DZ60_HDD_ENABLE 4 57#define GPIO_MC9S08DZ60_HDD_ENABLE 4
diff --git a/arch/arm/mach-imx/mach-mx50_rdp.c b/arch/arm/mach-imx/mach-mx50_rdp.c
index 42b66e8d9615..0c1f88a80bdc 100644
--- a/arch/arm/mach-imx/mach-mx50_rdp.c
+++ b/arch/arm/mach-imx/mach-mx50_rdp.c
@@ -24,17 +24,16 @@
24#include <linux/delay.h> 24#include <linux/delay.h>
25#include <linux/io.h> 25#include <linux/io.h>
26 26
27#include <mach/common.h>
28#include <mach/hardware.h>
29#include <mach/iomux-mx50.h>
30
31#include <asm/irq.h> 27#include <asm/irq.h>
32#include <asm/setup.h> 28#include <asm/setup.h>
33#include <asm/mach-types.h> 29#include <asm/mach-types.h>
34#include <asm/mach/arch.h> 30#include <asm/mach/arch.h>
35#include <asm/mach/time.h> 31#include <asm/mach/time.h>
36 32
33#include "common.h"
37#include "devices-imx50.h" 34#include "devices-imx50.h"
35#include "hardware.h"
36#include "iomux-mx50.h"
38 37
39#define FEC_EN IMX_GPIO_NR(6, 23) 38#define FEC_EN IMX_GPIO_NR(6, 23)
40#define FEC_RESET_B IMX_GPIO_NR(4, 12) 39#define FEC_RESET_B IMX_GPIO_NR(4, 12)
diff --git a/arch/arm/mach-imx/mach-mx51_3ds.c b/arch/arm/mach-imx/mach-mx51_3ds.c
index 9ee84a4af639..abc25bd1107b 100644
--- a/arch/arm/mach-imx/mach-mx51_3ds.c
+++ b/arch/arm/mach-imx/mach-mx51_3ds.c
@@ -19,12 +19,11 @@
19#include <asm/mach/arch.h> 19#include <asm/mach/arch.h>
20#include <asm/mach/time.h> 20#include <asm/mach/time.h>
21 21
22#include <mach/hardware.h> 22#include "3ds_debugboard.h"
23#include <mach/common.h> 23#include "common.h"
24#include <mach/iomux-mx51.h>
25#include <mach/3ds_debugboard.h>
26
27#include "devices-imx51.h" 24#include "devices-imx51.h"
25#include "hardware.h"
26#include "iomux-mx51.h"
28 27
29#define MX51_3DS_ECSPI2_CS (GPIO_PORTC + 28) 28#define MX51_3DS_ECSPI2_CS (GPIO_PORTC + 28)
30 29
diff --git a/arch/arm/mach-imx/mach-mx51_babbage.c b/arch/arm/mach-imx/mach-mx51_babbage.c
index 7b31cbde8775..d9a84ca2199a 100644
--- a/arch/arm/mach-imx/mach-mx51_babbage.c
+++ b/arch/arm/mach-imx/mach-mx51_babbage.c
@@ -20,17 +20,16 @@
20#include <linux/spi/flash.h> 20#include <linux/spi/flash.h>
21#include <linux/spi/spi.h> 21#include <linux/spi/spi.h>
22 22
23#include <mach/common.h>
24#include <mach/hardware.h>
25#include <mach/iomux-mx51.h>
26
27#include <asm/setup.h> 23#include <asm/setup.h>
28#include <asm/mach-types.h> 24#include <asm/mach-types.h>
29#include <asm/mach/arch.h> 25#include <asm/mach/arch.h>
30#include <asm/mach/time.h> 26#include <asm/mach/time.h>
31 27
28#include "common.h"
32#include "devices-imx51.h" 29#include "devices-imx51.h"
33#include "cpu_op-mx51.h" 30#include "cpu_op-mx51.h"
31#include "hardware.h"
32#include "iomux-mx51.h"
34 33
35#define BABBAGE_USB_HUB_RESET IMX_GPIO_NR(1, 7) 34#define BABBAGE_USB_HUB_RESET IMX_GPIO_NR(1, 7)
36#define BABBAGE_USBH1_STP IMX_GPIO_NR(1, 27) 35#define BABBAGE_USBH1_STP IMX_GPIO_NR(1, 27)
diff --git a/arch/arm/mach-imx/mach-mxt_td60.c b/arch/arm/mach-imx/mach-mxt_td60.c
index 0bf6d30aa32d..f4a8c7e108e1 100644
--- a/arch/arm/mach-imx/mach-mxt_td60.c
+++ b/arch/arm/mach-imx/mach-mxt_td60.c
@@ -21,17 +21,17 @@
21#include <linux/mtd/physmap.h> 21#include <linux/mtd/physmap.h>
22#include <linux/i2c.h> 22#include <linux/i2c.h>
23#include <linux/irq.h> 23#include <linux/irq.h>
24#include <mach/common.h>
25#include <mach/hardware.h>
26#include <asm/mach-types.h> 24#include <asm/mach-types.h>
27#include <asm/mach/arch.h> 25#include <asm/mach/arch.h>
28#include <asm/mach/time.h> 26#include <asm/mach/time.h>
29#include <asm/mach/map.h> 27#include <asm/mach/map.h>
30#include <linux/gpio.h> 28#include <linux/gpio.h>
31#include <mach/iomux-mx27.h>
32#include <linux/i2c/pca953x.h> 29#include <linux/i2c/pca953x.h>
33 30
31#include "common.h"
34#include "devices-imx27.h" 32#include "devices-imx27.h"
33#include "hardware.h"
34#include "iomux-mx27.h"
35 35
36static const int mxt_td60_pins[] __initconst = { 36static const int mxt_td60_pins[] __initconst = {
37 /* UART0 */ 37 /* UART0 */
diff --git a/arch/arm/mach-imx/mach-pca100.c b/arch/arm/mach-imx/mach-pca100.c
index de8516b7d69f..eee369fa94a2 100644
--- a/arch/arm/mach-imx/mach-pca100.c
+++ b/arch/arm/mach-imx/mach-pca100.c
@@ -32,13 +32,13 @@
32 32
33#include <asm/mach/arch.h> 33#include <asm/mach/arch.h>
34#include <asm/mach-types.h> 34#include <asm/mach-types.h>
35#include <mach/common.h>
36#include <mach/hardware.h>
37#include <mach/iomux-mx27.h>
38#include <asm/mach/time.h> 35#include <asm/mach/time.h>
39#include <mach/ulpi.h>
40 36
37#include "common.h"
41#include "devices-imx27.h" 38#include "devices-imx27.h"
39#include "hardware.h"
40#include "iomux-mx27.h"
41#include "ulpi.h"
42 42
43#define OTG_PHY_CS_GPIO (GPIO_PORTB + 23) 43#define OTG_PHY_CS_GPIO (GPIO_PORTB + 23)
44#define USBH2_PHY_CS_GPIO (GPIO_PORTB + 24) 44#define USBH2_PHY_CS_GPIO (GPIO_PORTB + 24)
diff --git a/arch/arm/mach-imx/mach-pcm037.c b/arch/arm/mach-imx/mach-pcm037.c
index e3c45130fb3c..547fef133f65 100644
--- a/arch/arm/mach-imx/mach-pcm037.c
+++ b/arch/arm/mach-imx/mach-pcm037.c
@@ -42,13 +42,13 @@
42#include <asm/mach/time.h> 42#include <asm/mach/time.h>
43#include <asm/mach/map.h> 43#include <asm/mach/map.h>
44#include <asm/memblock.h> 44#include <asm/memblock.h>
45#include <mach/common.h>
46#include <mach/hardware.h>
47#include <mach/iomux-mx3.h>
48#include <mach/ulpi.h>
49 45
46#include "common.h"
50#include "devices-imx31.h" 47#include "devices-imx31.h"
48#include "hardware.h"
49#include "iomux-mx3.h"
51#include "pcm037.h" 50#include "pcm037.h"
51#include "ulpi.h"
52 52
53static enum pcm037_board_variant pcm037_instance = PCM037_PCM970; 53static enum pcm037_board_variant pcm037_instance = PCM037_PCM970;
54 54
diff --git a/arch/arm/mach-imx/mach-pcm037_eet.c b/arch/arm/mach-imx/mach-pcm037_eet.c
index 11ffa81ad17d..8fd8255068ee 100644
--- a/arch/arm/mach-imx/mach-pcm037_eet.c
+++ b/arch/arm/mach-imx/mach-pcm037_eet.c
@@ -11,13 +11,12 @@
11#include <linux/platform_device.h> 11#include <linux/platform_device.h>
12#include <linux/spi/spi.h> 12#include <linux/spi/spi.h>
13 13
14#include <mach/common.h>
15#include <mach/iomux-mx3.h>
16
17#include <asm/mach-types.h> 14#include <asm/mach-types.h>
18 15
19#include "pcm037.h" 16#include "pcm037.h"
17#include "common.h"
20#include "devices-imx31.h" 18#include "devices-imx31.h"
19#include "iomux-mx3.h"
21 20
22static unsigned int pcm037_eet_pins[] = { 21static unsigned int pcm037_eet_pins[] = {
23 /* Reserve and hardwire GPIO 57 high - S6E63D6 chipselect */ 22 /* Reserve and hardwire GPIO 57 high - S6E63D6 chipselect */
diff --git a/arch/arm/mach-imx/mach-pcm038.c b/arch/arm/mach-imx/mach-pcm038.c
index 95f49d936fd3..4aa0d0798605 100644
--- a/arch/arm/mach-imx/mach-pcm038.c
+++ b/arch/arm/mach-imx/mach-pcm038.c
@@ -33,13 +33,12 @@
33#include <asm/mach/arch.h> 33#include <asm/mach/arch.h>
34#include <asm/mach/time.h> 34#include <asm/mach/time.h>
35 35
36#include <mach/board-pcm038.h> 36#include "board-pcm038.h"
37#include <mach/common.h> 37#include "common.h"
38#include <mach/hardware.h>
39#include <mach/iomux-mx27.h>
40#include <mach/ulpi.h>
41
42#include "devices-imx27.h" 38#include "devices-imx27.h"
39#include "hardware.h"
40#include "iomux-mx27.h"
41#include "ulpi.h"
43 42
44static const int pcm038_pins[] __initconst = { 43static const int pcm038_pins[] __initconst = {
45 /* UART1 */ 44 /* UART1 */
@@ -212,7 +211,7 @@ static const struct spi_imx_master pcm038_spi0_data __initconst = {
212 211
213static struct regulator_consumer_supply sdhc1_consumers[] = { 212static struct regulator_consumer_supply sdhc1_consumers[] = {
214 { 213 {
215 .dev_name = "mxc-mmc.1", 214 .dev_name = "imx21-mmc.1",
216 .supply = "sdhc_vcc", 215 .supply = "sdhc_vcc",
217 }, 216 },
218}; 217};
diff --git a/arch/arm/mach-imx/mach-pcm043.c b/arch/arm/mach-imx/mach-pcm043.c
index e4bd4387e344..92445440221e 100644
--- a/arch/arm/mach-imx/mach-pcm043.c
+++ b/arch/arm/mach-imx/mach-pcm043.c
@@ -33,12 +33,11 @@
33#include <asm/mach/time.h> 33#include <asm/mach/time.h>
34#include <asm/mach/map.h> 34#include <asm/mach/map.h>
35 35
36#include <mach/hardware.h> 36#include "common.h"
37#include <mach/common.h>
38#include <mach/iomux-mx35.h>
39#include <mach/ulpi.h>
40
41#include "devices-imx35.h" 37#include "devices-imx35.h"
38#include "hardware.h"
39#include "iomux-mx35.h"
40#include "ulpi.h"
42 41
43static const struct fb_videomode fb_modedb[] = { 42static const struct fb_videomode fb_modedb[] = {
44 { 43 {
diff --git a/arch/arm/mach-imx/mach-qong.c b/arch/arm/mach-imx/mach-qong.c
index fb25fbd31226..96d9a91f8a3b 100644
--- a/arch/arm/mach-imx/mach-qong.c
+++ b/arch/arm/mach-imx/mach-qong.c
@@ -21,17 +21,17 @@
21#include <linux/mtd/nand.h> 21#include <linux/mtd/nand.h>
22#include <linux/gpio.h> 22#include <linux/gpio.h>
23 23
24#include <mach/hardware.h>
25#include <asm/mach-types.h> 24#include <asm/mach-types.h>
26#include <asm/mach/arch.h> 25#include <asm/mach/arch.h>
27#include <asm/mach/time.h> 26#include <asm/mach/time.h>
28#include <asm/mach/map.h> 27#include <asm/mach/map.h>
29#include <mach/common.h>
30#include <asm/page.h> 28#include <asm/page.h>
31#include <asm/setup.h> 29#include <asm/setup.h>
32#include <mach/iomux-mx3.h>
33 30
31#include "common.h"
34#include "devices-imx31.h" 32#include "devices-imx31.h"
33#include "hardware.h"
34#include "iomux-mx3.h"
35 35
36/* FPGA defines */ 36/* FPGA defines */
37#define QONG_FPGA_VERSION(major, minor, rev) \ 37#define QONG_FPGA_VERSION(major, minor, rev) \
diff --git a/arch/arm/mach-imx/mach-scb9328.c b/arch/arm/mach-imx/mach-scb9328.c
index 67ff38e9a3ca..fc970409dbaf 100644
--- a/arch/arm/mach-imx/mach-scb9328.c
+++ b/arch/arm/mach-imx/mach-scb9328.c
@@ -20,11 +20,10 @@
20#include <asm/mach/arch.h> 20#include <asm/mach/arch.h>
21#include <asm/mach/time.h> 21#include <asm/mach/time.h>
22 22
23#include <mach/common.h> 23#include "common.h"
24#include <mach/hardware.h>
25#include <mach/iomux-mx1.h>
26
27#include "devices-imx1.h" 24#include "devices-imx1.h"
25#include "hardware.h"
26#include "iomux-mx1.h"
28 27
29/* 28/*
30 * This scb9328 has a 32MiB flash 29 * This scb9328 has a 32MiB flash
diff --git a/arch/arm/mach-imx/mach-vpr200.c b/arch/arm/mach-imx/mach-vpr200.c
index 39eb7960e2a4..3aecf91e4289 100644
--- a/arch/arm/mach-imx/mach-vpr200.c
+++ b/arch/arm/mach-imx/mach-vpr200.c
@@ -28,15 +28,14 @@
28#include <asm/mach/arch.h> 28#include <asm/mach/arch.h>
29#include <asm/mach/time.h> 29#include <asm/mach/time.h>
30 30
31#include <mach/hardware.h>
32#include <mach/common.h>
33#include <mach/iomux-mx35.h>
34
35#include <linux/i2c.h> 31#include <linux/i2c.h>
36#include <linux/i2c/at24.h> 32#include <linux/i2c/at24.h>
37#include <linux/mfd/mc13xxx.h> 33#include <linux/mfd/mc13xxx.h>
38 34
35#include "common.h"
39#include "devices-imx35.h" 36#include "devices-imx35.h"
37#include "hardware.h"
38#include "iomux-mx35.h"
40 39
41#define GPIO_LCDPWR IMX_GPIO_NR(1, 2) 40#define GPIO_LCDPWR IMX_GPIO_NR(1, 2)
42#define GPIO_PMIC_INT IMX_GPIO_NR(2, 0) 41#define GPIO_PMIC_INT IMX_GPIO_NR(2, 0)
diff --git a/arch/arm/mach-imx/mm-imx1.c b/arch/arm/mach-imx/mm-imx1.c
index 6d60d51868bc..7a146671e65a 100644
--- a/arch/arm/mach-imx/mm-imx1.c
+++ b/arch/arm/mach-imx/mm-imx1.c
@@ -22,9 +22,10 @@
22 22
23#include <asm/mach/map.h> 23#include <asm/mach/map.h>
24 24
25#include <mach/common.h> 25#include "common.h"
26#include <mach/hardware.h> 26#include "devices/devices-common.h"
27#include <mach/iomux-v1.h> 27#include "hardware.h"
28#include "iomux-v1.h"
28 29
29static struct map_desc imx_io_desc[] __initdata = { 30static struct map_desc imx_io_desc[] __initdata = {
30 imx_map_entry(MX1, IO, MT_DEVICE), 31 imx_map_entry(MX1, IO, MT_DEVICE),
@@ -58,5 +59,7 @@ void __init imx1_soc_init(void)
58 MX1_GPIO_INT_PORTC, 0); 59 MX1_GPIO_INT_PORTC, 0);
59 mxc_register_gpio("imx1-gpio", 3, MX1_GPIO4_BASE_ADDR, SZ_256, 60 mxc_register_gpio("imx1-gpio", 3, MX1_GPIO4_BASE_ADDR, SZ_256,
60 MX1_GPIO_INT_PORTD, 0); 61 MX1_GPIO_INT_PORTD, 0);
62 imx_add_imx_dma("imx1-dma", MX1_DMA_BASE_ADDR,
63 MX1_DMA_INT, MX1_DMA_ERR);
61 pinctrl_provide_dummies(); 64 pinctrl_provide_dummies();
62} 65}
diff --git a/arch/arm/mach-imx/mm-imx21.c b/arch/arm/mach-imx/mm-imx21.c
index d056dad0940d..d8ccd3a8ec53 100644
--- a/arch/arm/mach-imx/mm-imx21.c
+++ b/arch/arm/mach-imx/mm-imx21.c
@@ -21,12 +21,13 @@
21#include <linux/mm.h> 21#include <linux/mm.h>
22#include <linux/init.h> 22#include <linux/init.h>
23#include <linux/pinctrl/machine.h> 23#include <linux/pinctrl/machine.h>
24#include <mach/hardware.h>
25#include <mach/common.h>
26#include <mach/devices-common.h>
27#include <asm/pgtable.h> 24#include <asm/pgtable.h>
28#include <asm/mach/map.h> 25#include <asm/mach/map.h>
29#include <mach/iomux-v1.h> 26
27#include "common.h"
28#include "devices/devices-common.h"
29#include "hardware.h"
30#include "iomux-v1.h"
30 31
31/* MX21 memory map definition */ 32/* MX21 memory map definition */
32static struct map_desc imx21_io_desc[] __initdata = { 33static struct map_desc imx21_io_desc[] __initdata = {
@@ -81,6 +82,8 @@ static const struct resource imx21_audmux_res[] __initconst = {
81 82
82void __init imx21_soc_init(void) 83void __init imx21_soc_init(void)
83{ 84{
85 mxc_device_init();
86
84 mxc_register_gpio("imx21-gpio", 0, MX21_GPIO1_BASE_ADDR, SZ_256, MX21_INT_GPIO, 0); 87 mxc_register_gpio("imx21-gpio", 0, MX21_GPIO1_BASE_ADDR, SZ_256, MX21_INT_GPIO, 0);
85 mxc_register_gpio("imx21-gpio", 1, MX21_GPIO2_BASE_ADDR, SZ_256, MX21_INT_GPIO, 0); 88 mxc_register_gpio("imx21-gpio", 1, MX21_GPIO2_BASE_ADDR, SZ_256, MX21_INT_GPIO, 0);
86 mxc_register_gpio("imx21-gpio", 2, MX21_GPIO3_BASE_ADDR, SZ_256, MX21_INT_GPIO, 0); 89 mxc_register_gpio("imx21-gpio", 2, MX21_GPIO3_BASE_ADDR, SZ_256, MX21_INT_GPIO, 0);
@@ -89,7 +92,8 @@ void __init imx21_soc_init(void)
89 mxc_register_gpio("imx21-gpio", 5, MX21_GPIO6_BASE_ADDR, SZ_256, MX21_INT_GPIO, 0); 92 mxc_register_gpio("imx21-gpio", 5, MX21_GPIO6_BASE_ADDR, SZ_256, MX21_INT_GPIO, 0);
90 93
91 pinctrl_provide_dummies(); 94 pinctrl_provide_dummies();
92 imx_add_imx_dma(); 95 imx_add_imx_dma("imx21-dma", MX21_DMA_BASE_ADDR,
96 MX21_INT_DMACH0, 0); /* No ERR irq */
93 platform_device_register_simple("imx21-audmux", 0, imx21_audmux_res, 97 platform_device_register_simple("imx21-audmux", 0, imx21_audmux_res,
94 ARRAY_SIZE(imx21_audmux_res)); 98 ARRAY_SIZE(imx21_audmux_res));
95} 99}
diff --git a/arch/arm/mach-imx/mm-imx25.c b/arch/arm/mach-imx/mm-imx25.c
index f3f5c6542ab4..9357707bb7af 100644
--- a/arch/arm/mach-imx/mm-imx25.c
+++ b/arch/arm/mach-imx/mm-imx25.c
@@ -24,11 +24,11 @@
24#include <asm/pgtable.h> 24#include <asm/pgtable.h>
25#include <asm/mach/map.h> 25#include <asm/mach/map.h>
26 26
27#include <mach/common.h> 27#include "common.h"
28#include <mach/devices-common.h> 28#include "devices/devices-common.h"
29#include <mach/hardware.h> 29#include "hardware.h"
30#include <mach/mx25.h> 30#include "iomux-v3.h"
31#include <mach/iomux-v3.h> 31#include "mx25.h"
32 32
33/* 33/*
34 * This table defines static virtual address mappings for I/O regions. 34 * This table defines static virtual address mappings for I/O regions.
@@ -89,6 +89,8 @@ static const struct resource imx25_audmux_res[] __initconst = {
89 89
90void __init imx25_soc_init(void) 90void __init imx25_soc_init(void)
91{ 91{
92 mxc_device_init();
93
92 /* i.mx25 has the i.mx35 type gpio */ 94 /* i.mx25 has the i.mx35 type gpio */
93 mxc_register_gpio("imx35-gpio", 0, MX25_GPIO1_BASE_ADDR, SZ_16K, MX25_INT_GPIO1, 0); 95 mxc_register_gpio("imx35-gpio", 0, MX25_GPIO1_BASE_ADDR, SZ_16K, MX25_INT_GPIO1, 0);
94 mxc_register_gpio("imx35-gpio", 1, MX25_GPIO2_BASE_ADDR, SZ_16K, MX25_INT_GPIO2, 0); 96 mxc_register_gpio("imx35-gpio", 1, MX25_GPIO2_BASE_ADDR, SZ_16K, MX25_INT_GPIO2, 0);
diff --git a/arch/arm/mach-imx/mm-imx27.c b/arch/arm/mach-imx/mm-imx27.c
index e7e24afc45ed..4f1be65a7b5f 100644
--- a/arch/arm/mach-imx/mm-imx27.c
+++ b/arch/arm/mach-imx/mm-imx27.c
@@ -21,12 +21,13 @@
21#include <linux/mm.h> 21#include <linux/mm.h>
22#include <linux/init.h> 22#include <linux/init.h>
23#include <linux/pinctrl/machine.h> 23#include <linux/pinctrl/machine.h>
24#include <mach/hardware.h>
25#include <mach/common.h>
26#include <mach/devices-common.h>
27#include <asm/pgtable.h> 24#include <asm/pgtable.h>
28#include <asm/mach/map.h> 25#include <asm/mach/map.h>
29#include <mach/iomux-v1.h> 26
27#include "common.h"
28#include "devices/devices-common.h"
29#include "hardware.h"
30#include "iomux-v1.h"
30 31
31/* MX27 memory map definition */ 32/* MX27 memory map definition */
32static struct map_desc imx27_io_desc[] __initdata = { 33static struct map_desc imx27_io_desc[] __initdata = {
@@ -81,6 +82,8 @@ static const struct resource imx27_audmux_res[] __initconst = {
81 82
82void __init imx27_soc_init(void) 83void __init imx27_soc_init(void)
83{ 84{
85 mxc_device_init();
86
84 /* i.mx27 has the i.mx21 type gpio */ 87 /* i.mx27 has the i.mx21 type gpio */
85 mxc_register_gpio("imx21-gpio", 0, MX27_GPIO1_BASE_ADDR, SZ_256, MX27_INT_GPIO, 0); 88 mxc_register_gpio("imx21-gpio", 0, MX27_GPIO1_BASE_ADDR, SZ_256, MX27_INT_GPIO, 0);
86 mxc_register_gpio("imx21-gpio", 1, MX27_GPIO2_BASE_ADDR, SZ_256, MX27_INT_GPIO, 0); 89 mxc_register_gpio("imx21-gpio", 1, MX27_GPIO2_BASE_ADDR, SZ_256, MX27_INT_GPIO, 0);
@@ -90,7 +93,8 @@ void __init imx27_soc_init(void)
90 mxc_register_gpio("imx21-gpio", 5, MX27_GPIO6_BASE_ADDR, SZ_256, MX27_INT_GPIO, 0); 93 mxc_register_gpio("imx21-gpio", 5, MX27_GPIO6_BASE_ADDR, SZ_256, MX27_INT_GPIO, 0);
91 94
92 pinctrl_provide_dummies(); 95 pinctrl_provide_dummies();
93 imx_add_imx_dma(); 96 imx_add_imx_dma("imx27-dma", MX27_DMA_BASE_ADDR,
97 MX27_INT_DMACH0, 0); /* No ERR irq */
94 /* imx27 has the imx21 type audmux */ 98 /* imx27 has the imx21 type audmux */
95 platform_device_register_simple("imx21-audmux", 0, imx27_audmux_res, 99 platform_device_register_simple("imx21-audmux", 0, imx27_audmux_res,
96 ARRAY_SIZE(imx27_audmux_res)); 100 ARRAY_SIZE(imx27_audmux_res));
diff --git a/arch/arm/mach-imx/mm-imx3.c b/arch/arm/mach-imx/mm-imx3.c
index b5deb0554552..cefa047c4053 100644
--- a/arch/arm/mach-imx/mm-imx3.c
+++ b/arch/arm/mach-imx/mm-imx3.c
@@ -26,12 +26,11 @@
26#include <asm/hardware/cache-l2x0.h> 26#include <asm/hardware/cache-l2x0.h>
27#include <asm/mach/map.h> 27#include <asm/mach/map.h>
28 28
29#include <mach/common.h> 29#include "common.h"
30#include <mach/devices-common.h>
31#include <mach/hardware.h>
32#include <mach/iomux-v3.h>
33
34#include "crmregs-imx3.h" 30#include "crmregs-imx3.h"
31#include "devices/devices-common.h"
32#include "hardware.h"
33#include "iomux-v3.h"
35 34
36void __iomem *mx3_ccm_base; 35void __iomem *mx3_ccm_base;
37 36
@@ -175,6 +174,8 @@ void __init imx31_soc_init(void)
175 174
176 imx3_init_l2x0(); 175 imx3_init_l2x0();
177 176
177 mxc_device_init();
178
178 mxc_register_gpio("imx31-gpio", 0, MX31_GPIO1_BASE_ADDR, SZ_16K, MX31_INT_GPIO1, 0); 179 mxc_register_gpio("imx31-gpio", 0, MX31_GPIO1_BASE_ADDR, SZ_16K, MX31_INT_GPIO1, 0);
179 mxc_register_gpio("imx31-gpio", 1, MX31_GPIO2_BASE_ADDR, SZ_16K, MX31_INT_GPIO2, 0); 180 mxc_register_gpio("imx31-gpio", 1, MX31_GPIO2_BASE_ADDR, SZ_16K, MX31_INT_GPIO2, 0);
180 mxc_register_gpio("imx31-gpio", 2, MX31_GPIO3_BASE_ADDR, SZ_16K, MX31_INT_GPIO3, 0); 181 mxc_register_gpio("imx31-gpio", 2, MX31_GPIO3_BASE_ADDR, SZ_16K, MX31_INT_GPIO3, 0);
@@ -271,6 +272,8 @@ void __init imx35_soc_init(void)
271 272
272 imx3_init_l2x0(); 273 imx3_init_l2x0();
273 274
275 mxc_device_init();
276
274 mxc_register_gpio("imx35-gpio", 0, MX35_GPIO1_BASE_ADDR, SZ_16K, MX35_INT_GPIO1, 0); 277 mxc_register_gpio("imx35-gpio", 0, MX35_GPIO1_BASE_ADDR, SZ_16K, MX35_INT_GPIO1, 0);
275 mxc_register_gpio("imx35-gpio", 1, MX35_GPIO2_BASE_ADDR, SZ_16K, MX35_INT_GPIO2, 0); 278 mxc_register_gpio("imx35-gpio", 1, MX35_GPIO2_BASE_ADDR, SZ_16K, MX35_INT_GPIO2, 0);
276 mxc_register_gpio("imx35-gpio", 2, MX35_GPIO3_BASE_ADDR, SZ_16K, MX35_INT_GPIO3, 0); 279 mxc_register_gpio("imx35-gpio", 2, MX35_GPIO3_BASE_ADDR, SZ_16K, MX35_INT_GPIO3, 0);
diff --git a/arch/arm/mach-imx/mm-imx5.c b/arch/arm/mach-imx/mm-imx5.c
index acb0aadb4255..f92caf1b30ba 100644
--- a/arch/arm/mach-imx/mm-imx5.c
+++ b/arch/arm/mach-imx/mm-imx5.c
@@ -18,10 +18,10 @@
18 18
19#include <asm/mach/map.h> 19#include <asm/mach/map.h>
20 20
21#include <mach/hardware.h> 21#include "common.h"
22#include <mach/common.h> 22#include "devices/devices-common.h"
23#include <mach/devices-common.h> 23#include "hardware.h"
24#include <mach/iomux-v3.h> 24#include "iomux-v3.h"
25 25
26/* 26/*
27 * Define the MX50 memory map. 27 * Define the MX50 memory map.
@@ -138,6 +138,8 @@ static const struct resource imx51_audmux_res[] __initconst = {
138 138
139void __init imx50_soc_init(void) 139void __init imx50_soc_init(void)
140{ 140{
141 mxc_device_init();
142
141 /* i.mx50 has the i.mx35 type gpio */ 143 /* i.mx50 has the i.mx35 type gpio */
142 mxc_register_gpio("imx35-gpio", 0, MX50_GPIO1_BASE_ADDR, SZ_16K, MX50_INT_GPIO1_LOW, MX50_INT_GPIO1_HIGH); 144 mxc_register_gpio("imx35-gpio", 0, MX50_GPIO1_BASE_ADDR, SZ_16K, MX50_INT_GPIO1_LOW, MX50_INT_GPIO1_HIGH);
143 mxc_register_gpio("imx35-gpio", 1, MX50_GPIO2_BASE_ADDR, SZ_16K, MX50_INT_GPIO2_LOW, MX50_INT_GPIO2_HIGH); 145 mxc_register_gpio("imx35-gpio", 1, MX50_GPIO2_BASE_ADDR, SZ_16K, MX50_INT_GPIO2_LOW, MX50_INT_GPIO2_HIGH);
@@ -153,6 +155,8 @@ void __init imx50_soc_init(void)
153 155
154void __init imx51_soc_init(void) 156void __init imx51_soc_init(void)
155{ 157{
158 mxc_device_init();
159
156 /* i.mx51 has the i.mx35 type gpio */ 160 /* i.mx51 has the i.mx35 type gpio */
157 mxc_register_gpio("imx35-gpio", 0, MX51_GPIO1_BASE_ADDR, SZ_16K, MX51_INT_GPIO1_LOW, MX51_INT_GPIO1_HIGH); 161 mxc_register_gpio("imx35-gpio", 0, MX51_GPIO1_BASE_ADDR, SZ_16K, MX51_INT_GPIO1_LOW, MX51_INT_GPIO1_HIGH);
158 mxc_register_gpio("imx35-gpio", 1, MX51_GPIO2_BASE_ADDR, SZ_16K, MX51_INT_GPIO2_LOW, MX51_INT_GPIO2_HIGH); 162 mxc_register_gpio("imx35-gpio", 1, MX51_GPIO2_BASE_ADDR, SZ_16K, MX51_INT_GPIO2_LOW, MX51_INT_GPIO2_HIGH);
diff --git a/arch/arm/plat-mxc/include/mach/mx1.h b/arch/arm/mach-imx/mx1.h
index 45bd31cc34d6..45bd31cc34d6 100644
--- a/arch/arm/plat-mxc/include/mach/mx1.h
+++ b/arch/arm/mach-imx/mx1.h
diff --git a/arch/arm/plat-mxc/include/mach/mx21.h b/arch/arm/mach-imx/mx21.h
index 468738aa997f..468738aa997f 100644
--- a/arch/arm/plat-mxc/include/mach/mx21.h
+++ b/arch/arm/mach-imx/mx21.h
diff --git a/arch/arm/plat-mxc/include/mach/mx25.h b/arch/arm/mach-imx/mx25.h
index ec466400a200..ec466400a200 100644
--- a/arch/arm/plat-mxc/include/mach/mx25.h
+++ b/arch/arm/mach-imx/mx25.h
diff --git a/arch/arm/plat-mxc/include/mach/mx27.h b/arch/arm/mach-imx/mx27.h
index e074616d54ca..e074616d54ca 100644
--- a/arch/arm/plat-mxc/include/mach/mx27.h
+++ b/arch/arm/mach-imx/mx27.h
diff --git a/arch/arm/plat-mxc/include/mach/mx2x.h b/arch/arm/mach-imx/mx2x.h
index 11642f5b224c..11642f5b224c 100644
--- a/arch/arm/plat-mxc/include/mach/mx2x.h
+++ b/arch/arm/mach-imx/mx2x.h
diff --git a/arch/arm/plat-mxc/include/mach/mx31.h b/arch/arm/mach-imx/mx31.h
index ee9b1f9215df..ee9b1f9215df 100644
--- a/arch/arm/plat-mxc/include/mach/mx31.h
+++ b/arch/arm/mach-imx/mx31.h
diff --git a/arch/arm/mach-imx/mx31lilly-db.c b/arch/arm/mach-imx/mx31lilly-db.c
index 29e890f92055..d4361b80c5fb 100644
--- a/arch/arm/mach-imx/mx31lilly-db.c
+++ b/arch/arm/mach-imx/mx31lilly-db.c
@@ -30,12 +30,11 @@
30#include <asm/mach/arch.h> 30#include <asm/mach/arch.h>
31#include <asm/mach/map.h> 31#include <asm/mach/map.h>
32 32
33#include <mach/hardware.h> 33#include "board-mx31lilly.h"
34#include <mach/common.h> 34#include "common.h"
35#include <mach/iomux-mx3.h>
36#include <mach/board-mx31lilly.h>
37
38#include "devices-imx31.h" 35#include "devices-imx31.h"
36#include "hardware.h"
37#include "iomux-mx3.h"
39 38
40/* 39/*
41 * This file contains board-specific initialization routines for the 40 * This file contains board-specific initialization routines for the
diff --git a/arch/arm/mach-imx/mx31lite-db.c b/arch/arm/mach-imx/mx31lite-db.c
index 83d17d9e0bc8..5a160b7e4fce 100644
--- a/arch/arm/mach-imx/mx31lite-db.c
+++ b/arch/arm/mach-imx/mx31lite-db.c
@@ -31,12 +31,11 @@
31#include <asm/mach/arch.h> 31#include <asm/mach/arch.h>
32#include <asm/mach/map.h> 32#include <asm/mach/map.h>
33 33
34#include <mach/hardware.h> 34#include "board-mx31lite.h"
35#include <mach/common.h> 35#include "common.h"
36#include <mach/iomux-mx3.h>
37#include <mach/board-mx31lite.h>
38
39#include "devices-imx31.h" 36#include "devices-imx31.h"
37#include "hardware.h"
38#include "iomux-mx3.h"
40 39
41/* 40/*
42 * This file contains board-specific initialization routines for the 41 * This file contains board-specific initialization routines for the
diff --git a/arch/arm/mach-imx/mx31moboard-devboard.c b/arch/arm/mach-imx/mx31moboard-devboard.c
index cc285e507286..52d5b1574721 100644
--- a/arch/arm/mach-imx/mx31moboard-devboard.c
+++ b/arch/arm/mach-imx/mx31moboard-devboard.c
@@ -22,12 +22,11 @@
22 22
23#include <linux/usb/otg.h> 23#include <linux/usb/otg.h>
24 24
25#include <mach/common.h> 25#include "common.h"
26#include <mach/iomux-mx3.h>
27#include <mach/hardware.h>
28#include <mach/ulpi.h>
29
30#include "devices-imx31.h" 26#include "devices-imx31.h"
27#include "hardware.h"
28#include "iomux-mx3.h"
29#include "ulpi.h"
31 30
32static unsigned int devboard_pins[] = { 31static unsigned int devboard_pins[] = {
33 /* UART1 */ 32 /* UART1 */
diff --git a/arch/arm/mach-imx/mx31moboard-marxbot.c b/arch/arm/mach-imx/mx31moboard-marxbot.c
index 135c90e3a45f..a4f43e90f3c1 100644
--- a/arch/arm/mach-imx/mx31moboard-marxbot.c
+++ b/arch/arm/mach-imx/mx31moboard-marxbot.c
@@ -24,14 +24,13 @@
24 24
25#include <linux/usb/otg.h> 25#include <linux/usb/otg.h>
26 26
27#include <mach/common.h>
28#include <mach/hardware.h>
29#include <mach/iomux-mx3.h>
30#include <mach/ulpi.h>
31
32#include <media/soc_camera.h> 27#include <media/soc_camera.h>
33 28
29#include "common.h"
34#include "devices-imx31.h" 30#include "devices-imx31.h"
31#include "hardware.h"
32#include "iomux-mx3.h"
33#include "ulpi.h"
35 34
36static unsigned int marxbot_pins[] = { 35static unsigned int marxbot_pins[] = {
37 /* SDHC2 */ 36 /* SDHC2 */
diff --git a/arch/arm/mach-imx/mx31moboard-smartbot.c b/arch/arm/mach-imx/mx31moboard-smartbot.c
index fabb801e7994..04ae45dbfaa7 100644
--- a/arch/arm/mach-imx/mx31moboard-smartbot.c
+++ b/arch/arm/mach-imx/mx31moboard-smartbot.c
@@ -23,15 +23,14 @@
23#include <linux/usb/otg.h> 23#include <linux/usb/otg.h>
24#include <linux/usb/ulpi.h> 24#include <linux/usb/ulpi.h>
25 25
26#include <mach/common.h>
27#include <mach/hardware.h>
28#include <mach/iomux-mx3.h>
29#include <mach/board-mx31moboard.h>
30#include <mach/ulpi.h>
31
32#include <media/soc_camera.h> 26#include <media/soc_camera.h>
33 27
28#include "board-mx31moboard.h"
29#include "common.h"
34#include "devices-imx31.h" 30#include "devices-imx31.h"
31#include "hardware.h"
32#include "iomux-mx3.h"
33#include "ulpi.h"
35 34
36static unsigned int smartbot_pins[] = { 35static unsigned int smartbot_pins[] = {
37 /* UART1 */ 36 /* UART1 */
diff --git a/arch/arm/plat-mxc/include/mach/mx35.h b/arch/arm/mach-imx/mx35.h
index 2af5d3a699c7..2af5d3a699c7 100644
--- a/arch/arm/plat-mxc/include/mach/mx35.h
+++ b/arch/arm/mach-imx/mx35.h
diff --git a/arch/arm/plat-mxc/include/mach/mx3x.h b/arch/arm/mach-imx/mx3x.h
index 96fb4fbc8ad7..96fb4fbc8ad7 100644
--- a/arch/arm/plat-mxc/include/mach/mx3x.h
+++ b/arch/arm/mach-imx/mx3x.h
diff --git a/arch/arm/plat-mxc/include/mach/mx50.h b/arch/arm/mach-imx/mx50.h
index 09ac19c1570c..09ac19c1570c 100644
--- a/arch/arm/plat-mxc/include/mach/mx50.h
+++ b/arch/arm/mach-imx/mx50.h
diff --git a/arch/arm/plat-mxc/include/mach/mx51.h b/arch/arm/mach-imx/mx51.h
index af844f76261a..af844f76261a 100644
--- a/arch/arm/plat-mxc/include/mach/mx51.h
+++ b/arch/arm/mach-imx/mx51.h
diff --git a/arch/arm/plat-mxc/include/mach/mx53.h b/arch/arm/mach-imx/mx53.h
index f829d1c22501..f829d1c22501 100644
--- a/arch/arm/plat-mxc/include/mach/mx53.h
+++ b/arch/arm/mach-imx/mx53.h
diff --git a/arch/arm/plat-mxc/include/mach/mx6q.h b/arch/arm/mach-imx/mx6q.h
index f7e7dbac8f4b..f7e7dbac8f4b 100644
--- a/arch/arm/plat-mxc/include/mach/mx6q.h
+++ b/arch/arm/mach-imx/mx6q.h
diff --git a/arch/arm/plat-mxc/include/mach/mxc.h b/arch/arm/mach-imx/mxc.h
index d78298366a91..d78298366a91 100644
--- a/arch/arm/plat-mxc/include/mach/mxc.h
+++ b/arch/arm/mach-imx/mxc.h
diff --git a/arch/arm/mach-imx/pcm970-baseboard.c b/arch/arm/mach-imx/pcm970-baseboard.c
index 9917e2ff51da..51c608234089 100644
--- a/arch/arm/mach-imx/pcm970-baseboard.c
+++ b/arch/arm/mach-imx/pcm970-baseboard.c
@@ -23,11 +23,10 @@
23 23
24#include <asm/mach/arch.h> 24#include <asm/mach/arch.h>
25 25
26#include <mach/common.h> 26#include "common.h"
27#include <mach/iomux-mx27.h>
28#include <mach/hardware.h>
29
30#include "devices-imx27.h" 27#include "devices-imx27.h"
28#include "hardware.h"
29#include "iomux-mx27.h"
31 30
32static const int pcm970_pins[] __initconst = { 31static const int pcm970_pins[] __initconst = {
33 /* SDHC */ 32 /* SDHC */
diff --git a/arch/arm/mach-imx/platsmp.c b/arch/arm/mach-imx/platsmp.c
index 2ac43e1a2dfd..3777b805b76b 100644
--- a/arch/arm/mach-imx/platsmp.c
+++ b/arch/arm/mach-imx/platsmp.c
@@ -16,8 +16,9 @@
16#include <asm/smp_scu.h> 16#include <asm/smp_scu.h>
17#include <asm/hardware/gic.h> 17#include <asm/hardware/gic.h>
18#include <asm/mach/map.h> 18#include <asm/mach/map.h>
19#include <mach/common.h> 19
20#include <mach/hardware.h> 20#include "common.h"
21#include "hardware.h"
21 22
22static void __iomem *scu_base; 23static void __iomem *scu_base;
23 24
diff --git a/arch/arm/mach-imx/pm-imx27.c b/arch/arm/mach-imx/pm-imx27.c
index 6fcffa7db978..56d02d064fbf 100644
--- a/arch/arm/mach-imx/pm-imx27.c
+++ b/arch/arm/mach-imx/pm-imx27.c
@@ -10,7 +10,8 @@
10#include <linux/kernel.h> 10#include <linux/kernel.h>
11#include <linux/suspend.h> 11#include <linux/suspend.h>
12#include <linux/io.h> 12#include <linux/io.h>
13#include <mach/hardware.h> 13
14#include "hardware.h"
14 15
15static int mx27_suspend_enter(suspend_state_t state) 16static int mx27_suspend_enter(suspend_state_t state)
16{ 17{
diff --git a/arch/arm/mach-imx/pm-imx3.c b/arch/arm/mach-imx/pm-imx3.c
index 822103bdb709..6a07006ff0f4 100644
--- a/arch/arm/mach-imx/pm-imx3.c
+++ b/arch/arm/mach-imx/pm-imx3.c
@@ -9,10 +9,11 @@
9 * http://www.gnu.org/copyleft/gpl.html 9 * http://www.gnu.org/copyleft/gpl.html
10 */ 10 */
11#include <linux/io.h> 11#include <linux/io.h>
12#include <mach/common.h> 12
13#include <mach/hardware.h> 13#include "common.h"
14#include <mach/devices-common.h>
15#include "crmregs-imx3.h" 14#include "crmregs-imx3.h"
15#include "devices/devices-common.h"
16#include "hardware.h"
16 17
17/* 18/*
18 * Set cpu low power mode before WFI instruction. This function is called 19 * Set cpu low power mode before WFI instruction. This function is called
diff --git a/arch/arm/mach-imx/pm-imx5.c b/arch/arm/mach-imx/pm-imx5.c
index 19621ed1ffa5..2e063c2deb9e 100644
--- a/arch/arm/mach-imx/pm-imx5.c
+++ b/arch/arm/mach-imx/pm-imx5.c
@@ -16,10 +16,11 @@
16#include <asm/cacheflush.h> 16#include <asm/cacheflush.h>
17#include <asm/system_misc.h> 17#include <asm/system_misc.h>
18#include <asm/tlbflush.h> 18#include <asm/tlbflush.h>
19#include <mach/common.h> 19
20#include <mach/cpuidle.h> 20#include "common.h"
21#include <mach/hardware.h> 21#include "cpuidle.h"
22#include "crm-regs-imx5.h" 22#include "crm-regs-imx5.h"
23#include "hardware.h"
23 24
24/* 25/*
25 * The WAIT_UNCLOCKED_POWER_OFF state only requires <= 500ns to exit. 26 * The WAIT_UNCLOCKED_POWER_OFF state only requires <= 500ns to exit.
diff --git a/arch/arm/mach-imx/pm-imx6q.c b/arch/arm/mach-imx/pm-imx6q.c
index f7b0c2b1b905..a17543da602d 100644
--- a/arch/arm/mach-imx/pm-imx6q.c
+++ b/arch/arm/mach-imx/pm-imx6q.c
@@ -18,8 +18,9 @@
18#include <asm/proc-fns.h> 18#include <asm/proc-fns.h>
19#include <asm/suspend.h> 19#include <asm/suspend.h>
20#include <asm/hardware/cache-l2x0.h> 20#include <asm/hardware/cache-l2x0.h>
21#include <mach/common.h> 21
22#include <mach/hardware.h> 22#include "common.h"
23#include "hardware.h"
23 24
24extern unsigned long phys_l2x0_saved_regs; 25extern unsigned long phys_l2x0_saved_regs;
25 26
diff --git a/arch/arm/plat-mxc/ssi-fiq-ksym.c b/arch/arm/mach-imx/ssi-fiq-ksym.c
index 792090f9a032..792090f9a032 100644
--- a/arch/arm/plat-mxc/ssi-fiq-ksym.c
+++ b/arch/arm/mach-imx/ssi-fiq-ksym.c
diff --git a/arch/arm/plat-mxc/ssi-fiq.S b/arch/arm/mach-imx/ssi-fiq.S
index a8b93c5f29b5..a8b93c5f29b5 100644
--- a/arch/arm/plat-mxc/ssi-fiq.S
+++ b/arch/arm/mach-imx/ssi-fiq.S
diff --git a/arch/arm/plat-mxc/system.c b/arch/arm/mach-imx/system.c
index 3da78cfc5a94..695e0d73bf85 100644
--- a/arch/arm/plat-mxc/system.c
+++ b/arch/arm/mach-imx/system.c
@@ -22,12 +22,13 @@
22#include <linux/err.h> 22#include <linux/err.h>
23#include <linux/delay.h> 23#include <linux/delay.h>
24 24
25#include <mach/hardware.h>
26#include <mach/common.h>
27#include <asm/system_misc.h> 25#include <asm/system_misc.h>
28#include <asm/proc-fns.h> 26#include <asm/proc-fns.h>
29#include <asm/mach-types.h> 27#include <asm/mach-types.h>
30 28
29#include "common.h"
30#include "hardware.h"
31
31static void __iomem *wdog_base; 32static void __iomem *wdog_base;
32 33
33/* 34/*
diff --git a/arch/arm/plat-mxc/time.c b/arch/arm/mach-imx/time.c
index a17abcf98325..f017302f6d09 100644
--- a/arch/arm/plat-mxc/time.c
+++ b/arch/arm/mach-imx/time.c
@@ -27,10 +27,11 @@
27#include <linux/clk.h> 27#include <linux/clk.h>
28#include <linux/err.h> 28#include <linux/err.h>
29 29
30#include <mach/hardware.h>
31#include <asm/sched_clock.h> 30#include <asm/sched_clock.h>
32#include <asm/mach/time.h> 31#include <asm/mach/time.h>
33#include <mach/common.h> 32
33#include "common.h"
34#include "hardware.h"
34 35
35/* 36/*
36 * There are 2 versions of the timer hardware on Freescale MXC hardware. 37 * There are 2 versions of the timer hardware on Freescale MXC hardware.
diff --git a/arch/arm/plat-mxc/tzic.c b/arch/arm/mach-imx/tzic.c
index 3ed1adbc09f8..9721161f208f 100644
--- a/arch/arm/plat-mxc/tzic.c
+++ b/arch/arm/mach-imx/tzic.c
@@ -21,10 +21,8 @@
21#include <asm/mach/irq.h> 21#include <asm/mach/irq.h>
22#include <asm/exception.h> 22#include <asm/exception.h>
23 23
24#include <mach/hardware.h> 24#include "common.h"
25#include <mach/common.h> 25#include "hardware.h"
26#include <mach/irqs.h>
27
28#include "irq-common.h" 26#include "irq-common.h"
29 27
30/* 28/*
diff --git a/arch/arm/plat-mxc/ulpi.c b/arch/arm/mach-imx/ulpi.c
index d2963427184f..0f051957d10c 100644
--- a/arch/arm/plat-mxc/ulpi.c
+++ b/arch/arm/mach-imx/ulpi.c
@@ -24,7 +24,7 @@
24#include <linux/usb/otg.h> 24#include <linux/usb/otg.h>
25#include <linux/usb/ulpi.h> 25#include <linux/usb/ulpi.h>
26 26
27#include <mach/ulpi.h> 27#include "ulpi.h"
28 28
29/* ULPIVIEW register bits */ 29/* ULPIVIEW register bits */
30#define ULPIVW_WU (1 << 31) /* Wakeup */ 30#define ULPIVW_WU (1 << 31) /* Wakeup */
diff --git a/arch/arm/plat-mxc/include/mach/ulpi.h b/arch/arm/mach-imx/ulpi.h
index 42bdaca6d7d9..42bdaca6d7d9 100644
--- a/arch/arm/plat-mxc/include/mach/ulpi.h
+++ b/arch/arm/mach-imx/ulpi.h
diff --git a/arch/arm/plat-mxc/Kconfig b/arch/arm/plat-mxc/Kconfig
deleted file mode 100644
index 88e1e2e7a20d..000000000000
--- a/arch/arm/plat-mxc/Kconfig
+++ /dev/null
@@ -1,89 +0,0 @@
1if ARCH_MXC
2
3source "arch/arm/plat-mxc/devices/Kconfig"
4
5menu "Freescale MXC Implementations"
6
7choice
8 prompt "Freescale CPU family:"
9 default ARCH_IMX_V6_V7
10
11config ARCH_IMX_V4_V5
12 bool "i.MX1, i.MX21, i.MX25, i.MX27"
13 select ARM_PATCH_PHYS_VIRT
14 select AUTO_ZRELADDR if !ZBOOT_ROM
15 help
16 This enables support for systems based on the Freescale i.MX ARMv4
17 and ARMv5 SoCs
18
19config ARCH_IMX_V6_V7
20 bool "i.MX3, i.MX5, i.MX6"
21 select ARM_PATCH_PHYS_VIRT
22 select AUTO_ZRELADDR if !ZBOOT_ROM
23 select MIGHT_HAVE_CACHE_L2X0
24 help
25 This enables support for systems based on the Freescale i.MX3, i.MX5
26 and i.MX6 family.
27
28endchoice
29
30source "arch/arm/mach-imx/Kconfig"
31
32endmenu
33
34config MXC_IRQ_PRIOR
35 bool "Use IRQ priority"
36 help
37 Select this if you want to use prioritized IRQ handling.
38 This feature prevents higher priority ISR to be interrupted
39 by lower priority IRQ even IRQF_DISABLED flag is not set.
40 This may be useful in embedded applications, where are strong
41 requirements for timing.
42 Say N here, unless you have a specialized requirement.
43
44config MXC_TZIC
45 bool
46
47config MXC_AVIC
48 bool
49
50config MXC_DEBUG_BOARD
51 bool "Enable MXC debug board(for 3-stack)"
52 help
53 The debug board is an integral part of the MXC 3-stack(PDK)
54 platforms, it can be attached or removed from the peripheral
55 board. On debug board, several debug devices(ethernet, UART,
56 buttons, LEDs and JTAG) are implemented. Between the MCU and
57 these devices, a CPLD is added as a bridge which performs
58 data/address de-multiplexing and decode, signal level shift,
59 interrupt control and various board functions.
60
61config HAVE_EPIT
62 bool
63
64config MXC_USE_EPIT
65 bool "Use EPIT instead of GPT"
66 depends on HAVE_EPIT
67 help
68 Use EPIT as the system timer on systems that have it. Normally you
69 don't have a reason to do so as the EPIT has the same features and
70 uses the same clocks as the GPT. Anyway, on some systems the GPT
71 may be in use for other purposes.
72
73config MXC_ULPI
74 bool
75
76config ARCH_HAS_RNGA
77 bool
78
79config IMX_HAVE_IOMUX_V1
80 bool
81
82config ARCH_MXC_IOMUX_V3
83 bool
84
85config IRAM_ALLOC
86 bool
87 select GENERIC_ALLOCATOR
88
89endif
diff --git a/arch/arm/plat-mxc/Makefile b/arch/arm/plat-mxc/Makefile
deleted file mode 100644
index 149237e24850..000000000000
--- a/arch/arm/plat-mxc/Makefile
+++ /dev/null
@@ -1,24 +0,0 @@
1#
2# Makefile for the linux kernel.
3#
4
5# Common support
6obj-y := time.o devices.o cpu.o system.o irq-common.o
7
8obj-$(CONFIG_MXC_TZIC) += tzic.o
9obj-$(CONFIG_MXC_AVIC) += avic.o
10
11obj-$(CONFIG_IMX_HAVE_IOMUX_V1) += iomux-v1.o
12obj-$(CONFIG_ARCH_MXC_IOMUX_V3) += iomux-v3.o
13obj-$(CONFIG_IRAM_ALLOC) += iram_alloc.o
14obj-$(CONFIG_MXC_ULPI) += ulpi.o
15obj-$(CONFIG_MXC_USE_EPIT) += epit.o
16obj-$(CONFIG_MXC_DEBUG_BOARD) += 3ds_debugboard.o
17obj-$(CONFIG_CPU_FREQ_IMX) += cpufreq.o
18obj-$(CONFIG_CPU_IDLE) += cpuidle.o
19ifdef CONFIG_SND_IMX_SOC
20obj-y += ssi-fiq.o
21obj-y += ssi-fiq-ksym.o
22endif
23
24obj-y += devices/
diff --git a/arch/arm/plat-mxc/include/mach/ipu.h b/arch/arm/plat-mxc/include/mach/ipu.h
deleted file mode 100644
index 539e559d18b2..000000000000
--- a/arch/arm/plat-mxc/include/mach/ipu.h
+++ /dev/null
@@ -1,177 +0,0 @@
1/*
2 * Copyright (C) 2008
3 * Guennadi Liakhovetski, DENX Software Engineering, <lg@denx.de>
4 *
5 * Copyright (C) 2005-2007 Freescale Semiconductor, Inc.
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 _IPU_H_
13#define _IPU_H_
14
15#include <linux/types.h>
16#include <linux/dmaengine.h>
17
18/* IPU DMA Controller channel definitions. */
19enum ipu_channel {
20 IDMAC_IC_0 = 0, /* IC (encoding task) to memory */
21 IDMAC_IC_1 = 1, /* IC (viewfinder task) to memory */
22 IDMAC_ADC_0 = 1,
23 IDMAC_IC_2 = 2,
24 IDMAC_ADC_1 = 2,
25 IDMAC_IC_3 = 3,
26 IDMAC_IC_4 = 4,
27 IDMAC_IC_5 = 5,
28 IDMAC_IC_6 = 6,
29 IDMAC_IC_7 = 7, /* IC (sensor data) to memory */
30 IDMAC_IC_8 = 8,
31 IDMAC_IC_9 = 9,
32 IDMAC_IC_10 = 10,
33 IDMAC_IC_11 = 11,
34 IDMAC_IC_12 = 12,
35 IDMAC_IC_13 = 13,
36 IDMAC_SDC_0 = 14, /* Background synchronous display data */
37 IDMAC_SDC_1 = 15, /* Foreground data (overlay) */
38 IDMAC_SDC_2 = 16,
39 IDMAC_SDC_3 = 17,
40 IDMAC_ADC_2 = 18,
41 IDMAC_ADC_3 = 19,
42 IDMAC_ADC_4 = 20,
43 IDMAC_ADC_5 = 21,
44 IDMAC_ADC_6 = 22,
45 IDMAC_ADC_7 = 23,
46 IDMAC_PF_0 = 24,
47 IDMAC_PF_1 = 25,
48 IDMAC_PF_2 = 26,
49 IDMAC_PF_3 = 27,
50 IDMAC_PF_4 = 28,
51 IDMAC_PF_5 = 29,
52 IDMAC_PF_6 = 30,
53 IDMAC_PF_7 = 31,
54};
55
56/* Order significant! */
57enum ipu_channel_status {
58 IPU_CHANNEL_FREE,
59 IPU_CHANNEL_INITIALIZED,
60 IPU_CHANNEL_READY,
61 IPU_CHANNEL_ENABLED,
62};
63
64#define IPU_CHANNELS_NUM 32
65
66enum pixel_fmt {
67 /* 1 byte */
68 IPU_PIX_FMT_GENERIC,
69 IPU_PIX_FMT_RGB332,
70 IPU_PIX_FMT_YUV420P,
71 IPU_PIX_FMT_YUV422P,
72 IPU_PIX_FMT_YUV420P2,
73 IPU_PIX_FMT_YVU422P,
74 /* 2 bytes */
75 IPU_PIX_FMT_RGB565,
76 IPU_PIX_FMT_RGB666,
77 IPU_PIX_FMT_BGR666,
78 IPU_PIX_FMT_YUYV,
79 IPU_PIX_FMT_UYVY,
80 /* 3 bytes */
81 IPU_PIX_FMT_RGB24,
82 IPU_PIX_FMT_BGR24,
83 /* 4 bytes */
84 IPU_PIX_FMT_GENERIC_32,
85 IPU_PIX_FMT_RGB32,
86 IPU_PIX_FMT_BGR32,
87 IPU_PIX_FMT_ABGR32,
88 IPU_PIX_FMT_BGRA32,
89 IPU_PIX_FMT_RGBA32,
90};
91
92enum ipu_color_space {
93 IPU_COLORSPACE_RGB,
94 IPU_COLORSPACE_YCBCR,
95 IPU_COLORSPACE_YUV
96};
97
98/*
99 * Enumeration of IPU rotation modes
100 */
101enum ipu_rotate_mode {
102 /* Note the enum values correspond to BAM value */
103 IPU_ROTATE_NONE = 0,
104 IPU_ROTATE_VERT_FLIP = 1,
105 IPU_ROTATE_HORIZ_FLIP = 2,
106 IPU_ROTATE_180 = 3,
107 IPU_ROTATE_90_RIGHT = 4,
108 IPU_ROTATE_90_RIGHT_VFLIP = 5,
109 IPU_ROTATE_90_RIGHT_HFLIP = 6,
110 IPU_ROTATE_90_LEFT = 7,
111};
112
113/*
114 * Enumeration of DI ports for ADC.
115 */
116enum display_port {
117 DISP0,
118 DISP1,
119 DISP2,
120 DISP3
121};
122
123struct idmac_video_param {
124 unsigned short in_width;
125 unsigned short in_height;
126 uint32_t in_pixel_fmt;
127 unsigned short out_width;
128 unsigned short out_height;
129 uint32_t out_pixel_fmt;
130 unsigned short out_stride;
131 bool graphics_combine_en;
132 bool global_alpha_en;
133 bool key_color_en;
134 enum display_port disp;
135 unsigned short out_left;
136 unsigned short out_top;
137};
138
139/*
140 * Union of initialization parameters for a logical channel. So far only video
141 * parameters are used.
142 */
143union ipu_channel_param {
144 struct idmac_video_param video;
145};
146
147struct idmac_tx_desc {
148 struct dma_async_tx_descriptor txd;
149 struct scatterlist *sg; /* scatterlist for this */
150 unsigned int sg_len; /* tx-descriptor. */
151 struct list_head list;
152};
153
154struct idmac_channel {
155 struct dma_chan dma_chan;
156 dma_cookie_t completed; /* last completed cookie */
157 union ipu_channel_param params;
158 enum ipu_channel link; /* input channel, linked to the output */
159 enum ipu_channel_status status;
160 void *client; /* Only one client per channel */
161 unsigned int n_tx_desc;
162 struct idmac_tx_desc *desc; /* allocated tx-descriptors */
163 struct scatterlist *sg[2]; /* scatterlist elements in buffer-0 and -1 */
164 struct list_head free_list; /* free tx-descriptors */
165 struct list_head queue; /* queued tx-descriptors */
166 spinlock_t lock; /* protects sg[0,1], queue */
167 struct mutex chan_mutex; /* protects status, cookie, free_list */
168 bool sec_chan_en;
169 int active_buffer;
170 unsigned int eof_irq;
171 char eof_name[16]; /* EOF IRQ name for request_irq() */
172};
173
174#define to_tx_desc(tx) container_of(tx, struct idmac_tx_desc, txd)
175#define to_idmac_chan(c) container_of(c, struct idmac_channel, dma_chan)
176
177#endif
diff --git a/arch/arm/plat-mxc/include/mach/irqs.h b/arch/arm/plat-mxc/include/mach/irqs.h
deleted file mode 100644
index d73f5e8ea9cb..000000000000
--- a/arch/arm/plat-mxc/include/mach/irqs.h
+++ /dev/null
@@ -1,21 +0,0 @@
1/*
2 * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
3 */
4
5/*
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#ifndef __ASM_ARCH_MXC_IRQS_H__
12#define __ASM_ARCH_MXC_IRQS_H__
13
14extern int imx_irq_set_priority(unsigned char irq, unsigned char prio);
15
16/* all normal IRQs can be FIQs */
17#define FIQ_START 0
18/* switch between IRQ and FIQ */
19extern int mxc_set_irq_fiq(unsigned int irq, unsigned int type);
20
21#endif /* __ASM_ARCH_MXC_IRQS_H__ */
diff --git a/arch/arm/plat-mxc/include/mach/timex.h b/arch/arm/plat-mxc/include/mach/timex.h
deleted file mode 100644
index 10343d1f87e1..000000000000
--- a/arch/arm/plat-mxc/include/mach/timex.h
+++ /dev/null
@@ -1,22 +0,0 @@
1/*
2 * Copyright (C) 1999 ARM Limited
3 * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
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#ifndef __ASM_ARCH_MXC_TIMEX_H__
17#define __ASM_ARCH_MXC_TIMEX_H__
18
19/* Bogus value */
20#define CLOCK_TICK_RATE 12345678
21
22#endif /* __ASM_ARCH_MXC_TIMEX_H__ */
diff --git a/arch/arm/plat-mxc/include/mach/uncompress.h b/arch/arm/plat-mxc/include/mach/uncompress.h
deleted file mode 100644
index 477971b00930..000000000000
--- a/arch/arm/plat-mxc/include/mach/uncompress.h
+++ /dev/null
@@ -1,132 +0,0 @@
1/*
2 * arch/arm/plat-mxc/include/mach/uncompress.h
3 *
4 * Copyright (C) 1999 ARM Limited
5 * Copyright (C) Shane Nay (shane@minirl.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 as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 */
17#ifndef __ASM_ARCH_MXC_UNCOMPRESS_H__
18#define __ASM_ARCH_MXC_UNCOMPRESS_H__
19
20#define __MXC_BOOT_UNCOMPRESS
21
22#include <asm/mach-types.h>
23
24unsigned long uart_base;
25
26#define UART(x) (*(volatile unsigned long *)(uart_base + (x)))
27
28#define USR2 0x98
29#define USR2_TXFE (1<<14)
30#define TXR 0x40
31#define UCR1 0x80
32#define UCR1_UARTEN 1
33
34/*
35 * The following code assumes the serial port has already been
36 * initialized by the bootloader. We search for the first enabled
37 * port in the most probable order. If you didn't setup a port in
38 * your bootloader then nothing will appear (which might be desired).
39 *
40 * This does not append a newline
41 */
42
43static void putc(int ch)
44{
45 if (!uart_base)
46 return;
47 if (!(UART(UCR1) & UCR1_UARTEN))
48 return;
49
50 while (!(UART(USR2) & USR2_TXFE))
51 barrier();
52
53 UART(TXR) = ch;
54}
55
56static inline void flush(void)
57{
58}
59
60#define MX1_UART1_BASE_ADDR 0x00206000
61#define MX25_UART1_BASE_ADDR 0x43f90000
62#define MX2X_UART1_BASE_ADDR 0x1000a000
63#define MX3X_UART1_BASE_ADDR 0x43F90000
64#define MX3X_UART2_BASE_ADDR 0x43F94000
65#define MX3X_UART5_BASE_ADDR 0x43FB4000
66#define MX51_UART1_BASE_ADDR 0x73fbc000
67#define MX50_UART1_BASE_ADDR 0x53fbc000
68#define MX53_UART1_BASE_ADDR 0x53fbc000
69
70static __inline__ void __arch_decomp_setup(unsigned long arch_id)
71{
72 switch (arch_id) {
73 case MACH_TYPE_MX1ADS:
74 case MACH_TYPE_SCB9328:
75 uart_base = MX1_UART1_BASE_ADDR;
76 break;
77 case MACH_TYPE_MX25_3DS:
78 uart_base = MX25_UART1_BASE_ADDR;
79 break;
80 case MACH_TYPE_IMX27LITE:
81 case MACH_TYPE_MX27_3DS:
82 case MACH_TYPE_MX27ADS:
83 case MACH_TYPE_PCM038:
84 case MACH_TYPE_MX21ADS:
85 case MACH_TYPE_PCA100:
86 case MACH_TYPE_MXT_TD60:
87 case MACH_TYPE_IMX27IPCAM:
88 uart_base = MX2X_UART1_BASE_ADDR;
89 break;
90 case MACH_TYPE_MX31LITE:
91 case MACH_TYPE_ARMADILLO5X0:
92 case MACH_TYPE_MX31MOBOARD:
93 case MACH_TYPE_QONG:
94 case MACH_TYPE_MX31_3DS:
95 case MACH_TYPE_PCM037:
96 case MACH_TYPE_MX31ADS:
97 case MACH_TYPE_MX35_3DS:
98 case MACH_TYPE_PCM043:
99 case MACH_TYPE_LILLY1131:
100 case MACH_TYPE_VPR200:
101 case MACH_TYPE_EUKREA_CPUIMX35SD:
102 uart_base = MX3X_UART1_BASE_ADDR;
103 break;
104 case MACH_TYPE_MAGX_ZN5:
105 uart_base = MX3X_UART2_BASE_ADDR;
106 break;
107 case MACH_TYPE_BUG:
108 uart_base = MX3X_UART5_BASE_ADDR;
109 break;
110 case MACH_TYPE_MX51_BABBAGE:
111 case MACH_TYPE_EUKREA_CPUIMX51SD:
112 case MACH_TYPE_MX51_3DS:
113 uart_base = MX51_UART1_BASE_ADDR;
114 break;
115 case MACH_TYPE_MX50_RDP:
116 uart_base = MX50_UART1_BASE_ADDR;
117 break;
118 case MACH_TYPE_MX53_EVK:
119 case MACH_TYPE_MX53_LOCO:
120 case MACH_TYPE_MX53_SMD:
121 case MACH_TYPE_MX53_ARD:
122 uart_base = MX53_UART1_BASE_ADDR;
123 break;
124 default:
125 break;
126 }
127}
128
129#define arch_decomp_setup() __arch_decomp_setup(arch_id)
130#define arch_decomp_wdog()
131
132#endif /* __ASM_ARCH_MXC_UNCOMPRESS_H__ */