浏览代码

Merge branch 'imx/multi-platform' of git://git.linaro.org/people/shawnguo/linux-2.6 into next/cleanup

From Shawn Guo:
"Here is the imx multi-platform support [1] that missed 3.7 merge window.
 Please pull it for 3.8 and exposing on linux-next.  As it touches a lot
 of files, I send it early, so that people can base their works off it
 to avoid conflicts."

* 'imx/multi-platform' of git://git.linaro.org/people/shawnguo/linux-2.6: (31 commits)
  ARM: imx: enable multi-platform build
  ARM: imx: call mxc_device_init() in soc specific function
  ARM: imx: remove header file mach/irqs.h
  ARM: imx: include hardware.h rather than mach/hardware.h
  ARM: imx: move debug macros to include/debug
  video: imxfb: remove cpu_is_xxx by using platform_device_id
  mmc: mxcmmc: remove cpu_is_xxx by using platform_device_id
  media: mx2_camera: remove cpu_is_xxx by using platform_device_id
  dma: imx-dma: remove cpu_is_xxx by using platform_device_id
  dma: imx-dma: retrieve MEM and IRQ from resources
  dma: imx-dma: use devm_kzalloc and devm_request_irq
  rtc: mxc_rtc: remove cpu_is_xxx by using platform_device_id
  mtd: mxc_nand: remove cpu_is_xxx by using platform_device_id
  i2c: imx: remove cpu_is_xxx by using platform_device_id
  watchdog: imx2_wdt: remove unneeded mach/hardware.h inclusion
  video: mx3fb: remove unneeded mach/hardware.h inclusion
  usb: ehci-mxc: remove unneeded mach/hardware.h inclusion
  ASoC: imx-ssi: remove unneeded mach/hardware.h inclusion
  dma: imx-sdma: remove unneeded mach/hardware.h inclusion
  dma: ipu: rename mach/ipu.h to include/linux/dma/ipu-dma.h
  ...

Signed-off-by: Olof Johansson <olof@lixom.net>
Olof Johansson 13 年之前
父节点
当前提交
4afe30dfc6
共有 100 个文件被更改,包括 473 次插入316 次删除
  1. 2 2
      Documentation/devicetree/bindings/i2c/fsl-imx-i2c.txt
  2. 0 1
      MAINTAINERS
  3. 1 14
      arch/arm/Kconfig
  4. 8 0
      arch/arm/Kconfig.debug
  5. 0 1
      arch/arm/Makefile
  6. 2 2
      arch/arm/boot/dts/imx27.dtsi
  7. 2 2
      arch/arm/boot/dts/imx51.dtsi
  8. 3 3
      arch/arm/boot/dts/imx53.dtsi
  9. 3 3
      arch/arm/boot/dts/imx6q.dtsi
  10. 3 2
      arch/arm/configs/imx_v4_v5_defconfig
  11. 2 1
      arch/arm/configs/imx_v6_v7_defconfig
  12. 22 11
      arch/arm/include/debug/imx.S
  13. 1 1
      arch/arm/mach-imx/3ds_debugboard.c
  14. 0 0
      arch/arm/mach-imx/3ds_debugboard.h
  15. 87 2
      arch/arm/mach-imx/Kconfig
  16. 22 0
      arch/arm/mach-imx/Makefile
  17. 2 3
      arch/arm/mach-imx/avic.c
  18. 0 0
      arch/arm/mach-imx/board-mx31lilly.h
  19. 0 0
      arch/arm/mach-imx/board-mx31lite.h
  20. 0 0
      arch/arm/mach-imx/board-mx31moboard.h
  21. 0 0
      arch/arm/mach-imx/board-pcm038.h
  22. 9 8
      arch/arm/mach-imx/clk-imx1.c
  23. 9 9
      arch/arm/mach-imx/clk-imx21.c
  24. 13 13
      arch/arm/mach-imx/clk-imx25.c
  25. 20 20
      arch/arm/mach-imx/clk-imx27.c
  26. 10 11
      arch/arm/mach-imx/clk-imx31.c
  27. 6 7
      arch/arm/mach-imx/clk-imx35.c
  28. 7 8
      arch/arm/mach-imx/clk-imx51-imx53.c
  29. 2 1
      arch/arm/mach-imx/clk-imx6q.c
  30. 2 2
      arch/arm/mach-imx/clk-pllv1.c
  31. 1 0
      arch/arm/mach-imx/common.h
  32. 3 2
      arch/arm/mach-imx/cpu-imx25.c
  33. 1 1
      arch/arm/mach-imx/cpu-imx27.c
  34. 4 3
      arch/arm/mach-imx/cpu-imx31.c
  35. 3 2
      arch/arm/mach-imx/cpu-imx35.c
  36. 2 1
      arch/arm/mach-imx/cpu-imx5.c
  37. 2 1
      arch/arm/mach-imx/cpu.c
  38. 2 1
      arch/arm/mach-imx/cpu_op-mx51.c
  39. 2 1
      arch/arm/mach-imx/cpufreq.c
  40. 0 0
      arch/arm/mach-imx/cpuidle.c
  41. 0 0
      arch/arm/mach-imx/cpuidle.h
  42. 1 2
      arch/arm/mach-imx/devices-imx1.h
  43. 1 2
      arch/arm/mach-imx/devices-imx21.h
  44. 1 2
      arch/arm/mach-imx/devices-imx25.h
  45. 1 2
      arch/arm/mach-imx/devices-imx27.h
  46. 1 2
      arch/arm/mach-imx/devices-imx31.h
  47. 1 2
      arch/arm/mach-imx/devices-imx35.h
  48. 1 2
      arch/arm/mach-imx/devices-imx50.h
  49. 1 2
      arch/arm/mach-imx/devices-imx51.h
  50. 0 0
      arch/arm/mach-imx/devices/Kconfig
  51. 2 0
      arch/arm/mach-imx/devices/Makefile
  52. 8 1
      arch/arm/mach-imx/devices/devices-common.h
  53. 1 3
      arch/arm/mach-imx/devices/devices.c
  54. 3 2
      arch/arm/mach-imx/devices/platform-ahci-imx.c
  55. 3 2
      arch/arm/mach-imx/devices/platform-fec.c
  56. 2 2
      arch/arm/mach-imx/devices/platform-flexcan.c
  57. 3 2
      arch/arm/mach-imx/devices/platform-fsl-usb2-udc.c
  58. 1 1
      arch/arm/mach-imx/devices/platform-gpio-mxc.c
  59. 3 2
      arch/arm/mach-imx/devices/platform-gpio_keys.c
  60. 20 3
      arch/arm/mach-imx/devices/platform-imx-dma.c
  61. 9 7
      arch/arm/mach-imx/devices/platform-imx-fb.c
  62. 17 15
      arch/arm/mach-imx/devices/platform-imx-i2c.c
  63. 2 2
      arch/arm/mach-imx/devices/platform-imx-keypad.c
  64. 2 2
      arch/arm/mach-imx/devices/platform-imx-ssi.c
  65. 2 2
      arch/arm/mach-imx/devices/platform-imx-uart.c
  66. 3 2
      arch/arm/mach-imx/devices/platform-imx2-wdt.c
  67. 2 2
      arch/arm/mach-imx/devices/platform-imx21-hcd.c
  68. 2 2
      arch/arm/mach-imx/devices/platform-imx27-coda.c
  69. 2 2
      arch/arm/mach-imx/devices/platform-imx_udc.c
  70. 3 2
      arch/arm/mach-imx/devices/platform-imxdi_rtc.c
  71. 3 2
      arch/arm/mach-imx/devices/platform-ipu-core.c
  72. 2 2
      arch/arm/mach-imx/devices/platform-mx1-camera.c
  73. 9 7
      arch/arm/mach-imx/devices/platform-mx2-camera.c
  74. 3 2
      arch/arm/mach-imx/devices/platform-mxc-ehci.c
  75. 11 9
      arch/arm/mach-imx/devices/platform-mxc-mmc.c
  76. 14 11
      arch/arm/mach-imx/devices/platform-mxc_nand.c
  77. 2 2
      arch/arm/mach-imx/devices/platform-mxc_pwm.c
  78. 2 2
      arch/arm/mach-imx/devices/platform-mxc_rnga.c
  79. 7 6
      arch/arm/mach-imx/devices/platform-mxc_rtc.c
  80. 2 2
      arch/arm/mach-imx/devices/platform-mxc_w1.c
  81. 2 2
      arch/arm/mach-imx/devices/platform-pata_imx.c
  82. 3 2
      arch/arm/mach-imx/devices/platform-sdhci-esdhc-imx.c
  83. 2 2
      arch/arm/mach-imx/devices/platform-spi_imx.c
  84. 2 2
      arch/arm/mach-imx/ehci-imx25.c
  85. 2 2
      arch/arm/mach-imx/ehci-imx27.c
  86. 2 2
      arch/arm/mach-imx/ehci-imx31.c
  87. 2 2
      arch/arm/mach-imx/ehci-imx35.c
  88. 2 2
      arch/arm/mach-imx/ehci-imx5.c
  89. 3 3
      arch/arm/mach-imx/epit.c
  90. 0 0
      arch/arm/mach-imx/eukrea-baseboards.h
  91. 3 4
      arch/arm/mach-imx/eukrea_mbimx27-baseboard.c
  92. 4 4
      arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c
  93. 3 4
      arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c
  94. 3 4
      arch/arm/mach-imx/eukrea_mbimxsd51-baseboard.c
  95. 13 13
      arch/arm/mach-imx/hardware.h
  96. 2 1
      arch/arm/mach-imx/hotplug.c
  97. 0 0
      arch/arm/mach-imx/iim.h
  98. 6 5
      arch/arm/mach-imx/imx27-dt.c
  99. 3 2
      arch/arm/mach-imx/imx31-dt.c
  100. 5 4
      arch/arm/mach-imx/imx51-dt.c

+ 2 - 2
Documentation/devicetree/bindings/i2c/fsl-imx-i2c.txt

@@ -12,13 +12,13 @@ Optional properties:
 Examples:
 Examples:
 
 
 i2c@83fc4000 { /* I2C2 on i.MX51 */
 i2c@83fc4000 { /* I2C2 on i.MX51 */
-	compatible = "fsl,imx51-i2c", "fsl,imx1-i2c";
+	compatible = "fsl,imx51-i2c", "fsl,imx21-i2c";
 	reg = <0x83fc4000 0x4000>;
 	reg = <0x83fc4000 0x4000>;
 	interrupts = <63>;
 	interrupts = <63>;
 };
 };
 
 
 i2c@70038000 { /* HS-I2C on i.MX51 */
 i2c@70038000 { /* HS-I2C on i.MX51 */
-	compatible = "fsl,imx51-i2c", "fsl,imx1-i2c";
+	compatible = "fsl,imx51-i2c", "fsl,imx21-i2c";
 	reg = <0x70038000 0x4000>;
 	reg = <0x70038000 0x4000>;
 	interrupts = <64>;
 	interrupts = <64>;
 	clock-frequency = <400000>;
 	clock-frequency = <400000>;

+ 0 - 1
MAINTAINERS

@@ -789,7 +789,6 @@ L:	linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 S:	Maintained
 S:	Maintained
 T:	git git://git.pengutronix.de/git/imx/linux-2.6.git
 T:	git git://git.pengutronix.de/git/imx/linux-2.6.git
 F:	arch/arm/mach-imx/
 F:	arch/arm/mach-imx/
-F:	arch/arm/plat-mxc/
 F:	arch/arm/configs/imx*_defconfig
 F:	arch/arm/configs/imx*_defconfig
 
 
 ARM/FREESCALE IMX6
 ARM/FREESCALE IMX6

+ 1 - 14
arch/arm/Kconfig

@@ -433,19 +433,6 @@ config ARCH_FOOTBRIDGE
 	  Support for systems based on the DC21285 companion chip
 	  Support for systems based on the DC21285 companion chip
 	  ("FootBridge"), such as the Simtec CATS and the Rebel NetWinder.
 	  ("FootBridge"), such as the Simtec CATS and the Rebel NetWinder.
 
 
-config ARCH_MXC
-	bool "Freescale MXC/iMX-based"
-	select ARCH_REQUIRE_GPIOLIB
-	select CLKDEV_LOOKUP
-	select CLKSRC_MMIO
-	select GENERIC_CLOCKEVENTS
-	select GENERIC_IRQ_CHIP
-	select MULTI_IRQ_HANDLER
-	select SPARSE_IRQ
-	select USE_OF
-	help
-	  Support for Freescale MXC/iMX-based family of processors
-
 config ARCH_MXS
 config ARCH_MXS
 	bool "Freescale MXS-based"
 	bool "Freescale MXS-based"
 	select ARCH_REQUIRE_GPIOLIB
 	select ARCH_REQUIRE_GPIOLIB
@@ -1058,7 +1045,7 @@ source "arch/arm/mach-msm/Kconfig"
 
 
 source "arch/arm/mach-mv78xx0/Kconfig"
 source "arch/arm/mach-mv78xx0/Kconfig"
 
 
-source "arch/arm/plat-mxc/Kconfig"
+source "arch/arm/mach-imx/Kconfig"
 
 
 source "arch/arm/mach-mxs/Kconfig"
 source "arch/arm/mach-mxs/Kconfig"
 
 

+ 8 - 0
arch/arm/Kconfig.debug

@@ -412,6 +412,14 @@ endchoice
 config DEBUG_LL_INCLUDE
 config DEBUG_LL_INCLUDE
 	string
 	string
 	default "debug/icedcc.S" if DEBUG_ICEDCC
 	default "debug/icedcc.S" if DEBUG_ICEDCC
+	default "debug/imx.S" if DEBUG_IMX1_UART || \
+				 DEBUG_IMX25_UART || \
+				 DEBUG_IMX21_IMX27_UART || \
+				 DEBUG_IMX31_IMX35_UART || \
+				 DEBUG_IMX51_UART || \
+				 DEBUG_IMX50_IMX53_UART ||\
+				 DEBUG_IMX6Q_UART2 || \
+				 DEBUG_IMX6Q_UART4
 	default "debug/highbank.S" if DEBUG_HIGHBANK_UART
 	default "debug/highbank.S" if DEBUG_HIGHBANK_UART
 	default "debug/mvebu.S" if DEBUG_MVEBU_UART
 	default "debug/mvebu.S" if DEBUG_MVEBU_UART
 	default "debug/picoxcell.S" if DEBUG_PICOXCELL_UART
 	default "debug/picoxcell.S" if DEBUG_PICOXCELL_UART

+ 0 - 1
arch/arm/Makefile

@@ -195,7 +195,6 @@ machine-$(CONFIG_ARCH_ZYNQ)		+= zynq
 
 
 # Platform directory name.  This list is sorted alphanumerically
 # Platform directory name.  This list is sorted alphanumerically
 # by CONFIG_* macro name.
 # by CONFIG_* macro name.
-plat-$(CONFIG_ARCH_MXC)		+= mxc
 plat-$(CONFIG_ARCH_OMAP)	+= omap
 plat-$(CONFIG_ARCH_OMAP)	+= omap
 plat-$(CONFIG_ARCH_S3C64XX)	+= samsung
 plat-$(CONFIG_ARCH_S3C64XX)	+= samsung
 plat-$(CONFIG_ARCH_ZYNQ)	+= versatile
 plat-$(CONFIG_ARCH_ZYNQ)	+= versatile

+ 2 - 2
arch/arm/boot/dts/imx27.dtsi

@@ -113,7 +113,7 @@
 			i2c1: i2c@10012000 {
 			i2c1: i2c@10012000 {
 				#address-cells = <1>;
 				#address-cells = <1>;
 				#size-cells = <0>;
 				#size-cells = <0>;
-				compatible = "fsl,imx27-i2c", "fsl,imx1-i2c";
+				compatible = "fsl,imx27-i2c", "fsl,imx21-i2c";
 				reg = <0x10012000 0x1000>;
 				reg = <0x10012000 0x1000>;
 				interrupts = <12>;
 				interrupts = <12>;
 				status = "disabled";
 				status = "disabled";
@@ -205,7 +205,7 @@
 			i2c2: i2c@1001d000 {
 			i2c2: i2c@1001d000 {
 				#address-cells = <1>;
 				#address-cells = <1>;
 				#size-cells = <0>;
 				#size-cells = <0>;
-				compatible = "fsl,imx27-i2c", "fsl,imx1-i2c";
+				compatible = "fsl,imx27-i2c", "fsl,imx21-i2c";
 				reg = <0x1001d000 0x1000>;
 				reg = <0x1001d000 0x1000>;
 				interrupts = <1>;
 				interrupts = <1>;
 				status = "disabled";
 				status = "disabled";

+ 2 - 2
arch/arm/boot/dts/imx51.dtsi

@@ -377,7 +377,7 @@
 			i2c@83fc4000 { /* I2C2 */
 			i2c@83fc4000 { /* I2C2 */
 				#address-cells = <1>;
 				#address-cells = <1>;
 				#size-cells = <0>;
 				#size-cells = <0>;
-				compatible = "fsl,imx51-i2c", "fsl,imx1-i2c";
+				compatible = "fsl,imx51-i2c", "fsl,imx21-i2c";
 				reg = <0x83fc4000 0x4000>;
 				reg = <0x83fc4000 0x4000>;
 				interrupts = <63>;
 				interrupts = <63>;
 				status = "disabled";
 				status = "disabled";
@@ -386,7 +386,7 @@
 			i2c@83fc8000 { /* I2C1 */
 			i2c@83fc8000 { /* I2C1 */
 				#address-cells = <1>;
 				#address-cells = <1>;
 				#size-cells = <0>;
 				#size-cells = <0>;
-				compatible = "fsl,imx51-i2c", "fsl,imx1-i2c";
+				compatible = "fsl,imx51-i2c", "fsl,imx21-i2c";
 				reg = <0x83fc8000 0x4000>;
 				reg = <0x83fc8000 0x4000>;
 				interrupts = <62>;
 				interrupts = <62>;
 				status = "disabled";
 				status = "disabled";

+ 3 - 3
arch/arm/boot/dts/imx53.dtsi

@@ -432,7 +432,7 @@
 			i2c@53fec000 { /* I2C3 */
 			i2c@53fec000 { /* I2C3 */
 				#address-cells = <1>;
 				#address-cells = <1>;
 				#size-cells = <0>;
 				#size-cells = <0>;
-				compatible = "fsl,imx53-i2c", "fsl,imx1-i2c";
+				compatible = "fsl,imx53-i2c", "fsl,imx21-i2c";
 				reg = <0x53fec000 0x4000>;
 				reg = <0x53fec000 0x4000>;
 				interrupts = <64>;
 				interrupts = <64>;
 				status = "disabled";
 				status = "disabled";
@@ -488,7 +488,7 @@
 			i2c@63fc4000 { /* I2C2 */
 			i2c@63fc4000 { /* I2C2 */
 				#address-cells = <1>;
 				#address-cells = <1>;
 				#size-cells = <0>;
 				#size-cells = <0>;
-				compatible = "fsl,imx53-i2c", "fsl,imx1-i2c";
+				compatible = "fsl,imx53-i2c", "fsl,imx21-i2c";
 				reg = <0x63fc4000 0x4000>;
 				reg = <0x63fc4000 0x4000>;
 				interrupts = <63>;
 				interrupts = <63>;
 				status = "disabled";
 				status = "disabled";
@@ -497,7 +497,7 @@
 			i2c@63fc8000 { /* I2C1 */
 			i2c@63fc8000 { /* I2C1 */
 				#address-cells = <1>;
 				#address-cells = <1>;
 				#size-cells = <0>;
 				#size-cells = <0>;
-				compatible = "fsl,imx53-i2c", "fsl,imx1-i2c";
+				compatible = "fsl,imx53-i2c", "fsl,imx21-i2c";
 				reg = <0x63fc8000 0x4000>;
 				reg = <0x63fc8000 0x4000>;
 				interrupts = <62>;
 				interrupts = <62>;
 				status = "disabled";
 				status = "disabled";

+ 3 - 3
arch/arm/boot/dts/imx6q.dtsi

@@ -882,7 +882,7 @@
 			i2c@021a0000 { /* I2C1 */
 			i2c@021a0000 { /* I2C1 */
 				#address-cells = <1>;
 				#address-cells = <1>;
 				#size-cells = <0>;
 				#size-cells = <0>;
-				compatible = "fsl,imx6q-i2c", "fsl,imx1-i2c";
+				compatible = "fsl,imx6q-i2c", "fsl,imx21-i2c";
 				reg = <0x021a0000 0x4000>;
 				reg = <0x021a0000 0x4000>;
 				interrupts = <0 36 0x04>;
 				interrupts = <0 36 0x04>;
 				clocks = <&clks 125>;
 				clocks = <&clks 125>;
@@ -892,7 +892,7 @@
 			i2c@021a4000 { /* I2C2 */
 			i2c@021a4000 { /* I2C2 */
 				#address-cells = <1>;
 				#address-cells = <1>;
 				#size-cells = <0>;
 				#size-cells = <0>;
-				compatible = "fsl,imx6q-i2c", "fsl,imx1-i2c";
+				compatible = "fsl,imx6q-i2c", "fsl,imx21-i2c";
 				reg = <0x021a4000 0x4000>;
 				reg = <0x021a4000 0x4000>;
 				interrupts = <0 37 0x04>;
 				interrupts = <0 37 0x04>;
 				clocks = <&clks 126>;
 				clocks = <&clks 126>;
@@ -902,7 +902,7 @@
 			i2c@021a8000 { /* I2C3 */
 			i2c@021a8000 { /* I2C3 */
 				#address-cells = <1>;
 				#address-cells = <1>;
 				#size-cells = <0>;
 				#size-cells = <0>;
-				compatible = "fsl,imx6q-i2c", "fsl,imx1-i2c";
+				compatible = "fsl,imx6q-i2c", "fsl,imx21-i2c";
 				reg = <0x021a8000 0x4000>;
 				reg = <0x021a8000 0x4000>;
 				interrupts = <0 38 0x04>;
 				interrupts = <0 38 0x04>;
 				clocks = <&clks 127>;
 				clocks = <&clks 127>;

+ 3 - 2
arch/arm/configs/imx_v4_v5_defconfig

@@ -17,8 +17,9 @@ CONFIG_MODULE_UNLOAD=y
 # CONFIG_BLK_DEV_BSG is not set
 # CONFIG_BLK_DEV_BSG is not set
 # CONFIG_IOSCHED_DEADLINE is not set
 # CONFIG_IOSCHED_DEADLINE is not set
 # CONFIG_IOSCHED_CFQ is not set
 # CONFIG_IOSCHED_CFQ is not set
-CONFIG_ARCH_MXC=y
-CONFIG_ARCH_IMX_V4_V5=y
+CONFIG_ARCH_MULTI_V4T=y
+CONFIG_ARCH_MULTI_V5=y
+# CONFIG_ARCH_MULTI_V7 is not set
 CONFIG_ARCH_MX1ADS=y
 CONFIG_ARCH_MX1ADS=y
 CONFIG_MACH_SCB9328=y
 CONFIG_MACH_SCB9328=y
 CONFIG_MACH_APF9328=y
 CONFIG_MACH_APF9328=y

+ 2 - 1
arch/arm/configs/imx_v6_v7_defconfig

@@ -16,7 +16,8 @@ CONFIG_MODULE_UNLOAD=y
 CONFIG_MODVERSIONS=y
 CONFIG_MODVERSIONS=y
 CONFIG_MODULE_SRCVERSION_ALL=y
 CONFIG_MODULE_SRCVERSION_ALL=y
 # CONFIG_BLK_DEV_BSG is not set
 # CONFIG_BLK_DEV_BSG is not set
-CONFIG_ARCH_MXC=y
+CONFIG_ARCH_MULTI_V6=y
+CONFIG_ARCH_MULTI_V7=y
 CONFIG_MACH_MX31LILLY=y
 CONFIG_MACH_MX31LILLY=y
 CONFIG_MACH_MX31LITE=y
 CONFIG_MACH_MX31LITE=y
 CONFIG_MACH_PCM037=y
 CONFIG_MACH_PCM037=y

+ 22 - 11
arch/arm/plat-mxc/include/mach/debug-macro.S → arch/arm/include/debug/imx.S

@@ -10,27 +10,38 @@
  * published by the Free Software Foundation.
  * published by the Free Software Foundation.
  *
  *
  */
  */
-#include <mach/hardware.h>
-
 #ifdef CONFIG_DEBUG_IMX1_UART
 #ifdef CONFIG_DEBUG_IMX1_UART
-#define UART_PADDR	MX1_UART1_BASE_ADDR
+#define UART_PADDR	0x00206000
 #elif defined (CONFIG_DEBUG_IMX25_UART)
 #elif defined (CONFIG_DEBUG_IMX25_UART)
-#define UART_PADDR	MX25_UART1_BASE_ADDR
+#define UART_PADDR	0x43f90000
 #elif defined (CONFIG_DEBUG_IMX21_IMX27_UART)
 #elif defined (CONFIG_DEBUG_IMX21_IMX27_UART)
-#define UART_PADDR	MX2x_UART1_BASE_ADDR
+#define UART_PADDR	0x1000a000
 #elif defined (CONFIG_DEBUG_IMX31_IMX35_UART)
 #elif defined (CONFIG_DEBUG_IMX31_IMX35_UART)
-#define UART_PADDR	MX3x_UART1_BASE_ADDR
+#define UART_PADDR	0x43f90000
 #elif defined (CONFIG_DEBUG_IMX51_UART)
 #elif defined (CONFIG_DEBUG_IMX51_UART)
-#define UART_PADDR	MX51_UART1_BASE_ADDR
+#define UART_PADDR	0x73fbc000
 #elif defined (CONFIG_DEBUG_IMX50_IMX53_UART)
 #elif defined (CONFIG_DEBUG_IMX50_IMX53_UART)
-#define UART_PADDR	MX53_UART1_BASE_ADDR
+#define UART_PADDR	0x53fbc000
 #elif defined (CONFIG_DEBUG_IMX6Q_UART2)
 #elif defined (CONFIG_DEBUG_IMX6Q_UART2)
-#define UART_PADDR	MX6Q_UART2_BASE_ADDR
+#define UART_PADDR	0x021e8000
 #elif defined (CONFIG_DEBUG_IMX6Q_UART4)
 #elif defined (CONFIG_DEBUG_IMX6Q_UART4)
-#define UART_PADDR	MX6Q_UART4_BASE_ADDR
+#define UART_PADDR	0x021f0000
 #endif
 #endif
 
 
-#define UART_VADDR	IMX_IO_ADDRESS(UART_PADDR)
+/*
+ * FIXME: This is a copy of IMX_IO_P2V in hardware.h, and needs to
+ * stay sync with that.  It's hard to maintain, and should be fixed
+ * globally for multi-platform build to use a fixed virtual address
+ * for low-level debug uart port across platforms.
+ */
+#define IMX_IO_P2V(x)	(						\
+			(((x) & 0x80000000) >> 7) |			\
+			(0xf4000000 +					\
+			(((x) & 0x50000000) >> 6) +			\
+			(((x) & 0x0b000000) >> 4) +			\
+			(((x) & 0x000fffff))))
+
+#define UART_VADDR	IMX_IO_P2V(UART_PADDR)
 
 
 		.macro	addruart, rp, rv, tmp
 		.macro	addruart, rp, rv, tmp
 		ldr	\rp, =UART_PADDR	@ physical
 		ldr	\rp, =UART_PADDR	@ physical

+ 1 - 1
arch/arm/plat-mxc/3ds_debugboard.c → arch/arm/mach-imx/3ds_debugboard.c

@@ -21,7 +21,7 @@
 #include <linux/regulator/machine.h>
 #include <linux/regulator/machine.h>
 #include <linux/regulator/fixed.h>
 #include <linux/regulator/fixed.h>
 
 
-#include <mach/hardware.h>
+#include "hardware.h"
 
 
 /* LAN9217 ethernet base address */
 /* LAN9217 ethernet base address */
 #define LAN9217_BASE_ADDR(n)	(n + 0x0)
 #define LAN9217_BASE_ADDR(n)	(n + 0x0)

+ 0 - 0
arch/arm/plat-mxc/include/mach/3ds_debugboard.h → arch/arm/mach-imx/3ds_debugboard.h


+ 87 - 2
arch/arm/mach-imx/Kconfig

@@ -1,3 +1,70 @@
+config ARCH_MXC
+	def_bool y if ARCH_MULTI_V4_V5 || ARCH_MULTI_V6_V7
+	select ARCH_REQUIRE_GPIOLIB
+	select ARM_PATCH_PHYS_VIRT
+	select AUTO_ZRELADDR if !ZBOOT_ROM
+	select CLKDEV_LOOKUP
+	select CLKSRC_MMIO
+	select GENERIC_CLOCKEVENTS
+	select GENERIC_IRQ_CHIP
+	select MULTI_IRQ_HANDLER
+	select SPARSE_IRQ
+	select USE_OF
+	help
+	  Support for Freescale MXC/iMX-based family of processors
+
+menu "Freescale i.MX support"
+	depends on ARCH_MXC
+
+config MXC_IRQ_PRIOR
+	bool "Use IRQ priority"
+	help
+	  Select this if you want to use prioritized IRQ handling.
+	  This feature prevents higher priority ISR to be interrupted
+	  by lower priority IRQ even IRQF_DISABLED flag is not set.
+	  This may be useful in embedded applications, where are strong
+	  requirements for timing.
+	  Say N here, unless you have a specialized requirement.
+
+config MXC_TZIC
+	bool
+
+config MXC_AVIC
+	bool
+
+config MXC_DEBUG_BOARD
+	bool "Enable MXC debug board(for 3-stack)"
+	help
+	  The debug board is an integral part of the MXC 3-stack(PDK)
+	  platforms, it can be attached or removed from the peripheral
+	  board. On debug board, several debug devices(ethernet, UART,
+	  buttons, LEDs and JTAG) are implemented. Between the MCU and
+	  these devices, a CPLD is added as a bridge which performs
+	  data/address de-multiplexing and decode, signal level shift,
+	  interrupt control and various board functions.
+
+config HAVE_EPIT
+	bool
+
+config MXC_USE_EPIT
+	bool "Use EPIT instead of GPT"
+	depends on HAVE_EPIT
+	help
+	  Use EPIT as the system timer on systems that have it. Normally you
+	  don't have a reason to do so as the EPIT has the same features and
+	  uses the same clocks as the GPT. Anyway, on some systems the GPT
+	  may be in use for other purposes.
+
+config MXC_ULPI
+	bool
+
+config ARCH_HAS_RNGA
+	bool
+
+config IRAM_ALLOC
+	bool
+	select GENERIC_ALLOCATOR
+
 config HAVE_IMX_GPC
 config HAVE_IMX_GPC
 	bool
 	bool
 
 
@@ -7,6 +74,12 @@ config HAVE_IMX_MMDC
 config HAVE_IMX_SRC
 config HAVE_IMX_SRC
 	bool
 	bool
 
 
+config IMX_HAVE_IOMUX_V1
+	bool
+
+config ARCH_MXC_IOMUX_V3
+	bool
+
 config ARCH_MX1
 config ARCH_MX1
 	bool
 	bool
 
 
@@ -104,7 +177,7 @@ config	SOC_IMX51
 	select PINCTRL_IMX51
 	select PINCTRL_IMX51
 	select SOC_IMX5
 	select SOC_IMX5
 
 
-if ARCH_IMX_V4_V5
+if ARCH_MULTI_V4T
 
 
 comment "MX1 platforms:"
 comment "MX1 platforms:"
 config MACH_MXLADS
 config MACH_MXLADS
@@ -133,6 +206,10 @@ config MACH_APF9328
 	help
 	help
 	  Say Yes here if you are using the Armadeus APF9328 development board
 	  Say Yes here if you are using the Armadeus APF9328 development board
 
 
+endif
+
+if ARCH_MULTI_V5
+
 comment "MX21 platforms:"
 comment "MX21 platforms:"
 
 
 config MACH_MX21ADS
 config MACH_MX21ADS
@@ -384,7 +461,7 @@ config MACH_IMX27_DT
 
 
 endif
 endif
 
 
-if ARCH_IMX_V6_V7
+if ARCH_MULTI_V6
 
 
 comment "MX31 platforms:"
 comment "MX31 platforms:"
 
 
@@ -649,6 +726,10 @@ config MACH_VPR200
 	  Include support for VPR200 platform. This includes specific
 	  Include support for VPR200 platform. This includes specific
 	  configurations for the board and its peripherals.
 	  configurations for the board and its peripherals.
 
 
+endif
+
+if ARCH_MULTI_V7
+
 comment "i.MX5 platforms:"
 comment "i.MX5 platforms:"
 
 
 config MACH_MX50_RDP
 config MACH_MX50_RDP
@@ -766,3 +847,7 @@ config SOC_IMX6Q
 	  This enables support for Freescale i.MX6 Quad processor.
 	  This enables support for Freescale i.MX6 Quad processor.
 
 
 endif
 endif
+
+source "arch/arm/mach-imx/devices/Kconfig"
+
+endmenu

+ 22 - 0
arch/arm/mach-imx/Makefile

@@ -1,3 +1,5 @@
+obj-y := time.o cpu.o system.o irq-common.o
+
 obj-$(CONFIG_SOC_IMX1) += clk-imx1.o mm-imx1.o
 obj-$(CONFIG_SOC_IMX1) += clk-imx1.o mm-imx1.o
 obj-$(CONFIG_SOC_IMX21) += clk-imx21.o mm-imx21.o
 obj-$(CONFIG_SOC_IMX21) += clk-imx21.o mm-imx21.o
 
 
@@ -15,6 +17,24 @@ obj-$(CONFIG_SOC_IMX5) += cpu-imx5.o mm-imx5.o clk-imx51-imx53.o ehci-imx5.o $(i
 obj-$(CONFIG_COMMON_CLK) += clk-pllv1.o clk-pllv2.o clk-pllv3.o clk-gate2.o \
 obj-$(CONFIG_COMMON_CLK) += clk-pllv1.o clk-pllv2.o clk-pllv3.o clk-gate2.o \
 			    clk-pfd.o clk-busy.o clk.o
 			    clk-pfd.o clk-busy.o clk.o
 
 
+obj-$(CONFIG_IMX_HAVE_IOMUX_V1) += iomux-v1.o
+obj-$(CONFIG_ARCH_MXC_IOMUX_V3) += iomux-v3.o
+
+obj-$(CONFIG_MXC_TZIC) += tzic.o
+obj-$(CONFIG_MXC_AVIC) += avic.o
+
+obj-$(CONFIG_IRAM_ALLOC) += iram_alloc.o
+obj-$(CONFIG_MXC_ULPI) += ulpi.o
+obj-$(CONFIG_MXC_USE_EPIT) += epit.o
+obj-$(CONFIG_MXC_DEBUG_BOARD) += 3ds_debugboard.o
+obj-$(CONFIG_CPU_FREQ_IMX)    += cpufreq.o
+obj-$(CONFIG_CPU_IDLE) += cpuidle.o
+
+ifdef CONFIG_SND_IMX_SOC
+obj-y += ssi-fiq.o
+obj-y += ssi-fiq-ksym.o
+endif
+
 # Support for CMOS sensor interface
 # Support for CMOS sensor interface
 obj-$(CONFIG_MX1_VIDEO) += mx1-camera-fiq.o mx1-camera-fiq-ksym.o
 obj-$(CONFIG_MX1_VIDEO) += mx1-camera-fiq.o mx1-camera-fiq-ksym.o
 
 
@@ -89,3 +109,5 @@ obj-$(CONFIG_MACH_MX50_RDP) += mach-mx50_rdp.o
 
 
 obj-$(CONFIG_MACH_IMX51_DT) += imx51-dt.o
 obj-$(CONFIG_MACH_IMX51_DT) += imx51-dt.o
 obj-$(CONFIG_SOC_IMX53) += mach-imx53.o
 obj-$(CONFIG_SOC_IMX53) += mach-imx53.o
+
+obj-y += devices/

+ 2 - 3
arch/arm/plat-mxc/avic.c → arch/arm/mach-imx/avic.c

@@ -22,12 +22,11 @@
 #include <linux/irqdomain.h>
 #include <linux/irqdomain.h>
 #include <linux/io.h>
 #include <linux/io.h>
 #include <linux/of.h>
 #include <linux/of.h>
-#include <mach/common.h>
 #include <asm/mach/irq.h>
 #include <asm/mach/irq.h>
 #include <asm/exception.h>
 #include <asm/exception.h>
-#include <mach/hardware.h>
-#include <mach/irqs.h>
 
 
+#include "common.h"
+#include "hardware.h"
 #include "irq-common.h"
 #include "irq-common.h"
 
 
 #define AVIC_INTCNTL		0x00	/* int control reg */
 #define AVIC_INTCNTL		0x00	/* int control reg */

+ 0 - 0
arch/arm/plat-mxc/include/mach/board-mx31lilly.h → arch/arm/mach-imx/board-mx31lilly.h


+ 0 - 0
arch/arm/plat-mxc/include/mach/board-mx31lite.h → arch/arm/mach-imx/board-mx31lite.h


+ 0 - 0
arch/arm/plat-mxc/include/mach/board-mx31moboard.h → arch/arm/mach-imx/board-mx31moboard.h


+ 0 - 0
arch/arm/plat-mxc/include/mach/board-pcm038.h → arch/arm/mach-imx/board-pcm038.h


+ 9 - 8
arch/arm/mach-imx/clk-imx1.c

@@ -22,9 +22,9 @@
 #include <linux/clkdev.h>
 #include <linux/clkdev.h>
 #include <linux/err.h>
 #include <linux/err.h>
 
 
-#include <mach/hardware.h>
-#include <mach/common.h>
 #include "clk.h"
 #include "clk.h"
+#include "common.h"
+#include "hardware.h"
 
 
 /* CCM register addresses */
 /* CCM register addresses */
 #define IO_ADDR_CCM(off)	(MX1_IO_ADDRESS(MX1_CCM_BASE_ADDR + (off)))
 #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)
 			pr_err("imx1 clk %d: register failed with %ld\n",
 			pr_err("imx1 clk %d: register failed with %ld\n",
 				i, PTR_ERR(clk[i]));
 				i, PTR_ERR(clk[i]));
 
 
-	clk_register_clkdev(clk[dma_gate], "ahb", "imx-dma");
+	clk_register_clkdev(clk[dma_gate], "ahb", "imx1-dma");
+	clk_register_clkdev(clk[hclk], "ipg", "imx1-dma");
 	clk_register_clkdev(clk[csi_gate], NULL, "mx1-camera.0");
 	clk_register_clkdev(clk[csi_gate], NULL, "mx1-camera.0");
 	clk_register_clkdev(clk[mma_gate], "mma", NULL);
 	clk_register_clkdev(clk[mma_gate], "mma", NULL);
 	clk_register_clkdev(clk[usbd_gate], NULL, "imx_udc.0");
 	clk_register_clkdev(clk[usbd_gate], NULL, "imx_udc.0");
@@ -94,18 +95,18 @@ int __init mx1_clocks_init(unsigned long fref)
 	clk_register_clkdev(clk[hclk], "ipg", "imx1-uart.1");
 	clk_register_clkdev(clk[hclk], "ipg", "imx1-uart.1");
 	clk_register_clkdev(clk[per1], "per", "imx1-uart.2");
 	clk_register_clkdev(clk[per1], "per", "imx1-uart.2");
 	clk_register_clkdev(clk[hclk], "ipg", "imx1-uart.2");
 	clk_register_clkdev(clk[hclk], "ipg", "imx1-uart.2");
-	clk_register_clkdev(clk[hclk], NULL, "imx-i2c.0");
+	clk_register_clkdev(clk[hclk], NULL, "imx1-i2c.0");
 	clk_register_clkdev(clk[per2], "per", "imx1-cspi.0");
 	clk_register_clkdev(clk[per2], "per", "imx1-cspi.0");
 	clk_register_clkdev(clk[dummy], "ipg", "imx1-cspi.0");
 	clk_register_clkdev(clk[dummy], "ipg", "imx1-cspi.0");
 	clk_register_clkdev(clk[per2], "per", "imx1-cspi.1");
 	clk_register_clkdev(clk[per2], "per", "imx1-cspi.1");
 	clk_register_clkdev(clk[dummy], "ipg", "imx1-cspi.1");
 	clk_register_clkdev(clk[dummy], "ipg", "imx1-cspi.1");
 	clk_register_clkdev(clk[per2], NULL, "imx-mmc.0");
 	clk_register_clkdev(clk[per2], NULL, "imx-mmc.0");
-	clk_register_clkdev(clk[per2], "per", "imx-fb.0");
-	clk_register_clkdev(clk[dummy], "ipg", "imx-fb.0");
-	clk_register_clkdev(clk[dummy], "ahb", "imx-fb.0");
+	clk_register_clkdev(clk[per2], "per", "imx1-fb.0");
+	clk_register_clkdev(clk[dummy], "ipg", "imx1-fb.0");
+	clk_register_clkdev(clk[dummy], "ahb", "imx1-fb.0");
 	clk_register_clkdev(clk[hclk], "mshc", NULL);
 	clk_register_clkdev(clk[hclk], "mshc", NULL);
 	clk_register_clkdev(clk[per3], "ssi", NULL);
 	clk_register_clkdev(clk[per3], "ssi", NULL);
-	clk_register_clkdev(clk[clk32], NULL, "mxc_rtc.0");
+	clk_register_clkdev(clk[clk32], NULL, "imx1-rtc.0");
 	clk_register_clkdev(clk[clko], "clko", NULL);
 	clk_register_clkdev(clk[clko], "clko", NULL);
 
 
 	mxc_timer_init(MX1_IO_ADDRESS(MX1_TIM1_BASE_ADDR), MX1_TIM1_INT);
 	mxc_timer_init(MX1_IO_ADDRESS(MX1_TIM1_BASE_ADDR), MX1_TIM1_INT);

+ 9 - 9
arch/arm/mach-imx/clk-imx21.c

@@ -25,9 +25,9 @@
 #include <linux/module.h>
 #include <linux/module.h>
 #include <linux/err.h>
 #include <linux/err.h>
 
 
-#include <mach/hardware.h>
-#include <mach/common.h>
 #include "clk.h"
 #include "clk.h"
+#include "common.h"
+#include "hardware.h"
 
 
 #define IO_ADDR_CCM(off)	(MX21_IO_ADDRESS(MX21_CCM_BASE_ADDR + (off)))
 #define IO_ADDR_CCM(off)	(MX21_IO_ADDRESS(MX21_CCM_BASE_ADDR + (off)))
 
 
@@ -156,16 +156,16 @@ int __init mx21_clocks_init(unsigned long lref, unsigned long href)
 	clk_register_clkdev(clk[cspi2_ipg_gate], "ipg", "imx21-cspi.1");
 	clk_register_clkdev(clk[cspi2_ipg_gate], "ipg", "imx21-cspi.1");
 	clk_register_clkdev(clk[per2], "per", "imx21-cspi.2");
 	clk_register_clkdev(clk[per2], "per", "imx21-cspi.2");
 	clk_register_clkdev(clk[cspi3_ipg_gate], "ipg", "imx21-cspi.2");
 	clk_register_clkdev(clk[cspi3_ipg_gate], "ipg", "imx21-cspi.2");
-	clk_register_clkdev(clk[per3], "per", "imx-fb.0");
-	clk_register_clkdev(clk[lcdc_ipg_gate], "ipg", "imx-fb.0");
-	clk_register_clkdev(clk[lcdc_hclk_gate], "ahb", "imx-fb.0");
+	clk_register_clkdev(clk[per3], "per", "imx21-fb.0");
+	clk_register_clkdev(clk[lcdc_ipg_gate], "ipg", "imx21-fb.0");
+	clk_register_clkdev(clk[lcdc_hclk_gate], "ahb", "imx21-fb.0");
 	clk_register_clkdev(clk[usb_gate], "per", "imx21-hcd.0");
 	clk_register_clkdev(clk[usb_gate], "per", "imx21-hcd.0");
 	clk_register_clkdev(clk[usb_hclk_gate], "ahb", "imx21-hcd.0");
 	clk_register_clkdev(clk[usb_hclk_gate], "ahb", "imx21-hcd.0");
-	clk_register_clkdev(clk[nfc_gate], NULL, "mxc_nand.0");
-	clk_register_clkdev(clk[dma_hclk_gate], "ahb", "imx-dma");
-	clk_register_clkdev(clk[dma_gate], "ipg", "imx-dma");
+	clk_register_clkdev(clk[nfc_gate], NULL, "imx21-nand.0");
+	clk_register_clkdev(clk[dma_hclk_gate], "ahb", "imx21-dma");
+	clk_register_clkdev(clk[dma_gate], "ipg", "imx21-dma");
 	clk_register_clkdev(clk[wdog_gate], NULL, "imx2-wdt.0");
 	clk_register_clkdev(clk[wdog_gate], NULL, "imx2-wdt.0");
-	clk_register_clkdev(clk[i2c_gate], NULL, "imx-i2c.0");
+	clk_register_clkdev(clk[i2c_gate], NULL, "imx21-i2c.0");
 	clk_register_clkdev(clk[kpp_gate], NULL, "mxc-keypad");
 	clk_register_clkdev(clk[kpp_gate], NULL, "mxc-keypad");
 	clk_register_clkdev(clk[owire_gate], NULL, "mxc_w1.0");
 	clk_register_clkdev(clk[owire_gate], NULL, "mxc_w1.0");
 	clk_register_clkdev(clk[brom_gate], "brom", NULL);
 	clk_register_clkdev(clk[brom_gate], "brom", NULL);

+ 13 - 13
arch/arm/mach-imx/clk-imx25.c

@@ -24,10 +24,10 @@
 #include <linux/clkdev.h>
 #include <linux/clkdev.h>
 #include <linux/err.h>
 #include <linux/err.h>
 
 
-#include <mach/hardware.h>
-#include <mach/common.h>
-#include <mach/mx25.h>
 #include "clk.h"
 #include "clk.h"
+#include "common.h"
+#include "hardware.h"
+#include "mx25.h"
 
 
 #define CRM_BASE	MX25_IO_ADDRESS(MX25_CRM_BASE_ADDR)
 #define CRM_BASE	MX25_IO_ADDRESS(MX25_CRM_BASE_ADDR)
 
 
@@ -197,7 +197,7 @@ int __init mx25_clocks_init(void)
 	clk_register_clkdev(clk[ipg], "ipg", "fsl-usb2-udc");
 	clk_register_clkdev(clk[ipg], "ipg", "fsl-usb2-udc");
 	clk_register_clkdev(clk[usbotg_ahb], "ahb", "fsl-usb2-udc");
 	clk_register_clkdev(clk[usbotg_ahb], "ahb", "fsl-usb2-udc");
 	clk_register_clkdev(clk[usb_div], "per", "fsl-usb2-udc");
 	clk_register_clkdev(clk[usb_div], "per", "fsl-usb2-udc");
-	clk_register_clkdev(clk[nfc_ipg_per], NULL, "mxc_nand.0");
+	clk_register_clkdev(clk[nfc_ipg_per], NULL, "imx25-nand.0");
 	/* i.mx25 has the i.mx35 type cspi */
 	/* i.mx25 has the i.mx35 type cspi */
 	clk_register_clkdev(clk[cspi1_ipg], NULL, "imx35-cspi.0");
 	clk_register_clkdev(clk[cspi1_ipg], NULL, "imx35-cspi.0");
 	clk_register_clkdev(clk[cspi2_ipg], NULL, "imx35-cspi.1");
 	clk_register_clkdev(clk[cspi2_ipg], NULL, "imx35-cspi.1");
@@ -212,15 +212,15 @@ int __init mx25_clocks_init(void)
 	clk_register_clkdev(clk[per10], "per", "mxc_pwm.3");
 	clk_register_clkdev(clk[per10], "per", "mxc_pwm.3");
 	clk_register_clkdev(clk[kpp_ipg], NULL, "imx-keypad");
 	clk_register_clkdev(clk[kpp_ipg], NULL, "imx-keypad");
 	clk_register_clkdev(clk[tsc_ipg], NULL, "mx25-adc");
 	clk_register_clkdev(clk[tsc_ipg], NULL, "mx25-adc");
-	clk_register_clkdev(clk[i2c_ipg_per], NULL, "imx-i2c.0");
-	clk_register_clkdev(clk[i2c_ipg_per], NULL, "imx-i2c.1");
-	clk_register_clkdev(clk[i2c_ipg_per], NULL, "imx-i2c.2");
+	clk_register_clkdev(clk[i2c_ipg_per], NULL, "imx21-i2c.0");
+	clk_register_clkdev(clk[i2c_ipg_per], NULL, "imx21-i2c.1");
+	clk_register_clkdev(clk[i2c_ipg_per], NULL, "imx21-i2c.2");
 	clk_register_clkdev(clk[fec_ipg], "ipg", "imx25-fec.0");
 	clk_register_clkdev(clk[fec_ipg], "ipg", "imx25-fec.0");
 	clk_register_clkdev(clk[fec_ahb], "ahb", "imx25-fec.0");
 	clk_register_clkdev(clk[fec_ahb], "ahb", "imx25-fec.0");
 	clk_register_clkdev(clk[dryice_ipg], NULL, "imxdi_rtc.0");
 	clk_register_clkdev(clk[dryice_ipg], NULL, "imxdi_rtc.0");
-	clk_register_clkdev(clk[lcdc_ipg_per], "per", "imx-fb.0");
-	clk_register_clkdev(clk[lcdc_ipg], "ipg", "imx-fb.0");
-	clk_register_clkdev(clk[lcdc_ahb], "ahb", "imx-fb.0");
+	clk_register_clkdev(clk[lcdc_ipg_per], "per", "imx21-fb.0");
+	clk_register_clkdev(clk[lcdc_ipg], "ipg", "imx21-fb.0");
+	clk_register_clkdev(clk[lcdc_ahb], "ahb", "imx21-fb.0");
 	clk_register_clkdev(clk[wdt_ipg], NULL, "imx2-wdt.0");
 	clk_register_clkdev(clk[wdt_ipg], NULL, "imx2-wdt.0");
 	clk_register_clkdev(clk[ssi1_ipg], NULL, "imx-ssi.0");
 	clk_register_clkdev(clk[ssi1_ipg], NULL, "imx-ssi.0");
 	clk_register_clkdev(clk[ssi2_ipg], NULL, "imx-ssi.1");
 	clk_register_clkdev(clk[ssi2_ipg], NULL, "imx-ssi.1");
@@ -230,9 +230,9 @@ int __init mx25_clocks_init(void)
 	clk_register_clkdev(clk[esdhc2_ipg_per], "per", "sdhci-esdhc-imx25.1");
 	clk_register_clkdev(clk[esdhc2_ipg_per], "per", "sdhci-esdhc-imx25.1");
 	clk_register_clkdev(clk[esdhc2_ipg], "ipg", "sdhci-esdhc-imx25.1");
 	clk_register_clkdev(clk[esdhc2_ipg], "ipg", "sdhci-esdhc-imx25.1");
 	clk_register_clkdev(clk[esdhc2_ahb], "ahb", "sdhci-esdhc-imx25.1");
 	clk_register_clkdev(clk[esdhc2_ahb], "ahb", "sdhci-esdhc-imx25.1");
-	clk_register_clkdev(clk[csi_ipg_per], "per", "mx2-camera.0");
-	clk_register_clkdev(clk[csi_ipg], "ipg", "mx2-camera.0");
-	clk_register_clkdev(clk[csi_ahb], "ahb", "mx2-camera.0");
+	clk_register_clkdev(clk[csi_ipg_per], "per", "imx25-camera.0");
+	clk_register_clkdev(clk[csi_ipg], "ipg", "imx25-camera.0");
+	clk_register_clkdev(clk[csi_ahb], "ahb", "imx25-camera.0");
 	clk_register_clkdev(clk[dummy], "audmux", NULL);
 	clk_register_clkdev(clk[dummy], "audmux", NULL);
 	clk_register_clkdev(clk[can1_ipg], NULL, "flexcan.0");
 	clk_register_clkdev(clk[can1_ipg], NULL, "flexcan.0");
 	clk_register_clkdev(clk[can2_ipg], NULL, "flexcan.1");
 	clk_register_clkdev(clk[can2_ipg], NULL, "flexcan.1");

+ 20 - 20
arch/arm/mach-imx/clk-imx27.c

@@ -6,9 +6,9 @@
 #include <linux/clk-provider.h>
 #include <linux/clk-provider.h>
 #include <linux/of.h>
 #include <linux/of.h>
 
 
-#include <mach/common.h>
-#include <mach/hardware.h>
 #include "clk.h"
 #include "clk.h"
+#include "common.h"
+#include "hardware.h"
 
 
 #define IO_ADDR_CCM(off)	(MX27_IO_ADDRESS(MX27_CCM_BASE_ADDR + (off)))
 #define IO_ADDR_CCM(off)	(MX27_IO_ADDRESS(MX27_CCM_BASE_ADDR + (off)))
 
 
@@ -211,19 +211,19 @@ int __init mx27_clocks_init(unsigned long fref)
 	clk_register_clkdev(clk[gpt6_ipg_gate], "ipg", "imx-gpt.5");
 	clk_register_clkdev(clk[gpt6_ipg_gate], "ipg", "imx-gpt.5");
 	clk_register_clkdev(clk[per1_gate], "per", "imx-gpt.5");
 	clk_register_clkdev(clk[per1_gate], "per", "imx-gpt.5");
 	clk_register_clkdev(clk[pwm_ipg_gate], NULL, "mxc_pwm.0");
 	clk_register_clkdev(clk[pwm_ipg_gate], NULL, "mxc_pwm.0");
-	clk_register_clkdev(clk[per2_gate], "per", "mxc-mmc.0");
-	clk_register_clkdev(clk[sdhc1_ipg_gate], "ipg", "mxc-mmc.0");
-	clk_register_clkdev(clk[per2_gate], "per", "mxc-mmc.1");
-	clk_register_clkdev(clk[sdhc2_ipg_gate], "ipg", "mxc-mmc.1");
-	clk_register_clkdev(clk[per2_gate], "per", "mxc-mmc.2");
-	clk_register_clkdev(clk[sdhc2_ipg_gate], "ipg", "mxc-mmc.2");
+	clk_register_clkdev(clk[per2_gate], "per", "imx21-mmc.0");
+	clk_register_clkdev(clk[sdhc1_ipg_gate], "ipg", "imx21-mmc.0");
+	clk_register_clkdev(clk[per2_gate], "per", "imx21-mmc.1");
+	clk_register_clkdev(clk[sdhc2_ipg_gate], "ipg", "imx21-mmc.1");
+	clk_register_clkdev(clk[per2_gate], "per", "imx21-mmc.2");
+	clk_register_clkdev(clk[sdhc2_ipg_gate], "ipg", "imx21-mmc.2");
 	clk_register_clkdev(clk[cspi1_ipg_gate], NULL, "imx27-cspi.0");
 	clk_register_clkdev(clk[cspi1_ipg_gate], NULL, "imx27-cspi.0");
 	clk_register_clkdev(clk[cspi2_ipg_gate], NULL, "imx27-cspi.1");
 	clk_register_clkdev(clk[cspi2_ipg_gate], NULL, "imx27-cspi.1");
 	clk_register_clkdev(clk[cspi3_ipg_gate], NULL, "imx27-cspi.2");
 	clk_register_clkdev(clk[cspi3_ipg_gate], NULL, "imx27-cspi.2");
-	clk_register_clkdev(clk[per3_gate], "per", "imx-fb.0");
-	clk_register_clkdev(clk[lcdc_ipg_gate], "ipg", "imx-fb.0");
-	clk_register_clkdev(clk[lcdc_ahb_gate], "ahb", "imx-fb.0");
-	clk_register_clkdev(clk[csi_ahb_gate], "ahb", "mx2-camera.0");
+	clk_register_clkdev(clk[per3_gate], "per", "imx21-fb.0");
+	clk_register_clkdev(clk[lcdc_ipg_gate], "ipg", "imx21-fb.0");
+	clk_register_clkdev(clk[lcdc_ahb_gate], "ahb", "imx21-fb.0");
+	clk_register_clkdev(clk[csi_ahb_gate], "ahb", "imx27-camera.0");
 	clk_register_clkdev(clk[usb_div], "per", "fsl-usb2-udc");
 	clk_register_clkdev(clk[usb_div], "per", "fsl-usb2-udc");
 	clk_register_clkdev(clk[usb_ipg_gate], "ipg", "fsl-usb2-udc");
 	clk_register_clkdev(clk[usb_ipg_gate], "ipg", "fsl-usb2-udc");
 	clk_register_clkdev(clk[usb_ahb_gate], "ahb", "fsl-usb2-udc");
 	clk_register_clkdev(clk[usb_ahb_gate], "ahb", "fsl-usb2-udc");
@@ -238,27 +238,27 @@ int __init mx27_clocks_init(unsigned long fref)
 	clk_register_clkdev(clk[usb_ahb_gate], "ahb", "mxc-ehci.2");
 	clk_register_clkdev(clk[usb_ahb_gate], "ahb", "mxc-ehci.2");
 	clk_register_clkdev(clk[ssi1_ipg_gate], NULL, "imx-ssi.0");
 	clk_register_clkdev(clk[ssi1_ipg_gate], NULL, "imx-ssi.0");
 	clk_register_clkdev(clk[ssi2_ipg_gate], NULL, "imx-ssi.1");
 	clk_register_clkdev(clk[ssi2_ipg_gate], NULL, "imx-ssi.1");
-	clk_register_clkdev(clk[nfc_baud_gate], NULL, "mxc_nand.0");
+	clk_register_clkdev(clk[nfc_baud_gate], NULL, "imx27-nand.0");
 	clk_register_clkdev(clk[vpu_baud_gate], "per", "coda-imx27.0");
 	clk_register_clkdev(clk[vpu_baud_gate], "per", "coda-imx27.0");
 	clk_register_clkdev(clk[vpu_ahb_gate], "ahb", "coda-imx27.0");
 	clk_register_clkdev(clk[vpu_ahb_gate], "ahb", "coda-imx27.0");
-	clk_register_clkdev(clk[dma_ahb_gate], "ahb", "imx-dma");
-	clk_register_clkdev(clk[dma_ipg_gate], "ipg", "imx-dma");
+	clk_register_clkdev(clk[dma_ahb_gate], "ahb", "imx27-dma");
+	clk_register_clkdev(clk[dma_ipg_gate], "ipg", "imx27-dma");
 	clk_register_clkdev(clk[fec_ipg_gate], "ipg", "imx27-fec.0");
 	clk_register_clkdev(clk[fec_ipg_gate], "ipg", "imx27-fec.0");
 	clk_register_clkdev(clk[fec_ahb_gate], "ahb", "imx27-fec.0");
 	clk_register_clkdev(clk[fec_ahb_gate], "ahb", "imx27-fec.0");
 	clk_register_clkdev(clk[wdog_ipg_gate], NULL, "imx2-wdt.0");
 	clk_register_clkdev(clk[wdog_ipg_gate], NULL, "imx2-wdt.0");
-	clk_register_clkdev(clk[i2c1_ipg_gate], NULL, "imx-i2c.0");
-	clk_register_clkdev(clk[i2c2_ipg_gate], NULL, "imx-i2c.1");
+	clk_register_clkdev(clk[i2c1_ipg_gate], NULL, "imx21-i2c.0");
+	clk_register_clkdev(clk[i2c2_ipg_gate], NULL, "imx21-i2c.1");
 	clk_register_clkdev(clk[owire_ipg_gate], NULL, "mxc_w1.0");
 	clk_register_clkdev(clk[owire_ipg_gate], NULL, "mxc_w1.0");
 	clk_register_clkdev(clk[kpp_ipg_gate], NULL, "imx-keypad");
 	clk_register_clkdev(clk[kpp_ipg_gate], NULL, "imx-keypad");
-	clk_register_clkdev(clk[emma_ahb_gate], "emma-ahb", "mx2-camera.0");
-	clk_register_clkdev(clk[emma_ipg_gate], "emma-ipg", "mx2-camera.0");
+	clk_register_clkdev(clk[emma_ahb_gate], "emma-ahb", "imx27-camera.0");
+	clk_register_clkdev(clk[emma_ipg_gate], "emma-ipg", "imx27-camera.0");
 	clk_register_clkdev(clk[emma_ahb_gate], "ahb", "m2m-emmaprp.0");
 	clk_register_clkdev(clk[emma_ahb_gate], "ahb", "m2m-emmaprp.0");
 	clk_register_clkdev(clk[emma_ipg_gate], "ipg", "m2m-emmaprp.0");
 	clk_register_clkdev(clk[emma_ipg_gate], "ipg", "m2m-emmaprp.0");
 	clk_register_clkdev(clk[iim_ipg_gate], "iim", NULL);
 	clk_register_clkdev(clk[iim_ipg_gate], "iim", NULL);
 	clk_register_clkdev(clk[gpio_ipg_gate], "gpio", NULL);
 	clk_register_clkdev(clk[gpio_ipg_gate], "gpio", NULL);
 	clk_register_clkdev(clk[brom_ahb_gate], "brom", NULL);
 	clk_register_clkdev(clk[brom_ahb_gate], "brom", NULL);
 	clk_register_clkdev(clk[ata_ahb_gate], "ata", NULL);
 	clk_register_clkdev(clk[ata_ahb_gate], "ata", NULL);
-	clk_register_clkdev(clk[rtc_ipg_gate], NULL, "mxc_rtc");
+	clk_register_clkdev(clk[rtc_ipg_gate], NULL, "imx21-rtc");
 	clk_register_clkdev(clk[scc_ipg_gate], "scc", NULL);
 	clk_register_clkdev(clk[scc_ipg_gate], "scc", NULL);
 	clk_register_clkdev(clk[cpu_div], "cpu", NULL);
 	clk_register_clkdev(clk[cpu_div], "cpu", NULL);
 	clk_register_clkdev(clk[emi_ahb_gate], "emi_ahb" , NULL);
 	clk_register_clkdev(clk[emi_ahb_gate], "emi_ahb" , NULL);

+ 10 - 11
arch/arm/mach-imx/clk-imx31.c

@@ -22,12 +22,11 @@
 #include <linux/err.h>
 #include <linux/err.h>
 #include <linux/of.h>
 #include <linux/of.h>
 
 
-#include <mach/hardware.h>
-#include <mach/mx31.h>
-#include <mach/common.h>
-
 #include "clk.h"
 #include "clk.h"
+#include "common.h"
 #include "crmregs-imx3.h"
 #include "crmregs-imx3.h"
+#include "hardware.h"
+#include "mx31.h"
 
 
 static const char *mcu_main_sel[] = { "spll", "mpll", };
 static const char *mcu_main_sel[] = { "spll", "mpll", };
 static const char *per_sel[] = { "per_div", "ipg", };
 static const char *per_sel[] = { "per_div", "ipg", };
@@ -124,10 +123,10 @@ int __init mx31_clocks_init(unsigned long fref)
 	clk_register_clkdev(clk[cspi3_gate], NULL, "imx31-cspi.2");
 	clk_register_clkdev(clk[cspi3_gate], NULL, "imx31-cspi.2");
 	clk_register_clkdev(clk[pwm_gate], "pwm", NULL);
 	clk_register_clkdev(clk[pwm_gate], "pwm", NULL);
 	clk_register_clkdev(clk[wdog_gate], NULL, "imx2-wdt.0");
 	clk_register_clkdev(clk[wdog_gate], NULL, "imx2-wdt.0");
-	clk_register_clkdev(clk[rtc_gate], NULL, "mxc_rtc");
+	clk_register_clkdev(clk[rtc_gate], NULL, "imx21-rtc");
 	clk_register_clkdev(clk[epit1_gate], "epit", NULL);
 	clk_register_clkdev(clk[epit1_gate], "epit", NULL);
 	clk_register_clkdev(clk[epit2_gate], "epit", NULL);
 	clk_register_clkdev(clk[epit2_gate], "epit", NULL);
-	clk_register_clkdev(clk[nfc], NULL, "mxc_nand.0");
+	clk_register_clkdev(clk[nfc], NULL, "imx27-nand.0");
 	clk_register_clkdev(clk[ipu_gate], NULL, "ipu-core");
 	clk_register_clkdev(clk[ipu_gate], NULL, "ipu-core");
 	clk_register_clkdev(clk[ipu_gate], NULL, "mx3_sdc_fb");
 	clk_register_clkdev(clk[ipu_gate], NULL, "mx3_sdc_fb");
 	clk_register_clkdev(clk[kpp_gate], NULL, "imx-keypad");
 	clk_register_clkdev(clk[kpp_gate], NULL, "imx-keypad");
@@ -155,12 +154,12 @@ int __init mx31_clocks_init(unsigned long fref)
 	clk_register_clkdev(clk[ipg], "ipg", "imx21-uart.3");
 	clk_register_clkdev(clk[ipg], "ipg", "imx21-uart.3");
 	clk_register_clkdev(clk[uart5_gate], "per", "imx21-uart.4");
 	clk_register_clkdev(clk[uart5_gate], "per", "imx21-uart.4");
 	clk_register_clkdev(clk[ipg], "ipg", "imx21-uart.4");
 	clk_register_clkdev(clk[ipg], "ipg", "imx21-uart.4");
-	clk_register_clkdev(clk[i2c1_gate], NULL, "imx-i2c.0");
-	clk_register_clkdev(clk[i2c2_gate], NULL, "imx-i2c.1");
-	clk_register_clkdev(clk[i2c3_gate], NULL, "imx-i2c.2");
+	clk_register_clkdev(clk[i2c1_gate], NULL, "imx21-i2c.0");
+	clk_register_clkdev(clk[i2c2_gate], NULL, "imx21-i2c.1");
+	clk_register_clkdev(clk[i2c3_gate], NULL, "imx21-i2c.2");
 	clk_register_clkdev(clk[owire_gate], NULL, "mxc_w1.0");
 	clk_register_clkdev(clk[owire_gate], NULL, "mxc_w1.0");
-	clk_register_clkdev(clk[sdhc1_gate], NULL, "mxc-mmc.0");
-	clk_register_clkdev(clk[sdhc2_gate], NULL, "mxc-mmc.1");
+	clk_register_clkdev(clk[sdhc1_gate], NULL, "imx31-mmc.0");
+	clk_register_clkdev(clk[sdhc2_gate], NULL, "imx31-mmc.1");
 	clk_register_clkdev(clk[ssi1_gate], NULL, "imx-ssi.0");
 	clk_register_clkdev(clk[ssi1_gate], NULL, "imx-ssi.0");
 	clk_register_clkdev(clk[ssi2_gate], NULL, "imx-ssi.1");
 	clk_register_clkdev(clk[ssi2_gate], NULL, "imx-ssi.1");
 	clk_register_clkdev(clk[firi_gate], "firi", NULL);
 	clk_register_clkdev(clk[firi_gate], "firi", NULL);

+ 6 - 7
arch/arm/mach-imx/clk-imx35.c

@@ -14,11 +14,10 @@
 #include <linux/of.h>
 #include <linux/of.h>
 #include <linux/err.h>
 #include <linux/err.h>
 
 
-#include <mach/hardware.h>
-#include <mach/common.h>
-
 #include "crmregs-imx3.h"
 #include "crmregs-imx3.h"
 #include "clk.h"
 #include "clk.h"
+#include "common.h"
+#include "hardware.h"
 
 
 struct arm_ahb_div {
 struct arm_ahb_div {
 	unsigned char arm, ahb, sel;
 	unsigned char arm, ahb, sel;
@@ -226,9 +225,9 @@ int __init mx35_clocks_init()
 	clk_register_clkdev(clk[fec_gate], NULL, "imx27-fec.0");
 	clk_register_clkdev(clk[fec_gate], NULL, "imx27-fec.0");
 	clk_register_clkdev(clk[gpt_gate], "per", "imx-gpt.0");
 	clk_register_clkdev(clk[gpt_gate], "per", "imx-gpt.0");
 	clk_register_clkdev(clk[ipg], "ipg", "imx-gpt.0");
 	clk_register_clkdev(clk[ipg], "ipg", "imx-gpt.0");
-	clk_register_clkdev(clk[i2c1_gate], NULL, "imx-i2c.0");
-	clk_register_clkdev(clk[i2c2_gate], NULL, "imx-i2c.1");
-	clk_register_clkdev(clk[i2c3_gate], NULL, "imx-i2c.2");
+	clk_register_clkdev(clk[i2c1_gate], NULL, "imx21-i2c.0");
+	clk_register_clkdev(clk[i2c2_gate], NULL, "imx21-i2c.1");
+	clk_register_clkdev(clk[i2c3_gate], NULL, "imx21-i2c.2");
 	clk_register_clkdev(clk[ipu_gate], NULL, "ipu-core");
 	clk_register_clkdev(clk[ipu_gate], NULL, "ipu-core");
 	clk_register_clkdev(clk[ipu_gate], NULL, "mx3_sdc_fb");
 	clk_register_clkdev(clk[ipu_gate], NULL, "mx3_sdc_fb");
 	clk_register_clkdev(clk[kpp_gate], NULL, "imx-keypad");
 	clk_register_clkdev(clk[kpp_gate], NULL, "imx-keypad");
@@ -256,7 +255,7 @@ int __init mx35_clocks_init()
 	clk_register_clkdev(clk[ipg], "ipg", "fsl-usb2-udc");
 	clk_register_clkdev(clk[ipg], "ipg", "fsl-usb2-udc");
 	clk_register_clkdev(clk[usbotg_gate], "ahb", "fsl-usb2-udc");
 	clk_register_clkdev(clk[usbotg_gate], "ahb", "fsl-usb2-udc");
 	clk_register_clkdev(clk[wdog_gate], NULL, "imx2-wdt.0");
 	clk_register_clkdev(clk[wdog_gate], NULL, "imx2-wdt.0");
-	clk_register_clkdev(clk[nfc_div], NULL, "mxc_nand.0");
+	clk_register_clkdev(clk[nfc_div], NULL, "imx25-nand.0");
 	clk_register_clkdev(clk[csi_gate], NULL, "mx3-camera.0");
 	clk_register_clkdev(clk[csi_gate], NULL, "mx3-camera.0");
 
 
 	clk_prepare_enable(clk[spba_gate]);
 	clk_prepare_enable(clk[spba_gate]);

+ 7 - 8
arch/arm/mach-imx/clk-imx51-imx53.c

@@ -14,11 +14,10 @@
 #include <linux/of.h>
 #include <linux/of.h>
 #include <linux/err.h>
 #include <linux/err.h>
 
 
-#include <mach/hardware.h>
-#include <mach/common.h>
-
 #include "crm-regs-imx5.h"
 #include "crm-regs-imx5.h"
 #include "clk.h"
 #include "clk.h"
+#include "common.h"
+#include "hardware.h"
 
 
 /* Low-power Audio Playback Mode clock */
 /* Low-power Audio Playback Mode clock */
 static const char *lp_apm_sel[] = { "osc", };
 static const char *lp_apm_sel[] = { "osc", };
@@ -258,8 +257,8 @@ static void __init mx5_clocks_common_init(unsigned long rate_ckil,
 	clk_register_clkdev(clk[cspi_ipg_gate], NULL, "imx35-cspi.2");
 	clk_register_clkdev(clk[cspi_ipg_gate], NULL, "imx35-cspi.2");
 	clk_register_clkdev(clk[pwm1_ipg_gate], "pwm", "mxc_pwm.0");
 	clk_register_clkdev(clk[pwm1_ipg_gate], "pwm", "mxc_pwm.0");
 	clk_register_clkdev(clk[pwm2_ipg_gate], "pwm", "mxc_pwm.1");
 	clk_register_clkdev(clk[pwm2_ipg_gate], "pwm", "mxc_pwm.1");
-	clk_register_clkdev(clk[i2c1_gate], NULL, "imx-i2c.0");
-	clk_register_clkdev(clk[i2c2_gate], NULL, "imx-i2c.1");
+	clk_register_clkdev(clk[i2c1_gate], NULL, "imx21-i2c.0");
+	clk_register_clkdev(clk[i2c2_gate], NULL, "imx21-i2c.1");
 	clk_register_clkdev(clk[usboh3_per_gate], "per", "mxc-ehci.0");
 	clk_register_clkdev(clk[usboh3_per_gate], "per", "mxc-ehci.0");
 	clk_register_clkdev(clk[usboh3_gate], "ipg", "mxc-ehci.0");
 	clk_register_clkdev(clk[usboh3_gate], "ipg", "mxc-ehci.0");
 	clk_register_clkdev(clk[usboh3_gate], "ahb", "mxc-ehci.0");
 	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,
 	clk_register_clkdev(clk[usboh3_per_gate], "per", "fsl-usb2-udc");
 	clk_register_clkdev(clk[usboh3_per_gate], "per", "fsl-usb2-udc");
 	clk_register_clkdev(clk[usboh3_gate], "ipg", "fsl-usb2-udc");
 	clk_register_clkdev(clk[usboh3_gate], "ipg", "fsl-usb2-udc");
 	clk_register_clkdev(clk[usboh3_gate], "ahb", "fsl-usb2-udc");
 	clk_register_clkdev(clk[usboh3_gate], "ahb", "fsl-usb2-udc");
-	clk_register_clkdev(clk[nfc_gate], NULL, "mxc_nand");
+	clk_register_clkdev(clk[nfc_gate], NULL, "imx51-nand");
 	clk_register_clkdev(clk[ssi1_ipg_gate], NULL, "imx-ssi.0");
 	clk_register_clkdev(clk[ssi1_ipg_gate], NULL, "imx-ssi.0");
 	clk_register_clkdev(clk[ssi2_ipg_gate], NULL, "imx-ssi.1");
 	clk_register_clkdev(clk[ssi2_ipg_gate], NULL, "imx-ssi.1");
 	clk_register_clkdev(clk[ssi3_ipg_gate], NULL, "imx-ssi.2");
 	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,
 
 
 	mx5_clocks_common_init(rate_ckil, rate_osc, rate_ckih1, rate_ckih2);
 	mx5_clocks_common_init(rate_ckil, rate_osc, rate_ckih1, rate_ckih2);
 
 
-	clk_register_clkdev(clk[hsi2c_gate], NULL, "imx-i2c.2");
+	clk_register_clkdev(clk[hsi2c_gate], NULL, "imx21-i2c.2");
 	clk_register_clkdev(clk[mx51_mipi], "mipi_hsp", NULL);
 	clk_register_clkdev(clk[mx51_mipi], "mipi_hsp", NULL);
 	clk_register_clkdev(clk[vpu_gate], NULL, "imx51-vpu.0");
 	clk_register_clkdev(clk[vpu_gate], NULL, "imx51-vpu.0");
 	clk_register_clkdev(clk[fec_gate], NULL, "imx27-fec.0");
 	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,
 	mx5_clocks_common_init(rate_ckil, rate_osc, rate_ckih1, rate_ckih2);
 	mx5_clocks_common_init(rate_ckil, rate_osc, rate_ckih1, rate_ckih2);
 
 
 	clk_register_clkdev(clk[vpu_gate], NULL, "imx53-vpu.0");
 	clk_register_clkdev(clk[vpu_gate], NULL, "imx53-vpu.0");
-	clk_register_clkdev(clk[i2c3_gate], NULL, "imx-i2c.2");
+	clk_register_clkdev(clk[i2c3_gate], NULL, "imx21-i2c.2");
 	clk_register_clkdev(clk[fec_gate], NULL, "imx25-fec.0");
 	clk_register_clkdev(clk[fec_gate], NULL, "imx25-fec.0");
 	clk_register_clkdev(clk[ipu_gate], "bus", "imx53-ipu");
 	clk_register_clkdev(clk[ipu_gate], "bus", "imx53-ipu");
 	clk_register_clkdev(clk[ipu_di0_gate], "di0", "imx53-ipu");
 	clk_register_clkdev(clk[ipu_di0_gate], "di0", "imx53-ipu");

+ 2 - 1
arch/arm/mach-imx/clk-imx6q.c

@@ -19,8 +19,9 @@
 #include <linux/of.h>
 #include <linux/of.h>
 #include <linux/of_address.h>
 #include <linux/of_address.h>
 #include <linux/of_irq.h>
 #include <linux/of_irq.h>
-#include <mach/common.h>
+
 #include "clk.h"
 #include "clk.h"
+#include "common.h"
 
 
 #define CCGR0				0x68
 #define CCGR0				0x68
 #define CCGR1				0x6c
 #define CCGR1				0x6c

+ 2 - 2
arch/arm/mach-imx/clk-pllv1.c

@@ -4,10 +4,10 @@
 #include <linux/slab.h>
 #include <linux/slab.h>
 #include <linux/kernel.h>
 #include <linux/kernel.h>
 #include <linux/err.h>
 #include <linux/err.h>
-#include <mach/common.h>
-#include <mach/hardware.h>
 
 
 #include "clk.h"
 #include "clk.h"
+#include "common.h"
+#include "hardware.h"
 
 
 /**
 /**
  * pll v1
  * pll v1

+ 1 - 0
arch/arm/plat-mxc/include/mach/common.h → arch/arm/mach-imx/common.h

@@ -79,6 +79,7 @@ extern void mxc_arch_reset_init(void __iomem *);
 extern int mx53_revision(void);
 extern int mx53_revision(void);
 extern int mx53_display_revision(void);
 extern int mx53_display_revision(void);
 extern void imx_set_aips(void __iomem *);
 extern void imx_set_aips(void __iomem *);
+extern int mxc_device_init(void);
 
 
 enum mxc_cpu_pwr_mode {
 enum mxc_cpu_pwr_mode {
 	WAIT_CLOCKED,		/* wfi only */
 	WAIT_CLOCKED,		/* wfi only */

+ 3 - 2
arch/arm/mach-imx/cpu-imx25.c

@@ -11,8 +11,9 @@
  */
  */
 #include <linux/module.h>
 #include <linux/module.h>
 #include <linux/io.h>
 #include <linux/io.h>
-#include <mach/hardware.h>
-#include <mach/iim.h>
+
+#include "iim.h"
+#include "hardware.h"
 
 
 static int mx25_cpu_rev = -1;
 static int mx25_cpu_rev = -1;
 
 

+ 1 - 1
arch/arm/mach-imx/cpu-imx27.c

@@ -24,7 +24,7 @@
 #include <linux/io.h>
 #include <linux/io.h>
 #include <linux/module.h>
 #include <linux/module.h>
 
 
-#include <mach/hardware.h>
+#include "hardware.h"
 
 
 static int mx27_cpu_rev = -1;
 static int mx27_cpu_rev = -1;
 static int mx27_cpu_partnumber;
 static int mx27_cpu_partnumber;

+ 4 - 3
arch/arm/mach-imx/cpu-imx31.c

@@ -11,9 +11,10 @@
 
 
 #include <linux/module.h>
 #include <linux/module.h>
 #include <linux/io.h>
 #include <linux/io.h>
-#include <mach/hardware.h>
-#include <mach/iim.h>
-#include <mach/common.h>
+
+#include "common.h"
+#include "hardware.h"
+#include "iim.h"
 
 
 static int mx31_cpu_rev = -1;
 static int mx31_cpu_rev = -1;
 
 

+ 3 - 2
arch/arm/mach-imx/cpu-imx35.c

@@ -10,8 +10,9 @@
  */
  */
 #include <linux/module.h>
 #include <linux/module.h>
 #include <linux/io.h>
 #include <linux/io.h>
-#include <mach/hardware.h>
-#include <mach/iim.h>
+
+#include "hardware.h"
+#include "iim.h"
 
 
 static int mx35_cpu_rev = -1;
 static int mx35_cpu_rev = -1;
 
 

+ 2 - 1
arch/arm/mach-imx/cpu-imx5.c

@@ -15,9 +15,10 @@
 #include <linux/kernel.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/init.h>
 #include <linux/module.h>
 #include <linux/module.h>
-#include <mach/hardware.h>
 #include <linux/io.h>
 #include <linux/io.h>
 
 
+#include "hardware.h"
+
 static int mx5_cpu_rev = -1;
 static int mx5_cpu_rev = -1;
 
 
 #define IIM_SREV 0x24
 #define IIM_SREV 0x24

+ 2 - 1
arch/arm/plat-mxc/cpu.c → arch/arm/mach-imx/cpu.c

@@ -1,7 +1,8 @@
 
 
 #include <linux/module.h>
 #include <linux/module.h>
 #include <linux/io.h>
 #include <linux/io.h>
-#include <mach/hardware.h>
+
+#include "hardware.h"
 
 
 unsigned int __mxc_cpu_type;
 unsigned int __mxc_cpu_type;
 EXPORT_SYMBOL(__mxc_cpu_type);
 EXPORT_SYMBOL(__mxc_cpu_type);

+ 2 - 1
arch/arm/mach-imx/cpu_op-mx51.c

@@ -13,9 +13,10 @@
 
 
 #include <linux/bug.h>
 #include <linux/bug.h>
 #include <linux/types.h>
 #include <linux/types.h>
-#include <mach/hardware.h>
 #include <linux/kernel.h>
 #include <linux/kernel.h>
 
 
+#include "hardware.h"
+
 static struct cpu_op mx51_cpu_op[] = {
 static struct cpu_op mx51_cpu_op[] = {
 	{
 	{
 	.cpu_rate = 160000000,},
 	.cpu_rate = 160000000,},

+ 2 - 1
arch/arm/plat-mxc/cpufreq.c → arch/arm/mach-imx/cpufreq.c

@@ -22,7 +22,8 @@
 #include <linux/clk.h>
 #include <linux/clk.h>
 #include <linux/err.h>
 #include <linux/err.h>
 #include <linux/slab.h>
 #include <linux/slab.h>
-#include <mach/hardware.h>
+
+#include "hardware.h"
 
 
 #define CLK32_FREQ	32768
 #define CLK32_FREQ	32768
 #define NANOSECOND	(1000 * 1000 * 1000)
 #define NANOSECOND	(1000 * 1000 * 1000)

+ 0 - 0
arch/arm/plat-mxc/cpuidle.c → arch/arm/mach-imx/cpuidle.c


+ 0 - 0
arch/arm/plat-mxc/include/mach/cpuidle.h → arch/arm/mach-imx/cpuidle.h


+ 1 - 2
arch/arm/mach-imx/devices-imx1.h

@@ -6,8 +6,7 @@
  * the terms of the GNU General Public License version 2 as published by the
  * the terms of the GNU General Public License version 2 as published by the
  * Free Software Foundation.
  * Free Software Foundation.
  */
  */
-#include <mach/mx1.h>
-#include <mach/devices-common.h>
+#include "devices/devices-common.h"
 
 
 extern const struct imx_imx_fb_data imx1_imx_fb_data;
 extern const struct imx_imx_fb_data imx1_imx_fb_data;
 #define imx1_add_imx_fb(pdata) \
 #define imx1_add_imx_fb(pdata) \

+ 1 - 2
arch/arm/mach-imx/devices-imx21.h

@@ -6,8 +6,7 @@
  * the terms of the GNU General Public License version 2 as published by the
  * the terms of the GNU General Public License version 2 as published by the
  * Free Software Foundation.
  * Free Software Foundation.
  */
  */
-#include <mach/mx21.h>
-#include <mach/devices-common.h>
+#include "devices/devices-common.h"
 
 
 extern const struct imx_imx21_hcd_data imx21_imx21_hcd_data;
 extern const struct imx_imx21_hcd_data imx21_imx21_hcd_data;
 #define imx21_add_imx21_hcd(pdata)	\
 #define imx21_add_imx21_hcd(pdata)	\

+ 1 - 2
arch/arm/mach-imx/devices-imx25.h

@@ -6,8 +6,7 @@
  * the terms of the GNU General Public License version 2 as published by the
  * the terms of the GNU General Public License version 2 as published by the
  * Free Software Foundation.
  * Free Software Foundation.
  */
  */
-#include <mach/mx25.h>
-#include <mach/devices-common.h>
+#include "devices/devices-common.h"
 
 
 extern const struct imx_fec_data imx25_fec_data;
 extern const struct imx_fec_data imx25_fec_data;
 #define imx25_add_fec(pdata)	\
 #define imx25_add_fec(pdata)	\

+ 1 - 2
arch/arm/mach-imx/devices-imx27.h

@@ -6,8 +6,7 @@
  * the terms of the GNU General Public License version 2 as published by the
  * the terms of the GNU General Public License version 2 as published by the
  * Free Software Foundation.
  * Free Software Foundation.
  */
  */
-#include <mach/mx27.h>
-#include <mach/devices-common.h>
+#include "devices/devices-common.h"
 
 
 extern const struct imx_fec_data imx27_fec_data;
 extern const struct imx_fec_data imx27_fec_data;
 #define imx27_add_fec(pdata)	\
 #define imx27_add_fec(pdata)	\

+ 1 - 2
arch/arm/mach-imx/devices-imx31.h

@@ -6,8 +6,7 @@
  * the terms of the GNU General Public License version 2 as published by the
  * the terms of the GNU General Public License version 2 as published by the
  * Free Software Foundation.
  * Free Software Foundation.
  */
  */
-#include <mach/mx31.h>
-#include <mach/devices-common.h>
+#include "devices/devices-common.h"
 
 
 extern const struct imx_fsl_usb2_udc_data imx31_fsl_usb2_udc_data;
 extern const struct imx_fsl_usb2_udc_data imx31_fsl_usb2_udc_data;
 #define imx31_add_fsl_usb2_udc(pdata)	\
 #define imx31_add_fsl_usb2_udc(pdata)	\

+ 1 - 2
arch/arm/mach-imx/devices-imx35.h

@@ -6,8 +6,7 @@
  * the terms of the GNU General Public License version 2 as published by the
  * the terms of the GNU General Public License version 2 as published by the
  * Free Software Foundation.
  * Free Software Foundation.
  */
  */
-#include <mach/mx35.h>
-#include <mach/devices-common.h>
+#include "devices/devices-common.h"
 
 
 extern const struct imx_fec_data imx35_fec_data;
 extern const struct imx_fec_data imx35_fec_data;
 #define imx35_add_fec(pdata)	\
 #define imx35_add_fec(pdata)	\

+ 1 - 2
arch/arm/mach-imx/devices-imx50.h

@@ -18,8 +18,7 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
  */
 
 
-#include <mach/mx50.h>
-#include <mach/devices-common.h>
+#include "devices/devices-common.h"
 
 
 extern const struct imx_imx_uart_1irq_data imx50_imx_uart_data[];
 extern const struct imx_imx_uart_1irq_data imx50_imx_uart_data[];
 #define imx50_add_imx_uart(id, pdata)	\
 #define imx50_add_imx_uart(id, pdata)	\

+ 1 - 2
arch/arm/mach-imx/devices-imx51.h

@@ -6,8 +6,7 @@
  * the terms of the GNU General Public License version 2 as published by the
  * the terms of the GNU General Public License version 2 as published by the
  * Free Software Foundation.
  * Free Software Foundation.
  */
  */
-#include <mach/mx51.h>
-#include <mach/devices-common.h>
+#include "devices/devices-common.h"
 
 
 extern const struct imx_fec_data imx51_fec_data;
 extern const struct imx_fec_data imx51_fec_data;
 #define imx51_add_fec(pdata)	\
 #define imx51_add_fec(pdata)	\

+ 0 - 0
arch/arm/plat-mxc/devices/Kconfig → arch/arm/mach-imx/devices/Kconfig


+ 2 - 0
arch/arm/plat-mxc/devices/Makefile → arch/arm/mach-imx/devices/Makefile

@@ -1,3 +1,5 @@
+obj-y := devices.o
+
 obj-$(CONFIG_IMX_HAVE_PLATFORM_FEC) += platform-fec.o
 obj-$(CONFIG_IMX_HAVE_PLATFORM_FEC) += platform-fec.o
 obj-$(CONFIG_IMX_HAVE_PLATFORM_FLEXCAN) += platform-flexcan.o
 obj-$(CONFIG_IMX_HAVE_PLATFORM_FLEXCAN) += platform-flexcan.o
 obj-$(CONFIG_IMX_HAVE_PLATFORM_FSL_USB2_UDC) += platform-fsl-usb2-udc.o
 obj-$(CONFIG_IMX_HAVE_PLATFORM_FSL_USB2_UDC) += platform-fsl-usb2-udc.o

+ 8 - 1
arch/arm/plat-mxc/include/mach/devices-common.h → arch/arm/mach-imx/devices/devices-common.h

@@ -108,6 +108,7 @@ struct platform_device *__init imx_add_imxdi_rtc(
 
 
 #include <linux/platform_data/video-imxfb.h>
 #include <linux/platform_data/video-imxfb.h>
 struct imx_imx_fb_data {
 struct imx_imx_fb_data {
+	const char *devid;
 	resource_size_t iobase;
 	resource_size_t iobase;
 	resource_size_t iosize;
 	resource_size_t iosize;
 	resource_size_t irq;
 	resource_size_t irq;
@@ -118,6 +119,7 @@ struct platform_device *__init imx_add_imx_fb(
 
 
 #include <linux/platform_data/i2c-imx.h>
 #include <linux/platform_data/i2c-imx.h>
 struct imx_imx_i2c_data {
 struct imx_imx_i2c_data {
+	const char *devid;
 	int id;
 	int id;
 	resource_size_t iobase;
 	resource_size_t iobase;
 	resource_size_t iosize;
 	resource_size_t iosize;
@@ -219,6 +221,7 @@ struct platform_device *__init imx_add_mx1_camera(
 
 
 #include <linux/platform_data/camera-mx2.h>
 #include <linux/platform_data/camera-mx2.h>
 struct imx_mx2_camera_data {
 struct imx_mx2_camera_data {
+	const char *devid;
 	resource_size_t iobasecsi;
 	resource_size_t iobasecsi;
 	resource_size_t iosizecsi;
 	resource_size_t iosizecsi;
 	resource_size_t irqcsi;
 	resource_size_t irqcsi;
@@ -244,6 +247,7 @@ struct platform_device *__init imx_add_mxc_ehci(
 
 
 #include <linux/platform_data/mmc-mxcmmc.h>
 #include <linux/platform_data/mmc-mxcmmc.h>
 struct imx_mxc_mmc_data {
 struct imx_mxc_mmc_data {
+	const char *devid;
 	int id;
 	int id;
 	resource_size_t iobase;
 	resource_size_t iobase;
 	resource_size_t iosize;
 	resource_size_t iosize;
@@ -256,6 +260,7 @@ struct platform_device *__init imx_add_mxc_mmc(
 
 
 #include <linux/platform_data/mtd-mxc_nand.h>
 #include <linux/platform_data/mtd-mxc_nand.h>
 struct imx_mxc_nand_data {
 struct imx_mxc_nand_data {
+	const char *devid;
 	/*
 	/*
 	 * id is traditionally 0, but -1 is more appropriate.  We use -1 for new
 	 * id is traditionally 0, but -1 is more appropriate.  We use -1 for new
 	 * machines but don't change existing devices as the nand device usually
 	 * machines but don't change existing devices as the nand device usually
@@ -290,6 +295,7 @@ struct platform_device *__init imx_add_mxc_pwm(
 
 
 /* mxc_rtc */
 /* mxc_rtc */
 struct imx_mxc_rtc_data {
 struct imx_mxc_rtc_data {
+	const char *devid;
 	resource_size_t iobase;
 	resource_size_t iobase;
 	resource_size_t irq;
 	resource_size_t irq;
 };
 };
@@ -326,7 +332,8 @@ struct platform_device *__init imx_add_spi_imx(
 		const struct imx_spi_imx_data *data,
 		const struct imx_spi_imx_data *data,
 		const struct spi_imx_master *pdata);
 		const struct spi_imx_master *pdata);
 
 
-struct platform_device *imx_add_imx_dma(void);
+struct platform_device *imx_add_imx_dma(char *name, resource_size_t iobase,
+					int irq, int irq_err);
 struct platform_device *imx_add_imx_sdma(char *name,
 struct platform_device *imx_add_imx_sdma(char *name,
 	resource_size_t iobase, int irq, struct sdma_platform_data *pdata);
 	resource_size_t iobase, int irq, struct sdma_platform_data *pdata);
 
 

+ 1 - 3
arch/arm/plat-mxc/devices.c → arch/arm/mach-imx/devices/devices.c

@@ -21,7 +21,6 @@
 #include <linux/init.h>
 #include <linux/init.h>
 #include <linux/err.h>
 #include <linux/err.h>
 #include <linux/platform_device.h>
 #include <linux/platform_device.h>
-#include <mach/common.h>
 
 
 struct device mxc_aips_bus = {
 struct device mxc_aips_bus = {
 	.init_name	= "mxc_aips",
 	.init_name	= "mxc_aips",
@@ -33,7 +32,7 @@ struct device mxc_ahb_bus = {
 	.parent		= &platform_bus,
 	.parent		= &platform_bus,
 };
 };
 
 
-static int __init mxc_device_init(void)
+int __init mxc_device_init(void)
 {
 {
 	int ret;
 	int ret;
 
 
@@ -46,4 +45,3 @@ static int __init mxc_device_init(void)
 done:
 done:
 	return ret;
 	return ret;
 }
 }
-core_initcall(mxc_device_init);

+ 3 - 2
arch/arm/plat-mxc/devices/platform-ahci-imx.c → arch/arm/mach-imx/devices/platform-ahci-imx.c

@@ -24,8 +24,9 @@
 #include <linux/device.h>
 #include <linux/device.h>
 #include <linux/dma-mapping.h>
 #include <linux/dma-mapping.h>
 #include <asm/sizes.h>
 #include <asm/sizes.h>
-#include <mach/hardware.h>
-#include <mach/devices-common.h>
+
+#include "../hardware.h"
+#include "devices-common.h"
 
 
 #define imx_ahci_imx_data_entry_single(soc, _devid)		\
 #define imx_ahci_imx_data_entry_single(soc, _devid)		\
 	{								\
 	{								\

+ 3 - 2
arch/arm/plat-mxc/devices/platform-fec.c → arch/arm/mach-imx/devices/platform-fec.c

@@ -8,8 +8,9 @@
  */
  */
 #include <linux/dma-mapping.h>
 #include <linux/dma-mapping.h>
 #include <asm/sizes.h>
 #include <asm/sizes.h>
-#include <mach/hardware.h>
-#include <mach/devices-common.h>
+
+#include "../hardware.h"
+#include "devices-common.h"
 
 
 #define imx_fec_data_entry_single(soc, _devid)				\
 #define imx_fec_data_entry_single(soc, _devid)				\
 	{								\
 	{								\

+ 2 - 2
arch/arm/plat-mxc/devices/platform-flexcan.c → arch/arm/mach-imx/devices/platform-flexcan.c

@@ -5,8 +5,8 @@
  * the terms of the GNU General Public License version 2 as published by the
  * the terms of the GNU General Public License version 2 as published by the
  * Free Software Foundation.
  * Free Software Foundation.
  */
  */
-#include <mach/hardware.h>
-#include <mach/devices-common.h>
+#include "../hardware.h"
+#include "devices-common.h"
 
 
 #define imx_flexcan_data_entry_single(soc, _id, _hwid, _size)		\
 #define imx_flexcan_data_entry_single(soc, _id, _hwid, _size)		\
 	{								\
 	{								\

+ 3 - 2
arch/arm/plat-mxc/devices/platform-fsl-usb2-udc.c → arch/arm/mach-imx/devices/platform-fsl-usb2-udc.c

@@ -7,8 +7,9 @@
  * Free Software Foundation.
  * Free Software Foundation.
  */
  */
 #include <linux/dma-mapping.h>
 #include <linux/dma-mapping.h>
-#include <mach/hardware.h>
-#include <mach/devices-common.h>
+
+#include "../hardware.h"
+#include "devices-common.h"
 
 
 #define imx_fsl_usb2_udc_data_entry_single(soc)				\
 #define imx_fsl_usb2_udc_data_entry_single(soc)				\
 	{								\
 	{								\

+ 1 - 1
arch/arm/plat-mxc/devices/platform-gpio-mxc.c → arch/arm/mach-imx/devices/platform-gpio-mxc.c

@@ -6,7 +6,7 @@
  * the terms of the GNU General Public License version 2 as published by the
  * the terms of the GNU General Public License version 2 as published by the
  * Free Software Foundation.
  * Free Software Foundation.
  */
  */
-#include <mach/devices-common.h>
+#include "devices-common.h"
 
 
 struct platform_device *__init mxc_register_gpio(char *name, int id,
 struct platform_device *__init mxc_register_gpio(char *name, int id,
 	resource_size_t iobase, resource_size_t iosize, int irq, int irq_high)
 	resource_size_t iobase, resource_size_t iosize, int irq, int irq_high)

+ 3 - 2
arch/arm/plat-mxc/devices/platform-gpio_keys.c → arch/arm/mach-imx/devices/platform-gpio_keys.c

@@ -16,8 +16,9 @@
  * Boston, MA  02110-1301, USA.
  * Boston, MA  02110-1301, USA.
  */
  */
 #include <asm/sizes.h>
 #include <asm/sizes.h>
-#include <mach/hardware.h>
-#include <mach/devices-common.h>
+
+#include "../hardware.h"
+#include "devices-common.h"
 
 
 struct platform_device *__init imx_add_gpio_keys(
 struct platform_device *__init imx_add_gpio_keys(
 		const struct gpio_keys_platform_data *pdata)
 		const struct gpio_keys_platform_data *pdata)

+ 20 - 3
arch/arm/plat-mxc/devices/platform-imx-dma.c → arch/arm/mach-imx/devices/platform-imx-dma.c

@@ -6,12 +6,29 @@
  * the terms of the GNU General Public License version 2 as published by the
  * the terms of the GNU General Public License version 2 as published by the
  * Free Software Foundation.
  * Free Software Foundation.
  */
  */
-#include <mach/devices-common.h>
+#include "devices-common.h"
 
 
-struct platform_device __init __maybe_unused *imx_add_imx_dma(void)
+struct platform_device __init __maybe_unused *imx_add_imx_dma(char *name,
+	resource_size_t iobase, int irq, int irq_err)
 {
 {
+	struct resource res[] = {
+		{
+			.start = iobase,
+			.end = iobase + SZ_4K - 1,
+			.flags = IORESOURCE_MEM,
+		}, {
+			.start = irq,
+			.end = irq,
+			.flags = IORESOURCE_IRQ,
+		}, {
+			.start = irq_err,
+			.end = irq_err,
+			.flags = IORESOURCE_IRQ,
+		},
+	};
+
 	return platform_device_register_resndata(&mxc_ahb_bus,
 	return platform_device_register_resndata(&mxc_ahb_bus,
-			"imx-dma", -1, NULL, 0, NULL, 0);
+			name, -1, res, ARRAY_SIZE(res), NULL, 0);
 }
 }
 
 
 struct platform_device __init __maybe_unused *imx_add_imx_sdma(char *name,
 struct platform_device __init __maybe_unused *imx_add_imx_sdma(char *name,

+ 9 - 7
arch/arm/plat-mxc/devices/platform-imx-fb.c → arch/arm/mach-imx/devices/platform-imx-fb.c

@@ -7,11 +7,13 @@
  * Free Software Foundation.
  * Free Software Foundation.
  */
  */
 #include <linux/dma-mapping.h>
 #include <linux/dma-mapping.h>
-#include <mach/hardware.h>
-#include <mach/devices-common.h>
 
 
-#define imx_imx_fb_data_entry_single(soc, _size)			\
+#include "../hardware.h"
+#include "devices-common.h"
+
+#define imx_imx_fb_data_entry_single(soc, _devid, _size)		\
 	{								\
 	{								\
+		.devid = _devid,					\
 		.iobase = soc ## _LCDC_BASE_ADDR,			\
 		.iobase = soc ## _LCDC_BASE_ADDR,			\
 		.iosize = _size,					\
 		.iosize = _size,					\
 		.irq = soc ## _INT_LCDC,				\
 		.irq = soc ## _INT_LCDC,				\
@@ -19,22 +21,22 @@
 
 
 #ifdef CONFIG_SOC_IMX1
 #ifdef CONFIG_SOC_IMX1
 const struct imx_imx_fb_data imx1_imx_fb_data __initconst =
 const struct imx_imx_fb_data imx1_imx_fb_data __initconst =
-	imx_imx_fb_data_entry_single(MX1, SZ_4K);
+	imx_imx_fb_data_entry_single(MX1, "imx1-fb", SZ_4K);
 #endif /* ifdef CONFIG_SOC_IMX1 */
 #endif /* ifdef CONFIG_SOC_IMX1 */
 
 
 #ifdef CONFIG_SOC_IMX21
 #ifdef CONFIG_SOC_IMX21
 const struct imx_imx_fb_data imx21_imx_fb_data __initconst =
 const struct imx_imx_fb_data imx21_imx_fb_data __initconst =
-	imx_imx_fb_data_entry_single(MX21, SZ_4K);
+	imx_imx_fb_data_entry_single(MX21, "imx21-fb", SZ_4K);
 #endif /* ifdef CONFIG_SOC_IMX21 */
 #endif /* ifdef CONFIG_SOC_IMX21 */
 
 
 #ifdef CONFIG_SOC_IMX25
 #ifdef CONFIG_SOC_IMX25
 const struct imx_imx_fb_data imx25_imx_fb_data __initconst =
 const struct imx_imx_fb_data imx25_imx_fb_data __initconst =
-	imx_imx_fb_data_entry_single(MX25, SZ_16K);
+	imx_imx_fb_data_entry_single(MX25, "imx21-fb", SZ_16K);
 #endif /* ifdef CONFIG_SOC_IMX25 */
 #endif /* ifdef CONFIG_SOC_IMX25 */
 
 
 #ifdef CONFIG_SOC_IMX27
 #ifdef CONFIG_SOC_IMX27
 const struct imx_imx_fb_data imx27_imx_fb_data __initconst =
 const struct imx_imx_fb_data imx27_imx_fb_data __initconst =
-	imx_imx_fb_data_entry_single(MX27, SZ_4K);
+	imx_imx_fb_data_entry_single(MX27, "imx21-fb", SZ_4K);
 #endif /* ifdef CONFIG_SOC_IMX27 */
 #endif /* ifdef CONFIG_SOC_IMX27 */
 
 
 struct platform_device *__init imx_add_imx_fb(
 struct platform_device *__init imx_add_imx_fb(

+ 17 - 15
arch/arm/plat-mxc/devices/platform-imx-i2c.c → arch/arm/mach-imx/devices/platform-imx-i2c.c

@@ -6,34 +6,35 @@
  * the terms of the GNU General Public License version 2 as published by the
  * the terms of the GNU General Public License version 2 as published by the
  * Free Software Foundation.
  * Free Software Foundation.
  */
  */
-#include <mach/hardware.h>
-#include <mach/devices-common.h>
+#include "../hardware.h"
+#include "devices-common.h"
 
 
-#define imx_imx_i2c_data_entry_single(soc, _id, _hwid, _size)		\
+#define imx_imx_i2c_data_entry_single(soc, _devid, _id, _hwid, _size)	\
 	{								\
 	{								\
+		.devid = _devid,					\
 		.id = _id,						\
 		.id = _id,						\
 		.iobase = soc ## _I2C ## _hwid ## _BASE_ADDR,		\
 		.iobase = soc ## _I2C ## _hwid ## _BASE_ADDR,		\
 		.iosize = _size,					\
 		.iosize = _size,					\
 		.irq = soc ## _INT_I2C ## _hwid,			\
 		.irq = soc ## _INT_I2C ## _hwid,			\
 	}
 	}
 
 
-#define imx_imx_i2c_data_entry(soc, _id, _hwid, _size)			\
-	[_id] = imx_imx_i2c_data_entry_single(soc, _id, _hwid, _size)
+#define imx_imx_i2c_data_entry(soc, _devid, _id, _hwid, _size)		\
+	[_id] = imx_imx_i2c_data_entry_single(soc, _devid, _id, _hwid, _size)
 
 
 #ifdef CONFIG_SOC_IMX1
 #ifdef CONFIG_SOC_IMX1
 const struct imx_imx_i2c_data imx1_imx_i2c_data __initconst =
 const struct imx_imx_i2c_data imx1_imx_i2c_data __initconst =
-	imx_imx_i2c_data_entry_single(MX1, 0, , SZ_4K);
+	imx_imx_i2c_data_entry_single(MX1, "imx1-i2c", 0, , SZ_4K);
 #endif /* ifdef CONFIG_SOC_IMX1 */
 #endif /* ifdef CONFIG_SOC_IMX1 */
 
 
 #ifdef CONFIG_SOC_IMX21
 #ifdef CONFIG_SOC_IMX21
 const struct imx_imx_i2c_data imx21_imx_i2c_data __initconst =
 const struct imx_imx_i2c_data imx21_imx_i2c_data __initconst =
-	imx_imx_i2c_data_entry_single(MX21, 0, , SZ_4K);
+	imx_imx_i2c_data_entry_single(MX21, "imx21-i2c", 0, , SZ_4K);
 #endif /* ifdef CONFIG_SOC_IMX21 */
 #endif /* ifdef CONFIG_SOC_IMX21 */
 
 
 #ifdef CONFIG_SOC_IMX25
 #ifdef CONFIG_SOC_IMX25
 const struct imx_imx_i2c_data imx25_imx_i2c_data[] __initconst = {
 const struct imx_imx_i2c_data imx25_imx_i2c_data[] __initconst = {
 #define imx25_imx_i2c_data_entry(_id, _hwid)				\
 #define imx25_imx_i2c_data_entry(_id, _hwid)				\
-	imx_imx_i2c_data_entry(MX25, _id, _hwid, SZ_16K)
+	imx_imx_i2c_data_entry(MX25, "imx21-i2c", _id, _hwid, SZ_16K)
 	imx25_imx_i2c_data_entry(0, 1),
 	imx25_imx_i2c_data_entry(0, 1),
 	imx25_imx_i2c_data_entry(1, 2),
 	imx25_imx_i2c_data_entry(1, 2),
 	imx25_imx_i2c_data_entry(2, 3),
 	imx25_imx_i2c_data_entry(2, 3),
@@ -43,7 +44,7 @@ const struct imx_imx_i2c_data imx25_imx_i2c_data[] __initconst = {
 #ifdef CONFIG_SOC_IMX27
 #ifdef CONFIG_SOC_IMX27
 const struct imx_imx_i2c_data imx27_imx_i2c_data[] __initconst = {
 const struct imx_imx_i2c_data imx27_imx_i2c_data[] __initconst = {
 #define imx27_imx_i2c_data_entry(_id, _hwid)				\
 #define imx27_imx_i2c_data_entry(_id, _hwid)				\
-	imx_imx_i2c_data_entry(MX27, _id, _hwid, SZ_4K)
+	imx_imx_i2c_data_entry(MX27, "imx21-i2c", _id, _hwid, SZ_4K)
 	imx27_imx_i2c_data_entry(0, 1),
 	imx27_imx_i2c_data_entry(0, 1),
 	imx27_imx_i2c_data_entry(1, 2),
 	imx27_imx_i2c_data_entry(1, 2),
 };
 };
@@ -52,7 +53,7 @@ const struct imx_imx_i2c_data imx27_imx_i2c_data[] __initconst = {
 #ifdef CONFIG_SOC_IMX31
 #ifdef CONFIG_SOC_IMX31
 const struct imx_imx_i2c_data imx31_imx_i2c_data[] __initconst = {
 const struct imx_imx_i2c_data imx31_imx_i2c_data[] __initconst = {
 #define imx31_imx_i2c_data_entry(_id, _hwid)				\
 #define imx31_imx_i2c_data_entry(_id, _hwid)				\
-	imx_imx_i2c_data_entry(MX31, _id, _hwid, SZ_4K)
+	imx_imx_i2c_data_entry(MX31, "imx21-i2c", _id, _hwid, SZ_4K)
 	imx31_imx_i2c_data_entry(0, 1),
 	imx31_imx_i2c_data_entry(0, 1),
 	imx31_imx_i2c_data_entry(1, 2),
 	imx31_imx_i2c_data_entry(1, 2),
 	imx31_imx_i2c_data_entry(2, 3),
 	imx31_imx_i2c_data_entry(2, 3),
@@ -62,7 +63,7 @@ const struct imx_imx_i2c_data imx31_imx_i2c_data[] __initconst = {
 #ifdef CONFIG_SOC_IMX35
 #ifdef CONFIG_SOC_IMX35
 const struct imx_imx_i2c_data imx35_imx_i2c_data[] __initconst = {
 const struct imx_imx_i2c_data imx35_imx_i2c_data[] __initconst = {
 #define imx35_imx_i2c_data_entry(_id, _hwid)				\
 #define imx35_imx_i2c_data_entry(_id, _hwid)				\
-	imx_imx_i2c_data_entry(MX35, _id, _hwid, SZ_4K)
+	imx_imx_i2c_data_entry(MX35, "imx21-i2c", _id, _hwid, SZ_4K)
 	imx35_imx_i2c_data_entry(0, 1),
 	imx35_imx_i2c_data_entry(0, 1),
 	imx35_imx_i2c_data_entry(1, 2),
 	imx35_imx_i2c_data_entry(1, 2),
 	imx35_imx_i2c_data_entry(2, 3),
 	imx35_imx_i2c_data_entry(2, 3),
@@ -72,7 +73,7 @@ const struct imx_imx_i2c_data imx35_imx_i2c_data[] __initconst = {
 #ifdef CONFIG_SOC_IMX50
 #ifdef CONFIG_SOC_IMX50
 const struct imx_imx_i2c_data imx50_imx_i2c_data[] __initconst = {
 const struct imx_imx_i2c_data imx50_imx_i2c_data[] __initconst = {
 #define imx50_imx_i2c_data_entry(_id, _hwid)				\
 #define imx50_imx_i2c_data_entry(_id, _hwid)				\
-	imx_imx_i2c_data_entry(MX50, _id, _hwid, SZ_4K)
+	imx_imx_i2c_data_entry(MX50, "imx21-i2c", _id, _hwid, SZ_4K)
 	imx50_imx_i2c_data_entry(0, 1),
 	imx50_imx_i2c_data_entry(0, 1),
 	imx50_imx_i2c_data_entry(1, 2),
 	imx50_imx_i2c_data_entry(1, 2),
 	imx50_imx_i2c_data_entry(2, 3),
 	imx50_imx_i2c_data_entry(2, 3),
@@ -82,10 +83,11 @@ const struct imx_imx_i2c_data imx50_imx_i2c_data[] __initconst = {
 #ifdef CONFIG_SOC_IMX51
 #ifdef CONFIG_SOC_IMX51
 const struct imx_imx_i2c_data imx51_imx_i2c_data[] __initconst = {
 const struct imx_imx_i2c_data imx51_imx_i2c_data[] __initconst = {
 #define imx51_imx_i2c_data_entry(_id, _hwid)				\
 #define imx51_imx_i2c_data_entry(_id, _hwid)				\
-	imx_imx_i2c_data_entry(MX51, _id, _hwid, SZ_4K)
+	imx_imx_i2c_data_entry(MX51, "imx21-i2c", _id, _hwid, SZ_4K)
 	imx51_imx_i2c_data_entry(0, 1),
 	imx51_imx_i2c_data_entry(0, 1),
 	imx51_imx_i2c_data_entry(1, 2),
 	imx51_imx_i2c_data_entry(1, 2),
 	{
 	{
+		.devid = "imx21-i2c",
 		.id = 2,
 		.id = 2,
 		.iobase = MX51_HSI2C_DMA_BASE_ADDR,
 		.iobase = MX51_HSI2C_DMA_BASE_ADDR,
 		.iosize = SZ_16K,
 		.iosize = SZ_16K,
@@ -97,7 +99,7 @@ const struct imx_imx_i2c_data imx51_imx_i2c_data[] __initconst = {
 #ifdef CONFIG_SOC_IMX53
 #ifdef CONFIG_SOC_IMX53
 const struct imx_imx_i2c_data imx53_imx_i2c_data[] __initconst = {
 const struct imx_imx_i2c_data imx53_imx_i2c_data[] __initconst = {
 #define imx53_imx_i2c_data_entry(_id, _hwid)				\
 #define imx53_imx_i2c_data_entry(_id, _hwid)				\
-	imx_imx_i2c_data_entry(MX53, _id, _hwid, SZ_4K)
+	imx_imx_i2c_data_entry(MX53, "imx21-i2c", _id, _hwid, SZ_4K)
 	imx53_imx_i2c_data_entry(0, 1),
 	imx53_imx_i2c_data_entry(0, 1),
 	imx53_imx_i2c_data_entry(1, 2),
 	imx53_imx_i2c_data_entry(1, 2),
 	imx53_imx_i2c_data_entry(2, 3),
 	imx53_imx_i2c_data_entry(2, 3),
@@ -120,7 +122,7 @@ struct platform_device *__init imx_add_imx_i2c(
 		},
 		},
 	};
 	};
 
 
-	return imx_add_platform_device("imx-i2c", data->id,
+	return imx_add_platform_device(data->devid, data->id,
 			res, ARRAY_SIZE(res),
 			res, ARRAY_SIZE(res),
 			pdata, sizeof(*pdata));
 			pdata, sizeof(*pdata));
 }
 }

+ 2 - 2
arch/arm/plat-mxc/devices/platform-imx-keypad.c → arch/arm/mach-imx/devices/platform-imx-keypad.c

@@ -6,8 +6,8 @@
  * the terms of the GNU General Public License version 2 as published by the
  * the terms of the GNU General Public License version 2 as published by the
  * Free Software Foundation.
  * Free Software Foundation.
  */
  */
-#include <mach/hardware.h>
-#include <mach/devices-common.h>
+#include "../hardware.h"
+#include "devices-common.h"
 
 
 #define imx_imx_keypad_data_entry_single(soc, _size)			\
 #define imx_imx_keypad_data_entry_single(soc, _size)			\
 	{								\
 	{								\

+ 2 - 2
arch/arm/plat-mxc/devices/platform-imx-ssi.c → arch/arm/mach-imx/devices/platform-imx-ssi.c

@@ -6,8 +6,8 @@
  * the terms of the GNU General Public License version 2 as published by the
  * the terms of the GNU General Public License version 2 as published by the
  * Free Software Foundation.
  * Free Software Foundation.
  */
  */
-#include <mach/hardware.h>
-#include <mach/devices-common.h>
+#include "../hardware.h"
+#include "devices-common.h"
 
 
 #define imx_imx_ssi_data_entry(soc, _id, _hwid, _size)			\
 #define imx_imx_ssi_data_entry(soc, _id, _hwid, _size)			\
 	[_id] = {							\
 	[_id] = {							\

+ 2 - 2
arch/arm/plat-mxc/devices/platform-imx-uart.c → arch/arm/mach-imx/devices/platform-imx-uart.c

@@ -6,8 +6,8 @@
  * the terms of the GNU General Public License version 2 as published by the
  * the terms of the GNU General Public License version 2 as published by the
  * Free Software Foundation.
  * Free Software Foundation.
  */
  */
-#include <mach/hardware.h>
-#include <mach/devices-common.h>
+#include "../hardware.h"
+#include "devices-common.h"
 
 
 #define imx_imx_uart_3irq_data_entry(soc, _id, _hwid, _size)		\
 #define imx_imx_uart_3irq_data_entry(soc, _id, _hwid, _size)		\
 	[_id] = {							\
 	[_id] = {							\

+ 3 - 2
arch/arm/plat-mxc/devices/platform-imx2-wdt.c → arch/arm/mach-imx/devices/platform-imx2-wdt.c

@@ -7,8 +7,9 @@
  * Free Software Foundation.
  * Free Software Foundation.
  */
  */
 #include <asm/sizes.h>
 #include <asm/sizes.h>
-#include <mach/hardware.h>
-#include <mach/devices-common.h>
+
+#include "../hardware.h"
+#include "devices-common.h"
 
 
 #define imx_imx2_wdt_data_entry_single(soc, _id, _hwid, _size)		\
 #define imx_imx2_wdt_data_entry_single(soc, _id, _hwid, _size)		\
 	{								\
 	{								\

+ 2 - 2
arch/arm/plat-mxc/devices/platform-imx21-hcd.c → arch/arm/mach-imx/devices/platform-imx21-hcd.c

@@ -6,8 +6,8 @@
  * the terms of the GNU General Public License version 2 as published by the
  * the terms of the GNU General Public License version 2 as published by the
  * Free Software Foundation.
  * Free Software Foundation.
  */
  */
-#include <mach/hardware.h>
-#include <mach/devices-common.h>
+#include "../hardware.h"
+#include "devices-common.h"
 
 
 #define imx_imx21_hcd_data_entry_single(soc)				\
 #define imx_imx21_hcd_data_entry_single(soc)				\
 	{								\
 	{								\

+ 2 - 2
arch/arm/plat-mxc/devices/platform-imx27-coda.c → arch/arm/mach-imx/devices/platform-imx27-coda.c

@@ -7,8 +7,8 @@
  * Free Software Foundation.
  * Free Software Foundation.
  */
  */
 
 
-#include <mach/hardware.h>
-#include <mach/devices-common.h>
+#include "../hardware.h"
+#include "devices-common.h"
 
 
 #ifdef CONFIG_SOC_IMX27
 #ifdef CONFIG_SOC_IMX27
 const struct imx_imx27_coda_data imx27_coda_data __initconst = {
 const struct imx_imx27_coda_data imx27_coda_data __initconst = {

+ 2 - 2
arch/arm/plat-mxc/devices/platform-imx_udc.c → arch/arm/mach-imx/devices/platform-imx_udc.c

@@ -6,8 +6,8 @@
  * the terms of the GNU General Public License version 2 as published by the
  * the terms of the GNU General Public License version 2 as published by the
  * Free Software Foundation.
  * Free Software Foundation.
  */
  */
-#include <mach/hardware.h>
-#include <mach/devices-common.h>
+#include "../hardware.h"
+#include "devices-common.h"
 
 
 #define imx_imx_udc_data_entry_single(soc, _size)			\
 #define imx_imx_udc_data_entry_single(soc, _size)			\
 	{								\
 	{								\

+ 3 - 2
arch/arm/plat-mxc/devices/platform-imxdi_rtc.c → arch/arm/mach-imx/devices/platform-imxdi_rtc.c

@@ -7,8 +7,9 @@
  * Free Software Foundation.
  * Free Software Foundation.
  */
  */
 #include <asm/sizes.h>
 #include <asm/sizes.h>
-#include <mach/hardware.h>
-#include <mach/devices-common.h>
+
+#include "../hardware.h"
+#include "devices-common.h"
 
 
 #define imx_imxdi_rtc_data_entry_single(soc)				\
 #define imx_imxdi_rtc_data_entry_single(soc)				\
 	{								\
 	{								\

+ 3 - 2
arch/arm/plat-mxc/devices/platform-ipu-core.c → arch/arm/mach-imx/devices/platform-ipu-core.c

@@ -7,8 +7,9 @@
  * Free Software Foundation.
  * Free Software Foundation.
  */
  */
 #include <linux/dma-mapping.h>
 #include <linux/dma-mapping.h>
-#include <mach/hardware.h>
-#include <mach/devices-common.h>
+
+#include "../hardware.h"
+#include "devices-common.h"
 
 
 #define imx_ipu_core_entry_single(soc)					\
 #define imx_ipu_core_entry_single(soc)					\
 {									\
 {									\

+ 2 - 2
arch/arm/plat-mxc/devices/platform-mx1-camera.c → arch/arm/mach-imx/devices/platform-mx1-camera.c

@@ -6,8 +6,8 @@
  * the terms of the GNU General Public License version 2 as published by the
  * the terms of the GNU General Public License version 2 as published by the
  * Free Software Foundation.
  * Free Software Foundation.
  */
  */
-#include <mach/hardware.h>
-#include <mach/devices-common.h>
+#include "../hardware.h"
+#include "devices-common.h"
 
 
 #define imx_mx1_camera_data_entry_single(soc, _size)			\
 #define imx_mx1_camera_data_entry_single(soc, _size)			\
 	{								\
 	{								\

+ 9 - 7
arch/arm/plat-mxc/devices/platform-mx2-camera.c → arch/arm/mach-imx/devices/platform-mx2-camera.c

@@ -6,17 +6,19 @@
  * the terms of the GNU General Public License version 2 as published by the
  * the terms of the GNU General Public License version 2 as published by the
  * Free Software Foundation.
  * Free Software Foundation.
  */
  */
-#include <mach/hardware.h>
-#include <mach/devices-common.h>
+#include "../hardware.h"
+#include "devices-common.h"
 
 
-#define imx_mx2_camera_data_entry_single(soc)				\
+#define imx_mx2_camera_data_entry_single(soc, _devid)			\
 	{								\
 	{								\
+		.devid = _devid,					\
 		.iobasecsi = soc ## _CSI_BASE_ADDR,			\
 		.iobasecsi = soc ## _CSI_BASE_ADDR,			\
 		.iosizecsi = SZ_4K,					\
 		.iosizecsi = SZ_4K,					\
 		.irqcsi = soc ## _INT_CSI,				\
 		.irqcsi = soc ## _INT_CSI,				\
 	}
 	}
-#define imx_mx2_camera_data_entry_single_emma(soc)			\
+#define imx_mx2_camera_data_entry_single_emma(soc, _devid)		\
 	{								\
 	{								\
+		.devid = _devid,					\
 		.iobasecsi = soc ## _CSI_BASE_ADDR,			\
 		.iobasecsi = soc ## _CSI_BASE_ADDR,			\
 		.iosizecsi = SZ_32,					\
 		.iosizecsi = SZ_32,					\
 		.irqcsi = soc ## _INT_CSI,				\
 		.irqcsi = soc ## _INT_CSI,				\
@@ -27,12 +29,12 @@
 
 
 #ifdef CONFIG_SOC_IMX25
 #ifdef CONFIG_SOC_IMX25
 const struct imx_mx2_camera_data imx25_mx2_camera_data __initconst =
 const struct imx_mx2_camera_data imx25_mx2_camera_data __initconst =
-	imx_mx2_camera_data_entry_single(MX25);
+	imx_mx2_camera_data_entry_single(MX25, "imx25-camera");
 #endif /* ifdef CONFIG_SOC_IMX25 */
 #endif /* ifdef CONFIG_SOC_IMX25 */
 
 
 #ifdef CONFIG_SOC_IMX27
 #ifdef CONFIG_SOC_IMX27
 const struct imx_mx2_camera_data imx27_mx2_camera_data __initconst =
 const struct imx_mx2_camera_data imx27_mx2_camera_data __initconst =
-	imx_mx2_camera_data_entry_single_emma(MX27);
+	imx_mx2_camera_data_entry_single_emma(MX27, "imx27-camera");
 #endif /* ifdef CONFIG_SOC_IMX27 */
 #endif /* ifdef CONFIG_SOC_IMX27 */
 
 
 struct platform_device *__init imx_add_mx2_camera(
 struct platform_device *__init imx_add_mx2_camera(
@@ -58,7 +60,7 @@ struct platform_device *__init imx_add_mx2_camera(
 			.flags = IORESOURCE_IRQ,
 			.flags = IORESOURCE_IRQ,
 		},
 		},
 	};
 	};
-	return imx_add_platform_device_dmamask("mx2-camera", 0,
+	return imx_add_platform_device_dmamask(data->devid, 0,
 			res, data->iobaseemmaprp ? 4 : 2,
 			res, data->iobaseemmaprp ? 4 : 2,
 			pdata, sizeof(*pdata), DMA_BIT_MASK(32));
 			pdata, sizeof(*pdata), DMA_BIT_MASK(32));
 }
 }

+ 3 - 2
arch/arm/plat-mxc/devices/platform-mxc-ehci.c → arch/arm/mach-imx/devices/platform-mxc-ehci.c

@@ -7,8 +7,9 @@
  * Free Software Foundation.
  * Free Software Foundation.
  */
  */
 #include <linux/dma-mapping.h>
 #include <linux/dma-mapping.h>
-#include <mach/hardware.h>
-#include <mach/devices-common.h>
+
+#include "../hardware.h"
+#include "devices-common.h"
 
 
 #define imx_mxc_ehci_data_entry_single(soc, _id, hs)			\
 #define imx_mxc_ehci_data_entry_single(soc, _id, hs)			\
 	{								\
 	{								\

+ 11 - 9
arch/arm/plat-mxc/devices/platform-mxc-mmc.c → arch/arm/mach-imx/devices/platform-mxc-mmc.c

@@ -7,24 +7,26 @@
  * Free Software Foundation.
  * Free Software Foundation.
  */
  */
 #include <linux/dma-mapping.h>
 #include <linux/dma-mapping.h>
-#include <mach/hardware.h>
-#include <mach/devices-common.h>
 
 
-#define imx_mxc_mmc_data_entry_single(soc, _id, _hwid, _size)		\
+#include "../hardware.h"
+#include "devices-common.h"
+
+#define imx_mxc_mmc_data_entry_single(soc, _devid, _id, _hwid, _size)	\
 	{								\
 	{								\
+		.devid = _devid,					\
 		.id = _id,						\
 		.id = _id,						\
 		.iobase = soc ## _SDHC ## _hwid ## _BASE_ADDR,		\
 		.iobase = soc ## _SDHC ## _hwid ## _BASE_ADDR,		\
 		.iosize = _size,					\
 		.iosize = _size,					\
 		.irq = soc ## _INT_SDHC ## _hwid,			\
 		.irq = soc ## _INT_SDHC ## _hwid,			\
 		.dmareq = soc ## _DMA_REQ_SDHC ## _hwid,		\
 		.dmareq = soc ## _DMA_REQ_SDHC ## _hwid,		\
 	}
 	}
-#define imx_mxc_mmc_data_entry(soc, _id, _hwid, _size)			\
-	[_id] = imx_mxc_mmc_data_entry_single(soc, _id, _hwid, _size)
+#define imx_mxc_mmc_data_entry(soc, _devid, _id, _hwid, _size)		\
+	[_id] = imx_mxc_mmc_data_entry_single(soc, _devid, _id, _hwid, _size)
 
 
 #ifdef CONFIG_SOC_IMX21
 #ifdef CONFIG_SOC_IMX21
 const struct imx_mxc_mmc_data imx21_mxc_mmc_data[] __initconst = {
 const struct imx_mxc_mmc_data imx21_mxc_mmc_data[] __initconst = {
 #define imx21_mxc_mmc_data_entry(_id, _hwid)				\
 #define imx21_mxc_mmc_data_entry(_id, _hwid)				\
-	imx_mxc_mmc_data_entry(MX21, _id, _hwid, SZ_4K)
+	imx_mxc_mmc_data_entry(MX21, "imx21-mmc", _id, _hwid, SZ_4K)
 	imx21_mxc_mmc_data_entry(0, 1),
 	imx21_mxc_mmc_data_entry(0, 1),
 	imx21_mxc_mmc_data_entry(1, 2),
 	imx21_mxc_mmc_data_entry(1, 2),
 };
 };
@@ -33,7 +35,7 @@ const struct imx_mxc_mmc_data imx21_mxc_mmc_data[] __initconst = {
 #ifdef CONFIG_SOC_IMX27
 #ifdef CONFIG_SOC_IMX27
 const struct imx_mxc_mmc_data imx27_mxc_mmc_data[] __initconst = {
 const struct imx_mxc_mmc_data imx27_mxc_mmc_data[] __initconst = {
 #define imx27_mxc_mmc_data_entry(_id, _hwid)				\
 #define imx27_mxc_mmc_data_entry(_id, _hwid)				\
-	imx_mxc_mmc_data_entry(MX27, _id, _hwid, SZ_4K)
+	imx_mxc_mmc_data_entry(MX27, "imx21-mmc", _id, _hwid, SZ_4K)
 	imx27_mxc_mmc_data_entry(0, 1),
 	imx27_mxc_mmc_data_entry(0, 1),
 	imx27_mxc_mmc_data_entry(1, 2),
 	imx27_mxc_mmc_data_entry(1, 2),
 };
 };
@@ -42,7 +44,7 @@ const struct imx_mxc_mmc_data imx27_mxc_mmc_data[] __initconst = {
 #ifdef CONFIG_SOC_IMX31
 #ifdef CONFIG_SOC_IMX31
 const struct imx_mxc_mmc_data imx31_mxc_mmc_data[] __initconst = {
 const struct imx_mxc_mmc_data imx31_mxc_mmc_data[] __initconst = {
 #define imx31_mxc_mmc_data_entry(_id, _hwid)				\
 #define imx31_mxc_mmc_data_entry(_id, _hwid)				\
-	imx_mxc_mmc_data_entry(MX31, _id, _hwid, SZ_16K)
+	imx_mxc_mmc_data_entry(MX31, "imx31-mmc", _id, _hwid, SZ_16K)
 	imx31_mxc_mmc_data_entry(0, 1),
 	imx31_mxc_mmc_data_entry(0, 1),
 	imx31_mxc_mmc_data_entry(1, 2),
 	imx31_mxc_mmc_data_entry(1, 2),
 };
 };
@@ -67,7 +69,7 @@ struct platform_device *__init imx_add_mxc_mmc(
 			.flags = IORESOURCE_DMA,
 			.flags = IORESOURCE_DMA,
 		},
 		},
 	};
 	};
-	return imx_add_platform_device_dmamask("mxc-mmc", data->id,
+	return imx_add_platform_device_dmamask(data->devid, data->id,
 			res, ARRAY_SIZE(res),
 			res, ARRAY_SIZE(res),
 			pdata, sizeof(*pdata), DMA_BIT_MASK(32));
 			pdata, sizeof(*pdata), DMA_BIT_MASK(32));
 }
 }

+ 14 - 11
arch/arm/plat-mxc/devices/platform-mxc_nand.c → arch/arm/mach-imx/devices/platform-mxc_nand.c

@@ -7,18 +7,21 @@
  * Free Software Foundation.
  * Free Software Foundation.
  */
  */
 #include <asm/sizes.h>
 #include <asm/sizes.h>
-#include <mach/hardware.h>
-#include <mach/devices-common.h>
 
 
-#define imx_mxc_nand_data_entry_single(soc, _size)			\
+#include "../hardware.h"
+#include "devices-common.h"
+
+#define imx_mxc_nand_data_entry_single(soc, _devid, _size)		\
 	{								\
 	{								\
+		.devid = _devid,					\
 		.iobase = soc ## _NFC_BASE_ADDR,			\
 		.iobase = soc ## _NFC_BASE_ADDR,			\
 		.iosize = _size,					\
 		.iosize = _size,					\
 		.irq = soc ## _INT_NFC					\
 		.irq = soc ## _INT_NFC					\
 	}
 	}
 
 
-#define imx_mxc_nandv3_data_entry_single(soc, _size)			\
+#define imx_mxc_nandv3_data_entry_single(soc, _devid, _size)		\
 	{								\
 	{								\
+		.devid = _devid,					\
 		.id = -1,						\
 		.id = -1,						\
 		.iobase = soc ## _NFC_BASE_ADDR,			\
 		.iobase = soc ## _NFC_BASE_ADDR,			\
 		.iosize = _size,					\
 		.iosize = _size,					\
@@ -28,32 +31,32 @@
 
 
 #ifdef CONFIG_SOC_IMX21
 #ifdef CONFIG_SOC_IMX21
 const struct imx_mxc_nand_data imx21_mxc_nand_data __initconst =
 const struct imx_mxc_nand_data imx21_mxc_nand_data __initconst =
-	imx_mxc_nand_data_entry_single(MX21, SZ_4K);
+	imx_mxc_nand_data_entry_single(MX21, "imx21-nand", SZ_4K);
 #endif /* ifdef CONFIG_SOC_IMX21 */
 #endif /* ifdef CONFIG_SOC_IMX21 */
 
 
 #ifdef CONFIG_SOC_IMX25
 #ifdef CONFIG_SOC_IMX25
 const struct imx_mxc_nand_data imx25_mxc_nand_data __initconst =
 const struct imx_mxc_nand_data imx25_mxc_nand_data __initconst =
-	imx_mxc_nand_data_entry_single(MX25, SZ_8K);
+	imx_mxc_nand_data_entry_single(MX25, "imx25-nand", SZ_8K);
 #endif /* ifdef CONFIG_SOC_IMX25 */
 #endif /* ifdef CONFIG_SOC_IMX25 */
 
 
 #ifdef CONFIG_SOC_IMX27
 #ifdef CONFIG_SOC_IMX27
 const struct imx_mxc_nand_data imx27_mxc_nand_data __initconst =
 const struct imx_mxc_nand_data imx27_mxc_nand_data __initconst =
-	imx_mxc_nand_data_entry_single(MX27, SZ_4K);
+	imx_mxc_nand_data_entry_single(MX27, "imx27-nand", SZ_4K);
 #endif /* ifdef CONFIG_SOC_IMX27 */
 #endif /* ifdef CONFIG_SOC_IMX27 */
 
 
 #ifdef CONFIG_SOC_IMX31
 #ifdef CONFIG_SOC_IMX31
 const struct imx_mxc_nand_data imx31_mxc_nand_data __initconst =
 const struct imx_mxc_nand_data imx31_mxc_nand_data __initconst =
-	imx_mxc_nand_data_entry_single(MX31, SZ_4K);
+	imx_mxc_nand_data_entry_single(MX31, "imx27-nand", SZ_4K);
 #endif
 #endif
 
 
 #ifdef CONFIG_SOC_IMX35
 #ifdef CONFIG_SOC_IMX35
 const struct imx_mxc_nand_data imx35_mxc_nand_data __initconst =
 const struct imx_mxc_nand_data imx35_mxc_nand_data __initconst =
-	imx_mxc_nand_data_entry_single(MX35, SZ_8K);
+	imx_mxc_nand_data_entry_single(MX35, "imx25-nand", SZ_8K);
 #endif
 #endif
 
 
 #ifdef CONFIG_SOC_IMX51
 #ifdef CONFIG_SOC_IMX51
 const struct imx_mxc_nand_data imx51_mxc_nand_data __initconst =
 const struct imx_mxc_nand_data imx51_mxc_nand_data __initconst =
-	imx_mxc_nandv3_data_entry_single(MX51, SZ_16K);
+	imx_mxc_nandv3_data_entry_single(MX51, "imx51-nand", SZ_16K);
 #endif
 #endif
 
 
 struct platform_device *__init imx_add_mxc_nand(
 struct platform_device *__init imx_add_mxc_nand(
@@ -76,7 +79,7 @@ struct platform_device *__init imx_add_mxc_nand(
 			.flags = IORESOURCE_MEM,
 			.flags = IORESOURCE_MEM,
 		},
 		},
 	};
 	};
-	return imx_add_platform_device("mxc_nand", data->id,
+	return imx_add_platform_device(data->devid, data->id,
 			res, ARRAY_SIZE(res) - !data->axibase,
 			res, ARRAY_SIZE(res) - !data->axibase,
 			pdata, sizeof(*pdata));
 			pdata, sizeof(*pdata));
 }
 }

+ 2 - 2
arch/arm/plat-mxc/devices/platform-mxc_pwm.c → arch/arm/mach-imx/devices/platform-mxc_pwm.c

@@ -6,8 +6,8 @@
  * the terms of the GNU General Public License version 2 as published by the
  * the terms of the GNU General Public License version 2 as published by the
  * Free Software Foundation.
  * Free Software Foundation.
  */
  */
-#include <mach/hardware.h>
-#include <mach/devices-common.h>
+#include "../hardware.h"
+#include "devices-common.h"
 
 
 #define imx_mxc_pwm_data_entry_single(soc, _id, _hwid, _size)		\
 #define imx_mxc_pwm_data_entry_single(soc, _id, _hwid, _size)		\
 	{								\
 	{								\

+ 2 - 2
arch/arm/plat-mxc/devices/platform-mxc_rnga.c → arch/arm/mach-imx/devices/platform-mxc_rnga.c

@@ -6,8 +6,8 @@
  * the terms of the GNU General Public License version 2 as published by the
  * the terms of the GNU General Public License version 2 as published by the
  * Free Software Foundation.
  * Free Software Foundation.
  */
  */
-#include <mach/hardware.h>
-#include <mach/devices-common.h>
+#include "../hardware.h"
+#include "devices-common.h"
 
 
 struct imx_mxc_rnga_data {
 struct imx_mxc_rnga_data {
 	resource_size_t iobase;
 	resource_size_t iobase;

+ 7 - 6
arch/arm/plat-mxc/devices/platform-mxc_rtc.c → arch/arm/mach-imx/devices/platform-mxc_rtc.c

@@ -6,23 +6,24 @@
  * the terms of the GNU General Public License version 2 as published by the
  * the terms of the GNU General Public License version 2 as published by the
  * Free Software Foundation.
  * Free Software Foundation.
  */
  */
-#include <mach/hardware.h>
-#include <mach/devices-common.h>
+#include "../hardware.h"
+#include "devices-common.h"
 
 
-#define imx_mxc_rtc_data_entry_single(soc)				\
+#define imx_mxc_rtc_data_entry_single(soc, _devid)			\
 	{								\
 	{								\
+		.devid = _devid,					\
 		.iobase = soc ## _RTC_BASE_ADDR,			\
 		.iobase = soc ## _RTC_BASE_ADDR,			\
 		.irq = soc ## _INT_RTC,					\
 		.irq = soc ## _INT_RTC,					\
 	}
 	}
 
 
 #ifdef CONFIG_SOC_IMX31
 #ifdef CONFIG_SOC_IMX31
 const struct imx_mxc_rtc_data imx31_mxc_rtc_data __initconst =
 const struct imx_mxc_rtc_data imx31_mxc_rtc_data __initconst =
-	imx_mxc_rtc_data_entry_single(MX31);
+	imx_mxc_rtc_data_entry_single(MX31, "imx21-rtc");
 #endif /* ifdef CONFIG_SOC_IMX31 */
 #endif /* ifdef CONFIG_SOC_IMX31 */
 
 
 #ifdef CONFIG_SOC_IMX35
 #ifdef CONFIG_SOC_IMX35
 const struct imx_mxc_rtc_data imx35_mxc_rtc_data __initconst =
 const struct imx_mxc_rtc_data imx35_mxc_rtc_data __initconst =
-	imx_mxc_rtc_data_entry_single(MX35);
+	imx_mxc_rtc_data_entry_single(MX35, "imx21-rtc");
 #endif /* ifdef CONFIG_SOC_IMX35 */
 #endif /* ifdef CONFIG_SOC_IMX35 */
 
 
 struct platform_device *__init imx_add_mxc_rtc(
 struct platform_device *__init imx_add_mxc_rtc(
@@ -40,6 +41,6 @@ struct platform_device *__init imx_add_mxc_rtc(
 		},
 		},
 	};
 	};
 
 
-	return imx_add_platform_device("mxc_rtc", -1,
+	return imx_add_platform_device(data->devid, -1,
 			res, ARRAY_SIZE(res), NULL, 0);
 			res, ARRAY_SIZE(res), NULL, 0);
 }
 }

+ 2 - 2
arch/arm/plat-mxc/devices/platform-mxc_w1.c → arch/arm/mach-imx/devices/platform-mxc_w1.c

@@ -6,8 +6,8 @@
  * the terms of the GNU General Public License version 2 as published by the
  * the terms of the GNU General Public License version 2 as published by the
  * Free Software Foundation.
  * Free Software Foundation.
  */
  */
-#include <mach/hardware.h>
-#include <mach/devices-common.h>
+#include "../hardware.h"
+#include "devices-common.h"
 
 
 #define imx_mxc_w1_data_entry_single(soc)				\
 #define imx_mxc_w1_data_entry_single(soc)				\
 	{								\
 	{								\

+ 2 - 2
arch/arm/plat-mxc/devices/platform-pata_imx.c → arch/arm/mach-imx/devices/platform-pata_imx.c

@@ -3,8 +3,8 @@
  * the terms of the GNU General Public License version 2 as published by the
  * the terms of the GNU General Public License version 2 as published by the
  * Free Software Foundation.
  * Free Software Foundation.
  */
  */
-#include <mach/hardware.h>
-#include <mach/devices-common.h>
+#include "../hardware.h"
+#include "devices-common.h"
 
 
 #define imx_pata_imx_data_entry_single(soc, _size)			\
 #define imx_pata_imx_data_entry_single(soc, _size)			\
 	{								\
 	{								\

+ 3 - 2
arch/arm/plat-mxc/devices/platform-sdhci-esdhc-imx.c → arch/arm/mach-imx/devices/platform-sdhci-esdhc-imx.c

@@ -6,10 +6,11 @@
  * Free Software Foundation.
  * Free Software Foundation.
  */
  */
 
 
-#include <mach/hardware.h>
-#include <mach/devices-common.h>
 #include <linux/platform_data/mmc-esdhc-imx.h>
 #include <linux/platform_data/mmc-esdhc-imx.h>
 
 
+#include "../hardware.h"
+#include "devices-common.h"
+
 #define imx_sdhci_esdhc_imx_data_entry_single(soc, _devid, _id, hwid) \
 #define imx_sdhci_esdhc_imx_data_entry_single(soc, _devid, _id, hwid) \
 	{								\
 	{								\
 		.devid = _devid,					\
 		.devid = _devid,					\

+ 2 - 2
arch/arm/plat-mxc/devices/platform-spi_imx.c → arch/arm/mach-imx/devices/platform-spi_imx.c

@@ -6,8 +6,8 @@
  * the terms of the GNU General Public License version 2 as published by the
  * the terms of the GNU General Public License version 2 as published by the
  * Free Software Foundation.
  * Free Software Foundation.
  */
  */
-#include <mach/hardware.h>
-#include <mach/devices-common.h>
+#include "../hardware.h"
+#include "devices-common.h"
 
 
 #define imx_spi_imx_data_entry_single(soc, type, _devid, _id, hwid, _size) \
 #define imx_spi_imx_data_entry_single(soc, type, _devid, _id, hwid, _size) \
 	{								\
 	{								\

+ 2 - 2
arch/arm/mach-imx/ehci-imx25.c

@@ -15,10 +15,10 @@
 
 
 #include <linux/platform_device.h>
 #include <linux/platform_device.h>
 #include <linux/io.h>
 #include <linux/io.h>
-
-#include <mach/hardware.h>
 #include <linux/platform_data/usb-ehci-mxc.h>
 #include <linux/platform_data/usb-ehci-mxc.h>
 
 
+#include "hardware.h"
+
 #define USBCTRL_OTGBASE_OFFSET	0x600
 #define USBCTRL_OTGBASE_OFFSET	0x600
 
 
 #define MX25_OTG_SIC_SHIFT	29
 #define MX25_OTG_SIC_SHIFT	29

+ 2 - 2
arch/arm/mach-imx/ehci-imx27.c

@@ -15,10 +15,10 @@
 
 
 #include <linux/platform_device.h>
 #include <linux/platform_device.h>
 #include <linux/io.h>
 #include <linux/io.h>
-
-#include <mach/hardware.h>
 #include <linux/platform_data/usb-ehci-mxc.h>
 #include <linux/platform_data/usb-ehci-mxc.h>
 
 
+#include "hardware.h"
+
 #define USBCTRL_OTGBASE_OFFSET	0x600
 #define USBCTRL_OTGBASE_OFFSET	0x600
 
 
 #define MX27_OTG_SIC_SHIFT	29
 #define MX27_OTG_SIC_SHIFT	29

+ 2 - 2
arch/arm/mach-imx/ehci-imx31.c

@@ -15,10 +15,10 @@
 
 
 #include <linux/platform_device.h>
 #include <linux/platform_device.h>
 #include <linux/io.h>
 #include <linux/io.h>
-
-#include <mach/hardware.h>
 #include <linux/platform_data/usb-ehci-mxc.h>
 #include <linux/platform_data/usb-ehci-mxc.h>
 
 
+#include "hardware.h"
+
 #define USBCTRL_OTGBASE_OFFSET	0x600
 #define USBCTRL_OTGBASE_OFFSET	0x600
 
 
 #define MX31_OTG_SIC_SHIFT	29
 #define MX31_OTG_SIC_SHIFT	29

+ 2 - 2
arch/arm/mach-imx/ehci-imx35.c

@@ -15,10 +15,10 @@
 
 
 #include <linux/platform_device.h>
 #include <linux/platform_device.h>
 #include <linux/io.h>
 #include <linux/io.h>
-
-#include <mach/hardware.h>
 #include <linux/platform_data/usb-ehci-mxc.h>
 #include <linux/platform_data/usb-ehci-mxc.h>
 
 
+#include "hardware.h"
+
 #define USBCTRL_OTGBASE_OFFSET	0x600
 #define USBCTRL_OTGBASE_OFFSET	0x600
 
 
 #define MX35_OTG_SIC_SHIFT	29
 #define MX35_OTG_SIC_SHIFT	29

+ 2 - 2
arch/arm/mach-imx/ehci-imx5.c

@@ -15,10 +15,10 @@
 
 
 #include <linux/platform_device.h>
 #include <linux/platform_device.h>
 #include <linux/io.h>
 #include <linux/io.h>
-
-#include <mach/hardware.h>
 #include <linux/platform_data/usb-ehci-mxc.h>
 #include <linux/platform_data/usb-ehci-mxc.h>
 
 
+#include "hardware.h"
+
 #define MXC_OTG_OFFSET			0
 #define MXC_OTG_OFFSET			0
 #define MXC_H1_OFFSET			0x200
 #define MXC_H1_OFFSET			0x200
 #define MXC_H2_OFFSET			0x400
 #define MXC_H2_OFFSET			0x400

+ 3 - 3
arch/arm/plat-mxc/epit.c → arch/arm/mach-imx/epit.c

@@ -51,10 +51,10 @@
 #include <linux/clockchips.h>
 #include <linux/clockchips.h>
 #include <linux/clk.h>
 #include <linux/clk.h>
 #include <linux/err.h>
 #include <linux/err.h>
-
-#include <mach/hardware.h>
 #include <asm/mach/time.h>
 #include <asm/mach/time.h>
-#include <mach/common.h>
+
+#include "common.h"
+#include "hardware.h"
 
 
 static struct clock_event_device clockevent_epit;
 static struct clock_event_device clockevent_epit;
 static enum clock_event_mode clockevent_mode = CLOCK_EVT_MODE_UNUSED;
 static enum clock_event_mode clockevent_mode = CLOCK_EVT_MODE_UNUSED;

+ 0 - 0
arch/arm/plat-mxc/include/mach/eukrea-baseboards.h → arch/arm/mach-imx/eukrea-baseboards.h


+ 3 - 4
arch/arm/mach-imx/eukrea_mbimx27-baseboard.c

@@ -29,11 +29,10 @@
 
 
 #include <asm/mach/arch.h>
 #include <asm/mach/arch.h>
 
 
-#include <mach/common.h>
-#include <mach/iomux-mx27.h>
-#include <mach/hardware.h>
-
+#include "common.h"
 #include "devices-imx27.h"
 #include "devices-imx27.h"
+#include "hardware.h"
+#include "iomux-mx27.h"
 
 
 static const int eukrea_mbimx27_pins[] __initconst = {
 static const int eukrea_mbimx27_pins[] __initconst = {
 	/* UART2 */
 	/* UART2 */

+ 4 - 4
arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c

@@ -26,14 +26,14 @@
 #include <linux/spi/spi.h>
 #include <linux/spi/spi.h>
 #include <video/platform_lcd.h>
 #include <video/platform_lcd.h>
 
 
-#include <mach/hardware.h>
-#include <mach/iomux-mx25.h>
-#include <mach/common.h>
 #include <asm/mach-types.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/arch.h>
-#include <mach/mx25.h>
 
 
+#include "common.h"
 #include "devices-imx25.h"
 #include "devices-imx25.h"
+#include "hardware.h"
+#include "iomux-mx25.h"
+#include "mx25.h"
 
 
 static iomux_v3_cfg_t eukrea_mbimxsd_pads[] = {
 static iomux_v3_cfg_t eukrea_mbimxsd_pads[] = {
 	/* LCD */
 	/* LCD */

+ 3 - 4
arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c

@@ -36,11 +36,10 @@
 #include <asm/mach/time.h>
 #include <asm/mach/time.h>
 #include <asm/mach/map.h>
 #include <asm/mach/map.h>
 
 
-#include <mach/hardware.h>
-#include <mach/common.h>
-#include <mach/iomux-mx35.h>
-
+#include "common.h"
 #include "devices-imx35.h"
 #include "devices-imx35.h"
+#include "hardware.h"
+#include "iomux-mx35.h"
 
 
 static const struct fb_videomode fb_modedb[] = {
 static const struct fb_videomode fb_modedb[] = {
 	{
 	{

+ 3 - 4
arch/arm/mach-imx/eukrea_mbimxsd51-baseboard.c

@@ -36,11 +36,10 @@
 #include <asm/mach/time.h>
 #include <asm/mach/time.h>
 #include <asm/mach/map.h>
 #include <asm/mach/map.h>
 
 
-#include <mach/hardware.h>
-#include <mach/common.h>
-#include <mach/iomux-mx51.h>
-
+#include "common.h"
 #include "devices-imx51.h"
 #include "devices-imx51.h"
+#include "hardware.h"
+#include "iomux-mx51.h"
 
 
 static iomux_v3_cfg_t eukrea_mbimxsd51_pads[] = {
 static iomux_v3_cfg_t eukrea_mbimxsd51_pads[] = {
 	/* LED */
 	/* LED */

+ 13 - 13
arch/arm/plat-mxc/include/mach/hardware.h → arch/arm/mach-imx/hardware.h

@@ -105,20 +105,20 @@
 
 
 #define IMX_IO_ADDRESS(x)	IOMEM(IMX_IO_P2V(x))
 #define IMX_IO_ADDRESS(x)	IOMEM(IMX_IO_P2V(x))
 
 
-#include <mach/mxc.h>
+#include "mxc.h"
 
 
-#include <mach/mx6q.h>
-#include <mach/mx50.h>
-#include <mach/mx51.h>
-#include <mach/mx53.h>
-#include <mach/mx3x.h>
-#include <mach/mx31.h>
-#include <mach/mx35.h>
-#include <mach/mx2x.h>
-#include <mach/mx21.h>
-#include <mach/mx27.h>
-#include <mach/mx1.h>
-#include <mach/mx25.h>
+#include "mx6q.h"
+#include "mx50.h"
+#include "mx51.h"
+#include "mx53.h"
+#include "mx3x.h"
+#include "mx31.h"
+#include "mx35.h"
+#include "mx2x.h"
+#include "mx21.h"
+#include "mx27.h"
+#include "mx1.h"
+#include "mx25.h"
 
 
 #define imx_map_entry(soc, name, _type)	{				\
 #define imx_map_entry(soc, name, _type)	{				\
 	.virtual = soc ## _IO_P2V(soc ## _ ## name ## _BASE_ADDR),	\
 	.virtual = soc ## _IO_P2V(soc ## _ ## name ## _BASE_ADDR),	\

+ 2 - 1
arch/arm/mach-imx/hotplug.c

@@ -13,7 +13,8 @@
 #include <linux/errno.h>
 #include <linux/errno.h>
 #include <asm/cacheflush.h>
 #include <asm/cacheflush.h>
 #include <asm/cp15.h>
 #include <asm/cp15.h>
-#include <mach/common.h>
+
+#include "common.h"
 
 
 static inline void cpu_enter_lowpower(void)
 static inline void cpu_enter_lowpower(void)
 {
 {

+ 0 - 0
arch/arm/plat-mxc/include/mach/iim.h → arch/arm/mach-imx/iim.h


+ 6 - 5
arch/arm/mach-imx/imx27-dt.c

@@ -14,21 +14,22 @@
 #include <linux/of_platform.h>
 #include <linux/of_platform.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/time.h>
 #include <asm/mach/time.h>
-#include <mach/common.h>
-#include <mach/mx27.h>
+
+#include "common.h"
+#include "mx27.h"
 
 
 static const struct of_dev_auxdata imx27_auxdata_lookup[] __initconst = {
 static const struct of_dev_auxdata imx27_auxdata_lookup[] __initconst = {
 	OF_DEV_AUXDATA("fsl,imx27-uart", MX27_UART1_BASE_ADDR, "imx21-uart.0", NULL),
 	OF_DEV_AUXDATA("fsl,imx27-uart", MX27_UART1_BASE_ADDR, "imx21-uart.0", NULL),
 	OF_DEV_AUXDATA("fsl,imx27-uart", MX27_UART2_BASE_ADDR, "imx21-uart.1", NULL),
 	OF_DEV_AUXDATA("fsl,imx27-uart", MX27_UART2_BASE_ADDR, "imx21-uart.1", NULL),
 	OF_DEV_AUXDATA("fsl,imx27-uart", MX27_UART3_BASE_ADDR, "imx21-uart.2", NULL),
 	OF_DEV_AUXDATA("fsl,imx27-uart", MX27_UART3_BASE_ADDR, "imx21-uart.2", NULL),
 	OF_DEV_AUXDATA("fsl,imx27-fec", MX27_FEC_BASE_ADDR, "imx27-fec.0", NULL),
 	OF_DEV_AUXDATA("fsl,imx27-fec", MX27_FEC_BASE_ADDR, "imx27-fec.0", NULL),
-	OF_DEV_AUXDATA("fsl,imx27-i2c", MX27_I2C1_BASE_ADDR, "imx-i2c.0", NULL),
-	OF_DEV_AUXDATA("fsl,imx27-i2c", MX27_I2C2_BASE_ADDR, "imx-i2c.1", NULL),
+	OF_DEV_AUXDATA("fsl,imx27-i2c", MX27_I2C1_BASE_ADDR, "imx21-i2c.0", NULL),
+	OF_DEV_AUXDATA("fsl,imx27-i2c", MX27_I2C2_BASE_ADDR, "imx21-i2c.1", NULL),
 	OF_DEV_AUXDATA("fsl,imx27-cspi", MX27_CSPI1_BASE_ADDR, "imx27-cspi.0", NULL),
 	OF_DEV_AUXDATA("fsl,imx27-cspi", MX27_CSPI1_BASE_ADDR, "imx27-cspi.0", NULL),
 	OF_DEV_AUXDATA("fsl,imx27-cspi", MX27_CSPI2_BASE_ADDR, "imx27-cspi.1", NULL),
 	OF_DEV_AUXDATA("fsl,imx27-cspi", MX27_CSPI2_BASE_ADDR, "imx27-cspi.1", NULL),
 	OF_DEV_AUXDATA("fsl,imx27-cspi", MX27_CSPI3_BASE_ADDR, "imx27-cspi.2", NULL),
 	OF_DEV_AUXDATA("fsl,imx27-cspi", MX27_CSPI3_BASE_ADDR, "imx27-cspi.2", NULL),
 	OF_DEV_AUXDATA("fsl,imx27-wdt", MX27_WDOG_BASE_ADDR, "imx2-wdt.0", NULL),
 	OF_DEV_AUXDATA("fsl,imx27-wdt", MX27_WDOG_BASE_ADDR, "imx2-wdt.0", NULL),
-	OF_DEV_AUXDATA("fsl,imx27-nand", MX27_NFC_BASE_ADDR, "mxc_nand.0", NULL),
+	OF_DEV_AUXDATA("fsl,imx27-nand", MX27_NFC_BASE_ADDR, "imx27-nand.0", NULL),
 	{ /* sentinel */ }
 	{ /* sentinel */ }
 };
 };
 
 

+ 3 - 2
arch/arm/mach-imx/imx31-dt.c

@@ -14,8 +14,9 @@
 #include <linux/of_platform.h>
 #include <linux/of_platform.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/time.h>
 #include <asm/mach/time.h>
-#include <mach/common.h>
-#include <mach/mx31.h>
+
+#include "common.h"
+#include "mx31.h"
 
 
 static const struct of_dev_auxdata imx31_auxdata_lookup[] __initconst = {
 static const struct of_dev_auxdata imx31_auxdata_lookup[] __initconst = {
 	OF_DEV_AUXDATA("fsl,imx31-uart", MX31_UART1_BASE_ADDR,
 	OF_DEV_AUXDATA("fsl,imx31-uart", MX31_UART1_BASE_ADDR,

+ 5 - 4
arch/arm/mach-imx/imx51-dt.c

@@ -15,8 +15,9 @@
 #include <linux/of_platform.h>
 #include <linux/of_platform.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/time.h>
 #include <asm/mach/time.h>
-#include <mach/common.h>
-#include <mach/mx51.h>
+
+#include "common.h"
+#include "mx51.h"
 
 
 /*
 /*
  * Lookup table for attaching a specific name and platform_data pointer to
  * 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 = {
 	OF_DEV_AUXDATA("fsl,imx51-ecspi", MX51_ECSPI1_BASE_ADDR, "imx51-ecspi.0", NULL),
 	OF_DEV_AUXDATA("fsl,imx51-ecspi", MX51_ECSPI1_BASE_ADDR, "imx51-ecspi.0", NULL),
 	OF_DEV_AUXDATA("fsl,imx51-ecspi", MX51_ECSPI2_BASE_ADDR, "imx51-ecspi.1", NULL),
 	OF_DEV_AUXDATA("fsl,imx51-ecspi", MX51_ECSPI2_BASE_ADDR, "imx51-ecspi.1", NULL),
 	OF_DEV_AUXDATA("fsl,imx51-cspi", MX51_CSPI_BASE_ADDR, "imx35-cspi.0", NULL),
 	OF_DEV_AUXDATA("fsl,imx51-cspi", MX51_CSPI_BASE_ADDR, "imx35-cspi.0", NULL),
-	OF_DEV_AUXDATA("fsl,imx51-i2c", MX51_I2C1_BASE_ADDR, "imx-i2c.0", NULL),
-	OF_DEV_AUXDATA("fsl,imx51-i2c", MX51_I2C2_BASE_ADDR, "imx-i2c.1", NULL),
+	OF_DEV_AUXDATA("fsl,imx51-i2c", MX51_I2C1_BASE_ADDR, "imx21-i2c.0", NULL),
+	OF_DEV_AUXDATA("fsl,imx51-i2c", MX51_I2C2_BASE_ADDR, "imx21-i2c.1", NULL),
 	OF_DEV_AUXDATA("fsl,imx51-sdma", MX51_SDMA_BASE_ADDR, "imx35-sdma", NULL),
 	OF_DEV_AUXDATA("fsl,imx51-sdma", MX51_SDMA_BASE_ADDR, "imx35-sdma", NULL),
 	OF_DEV_AUXDATA("fsl,imx51-wdt", MX51_WDOG1_BASE_ADDR, "imx2-wdt.0", NULL),
 	OF_DEV_AUXDATA("fsl,imx51-wdt", MX51_WDOG1_BASE_ADDR, "imx2-wdt.0", NULL),
 	{ /* sentinel */ }
 	{ /* sentinel */ }

部分文件因为文件数量过多而无法显示