ARM: imx: move platform device code into mach-imx
authorShawn Guo <shawn.guo@linaro.org>
Thu, 13 Sep 2012 07:51:15 +0000 (15:51 +0800)
committerShawn Guo <shawn.guo@linaro.org>
Mon, 15 Oct 2012 01:18:15 +0000 (09:18 +0800)
It moves platform device code from plat-mxc into mach-imx.  Along with
that, header devices-common.h gets moved from plat-mxc/include/mach/
into mach-imx/devices/.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
86 files changed:
arch/arm/mach-imx/Kconfig
arch/arm/mach-imx/Makefile
arch/arm/mach-imx/devices-imx1.h
arch/arm/mach-imx/devices-imx21.h
arch/arm/mach-imx/devices-imx25.h
arch/arm/mach-imx/devices-imx27.h
arch/arm/mach-imx/devices-imx31.h
arch/arm/mach-imx/devices-imx35.h
arch/arm/mach-imx/devices-imx50.h
arch/arm/mach-imx/devices-imx51.h
arch/arm/mach-imx/devices/Kconfig [new file with mode: 0644]
arch/arm/mach-imx/devices/Makefile [new file with mode: 0644]
arch/arm/mach-imx/devices/devices-common.h [new file with mode: 0644]
arch/arm/mach-imx/devices/devices.c [new file with mode: 0644]
arch/arm/mach-imx/devices/platform-ahci-imx.c [new file with mode: 0644]
arch/arm/mach-imx/devices/platform-fec.c [new file with mode: 0644]
arch/arm/mach-imx/devices/platform-flexcan.c [new file with mode: 0644]
arch/arm/mach-imx/devices/platform-fsl-usb2-udc.c [new file with mode: 0644]
arch/arm/mach-imx/devices/platform-gpio-mxc.c [new file with mode: 0644]
arch/arm/mach-imx/devices/platform-gpio_keys.c [new file with mode: 0644]
arch/arm/mach-imx/devices/platform-imx-dma.c [new file with mode: 0644]
arch/arm/mach-imx/devices/platform-imx-fb.c [new file with mode: 0644]
arch/arm/mach-imx/devices/platform-imx-i2c.c [new file with mode: 0644]
arch/arm/mach-imx/devices/platform-imx-keypad.c [new file with mode: 0644]
arch/arm/mach-imx/devices/platform-imx-ssi.c [new file with mode: 0644]
arch/arm/mach-imx/devices/platform-imx-uart.c [new file with mode: 0644]
arch/arm/mach-imx/devices/platform-imx2-wdt.c [new file with mode: 0644]
arch/arm/mach-imx/devices/platform-imx21-hcd.c [new file with mode: 0644]
arch/arm/mach-imx/devices/platform-imx27-coda.c [new file with mode: 0644]
arch/arm/mach-imx/devices/platform-imx_udc.c [new file with mode: 0644]
arch/arm/mach-imx/devices/platform-imxdi_rtc.c [new file with mode: 0644]
arch/arm/mach-imx/devices/platform-ipu-core.c [new file with mode: 0644]
arch/arm/mach-imx/devices/platform-mx1-camera.c [new file with mode: 0644]
arch/arm/mach-imx/devices/platform-mx2-camera.c [new file with mode: 0644]
arch/arm/mach-imx/devices/platform-mxc-ehci.c [new file with mode: 0644]
arch/arm/mach-imx/devices/platform-mxc-mmc.c [new file with mode: 0644]
arch/arm/mach-imx/devices/platform-mxc_nand.c [new file with mode: 0644]
arch/arm/mach-imx/devices/platform-mxc_pwm.c [new file with mode: 0644]
arch/arm/mach-imx/devices/platform-mxc_rnga.c [new file with mode: 0644]
arch/arm/mach-imx/devices/platform-mxc_rtc.c [new file with mode: 0644]
arch/arm/mach-imx/devices/platform-mxc_w1.c [new file with mode: 0644]
arch/arm/mach-imx/devices/platform-pata_imx.c [new file with mode: 0644]
arch/arm/mach-imx/devices/platform-sdhci-esdhc-imx.c [new file with mode: 0644]
arch/arm/mach-imx/devices/platform-spi_imx.c [new file with mode: 0644]
arch/arm/mach-imx/mm-imx21.c
arch/arm/mach-imx/mm-imx25.c
arch/arm/mach-imx/mm-imx27.c
arch/arm/mach-imx/mm-imx3.c
arch/arm/mach-imx/mm-imx5.c
arch/arm/mach-imx/pm-imx3.c
arch/arm/plat-mxc/Kconfig
arch/arm/plat-mxc/Makefile
arch/arm/plat-mxc/devices.c [deleted file]
arch/arm/plat-mxc/devices/Kconfig [deleted file]
arch/arm/plat-mxc/devices/Makefile [deleted file]
arch/arm/plat-mxc/devices/platform-ahci-imx.c [deleted file]
arch/arm/plat-mxc/devices/platform-fec.c [deleted file]
arch/arm/plat-mxc/devices/platform-flexcan.c [deleted file]
arch/arm/plat-mxc/devices/platform-fsl-usb2-udc.c [deleted file]
arch/arm/plat-mxc/devices/platform-gpio-mxc.c [deleted file]
arch/arm/plat-mxc/devices/platform-gpio_keys.c [deleted file]
arch/arm/plat-mxc/devices/platform-imx-dma.c [deleted file]
arch/arm/plat-mxc/devices/platform-imx-fb.c [deleted file]
arch/arm/plat-mxc/devices/platform-imx-i2c.c [deleted file]
arch/arm/plat-mxc/devices/platform-imx-keypad.c [deleted file]
arch/arm/plat-mxc/devices/platform-imx-ssi.c [deleted file]
arch/arm/plat-mxc/devices/platform-imx-uart.c [deleted file]
arch/arm/plat-mxc/devices/platform-imx2-wdt.c [deleted file]
arch/arm/plat-mxc/devices/platform-imx21-hcd.c [deleted file]
arch/arm/plat-mxc/devices/platform-imx27-coda.c [deleted file]
arch/arm/plat-mxc/devices/platform-imx_udc.c [deleted file]
arch/arm/plat-mxc/devices/platform-imxdi_rtc.c [deleted file]
arch/arm/plat-mxc/devices/platform-ipu-core.c [deleted file]
arch/arm/plat-mxc/devices/platform-mx1-camera.c [deleted file]
arch/arm/plat-mxc/devices/platform-mx2-camera.c [deleted file]
arch/arm/plat-mxc/devices/platform-mxc-ehci.c [deleted file]
arch/arm/plat-mxc/devices/platform-mxc-mmc.c [deleted file]
arch/arm/plat-mxc/devices/platform-mxc_nand.c [deleted file]
arch/arm/plat-mxc/devices/platform-mxc_pwm.c [deleted file]
arch/arm/plat-mxc/devices/platform-mxc_rnga.c [deleted file]
arch/arm/plat-mxc/devices/platform-mxc_rtc.c [deleted file]
arch/arm/plat-mxc/devices/platform-mxc_w1.c [deleted file]
arch/arm/plat-mxc/devices/platform-pata_imx.c [deleted file]
arch/arm/plat-mxc/devices/platform-sdhci-esdhc-imx.c [deleted file]
arch/arm/plat-mxc/devices/platform-spi_imx.c [deleted file]
arch/arm/plat-mxc/include/mach/devices-common.h [deleted file]

index f10282ca796cdbb22187d98cb8339c9175acdf63..dffa273b124e41dbee78ea1530bf97b09881a107 100644 (file)
@@ -772,3 +772,5 @@ config SOC_IMX6Q
          This enables support for Freescale i.MX6 Quad processor.
 
 endif
+
+source "arch/arm/mach-imx/devices/Kconfig"
index 5025a9dcf5d92ee8a82b472b1cff0009fec085d5..257893e6db930207e68084754dd21391bf98c431 100644 (file)
@@ -92,3 +92,5 @@ obj-$(CONFIG_MACH_MX50_RDP) += mach-mx50_rdp.o
 
 obj-$(CONFIG_MACH_IMX51_DT) += imx51-dt.o
 obj-$(CONFIG_SOC_IMX53) += mach-imx53.o
+
+obj-y += devices/
index eb2603b59b5a82496aafb04410eab2c23582c29b..f9b5afc6bcd153028fb0dc0587c3d895ec81b602 100644 (file)
@@ -6,7 +6,7 @@
  * the terms of the GNU General Public License version 2 as published by the
  * Free Software Foundation.
  */
-#include <mach/devices-common.h>
+#include "devices/devices-common.h"
 
 extern const struct imx_imx_fb_data imx1_imx_fb_data;
 #define imx1_add_imx_fb(pdata) \
index e2014daa52b4bcf8d74df6cb5437c708594bb2ae..bd939328015901e3315a528653b7afeffd649679 100644 (file)
@@ -6,7 +6,7 @@
  * the terms of the GNU General Public License version 2 as published by the
  * Free Software Foundation.
  */
-#include <mach/devices-common.h>
+#include "devices/devices-common.h"
 
 extern const struct imx_imx21_hcd_data imx21_imx21_hcd_data;
 #define imx21_add_imx21_hcd(pdata)     \
index 29e9706c24c2585495188a83d0c3e25efe6e52df..0d2922bc575caa862a99b60c621d24da6d3e14ca 100644 (file)
@@ -6,7 +6,7 @@
  * the terms of the GNU General Public License version 2 as published by the
  * Free Software Foundation.
  */
-#include <mach/devices-common.h>
+#include "devices/devices-common.h"
 
 extern const struct imx_fec_data imx25_fec_data;
 #define imx25_add_fec(pdata)   \
index e2250430b7dd2ad4de57352a898df15750ea1997..8a1ad7972d4c0843a096dcf7d21810737b16075b 100644 (file)
@@ -6,7 +6,7 @@
  * the terms of the GNU General Public License version 2 as published by the
  * Free Software Foundation.
  */
-#include <mach/devices-common.h>
+#include "devices/devices-common.h"
 
 extern const struct imx_fec_data imx27_fec_data;
 #define imx27_add_fec(pdata)   \
index 20565f90e82c32f98faff94d77afb768d69c5c99..e8d1611bbc8e325f29bf897cea68ffcc9c253aa8 100644 (file)
@@ -6,7 +6,7 @@
  * the terms of the GNU General Public License version 2 as published by the
  * Free Software Foundation.
  */
-#include <mach/devices-common.h>
+#include "devices/devices-common.h"
 
 extern const struct imx_fsl_usb2_udc_data imx31_fsl_usb2_udc_data;
 #define imx31_add_fsl_usb2_udc(pdata)  \
index e45b5cbaac967f10936ed509465f2045cdc3243b..e2675f1b141c0a0baedd8e5db9daa252a7541827 100644 (file)
@@ -6,7 +6,7 @@
  * the terms of the GNU General Public License version 2 as published by the
  * Free Software Foundation.
  */
-#include <mach/devices-common.h>
+#include "devices/devices-common.h"
 
 extern const struct imx_fec_data imx35_fec_data;
 #define imx35_add_fec(pdata)   \
index 1615a6ab40d915efe286982491cab621ddf0ef76..2c290391f298653198784669e57fd48f72366922 100644 (file)
@@ -18,7 +18,7 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-#include <mach/devices-common.h>
+#include "devices/devices-common.h"
 
 extern const struct imx_imx_uart_1irq_data imx50_imx_uart_data[];
 #define imx50_add_imx_uart(id, pdata)  \
index f448104837e2f2bf497bcbbc0eef5796041b3f5f..deee5baee88cf636627acb1c923b029e9d58b032 100644 (file)
@@ -6,7 +6,7 @@
  * the terms of the GNU General Public License version 2 as published by the
  * Free Software Foundation.
  */
-#include <mach/devices-common.h>
+#include "devices/devices-common.h"
 
 extern const struct imx_fec_data imx51_fec_data;
 #define imx51_add_fec(pdata)   \
diff --git a/arch/arm/mach-imx/devices/Kconfig b/arch/arm/mach-imx/devices/Kconfig
new file mode 100644 (file)
index 0000000..a35d984
--- /dev/null
@@ -0,0 +1,89 @@
+config IMX_HAVE_PLATFORM_FEC
+       bool
+       default y if ARCH_MX25 || SOC_IMX27 || SOC_IMX35 || SOC_IMX50 || SOC_IMX51 || SOC_IMX53
+
+config IMX_HAVE_PLATFORM_FLEXCAN
+       bool
+       select HAVE_CAN_FLEXCAN if CAN
+
+config IMX_HAVE_PLATFORM_FSL_USB2_UDC
+       bool
+
+config IMX_HAVE_PLATFORM_GPIO_KEYS
+       bool
+       default y if SOC_IMX51
+
+config IMX_HAVE_PLATFORM_IMX21_HCD
+       bool
+
+config IMX_HAVE_PLATFORM_IMX27_CODA
+       bool
+       default y if SOC_IMX27
+
+config IMX_HAVE_PLATFORM_IMX2_WDT
+       bool
+
+config IMX_HAVE_PLATFORM_IMXDI_RTC
+       bool
+
+config IMX_HAVE_PLATFORM_IMX_FB
+       bool
+
+config IMX_HAVE_PLATFORM_IMX_I2C
+       bool
+
+config IMX_HAVE_PLATFORM_IMX_KEYPAD
+       bool
+
+config IMX_HAVE_PLATFORM_PATA_IMX
+       bool
+
+config IMX_HAVE_PLATFORM_IMX_SSI
+       bool
+
+config IMX_HAVE_PLATFORM_IMX_UART
+       bool
+
+config IMX_HAVE_PLATFORM_IMX_UDC
+       bool
+
+config IMX_HAVE_PLATFORM_IPU_CORE
+       bool
+
+config IMX_HAVE_PLATFORM_MX1_CAMERA
+       bool
+
+config IMX_HAVE_PLATFORM_MX2_CAMERA
+       bool
+
+config IMX_HAVE_PLATFORM_MXC_EHCI
+       bool
+
+config IMX_HAVE_PLATFORM_MXC_MMC
+       bool
+
+config IMX_HAVE_PLATFORM_MXC_NAND
+       bool
+
+config IMX_HAVE_PLATFORM_MXC_PWM
+       bool
+
+config IMX_HAVE_PLATFORM_MXC_RNGA
+       bool
+       select ARCH_HAS_RNGA
+
+config IMX_HAVE_PLATFORM_MXC_RTC
+       bool
+
+config IMX_HAVE_PLATFORM_MXC_W1
+       bool
+
+config IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX
+       bool
+
+config IMX_HAVE_PLATFORM_SPI_IMX
+       bool
+
+config IMX_HAVE_PLATFORM_AHCI
+       bool
+       default y if ARCH_MX53
diff --git a/arch/arm/mach-imx/devices/Makefile b/arch/arm/mach-imx/devices/Makefile
new file mode 100644 (file)
index 0000000..2abe2a5
--- /dev/null
@@ -0,0 +1,32 @@
+obj-y := devices.o
+
+obj-$(CONFIG_IMX_HAVE_PLATFORM_FEC) += platform-fec.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_GPIO_KEYS) += platform-gpio_keys.o
+obj-y += platform-gpio-mxc.o
+obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX21_HCD) += platform-imx21-hcd.o
+obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX27_CODA) += platform-imx27-coda.o
+obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX2_WDT) += platform-imx2-wdt.o
+obj-$(CONFIG_IMX_HAVE_PLATFORM_IMXDI_RTC) += platform-imxdi_rtc.o
+obj-y += platform-imx-dma.o
+obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_FB) += platform-imx-fb.o
+obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_I2C) += platform-imx-i2c.o
+obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_KEYPAD) += platform-imx-keypad.o
+obj-$(CONFIG_IMX_HAVE_PLATFORM_PATA_IMX) += platform-pata_imx.o
+obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_SSI) += platform-imx-ssi.o
+obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_UART) += platform-imx-uart.o
+obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_UDC) += platform-imx_udc.o
+obj-$(CONFIG_IMX_HAVE_PLATFORM_IPU_CORE) += platform-ipu-core.o
+obj-$(CONFIG_IMX_HAVE_PLATFORM_MX1_CAMERA) += platform-mx1-camera.o
+obj-$(CONFIG_IMX_HAVE_PLATFORM_MX2_CAMERA) += platform-mx2-camera.o
+obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_EHCI) += platform-mxc-ehci.o
+obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_MMC) += platform-mxc-mmc.o
+obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_NAND) += platform-mxc_nand.o
+obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_PWM) += platform-mxc_pwm.o
+obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_RNGA) += platform-mxc_rnga.o
+obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_RTC) += platform-mxc_rtc.o
+obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_W1) += platform-mxc_w1.o
+obj-$(CONFIG_IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX) += platform-sdhci-esdhc-imx.o
+obj-$(CONFIG_IMX_HAVE_PLATFORM_SPI_IMX) +=  platform-spi_imx.o
+obj-$(CONFIG_IMX_HAVE_PLATFORM_AHCI) +=  platform-ahci-imx.o
diff --git a/arch/arm/mach-imx/devices/devices-common.h b/arch/arm/mach-imx/devices/devices-common.h
new file mode 100644 (file)
index 0000000..eaf79d2
--- /dev/null
@@ -0,0 +1,341 @@
+/*
+ * Copyright (C) 2009-2010 Pengutronix
+ * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
+ *
+ * This program is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License version 2 as published by the
+ * Free Software Foundation.
+ */
+#include <linux/kernel.h>
+#include <linux/platform_device.h>
+#include <linux/init.h>
+#include <linux/platform_data/dma-imx-sdma.h>
+
+extern struct device mxc_aips_bus;
+extern struct device mxc_ahb_bus;
+
+static inline struct platform_device *imx_add_platform_device_dmamask(
+               const char *name, int id,
+               const struct resource *res, unsigned int num_resources,
+               const void *data, size_t size_data, u64 dmamask)
+{
+       struct platform_device_info pdevinfo = {
+               .name = name,
+               .id = id,
+               .res = res,
+               .num_res = num_resources,
+               .data = data,
+               .size_data = size_data,
+               .dma_mask = dmamask,
+       };
+       return platform_device_register_full(&pdevinfo);
+}
+
+static inline struct platform_device *imx_add_platform_device(
+               const char *name, int id,
+               const struct resource *res, unsigned int num_resources,
+               const void *data, size_t size_data)
+{
+       return imx_add_platform_device_dmamask(
+                       name, id, res, num_resources, data, size_data, 0);
+}
+
+#include <linux/fec.h>
+struct imx_fec_data {
+       const char *devid;
+       resource_size_t iobase;
+       resource_size_t irq;
+};
+struct platform_device *__init imx_add_fec(
+               const struct imx_fec_data *data,
+               const struct fec_platform_data *pdata);
+
+#include <linux/can/platform/flexcan.h>
+struct imx_flexcan_data {
+       int id;
+       resource_size_t iobase;
+       resource_size_t iosize;
+       resource_size_t irq;
+};
+struct platform_device *__init imx_add_flexcan(
+               const struct imx_flexcan_data *data,
+               const struct flexcan_platform_data *pdata);
+
+#include <linux/fsl_devices.h>
+struct imx_fsl_usb2_udc_data {
+       resource_size_t iobase;
+       resource_size_t irq;
+};
+struct platform_device *__init imx_add_fsl_usb2_udc(
+               const struct imx_fsl_usb2_udc_data *data,
+               const struct fsl_usb2_platform_data *pdata);
+
+#include <linux/gpio_keys.h>
+struct platform_device *__init imx_add_gpio_keys(
+               const struct gpio_keys_platform_data *pdata);
+
+#include <linux/platform_data/usb-mx2.h>
+struct imx_imx21_hcd_data {
+       resource_size_t iobase;
+       resource_size_t irq;
+};
+struct platform_device *__init imx_add_imx21_hcd(
+               const struct imx_imx21_hcd_data *data,
+               const struct mx21_usbh_platform_data *pdata);
+
+struct imx_imx27_coda_data {
+       resource_size_t iobase;
+       resource_size_t iosize;
+       resource_size_t irq;
+};
+struct platform_device *__init imx_add_imx27_coda(
+               const struct imx_imx27_coda_data *data);
+
+struct imx_imx2_wdt_data {
+       int id;
+       resource_size_t iobase;
+       resource_size_t iosize;
+};
+struct platform_device *__init imx_add_imx2_wdt(
+               const struct imx_imx2_wdt_data *data);
+
+struct imx_imxdi_rtc_data {
+       resource_size_t iobase;
+       resource_size_t irq;
+};
+struct platform_device *__init imx_add_imxdi_rtc(
+               const struct imx_imxdi_rtc_data *data);
+
+#include <linux/platform_data/video-imxfb.h>
+struct imx_imx_fb_data {
+       resource_size_t iobase;
+       resource_size_t iosize;
+       resource_size_t irq;
+};
+struct platform_device *__init imx_add_imx_fb(
+               const struct imx_imx_fb_data *data,
+               const struct imx_fb_platform_data *pdata);
+
+#include <linux/platform_data/i2c-imx.h>
+struct imx_imx_i2c_data {
+       int id;
+       resource_size_t iobase;
+       resource_size_t iosize;
+       resource_size_t irq;
+};
+struct platform_device *__init imx_add_imx_i2c(
+               const struct imx_imx_i2c_data *data,
+               const struct imxi2c_platform_data *pdata);
+
+#include <linux/input/matrix_keypad.h>
+struct imx_imx_keypad_data {
+       resource_size_t iobase;
+       resource_size_t iosize;
+       resource_size_t irq;
+};
+struct platform_device *__init imx_add_imx_keypad(
+               const struct imx_imx_keypad_data *data,
+               const struct matrix_keymap_data *pdata);
+
+#include <linux/platform_data/asoc-imx-ssi.h>
+struct imx_imx_ssi_data {
+       int id;
+       resource_size_t iobase;
+       resource_size_t iosize;
+       resource_size_t irq;
+       resource_size_t dmatx0;
+       resource_size_t dmarx0;
+       resource_size_t dmatx1;
+       resource_size_t dmarx1;
+};
+struct platform_device *__init imx_add_imx_ssi(
+               const struct imx_imx_ssi_data *data,
+               const struct imx_ssi_platform_data *pdata);
+
+#include <linux/platform_data/serial-imx.h>
+struct imx_imx_uart_3irq_data {
+       int id;
+       resource_size_t iobase;
+       resource_size_t iosize;
+       resource_size_t irqrx;
+       resource_size_t irqtx;
+       resource_size_t irqrts;
+};
+struct platform_device *__init imx_add_imx_uart_3irq(
+               const struct imx_imx_uart_3irq_data *data,
+               const struct imxuart_platform_data *pdata);
+
+struct imx_imx_uart_1irq_data {
+       int id;
+       resource_size_t iobase;
+       resource_size_t iosize;
+       resource_size_t irq;
+};
+struct platform_device *__init imx_add_imx_uart_1irq(
+               const struct imx_imx_uart_1irq_data *data,
+               const struct imxuart_platform_data *pdata);
+
+#include <linux/platform_data/usb-imx_udc.h>
+struct imx_imx_udc_data {
+       resource_size_t iobase;
+       resource_size_t iosize;
+       resource_size_t irq0;
+       resource_size_t irq1;
+       resource_size_t irq2;
+       resource_size_t irq3;
+       resource_size_t irq4;
+       resource_size_t irq5;
+       resource_size_t irq6;
+};
+struct platform_device *__init imx_add_imx_udc(
+               const struct imx_imx_udc_data *data,
+               const struct imxusb_platform_data *pdata);
+
+#include <linux/platform_data/video-mx3fb.h>
+#include <linux/platform_data/camera-mx3.h>
+struct imx_ipu_core_data {
+       resource_size_t iobase;
+       resource_size_t synirq;
+       resource_size_t errirq;
+};
+struct platform_device *__init imx_add_ipu_core(
+               const struct imx_ipu_core_data *data);
+struct platform_device *__init imx_alloc_mx3_camera(
+               const struct imx_ipu_core_data *data,
+               const struct mx3_camera_pdata *pdata);
+struct platform_device *__init imx_add_mx3_sdc_fb(
+               const struct imx_ipu_core_data *data,
+               struct mx3fb_platform_data *pdata);
+
+#include <linux/platform_data/camera-mx1.h>
+struct imx_mx1_camera_data {
+       resource_size_t iobase;
+       resource_size_t iosize;
+       resource_size_t irq;
+};
+struct platform_device *__init imx_add_mx1_camera(
+               const struct imx_mx1_camera_data *data,
+               const struct mx1_camera_pdata *pdata);
+
+#include <linux/platform_data/camera-mx2.h>
+struct imx_mx2_camera_data {
+       resource_size_t iobasecsi;
+       resource_size_t iosizecsi;
+       resource_size_t irqcsi;
+       resource_size_t iobaseemmaprp;
+       resource_size_t iosizeemmaprp;
+       resource_size_t irqemmaprp;
+};
+struct platform_device *__init imx_add_mx2_camera(
+               const struct imx_mx2_camera_data *data,
+               const struct mx2_camera_platform_data *pdata);
+struct platform_device *__init imx_add_mx2_emmaprp(
+               const struct imx_mx2_camera_data *data);
+
+#include <linux/platform_data/usb-ehci-mxc.h>
+struct imx_mxc_ehci_data {
+       int id;
+       resource_size_t iobase;
+       resource_size_t irq;
+};
+struct platform_device *__init imx_add_mxc_ehci(
+               const struct imx_mxc_ehci_data *data,
+               const struct mxc_usbh_platform_data *pdata);
+
+#include <linux/platform_data/mmc-mxcmmc.h>
+struct imx_mxc_mmc_data {
+       int id;
+       resource_size_t iobase;
+       resource_size_t iosize;
+       resource_size_t irq;
+       resource_size_t dmareq;
+};
+struct platform_device *__init imx_add_mxc_mmc(
+               const struct imx_mxc_mmc_data *data,
+               const struct imxmmc_platform_data *pdata);
+
+#include <linux/platform_data/mtd-mxc_nand.h>
+struct imx_mxc_nand_data {
+       /*
+        * 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
+        * appears in the kernel command line to pass its partitioning.
+        */
+       int id;
+       resource_size_t iobase;
+       resource_size_t iosize;
+       resource_size_t axibase;
+       resource_size_t irq;
+};
+struct platform_device *__init imx_add_mxc_nand(
+               const struct imx_mxc_nand_data *data,
+               const struct mxc_nand_platform_data *pdata);
+
+struct imx_pata_imx_data {
+       resource_size_t iobase;
+       resource_size_t iosize;
+       resource_size_t irq;
+};
+struct platform_device *__init imx_add_pata_imx(
+               const struct imx_pata_imx_data *data);
+
+struct imx_mxc_pwm_data {
+       int id;
+       resource_size_t iobase;
+       resource_size_t iosize;
+       resource_size_t irq;
+};
+struct platform_device *__init imx_add_mxc_pwm(
+               const struct imx_mxc_pwm_data *data);
+
+/* mxc_rtc */
+struct imx_mxc_rtc_data {
+       resource_size_t iobase;
+       resource_size_t irq;
+};
+struct platform_device *__init imx_add_mxc_rtc(
+               const struct imx_mxc_rtc_data *data);
+
+/* mxc_w1 */
+struct imx_mxc_w1_data {
+       resource_size_t iobase;
+};
+struct platform_device *__init imx_add_mxc_w1(
+               const struct imx_mxc_w1_data *data);
+
+#include <linux/platform_data/mmc-esdhc-imx.h>
+struct imx_sdhci_esdhc_imx_data {
+       const char *devid;
+       int id;
+       resource_size_t iobase;
+       resource_size_t irq;
+};
+struct platform_device *__init imx_add_sdhci_esdhc_imx(
+               const struct imx_sdhci_esdhc_imx_data *data,
+               const struct esdhc_platform_data *pdata);
+
+#include <linux/platform_data/spi-imx.h>
+struct imx_spi_imx_data {
+       const char *devid;
+       int id;
+       resource_size_t iobase;
+       resource_size_t iosize;
+       int irq;
+};
+struct platform_device *__init imx_add_spi_imx(
+               const struct imx_spi_imx_data *data,
+               const struct spi_imx_master *pdata);
+
+struct platform_device *imx_add_imx_dma(void);
+struct platform_device *imx_add_imx_sdma(char *name,
+       resource_size_t iobase, int irq, struct sdma_platform_data *pdata);
+
+#include <linux/ahci_platform.h>
+struct imx_ahci_imx_data {
+       const char *devid;
+       resource_size_t iobase;
+       resource_size_t irq;
+};
+struct platform_device *__init imx_add_ahci_imx(
+               const struct imx_ahci_imx_data *data,
+               const struct ahci_platform_data *pdata);
diff --git a/arch/arm/mach-imx/devices/devices.c b/arch/arm/mach-imx/devices/devices.c
new file mode 100644 (file)
index 0000000..4d55a7a
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * Copyright 2008 Sascha Hauer, kernel@pengutronix.de
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA  02110-1301, USA.
+ */
+
+#include <linux/kernel.h>
+#include <linux/slab.h>
+#include <linux/init.h>
+#include <linux/err.h>
+#include <linux/platform_device.h>
+#include <mach/common.h>
+
+struct device mxc_aips_bus = {
+       .init_name      = "mxc_aips",
+       .parent         = &platform_bus,
+};
+
+struct device mxc_ahb_bus = {
+       .init_name      = "mxc_ahb",
+       .parent         = &platform_bus,
+};
+
+static int __init mxc_device_init(void)
+{
+       int ret;
+
+       ret = device_register(&mxc_aips_bus);
+       if (IS_ERR_VALUE(ret))
+               goto done;
+
+       ret = device_register(&mxc_ahb_bus);
+
+done:
+       return ret;
+}
+core_initcall(mxc_device_init);
diff --git a/arch/arm/mach-imx/devices/platform-ahci-imx.c b/arch/arm/mach-imx/devices/platform-ahci-imx.c
new file mode 100644 (file)
index 0000000..bf7f46d
--- /dev/null
@@ -0,0 +1,156 @@
+/*
+ * Copyright (C) 2011 Freescale Semiconductor, Inc. All Rights Reserved.
+ */
+
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#include <linux/io.h>
+#include <linux/clk.h>
+#include <linux/err.h>
+#include <linux/device.h>
+#include <linux/dma-mapping.h>
+#include <asm/sizes.h>
+#include <mach/hardware.h>
+#include "devices-common.h"
+
+#define imx_ahci_imx_data_entry_single(soc, _devid)            \
+       {                                                               \
+               .devid = _devid,                                        \
+               .iobase = soc ## _SATA_BASE_ADDR,                       \
+               .irq = soc ## _INT_SATA,                                \
+       }
+
+#ifdef CONFIG_SOC_IMX53
+const struct imx_ahci_imx_data imx53_ahci_imx_data __initconst =
+       imx_ahci_imx_data_entry_single(MX53, "imx53-ahci");
+#endif
+
+enum {
+       HOST_CAP = 0x00,
+       HOST_CAP_SSS = (1 << 27), /* Staggered Spin-up */
+       HOST_PORTS_IMPL = 0x0c,
+       HOST_TIMER1MS = 0xe0, /* Timer 1-ms */
+};
+
+static struct clk *sata_clk, *sata_ref_clk;
+
+/* AHCI module Initialization, if return 0, initialization is successful. */
+static int imx_sata_init(struct device *dev, void __iomem *addr)
+{
+       u32 tmpdata;
+       int ret = 0;
+       struct clk *clk;
+
+       sata_clk = clk_get(dev, "ahci");
+       if (IS_ERR(sata_clk)) {
+               dev_err(dev, "no sata clock.\n");
+               return PTR_ERR(sata_clk);
+       }
+       ret = clk_prepare_enable(sata_clk);
+       if (ret) {
+               dev_err(dev, "can't prepare/enable sata clock.\n");
+               goto put_sata_clk;
+       }
+
+       /* Get the AHCI SATA PHY CLK */
+       sata_ref_clk = clk_get(dev, "ahci_phy");
+       if (IS_ERR(sata_ref_clk)) {
+               dev_err(dev, "no sata ref clock.\n");
+               ret = PTR_ERR(sata_ref_clk);
+               goto release_sata_clk;
+       }
+       ret = clk_prepare_enable(sata_ref_clk);
+       if (ret) {
+               dev_err(dev, "can't prepare/enable sata ref clock.\n");
+               goto put_sata_ref_clk;
+       }
+
+       /* Get the AHB clock rate, and configure the TIMER1MS reg later */
+       clk = clk_get(dev, "ahci_dma");
+       if (IS_ERR(clk)) {
+               dev_err(dev, "no dma clock.\n");
+               ret = PTR_ERR(clk);
+               goto release_sata_ref_clk;
+       }
+       tmpdata = clk_get_rate(clk) / 1000;
+       clk_put(clk);
+
+       writel(tmpdata, addr + HOST_TIMER1MS);
+
+       tmpdata = readl(addr + HOST_CAP);
+       if (!(tmpdata & HOST_CAP_SSS)) {
+               tmpdata |= HOST_CAP_SSS;
+               writel(tmpdata, addr + HOST_CAP);
+       }
+
+       if (!(readl(addr + HOST_PORTS_IMPL) & 0x1))
+               writel((readl(addr + HOST_PORTS_IMPL) | 0x1),
+                       addr + HOST_PORTS_IMPL);
+
+       return 0;
+
+release_sata_ref_clk:
+       clk_disable_unprepare(sata_ref_clk);
+put_sata_ref_clk:
+       clk_put(sata_ref_clk);
+release_sata_clk:
+       clk_disable_unprepare(sata_clk);
+put_sata_clk:
+       clk_put(sata_clk);
+
+       return ret;
+}
+
+static void imx_sata_exit(struct device *dev)
+{
+       clk_disable_unprepare(sata_ref_clk);
+       clk_put(sata_ref_clk);
+
+       clk_disable_unprepare(sata_clk);
+       clk_put(sata_clk);
+
+}
+struct platform_device *__init imx_add_ahci_imx(
+               const struct imx_ahci_imx_data *data,
+               const struct ahci_platform_data *pdata)
+{
+       struct resource res[] = {
+               {
+                       .start = data->iobase,
+                       .end = data->iobase + SZ_4K - 1,
+                       .flags = IORESOURCE_MEM,
+               }, {
+                       .start = data->irq,
+                       .end = data->irq,
+                       .flags = IORESOURCE_IRQ,
+               },
+       };
+
+       return imx_add_platform_device_dmamask(data->devid, 0,
+                       res, ARRAY_SIZE(res),
+                       pdata, sizeof(*pdata),  DMA_BIT_MASK(32));
+}
+
+struct platform_device *__init imx53_add_ahci_imx(void)
+{
+       struct ahci_platform_data pdata = {
+               .init = imx_sata_init,
+               .exit = imx_sata_exit,
+       };
+
+       return imx_add_ahci_imx(&imx53_ahci_imx_data, &pdata);
+}
diff --git a/arch/arm/mach-imx/devices/platform-fec.c b/arch/arm/mach-imx/devices/platform-fec.c
new file mode 100644 (file)
index 0000000..e62114f
--- /dev/null
@@ -0,0 +1,74 @@
+/*
+ * Copyright (C) 2010 Pengutronix
+ * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
+ *
+ * This program is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License version 2 as published by the
+ * Free Software Foundation.
+ */
+#include <linux/dma-mapping.h>
+#include <asm/sizes.h>
+#include <mach/hardware.h>
+#include "devices-common.h"
+
+#define imx_fec_data_entry_single(soc, _devid)                         \
+       {                                                               \
+               .devid = _devid,                                        \
+               .iobase = soc ## _FEC_BASE_ADDR,                        \
+               .irq = soc ## _INT_FEC,                                 \
+       }
+
+#ifdef CONFIG_SOC_IMX25
+const struct imx_fec_data imx25_fec_data __initconst =
+       imx_fec_data_entry_single(MX25, "imx25-fec");
+#endif /* ifdef CONFIG_SOC_IMX25 */
+
+#ifdef CONFIG_SOC_IMX27
+const struct imx_fec_data imx27_fec_data __initconst =
+       imx_fec_data_entry_single(MX27, "imx27-fec");
+#endif /* ifdef CONFIG_SOC_IMX27 */
+
+#ifdef CONFIG_SOC_IMX35
+/* i.mx35 has the i.mx27 type fec */
+const struct imx_fec_data imx35_fec_data __initconst =
+       imx_fec_data_entry_single(MX35, "imx27-fec");
+#endif
+
+#ifdef CONFIG_SOC_IMX50
+/* i.mx50 has the i.mx25 type fec */
+const struct imx_fec_data imx50_fec_data __initconst =
+       imx_fec_data_entry_single(MX50, "imx25-fec");
+#endif
+
+#ifdef CONFIG_SOC_IMX51
+/* i.mx51 has the i.mx27 type fec */
+const struct imx_fec_data imx51_fec_data __initconst =
+       imx_fec_data_entry_single(MX51, "imx27-fec");
+#endif
+
+#ifdef CONFIG_SOC_IMX53
+/* i.mx53 has the i.mx25 type fec */
+const struct imx_fec_data imx53_fec_data __initconst =
+       imx_fec_data_entry_single(MX53, "imx25-fec");
+#endif
+
+struct platform_device *__init imx_add_fec(
+               const struct imx_fec_data *data,
+               const struct fec_platform_data *pdata)
+{
+       struct resource res[] = {
+               {
+                       .start = data->iobase,
+                       .end = data->iobase + SZ_4K - 1,
+                       .flags = IORESOURCE_MEM,
+               }, {
+                       .start = data->irq,
+                       .end = data->irq,
+                       .flags = IORESOURCE_IRQ,
+               },
+       };
+
+       return imx_add_platform_device_dmamask(data->devid, 0,
+                       res, ARRAY_SIZE(res),
+                       pdata, sizeof(*pdata), DMA_BIT_MASK(32));
+}
diff --git a/arch/arm/mach-imx/devices/platform-flexcan.c b/arch/arm/mach-imx/devices/platform-flexcan.c
new file mode 100644 (file)
index 0000000..e776d8e
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2010 Pengutronix, Marc Kleine-Budde <kernel@pengutronix.de>
+ *
+ * This program is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License version 2 as published by the
+ * Free Software Foundation.
+ */
+#include <mach/hardware.h>
+#include "devices-common.h"
+
+#define imx_flexcan_data_entry_single(soc, _id, _hwid, _size)          \
+       {                                                               \
+               .id = _id,                                              \
+               .iobase = soc ## _CAN ## _hwid ## _BASE_ADDR,           \
+               .iosize = _size,                                        \
+               .irq = soc ## _INT_CAN ## _hwid,                        \
+       }
+
+#define imx_flexcan_data_entry(soc, _id, _hwid, _size)                 \
+       [_id] = imx_flexcan_data_entry_single(soc, _id, _hwid, _size)
+
+#ifdef CONFIG_SOC_IMX25
+const struct imx_flexcan_data imx25_flexcan_data[] __initconst = {
+#define imx25_flexcan_data_entry(_id, _hwid)                           \
+       imx_flexcan_data_entry(MX25, _id, _hwid, SZ_16K)
+       imx25_flexcan_data_entry(0, 1),
+       imx25_flexcan_data_entry(1, 2),
+};
+#endif /* ifdef CONFIG_SOC_IMX25 */
+
+#ifdef CONFIG_SOC_IMX35
+const struct imx_flexcan_data imx35_flexcan_data[] __initconst = {
+#define imx35_flexcan_data_entry(_id, _hwid)                           \
+       imx_flexcan_data_entry(MX35, _id, _hwid, SZ_16K)
+       imx35_flexcan_data_entry(0, 1),
+       imx35_flexcan_data_entry(1, 2),
+};
+#endif /* ifdef CONFIG_SOC_IMX35 */
+
+struct platform_device *__init imx_add_flexcan(
+               const struct imx_flexcan_data *data,
+               const struct flexcan_platform_data *pdata)
+{
+       struct resource res[] = {
+               {
+                       .start = data->iobase,
+                       .end = data->iobase + data->iosize - 1,
+                       .flags = IORESOURCE_MEM,
+               }, {
+                       .start = data->irq,
+                       .end = data->irq,
+                       .flags = IORESOURCE_IRQ,
+               },
+       };
+
+       return imx_add_platform_device("flexcan", data->id,
+                       res, ARRAY_SIZE(res), pdata, sizeof(*pdata));
+}
diff --git a/arch/arm/mach-imx/devices/platform-fsl-usb2-udc.c b/arch/arm/mach-imx/devices/platform-fsl-usb2-udc.c
new file mode 100644 (file)
index 0000000..6ecccf9
--- /dev/null
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2010 Pengutronix
+ * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
+ *
+ * This program is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License version 2 as published by the
+ * Free Software Foundation.
+ */
+#include <linux/dma-mapping.h>
+#include <mach/hardware.h>
+#include "devices-common.h"
+
+#define imx_fsl_usb2_udc_data_entry_single(soc)                                \
+       {                                                               \
+               .iobase = soc ## _USB_OTG_BASE_ADDR,                    \
+               .irq = soc ## _INT_USB_OTG,                             \
+       }
+
+#ifdef CONFIG_SOC_IMX25
+const struct imx_fsl_usb2_udc_data imx25_fsl_usb2_udc_data __initconst =
+       imx_fsl_usb2_udc_data_entry_single(MX25);
+#endif /* ifdef CONFIG_SOC_IMX25 */
+
+#ifdef CONFIG_SOC_IMX27
+const struct imx_fsl_usb2_udc_data imx27_fsl_usb2_udc_data __initconst =
+       imx_fsl_usb2_udc_data_entry_single(MX27);
+#endif /* ifdef CONFIG_SOC_IMX27 */
+
+#ifdef CONFIG_SOC_IMX31
+const struct imx_fsl_usb2_udc_data imx31_fsl_usb2_udc_data __initconst =
+       imx_fsl_usb2_udc_data_entry_single(MX31);
+#endif /* ifdef CONFIG_SOC_IMX31 */
+
+#ifdef CONFIG_SOC_IMX35
+const struct imx_fsl_usb2_udc_data imx35_fsl_usb2_udc_data __initconst =
+       imx_fsl_usb2_udc_data_entry_single(MX35);
+#endif /* ifdef CONFIG_SOC_IMX35 */
+
+#ifdef CONFIG_SOC_IMX51
+const struct imx_fsl_usb2_udc_data imx51_fsl_usb2_udc_data __initconst =
+       imx_fsl_usb2_udc_data_entry_single(MX51);
+#endif
+
+struct platform_device *__init imx_add_fsl_usb2_udc(
+               const struct imx_fsl_usb2_udc_data *data,
+               const struct fsl_usb2_platform_data *pdata)
+{
+       struct resource res[] = {
+               {
+                       .start = data->iobase,
+                       .end = data->iobase + SZ_512 - 1,
+                       .flags = IORESOURCE_MEM,
+               }, {
+                       .start = data->irq,
+                       .end = data->irq,
+                       .flags = IORESOURCE_IRQ,
+               },
+       };
+       return imx_add_platform_device_dmamask("fsl-usb2-udc", -1,
+                       res, ARRAY_SIZE(res),
+                       pdata, sizeof(*pdata), DMA_BIT_MASK(32));
+}
diff --git a/arch/arm/mach-imx/devices/platform-gpio-mxc.c b/arch/arm/mach-imx/devices/platform-gpio-mxc.c
new file mode 100644 (file)
index 0000000..26483fa
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2011 Freescale Semiconductor, Inc. All Rights Reserved.
+ * Copyright 2011 Linaro Limited
+ *
+ * This program is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License version 2 as published by the
+ * Free Software Foundation.
+ */
+#include "devices-common.h"
+
+struct platform_device *__init mxc_register_gpio(char *name, int id,
+       resource_size_t iobase, resource_size_t iosize, int irq, int irq_high)
+{
+       struct resource res[] = {
+               {
+                       .start = iobase,
+                       .end = iobase + iosize - 1,
+                       .flags = IORESOURCE_MEM,
+               }, {
+                       .start = irq,
+                       .end = irq,
+                       .flags = IORESOURCE_IRQ,
+               }, {
+                       .start = irq_high,
+                       .end = irq_high,
+                       .flags = IORESOURCE_IRQ,
+               },
+       };
+
+       return platform_device_register_resndata(&mxc_aips_bus,
+                       name, id, res, ARRAY_SIZE(res), NULL, 0);
+}
diff --git a/arch/arm/mach-imx/devices/platform-gpio_keys.c b/arch/arm/mach-imx/devices/platform-gpio_keys.c
new file mode 100644 (file)
index 0000000..3f87279
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+ * Copyright (C) 2010 Freescale Semiconductor, Inc. All Rights Reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA  02110-1301, USA.
+ */
+#include <asm/sizes.h>
+#include <mach/hardware.h>
+#include "devices-common.h"
+
+struct platform_device *__init imx_add_gpio_keys(
+               const struct gpio_keys_platform_data *pdata)
+{
+       return imx_add_platform_device("gpio-keys", -1, NULL,
+                0, pdata, sizeof(*pdata));
+}
diff --git a/arch/arm/mach-imx/devices/platform-imx-dma.c b/arch/arm/mach-imx/devices/platform-imx-dma.c
new file mode 100644 (file)
index 0000000..c35c99d
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2010 Pengutronix
+ * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
+ *
+ * This program is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License version 2 as published by the
+ * Free Software Foundation.
+ */
+#include "devices-common.h"
+
+struct platform_device __init __maybe_unused *imx_add_imx_dma(void)
+{
+       return platform_device_register_resndata(&mxc_ahb_bus,
+                       "imx-dma", -1, NULL, 0, NULL, 0);
+}
+
+struct platform_device __init __maybe_unused *imx_add_imx_sdma(char *name,
+       resource_size_t iobase, int irq, struct sdma_platform_data *pdata)
+{
+       struct resource res[] = {
+               {
+                       .start = iobase,
+                       .end = iobase + SZ_16K - 1,
+                       .flags = IORESOURCE_MEM,
+               }, {
+                       .start = irq,
+                       .end = irq,
+                       .flags = IORESOURCE_IRQ,
+               },
+       };
+
+       return platform_device_register_resndata(&mxc_ahb_bus, name,
+                       -1, res, ARRAY_SIZE(res), pdata, sizeof(*pdata));
+}
diff --git a/arch/arm/mach-imx/devices/platform-imx-fb.c b/arch/arm/mach-imx/devices/platform-imx-fb.c
new file mode 100644 (file)
index 0000000..4e6f857
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2010 Pengutronix
+ * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
+ *
+ * This program is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License version 2 as published by the
+ * Free Software Foundation.
+ */
+#include <linux/dma-mapping.h>
+#include <mach/hardware.h>
+#include "devices-common.h"
+
+#define imx_imx_fb_data_entry_single(soc, _size)                       \
+       {                                                               \
+               .iobase = soc ## _LCDC_BASE_ADDR,                       \
+               .iosize = _size,                                        \
+               .irq = soc ## _INT_LCDC,                                \
+       }
+
+#ifdef CONFIG_SOC_IMX1
+const struct imx_imx_fb_data imx1_imx_fb_data __initconst =
+       imx_imx_fb_data_entry_single(MX1, SZ_4K);
+#endif /* ifdef CONFIG_SOC_IMX1 */
+
+#ifdef CONFIG_SOC_IMX21
+const struct imx_imx_fb_data imx21_imx_fb_data __initconst =
+       imx_imx_fb_data_entry_single(MX21, SZ_4K);
+#endif /* ifdef CONFIG_SOC_IMX21 */
+
+#ifdef CONFIG_SOC_IMX25
+const struct imx_imx_fb_data imx25_imx_fb_data __initconst =
+       imx_imx_fb_data_entry_single(MX25, SZ_16K);
+#endif /* ifdef CONFIG_SOC_IMX25 */
+
+#ifdef CONFIG_SOC_IMX27
+const struct imx_imx_fb_data imx27_imx_fb_data __initconst =
+       imx_imx_fb_data_entry_single(MX27, SZ_4K);
+#endif /* ifdef CONFIG_SOC_IMX27 */
+
+struct platform_device *__init imx_add_imx_fb(
+               const struct imx_imx_fb_data *data,
+               const struct imx_fb_platform_data *pdata)
+{
+       struct resource res[] = {
+               {
+                       .start = data->iobase,
+                       .end = data->iobase + data->iosize - 1,
+                       .flags = IORESOURCE_MEM,
+               }, {
+                       .start = data->irq,
+                       .end = data->irq,
+                       .flags = IORESOURCE_IRQ,
+               },
+       };
+       return imx_add_platform_device_dmamask("imx-fb", 0,
+                       res, ARRAY_SIZE(res),
+                       pdata, sizeof(*pdata), DMA_BIT_MASK(32));
+}
diff --git a/arch/arm/mach-imx/devices/platform-imx-i2c.c b/arch/arm/mach-imx/devices/platform-imx-i2c.c
new file mode 100644 (file)
index 0000000..e0c7d62
--- /dev/null
@@ -0,0 +1,126 @@
+/*
+ * Copyright (C) 2009-2010 Pengutronix
+ * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
+ *
+ * This program is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License version 2 as published by the
+ * Free Software Foundation.
+ */
+#include <mach/hardware.h>
+#include "devices-common.h"
+
+#define imx_imx_i2c_data_entry_single(soc, _id, _hwid, _size)          \
+       {                                                               \
+               .id = _id,                                              \
+               .iobase = soc ## _I2C ## _hwid ## _BASE_ADDR,           \
+               .iosize = _size,                                        \
+               .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)
+
+#ifdef CONFIG_SOC_IMX1
+const struct imx_imx_i2c_data imx1_imx_i2c_data __initconst =
+       imx_imx_i2c_data_entry_single(MX1, 0, , SZ_4K);
+#endif /* ifdef CONFIG_SOC_IMX1 */
+
+#ifdef CONFIG_SOC_IMX21
+const struct imx_imx_i2c_data imx21_imx_i2c_data __initconst =
+       imx_imx_i2c_data_entry_single(MX21, 0, , SZ_4K);
+#endif /* ifdef CONFIG_SOC_IMX21 */
+
+#ifdef CONFIG_SOC_IMX25
+const struct imx_imx_i2c_data imx25_imx_i2c_data[] __initconst = {
+#define imx25_imx_i2c_data_entry(_id, _hwid)                           \
+       imx_imx_i2c_data_entry(MX25, _id, _hwid, SZ_16K)
+       imx25_imx_i2c_data_entry(0, 1),
+       imx25_imx_i2c_data_entry(1, 2),
+       imx25_imx_i2c_data_entry(2, 3),
+};
+#endif /* ifdef CONFIG_SOC_IMX25 */
+
+#ifdef CONFIG_SOC_IMX27
+const struct imx_imx_i2c_data imx27_imx_i2c_data[] __initconst = {
+#define imx27_imx_i2c_data_entry(_id, _hwid)                           \
+       imx_imx_i2c_data_entry(MX27, _id, _hwid, SZ_4K)
+       imx27_imx_i2c_data_entry(0, 1),
+       imx27_imx_i2c_data_entry(1, 2),
+};
+#endif /* ifdef CONFIG_SOC_IMX27 */
+
+#ifdef CONFIG_SOC_IMX31
+const struct imx_imx_i2c_data imx31_imx_i2c_data[] __initconst = {
+#define imx31_imx_i2c_data_entry(_id, _hwid)                           \
+       imx_imx_i2c_data_entry(MX31, _id, _hwid, SZ_4K)
+       imx31_imx_i2c_data_entry(0, 1),
+       imx31_imx_i2c_data_entry(1, 2),
+       imx31_imx_i2c_data_entry(2, 3),
+};
+#endif /* ifdef CONFIG_SOC_IMX31 */
+
+#ifdef CONFIG_SOC_IMX35
+const struct imx_imx_i2c_data imx35_imx_i2c_data[] __initconst = {
+#define imx35_imx_i2c_data_entry(_id, _hwid)                           \
+       imx_imx_i2c_data_entry(MX35, _id, _hwid, SZ_4K)
+       imx35_imx_i2c_data_entry(0, 1),
+       imx35_imx_i2c_data_entry(1, 2),
+       imx35_imx_i2c_data_entry(2, 3),
+};
+#endif /* ifdef CONFIG_SOC_IMX35 */
+
+#ifdef CONFIG_SOC_IMX50
+const struct imx_imx_i2c_data imx50_imx_i2c_data[] __initconst = {
+#define imx50_imx_i2c_data_entry(_id, _hwid)                           \
+       imx_imx_i2c_data_entry(MX50, _id, _hwid, SZ_4K)
+       imx50_imx_i2c_data_entry(0, 1),
+       imx50_imx_i2c_data_entry(1, 2),
+       imx50_imx_i2c_data_entry(2, 3),
+};
+#endif /* ifdef CONFIG_SOC_IMX51 */
+
+#ifdef CONFIG_SOC_IMX51
+const struct imx_imx_i2c_data imx51_imx_i2c_data[] __initconst = {
+#define imx51_imx_i2c_data_entry(_id, _hwid)                           \
+       imx_imx_i2c_data_entry(MX51, _id, _hwid, SZ_4K)
+       imx51_imx_i2c_data_entry(0, 1),
+       imx51_imx_i2c_data_entry(1, 2),
+       {
+               .id = 2,
+               .iobase = MX51_HSI2C_DMA_BASE_ADDR,
+               .iosize = SZ_16K,
+               .irq = MX51_INT_HS_I2C,
+       },
+};
+#endif /* ifdef CONFIG_SOC_IMX51 */
+
+#ifdef CONFIG_SOC_IMX53
+const struct imx_imx_i2c_data imx53_imx_i2c_data[] __initconst = {
+#define imx53_imx_i2c_data_entry(_id, _hwid)                           \
+       imx_imx_i2c_data_entry(MX53, _id, _hwid, SZ_4K)
+       imx53_imx_i2c_data_entry(0, 1),
+       imx53_imx_i2c_data_entry(1, 2),
+       imx53_imx_i2c_data_entry(2, 3),
+};
+#endif /* ifdef CONFIG_SOC_IMX53 */
+
+struct platform_device *__init imx_add_imx_i2c(
+               const struct imx_imx_i2c_data *data,
+               const struct imxi2c_platform_data *pdata)
+{
+       struct resource res[] = {
+               {
+                       .start = data->iobase,
+                       .end = data->iobase + data->iosize - 1,
+                       .flags = IORESOURCE_MEM,
+               }, {
+                       .start = data->irq,
+                       .end = data->irq,
+                       .flags = IORESOURCE_IRQ,
+               },
+       };
+
+       return imx_add_platform_device("imx-i2c", data->id,
+                       res, ARRAY_SIZE(res),
+                       pdata, sizeof(*pdata));
+}
diff --git a/arch/arm/mach-imx/devices/platform-imx-keypad.c b/arch/arm/mach-imx/devices/platform-imx-keypad.c
new file mode 100644 (file)
index 0000000..371b1e6
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Copyright (C) 2010 Pengutronix
+ * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
+ *
+ * This program is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License version 2 as published by the
+ * Free Software Foundation.
+ */
+#include <mach/hardware.h>
+#include "devices-common.h"
+
+#define imx_imx_keypad_data_entry_single(soc, _size)                   \
+       {                                                               \
+               .iobase = soc ## _KPP_BASE_ADDR,                        \
+               .iosize = _size,                                        \
+               .irq = soc ## _INT_KPP,                                 \
+       }
+
+#ifdef CONFIG_SOC_IMX21
+const struct imx_imx_keypad_data imx21_imx_keypad_data __initconst =
+       imx_imx_keypad_data_entry_single(MX21, SZ_16);
+#endif /* ifdef CONFIG_SOC_IMX21 */
+
+#ifdef CONFIG_SOC_IMX25
+const struct imx_imx_keypad_data imx25_imx_keypad_data __initconst =
+       imx_imx_keypad_data_entry_single(MX25, SZ_16K);
+#endif /* ifdef CONFIG_SOC_IMX25 */
+
+#ifdef CONFIG_SOC_IMX27
+const struct imx_imx_keypad_data imx27_imx_keypad_data __initconst =
+       imx_imx_keypad_data_entry_single(MX27, SZ_16);
+#endif /* ifdef CONFIG_SOC_IMX27 */
+
+#ifdef CONFIG_SOC_IMX31
+const struct imx_imx_keypad_data imx31_imx_keypad_data __initconst =
+       imx_imx_keypad_data_entry_single(MX31, SZ_16);
+#endif /* ifdef CONFIG_SOC_IMX31 */
+
+#ifdef CONFIG_SOC_IMX35
+const struct imx_imx_keypad_data imx35_imx_keypad_data __initconst =
+       imx_imx_keypad_data_entry_single(MX35, SZ_16);
+#endif /* ifdef CONFIG_SOC_IMX35 */
+
+#ifdef CONFIG_SOC_IMX51
+const struct imx_imx_keypad_data imx51_imx_keypad_data __initconst =
+       imx_imx_keypad_data_entry_single(MX51, SZ_16);
+#endif /* ifdef CONFIG_SOC_IMX51 */
+
+#ifdef CONFIG_SOC_IMX53
+const struct imx_imx_keypad_data imx53_imx_keypad_data __initconst =
+       imx_imx_keypad_data_entry_single(MX53, SZ_16);
+#endif /* ifdef CONFIG_SOC_IMX53 */
+
+struct platform_device *__init imx_add_imx_keypad(
+               const struct imx_imx_keypad_data *data,
+               const struct matrix_keymap_data *pdata)
+{
+       struct resource res[] = {
+               {
+                       .start = data->iobase,
+                       .end = data->iobase + data->iosize - 1,
+                       .flags = IORESOURCE_MEM,
+               }, {
+                       .start = data->irq,
+                       .end = data->irq,
+                       .flags = IORESOURCE_IRQ,
+               },
+       };
+
+       return imx_add_platform_device("imx-keypad", -1,
+                       res, ARRAY_SIZE(res), pdata, sizeof(*pdata));
+}
diff --git a/arch/arm/mach-imx/devices/platform-imx-ssi.c b/arch/arm/mach-imx/devices/platform-imx-ssi.c
new file mode 100644 (file)
index 0000000..bf0c5e4
--- /dev/null
@@ -0,0 +1,118 @@
+/*
+ * Copyright (C) 2010 Pengutronix
+ * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
+ *
+ * This program is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License version 2 as published by the
+ * Free Software Foundation.
+ */
+#include <mach/hardware.h>
+#include "devices-common.h"
+
+#define imx_imx_ssi_data_entry(soc, _id, _hwid, _size)                 \
+       [_id] = {                                                       \
+               .id = _id,                                              \
+               .iobase = soc ## _SSI ## _hwid ## _BASE_ADDR,           \
+               .iosize = _size,                                        \
+               .irq = soc ## _INT_SSI ## _hwid,                        \
+               .dmatx0 = soc ## _DMA_REQ_SSI ## _hwid ## _TX0,         \
+               .dmarx0 = soc ## _DMA_REQ_SSI ## _hwid ## _RX0,         \
+               .dmatx1 = soc ## _DMA_REQ_SSI ## _hwid ## _TX1,         \
+               .dmarx1 = soc ## _DMA_REQ_SSI ## _hwid ## _RX1,         \
+       }
+
+#ifdef CONFIG_SOC_IMX21
+const struct imx_imx_ssi_data imx21_imx_ssi_data[] __initconst = {
+#define imx21_imx_ssi_data_entry(_id, _hwid)                           \
+       imx_imx_ssi_data_entry(MX21, _id, _hwid, SZ_4K)
+       imx21_imx_ssi_data_entry(0, 1),
+       imx21_imx_ssi_data_entry(1, 2),
+};
+#endif /* ifdef CONFIG_SOC_IMX21 */
+
+#ifdef CONFIG_SOC_IMX25
+const struct imx_imx_ssi_data imx25_imx_ssi_data[] __initconst = {
+#define imx25_imx_ssi_data_entry(_id, _hwid)                           \
+       imx_imx_ssi_data_entry(MX25, _id, _hwid, SZ_4K)
+       imx25_imx_ssi_data_entry(0, 1),
+       imx25_imx_ssi_data_entry(1, 2),
+};
+#endif /* ifdef CONFIG_SOC_IMX25 */
+
+#ifdef CONFIG_SOC_IMX27
+const struct imx_imx_ssi_data imx27_imx_ssi_data[] __initconst = {
+#define imx27_imx_ssi_data_entry(_id, _hwid)                           \
+       imx_imx_ssi_data_entry(MX27, _id, _hwid, SZ_4K)
+       imx27_imx_ssi_data_entry(0, 1),
+       imx27_imx_ssi_data_entry(1, 2),
+};
+#endif /* ifdef CONFIG_SOC_IMX27 */
+
+#ifdef CONFIG_SOC_IMX31
+const struct imx_imx_ssi_data imx31_imx_ssi_data[] __initconst = {
+#define imx31_imx_ssi_data_entry(_id, _hwid)                           \
+       imx_imx_ssi_data_entry(MX31, _id, _hwid, SZ_4K)
+       imx31_imx_ssi_data_entry(0, 1),
+       imx31_imx_ssi_data_entry(1, 2),
+};
+#endif /* ifdef CONFIG_SOC_IMX31 */
+
+#ifdef CONFIG_SOC_IMX35
+const struct imx_imx_ssi_data imx35_imx_ssi_data[] __initconst = {
+#define imx35_imx_ssi_data_entry(_id, _hwid)                           \
+       imx_imx_ssi_data_entry(MX35, _id, _hwid, SZ_4K)
+       imx35_imx_ssi_data_entry(0, 1),
+       imx35_imx_ssi_data_entry(1, 2),
+};
+#endif /* ifdef CONFIG_SOC_IMX35 */
+
+#ifdef CONFIG_SOC_IMX51
+const struct imx_imx_ssi_data imx51_imx_ssi_data[] __initconst = {
+#define imx51_imx_ssi_data_entry(_id, _hwid)                           \
+       imx_imx_ssi_data_entry(MX51, _id, _hwid, SZ_16K)
+       imx51_imx_ssi_data_entry(0, 1),
+       imx51_imx_ssi_data_entry(1, 2),
+       imx51_imx_ssi_data_entry(2, 3),
+};
+#endif /* ifdef CONFIG_SOC_IMX51 */
+
+#ifdef CONFIG_SOC_IMX53
+const struct imx_imx_ssi_data imx53_imx_ssi_data[] __initconst = {
+#define imx53_imx_ssi_data_entry(_id, _hwid)                           \
+       imx_imx_ssi_data_entry(MX53, _id, _hwid, SZ_16K)
+       imx53_imx_ssi_data_entry(0, 1),
+       imx53_imx_ssi_data_entry(1, 2),
+       imx53_imx_ssi_data_entry(2, 3),
+};
+#endif /* ifdef CONFIG_SOC_IMX53 */
+
+struct platform_device *__init imx_add_imx_ssi(
+               const struct imx_imx_ssi_data *data,
+               const struct imx_ssi_platform_data *pdata)
+{
+       struct resource res[] = {
+               {
+                       .start = data->iobase,
+                       .end = data->iobase + data->iosize - 1,
+                       .flags = IORESOURCE_MEM,
+               }, {
+                       .start = data->irq,
+                       .end = data->irq,
+                       .flags = IORESOURCE_IRQ,
+               },
+#define DMARES(_name) {                                                        \
+       .name = #_name,                                                 \
+       .start = data->dma ## _name,                                    \
+       .end = data->dma ## _name,                                      \
+       .flags = IORESOURCE_DMA,                                        \
+}
+               DMARES(tx0),
+               DMARES(rx0),
+               DMARES(tx1),
+               DMARES(rx1),
+       };
+
+       return imx_add_platform_device("imx-ssi", data->id,
+                       res, ARRAY_SIZE(res),
+                       pdata, sizeof(*pdata));
+}
diff --git a/arch/arm/mach-imx/devices/platform-imx-uart.c b/arch/arm/mach-imx/devices/platform-imx-uart.c
new file mode 100644 (file)
index 0000000..e6132f2
--- /dev/null
@@ -0,0 +1,178 @@
+/*
+ * Copyright (C) 2009-2010 Pengutronix
+ * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
+ *
+ * This program is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License version 2 as published by the
+ * Free Software Foundation.
+ */
+#include <mach/hardware.h>
+#include "devices-common.h"
+
+#define imx_imx_uart_3irq_data_entry(soc, _id, _hwid, _size)           \
+       [_id] = {                                                       \
+               .id = _id,                                              \
+               .iobase = soc ## _UART ## _hwid ## _BASE_ADDR,          \
+               .iosize = _size,                                        \
+               .irqrx = soc ## _INT_UART ## _hwid ## RX,               \
+               .irqtx = soc ## _INT_UART ## _hwid ## TX,               \
+               .irqrts = soc ## _INT_UART ## _hwid ## RTS,             \
+       }
+
+#define imx_imx_uart_1irq_data_entry(soc, _id, _hwid, _size)           \
+       [_id] = {                                                       \
+               .id = _id,                                              \
+               .iobase = soc ## _UART ## _hwid ## _BASE_ADDR,          \
+               .iosize = _size,                                        \
+               .irq = soc ## _INT_UART ## _hwid,                       \
+       }
+
+#ifdef CONFIG_SOC_IMX1
+const struct imx_imx_uart_3irq_data imx1_imx_uart_data[] __initconst = {
+#define imx1_imx_uart_data_entry(_id, _hwid)                           \
+       imx_imx_uart_3irq_data_entry(MX1, _id, _hwid, 0xd0)
+       imx1_imx_uart_data_entry(0, 1),
+       imx1_imx_uart_data_entry(1, 2),
+};
+#endif /* ifdef CONFIG_SOC_IMX1 */
+
+#ifdef CONFIG_SOC_IMX21
+const struct imx_imx_uart_1irq_data imx21_imx_uart_data[] __initconst = {
+#define imx21_imx_uart_data_entry(_id, _hwid)                          \
+       imx_imx_uart_1irq_data_entry(MX21, _id, _hwid, SZ_4K)
+       imx21_imx_uart_data_entry(0, 1),
+       imx21_imx_uart_data_entry(1, 2),
+       imx21_imx_uart_data_entry(2, 3),
+       imx21_imx_uart_data_entry(3, 4),
+};
+#endif
+
+#ifdef CONFIG_SOC_IMX25
+const struct imx_imx_uart_1irq_data imx25_imx_uart_data[] __initconst = {
+#define imx25_imx_uart_data_entry(_id, _hwid)                          \
+       imx_imx_uart_1irq_data_entry(MX25, _id, _hwid, SZ_16K)
+       imx25_imx_uart_data_entry(0, 1),
+       imx25_imx_uart_data_entry(1, 2),
+       imx25_imx_uart_data_entry(2, 3),
+       imx25_imx_uart_data_entry(3, 4),
+       imx25_imx_uart_data_entry(4, 5),
+};
+#endif /* ifdef CONFIG_SOC_IMX25 */
+
+#ifdef CONFIG_SOC_IMX27
+const struct imx_imx_uart_1irq_data imx27_imx_uart_data[] __initconst = {
+#define imx27_imx_uart_data_entry(_id, _hwid)                          \
+       imx_imx_uart_1irq_data_entry(MX27, _id, _hwid, SZ_4K)
+       imx27_imx_uart_data_entry(0, 1),
+       imx27_imx_uart_data_entry(1, 2),
+       imx27_imx_uart_data_entry(2, 3),
+       imx27_imx_uart_data_entry(3, 4),
+       imx27_imx_uart_data_entry(4, 5),
+       imx27_imx_uart_data_entry(5, 6),
+};
+#endif /* ifdef CONFIG_SOC_IMX27 */
+
+#ifdef CONFIG_SOC_IMX31
+const struct imx_imx_uart_1irq_data imx31_imx_uart_data[] __initconst = {
+#define imx31_imx_uart_data_entry(_id, _hwid)                          \
+       imx_imx_uart_1irq_data_entry(MX31, _id, _hwid, SZ_4K)
+       imx31_imx_uart_data_entry(0, 1),
+       imx31_imx_uart_data_entry(1, 2),
+       imx31_imx_uart_data_entry(2, 3),
+       imx31_imx_uart_data_entry(3, 4),
+       imx31_imx_uart_data_entry(4, 5),
+};
+#endif /* ifdef CONFIG_SOC_IMX31 */
+
+#ifdef CONFIG_SOC_IMX35
+const struct imx_imx_uart_1irq_data imx35_imx_uart_data[] __initconst = {
+#define imx35_imx_uart_data_entry(_id, _hwid)                          \
+       imx_imx_uart_1irq_data_entry(MX35, _id, _hwid, SZ_16K)
+       imx35_imx_uart_data_entry(0, 1),
+       imx35_imx_uart_data_entry(1, 2),
+       imx35_imx_uart_data_entry(2, 3),
+};
+#endif /* ifdef CONFIG_SOC_IMX35 */
+
+#ifdef CONFIG_SOC_IMX50
+const struct imx_imx_uart_1irq_data imx50_imx_uart_data[] __initconst = {
+#define imx50_imx_uart_data_entry(_id, _hwid)                          \
+       imx_imx_uart_1irq_data_entry(MX50, _id, _hwid, SZ_4K)
+       imx50_imx_uart_data_entry(0, 1),
+       imx50_imx_uart_data_entry(1, 2),
+       imx50_imx_uart_data_entry(2, 3),
+       imx50_imx_uart_data_entry(3, 4),
+       imx50_imx_uart_data_entry(4, 5),
+};
+#endif /* ifdef CONFIG_SOC_IMX50 */
+
+#ifdef CONFIG_SOC_IMX51
+const struct imx_imx_uart_1irq_data imx51_imx_uart_data[] __initconst = {
+#define imx51_imx_uart_data_entry(_id, _hwid)                          \
+       imx_imx_uart_1irq_data_entry(MX51, _id, _hwid, SZ_4K)
+       imx51_imx_uart_data_entry(0, 1),
+       imx51_imx_uart_data_entry(1, 2),
+       imx51_imx_uart_data_entry(2, 3),
+};
+#endif /* ifdef CONFIG_SOC_IMX51 */
+
+#ifdef CONFIG_SOC_IMX53
+const struct imx_imx_uart_1irq_data imx53_imx_uart_data[] __initconst = {
+#define imx53_imx_uart_data_entry(_id, _hwid)                          \
+       imx_imx_uart_1irq_data_entry(MX53, _id, _hwid, SZ_4K)
+       imx53_imx_uart_data_entry(0, 1),
+       imx53_imx_uart_data_entry(1, 2),
+       imx53_imx_uart_data_entry(2, 3),
+       imx53_imx_uart_data_entry(3, 4),
+       imx53_imx_uart_data_entry(4, 5),
+};
+#endif /* ifdef CONFIG_SOC_IMX53 */
+
+struct platform_device *__init imx_add_imx_uart_3irq(
+               const struct imx_imx_uart_3irq_data *data,
+               const struct imxuart_platform_data *pdata)
+{
+       struct resource res[] = {
+               {
+                       .start = data->iobase,
+                       .end = data->iobase + data->iosize - 1,
+                       .flags = IORESOURCE_MEM,
+               }, {
+                       .start = data->irqrx,
+                       .end = data->irqrx,
+                       .flags = IORESOURCE_IRQ,
+               }, {
+                       .start = data->irqtx,
+                       .end = data->irqtx,
+                       .flags = IORESOURCE_IRQ,
+               }, {
+                       .start = data->irqrts,
+                       .end = data->irqrx,
+                       .flags = IORESOURCE_IRQ,
+               },
+       };
+
+       return imx_add_platform_device("imx1-uart", data->id, res,
+                       ARRAY_SIZE(res), pdata, sizeof(*pdata));
+}
+
+struct platform_device *__init imx_add_imx_uart_1irq(
+               const struct imx_imx_uart_1irq_data *data,
+               const struct imxuart_platform_data *pdata)
+{
+       struct resource res[] = {
+               {
+                       .start = data->iobase,
+                       .end = data->iobase + data->iosize - 1,
+                       .flags = IORESOURCE_MEM,
+               }, {
+                       .start = data->irq,
+                       .end = data->irq,
+                       .flags = IORESOURCE_IRQ,
+               },
+       };
+
+       /* i.mx21 type uart runs on all i.mx except i.mx1 */
+       return imx_add_platform_device("imx21-uart", data->id,
+                       res, ARRAY_SIZE(res), pdata, sizeof(*pdata));
+}
diff --git a/arch/arm/mach-imx/devices/platform-imx2-wdt.c b/arch/arm/mach-imx/devices/platform-imx2-wdt.c
new file mode 100644 (file)
index 0000000..729c191
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+ * Copyright (C) 2010 Pengutronix
+ * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
+ *
+ * This program is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License version 2 as published by the
+ * Free Software Foundation.
+ */
+#include <asm/sizes.h>
+#include <mach/hardware.h>
+#include "devices-common.h"
+
+#define imx_imx2_wdt_data_entry_single(soc, _id, _hwid, _size)         \
+       {                                                               \
+               .id = _id,                                              \
+               .iobase = soc ## _WDOG ## _hwid ## _BASE_ADDR,          \
+               .iosize = _size,                                        \
+       }
+#define imx_imx2_wdt_data_entry(soc, _id, _hwid, _size)                        \
+       [_id] = imx_imx2_wdt_data_entry_single(soc, _id, _hwid, _size)
+
+#ifdef CONFIG_SOC_IMX21
+const struct imx_imx2_wdt_data imx21_imx2_wdt_data __initconst =
+       imx_imx2_wdt_data_entry_single(MX21, 0, , SZ_4K);
+#endif /* ifdef CONFIG_SOC_IMX21 */
+
+#ifdef CONFIG_SOC_IMX25
+const struct imx_imx2_wdt_data imx25_imx2_wdt_data __initconst =
+       imx_imx2_wdt_data_entry_single(MX25, 0, , SZ_16K);
+#endif /* ifdef CONFIG_SOC_IMX25 */
+
+#ifdef CONFIG_SOC_IMX27
+const struct imx_imx2_wdt_data imx27_imx2_wdt_data __initconst =
+       imx_imx2_wdt_data_entry_single(MX27, 0, , SZ_4K);
+#endif /* ifdef CONFIG_SOC_IMX27 */
+
+#ifdef CONFIG_SOC_IMX31
+const struct imx_imx2_wdt_data imx31_imx2_wdt_data __initconst =
+       imx_imx2_wdt_data_entry_single(MX31, 0, , SZ_16K);
+#endif /* ifdef CONFIG_SOC_IMX31 */
+
+#ifdef CONFIG_SOC_IMX35
+const struct imx_imx2_wdt_data imx35_imx2_wdt_data __initconst =
+       imx_imx2_wdt_data_entry_single(MX35, 0, , SZ_16K);
+#endif /* ifdef CONFIG_SOC_IMX35 */
+
+#ifdef CONFIG_SOC_IMX51
+const struct imx_imx2_wdt_data imx51_imx2_wdt_data[] __initconst = {
+#define imx51_imx2_wdt_data_entry(_id, _hwid)                          \
+       imx_imx2_wdt_data_entry(MX51, _id, _hwid, SZ_16K)
+       imx51_imx2_wdt_data_entry(0, 1),
+       imx51_imx2_wdt_data_entry(1, 2),
+};
+#endif /* ifdef CONFIG_SOC_IMX51 */
+
+#ifdef CONFIG_SOC_IMX53
+const struct imx_imx2_wdt_data imx53_imx2_wdt_data[] __initconst = {
+#define imx53_imx2_wdt_data_entry(_id, _hwid)                          \
+       imx_imx2_wdt_data_entry(MX53, _id, _hwid, SZ_16K)
+       imx53_imx2_wdt_data_entry(0, 1),
+       imx53_imx2_wdt_data_entry(1, 2),
+};
+#endif /* ifdef CONFIG_SOC_IMX53 */
+
+struct platform_device *__init imx_add_imx2_wdt(
+               const struct imx_imx2_wdt_data *data)
+{
+       struct resource res[] = {
+               {
+                       .start = data->iobase,
+                       .end = data->iobase + data->iosize - 1,
+                       .flags = IORESOURCE_MEM,
+               },
+       };
+       return imx_add_platform_device("imx2-wdt", data->id,
+                       res, ARRAY_SIZE(res), NULL, 0);
+}
diff --git a/arch/arm/mach-imx/devices/platform-imx21-hcd.c b/arch/arm/mach-imx/devices/platform-imx21-hcd.c
new file mode 100644 (file)
index 0000000..18b9963
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2010 Pengutronix
+ * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
+ *
+ * This program is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License version 2 as published by the
+ * Free Software Foundation.
+ */
+#include <mach/hardware.h>
+#include "devices-common.h"
+
+#define imx_imx21_hcd_data_entry_single(soc)                           \
+       {                                                               \
+               .iobase = soc ## _USBOTG_BASE_ADDR,                     \
+               .irq = soc ## _INT_USBHOST,                             \
+       }
+
+#ifdef CONFIG_SOC_IMX21
+const struct imx_imx21_hcd_data imx21_imx21_hcd_data __initconst =
+       imx_imx21_hcd_data_entry_single(MX21);
+#endif /* ifdef CONFIG_SOC_IMX21 */
+
+struct platform_device *__init imx_add_imx21_hcd(
+               const struct imx_imx21_hcd_data *data,
+               const struct mx21_usbh_platform_data *pdata)
+{
+       struct resource res[] = {
+               {
+                       .start = data->iobase,
+                       .end = data->iobase + SZ_8K - 1,
+                       .flags = IORESOURCE_MEM,
+               }, {
+                       .start = data->irq,
+                       .end = data->irq,
+                       .flags = IORESOURCE_IRQ,
+               },
+       };
+       return imx_add_platform_device_dmamask("imx21-hcd", 0,
+                       res, ARRAY_SIZE(res),
+                       pdata, sizeof(*pdata), DMA_BIT_MASK(32));
+}
diff --git a/arch/arm/mach-imx/devices/platform-imx27-coda.c b/arch/arm/mach-imx/devices/platform-imx27-coda.c
new file mode 100644 (file)
index 0000000..5499603
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2012 Vista Silicon
+ * Javier Martin <javier.martin@vista-silicon.com>
+ *
+ * This program is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License version 2 as published by the
+ * Free Software Foundation.
+ */
+
+#include <mach/hardware.h>
+#include "devices-common.h"
+
+#ifdef CONFIG_SOC_IMX27
+const struct imx_imx27_coda_data imx27_coda_data __initconst = {
+       .iobase = MX27_VPU_BASE_ADDR,
+       .iosize = SZ_512,
+       .irq = MX27_INT_VPU,
+};
+#endif
+
+struct platform_device *__init imx_add_imx27_coda(
+               const struct imx_imx27_coda_data *data)
+{
+       struct resource res[] = {
+               {
+                       .start = data->iobase,
+                       .end = data->iobase + data->iosize - 1,
+                       .flags = IORESOURCE_MEM,
+               }, {
+                       .start = data->irq,
+                       .end = data->irq,
+                       .flags = IORESOURCE_IRQ,
+               },
+       };
+       return imx_add_platform_device_dmamask("coda-imx27", 0, res, 2, NULL,
+                                       0, DMA_BIT_MASK(32));
+}
diff --git a/arch/arm/mach-imx/devices/platform-imx_udc.c b/arch/arm/mach-imx/devices/platform-imx_udc.c
new file mode 100644 (file)
index 0000000..75aee0b
--- /dev/null
@@ -0,0 +1,75 @@
+/*
+ * Copyright (C) 2010 Pengutronix
+ * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
+ *
+ * This program is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License version 2 as published by the
+ * Free Software Foundation.
+ */
+#include <mach/hardware.h>
+#include "devices-common.h"
+
+#define imx_imx_udc_data_entry_single(soc, _size)                      \
+       {                                                               \
+               .iobase = soc ## _USBD_BASE_ADDR,                       \
+               .iosize = _size,                                        \
+               .irq0 = soc ## _INT_USBD0,                              \
+               .irq1 = soc ## _INT_USBD1,                              \
+               .irq2 = soc ## _INT_USBD2,                              \
+               .irq3 = soc ## _INT_USBD3,                              \
+               .irq4 = soc ## _INT_USBD4,                              \
+               .irq5 = soc ## _INT_USBD5,                              \
+               .irq6 = soc ## _INT_USBD6,                              \
+       }
+
+#define imx_imx_udc_data_entry(soc, _size)                             \
+       [_id] = imx_imx_udc_data_entry_single(soc, _size)
+
+#ifdef CONFIG_SOC_IMX1
+const struct imx_imx_udc_data imx1_imx_udc_data __initconst =
+       imx_imx_udc_data_entry_single(MX1, SZ_4K);
+#endif /* ifdef CONFIG_SOC_IMX1 */
+
+struct platform_device *__init imx_add_imx_udc(
+               const struct imx_imx_udc_data *data,
+               const struct imxusb_platform_data *pdata)
+{
+       struct resource res[] = {
+               {
+                       .start = data->iobase,
+                       .end = data->iobase + data->iosize - 1,
+                       .flags = IORESOURCE_MEM,
+               }, {
+                       .start = data->irq0,
+                       .end = data->irq0,
+                       .flags = IORESOURCE_IRQ,
+               }, {
+                       .start = data->irq1,
+                       .end = data->irq1,
+                       .flags = IORESOURCE_IRQ,
+               }, {
+                       .start = data->irq2,
+                       .end = data->irq2,
+                       .flags = IORESOURCE_IRQ,
+               }, {
+                       .start = data->irq3,
+                       .end = data->irq3,
+                       .flags = IORESOURCE_IRQ,
+               }, {
+                       .start = data->irq4,
+                       .end = data->irq4,
+                       .flags = IORESOURCE_IRQ,
+               }, {
+                       .start = data->irq5,
+                       .end = data->irq5,
+                       .flags = IORESOURCE_IRQ,
+               }, {
+                       .start = data->irq6,
+                       .end = data->irq6,
+                       .flags = IORESOURCE_IRQ,
+               },
+       };
+
+       return imx_add_platform_device("imx_udc", 0,
+                       res, ARRAY_SIZE(res), pdata, sizeof(*pdata));
+}
diff --git a/arch/arm/mach-imx/devices/platform-imxdi_rtc.c b/arch/arm/mach-imx/devices/platform-imxdi_rtc.c
new file mode 100644 (file)
index 0000000..e4b22eb
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2010 Pengutronix
+ * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
+ *
+ * This program is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License version 2 as published by the
+ * Free Software Foundation.
+ */
+#include <asm/sizes.h>
+#include <mach/hardware.h>
+#include "devices-common.h"
+
+#define imx_imxdi_rtc_data_entry_single(soc)                           \
+       {                                                               \
+               .iobase = soc ## _DRYICE_BASE_ADDR,                     \
+               .irq = soc ## _INT_DRYICE,                              \
+       }
+
+#ifdef CONFIG_SOC_IMX25
+const struct imx_imxdi_rtc_data imx25_imxdi_rtc_data __initconst =
+       imx_imxdi_rtc_data_entry_single(MX25);
+#endif /* ifdef CONFIG_SOC_IMX25 */
+
+struct platform_device *__init imx_add_imxdi_rtc(
+               const struct imx_imxdi_rtc_data *data)
+{
+       struct resource res[] = {
+               {
+                       .start = data->iobase,
+                       .end = data->iobase + SZ_16K - 1,
+                       .flags = IORESOURCE_MEM,
+               }, {
+                       .start = data->irq,
+                       .end = data->irq,
+                       .flags = IORESOURCE_IRQ,
+               },
+       };
+
+       return imx_add_platform_device("imxdi_rtc", 0,
+                       res, ARRAY_SIZE(res), NULL, 0);
+}
diff --git a/arch/arm/mach-imx/devices/platform-ipu-core.c b/arch/arm/mach-imx/devices/platform-ipu-core.c
new file mode 100644 (file)
index 0000000..dc0e837
--- /dev/null
@@ -0,0 +1,129 @@
+/*
+ * Copyright (C) 2011 Pengutronix
+ * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
+ *
+ * This program is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License version 2 as published by the
+ * Free Software Foundation.
+ */
+#include <linux/dma-mapping.h>
+#include <mach/hardware.h>
+#include "devices-common.h"
+
+#define imx_ipu_core_entry_single(soc)                                 \
+{                                                                      \
+       .iobase = soc ## _IPU_CTRL_BASE_ADDR,                           \
+       .synirq = soc ## _INT_IPU_SYN,                                  \
+       .errirq = soc ## _INT_IPU_ERR,                                  \
+}
+
+#ifdef CONFIG_SOC_IMX31
+const struct imx_ipu_core_data imx31_ipu_core_data __initconst =
+       imx_ipu_core_entry_single(MX31);
+#endif
+
+#ifdef CONFIG_SOC_IMX35
+const struct imx_ipu_core_data imx35_ipu_core_data __initconst =
+       imx_ipu_core_entry_single(MX35);
+#endif
+
+static struct platform_device *imx_ipu_coredev __initdata;
+
+struct platform_device *__init imx_add_ipu_core(
+               const struct imx_ipu_core_data *data)
+{
+       /* The resource order is important! */
+       struct resource res[] = {
+               {
+                       .start = data->iobase,
+                       .end = data->iobase + 0x5f,
+                       .flags = IORESOURCE_MEM,
+               }, {
+                       .start = data->iobase + 0x88,
+                       .end = data->iobase + 0xb3,
+                       .flags = IORESOURCE_MEM,
+               }, {
+                       .start = data->synirq,
+                       .end = data->synirq,
+                       .flags = IORESOURCE_IRQ,
+               }, {
+                       .start = data->errirq,
+                       .end = data->errirq,
+                       .flags = IORESOURCE_IRQ,
+               },
+       };
+
+       return imx_ipu_coredev = imx_add_platform_device("ipu-core", -1,
+                       res, ARRAY_SIZE(res), NULL, 0);
+}
+
+struct platform_device *__init imx_alloc_mx3_camera(
+               const struct imx_ipu_core_data *data,
+               const struct mx3_camera_pdata *pdata)
+{
+       struct resource res[] = {
+               {
+                       .start = data->iobase + 0x60,
+                       .end = data->iobase + 0x87,
+                       .flags = IORESOURCE_MEM,
+               },
+       };
+       int ret = -ENOMEM;
+       struct platform_device *pdev;
+
+       if (IS_ERR_OR_NULL(imx_ipu_coredev))
+               return ERR_PTR(-ENODEV);
+
+       pdev = platform_device_alloc("mx3-camera", 0);
+       if (!pdev)
+               goto err;
+
+       pdev->dev.dma_mask = kmalloc(sizeof(*pdev->dev.dma_mask), GFP_KERNEL);
+       if (!pdev->dev.dma_mask)
+               goto err;
+
+       *pdev->dev.dma_mask = DMA_BIT_MASK(32);
+       pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
+
+       ret = platform_device_add_resources(pdev, res, ARRAY_SIZE(res));
+       if (ret)
+               goto err;
+
+       if (pdata) {
+               struct mx3_camera_pdata *copied_pdata;
+
+               ret = platform_device_add_data(pdev, pdata, sizeof(*pdata));
+               if (ret) {
+err:
+                       kfree(pdev->dev.dma_mask);
+                       platform_device_put(pdev);
+                       return ERR_PTR(-ENODEV);
+               }
+               copied_pdata = dev_get_platdata(&pdev->dev);
+               copied_pdata->dma_dev = &imx_ipu_coredev->dev;
+       }
+
+       return pdev;
+}
+
+struct platform_device *__init imx_add_mx3_sdc_fb(
+               const struct imx_ipu_core_data *data,
+               struct mx3fb_platform_data *pdata)
+{
+       struct resource res[] = {
+               {
+                       .start = data->iobase + 0xb4,
+                       .end = data->iobase + 0x1bf,
+                       .flags = IORESOURCE_MEM,
+               },
+       };
+
+       if (IS_ERR_OR_NULL(imx_ipu_coredev))
+               return ERR_PTR(-ENODEV);
+
+       pdata->dma_dev = &imx_ipu_coredev->dev;
+
+       return imx_add_platform_device_dmamask("mx3_sdc_fb", -1,
+                       res, ARRAY_SIZE(res), pdata, sizeof(*pdata),
+                       DMA_BIT_MASK(32));
+}
diff --git a/arch/arm/mach-imx/devices/platform-mx1-camera.c b/arch/arm/mach-imx/devices/platform-mx1-camera.c
new file mode 100644 (file)
index 0000000..756b0e6
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2010 Pengutronix
+ * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
+ *
+ * This program is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License version 2 as published by the
+ * Free Software Foundation.
+ */
+#include <mach/hardware.h>
+#include "devices-common.h"
+
+#define imx_mx1_camera_data_entry_single(soc, _size)                   \
+       {                                                               \
+               .iobase = soc ## _CSI ## _BASE_ADDR,                    \
+               .iosize = _size,                                        \
+               .irq = soc ## _INT_CSI,                                 \
+       }
+
+#ifdef CONFIG_SOC_IMX1
+const struct imx_mx1_camera_data imx1_mx1_camera_data __initconst =
+       imx_mx1_camera_data_entry_single(MX1, 10);
+#endif /* ifdef CONFIG_SOC_IMX1 */
+
+struct platform_device *__init imx_add_mx1_camera(
+               const struct imx_mx1_camera_data *data,
+               const struct mx1_camera_pdata *pdata)
+{
+       struct resource res[] = {
+               {
+                       .start = data->iobase,
+                       .end = data->iobase + data->iosize - 1,
+                       .flags = IORESOURCE_MEM,
+               }, {
+                       .start = data->irq,
+                       .end = data->irq,
+                       .flags = IORESOURCE_IRQ,
+               },
+       };
+       return imx_add_platform_device_dmamask("mx1-camera", 0,
+                       res, ARRAY_SIZE(res),
+                       pdata, sizeof(*pdata), DMA_BIT_MASK(32));
+}
diff --git a/arch/arm/mach-imx/devices/platform-mx2-camera.c b/arch/arm/mach-imx/devices/platform-mx2-camera.c
new file mode 100644 (file)
index 0000000..9ad5b2d
--- /dev/null
@@ -0,0 +1,82 @@
+/*
+ * Copyright (C) 2010 Pengutronix
+ * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
+ *
+ * This program is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License version 2 as published by the
+ * Free Software Foundation.
+ */
+#include <mach/hardware.h>
+#include "devices-common.h"
+
+#define imx_mx2_camera_data_entry_single(soc)                          \
+       {                                                               \
+               .iobasecsi = soc ## _CSI_BASE_ADDR,                     \
+               .iosizecsi = SZ_4K,                                     \
+               .irqcsi = soc ## _INT_CSI,                              \
+       }
+#define imx_mx2_camera_data_entry_single_emma(soc)                     \
+       {                                                               \
+               .iobasecsi = soc ## _CSI_BASE_ADDR,                     \
+               .iosizecsi = SZ_32,                                     \
+               .irqcsi = soc ## _INT_CSI,                              \
+               .iobaseemmaprp = soc ## _EMMAPRP_BASE_ADDR,             \
+               .iosizeemmaprp = SZ_32,                                 \
+               .irqemmaprp = soc ## _INT_EMMAPRP,                      \
+       }
+
+#ifdef CONFIG_SOC_IMX25
+const struct imx_mx2_camera_data imx25_mx2_camera_data __initconst =
+       imx_mx2_camera_data_entry_single(MX25);
+#endif /* ifdef CONFIG_SOC_IMX25 */
+
+#ifdef CONFIG_SOC_IMX27
+const struct imx_mx2_camera_data imx27_mx2_camera_data __initconst =
+       imx_mx2_camera_data_entry_single_emma(MX27);
+#endif /* ifdef CONFIG_SOC_IMX27 */
+
+struct platform_device *__init imx_add_mx2_camera(
+               const struct imx_mx2_camera_data *data,
+               const struct mx2_camera_platform_data *pdata)
+{
+       struct resource res[] = {
+               {
+                       .start = data->iobasecsi,
+                       .end = data->iobasecsi + data->iosizecsi - 1,
+                       .flags = IORESOURCE_MEM,
+               }, {
+                       .start = data->irqcsi,
+                       .end = data->irqcsi,
+                       .flags = IORESOURCE_IRQ,
+               }, {
+                       .start = data->iobaseemmaprp,
+                       .end = data->iobaseemmaprp + data->iosizeemmaprp - 1,
+                       .flags = IORESOURCE_MEM,
+               }, {
+                       .start = data->irqemmaprp,
+                       .end = data->irqemmaprp,
+                       .flags = IORESOURCE_IRQ,
+               },
+       };
+       return imx_add_platform_device_dmamask("mx2-camera", 0,
+                       res, data->iobaseemmaprp ? 4 : 2,
+                       pdata, sizeof(*pdata), DMA_BIT_MASK(32));
+}
+
+struct platform_device *__init imx_add_mx2_emmaprp(
+               const struct imx_mx2_camera_data *data)
+{
+       struct resource res[] = {
+               {
+                       .start = data->iobaseemmaprp,
+                       .end = data->iobaseemmaprp + data->iosizeemmaprp - 1,
+                       .flags = IORESOURCE_MEM,
+               }, {
+                       .start = data->irqemmaprp,
+                       .end = data->irqemmaprp,
+                       .flags = IORESOURCE_IRQ,
+               },
+       };
+       return imx_add_platform_device_dmamask("m2m-emmaprp", 0,
+                       res, 2, NULL, 0, DMA_BIT_MASK(32));
+}
diff --git a/arch/arm/mach-imx/devices/platform-mxc-ehci.c b/arch/arm/mach-imx/devices/platform-mxc-ehci.c
new file mode 100644 (file)
index 0000000..27c8171
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * Copyright (C) 2010 Pengutronix
+ * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
+ *
+ * This program is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License version 2 as published by the
+ * Free Software Foundation.
+ */
+#include <linux/dma-mapping.h>
+#include <mach/hardware.h>
+#include "devices-common.h"
+
+#define imx_mxc_ehci_data_entry_single(soc, _id, hs)                   \
+       {                                                               \
+               .id = _id,                                              \
+               .iobase = soc ## _USB_ ## hs ## _BASE_ADDR,             \
+               .irq = soc ## _INT_USB_ ## hs,                          \
+       }
+
+#ifdef CONFIG_SOC_IMX25
+const struct imx_mxc_ehci_data imx25_mxc_ehci_otg_data __initconst =
+       imx_mxc_ehci_data_entry_single(MX25, 0, OTG);
+const struct imx_mxc_ehci_data imx25_mxc_ehci_hs_data __initconst =
+       imx_mxc_ehci_data_entry_single(MX25, 1, HS);
+#endif /* ifdef CONFIG_SOC_IMX25 */
+
+#ifdef CONFIG_SOC_IMX27
+const struct imx_mxc_ehci_data imx27_mxc_ehci_otg_data __initconst =
+       imx_mxc_ehci_data_entry_single(MX27, 0, OTG);
+const struct imx_mxc_ehci_data imx27_mxc_ehci_hs_data[] __initconst = {
+       imx_mxc_ehci_data_entry_single(MX27, 1, HS1),
+       imx_mxc_ehci_data_entry_single(MX27, 2, HS2),
+};
+#endif /* ifdef CONFIG_SOC_IMX27 */
+
+#ifdef CONFIG_SOC_IMX31
+const struct imx_mxc_ehci_data imx31_mxc_ehci_otg_data __initconst =
+       imx_mxc_ehci_data_entry_single(MX31, 0, OTG);
+const struct imx_mxc_ehci_data imx31_mxc_ehci_hs_data[] __initconst = {
+       imx_mxc_ehci_data_entry_single(MX31, 1, HS1),
+       imx_mxc_ehci_data_entry_single(MX31, 2, HS2),
+};
+#endif /* ifdef CONFIG_SOC_IMX31 */
+
+#ifdef CONFIG_SOC_IMX35
+const struct imx_mxc_ehci_data imx35_mxc_ehci_otg_data __initconst =
+       imx_mxc_ehci_data_entry_single(MX35, 0, OTG);
+const struct imx_mxc_ehci_data imx35_mxc_ehci_hs_data __initconst =
+       imx_mxc_ehci_data_entry_single(MX35, 1, HS);
+#endif /* ifdef CONFIG_SOC_IMX35 */
+
+#ifdef CONFIG_SOC_IMX51
+const struct imx_mxc_ehci_data imx51_mxc_ehci_otg_data __initconst =
+       imx_mxc_ehci_data_entry_single(MX51, 0, OTG);
+const struct imx_mxc_ehci_data imx51_mxc_ehci_hs_data[] __initconst = {
+       imx_mxc_ehci_data_entry_single(MX51, 1, HS1),
+       imx_mxc_ehci_data_entry_single(MX51, 2, HS2),
+};
+#endif /* ifdef CONFIG_SOC_IMX51 */
+
+struct platform_device *__init imx_add_mxc_ehci(
+               const struct imx_mxc_ehci_data *data,
+               const struct mxc_usbh_platform_data *pdata)
+{
+       struct resource res[] = {
+               {
+                       .start = data->iobase,
+                       .end = data->iobase + SZ_512 - 1,
+                       .flags = IORESOURCE_MEM,
+               }, {
+                       .start = data->irq,
+                       .end = data->irq,
+                       .flags = IORESOURCE_IRQ,
+               },
+       };
+       return imx_add_platform_device_dmamask("mxc-ehci", data->id,
+                       res, ARRAY_SIZE(res),
+                       pdata, sizeof(*pdata), DMA_BIT_MASK(32));
+}
diff --git a/arch/arm/mach-imx/devices/platform-mxc-mmc.c b/arch/arm/mach-imx/devices/platform-mxc-mmc.c
new file mode 100644 (file)
index 0000000..ce90ab0
--- /dev/null
@@ -0,0 +1,73 @@
+/*
+ * Copyright (C) 2010 Pengutronix
+ * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
+ *
+ * This program is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License version 2 as published by the
+ * Free Software Foundation.
+ */
+#include <linux/dma-mapping.h>
+#include <mach/hardware.h>
+#include "devices-common.h"
+
+#define imx_mxc_mmc_data_entry_single(soc, _id, _hwid, _size)          \
+       {                                                               \
+               .id = _id,                                              \
+               .iobase = soc ## _SDHC ## _hwid ## _BASE_ADDR,          \
+               .iosize = _size,                                        \
+               .irq = soc ## _INT_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)
+
+#ifdef CONFIG_SOC_IMX21
+const struct imx_mxc_mmc_data imx21_mxc_mmc_data[] __initconst = {
+#define imx21_mxc_mmc_data_entry(_id, _hwid)                           \
+       imx_mxc_mmc_data_entry(MX21, _id, _hwid, SZ_4K)
+       imx21_mxc_mmc_data_entry(0, 1),
+       imx21_mxc_mmc_data_entry(1, 2),
+};
+#endif /* ifdef CONFIG_SOC_IMX21 */
+
+#ifdef CONFIG_SOC_IMX27
+const struct imx_mxc_mmc_data imx27_mxc_mmc_data[] __initconst = {
+#define imx27_mxc_mmc_data_entry(_id, _hwid)                           \
+       imx_mxc_mmc_data_entry(MX27, _id, _hwid, SZ_4K)
+       imx27_mxc_mmc_data_entry(0, 1),
+       imx27_mxc_mmc_data_entry(1, 2),
+};
+#endif /* ifdef CONFIG_SOC_IMX27 */
+
+#ifdef CONFIG_SOC_IMX31
+const struct imx_mxc_mmc_data imx31_mxc_mmc_data[] __initconst = {
+#define imx31_mxc_mmc_data_entry(_id, _hwid)                           \
+       imx_mxc_mmc_data_entry(MX31, _id, _hwid, SZ_16K)
+       imx31_mxc_mmc_data_entry(0, 1),
+       imx31_mxc_mmc_data_entry(1, 2),
+};
+#endif /* ifdef CONFIG_SOC_IMX31 */
+
+struct platform_device *__init imx_add_mxc_mmc(
+               const struct imx_mxc_mmc_data *data,
+               const struct imxmmc_platform_data *pdata)
+{
+       struct resource res[] = {
+               {
+                       .start = data->iobase,
+                       .end = data->iobase + SZ_4K - 1,
+                       .flags = IORESOURCE_MEM,
+               }, {
+                       .start = data->irq,
+                       .end = data->irq,
+                       .flags = IORESOURCE_IRQ,
+               }, {
+                       .start = data->dmareq,
+                       .end = data->dmareq,
+                       .flags = IORESOURCE_DMA,
+               },
+       };
+       return imx_add_platform_device_dmamask("mxc-mmc", data->id,
+                       res, ARRAY_SIZE(res),
+                       pdata, sizeof(*pdata), DMA_BIT_MASK(32));
+}
diff --git a/arch/arm/mach-imx/devices/platform-mxc_nand.c b/arch/arm/mach-imx/devices/platform-mxc_nand.c
new file mode 100644 (file)
index 0000000..54b1d02
--- /dev/null
@@ -0,0 +1,82 @@
+/*
+ * Copyright (C) 2009-2010 Pengutronix
+ * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
+ *
+ * This program is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License version 2 as published by the
+ * Free Software Foundation.
+ */
+#include <asm/sizes.h>
+#include <mach/hardware.h>
+#include "devices-common.h"
+
+#define imx_mxc_nand_data_entry_single(soc, _size)                     \
+       {                                                               \
+               .iobase = soc ## _NFC_BASE_ADDR,                        \
+               .iosize = _size,                                        \
+               .irq = soc ## _INT_NFC                                  \
+       }
+
+#define imx_mxc_nandv3_data_entry_single(soc, _size)                   \
+       {                                                               \
+               .id = -1,                                               \
+               .iobase = soc ## _NFC_BASE_ADDR,                        \
+               .iosize = _size,                                        \
+               .axibase = soc ## _NFC_AXI_BASE_ADDR,                   \
+               .irq = soc ## _INT_NFC                                  \
+       }
+
+#ifdef CONFIG_SOC_IMX21
+const struct imx_mxc_nand_data imx21_mxc_nand_data __initconst =
+       imx_mxc_nand_data_entry_single(MX21, SZ_4K);
+#endif /* ifdef CONFIG_SOC_IMX21 */
+
+#ifdef CONFIG_SOC_IMX25
+const struct imx_mxc_nand_data imx25_mxc_nand_data __initconst =
+       imx_mxc_nand_data_entry_single(MX25, SZ_8K);
+#endif /* ifdef CONFIG_SOC_IMX25 */
+
+#ifdef CONFIG_SOC_IMX27
+const struct imx_mxc_nand_data imx27_mxc_nand_data __initconst =
+       imx_mxc_nand_data_entry_single(MX27, SZ_4K);
+#endif /* ifdef CONFIG_SOC_IMX27 */
+
+#ifdef CONFIG_SOC_IMX31
+const struct imx_mxc_nand_data imx31_mxc_nand_data __initconst =
+       imx_mxc_nand_data_entry_single(MX31, SZ_4K);
+#endif
+
+#ifdef CONFIG_SOC_IMX35
+const struct imx_mxc_nand_data imx35_mxc_nand_data __initconst =
+       imx_mxc_nand_data_entry_single(MX35, SZ_8K);
+#endif
+
+#ifdef CONFIG_SOC_IMX51
+const struct imx_mxc_nand_data imx51_mxc_nand_data __initconst =
+       imx_mxc_nandv3_data_entry_single(MX51, SZ_16K);
+#endif
+
+struct platform_device *__init imx_add_mxc_nand(
+               const struct imx_mxc_nand_data *data,
+               const struct mxc_nand_platform_data *pdata)
+{
+       /* AXI has to come first, that's how the mxc_nand driver expect it */
+       struct resource res[] = {
+               {
+                       .start = data->iobase,
+                       .end = data->iobase + data->iosize - 1,
+                       .flags = IORESOURCE_MEM,
+               }, {
+                       .start = data->irq,
+                       .end = data->irq,
+                       .flags = IORESOURCE_IRQ,
+               }, {
+                       .start = data->axibase,
+                       .end = data->axibase + SZ_16K - 1,
+                       .flags = IORESOURCE_MEM,
+               },
+       };
+       return imx_add_platform_device("mxc_nand", data->id,
+                       res, ARRAY_SIZE(res) - !data->axibase,
+                       pdata, sizeof(*pdata));
+}
diff --git a/arch/arm/mach-imx/devices/platform-mxc_pwm.c b/arch/arm/mach-imx/devices/platform-mxc_pwm.c
new file mode 100644 (file)
index 0000000..a0551bf
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2009-2010 Pengutronix
+ * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
+ *
+ * This program is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License version 2 as published by the
+ * Free Software Foundation.
+ */
+#include <mach/hardware.h>
+#include "devices-common.h"
+
+#define imx_mxc_pwm_data_entry_single(soc, _id, _hwid, _size)          \
+       {                                                               \
+               .id = _id,                                              \
+               .iobase = soc ## _PWM ## _hwid ## _BASE_ADDR,           \
+               .iosize = _size,                                        \
+               .irq = soc ## _INT_PWM ## _hwid,                        \
+       }
+#define imx_mxc_pwm_data_entry(soc, _id, _hwid, _size)                 \
+       [_id] = imx_mxc_pwm_data_entry_single(soc, _id, _hwid, _size)
+
+#ifdef CONFIG_SOC_IMX21
+const struct imx_mxc_pwm_data imx21_mxc_pwm_data __initconst =
+       imx_mxc_pwm_data_entry_single(MX21, 0, , SZ_4K);
+#endif /* ifdef CONFIG_SOC_IMX21 */
+
+#ifdef CONFIG_SOC_IMX25
+const struct imx_mxc_pwm_data imx25_mxc_pwm_data[] __initconst = {
+#define imx25_mxc_pwm_data_entry(_id, _hwid)                           \
+       imx_mxc_pwm_data_entry(MX25, _id, _hwid, SZ_16K)
+       imx25_mxc_pwm_data_entry(0, 1),
+       imx25_mxc_pwm_data_entry(1, 2),
+       imx25_mxc_pwm_data_entry(2, 3),
+       imx25_mxc_pwm_data_entry(3, 4),
+};
+#endif /* ifdef CONFIG_SOC_IMX25 */
+
+#ifdef CONFIG_SOC_IMX27
+const struct imx_mxc_pwm_data imx27_mxc_pwm_data __initconst =
+       imx_mxc_pwm_data_entry_single(MX27, 0, , SZ_4K);
+#endif /* ifdef CONFIG_SOC_IMX27 */
+
+#ifdef CONFIG_SOC_IMX51
+const struct imx_mxc_pwm_data imx51_mxc_pwm_data[] __initconst = {
+#define imx51_mxc_pwm_data_entry(_id, _hwid)                           \
+       imx_mxc_pwm_data_entry(MX51, _id, _hwid, SZ_16K)
+       imx51_mxc_pwm_data_entry(0, 1),
+       imx51_mxc_pwm_data_entry(1, 2),
+};
+#endif /* ifdef CONFIG_SOC_IMX51 */
+
+struct platform_device *__init imx_add_mxc_pwm(
+               const struct imx_mxc_pwm_data *data)
+{
+       struct resource res[] = {
+               {
+                       .start = data->iobase,
+                       .end = data->iobase + data->iosize - 1,
+                       .flags = IORESOURCE_MEM,
+               }, {
+                       .start = data->irq,
+                       .end = data->irq,
+                       .flags = IORESOURCE_IRQ,
+               },
+       };
+
+       return imx_add_platform_device("mxc_pwm", data->id,
+                       res, ARRAY_SIZE(res), NULL, 0);
+}
diff --git a/arch/arm/mach-imx/devices/platform-mxc_rnga.c b/arch/arm/mach-imx/devices/platform-mxc_rnga.c
new file mode 100644 (file)
index 0000000..37bb23c
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2010 Pengutronix
+ * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
+ *
+ * This program is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License version 2 as published by the
+ * Free Software Foundation.
+ */
+#include <mach/hardware.h>
+#include "devices-common.h"
+
+struct imx_mxc_rnga_data {
+       resource_size_t iobase;
+};
+
+#define imx_mxc_rnga_data_entry_single(soc)                            \
+       {                                                               \
+               .iobase = soc ## _RNGA_BASE_ADDR,                       \
+       }
+
+#ifdef CONFIG_SOC_IMX31
+static const struct imx_mxc_rnga_data imx31_mxc_rnga_data __initconst =
+       imx_mxc_rnga_data_entry_single(MX31);
+#endif /* ifdef CONFIG_SOC_IMX31 */
+
+static struct platform_device *__init imx_add_mxc_rnga(
+               const struct imx_mxc_rnga_data *data)
+{
+       struct resource res[] = {
+               {
+                       .start = data->iobase,
+                       .end = data->iobase + SZ_16K - 1,
+                       .flags = IORESOURCE_MEM,
+               },
+       };
+       return imx_add_platform_device("mxc_rnga", -1,
+                       res, ARRAY_SIZE(res), NULL, 0);
+}
+
+static int __init imxXX_add_mxc_rnga(void)
+{
+       struct platform_device *ret;
+
+#if defined(CONFIG_SOC_IMX31)
+       if (cpu_is_mx31())
+               ret = imx_add_mxc_rnga(&imx31_mxc_rnga_data);
+       else
+#endif /* if defined(CONFIG_SOC_IMX31) */
+               ret = ERR_PTR(-ENODEV);
+
+       if (IS_ERR(ret))
+               return PTR_ERR(ret);
+
+       return 0;
+}
+arch_initcall(imxXX_add_mxc_rnga);
diff --git a/arch/arm/mach-imx/devices/platform-mxc_rtc.c b/arch/arm/mach-imx/devices/platform-mxc_rtc.c
new file mode 100644 (file)
index 0000000..daaf979
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2010-2011 Pengutronix
+ * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
+ *
+ * This program is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License version 2 as published by the
+ * Free Software Foundation.
+ */
+#include <mach/hardware.h>
+#include "devices-common.h"
+
+#define imx_mxc_rtc_data_entry_single(soc)                             \
+       {                                                               \
+               .iobase = soc ## _RTC_BASE_ADDR,                        \
+               .irq = soc ## _INT_RTC,                                 \
+       }
+
+#ifdef CONFIG_SOC_IMX31
+const struct imx_mxc_rtc_data imx31_mxc_rtc_data __initconst =
+       imx_mxc_rtc_data_entry_single(MX31);
+#endif /* ifdef CONFIG_SOC_IMX31 */
+
+#ifdef CONFIG_SOC_IMX35
+const struct imx_mxc_rtc_data imx35_mxc_rtc_data __initconst =
+       imx_mxc_rtc_data_entry_single(MX35);
+#endif /* ifdef CONFIG_SOC_IMX35 */
+
+struct platform_device *__init imx_add_mxc_rtc(
+               const struct imx_mxc_rtc_data *data)
+{
+       struct resource res[] = {
+               {
+                       .start = data->iobase,
+                       .end = data->iobase + SZ_16K - 1,
+                       .flags = IORESOURCE_MEM,
+               }, {
+                       .start = data->irq,
+                       .end = data->irq,
+                       .flags = IORESOURCE_IRQ,
+               },
+       };
+
+       return imx_add_platform_device("mxc_rtc", -1,
+                       res, ARRAY_SIZE(res), NULL, 0);
+}
diff --git a/arch/arm/mach-imx/devices/platform-mxc_w1.c b/arch/arm/mach-imx/devices/platform-mxc_w1.c
new file mode 100644 (file)
index 0000000..5f972c6
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2010 Pengutronix
+ * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
+ *
+ * This program is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License version 2 as published by the
+ * Free Software Foundation.
+ */
+#include <mach/hardware.h>
+#include "devices-common.h"
+
+#define imx_mxc_w1_data_entry_single(soc)                              \
+       {                                                               \
+               .iobase = soc ## _OWIRE_BASE_ADDR,                      \
+       }
+
+#ifdef CONFIG_SOC_IMX21
+const struct imx_mxc_w1_data imx21_mxc_w1_data __initconst =
+       imx_mxc_w1_data_entry_single(MX21);
+#endif /* ifdef CONFIG_SOC_IMX21 */
+
+#ifdef CONFIG_SOC_IMX27
+const struct imx_mxc_w1_data imx27_mxc_w1_data __initconst =
+       imx_mxc_w1_data_entry_single(MX27);
+#endif /* ifdef CONFIG_SOC_IMX27 */
+
+#ifdef CONFIG_SOC_IMX31
+const struct imx_mxc_w1_data imx31_mxc_w1_data __initconst =
+       imx_mxc_w1_data_entry_single(MX31);
+#endif /* ifdef CONFIG_SOC_IMX31 */
+
+#ifdef CONFIG_SOC_IMX35
+const struct imx_mxc_w1_data imx35_mxc_w1_data __initconst =
+       imx_mxc_w1_data_entry_single(MX35);
+#endif /* ifdef CONFIG_SOC_IMX35 */
+
+struct platform_device *__init imx_add_mxc_w1(
+               const struct imx_mxc_w1_data *data)
+{
+       struct resource res[] = {
+               {
+                       .start = data->iobase,
+                       .end = data->iobase + SZ_4K - 1,
+                       .flags = IORESOURCE_MEM,
+               },
+       };
+
+       return imx_add_platform_device("mxc_w1", 0,
+                       res, ARRAY_SIZE(res), NULL, 0);
+}
diff --git a/arch/arm/mach-imx/devices/platform-pata_imx.c b/arch/arm/mach-imx/devices/platform-pata_imx.c
new file mode 100644 (file)
index 0000000..3627ec8
--- /dev/null
@@ -0,0 +1,59 @@
+/*
+ * This program is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License version 2 as published by the
+ * Free Software Foundation.
+ */
+#include <mach/hardware.h>
+#include "devices-common.h"
+
+#define imx_pata_imx_data_entry_single(soc, _size)                     \
+       {                                                               \
+               .iobase = soc ## _ATA_BASE_ADDR,                        \
+               .iosize = _size,                                        \
+               .irq = soc ## _INT_ATA,                                 \
+       }
+
+#ifdef CONFIG_SOC_IMX27
+const struct imx_pata_imx_data imx27_pata_imx_data __initconst =
+       imx_pata_imx_data_entry_single(MX27, SZ_4K);
+#endif /* ifdef CONFIG_SOC_IMX27 */
+
+#ifdef CONFIG_SOC_IMX31
+const struct imx_pata_imx_data imx31_pata_imx_data __initconst =
+       imx_pata_imx_data_entry_single(MX31, SZ_16K);
+#endif /* ifdef CONFIG_SOC_IMX31 */
+
+#ifdef CONFIG_SOC_IMX35
+const struct imx_pata_imx_data imx35_pata_imx_data __initconst =
+       imx_pata_imx_data_entry_single(MX35, SZ_16K);
+#endif /* ifdef CONFIG_SOC_IMX35 */
+
+#ifdef CONFIG_SOC_IMX51
+const struct imx_pata_imx_data imx51_pata_imx_data __initconst =
+       imx_pata_imx_data_entry_single(MX51, SZ_16K);
+#endif /* ifdef CONFIG_SOC_IMX51 */
+
+#ifdef CONFIG_SOC_IMX53
+const struct imx_pata_imx_data imx53_pata_imx_data __initconst =
+       imx_pata_imx_data_entry_single(MX53, SZ_16K);
+#endif /* ifdef CONFIG_SOC_IMX53 */
+
+struct platform_device *__init imx_add_pata_imx(
+               const struct imx_pata_imx_data *data)
+{
+       struct resource res[] = {
+               {
+                       .start = data->iobase,
+                       .end = data->iobase + data->iosize - 1,
+                       .flags = IORESOURCE_MEM,
+               },
+               {
+                       .start = data->irq,
+                       .end = data->irq,
+                       .flags = IORESOURCE_IRQ,
+               },
+       };
+       return imx_add_platform_device("pata_imx", -1,
+                       res, ARRAY_SIZE(res), NULL, 0);
+}
+
diff --git a/arch/arm/mach-imx/devices/platform-sdhci-esdhc-imx.c b/arch/arm/mach-imx/devices/platform-sdhci-esdhc-imx.c
new file mode 100644 (file)
index 0000000..772ba2d
--- /dev/null
@@ -0,0 +1,99 @@
+/*
+ * Copyright (C) 2010 Pengutronix, Wolfram Sang <w.sang@pengutronix.de>
+ *
+ * This program is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License version 2 as published by the
+ * Free Software Foundation.
+ */
+
+#include <mach/hardware.h>
+#include <linux/platform_data/mmc-esdhc-imx.h>
+#include "devices-common.h"
+
+#define imx_sdhci_esdhc_imx_data_entry_single(soc, _devid, _id, hwid) \
+       {                                                               \
+               .devid = _devid,                                        \
+               .id = _id,                                              \
+               .iobase = soc ## _ESDHC ## hwid ## _BASE_ADDR,  \
+               .irq = soc ## _INT_ESDHC ## hwid,                       \
+       }
+
+#define imx_sdhci_esdhc_imx_data_entry(soc, devid, id, hwid)   \
+       [id] = imx_sdhci_esdhc_imx_data_entry_single(soc, devid, id, hwid)
+
+#ifdef CONFIG_SOC_IMX25
+const struct imx_sdhci_esdhc_imx_data
+imx25_sdhci_esdhc_imx_data[] __initconst = {
+#define imx25_sdhci_esdhc_imx_data_entry(_id, _hwid)                   \
+       imx_sdhci_esdhc_imx_data_entry(MX25, "sdhci-esdhc-imx25", _id, _hwid)
+       imx25_sdhci_esdhc_imx_data_entry(0, 1),
+       imx25_sdhci_esdhc_imx_data_entry(1, 2),
+};
+#endif /* ifdef CONFIG_SOC_IMX25 */
+
+#ifdef CONFIG_SOC_IMX35
+const struct imx_sdhci_esdhc_imx_data
+imx35_sdhci_esdhc_imx_data[] __initconst = {
+#define imx35_sdhci_esdhc_imx_data_entry(_id, _hwid)                   \
+       imx_sdhci_esdhc_imx_data_entry(MX35, "sdhci-esdhc-imx35", _id, _hwid)
+       imx35_sdhci_esdhc_imx_data_entry(0, 1),
+       imx35_sdhci_esdhc_imx_data_entry(1, 2),
+       imx35_sdhci_esdhc_imx_data_entry(2, 3),
+};
+#endif /* ifdef CONFIG_SOC_IMX35 */
+
+#ifdef CONFIG_SOC_IMX51
+const struct imx_sdhci_esdhc_imx_data
+imx51_sdhci_esdhc_imx_data[] __initconst = {
+#define imx51_sdhci_esdhc_imx_data_entry(_id, _hwid)                   \
+       imx_sdhci_esdhc_imx_data_entry(MX51, "sdhci-esdhc-imx51", _id, _hwid)
+       imx51_sdhci_esdhc_imx_data_entry(0, 1),
+       imx51_sdhci_esdhc_imx_data_entry(1, 2),
+       imx51_sdhci_esdhc_imx_data_entry(2, 3),
+       imx51_sdhci_esdhc_imx_data_entry(3, 4),
+};
+#endif /* ifdef CONFIG_SOC_IMX51 */
+
+#ifdef CONFIG_SOC_IMX53
+const struct imx_sdhci_esdhc_imx_data
+imx53_sdhci_esdhc_imx_data[] __initconst = {
+#define imx53_sdhci_esdhc_imx_data_entry(_id, _hwid)                   \
+       imx_sdhci_esdhc_imx_data_entry(MX53, "sdhci-esdhc-imx53", _id, _hwid)
+       imx53_sdhci_esdhc_imx_data_entry(0, 1),
+       imx53_sdhci_esdhc_imx_data_entry(1, 2),
+       imx53_sdhci_esdhc_imx_data_entry(2, 3),
+       imx53_sdhci_esdhc_imx_data_entry(3, 4),
+};
+#endif /* ifdef CONFIG_SOC_IMX53 */
+
+static const struct esdhc_platform_data default_esdhc_pdata __initconst = {
+       .wp_type = ESDHC_WP_NONE,
+       .cd_type = ESDHC_CD_NONE,
+};
+
+struct platform_device *__init imx_add_sdhci_esdhc_imx(
+               const struct imx_sdhci_esdhc_imx_data *data,
+               const struct esdhc_platform_data *pdata)
+{
+       struct resource res[] = {
+               {
+                       .start = data->iobase,
+                       .end = data->iobase + SZ_16K - 1,
+                       .flags = IORESOURCE_MEM,
+               }, {
+                       .start = data->irq,
+                       .end = data->irq,
+                       .flags = IORESOURCE_IRQ,
+               },
+       };
+
+       /*
+        * If machine does not provide pdata, use the default one
+        * which means no WP/CD support
+        */
+       if (!pdata)
+               pdata = &default_esdhc_pdata;
+
+       return imx_add_platform_device(data->devid, data->id, res,
+                       ARRAY_SIZE(res), pdata, sizeof(*pdata));
+}
diff --git a/arch/arm/mach-imx/devices/platform-spi_imx.c b/arch/arm/mach-imx/devices/platform-spi_imx.c
new file mode 100644 (file)
index 0000000..63a116b
--- /dev/null
@@ -0,0 +1,127 @@
+/*
+ * Copyright (C) 2009-2010 Pengutronix
+ * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
+ *
+ * This program is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License version 2 as published by the
+ * Free Software Foundation.
+ */
+#include <mach/hardware.h>
+#include "devices-common.h"
+
+#define imx_spi_imx_data_entry_single(soc, type, _devid, _id, hwid, _size) \
+       {                                                               \
+               .devid = _devid,                                        \
+               .id = _id,                                              \
+               .iobase = soc ## _ ## type ## hwid ## _BASE_ADDR,       \
+               .iosize = _size,                                        \
+               .irq = soc ## _INT_ ## type ## hwid,                    \
+       }
+
+#define imx_spi_imx_data_entry(soc, type, devid, id, hwid, size)       \
+       [id] = imx_spi_imx_data_entry_single(soc, type, devid, id, hwid, size)
+
+#ifdef CONFIG_SOC_IMX1
+const struct imx_spi_imx_data imx1_cspi_data[] __initconst = {
+#define imx1_cspi_data_entry(_id, _hwid) \
+       imx_spi_imx_data_entry(MX1, CSPI, "imx1-cspi", _id, _hwid, SZ_4K)
+       imx1_cspi_data_entry(0, 1),
+       imx1_cspi_data_entry(1, 2),
+};
+#endif
+
+#ifdef CONFIG_SOC_IMX21
+const struct imx_spi_imx_data imx21_cspi_data[] __initconst = {
+#define imx21_cspi_data_entry(_id, _hwid)                            \
+       imx_spi_imx_data_entry(MX21, CSPI, "imx21-cspi", _id, _hwid, SZ_4K)
+       imx21_cspi_data_entry(0, 1),
+       imx21_cspi_data_entry(1, 2),
+};
+#endif
+
+#ifdef CONFIG_SOC_IMX25
+/* i.mx25 has the i.mx35 type cspi */
+const struct imx_spi_imx_data imx25_cspi_data[] __initconst = {
+#define imx25_cspi_data_entry(_id, _hwid)                              \
+       imx_spi_imx_data_entry(MX25, CSPI, "imx35-cspi", _id, _hwid, SZ_16K)
+       imx25_cspi_data_entry(0, 1),
+       imx25_cspi_data_entry(1, 2),
+       imx25_cspi_data_entry(2, 3),
+};
+#endif /* ifdef CONFIG_SOC_IMX25 */
+
+#ifdef CONFIG_SOC_IMX27
+const struct imx_spi_imx_data imx27_cspi_data[] __initconst = {
+#define imx27_cspi_data_entry(_id, _hwid)                              \
+       imx_spi_imx_data_entry(MX27, CSPI, "imx27-cspi", _id, _hwid, SZ_4K)
+       imx27_cspi_data_entry(0, 1),
+       imx27_cspi_data_entry(1, 2),
+       imx27_cspi_data_entry(2, 3),
+};
+#endif /* ifdef CONFIG_SOC_IMX27 */
+
+#ifdef CONFIG_SOC_IMX31
+const struct imx_spi_imx_data imx31_cspi_data[] __initconst = {
+#define imx31_cspi_data_entry(_id, _hwid)                              \
+       imx_spi_imx_data_entry(MX31, CSPI, "imx31-cspi", _id, _hwid, SZ_4K)
+       imx31_cspi_data_entry(0, 1),
+       imx31_cspi_data_entry(1, 2),
+       imx31_cspi_data_entry(2, 3),
+};
+#endif /* ifdef CONFIG_SOC_IMX31 */
+
+#ifdef CONFIG_SOC_IMX35
+const struct imx_spi_imx_data imx35_cspi_data[] __initconst = {
+#define imx35_cspi_data_entry(_id, _hwid)                           \
+       imx_spi_imx_data_entry(MX35, CSPI, "imx35-cspi", _id, _hwid, SZ_4K)
+       imx35_cspi_data_entry(0, 1),
+       imx35_cspi_data_entry(1, 2),
+};
+#endif /* ifdef CONFIG_SOC_IMX35 */
+
+#ifdef CONFIG_SOC_IMX51
+/* i.mx51 has the i.mx35 type cspi */
+const struct imx_spi_imx_data imx51_cspi_data __initconst =
+       imx_spi_imx_data_entry_single(MX51, CSPI, "imx35-cspi", 2, , SZ_4K);
+
+const struct imx_spi_imx_data imx51_ecspi_data[] __initconst = {
+#define imx51_ecspi_data_entry(_id, _hwid)                             \
+       imx_spi_imx_data_entry(MX51, ECSPI, "imx51-ecspi", _id, _hwid, SZ_4K)
+       imx51_ecspi_data_entry(0, 1),
+       imx51_ecspi_data_entry(1, 2),
+};
+#endif /* ifdef CONFIG_SOC_IMX51 */
+
+#ifdef CONFIG_SOC_IMX53
+/* i.mx53 has the i.mx35 type cspi */
+const struct imx_spi_imx_data imx53_cspi_data __initconst =
+       imx_spi_imx_data_entry_single(MX53, CSPI, "imx35-cspi", 2, , SZ_4K);
+
+/* i.mx53 has the i.mx51 type ecspi */
+const struct imx_spi_imx_data imx53_ecspi_data[] __initconst = {
+#define imx53_ecspi_data_entry(_id, _hwid)                             \
+       imx_spi_imx_data_entry(MX53, ECSPI, "imx51-ecspi", _id, _hwid, SZ_4K)
+       imx53_ecspi_data_entry(0, 1),
+       imx53_ecspi_data_entry(1, 2),
+};
+#endif /* ifdef CONFIG_SOC_IMX53 */
+
+struct platform_device *__init imx_add_spi_imx(
+               const struct imx_spi_imx_data *data,
+               const struct spi_imx_master *pdata)
+{
+       struct resource res[] = {
+               {
+                       .start = data->iobase,
+                       .end = data->iobase + data->iosize - 1,
+                       .flags = IORESOURCE_MEM,
+               }, {
+                       .start = data->irq,
+                       .end = data->irq,
+                       .flags = IORESOURCE_IRQ,
+               },
+       };
+
+       return imx_add_platform_device(data->devid, data->id,
+                       res, ARRAY_SIZE(res), pdata, sizeof(*pdata));
+}
index 5fda6810c1622be8598235ec1670f0036a5e0a2e..79d94aaa0640fd52d487dde90c1e80273e87eb20 100644 (file)
 #include <linux/pinctrl/machine.h>
 #include <mach/hardware.h>
 #include <mach/common.h>
-#include <mach/devices-common.h>
 #include <asm/pgtable.h>
 #include <asm/mach/map.h>
 
+#include "devices/devices-common.h"
 #include "iomux-v1.h"
 
 /* MX21 memory map definition */
index 47bde02f7f55a92a0d27df213746c1fa6bc7a56f..c8ea3aaf43230f322ed7b53b9fba5a26a8a5ab70 100644 (file)
 #include <asm/mach/map.h>
 
 #include <mach/common.h>
-#include <mach/devices-common.h>
 #include <mach/hardware.h>
 #include <mach/mx25.h>
 
+#include "devices/devices-common.h"
 #include "iomux-v3.h"
 
 /*
index 8d8133eb42667aee9f569194307a1d1ebd73c744..6d91808a04450c2055ec47d8ba68ea20be150967 100644 (file)
 #include <linux/pinctrl/machine.h>
 #include <mach/hardware.h>
 #include <mach/common.h>
-#include <mach/devices-common.h>
 #include <asm/pgtable.h>
 #include <asm/mach/map.h>
 
+#include "devices/devices-common.h"
 #include "iomux-v1.h"
 
 /* MX27 memory map definition */
index 87fb8644d65a7a154c24fe5e6d1372faa34c4f22..6a5d4e496f8c75a5206c12c0d68dd7a79475cd05 100644 (file)
 #include <asm/mach/map.h>
 
 #include <mach/common.h>
-#include <mach/devices-common.h>
 #include <mach/hardware.h>
 
 #include "crmregs-imx3.h"
+#include "devices/devices-common.h"
 #include "iomux-v3.h"
 
 void __iomem *mx3_ccm_base;
index b721b79901789385cde7069d7c21d2c76b227ffa..cc1423c0cce80f59c605ac9a98eea10327e76f0f 100644 (file)
@@ -20,8 +20,8 @@
 
 #include <mach/hardware.h>
 #include <mach/common.h>
-#include <mach/devices-common.h>
 
+#include "devices/devices-common.h"
 #include "iomux-v3.h"
 
 /*
index 822103bdb7092eab3ba63c3260f9da4f587abc2f..884dc9453d30979aa676d84accb4f949df57809d 100644 (file)
@@ -11,8 +11,8 @@
 #include <linux/io.h>
 #include <mach/common.h>
 #include <mach/hardware.h>
-#include <mach/devices-common.h>
 #include "crmregs-imx3.h"
+#include "devices/devices-common.h"
 
 /*
  * Set cpu low power mode before WFI instruction. This function is called
index 5a75ecfc186afc13e4ae56e14266edc124fcd71b..559c9d846275b5635930951bfc704b394bb0fcbb 100644 (file)
@@ -1,7 +1,5 @@
 if ARCH_MXC
 
-source "arch/arm/plat-mxc/devices/Kconfig"
-
 menu "Freescale MXC Implementations"
 
 choice
index 7cc047c7144d6cdd49b9696b28d456e345099fe6..e33d2d139ba1bcc1543943068fbdc57cba2566a1 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 # Common support
-obj-y := time.o devices.o cpu.o system.o irq-common.o
+obj-y := time.o cpu.o system.o irq-common.o
 
 obj-$(CONFIG_MXC_TZIC) += tzic.o
 obj-$(CONFIG_MXC_AVIC) += avic.o
@@ -18,5 +18,3 @@ ifdef CONFIG_SND_IMX_SOC
 obj-y += ssi-fiq.o
 obj-y += ssi-fiq-ksym.o
 endif
-
-obj-y += devices/
diff --git a/arch/arm/plat-mxc/devices.c b/arch/arm/plat-mxc/devices.c
deleted file mode 100644 (file)
index 4d55a7a..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright 2008 Sascha Hauer, kernel@pengutronix.de
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA  02110-1301, USA.
- */
-
-#include <linux/kernel.h>
-#include <linux/slab.h>
-#include <linux/init.h>
-#include <linux/err.h>
-#include <linux/platform_device.h>
-#include <mach/common.h>
-
-struct device mxc_aips_bus = {
-       .init_name      = "mxc_aips",
-       .parent         = &platform_bus,
-};
-
-struct device mxc_ahb_bus = {
-       .init_name      = "mxc_ahb",
-       .parent         = &platform_bus,
-};
-
-static int __init mxc_device_init(void)
-{
-       int ret;
-
-       ret = device_register(&mxc_aips_bus);
-       if (IS_ERR_VALUE(ret))
-               goto done;
-
-       ret = device_register(&mxc_ahb_bus);
-
-done:
-       return ret;
-}
-core_initcall(mxc_device_init);
diff --git a/arch/arm/plat-mxc/devices/Kconfig b/arch/arm/plat-mxc/devices/Kconfig
deleted file mode 100644 (file)
index a35d984..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-config IMX_HAVE_PLATFORM_FEC
-       bool
-       default y if ARCH_MX25 || SOC_IMX27 || SOC_IMX35 || SOC_IMX50 || SOC_IMX51 || SOC_IMX53
-
-config IMX_HAVE_PLATFORM_FLEXCAN
-       bool
-       select HAVE_CAN_FLEXCAN if CAN
-
-config IMX_HAVE_PLATFORM_FSL_USB2_UDC
-       bool
-
-config IMX_HAVE_PLATFORM_GPIO_KEYS
-       bool
-       default y if SOC_IMX51
-
-config IMX_HAVE_PLATFORM_IMX21_HCD
-       bool
-
-config IMX_HAVE_PLATFORM_IMX27_CODA
-       bool
-       default y if SOC_IMX27
-
-config IMX_HAVE_PLATFORM_IMX2_WDT
-       bool
-
-config IMX_HAVE_PLATFORM_IMXDI_RTC
-       bool
-
-config IMX_HAVE_PLATFORM_IMX_FB
-       bool
-
-config IMX_HAVE_PLATFORM_IMX_I2C
-       bool
-
-config IMX_HAVE_PLATFORM_IMX_KEYPAD
-       bool
-
-config IMX_HAVE_PLATFORM_PATA_IMX
-       bool
-
-config IMX_HAVE_PLATFORM_IMX_SSI
-       bool
-
-config IMX_HAVE_PLATFORM_IMX_UART
-       bool
-
-config IMX_HAVE_PLATFORM_IMX_UDC
-       bool
-
-config IMX_HAVE_PLATFORM_IPU_CORE
-       bool
-
-config IMX_HAVE_PLATFORM_MX1_CAMERA
-       bool
-
-config IMX_HAVE_PLATFORM_MX2_CAMERA
-       bool
-
-config IMX_HAVE_PLATFORM_MXC_EHCI
-       bool
-
-config IMX_HAVE_PLATFORM_MXC_MMC
-       bool
-
-config IMX_HAVE_PLATFORM_MXC_NAND
-       bool
-
-config IMX_HAVE_PLATFORM_MXC_PWM
-       bool
-
-config IMX_HAVE_PLATFORM_MXC_RNGA
-       bool
-       select ARCH_HAS_RNGA
-
-config IMX_HAVE_PLATFORM_MXC_RTC
-       bool
-
-config IMX_HAVE_PLATFORM_MXC_W1
-       bool
-
-config IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX
-       bool
-
-config IMX_HAVE_PLATFORM_SPI_IMX
-       bool
-
-config IMX_HAVE_PLATFORM_AHCI
-       bool
-       default y if ARCH_MX53
diff --git a/arch/arm/plat-mxc/devices/Makefile b/arch/arm/plat-mxc/devices/Makefile
deleted file mode 100644 (file)
index 76f3195..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-obj-$(CONFIG_IMX_HAVE_PLATFORM_FEC) += platform-fec.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_GPIO_KEYS) += platform-gpio_keys.o
-obj-y += platform-gpio-mxc.o
-obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX21_HCD) += platform-imx21-hcd.o
-obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX27_CODA) += platform-imx27-coda.o
-obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX2_WDT) += platform-imx2-wdt.o
-obj-$(CONFIG_IMX_HAVE_PLATFORM_IMXDI_RTC) += platform-imxdi_rtc.o
-obj-y += platform-imx-dma.o
-obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_FB) += platform-imx-fb.o
-obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_I2C) += platform-imx-i2c.o
-obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_KEYPAD) += platform-imx-keypad.o
-obj-$(CONFIG_IMX_HAVE_PLATFORM_PATA_IMX) += platform-pata_imx.o
-obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_SSI) += platform-imx-ssi.o
-obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_UART) += platform-imx-uart.o
-obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_UDC) += platform-imx_udc.o
-obj-$(CONFIG_IMX_HAVE_PLATFORM_IPU_CORE) += platform-ipu-core.o
-obj-$(CONFIG_IMX_HAVE_PLATFORM_MX1_CAMERA) += platform-mx1-camera.o
-obj-$(CONFIG_IMX_HAVE_PLATFORM_MX2_CAMERA) += platform-mx2-camera.o
-obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_EHCI) += platform-mxc-ehci.o
-obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_MMC) += platform-mxc-mmc.o
-obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_NAND) += platform-mxc_nand.o
-obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_PWM) += platform-mxc_pwm.o
-obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_RNGA) += platform-mxc_rnga.o
-obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_RTC) += platform-mxc_rtc.o
-obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_W1) += platform-mxc_w1.o
-obj-$(CONFIG_IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX) += platform-sdhci-esdhc-imx.o
-obj-$(CONFIG_IMX_HAVE_PLATFORM_SPI_IMX) +=  platform-spi_imx.o
-obj-$(CONFIG_IMX_HAVE_PLATFORM_AHCI) +=  platform-ahci-imx.o
diff --git a/arch/arm/plat-mxc/devices/platform-ahci-imx.c b/arch/arm/plat-mxc/devices/platform-ahci-imx.c
deleted file mode 100644 (file)
index ade4a1c..0000000
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * Copyright (C) 2011 Freescale Semiconductor, Inc. All Rights Reserved.
- */
-
-/*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
-
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#include <linux/io.h>
-#include <linux/clk.h>
-#include <linux/err.h>
-#include <linux/device.h>
-#include <linux/dma-mapping.h>
-#include <asm/sizes.h>
-#include <mach/hardware.h>
-#include <mach/devices-common.h>
-
-#define imx_ahci_imx_data_entry_single(soc, _devid)            \
-       {                                                               \
-               .devid = _devid,                                        \
-               .iobase = soc ## _SATA_BASE_ADDR,                       \
-               .irq = soc ## _INT_SATA,                                \
-       }
-
-#ifdef CONFIG_SOC_IMX53
-const struct imx_ahci_imx_data imx53_ahci_imx_data __initconst =
-       imx_ahci_imx_data_entry_single(MX53, "imx53-ahci");
-#endif
-
-enum {
-       HOST_CAP = 0x00,
-       HOST_CAP_SSS = (1 << 27), /* Staggered Spin-up */
-       HOST_PORTS_IMPL = 0x0c,
-       HOST_TIMER1MS = 0xe0, /* Timer 1-ms */
-};
-
-static struct clk *sata_clk, *sata_ref_clk;
-
-/* AHCI module Initialization, if return 0, initialization is successful. */
-static int imx_sata_init(struct device *dev, void __iomem *addr)
-{
-       u32 tmpdata;
-       int ret = 0;
-       struct clk *clk;
-
-       sata_clk = clk_get(dev, "ahci");
-       if (IS_ERR(sata_clk)) {
-               dev_err(dev, "no sata clock.\n");
-               return PTR_ERR(sata_clk);
-       }
-       ret = clk_prepare_enable(sata_clk);
-       if (ret) {
-               dev_err(dev, "can't prepare/enable sata clock.\n");
-               goto put_sata_clk;
-       }
-
-       /* Get the AHCI SATA PHY CLK */
-       sata_ref_clk = clk_get(dev, "ahci_phy");
-       if (IS_ERR(sata_ref_clk)) {
-               dev_err(dev, "no sata ref clock.\n");
-               ret = PTR_ERR(sata_ref_clk);
-               goto release_sata_clk;
-       }
-       ret = clk_prepare_enable(sata_ref_clk);
-       if (ret) {
-               dev_err(dev, "can't prepare/enable sata ref clock.\n");
-               goto put_sata_ref_clk;
-       }
-
-       /* Get the AHB clock rate, and configure the TIMER1MS reg later */
-       clk = clk_get(dev, "ahci_dma");
-       if (IS_ERR(clk)) {
-               dev_err(dev, "no dma clock.\n");
-               ret = PTR_ERR(clk);
-               goto release_sata_ref_clk;
-       }
-       tmpdata = clk_get_rate(clk) / 1000;
-       clk_put(clk);
-
-       writel(tmpdata, addr + HOST_TIMER1MS);
-
-       tmpdata = readl(addr + HOST_CAP);
-       if (!(tmpdata & HOST_CAP_SSS)) {
-               tmpdata |= HOST_CAP_SSS;
-               writel(tmpdata, addr + HOST_CAP);
-       }
-
-       if (!(readl(addr + HOST_PORTS_IMPL) & 0x1))
-               writel((readl(addr + HOST_PORTS_IMPL) | 0x1),
-                       addr + HOST_PORTS_IMPL);
-
-       return 0;
-
-release_sata_ref_clk:
-       clk_disable_unprepare(sata_ref_clk);
-put_sata_ref_clk:
-       clk_put(sata_ref_clk);
-release_sata_clk:
-       clk_disable_unprepare(sata_clk);
-put_sata_clk:
-       clk_put(sata_clk);
-
-       return ret;
-}
-
-static void imx_sata_exit(struct device *dev)
-{
-       clk_disable_unprepare(sata_ref_clk);
-       clk_put(sata_ref_clk);
-
-       clk_disable_unprepare(sata_clk);
-       clk_put(sata_clk);
-
-}
-struct platform_device *__init imx_add_ahci_imx(
-               const struct imx_ahci_imx_data *data,
-               const struct ahci_platform_data *pdata)
-{
-       struct resource res[] = {
-               {
-                       .start = data->iobase,
-                       .end = data->iobase + SZ_4K - 1,
-                       .flags = IORESOURCE_MEM,
-               }, {
-                       .start = data->irq,
-                       .end = data->irq,
-                       .flags = IORESOURCE_IRQ,
-               },
-       };
-
-       return imx_add_platform_device_dmamask(data->devid, 0,
-                       res, ARRAY_SIZE(res),
-                       pdata, sizeof(*pdata),  DMA_BIT_MASK(32));
-}
-
-struct platform_device *__init imx53_add_ahci_imx(void)
-{
-       struct ahci_platform_data pdata = {
-               .init = imx_sata_init,
-               .exit = imx_sata_exit,
-       };
-
-       return imx_add_ahci_imx(&imx53_ahci_imx_data, &pdata);
-}
diff --git a/arch/arm/plat-mxc/devices/platform-fec.c b/arch/arm/plat-mxc/devices/platform-fec.c
deleted file mode 100644 (file)
index 0bae44e..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright (C) 2010 Pengutronix
- * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
- *
- * This program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License version 2 as published by the
- * Free Software Foundation.
- */
-#include <linux/dma-mapping.h>
-#include <asm/sizes.h>
-#include <mach/hardware.h>
-#include <mach/devices-common.h>
-
-#define imx_fec_data_entry_single(soc, _devid)                         \
-       {                                                               \
-               .devid = _devid,                                        \
-               .iobase = soc ## _FEC_BASE_ADDR,                        \
-               .irq = soc ## _INT_FEC,                                 \
-       }
-
-#ifdef CONFIG_SOC_IMX25
-const struct imx_fec_data imx25_fec_data __initconst =
-       imx_fec_data_entry_single(MX25, "imx25-fec");
-#endif /* ifdef CONFIG_SOC_IMX25 */
-
-#ifdef CONFIG_SOC_IMX27
-const struct imx_fec_data imx27_fec_data __initconst =
-       imx_fec_data_entry_single(MX27, "imx27-fec");
-#endif /* ifdef CONFIG_SOC_IMX27 */
-
-#ifdef CONFIG_SOC_IMX35
-/* i.mx35 has the i.mx27 type fec */
-const struct imx_fec_data imx35_fec_data __initconst =
-       imx_fec_data_entry_single(MX35, "imx27-fec");
-#endif
-
-#ifdef CONFIG_SOC_IMX50
-/* i.mx50 has the i.mx25 type fec */
-const struct imx_fec_data imx50_fec_data __initconst =
-       imx_fec_data_entry_single(MX50, "imx25-fec");
-#endif
-
-#ifdef CONFIG_SOC_IMX51
-/* i.mx51 has the i.mx27 type fec */
-const struct imx_fec_data imx51_fec_data __initconst =
-       imx_fec_data_entry_single(MX51, "imx27-fec");
-#endif
-
-#ifdef CONFIG_SOC_IMX53
-/* i.mx53 has the i.mx25 type fec */
-const struct imx_fec_data imx53_fec_data __initconst =
-       imx_fec_data_entry_single(MX53, "imx25-fec");
-#endif
-
-struct platform_device *__init imx_add_fec(
-               const struct imx_fec_data *data,
-               const struct fec_platform_data *pdata)
-{
-       struct resource res[] = {
-               {
-                       .start = data->iobase,
-                       .end = data->iobase + SZ_4K - 1,
-                       .flags = IORESOURCE_MEM,
-               }, {
-                       .start = data->irq,
-                       .end = data->irq,
-                       .flags = IORESOURCE_IRQ,
-               },
-       };
-
-       return imx_add_platform_device_dmamask(data->devid, 0,
-                       res, ARRAY_SIZE(res),
-                       pdata, sizeof(*pdata), DMA_BIT_MASK(32));
-}
diff --git a/arch/arm/plat-mxc/devices/platform-flexcan.c b/arch/arm/plat-mxc/devices/platform-flexcan.c
deleted file mode 100644 (file)
index 4e8497a..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (C) 2010 Pengutronix, Marc Kleine-Budde <kernel@pengutronix.de>
- *
- * This program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License version 2 as published by the
- * Free Software Foundation.
- */
-#include <mach/hardware.h>
-#include <mach/devices-common.h>
-
-#define imx_flexcan_data_entry_single(soc, _id, _hwid, _size)          \
-       {                                                               \
-               .id = _id,                                              \
-               .iobase = soc ## _CAN ## _hwid ## _BASE_ADDR,           \
-               .iosize = _size,                                        \
-               .irq = soc ## _INT_CAN ## _hwid,                        \
-       }
-
-#define imx_flexcan_data_entry(soc, _id, _hwid, _size)                 \
-       [_id] = imx_flexcan_data_entry_single(soc, _id, _hwid, _size)
-
-#ifdef CONFIG_SOC_IMX25
-const struct imx_flexcan_data imx25_flexcan_data[] __initconst = {
-#define imx25_flexcan_data_entry(_id, _hwid)                           \
-       imx_flexcan_data_entry(MX25, _id, _hwid, SZ_16K)
-       imx25_flexcan_data_entry(0, 1),
-       imx25_flexcan_data_entry(1, 2),
-};
-#endif /* ifdef CONFIG_SOC_IMX25 */
-
-#ifdef CONFIG_SOC_IMX35
-const struct imx_flexcan_data imx35_flexcan_data[] __initconst = {
-#define imx35_flexcan_data_entry(_id, _hwid)                           \
-       imx_flexcan_data_entry(MX35, _id, _hwid, SZ_16K)
-       imx35_flexcan_data_entry(0, 1),
-       imx35_flexcan_data_entry(1, 2),
-};
-#endif /* ifdef CONFIG_SOC_IMX35 */
-
-struct platform_device *__init imx_add_flexcan(
-               const struct imx_flexcan_data *data,
-               const struct flexcan_platform_data *pdata)
-{
-       struct resource res[] = {
-               {
-                       .start = data->iobase,
-                       .end = data->iobase + data->iosize - 1,
-                       .flags = IORESOURCE_MEM,
-               }, {
-                       .start = data->irq,
-                       .end = data->irq,
-                       .flags = IORESOURCE_IRQ,
-               },
-       };
-
-       return imx_add_platform_device("flexcan", data->id,
-                       res, ARRAY_SIZE(res), pdata, sizeof(*pdata));
-}
diff --git a/arch/arm/plat-mxc/devices/platform-fsl-usb2-udc.c b/arch/arm/plat-mxc/devices/platform-fsl-usb2-udc.c
deleted file mode 100644 (file)
index 848038f..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (C) 2010 Pengutronix
- * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
- *
- * This program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License version 2 as published by the
- * Free Software Foundation.
- */
-#include <linux/dma-mapping.h>
-#include <mach/hardware.h>
-#include <mach/devices-common.h>
-
-#define imx_fsl_usb2_udc_data_entry_single(soc)                                \
-       {                                                               \
-               .iobase = soc ## _USB_OTG_BASE_ADDR,                    \
-               .irq = soc ## _INT_USB_OTG,                             \
-       }
-
-#ifdef CONFIG_SOC_IMX25
-const struct imx_fsl_usb2_udc_data imx25_fsl_usb2_udc_data __initconst =
-       imx_fsl_usb2_udc_data_entry_single(MX25);
-#endif /* ifdef CONFIG_SOC_IMX25 */
-
-#ifdef CONFIG_SOC_IMX27
-const struct imx_fsl_usb2_udc_data imx27_fsl_usb2_udc_data __initconst =
-       imx_fsl_usb2_udc_data_entry_single(MX27);
-#endif /* ifdef CONFIG_SOC_IMX27 */
-
-#ifdef CONFIG_SOC_IMX31
-const struct imx_fsl_usb2_udc_data imx31_fsl_usb2_udc_data __initconst =
-       imx_fsl_usb2_udc_data_entry_single(MX31);
-#endif /* ifdef CONFIG_SOC_IMX31 */
-
-#ifdef CONFIG_SOC_IMX35
-const struct imx_fsl_usb2_udc_data imx35_fsl_usb2_udc_data __initconst =
-       imx_fsl_usb2_udc_data_entry_single(MX35);
-#endif /* ifdef CONFIG_SOC_IMX35 */
-
-#ifdef CONFIG_SOC_IMX51
-const struct imx_fsl_usb2_udc_data imx51_fsl_usb2_udc_data __initconst =
-       imx_fsl_usb2_udc_data_entry_single(MX51);
-#endif
-
-struct platform_device *__init imx_add_fsl_usb2_udc(
-               const struct imx_fsl_usb2_udc_data *data,
-               const struct fsl_usb2_platform_data *pdata)
-{
-       struct resource res[] = {
-               {
-                       .start = data->iobase,
-                       .end = data->iobase + SZ_512 - 1,
-                       .flags = IORESOURCE_MEM,
-               }, {
-                       .start = data->irq,
-                       .end = data->irq,
-                       .flags = IORESOURCE_IRQ,
-               },
-       };
-       return imx_add_platform_device_dmamask("fsl-usb2-udc", -1,
-                       res, ARRAY_SIZE(res),
-                       pdata, sizeof(*pdata), DMA_BIT_MASK(32));
-}
diff --git a/arch/arm/plat-mxc/devices/platform-gpio-mxc.c b/arch/arm/plat-mxc/devices/platform-gpio-mxc.c
deleted file mode 100644 (file)
index a7919a2..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright 2011 Freescale Semiconductor, Inc. All Rights Reserved.
- * Copyright 2011 Linaro Limited
- *
- * This program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License version 2 as published by the
- * Free Software Foundation.
- */
-#include <mach/devices-common.h>
-
-struct platform_device *__init mxc_register_gpio(char *name, int id,
-       resource_size_t iobase, resource_size_t iosize, int irq, int irq_high)
-{
-       struct resource res[] = {
-               {
-                       .start = iobase,
-                       .end = iobase + iosize - 1,
-                       .flags = IORESOURCE_MEM,
-               }, {
-                       .start = irq,
-                       .end = irq,
-                       .flags = IORESOURCE_IRQ,
-               }, {
-                       .start = irq_high,
-                       .end = irq_high,
-                       .flags = IORESOURCE_IRQ,
-               },
-       };
-
-       return platform_device_register_resndata(&mxc_aips_bus,
-                       name, id, res, ARRAY_SIZE(res), NULL, 0);
-}
diff --git a/arch/arm/plat-mxc/devices/platform-gpio_keys.c b/arch/arm/plat-mxc/devices/platform-gpio_keys.c
deleted file mode 100644 (file)
index 1c53a53..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright (C) 2010 Freescale Semiconductor, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA  02110-1301, USA.
- */
-#include <asm/sizes.h>
-#include <mach/hardware.h>
-#include <mach/devices-common.h>
-
-struct platform_device *__init imx_add_gpio_keys(
-               const struct gpio_keys_platform_data *pdata)
-{
-       return imx_add_platform_device("gpio-keys", -1, NULL,
-                0, pdata, sizeof(*pdata));
-}
diff --git a/arch/arm/plat-mxc/devices/platform-imx-dma.c b/arch/arm/plat-mxc/devices/platform-imx-dma.c
deleted file mode 100644 (file)
index 7fa7e9c..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (C) 2010 Pengutronix
- * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
- *
- * This program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License version 2 as published by the
- * Free Software Foundation.
- */
-#include <mach/devices-common.h>
-
-struct platform_device __init __maybe_unused *imx_add_imx_dma(void)
-{
-       return platform_device_register_resndata(&mxc_ahb_bus,
-                       "imx-dma", -1, NULL, 0, NULL, 0);
-}
-
-struct platform_device __init __maybe_unused *imx_add_imx_sdma(char *name,
-       resource_size_t iobase, int irq, struct sdma_platform_data *pdata)
-{
-       struct resource res[] = {
-               {
-                       .start = iobase,
-                       .end = iobase + SZ_16K - 1,
-                       .flags = IORESOURCE_MEM,
-               }, {
-                       .start = irq,
-                       .end = irq,
-                       .flags = IORESOURCE_IRQ,
-               },
-       };
-
-       return platform_device_register_resndata(&mxc_ahb_bus, name,
-                       -1, res, ARRAY_SIZE(res), pdata, sizeof(*pdata));
-}
diff --git a/arch/arm/plat-mxc/devices/platform-imx-fb.c b/arch/arm/plat-mxc/devices/platform-imx-fb.c
deleted file mode 100644 (file)
index 2b0b5e0..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (C) 2010 Pengutronix
- * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
- *
- * This program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License version 2 as published by the
- * Free Software Foundation.
- */
-#include <linux/dma-mapping.h>
-#include <mach/hardware.h>
-#include <mach/devices-common.h>
-
-#define imx_imx_fb_data_entry_single(soc, _size)                       \
-       {                                                               \
-               .iobase = soc ## _LCDC_BASE_ADDR,                       \
-               .iosize = _size,                                        \
-               .irq = soc ## _INT_LCDC,                                \
-       }
-
-#ifdef CONFIG_SOC_IMX1
-const struct imx_imx_fb_data imx1_imx_fb_data __initconst =
-       imx_imx_fb_data_entry_single(MX1, SZ_4K);
-#endif /* ifdef CONFIG_SOC_IMX1 */
-
-#ifdef CONFIG_SOC_IMX21
-const struct imx_imx_fb_data imx21_imx_fb_data __initconst =
-       imx_imx_fb_data_entry_single(MX21, SZ_4K);
-#endif /* ifdef CONFIG_SOC_IMX21 */
-
-#ifdef CONFIG_SOC_IMX25
-const struct imx_imx_fb_data imx25_imx_fb_data __initconst =
-       imx_imx_fb_data_entry_single(MX25, SZ_16K);
-#endif /* ifdef CONFIG_SOC_IMX25 */
-
-#ifdef CONFIG_SOC_IMX27
-const struct imx_imx_fb_data imx27_imx_fb_data __initconst =
-       imx_imx_fb_data_entry_single(MX27, SZ_4K);
-#endif /* ifdef CONFIG_SOC_IMX27 */
-
-struct platform_device *__init imx_add_imx_fb(
-               const struct imx_imx_fb_data *data,
-               const struct imx_fb_platform_data *pdata)
-{
-       struct resource res[] = {
-               {
-                       .start = data->iobase,
-                       .end = data->iobase + data->iosize - 1,
-                       .flags = IORESOURCE_MEM,
-               }, {
-                       .start = data->irq,
-                       .end = data->irq,
-                       .flags = IORESOURCE_IRQ,
-               },
-       };
-       return imx_add_platform_device_dmamask("imx-fb", 0,
-                       res, ARRAY_SIZE(res),
-                       pdata, sizeof(*pdata), DMA_BIT_MASK(32));
-}
diff --git a/arch/arm/plat-mxc/devices/platform-imx-i2c.c b/arch/arm/plat-mxc/devices/platform-imx-i2c.c
deleted file mode 100644 (file)
index 19ad580..0000000
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Copyright (C) 2009-2010 Pengutronix
- * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
- *
- * This program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License version 2 as published by the
- * Free Software Foundation.
- */
-#include <mach/hardware.h>
-#include <mach/devices-common.h>
-
-#define imx_imx_i2c_data_entry_single(soc, _id, _hwid, _size)          \
-       {                                                               \
-               .id = _id,                                              \
-               .iobase = soc ## _I2C ## _hwid ## _BASE_ADDR,           \
-               .iosize = _size,                                        \
-               .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)
-
-#ifdef CONFIG_SOC_IMX1
-const struct imx_imx_i2c_data imx1_imx_i2c_data __initconst =
-       imx_imx_i2c_data_entry_single(MX1, 0, , SZ_4K);
-#endif /* ifdef CONFIG_SOC_IMX1 */
-
-#ifdef CONFIG_SOC_IMX21
-const struct imx_imx_i2c_data imx21_imx_i2c_data __initconst =
-       imx_imx_i2c_data_entry_single(MX21, 0, , SZ_4K);
-#endif /* ifdef CONFIG_SOC_IMX21 */
-
-#ifdef CONFIG_SOC_IMX25
-const struct imx_imx_i2c_data imx25_imx_i2c_data[] __initconst = {
-#define imx25_imx_i2c_data_entry(_id, _hwid)                           \
-       imx_imx_i2c_data_entry(MX25, _id, _hwid, SZ_16K)
-       imx25_imx_i2c_data_entry(0, 1),
-       imx25_imx_i2c_data_entry(1, 2),
-       imx25_imx_i2c_data_entry(2, 3),
-};
-#endif /* ifdef CONFIG_SOC_IMX25 */
-
-#ifdef CONFIG_SOC_IMX27
-const struct imx_imx_i2c_data imx27_imx_i2c_data[] __initconst = {
-#define imx27_imx_i2c_data_entry(_id, _hwid)                           \
-       imx_imx_i2c_data_entry(MX27, _id, _hwid, SZ_4K)
-       imx27_imx_i2c_data_entry(0, 1),
-       imx27_imx_i2c_data_entry(1, 2),
-};
-#endif /* ifdef CONFIG_SOC_IMX27 */
-
-#ifdef CONFIG_SOC_IMX31
-const struct imx_imx_i2c_data imx31_imx_i2c_data[] __initconst = {
-#define imx31_imx_i2c_data_entry(_id, _hwid)                           \
-       imx_imx_i2c_data_entry(MX31, _id, _hwid, SZ_4K)
-       imx31_imx_i2c_data_entry(0, 1),
-       imx31_imx_i2c_data_entry(1, 2),
-       imx31_imx_i2c_data_entry(2, 3),
-};
-#endif /* ifdef CONFIG_SOC_IMX31 */
-
-#ifdef CONFIG_SOC_IMX35
-const struct imx_imx_i2c_data imx35_imx_i2c_data[] __initconst = {
-#define imx35_imx_i2c_data_entry(_id, _hwid)                           \
-       imx_imx_i2c_data_entry(MX35, _id, _hwid, SZ_4K)
-       imx35_imx_i2c_data_entry(0, 1),
-       imx35_imx_i2c_data_entry(1, 2),
-       imx35_imx_i2c_data_entry(2, 3),
-};
-#endif /* ifdef CONFIG_SOC_IMX35 */
-
-#ifdef CONFIG_SOC_IMX50
-const struct imx_imx_i2c_data imx50_imx_i2c_data[] __initconst = {
-#define imx50_imx_i2c_data_entry(_id, _hwid)                           \
-       imx_imx_i2c_data_entry(MX50, _id, _hwid, SZ_4K)
-       imx50_imx_i2c_data_entry(0, 1),
-       imx50_imx_i2c_data_entry(1, 2),
-       imx50_imx_i2c_data_entry(2, 3),
-};
-#endif /* ifdef CONFIG_SOC_IMX51 */
-
-#ifdef CONFIG_SOC_IMX51
-const struct imx_imx_i2c_data imx51_imx_i2c_data[] __initconst = {
-#define imx51_imx_i2c_data_entry(_id, _hwid)                           \
-       imx_imx_i2c_data_entry(MX51, _id, _hwid, SZ_4K)
-       imx51_imx_i2c_data_entry(0, 1),
-       imx51_imx_i2c_data_entry(1, 2),
-       {
-               .id = 2,
-               .iobase = MX51_HSI2C_DMA_BASE_ADDR,
-               .iosize = SZ_16K,
-               .irq = MX51_INT_HS_I2C,
-       },
-};
-#endif /* ifdef CONFIG_SOC_IMX51 */
-
-#ifdef CONFIG_SOC_IMX53
-const struct imx_imx_i2c_data imx53_imx_i2c_data[] __initconst = {
-#define imx53_imx_i2c_data_entry(_id, _hwid)                           \
-       imx_imx_i2c_data_entry(MX53, _id, _hwid, SZ_4K)
-       imx53_imx_i2c_data_entry(0, 1),
-       imx53_imx_i2c_data_entry(1, 2),
-       imx53_imx_i2c_data_entry(2, 3),
-};
-#endif /* ifdef CONFIG_SOC_IMX53 */
-
-struct platform_device *__init imx_add_imx_i2c(
-               const struct imx_imx_i2c_data *data,
-               const struct imxi2c_platform_data *pdata)
-{
-       struct resource res[] = {
-               {
-                       .start = data->iobase,
-                       .end = data->iobase + data->iosize - 1,
-                       .flags = IORESOURCE_MEM,
-               }, {
-                       .start = data->irq,
-                       .end = data->irq,
-                       .flags = IORESOURCE_IRQ,
-               },
-       };
-
-       return imx_add_platform_device("imx-i2c", data->id,
-                       res, ARRAY_SIZE(res),
-                       pdata, sizeof(*pdata));
-}
diff --git a/arch/arm/plat-mxc/devices/platform-imx-keypad.c b/arch/arm/plat-mxc/devices/platform-imx-keypad.c
deleted file mode 100644 (file)
index 479c3e9..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (C) 2010 Pengutronix
- * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
- *
- * This program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License version 2 as published by the
- * Free Software Foundation.
- */
-#include <mach/hardware.h>
-#include <mach/devices-common.h>
-
-#define imx_imx_keypad_data_entry_single(soc, _size)                   \
-       {                                                               \
-               .iobase = soc ## _KPP_BASE_ADDR,                        \
-               .iosize = _size,                                        \
-               .irq = soc ## _INT_KPP,                                 \
-       }
-
-#ifdef CONFIG_SOC_IMX21
-const struct imx_imx_keypad_data imx21_imx_keypad_data __initconst =
-       imx_imx_keypad_data_entry_single(MX21, SZ_16);
-#endif /* ifdef CONFIG_SOC_IMX21 */
-
-#ifdef CONFIG_SOC_IMX25
-const struct imx_imx_keypad_data imx25_imx_keypad_data __initconst =
-       imx_imx_keypad_data_entry_single(MX25, SZ_16K);
-#endif /* ifdef CONFIG_SOC_IMX25 */
-
-#ifdef CONFIG_SOC_IMX27
-const struct imx_imx_keypad_data imx27_imx_keypad_data __initconst =
-       imx_imx_keypad_data_entry_single(MX27, SZ_16);
-#endif /* ifdef CONFIG_SOC_IMX27 */
-
-#ifdef CONFIG_SOC_IMX31
-const struct imx_imx_keypad_data imx31_imx_keypad_data __initconst =
-       imx_imx_keypad_data_entry_single(MX31, SZ_16);
-#endif /* ifdef CONFIG_SOC_IMX31 */
-
-#ifdef CONFIG_SOC_IMX35
-const struct imx_imx_keypad_data imx35_imx_keypad_data __initconst =
-       imx_imx_keypad_data_entry_single(MX35, SZ_16);
-#endif /* ifdef CONFIG_SOC_IMX35 */
-
-#ifdef CONFIG_SOC_IMX51
-const struct imx_imx_keypad_data imx51_imx_keypad_data __initconst =
-       imx_imx_keypad_data_entry_single(MX51, SZ_16);
-#endif /* ifdef CONFIG_SOC_IMX51 */
-
-#ifdef CONFIG_SOC_IMX53
-const struct imx_imx_keypad_data imx53_imx_keypad_data __initconst =
-       imx_imx_keypad_data_entry_single(MX53, SZ_16);
-#endif /* ifdef CONFIG_SOC_IMX53 */
-
-struct platform_device *__init imx_add_imx_keypad(
-               const struct imx_imx_keypad_data *data,
-               const struct matrix_keymap_data *pdata)
-{
-       struct resource res[] = {
-               {
-                       .start = data->iobase,
-                       .end = data->iobase + data->iosize - 1,
-                       .flags = IORESOURCE_MEM,
-               }, {
-                       .start = data->irq,
-                       .end = data->irq,
-                       .flags = IORESOURCE_IRQ,
-               },
-       };
-
-       return imx_add_platform_device("imx-keypad", -1,
-                       res, ARRAY_SIZE(res), pdata, sizeof(*pdata));
-}
diff --git a/arch/arm/plat-mxc/devices/platform-imx-ssi.c b/arch/arm/plat-mxc/devices/platform-imx-ssi.c
deleted file mode 100644 (file)
index 21c6f30..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * Copyright (C) 2010 Pengutronix
- * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
- *
- * This program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License version 2 as published by the
- * Free Software Foundation.
- */
-#include <mach/hardware.h>
-#include <mach/devices-common.h>
-
-#define imx_imx_ssi_data_entry(soc, _id, _hwid, _size)                 \
-       [_id] = {                                                       \
-               .id = _id,                                              \
-               .iobase = soc ## _SSI ## _hwid ## _BASE_ADDR,           \
-               .iosize = _size,                                        \
-               .irq = soc ## _INT_SSI ## _hwid,                        \
-               .dmatx0 = soc ## _DMA_REQ_SSI ## _hwid ## _TX0,         \
-               .dmarx0 = soc ## _DMA_REQ_SSI ## _hwid ## _RX0,         \
-               .dmatx1 = soc ## _DMA_REQ_SSI ## _hwid ## _TX1,         \
-               .dmarx1 = soc ## _DMA_REQ_SSI ## _hwid ## _RX1,         \
-       }
-
-#ifdef CONFIG_SOC_IMX21
-const struct imx_imx_ssi_data imx21_imx_ssi_data[] __initconst = {
-#define imx21_imx_ssi_data_entry(_id, _hwid)                           \
-       imx_imx_ssi_data_entry(MX21, _id, _hwid, SZ_4K)
-       imx21_imx_ssi_data_entry(0, 1),
-       imx21_imx_ssi_data_entry(1, 2),
-};
-#endif /* ifdef CONFIG_SOC_IMX21 */
-
-#ifdef CONFIG_SOC_IMX25
-const struct imx_imx_ssi_data imx25_imx_ssi_data[] __initconst = {
-#define imx25_imx_ssi_data_entry(_id, _hwid)                           \
-       imx_imx_ssi_data_entry(MX25, _id, _hwid, SZ_4K)
-       imx25_imx_ssi_data_entry(0, 1),
-       imx25_imx_ssi_data_entry(1, 2),
-};
-#endif /* ifdef CONFIG_SOC_IMX25 */
-
-#ifdef CONFIG_SOC_IMX27
-const struct imx_imx_ssi_data imx27_imx_ssi_data[] __initconst = {
-#define imx27_imx_ssi_data_entry(_id, _hwid)                           \
-       imx_imx_ssi_data_entry(MX27, _id, _hwid, SZ_4K)
-       imx27_imx_ssi_data_entry(0, 1),
-       imx27_imx_ssi_data_entry(1, 2),
-};
-#endif /* ifdef CONFIG_SOC_IMX27 */
-
-#ifdef CONFIG_SOC_IMX31
-const struct imx_imx_ssi_data imx31_imx_ssi_data[] __initconst = {
-#define imx31_imx_ssi_data_entry(_id, _hwid)                           \
-       imx_imx_ssi_data_entry(MX31, _id, _hwid, SZ_4K)
-       imx31_imx_ssi_data_entry(0, 1),
-       imx31_imx_ssi_data_entry(1, 2),
-};
-#endif /* ifdef CONFIG_SOC_IMX31 */
-
-#ifdef CONFIG_SOC_IMX35
-const struct imx_imx_ssi_data imx35_imx_ssi_data[] __initconst = {
-#define imx35_imx_ssi_data_entry(_id, _hwid)                           \
-       imx_imx_ssi_data_entry(MX35, _id, _hwid, SZ_4K)
-       imx35_imx_ssi_data_entry(0, 1),
-       imx35_imx_ssi_data_entry(1, 2),
-};
-#endif /* ifdef CONFIG_SOC_IMX35 */
-
-#ifdef CONFIG_SOC_IMX51
-const struct imx_imx_ssi_data imx51_imx_ssi_data[] __initconst = {
-#define imx51_imx_ssi_data_entry(_id, _hwid)                           \
-       imx_imx_ssi_data_entry(MX51, _id, _hwid, SZ_16K)
-       imx51_imx_ssi_data_entry(0, 1),
-       imx51_imx_ssi_data_entry(1, 2),
-       imx51_imx_ssi_data_entry(2, 3),
-};
-#endif /* ifdef CONFIG_SOC_IMX51 */
-
-#ifdef CONFIG_SOC_IMX53
-const struct imx_imx_ssi_data imx53_imx_ssi_data[] __initconst = {
-#define imx53_imx_ssi_data_entry(_id, _hwid)                           \
-       imx_imx_ssi_data_entry(MX53, _id, _hwid, SZ_16K)
-       imx53_imx_ssi_data_entry(0, 1),
-       imx53_imx_ssi_data_entry(1, 2),
-       imx53_imx_ssi_data_entry(2, 3),
-};
-#endif /* ifdef CONFIG_SOC_IMX53 */
-
-struct platform_device *__init imx_add_imx_ssi(
-               const struct imx_imx_ssi_data *data,
-               const struct imx_ssi_platform_data *pdata)
-{
-       struct resource res[] = {
-               {
-                       .start = data->iobase,
-                       .end = data->iobase + data->iosize - 1,
-                       .flags = IORESOURCE_MEM,
-               }, {
-                       .start = data->irq,
-                       .end = data->irq,
-                       .flags = IORESOURCE_IRQ,
-               },
-#define DMARES(_name) {                                                        \
-       .name = #_name,                                                 \
-       .start = data->dma ## _name,                                    \
-       .end = data->dma ## _name,                                      \
-       .flags = IORESOURCE_DMA,                                        \
-}
-               DMARES(tx0),
-               DMARES(rx0),
-               DMARES(tx1),
-               DMARES(rx1),
-       };
-
-       return imx_add_platform_device("imx-ssi", data->id,
-                       res, ARRAY_SIZE(res),
-                       pdata, sizeof(*pdata));
-}
diff --git a/arch/arm/plat-mxc/devices/platform-imx-uart.c b/arch/arm/plat-mxc/devices/platform-imx-uart.c
deleted file mode 100644 (file)
index d390f00..0000000
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
- * Copyright (C) 2009-2010 Pengutronix
- * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
- *
- * This program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License version 2 as published by the
- * Free Software Foundation.
- */
-#include <mach/hardware.h>
-#include <mach/devices-common.h>
-
-#define imx_imx_uart_3irq_data_entry(soc, _id, _hwid, _size)           \
-       [_id] = {                                                       \
-               .id = _id,                                              \
-               .iobase = soc ## _UART ## _hwid ## _BASE_ADDR,          \
-               .iosize = _size,                                        \
-               .irqrx = soc ## _INT_UART ## _hwid ## RX,               \
-               .irqtx = soc ## _INT_UART ## _hwid ## TX,               \
-               .irqrts = soc ## _INT_UART ## _hwid ## RTS,             \
-       }
-
-#define imx_imx_uart_1irq_data_entry(soc, _id, _hwid, _size)           \
-       [_id] = {                                                       \
-               .id = _id,                                              \
-               .iobase = soc ## _UART ## _hwid ## _BASE_ADDR,          \
-               .iosize = _size,                                        \
-               .irq = soc ## _INT_UART ## _hwid,                       \
-       }
-
-#ifdef CONFIG_SOC_IMX1
-const struct imx_imx_uart_3irq_data imx1_imx_uart_data[] __initconst = {
-#define imx1_imx_uart_data_entry(_id, _hwid)                           \
-       imx_imx_uart_3irq_data_entry(MX1, _id, _hwid, 0xd0)
-       imx1_imx_uart_data_entry(0, 1),
-       imx1_imx_uart_data_entry(1, 2),
-};
-#endif /* ifdef CONFIG_SOC_IMX1 */
-
-#ifdef CONFIG_SOC_IMX21
-const struct imx_imx_uart_1irq_data imx21_imx_uart_data[] __initconst = {
-#define imx21_imx_uart_data_entry(_id, _hwid)                          \
-       imx_imx_uart_1irq_data_entry(MX21, _id, _hwid, SZ_4K)
-       imx21_imx_uart_data_entry(0, 1),
-       imx21_imx_uart_data_entry(1, 2),
-       imx21_imx_uart_data_entry(2, 3),
-       imx21_imx_uart_data_entry(3, 4),
-};
-#endif
-
-#ifdef CONFIG_SOC_IMX25
-const struct imx_imx_uart_1irq_data imx25_imx_uart_data[] __initconst = {
-#define imx25_imx_uart_data_entry(_id, _hwid)                          \
-       imx_imx_uart_1irq_data_entry(MX25, _id, _hwid, SZ_16K)
-       imx25_imx_uart_data_entry(0, 1),
-       imx25_imx_uart_data_entry(1, 2),
-       imx25_imx_uart_data_entry(2, 3),
-       imx25_imx_uart_data_entry(3, 4),
-       imx25_imx_uart_data_entry(4, 5),
-};
-#endif /* ifdef CONFIG_SOC_IMX25 */
-
-#ifdef CONFIG_SOC_IMX27
-const struct imx_imx_uart_1irq_data imx27_imx_uart_data[] __initconst = {
-#define imx27_imx_uart_data_entry(_id, _hwid)                          \
-       imx_imx_uart_1irq_data_entry(MX27, _id, _hwid, SZ_4K)
-       imx27_imx_uart_data_entry(0, 1),
-       imx27_imx_uart_data_entry(1, 2),
-       imx27_imx_uart_data_entry(2, 3),
-       imx27_imx_uart_data_entry(3, 4),
-       imx27_imx_uart_data_entry(4, 5),
-       imx27_imx_uart_data_entry(5, 6),
-};
-#endif /* ifdef CONFIG_SOC_IMX27 */
-
-#ifdef CONFIG_SOC_IMX31
-const struct imx_imx_uart_1irq_data imx31_imx_uart_data[] __initconst = {
-#define imx31_imx_uart_data_entry(_id, _hwid)                          \
-       imx_imx_uart_1irq_data_entry(MX31, _id, _hwid, SZ_4K)
-       imx31_imx_uart_data_entry(0, 1),
-       imx31_imx_uart_data_entry(1, 2),
-       imx31_imx_uart_data_entry(2, 3),
-       imx31_imx_uart_data_entry(3, 4),
-       imx31_imx_uart_data_entry(4, 5),
-};
-#endif /* ifdef CONFIG_SOC_IMX31 */
-
-#ifdef CONFIG_SOC_IMX35
-const struct imx_imx_uart_1irq_data imx35_imx_uart_data[] __initconst = {
-#define imx35_imx_uart_data_entry(_id, _hwid)                          \
-       imx_imx_uart_1irq_data_entry(MX35, _id, _hwid, SZ_16K)
-       imx35_imx_uart_data_entry(0, 1),
-       imx35_imx_uart_data_entry(1, 2),
-       imx35_imx_uart_data_entry(2, 3),
-};
-#endif /* ifdef CONFIG_SOC_IMX35 */
-
-#ifdef CONFIG_SOC_IMX50
-const struct imx_imx_uart_1irq_data imx50_imx_uart_data[] __initconst = {
-#define imx50_imx_uart_data_entry(_id, _hwid)                          \
-       imx_imx_uart_1irq_data_entry(MX50, _id, _hwid, SZ_4K)
-       imx50_imx_uart_data_entry(0, 1),
-       imx50_imx_uart_data_entry(1, 2),
-       imx50_imx_uart_data_entry(2, 3),
-       imx50_imx_uart_data_entry(3, 4),
-       imx50_imx_uart_data_entry(4, 5),
-};
-#endif /* ifdef CONFIG_SOC_IMX50 */
-
-#ifdef CONFIG_SOC_IMX51
-const struct imx_imx_uart_1irq_data imx51_imx_uart_data[] __initconst = {
-#define imx51_imx_uart_data_entry(_id, _hwid)                          \
-       imx_imx_uart_1irq_data_entry(MX51, _id, _hwid, SZ_4K)
-       imx51_imx_uart_data_entry(0, 1),
-       imx51_imx_uart_data_entry(1, 2),
-       imx51_imx_uart_data_entry(2, 3),
-};
-#endif /* ifdef CONFIG_SOC_IMX51 */
-
-#ifdef CONFIG_SOC_IMX53
-const struct imx_imx_uart_1irq_data imx53_imx_uart_data[] __initconst = {
-#define imx53_imx_uart_data_entry(_id, _hwid)                          \
-       imx_imx_uart_1irq_data_entry(MX53, _id, _hwid, SZ_4K)
-       imx53_imx_uart_data_entry(0, 1),
-       imx53_imx_uart_data_entry(1, 2),
-       imx53_imx_uart_data_entry(2, 3),
-       imx53_imx_uart_data_entry(3, 4),
-       imx53_imx_uart_data_entry(4, 5),
-};
-#endif /* ifdef CONFIG_SOC_IMX53 */
-
-struct platform_device *__init imx_add_imx_uart_3irq(
-               const struct imx_imx_uart_3irq_data *data,
-               const struct imxuart_platform_data *pdata)
-{
-       struct resource res[] = {
-               {
-                       .start = data->iobase,
-                       .end = data->iobase + data->iosize - 1,
-                       .flags = IORESOURCE_MEM,
-               }, {
-                       .start = data->irqrx,
-                       .end = data->irqrx,
-                       .flags = IORESOURCE_IRQ,
-               }, {
-                       .start = data->irqtx,
-                       .end = data->irqtx,
-                       .flags = IORESOURCE_IRQ,
-               }, {
-                       .start = data->irqrts,
-                       .end = data->irqrx,
-                       .flags = IORESOURCE_IRQ,
-               },
-       };
-
-       return imx_add_platform_device("imx1-uart", data->id, res,
-                       ARRAY_SIZE(res), pdata, sizeof(*pdata));
-}
-
-struct platform_device *__init imx_add_imx_uart_1irq(
-               const struct imx_imx_uart_1irq_data *data,
-               const struct imxuart_platform_data *pdata)
-{
-       struct resource res[] = {
-               {
-                       .start = data->iobase,
-                       .end = data->iobase + data->iosize - 1,
-                       .flags = IORESOURCE_MEM,
-               }, {
-                       .start = data->irq,
-                       .end = data->irq,
-                       .flags = IORESOURCE_IRQ,
-               },
-       };
-
-       /* i.mx21 type uart runs on all i.mx except i.mx1 */
-       return imx_add_platform_device("imx21-uart", data->id,
-                       res, ARRAY_SIZE(res), pdata, sizeof(*pdata));
-}
diff --git a/arch/arm/plat-mxc/devices/platform-imx2-wdt.c b/arch/arm/plat-mxc/devices/platform-imx2-wdt.c
deleted file mode 100644 (file)
index 5e07ef2..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (C) 2010 Pengutronix
- * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
- *
- * This program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License version 2 as published by the
- * Free Software Foundation.
- */
-#include <asm/sizes.h>
-#include <mach/hardware.h>
-#include <mach/devices-common.h>
-
-#define imx_imx2_wdt_data_entry_single(soc, _id, _hwid, _size)         \
-       {                                                               \
-               .id = _id,                                              \
-               .iobase = soc ## _WDOG ## _hwid ## _BASE_ADDR,          \
-               .iosize = _size,                                        \
-       }
-#define imx_imx2_wdt_data_entry(soc, _id, _hwid, _size)                        \
-       [_id] = imx_imx2_wdt_data_entry_single(soc, _id, _hwid, _size)
-
-#ifdef CONFIG_SOC_IMX21
-const struct imx_imx2_wdt_data imx21_imx2_wdt_data __initconst =
-       imx_imx2_wdt_data_entry_single(MX21, 0, , SZ_4K);
-#endif /* ifdef CONFIG_SOC_IMX21 */
-
-#ifdef CONFIG_SOC_IMX25
-const struct imx_imx2_wdt_data imx25_imx2_wdt_data __initconst =
-       imx_imx2_wdt_data_entry_single(MX25, 0, , SZ_16K);
-#endif /* ifdef CONFIG_SOC_IMX25 */
-
-#ifdef CONFIG_SOC_IMX27
-const struct imx_imx2_wdt_data imx27_imx2_wdt_data __initconst =
-       imx_imx2_wdt_data_entry_single(MX27, 0, , SZ_4K);
-#endif /* ifdef CONFIG_SOC_IMX27 */
-
-#ifdef CONFIG_SOC_IMX31
-const struct imx_imx2_wdt_data imx31_imx2_wdt_data __initconst =
-       imx_imx2_wdt_data_entry_single(MX31, 0, , SZ_16K);
-#endif /* ifdef CONFIG_SOC_IMX31 */
-
-#ifdef CONFIG_SOC_IMX35
-const struct imx_imx2_wdt_data imx35_imx2_wdt_data __initconst =
-       imx_imx2_wdt_data_entry_single(MX35, 0, , SZ_16K);
-#endif /* ifdef CONFIG_SOC_IMX35 */
-
-#ifdef CONFIG_SOC_IMX51
-const struct imx_imx2_wdt_data imx51_imx2_wdt_data[] __initconst = {
-#define imx51_imx2_wdt_data_entry(_id, _hwid)                          \
-       imx_imx2_wdt_data_entry(MX51, _id, _hwid, SZ_16K)
-       imx51_imx2_wdt_data_entry(0, 1),
-       imx51_imx2_wdt_data_entry(1, 2),
-};
-#endif /* ifdef CONFIG_SOC_IMX51 */
-
-#ifdef CONFIG_SOC_IMX53
-const struct imx_imx2_wdt_data imx53_imx2_wdt_data[] __initconst = {
-#define imx53_imx2_wdt_data_entry(_id, _hwid)                          \
-       imx_imx2_wdt_data_entry(MX53, _id, _hwid, SZ_16K)
-       imx53_imx2_wdt_data_entry(0, 1),
-       imx53_imx2_wdt_data_entry(1, 2),
-};
-#endif /* ifdef CONFIG_SOC_IMX53 */
-
-struct platform_device *__init imx_add_imx2_wdt(
-               const struct imx_imx2_wdt_data *data)
-{
-       struct resource res[] = {
-               {
-                       .start = data->iobase,
-                       .end = data->iobase + data->iosize - 1,
-                       .flags = IORESOURCE_MEM,
-               },
-       };
-       return imx_add_platform_device("imx2-wdt", data->id,
-                       res, ARRAY_SIZE(res), NULL, 0);
-}
diff --git a/arch/arm/plat-mxc/devices/platform-imx21-hcd.c b/arch/arm/plat-mxc/devices/platform-imx21-hcd.c
deleted file mode 100644 (file)
index 5770a42..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (C) 2010 Pengutronix
- * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
- *
- * This program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License version 2 as published by the
- * Free Software Foundation.
- */
-#include <mach/hardware.h>
-#include <mach/devices-common.h>
-
-#define imx_imx21_hcd_data_entry_single(soc)                           \
-       {                                                               \
-               .iobase = soc ## _USBOTG_BASE_ADDR,                     \
-               .irq = soc ## _INT_USBHOST,                             \
-       }
-
-#ifdef CONFIG_SOC_IMX21
-const struct imx_imx21_hcd_data imx21_imx21_hcd_data __initconst =
-       imx_imx21_hcd_data_entry_single(MX21);
-#endif /* ifdef CONFIG_SOC_IMX21 */
-
-struct platform_device *__init imx_add_imx21_hcd(
-               const struct imx_imx21_hcd_data *data,
-               const struct mx21_usbh_platform_data *pdata)
-{
-       struct resource res[] = {
-               {
-                       .start = data->iobase,
-                       .end = data->iobase + SZ_8K - 1,
-                       .flags = IORESOURCE_MEM,
-               }, {
-                       .start = data->irq,
-                       .end = data->irq,
-                       .flags = IORESOURCE_IRQ,
-               },
-       };
-       return imx_add_platform_device_dmamask("imx21-hcd", 0,
-                       res, ARRAY_SIZE(res),
-                       pdata, sizeof(*pdata), DMA_BIT_MASK(32));
-}
diff --git a/arch/arm/plat-mxc/devices/platform-imx27-coda.c b/arch/arm/plat-mxc/devices/platform-imx27-coda.c
deleted file mode 100644 (file)
index 8b12aac..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2012 Vista Silicon
- * Javier Martin <javier.martin@vista-silicon.com>
- *
- * This program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License version 2 as published by the
- * Free Software Foundation.
- */
-
-#include <mach/hardware.h>
-#include <mach/devices-common.h>
-
-#ifdef CONFIG_SOC_IMX27
-const struct imx_imx27_coda_data imx27_coda_data __initconst = {
-       .iobase = MX27_VPU_BASE_ADDR,
-       .iosize = SZ_512,
-       .irq = MX27_INT_VPU,
-};
-#endif
-
-struct platform_device *__init imx_add_imx27_coda(
-               const struct imx_imx27_coda_data *data)
-{
-       struct resource res[] = {
-               {
-                       .start = data->iobase,
-                       .end = data->iobase + data->iosize - 1,
-                       .flags = IORESOURCE_MEM,
-               }, {
-                       .start = data->irq,
-                       .end = data->irq,
-                       .flags = IORESOURCE_IRQ,
-               },
-       };
-       return imx_add_platform_device_dmamask("coda-imx27", 0, res, 2, NULL,
-                                       0, DMA_BIT_MASK(32));
-}
diff --git a/arch/arm/plat-mxc/devices/platform-imx_udc.c b/arch/arm/plat-mxc/devices/platform-imx_udc.c
deleted file mode 100644 (file)
index 6fd675d..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (C) 2010 Pengutronix
- * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
- *
- * This program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License version 2 as published by the
- * Free Software Foundation.
- */
-#include <mach/hardware.h>
-#include <mach/devices-common.h>
-
-#define imx_imx_udc_data_entry_single(soc, _size)                      \
-       {                                                               \
-               .iobase = soc ## _USBD_BASE_ADDR,                       \
-               .iosize = _size,                                        \
-               .irq0 = soc ## _INT_USBD0,                              \
-               .irq1 = soc ## _INT_USBD1,                              \
-               .irq2 = soc ## _INT_USBD2,                              \
-               .irq3 = soc ## _INT_USBD3,                              \
-               .irq4 = soc ## _INT_USBD4,                              \
-               .irq5 = soc ## _INT_USBD5,                              \
-               .irq6 = soc ## _INT_USBD6,                              \
-       }
-
-#define imx_imx_udc_data_entry(soc, _size)                             \
-       [_id] = imx_imx_udc_data_entry_single(soc, _size)
-
-#ifdef CONFIG_SOC_IMX1
-const struct imx_imx_udc_data imx1_imx_udc_data __initconst =
-       imx_imx_udc_data_entry_single(MX1, SZ_4K);
-#endif /* ifdef CONFIG_SOC_IMX1 */
-
-struct platform_device *__init imx_add_imx_udc(
-               const struct imx_imx_udc_data *data,
-               const struct imxusb_platform_data *pdata)
-{
-       struct resource res[] = {
-               {
-                       .start = data->iobase,
-                       .end = data->iobase + data->iosize - 1,
-                       .flags = IORESOURCE_MEM,
-               }, {
-                       .start = data->irq0,
-                       .end = data->irq0,
-                       .flags = IORESOURCE_IRQ,
-               }, {
-                       .start = data->irq1,
-                       .end = data->irq1,
-                       .flags = IORESOURCE_IRQ,
-               }, {
-                       .start = data->irq2,
-                       .end = data->irq2,
-                       .flags = IORESOURCE_IRQ,
-               }, {
-                       .start = data->irq3,
-                       .end = data->irq3,
-                       .flags = IORESOURCE_IRQ,
-               }, {
-                       .start = data->irq4,
-                       .end = data->irq4,
-                       .flags = IORESOURCE_IRQ,
-               }, {
-                       .start = data->irq5,
-                       .end = data->irq5,
-                       .flags = IORESOURCE_IRQ,
-               }, {
-                       .start = data->irq6,
-                       .end = data->irq6,
-                       .flags = IORESOURCE_IRQ,
-               },
-       };
-
-       return imx_add_platform_device("imx_udc", 0,
-                       res, ARRAY_SIZE(res), pdata, sizeof(*pdata));
-}
diff --git a/arch/arm/plat-mxc/devices/platform-imxdi_rtc.c b/arch/arm/plat-mxc/devices/platform-imxdi_rtc.c
deleted file mode 100644 (file)
index 805336f..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (C) 2010 Pengutronix
- * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
- *
- * This program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License version 2 as published by the
- * Free Software Foundation.
- */
-#include <asm/sizes.h>
-#include <mach/hardware.h>
-#include <mach/devices-common.h>
-
-#define imx_imxdi_rtc_data_entry_single(soc)                           \
-       {                                                               \
-               .iobase = soc ## _DRYICE_BASE_ADDR,                     \
-               .irq = soc ## _INT_DRYICE,                              \
-       }
-
-#ifdef CONFIG_SOC_IMX25
-const struct imx_imxdi_rtc_data imx25_imxdi_rtc_data __initconst =
-       imx_imxdi_rtc_data_entry_single(MX25);
-#endif /* ifdef CONFIG_SOC_IMX25 */
-
-struct platform_device *__init imx_add_imxdi_rtc(
-               const struct imx_imxdi_rtc_data *data)
-{
-       struct resource res[] = {
-               {
-                       .start = data->iobase,
-                       .end = data->iobase + SZ_16K - 1,
-                       .flags = IORESOURCE_MEM,
-               }, {
-                       .start = data->irq,
-                       .end = data->irq,
-                       .flags = IORESOURCE_IRQ,
-               },
-       };
-
-       return imx_add_platform_device("imxdi_rtc", 0,
-                       res, ARRAY_SIZE(res), NULL, 0);
-}
diff --git a/arch/arm/plat-mxc/devices/platform-ipu-core.c b/arch/arm/plat-mxc/devices/platform-ipu-core.c
deleted file mode 100644 (file)
index d1e33cc..0000000
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * Copyright (C) 2011 Pengutronix
- * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
- *
- * This program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License version 2 as published by the
- * Free Software Foundation.
- */
-#include <linux/dma-mapping.h>
-#include <mach/hardware.h>
-#include <mach/devices-common.h>
-
-#define imx_ipu_core_entry_single(soc)                                 \
-{                                                                      \
-       .iobase = soc ## _IPU_CTRL_BASE_ADDR,                           \
-       .synirq = soc ## _INT_IPU_SYN,                                  \
-       .errirq = soc ## _INT_IPU_ERR,                                  \
-}
-
-#ifdef CONFIG_SOC_IMX31
-const struct imx_ipu_core_data imx31_ipu_core_data __initconst =
-       imx_ipu_core_entry_single(MX31);
-#endif
-
-#ifdef CONFIG_SOC_IMX35
-const struct imx_ipu_core_data imx35_ipu_core_data __initconst =
-       imx_ipu_core_entry_single(MX35);
-#endif
-
-static struct platform_device *imx_ipu_coredev __initdata;
-
-struct platform_device *__init imx_add_ipu_core(
-               const struct imx_ipu_core_data *data)
-{
-       /* The resource order is important! */
-       struct resource res[] = {
-               {
-                       .start = data->iobase,
-                       .end = data->iobase + 0x5f,
-                       .flags = IORESOURCE_MEM,
-               }, {
-                       .start = data->iobase + 0x88,
-                       .end = data->iobase + 0xb3,
-                       .flags = IORESOURCE_MEM,
-               }, {
-                       .start = data->synirq,
-                       .end = data->synirq,
-                       .flags = IORESOURCE_IRQ,
-               }, {
-                       .start = data->errirq,
-                       .end = data->errirq,
-                       .flags = IORESOURCE_IRQ,
-               },
-       };
-
-       return imx_ipu_coredev = imx_add_platform_device("ipu-core", -1,
-                       res, ARRAY_SIZE(res), NULL, 0);
-}
-
-struct platform_device *__init imx_alloc_mx3_camera(
-               const struct imx_ipu_core_data *data,
-               const struct mx3_camera_pdata *pdata)
-{
-       struct resource res[] = {
-               {
-                       .start = data->iobase + 0x60,
-                       .end = data->iobase + 0x87,
-                       .flags = IORESOURCE_MEM,
-               },
-       };
-       int ret = -ENOMEM;
-       struct platform_device *pdev;
-
-       if (IS_ERR_OR_NULL(imx_ipu_coredev))
-               return ERR_PTR(-ENODEV);
-
-       pdev = platform_device_alloc("mx3-camera", 0);
-       if (!pdev)
-               goto err;
-
-       pdev->dev.dma_mask = kmalloc(sizeof(*pdev->dev.dma_mask), GFP_KERNEL);
-       if (!pdev->dev.dma_mask)
-               goto err;
-
-       *pdev->dev.dma_mask = DMA_BIT_MASK(32);
-       pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
-
-       ret = platform_device_add_resources(pdev, res, ARRAY_SIZE(res));
-       if (ret)
-               goto err;
-
-       if (pdata) {
-               struct mx3_camera_pdata *copied_pdata;
-
-               ret = platform_device_add_data(pdev, pdata, sizeof(*pdata));
-               if (ret) {
-err:
-                       kfree(pdev->dev.dma_mask);
-                       platform_device_put(pdev);
-                       return ERR_PTR(-ENODEV);
-               }
-               copied_pdata = dev_get_platdata(&pdev->dev);
-               copied_pdata->dma_dev = &imx_ipu_coredev->dev;
-       }
-
-       return pdev;
-}
-
-struct platform_device *__init imx_add_mx3_sdc_fb(
-               const struct imx_ipu_core_data *data,
-               struct mx3fb_platform_data *pdata)
-{
-       struct resource res[] = {
-               {
-                       .start = data->iobase + 0xb4,
-                       .end = data->iobase + 0x1bf,
-                       .flags = IORESOURCE_MEM,
-               },
-       };
-
-       if (IS_ERR_OR_NULL(imx_ipu_coredev))
-               return ERR_PTR(-ENODEV);
-
-       pdata->dma_dev = &imx_ipu_coredev->dev;
-
-       return imx_add_platform_device_dmamask("mx3_sdc_fb", -1,
-                       res, ARRAY_SIZE(res), pdata, sizeof(*pdata),
-                       DMA_BIT_MASK(32));
-}
diff --git a/arch/arm/plat-mxc/devices/platform-mx1-camera.c b/arch/arm/plat-mxc/devices/platform-mx1-camera.c
deleted file mode 100644 (file)
index edcc581..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (C) 2010 Pengutronix
- * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
- *
- * This program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License version 2 as published by the
- * Free Software Foundation.
- */
-#include <mach/hardware.h>
-#include <mach/devices-common.h>
-
-#define imx_mx1_camera_data_entry_single(soc, _size)                   \
-       {                                                               \
-               .iobase = soc ## _CSI ## _BASE_ADDR,                    \
-               .iosize = _size,                                        \
-               .irq = soc ## _INT_CSI,                                 \
-       }
-
-#ifdef CONFIG_SOC_IMX1
-const struct imx_mx1_camera_data imx1_mx1_camera_data __initconst =
-       imx_mx1_camera_data_entry_single(MX1, 10);
-#endif /* ifdef CONFIG_SOC_IMX1 */
-
-struct platform_device *__init imx_add_mx1_camera(
-               const struct imx_mx1_camera_data *data,
-               const struct mx1_camera_pdata *pdata)
-{
-       struct resource res[] = {
-               {
-                       .start = data->iobase,
-                       .end = data->iobase + data->iosize - 1,
-                       .flags = IORESOURCE_MEM,
-               }, {
-                       .start = data->irq,
-                       .end = data->irq,
-                       .flags = IORESOURCE_IRQ,
-               },
-       };
-       return imx_add_platform_device_dmamask("mx1-camera", 0,
-                       res, ARRAY_SIZE(res),
-                       pdata, sizeof(*pdata), DMA_BIT_MASK(32));
-}
diff --git a/arch/arm/plat-mxc/devices/platform-mx2-camera.c b/arch/arm/plat-mxc/devices/platform-mx2-camera.c
deleted file mode 100644 (file)
index 11eace9..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (C) 2010 Pengutronix
- * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
- *
- * This program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License version 2 as published by the
- * Free Software Foundation.
- */
-#include <mach/hardware.h>
-#include <mach/devices-common.h>
-
-#define imx_mx2_camera_data_entry_single(soc)                          \
-       {                                                               \
-               .iobasecsi = soc ## _CSI_BASE_ADDR,                     \
-               .iosizecsi = SZ_4K,                                     \
-               .irqcsi = soc ## _INT_CSI,                              \
-       }
-#define imx_mx2_camera_data_entry_single_emma(soc)                     \
-       {                                                               \
-               .iobasecsi = soc ## _CSI_BASE_ADDR,                     \
-               .iosizecsi = SZ_32,                                     \
-               .irqcsi = soc ## _INT_CSI,                              \
-               .iobaseemmaprp = soc ## _EMMAPRP_BASE_ADDR,             \
-               .iosizeemmaprp = SZ_32,                                 \
-               .irqemmaprp = soc ## _INT_EMMAPRP,                      \
-       }
-
-#ifdef CONFIG_SOC_IMX25
-const struct imx_mx2_camera_data imx25_mx2_camera_data __initconst =
-       imx_mx2_camera_data_entry_single(MX25);
-#endif /* ifdef CONFIG_SOC_IMX25 */
-
-#ifdef CONFIG_SOC_IMX27
-const struct imx_mx2_camera_data imx27_mx2_camera_data __initconst =
-       imx_mx2_camera_data_entry_single_emma(MX27);
-#endif /* ifdef CONFIG_SOC_IMX27 */
-
-struct platform_device *__init imx_add_mx2_camera(
-               const struct imx_mx2_camera_data *data,
-               const struct mx2_camera_platform_data *pdata)
-{
-       struct resource res[] = {
-               {
-                       .start = data->iobasecsi,
-                       .end = data->iobasecsi + data->iosizecsi - 1,
-                       .flags = IORESOURCE_MEM,
-               }, {
-                       .start = data->irqcsi,
-                       .end = data->irqcsi,
-                       .flags = IORESOURCE_IRQ,
-               }, {
-                       .start = data->iobaseemmaprp,
-                       .end = data->iobaseemmaprp + data->iosizeemmaprp - 1,
-                       .flags = IORESOURCE_MEM,
-               }, {
-                       .start = data->irqemmaprp,
-                       .end = data->irqemmaprp,
-                       .flags = IORESOURCE_IRQ,
-               },
-       };
-       return imx_add_platform_device_dmamask("mx2-camera", 0,
-                       res, data->iobaseemmaprp ? 4 : 2,
-                       pdata, sizeof(*pdata), DMA_BIT_MASK(32));
-}
-
-struct platform_device *__init imx_add_mx2_emmaprp(
-               const struct imx_mx2_camera_data *data)
-{
-       struct resource res[] = {
-               {
-                       .start = data->iobaseemmaprp,
-                       .end = data->iobaseemmaprp + data->iosizeemmaprp - 1,
-                       .flags = IORESOURCE_MEM,
-               }, {
-                       .start = data->irqemmaprp,
-                       .end = data->irqemmaprp,
-                       .flags = IORESOURCE_IRQ,
-               },
-       };
-       return imx_add_platform_device_dmamask("m2m-emmaprp", 0,
-                       res, 2, NULL, 0, DMA_BIT_MASK(32));
-}
diff --git a/arch/arm/plat-mxc/devices/platform-mxc-ehci.c b/arch/arm/plat-mxc/devices/platform-mxc-ehci.c
deleted file mode 100644 (file)
index 35851d8..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (C) 2010 Pengutronix
- * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
- *
- * This program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License version 2 as published by the
- * Free Software Foundation.
- */
-#include <linux/dma-mapping.h>
-#include <mach/hardware.h>
-#include <mach/devices-common.h>
-
-#define imx_mxc_ehci_data_entry_single(soc, _id, hs)                   \
-       {                                                               \
-               .id = _id,                                              \
-               .iobase = soc ## _USB_ ## hs ## _BASE_ADDR,             \
-               .irq = soc ## _INT_USB_ ## hs,                          \
-       }
-
-#ifdef CONFIG_SOC_IMX25
-const struct imx_mxc_ehci_data imx25_mxc_ehci_otg_data __initconst =
-       imx_mxc_ehci_data_entry_single(MX25, 0, OTG);
-const struct imx_mxc_ehci_data imx25_mxc_ehci_hs_data __initconst =
-       imx_mxc_ehci_data_entry_single(MX25, 1, HS);
-#endif /* ifdef CONFIG_SOC_IMX25 */
-
-#ifdef CONFIG_SOC_IMX27
-const struct imx_mxc_ehci_data imx27_mxc_ehci_otg_data __initconst =
-       imx_mxc_ehci_data_entry_single(MX27, 0, OTG);
-const struct imx_mxc_ehci_data imx27_mxc_ehci_hs_data[] __initconst = {
-       imx_mxc_ehci_data_entry_single(MX27, 1, HS1),
-       imx_mxc_ehci_data_entry_single(MX27, 2, HS2),
-};
-#endif /* ifdef CONFIG_SOC_IMX27 */
-
-#ifdef CONFIG_SOC_IMX31
-const struct imx_mxc_ehci_data imx31_mxc_ehci_otg_data __initconst =
-       imx_mxc_ehci_data_entry_single(MX31, 0, OTG);
-const struct imx_mxc_ehci_data imx31_mxc_ehci_hs_data[] __initconst = {
-       imx_mxc_ehci_data_entry_single(MX31, 1, HS1),
-       imx_mxc_ehci_data_entry_single(MX31, 2, HS2),
-};
-#endif /* ifdef CONFIG_SOC_IMX31 */
-
-#ifdef CONFIG_SOC_IMX35
-const struct imx_mxc_ehci_data imx35_mxc_ehci_otg_data __initconst =
-       imx_mxc_ehci_data_entry_single(MX35, 0, OTG);
-const struct imx_mxc_ehci_data imx35_mxc_ehci_hs_data __initconst =
-       imx_mxc_ehci_data_entry_single(MX35, 1, HS);
-#endif /* ifdef CONFIG_SOC_IMX35 */
-
-#ifdef CONFIG_SOC_IMX51
-const struct imx_mxc_ehci_data imx51_mxc_ehci_otg_data __initconst =
-       imx_mxc_ehci_data_entry_single(MX51, 0, OTG);
-const struct imx_mxc_ehci_data imx51_mxc_ehci_hs_data[] __initconst = {
-       imx_mxc_ehci_data_entry_single(MX51, 1, HS1),
-       imx_mxc_ehci_data_entry_single(MX51, 2, HS2),
-};
-#endif /* ifdef CONFIG_SOC_IMX51 */
-
-struct platform_device *__init imx_add_mxc_ehci(
-               const struct imx_mxc_ehci_data *data,
-               const struct mxc_usbh_platform_data *pdata)
-{
-       struct resource res[] = {
-               {
-                       .start = data->iobase,
-                       .end = data->iobase + SZ_512 - 1,
-                       .flags = IORESOURCE_MEM,
-               }, {
-                       .start = data->irq,
-                       .end = data->irq,
-                       .flags = IORESOURCE_IRQ,
-               },
-       };
-       return imx_add_platform_device_dmamask("mxc-ehci", data->id,
-                       res, ARRAY_SIZE(res),
-                       pdata, sizeof(*pdata), DMA_BIT_MASK(32));
-}
diff --git a/arch/arm/plat-mxc/devices/platform-mxc-mmc.c b/arch/arm/plat-mxc/devices/platform-mxc-mmc.c
deleted file mode 100644 (file)
index 540d3a7..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (C) 2010 Pengutronix
- * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
- *
- * This program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License version 2 as published by the
- * Free Software Foundation.
- */
-#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)          \
-       {                                                               \
-               .id = _id,                                              \
-               .iobase = soc ## _SDHC ## _hwid ## _BASE_ADDR,          \
-               .iosize = _size,                                        \
-               .irq = soc ## _INT_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)
-
-#ifdef CONFIG_SOC_IMX21
-const struct imx_mxc_mmc_data imx21_mxc_mmc_data[] __initconst = {
-#define imx21_mxc_mmc_data_entry(_id, _hwid)                           \
-       imx_mxc_mmc_data_entry(MX21, _id, _hwid, SZ_4K)
-       imx21_mxc_mmc_data_entry(0, 1),
-       imx21_mxc_mmc_data_entry(1, 2),
-};
-#endif /* ifdef CONFIG_SOC_IMX21 */
-
-#ifdef CONFIG_SOC_IMX27
-const struct imx_mxc_mmc_data imx27_mxc_mmc_data[] __initconst = {
-#define imx27_mxc_mmc_data_entry(_id, _hwid)                           \
-       imx_mxc_mmc_data_entry(MX27, _id, _hwid, SZ_4K)
-       imx27_mxc_mmc_data_entry(0, 1),
-       imx27_mxc_mmc_data_entry(1, 2),
-};
-#endif /* ifdef CONFIG_SOC_IMX27 */
-
-#ifdef CONFIG_SOC_IMX31
-const struct imx_mxc_mmc_data imx31_mxc_mmc_data[] __initconst = {
-#define imx31_mxc_mmc_data_entry(_id, _hwid)                           \
-       imx_mxc_mmc_data_entry(MX31, _id, _hwid, SZ_16K)
-       imx31_mxc_mmc_data_entry(0, 1),
-       imx31_mxc_mmc_data_entry(1, 2),
-};
-#endif /* ifdef CONFIG_SOC_IMX31 */
-
-struct platform_device *__init imx_add_mxc_mmc(
-               const struct imx_mxc_mmc_data *data,
-               const struct imxmmc_platform_data *pdata)
-{
-       struct resource res[] = {
-               {
-                       .start = data->iobase,
-                       .end = data->iobase + SZ_4K - 1,
-                       .flags = IORESOURCE_MEM,
-               }, {
-                       .start = data->irq,
-                       .end = data->irq,
-                       .flags = IORESOURCE_IRQ,
-               }, {
-                       .start = data->dmareq,
-                       .end = data->dmareq,
-                       .flags = IORESOURCE_DMA,
-               },
-       };
-       return imx_add_platform_device_dmamask("mxc-mmc", data->id,
-                       res, ARRAY_SIZE(res),
-                       pdata, sizeof(*pdata), DMA_BIT_MASK(32));
-}
diff --git a/arch/arm/plat-mxc/devices/platform-mxc_nand.c b/arch/arm/plat-mxc/devices/platform-mxc_nand.c
deleted file mode 100644 (file)
index 95b75cc..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (C) 2009-2010 Pengutronix
- * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
- *
- * This program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License version 2 as published by the
- * Free Software Foundation.
- */
-#include <asm/sizes.h>
-#include <mach/hardware.h>
-#include <mach/devices-common.h>
-
-#define imx_mxc_nand_data_entry_single(soc, _size)                     \
-       {                                                               \
-               .iobase = soc ## _NFC_BASE_ADDR,                        \
-               .iosize = _size,                                        \
-               .irq = soc ## _INT_NFC                                  \
-       }
-
-#define imx_mxc_nandv3_data_entry_single(soc, _size)                   \
-       {                                                               \
-               .id = -1,                                               \
-               .iobase = soc ## _NFC_BASE_ADDR,                        \
-               .iosize = _size,                                        \
-               .axibase = soc ## _NFC_AXI_BASE_ADDR,                   \
-               .irq = soc ## _INT_NFC                                  \
-       }
-
-#ifdef CONFIG_SOC_IMX21
-const struct imx_mxc_nand_data imx21_mxc_nand_data __initconst =
-       imx_mxc_nand_data_entry_single(MX21, SZ_4K);
-#endif /* ifdef CONFIG_SOC_IMX21 */
-
-#ifdef CONFIG_SOC_IMX25
-const struct imx_mxc_nand_data imx25_mxc_nand_data __initconst =
-       imx_mxc_nand_data_entry_single(MX25, SZ_8K);
-#endif /* ifdef CONFIG_SOC_IMX25 */
-
-#ifdef CONFIG_SOC_IMX27
-const struct imx_mxc_nand_data imx27_mxc_nand_data __initconst =
-       imx_mxc_nand_data_entry_single(MX27, SZ_4K);
-#endif /* ifdef CONFIG_SOC_IMX27 */
-
-#ifdef CONFIG_SOC_IMX31
-const struct imx_mxc_nand_data imx31_mxc_nand_data __initconst =
-       imx_mxc_nand_data_entry_single(MX31, SZ_4K);
-#endif
-
-#ifdef CONFIG_SOC_IMX35
-const struct imx_mxc_nand_data imx35_mxc_nand_data __initconst =
-       imx_mxc_nand_data_entry_single(MX35, SZ_8K);
-#endif
-
-#ifdef CONFIG_SOC_IMX51
-const struct imx_mxc_nand_data imx51_mxc_nand_data __initconst =
-       imx_mxc_nandv3_data_entry_single(MX51, SZ_16K);
-#endif
-
-struct platform_device *__init imx_add_mxc_nand(
-               const struct imx_mxc_nand_data *data,
-               const struct mxc_nand_platform_data *pdata)
-{
-       /* AXI has to come first, that's how the mxc_nand driver expect it */
-       struct resource res[] = {
-               {
-                       .start = data->iobase,
-                       .end = data->iobase + data->iosize - 1,
-                       .flags = IORESOURCE_MEM,
-               }, {
-                       .start = data->irq,
-                       .end = data->irq,
-                       .flags = IORESOURCE_IRQ,
-               }, {
-                       .start = data->axibase,
-                       .end = data->axibase + SZ_16K - 1,
-                       .flags = IORESOURCE_MEM,
-               },
-       };
-       return imx_add_platform_device("mxc_nand", data->id,
-                       res, ARRAY_SIZE(res) - !data->axibase,
-                       pdata, sizeof(*pdata));
-}
diff --git a/arch/arm/plat-mxc/devices/platform-mxc_pwm.c b/arch/arm/plat-mxc/devices/platform-mxc_pwm.c
deleted file mode 100644 (file)
index b0c4ae2..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (C) 2009-2010 Pengutronix
- * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
- *
- * This program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License version 2 as published by the
- * Free Software Foundation.
- */
-#include <mach/hardware.h>
-#include <mach/devices-common.h>
-
-#define imx_mxc_pwm_data_entry_single(soc, _id, _hwid, _size)          \
-       {                                                               \
-               .id = _id,                                              \
-               .iobase = soc ## _PWM ## _hwid ## _BASE_ADDR,           \
-               .iosize = _size,                                        \
-               .irq = soc ## _INT_PWM ## _hwid,                        \
-       }
-#define imx_mxc_pwm_data_entry(soc, _id, _hwid, _size)                 \
-       [_id] = imx_mxc_pwm_data_entry_single(soc, _id, _hwid, _size)
-
-#ifdef CONFIG_SOC_IMX21
-const struct imx_mxc_pwm_data imx21_mxc_pwm_data __initconst =
-       imx_mxc_pwm_data_entry_single(MX21, 0, , SZ_4K);
-#endif /* ifdef CONFIG_SOC_IMX21 */
-
-#ifdef CONFIG_SOC_IMX25
-const struct imx_mxc_pwm_data imx25_mxc_pwm_data[] __initconst = {
-#define imx25_mxc_pwm_data_entry(_id, _hwid)                           \
-       imx_mxc_pwm_data_entry(MX25, _id, _hwid, SZ_16K)
-       imx25_mxc_pwm_data_entry(0, 1),
-       imx25_mxc_pwm_data_entry(1, 2),
-       imx25_mxc_pwm_data_entry(2, 3),
-       imx25_mxc_pwm_data_entry(3, 4),
-};
-#endif /* ifdef CONFIG_SOC_IMX25 */
-
-#ifdef CONFIG_SOC_IMX27
-const struct imx_mxc_pwm_data imx27_mxc_pwm_data __initconst =
-       imx_mxc_pwm_data_entry_single(MX27, 0, , SZ_4K);
-#endif /* ifdef CONFIG_SOC_IMX27 */
-
-#ifdef CONFIG_SOC_IMX51
-const struct imx_mxc_pwm_data imx51_mxc_pwm_data[] __initconst = {
-#define imx51_mxc_pwm_data_entry(_id, _hwid)                           \
-       imx_mxc_pwm_data_entry(MX51, _id, _hwid, SZ_16K)
-       imx51_mxc_pwm_data_entry(0, 1),
-       imx51_mxc_pwm_data_entry(1, 2),
-};
-#endif /* ifdef CONFIG_SOC_IMX51 */
-
-struct platform_device *__init imx_add_mxc_pwm(
-               const struct imx_mxc_pwm_data *data)
-{
-       struct resource res[] = {
-               {
-                       .start = data->iobase,
-                       .end = data->iobase + data->iosize - 1,
-                       .flags = IORESOURCE_MEM,
-               }, {
-                       .start = data->irq,
-                       .end = data->irq,
-                       .flags = IORESOURCE_IRQ,
-               },
-       };
-
-       return imx_add_platform_device("mxc_pwm", data->id,
-                       res, ARRAY_SIZE(res), NULL, 0);
-}
diff --git a/arch/arm/plat-mxc/devices/platform-mxc_rnga.c b/arch/arm/plat-mxc/devices/platform-mxc_rnga.c
deleted file mode 100644 (file)
index b4b7612..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (C) 2010 Pengutronix
- * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
- *
- * This program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License version 2 as published by the
- * Free Software Foundation.
- */
-#include <mach/hardware.h>
-#include <mach/devices-common.h>
-
-struct imx_mxc_rnga_data {
-       resource_size_t iobase;
-};
-
-#define imx_mxc_rnga_data_entry_single(soc)                            \
-       {                                                               \
-               .iobase = soc ## _RNGA_BASE_ADDR,                       \
-       }
-
-#ifdef CONFIG_SOC_IMX31
-static const struct imx_mxc_rnga_data imx31_mxc_rnga_data __initconst =
-       imx_mxc_rnga_data_entry_single(MX31);
-#endif /* ifdef CONFIG_SOC_IMX31 */
-
-static struct platform_device *__init imx_add_mxc_rnga(
-               const struct imx_mxc_rnga_data *data)
-{
-       struct resource res[] = {
-               {
-                       .start = data->iobase,
-                       .end = data->iobase + SZ_16K - 1,
-                       .flags = IORESOURCE_MEM,
-               },
-       };
-       return imx_add_platform_device("mxc_rnga", -1,
-                       res, ARRAY_SIZE(res), NULL, 0);
-}
-
-static int __init imxXX_add_mxc_rnga(void)
-{
-       struct platform_device *ret;
-
-#if defined(CONFIG_SOC_IMX31)
-       if (cpu_is_mx31())
-               ret = imx_add_mxc_rnga(&imx31_mxc_rnga_data);
-       else
-#endif /* if defined(CONFIG_SOC_IMX31) */
-               ret = ERR_PTR(-ENODEV);
-
-       if (IS_ERR(ret))
-               return PTR_ERR(ret);
-
-       return 0;
-}
-arch_initcall(imxXX_add_mxc_rnga);
diff --git a/arch/arm/plat-mxc/devices/platform-mxc_rtc.c b/arch/arm/plat-mxc/devices/platform-mxc_rtc.c
deleted file mode 100644 (file)
index a5c9ad5..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (C) 2010-2011 Pengutronix
- * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
- *
- * This program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License version 2 as published by the
- * Free Software Foundation.
- */
-#include <mach/hardware.h>
-#include <mach/devices-common.h>
-
-#define imx_mxc_rtc_data_entry_single(soc)                             \
-       {                                                               \
-               .iobase = soc ## _RTC_BASE_ADDR,                        \
-               .irq = soc ## _INT_RTC,                                 \
-       }
-
-#ifdef CONFIG_SOC_IMX31
-const struct imx_mxc_rtc_data imx31_mxc_rtc_data __initconst =
-       imx_mxc_rtc_data_entry_single(MX31);
-#endif /* ifdef CONFIG_SOC_IMX31 */
-
-#ifdef CONFIG_SOC_IMX35
-const struct imx_mxc_rtc_data imx35_mxc_rtc_data __initconst =
-       imx_mxc_rtc_data_entry_single(MX35);
-#endif /* ifdef CONFIG_SOC_IMX35 */
-
-struct platform_device *__init imx_add_mxc_rtc(
-               const struct imx_mxc_rtc_data *data)
-{
-       struct resource res[] = {
-               {
-                       .start = data->iobase,
-                       .end = data->iobase + SZ_16K - 1,
-                       .flags = IORESOURCE_MEM,
-               }, {
-                       .start = data->irq,
-                       .end = data->irq,
-                       .flags = IORESOURCE_IRQ,
-               },
-       };
-
-       return imx_add_platform_device("mxc_rtc", -1,
-                       res, ARRAY_SIZE(res), NULL, 0);
-}
diff --git a/arch/arm/plat-mxc/devices/platform-mxc_w1.c b/arch/arm/plat-mxc/devices/platform-mxc_w1.c
deleted file mode 100644 (file)
index 96fa5ea..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (C) 2010 Pengutronix
- * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
- *
- * This program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License version 2 as published by the
- * Free Software Foundation.
- */
-#include <mach/hardware.h>
-#include <mach/devices-common.h>
-
-#define imx_mxc_w1_data_entry_single(soc)                              \
-       {                                                               \
-               .iobase = soc ## _OWIRE_BASE_ADDR,                      \
-       }
-
-#ifdef CONFIG_SOC_IMX21
-const struct imx_mxc_w1_data imx21_mxc_w1_data __initconst =
-       imx_mxc_w1_data_entry_single(MX21);
-#endif /* ifdef CONFIG_SOC_IMX21 */
-
-#ifdef CONFIG_SOC_IMX27
-const struct imx_mxc_w1_data imx27_mxc_w1_data __initconst =
-       imx_mxc_w1_data_entry_single(MX27);
-#endif /* ifdef CONFIG_SOC_IMX27 */
-
-#ifdef CONFIG_SOC_IMX31
-const struct imx_mxc_w1_data imx31_mxc_w1_data __initconst =
-       imx_mxc_w1_data_entry_single(MX31);
-#endif /* ifdef CONFIG_SOC_IMX31 */
-
-#ifdef CONFIG_SOC_IMX35
-const struct imx_mxc_w1_data imx35_mxc_w1_data __initconst =
-       imx_mxc_w1_data_entry_single(MX35);
-#endif /* ifdef CONFIG_SOC_IMX35 */
-
-struct platform_device *__init imx_add_mxc_w1(
-               const struct imx_mxc_w1_data *data)
-{
-       struct resource res[] = {
-               {
-                       .start = data->iobase,
-                       .end = data->iobase + SZ_4K - 1,
-                       .flags = IORESOURCE_MEM,
-               },
-       };
-
-       return imx_add_platform_device("mxc_w1", 0,
-                       res, ARRAY_SIZE(res), NULL, 0);
-}
diff --git a/arch/arm/plat-mxc/devices/platform-pata_imx.c b/arch/arm/plat-mxc/devices/platform-pata_imx.c
deleted file mode 100644 (file)
index 70e2f2a..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * This program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License version 2 as published by the
- * Free Software Foundation.
- */
-#include <mach/hardware.h>
-#include <mach/devices-common.h>
-
-#define imx_pata_imx_data_entry_single(soc, _size)                     \
-       {                                                               \
-               .iobase = soc ## _ATA_BASE_ADDR,                        \
-               .iosize = _size,                                        \
-               .irq = soc ## _INT_ATA,                                 \
-       }
-
-#ifdef CONFIG_SOC_IMX27
-const struct imx_pata_imx_data imx27_pata_imx_data __initconst =
-       imx_pata_imx_data_entry_single(MX27, SZ_4K);
-#endif /* ifdef CONFIG_SOC_IMX27 */
-
-#ifdef CONFIG_SOC_IMX31
-const struct imx_pata_imx_data imx31_pata_imx_data __initconst =
-       imx_pata_imx_data_entry_single(MX31, SZ_16K);
-#endif /* ifdef CONFIG_SOC_IMX31 */
-
-#ifdef CONFIG_SOC_IMX35
-const struct imx_pata_imx_data imx35_pata_imx_data __initconst =
-       imx_pata_imx_data_entry_single(MX35, SZ_16K);
-#endif /* ifdef CONFIG_SOC_IMX35 */
-
-#ifdef CONFIG_SOC_IMX51
-const struct imx_pata_imx_data imx51_pata_imx_data __initconst =
-       imx_pata_imx_data_entry_single(MX51, SZ_16K);
-#endif /* ifdef CONFIG_SOC_IMX51 */
-
-#ifdef CONFIG_SOC_IMX53
-const struct imx_pata_imx_data imx53_pata_imx_data __initconst =
-       imx_pata_imx_data_entry_single(MX53, SZ_16K);
-#endif /* ifdef CONFIG_SOC_IMX53 */
-
-struct platform_device *__init imx_add_pata_imx(
-               const struct imx_pata_imx_data *data)
-{
-       struct resource res[] = {
-               {
-                       .start = data->iobase,
-                       .end = data->iobase + data->iosize - 1,
-                       .flags = IORESOURCE_MEM,
-               },
-               {
-                       .start = data->irq,
-                       .end = data->irq,
-                       .flags = IORESOURCE_IRQ,
-               },
-       };
-       return imx_add_platform_device("pata_imx", -1,
-                       res, ARRAY_SIZE(res), NULL, 0);
-}
-
diff --git a/arch/arm/plat-mxc/devices/platform-sdhci-esdhc-imx.c b/arch/arm/plat-mxc/devices/platform-sdhci-esdhc-imx.c
deleted file mode 100644 (file)
index 3793e47..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Copyright (C) 2010 Pengutronix, Wolfram Sang <w.sang@pengutronix.de>
- *
- * This program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License version 2 as published by the
- * Free Software Foundation.
- */
-
-#include <mach/hardware.h>
-#include <mach/devices-common.h>
-#include <linux/platform_data/mmc-esdhc-imx.h>
-
-#define imx_sdhci_esdhc_imx_data_entry_single(soc, _devid, _id, hwid) \
-       {                                                               \
-               .devid = _devid,                                        \
-               .id = _id,                                              \
-               .iobase = soc ## _ESDHC ## hwid ## _BASE_ADDR,  \
-               .irq = soc ## _INT_ESDHC ## hwid,                       \
-       }
-
-#define imx_sdhci_esdhc_imx_data_entry(soc, devid, id, hwid)   \
-       [id] = imx_sdhci_esdhc_imx_data_entry_single(soc, devid, id, hwid)
-
-#ifdef CONFIG_SOC_IMX25
-const struct imx_sdhci_esdhc_imx_data
-imx25_sdhci_esdhc_imx_data[] __initconst = {
-#define imx25_sdhci_esdhc_imx_data_entry(_id, _hwid)                   \
-       imx_sdhci_esdhc_imx_data_entry(MX25, "sdhci-esdhc-imx25", _id, _hwid)
-       imx25_sdhci_esdhc_imx_data_entry(0, 1),
-       imx25_sdhci_esdhc_imx_data_entry(1, 2),
-};
-#endif /* ifdef CONFIG_SOC_IMX25 */
-
-#ifdef CONFIG_SOC_IMX35
-const struct imx_sdhci_esdhc_imx_data
-imx35_sdhci_esdhc_imx_data[] __initconst = {
-#define imx35_sdhci_esdhc_imx_data_entry(_id, _hwid)                   \
-       imx_sdhci_esdhc_imx_data_entry(MX35, "sdhci-esdhc-imx35", _id, _hwid)
-       imx35_sdhci_esdhc_imx_data_entry(0, 1),
-       imx35_sdhci_esdhc_imx_data_entry(1, 2),
-       imx35_sdhci_esdhc_imx_data_entry(2, 3),
-};
-#endif /* ifdef CONFIG_SOC_IMX35 */
-
-#ifdef CONFIG_SOC_IMX51
-const struct imx_sdhci_esdhc_imx_data
-imx51_sdhci_esdhc_imx_data[] __initconst = {
-#define imx51_sdhci_esdhc_imx_data_entry(_id, _hwid)                   \
-       imx_sdhci_esdhc_imx_data_entry(MX51, "sdhci-esdhc-imx51", _id, _hwid)
-       imx51_sdhci_esdhc_imx_data_entry(0, 1),
-       imx51_sdhci_esdhc_imx_data_entry(1, 2),
-       imx51_sdhci_esdhc_imx_data_entry(2, 3),
-       imx51_sdhci_esdhc_imx_data_entry(3, 4),
-};
-#endif /* ifdef CONFIG_SOC_IMX51 */
-
-#ifdef CONFIG_SOC_IMX53
-const struct imx_sdhci_esdhc_imx_data
-imx53_sdhci_esdhc_imx_data[] __initconst = {
-#define imx53_sdhci_esdhc_imx_data_entry(_id, _hwid)                   \
-       imx_sdhci_esdhc_imx_data_entry(MX53, "sdhci-esdhc-imx53", _id, _hwid)
-       imx53_sdhci_esdhc_imx_data_entry(0, 1),
-       imx53_sdhci_esdhc_imx_data_entry(1, 2),
-       imx53_sdhci_esdhc_imx_data_entry(2, 3),
-       imx53_sdhci_esdhc_imx_data_entry(3, 4),
-};
-#endif /* ifdef CONFIG_SOC_IMX53 */
-
-static const struct esdhc_platform_data default_esdhc_pdata __initconst = {
-       .wp_type = ESDHC_WP_NONE,
-       .cd_type = ESDHC_CD_NONE,
-};
-
-struct platform_device *__init imx_add_sdhci_esdhc_imx(
-               const struct imx_sdhci_esdhc_imx_data *data,
-               const struct esdhc_platform_data *pdata)
-{
-       struct resource res[] = {
-               {
-                       .start = data->iobase,
-                       .end = data->iobase + SZ_16K - 1,
-                       .flags = IORESOURCE_MEM,
-               }, {
-                       .start = data->irq,
-                       .end = data->irq,
-                       .flags = IORESOURCE_IRQ,
-               },
-       };
-
-       /*
-        * If machine does not provide pdata, use the default one
-        * which means no WP/CD support
-        */
-       if (!pdata)
-               pdata = &default_esdhc_pdata;
-
-       return imx_add_platform_device(data->devid, data->id, res,
-                       ARRAY_SIZE(res), pdata, sizeof(*pdata));
-}
diff --git a/arch/arm/plat-mxc/devices/platform-spi_imx.c b/arch/arm/plat-mxc/devices/platform-spi_imx.c
deleted file mode 100644 (file)
index 9c50c14..0000000
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Copyright (C) 2009-2010 Pengutronix
- * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
- *
- * This program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License version 2 as published by the
- * Free Software Foundation.
- */
-#include <mach/hardware.h>
-#include <mach/devices-common.h>
-
-#define imx_spi_imx_data_entry_single(soc, type, _devid, _id, hwid, _size) \
-       {                                                               \
-               .devid = _devid,                                        \
-               .id = _id,                                              \
-               .iobase = soc ## _ ## type ## hwid ## _BASE_ADDR,       \
-               .iosize = _size,                                        \
-               .irq = soc ## _INT_ ## type ## hwid,                    \
-       }
-
-#define imx_spi_imx_data_entry(soc, type, devid, id, hwid, size)       \
-       [id] = imx_spi_imx_data_entry_single(soc, type, devid, id, hwid, size)
-
-#ifdef CONFIG_SOC_IMX1
-const struct imx_spi_imx_data imx1_cspi_data[] __initconst = {
-#define imx1_cspi_data_entry(_id, _hwid) \
-       imx_spi_imx_data_entry(MX1, CSPI, "imx1-cspi", _id, _hwid, SZ_4K)
-       imx1_cspi_data_entry(0, 1),
-       imx1_cspi_data_entry(1, 2),
-};
-#endif
-
-#ifdef CONFIG_SOC_IMX21
-const struct imx_spi_imx_data imx21_cspi_data[] __initconst = {
-#define imx21_cspi_data_entry(_id, _hwid)                            \
-       imx_spi_imx_data_entry(MX21, CSPI, "imx21-cspi", _id, _hwid, SZ_4K)
-       imx21_cspi_data_entry(0, 1),
-       imx21_cspi_data_entry(1, 2),
-};
-#endif
-
-#ifdef CONFIG_SOC_IMX25
-/* i.mx25 has the i.mx35 type cspi */
-const struct imx_spi_imx_data imx25_cspi_data[] __initconst = {
-#define imx25_cspi_data_entry(_id, _hwid)                              \
-       imx_spi_imx_data_entry(MX25, CSPI, "imx35-cspi", _id, _hwid, SZ_16K)
-       imx25_cspi_data_entry(0, 1),
-       imx25_cspi_data_entry(1, 2),
-       imx25_cspi_data_entry(2, 3),
-};
-#endif /* ifdef CONFIG_SOC_IMX25 */
-
-#ifdef CONFIG_SOC_IMX27
-const struct imx_spi_imx_data imx27_cspi_data[] __initconst = {
-#define imx27_cspi_data_entry(_id, _hwid)                              \
-       imx_spi_imx_data_entry(MX27, CSPI, "imx27-cspi", _id, _hwid, SZ_4K)
-       imx27_cspi_data_entry(0, 1),
-       imx27_cspi_data_entry(1, 2),
-       imx27_cspi_data_entry(2, 3),
-};
-#endif /* ifdef CONFIG_SOC_IMX27 */
-
-#ifdef CONFIG_SOC_IMX31
-const struct imx_spi_imx_data imx31_cspi_data[] __initconst = {
-#define imx31_cspi_data_entry(_id, _hwid)                              \
-       imx_spi_imx_data_entry(MX31, CSPI, "imx31-cspi", _id, _hwid, SZ_4K)
-       imx31_cspi_data_entry(0, 1),
-       imx31_cspi_data_entry(1, 2),
-       imx31_cspi_data_entry(2, 3),
-};
-#endif /* ifdef CONFIG_SOC_IMX31 */
-
-#ifdef CONFIG_SOC_IMX35
-const struct imx_spi_imx_data imx35_cspi_data[] __initconst = {
-#define imx35_cspi_data_entry(_id, _hwid)                           \
-       imx_spi_imx_data_entry(MX35, CSPI, "imx35-cspi", _id, _hwid, SZ_4K)
-       imx35_cspi_data_entry(0, 1),
-       imx35_cspi_data_entry(1, 2),
-};
-#endif /* ifdef CONFIG_SOC_IMX35 */
-
-#ifdef CONFIG_SOC_IMX51
-/* i.mx51 has the i.mx35 type cspi */
-const struct imx_spi_imx_data imx51_cspi_data __initconst =
-       imx_spi_imx_data_entry_single(MX51, CSPI, "imx35-cspi", 2, , SZ_4K);
-
-const struct imx_spi_imx_data imx51_ecspi_data[] __initconst = {
-#define imx51_ecspi_data_entry(_id, _hwid)                             \
-       imx_spi_imx_data_entry(MX51, ECSPI, "imx51-ecspi", _id, _hwid, SZ_4K)
-       imx51_ecspi_data_entry(0, 1),
-       imx51_ecspi_data_entry(1, 2),
-};
-#endif /* ifdef CONFIG_SOC_IMX51 */
-
-#ifdef CONFIG_SOC_IMX53
-/* i.mx53 has the i.mx35 type cspi */
-const struct imx_spi_imx_data imx53_cspi_data __initconst =
-       imx_spi_imx_data_entry_single(MX53, CSPI, "imx35-cspi", 2, , SZ_4K);
-
-/* i.mx53 has the i.mx51 type ecspi */
-const struct imx_spi_imx_data imx53_ecspi_data[] __initconst = {
-#define imx53_ecspi_data_entry(_id, _hwid)                             \
-       imx_spi_imx_data_entry(MX53, ECSPI, "imx51-ecspi", _id, _hwid, SZ_4K)
-       imx53_ecspi_data_entry(0, 1),
-       imx53_ecspi_data_entry(1, 2),
-};
-#endif /* ifdef CONFIG_SOC_IMX53 */
-
-struct platform_device *__init imx_add_spi_imx(
-               const struct imx_spi_imx_data *data,
-               const struct spi_imx_master *pdata)
-{
-       struct resource res[] = {
-               {
-                       .start = data->iobase,
-                       .end = data->iobase + data->iosize - 1,
-                       .flags = IORESOURCE_MEM,
-               }, {
-                       .start = data->irq,
-                       .end = data->irq,
-                       .flags = IORESOURCE_IRQ,
-               },
-       };
-
-       return imx_add_platform_device(data->devid, data->id,
-                       res, ARRAY_SIZE(res), pdata, sizeof(*pdata));
-}
diff --git a/arch/arm/plat-mxc/include/mach/devices-common.h b/arch/arm/plat-mxc/include/mach/devices-common.h
deleted file mode 100644 (file)
index eaf79d2..0000000
+++ /dev/null
@@ -1,341 +0,0 @@
-/*
- * Copyright (C) 2009-2010 Pengutronix
- * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
- *
- * This program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License version 2 as published by the
- * Free Software Foundation.
- */
-#include <linux/kernel.h>
-#include <linux/platform_device.h>
-#include <linux/init.h>
-#include <linux/platform_data/dma-imx-sdma.h>
-
-extern struct device mxc_aips_bus;
-extern struct device mxc_ahb_bus;
-
-static inline struct platform_device *imx_add_platform_device_dmamask(
-               const char *name, int id,
-               const struct resource *res, unsigned int num_resources,
-               const void *data, size_t size_data, u64 dmamask)
-{
-       struct platform_device_info pdevinfo = {
-               .name = name,
-               .id = id,
-               .res = res,
-               .num_res = num_resources,
-               .data = data,
-               .size_data = size_data,
-               .dma_mask = dmamask,
-       };
-       return platform_device_register_full(&pdevinfo);
-}
-
-static inline struct platform_device *imx_add_platform_device(
-               const char *name, int id,
-               const struct resource *res, unsigned int num_resources,
-               const void *data, size_t size_data)
-{
-       return imx_add_platform_device_dmamask(
-                       name, id, res, num_resources, data, size_data, 0);
-}
-
-#include <linux/fec.h>
-struct imx_fec_data {
-       const char *devid;
-       resource_size_t iobase;
-       resource_size_t irq;
-};
-struct platform_device *__init imx_add_fec(
-               const struct imx_fec_data *data,
-               const struct fec_platform_data *pdata);
-
-#include <linux/can/platform/flexcan.h>
-struct imx_flexcan_data {
-       int id;
-       resource_size_t iobase;
-       resource_size_t iosize;
-       resource_size_t irq;
-};
-struct platform_device *__init imx_add_flexcan(
-               const struct imx_flexcan_data *data,
-               const struct flexcan_platform_data *pdata);
-
-#include <linux/fsl_devices.h>
-struct imx_fsl_usb2_udc_data {
-       resource_size_t iobase;
-       resource_size_t irq;
-};
-struct platform_device *__init imx_add_fsl_usb2_udc(
-               const struct imx_fsl_usb2_udc_data *data,
-               const struct fsl_usb2_platform_data *pdata);
-
-#include <linux/gpio_keys.h>
-struct platform_device *__init imx_add_gpio_keys(
-               const struct gpio_keys_platform_data *pdata);
-
-#include <linux/platform_data/usb-mx2.h>
-struct imx_imx21_hcd_data {
-       resource_size_t iobase;
-       resource_size_t irq;
-};
-struct platform_device *__init imx_add_imx21_hcd(
-               const struct imx_imx21_hcd_data *data,
-               const struct mx21_usbh_platform_data *pdata);
-
-struct imx_imx27_coda_data {
-       resource_size_t iobase;
-       resource_size_t iosize;
-       resource_size_t irq;
-};
-struct platform_device *__init imx_add_imx27_coda(
-               const struct imx_imx27_coda_data *data);
-
-struct imx_imx2_wdt_data {
-       int id;
-       resource_size_t iobase;
-       resource_size_t iosize;
-};
-struct platform_device *__init imx_add_imx2_wdt(
-               const struct imx_imx2_wdt_data *data);
-
-struct imx_imxdi_rtc_data {
-       resource_size_t iobase;
-       resource_size_t irq;
-};
-struct platform_device *__init imx_add_imxdi_rtc(
-               const struct imx_imxdi_rtc_data *data);
-
-#include <linux/platform_data/video-imxfb.h>
-struct imx_imx_fb_data {
-       resource_size_t iobase;
-       resource_size_t iosize;
-       resource_size_t irq;
-};
-struct platform_device *__init imx_add_imx_fb(
-               const struct imx_imx_fb_data *data,
-               const struct imx_fb_platform_data *pdata);
-
-#include <linux/platform_data/i2c-imx.h>
-struct imx_imx_i2c_data {
-       int id;
-       resource_size_t iobase;
-       resource_size_t iosize;
-       resource_size_t irq;
-};
-struct platform_device *__init imx_add_imx_i2c(
-               const struct imx_imx_i2c_data *data,
-               const struct imxi2c_platform_data *pdata);
-
-#include <linux/input/matrix_keypad.h>
-struct imx_imx_keypad_data {
-       resource_size_t iobase;
-       resource_size_t iosize;
-       resource_size_t irq;
-};
-struct platform_device *__init imx_add_imx_keypad(
-               const struct imx_imx_keypad_data *data,
-               const struct matrix_keymap_data *pdata);
-
-#include <linux/platform_data/asoc-imx-ssi.h>
-struct imx_imx_ssi_data {
-       int id;
-       resource_size_t iobase;
-       resource_size_t iosize;
-       resource_size_t irq;
-       resource_size_t dmatx0;
-       resource_size_t dmarx0;
-       resource_size_t dmatx1;
-       resource_size_t dmarx1;
-};
-struct platform_device *__init imx_add_imx_ssi(
-               const struct imx_imx_ssi_data *data,
-               const struct imx_ssi_platform_data *pdata);
-
-#include <linux/platform_data/serial-imx.h>
-struct imx_imx_uart_3irq_data {
-       int id;
-       resource_size_t iobase;
-       resource_size_t iosize;
-       resource_size_t irqrx;
-       resource_size_t irqtx;
-       resource_size_t irqrts;
-};
-struct platform_device *__init imx_add_imx_uart_3irq(
-               const struct imx_imx_uart_3irq_data *data,
-               const struct imxuart_platform_data *pdata);
-
-struct imx_imx_uart_1irq_data {
-       int id;
-       resource_size_t iobase;
-       resource_size_t iosize;
-       resource_size_t irq;
-};
-struct platform_device *__init imx_add_imx_uart_1irq(
-               const struct imx_imx_uart_1irq_data *data,
-               const struct imxuart_platform_data *pdata);
-
-#include <linux/platform_data/usb-imx_udc.h>
-struct imx_imx_udc_data {
-       resource_size_t iobase;
-       resource_size_t iosize;
-       resource_size_t irq0;
-       resource_size_t irq1;
-       resource_size_t irq2;
-       resource_size_t irq3;
-       resource_size_t irq4;
-       resource_size_t irq5;
-       resource_size_t irq6;
-};
-struct platform_device *__init imx_add_imx_udc(
-               const struct imx_imx_udc_data *data,
-               const struct imxusb_platform_data *pdata);
-
-#include <linux/platform_data/video-mx3fb.h>
-#include <linux/platform_data/camera-mx3.h>
-struct imx_ipu_core_data {
-       resource_size_t iobase;
-       resource_size_t synirq;
-       resource_size_t errirq;
-};
-struct platform_device *__init imx_add_ipu_core(
-               const struct imx_ipu_core_data *data);
-struct platform_device *__init imx_alloc_mx3_camera(
-               const struct imx_ipu_core_data *data,
-               const struct mx3_camera_pdata *pdata);
-struct platform_device *__init imx_add_mx3_sdc_fb(
-               const struct imx_ipu_core_data *data,
-               struct mx3fb_platform_data *pdata);
-
-#include <linux/platform_data/camera-mx1.h>
-struct imx_mx1_camera_data {
-       resource_size_t iobase;
-       resource_size_t iosize;
-       resource_size_t irq;
-};
-struct platform_device *__init imx_add_mx1_camera(
-               const struct imx_mx1_camera_data *data,
-               const struct mx1_camera_pdata *pdata);
-
-#include <linux/platform_data/camera-mx2.h>
-struct imx_mx2_camera_data {
-       resource_size_t iobasecsi;
-       resource_size_t iosizecsi;
-       resource_size_t irqcsi;
-       resource_size_t iobaseemmaprp;
-       resource_size_t iosizeemmaprp;
-       resource_size_t irqemmaprp;
-};
-struct platform_device *__init imx_add_mx2_camera(
-               const struct imx_mx2_camera_data *data,
-               const struct mx2_camera_platform_data *pdata);
-struct platform_device *__init imx_add_mx2_emmaprp(
-               const struct imx_mx2_camera_data *data);
-
-#include <linux/platform_data/usb-ehci-mxc.h>
-struct imx_mxc_ehci_data {
-       int id;
-       resource_size_t iobase;
-       resource_size_t irq;
-};
-struct platform_device *__init imx_add_mxc_ehci(
-               const struct imx_mxc_ehci_data *data,
-               const struct mxc_usbh_platform_data *pdata);
-
-#include <linux/platform_data/mmc-mxcmmc.h>
-struct imx_mxc_mmc_data {
-       int id;
-       resource_size_t iobase;
-       resource_size_t iosize;
-       resource_size_t irq;
-       resource_size_t dmareq;
-};
-struct platform_device *__init imx_add_mxc_mmc(
-               const struct imx_mxc_mmc_data *data,
-               const struct imxmmc_platform_data *pdata);
-
-#include <linux/platform_data/mtd-mxc_nand.h>
-struct imx_mxc_nand_data {
-       /*
-        * 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
-        * appears in the kernel command line to pass its partitioning.
-        */
-       int id;
-       resource_size_t iobase;
-       resource_size_t iosize;
-       resource_size_t axibase;
-       resource_size_t irq;
-};
-struct platform_device *__init imx_add_mxc_nand(
-               const struct imx_mxc_nand_data *data,
-               const struct mxc_nand_platform_data *pdata);
-
-struct imx_pata_imx_data {
-       resource_size_t iobase;
-       resource_size_t iosize;
-       resource_size_t irq;
-};
-struct platform_device *__init imx_add_pata_imx(
-               const struct imx_pata_imx_data *data);
-
-struct imx_mxc_pwm_data {
-       int id;
-       resource_size_t iobase;
-       resource_size_t iosize;
-       resource_size_t irq;
-};
-struct platform_device *__init imx_add_mxc_pwm(
-               const struct imx_mxc_pwm_data *data);
-
-/* mxc_rtc */
-struct imx_mxc_rtc_data {
-       resource_size_t iobase;
-       resource_size_t irq;
-};
-struct platform_device *__init imx_add_mxc_rtc(
-               const struct imx_mxc_rtc_data *data);
-
-/* mxc_w1 */
-struct imx_mxc_w1_data {
-       resource_size_t iobase;
-};
-struct platform_device *__init imx_add_mxc_w1(
-               const struct imx_mxc_w1_data *data);
-
-#include <linux/platform_data/mmc-esdhc-imx.h>
-struct imx_sdhci_esdhc_imx_data {
-       const char *devid;
-       int id;
-       resource_size_t iobase;
-       resource_size_t irq;
-};
-struct platform_device *__init imx_add_sdhci_esdhc_imx(
-               const struct imx_sdhci_esdhc_imx_data *data,
-               const struct esdhc_platform_data *pdata);
-
-#include <linux/platform_data/spi-imx.h>
-struct imx_spi_imx_data {
-       const char *devid;
-       int id;
-       resource_size_t iobase;
-       resource_size_t iosize;
-       int irq;
-};
-struct platform_device *__init imx_add_spi_imx(
-               const struct imx_spi_imx_data *data,
-               const struct spi_imx_master *pdata);
-
-struct platform_device *imx_add_imx_dma(void);
-struct platform_device *imx_add_imx_sdma(char *name,
-       resource_size_t iobase, int irq, struct sdma_platform_data *pdata);
-
-#include <linux/ahci_platform.h>
-struct imx_ahci_imx_data {
-       const char *devid;
-       resource_size_t iobase;
-       resource_size_t irq;
-};
-struct platform_device *__init imx_add_ahci_imx(
-               const struct imx_ahci_imx_data *data,
-               const struct ahci_platform_data *pdata);