aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-mxc/devices
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/plat-mxc/devices')
-rw-r--r--arch/arm/plat-mxc/devices/Kconfig3
-rw-r--r--arch/arm/plat-mxc/devices/Makefile1
-rw-r--r--arch/arm/plat-mxc/devices/platform-mxc-ehci.c46
3 files changed, 50 insertions, 0 deletions
diff --git a/arch/arm/plat-mxc/devices/Kconfig b/arch/arm/plat-mxc/devices/Kconfig
index 6560cf5180b6..d2d096c44c4a 100644
--- a/arch/arm/plat-mxc/devices/Kconfig
+++ b/arch/arm/plat-mxc/devices/Kconfig
@@ -37,6 +37,9 @@ config IMX_HAVE_PLATFORM_MX1_CAMERA
37config IMX_HAVE_PLATFORM_MX2_CAMERA 37config IMX_HAVE_PLATFORM_MX2_CAMERA
38 bool 38 bool
39 39
40config IMX_HAVE_PLATFORM_MXC_EHCI
41 bool
42
40config IMX_HAVE_PLATFORM_MXC_MMC 43config IMX_HAVE_PLATFORM_MXC_MMC
41 bool 44 bool
42 45
diff --git a/arch/arm/plat-mxc/devices/Makefile b/arch/arm/plat-mxc/devices/Makefile
index d2b7a9196ab4..c8734bd23cc4 100644
--- a/arch/arm/plat-mxc/devices/Makefile
+++ b/arch/arm/plat-mxc/devices/Makefile
@@ -11,6 +11,7 @@ obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_UART) += platform-imx-uart.o
11obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_UDC) += platform-imx_udc.o 11obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_UDC) += platform-imx_udc.o
12obj-$(CONFIG_IMX_HAVE_PLATFORM_MX1_CAMERA) += platform-mx1-camera.o 12obj-$(CONFIG_IMX_HAVE_PLATFORM_MX1_CAMERA) += platform-mx1-camera.o
13obj-$(CONFIG_IMX_HAVE_PLATFORM_MX2_CAMERA) += platform-mx2-camera.o 13obj-$(CONFIG_IMX_HAVE_PLATFORM_MX2_CAMERA) += platform-mx2-camera.o
14obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_EHCI) += platform-mxc-ehci.o
14obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_MMC) += platform-mxc-mmc.o 15obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_MMC) += platform-mxc-mmc.o
15obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_NAND) += platform-mxc_nand.o 16obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_NAND) += platform-mxc_nand.o
16obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_PWM) += platform-mxc_pwm.o 17obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_PWM) += platform-mxc_pwm.o
diff --git a/arch/arm/plat-mxc/devices/platform-mxc-ehci.c b/arch/arm/plat-mxc/devices/platform-mxc-ehci.c
new file mode 100644
index 000000000000..0cb67bb6e5b1
--- /dev/null
+++ b/arch/arm/plat-mxc/devices/platform-mxc-ehci.c
@@ -0,0 +1,46 @@
1/*
2 * Copyright (C) 2010 Pengutronix
3 * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
4 *
5 * This program is free software; you can redistribute it and/or modify it under
6 * the terms of the GNU General Public License version 2 as published by the
7 * Free Software Foundation.
8 */
9#include <mach/hardware.h>
10#include <mach/devices-common.h>
11
12#define imx_mxc_ehci_data_entry_single(soc, _id, hs) \
13 { \
14 .id = _id, \
15 .iobase = soc ## _USB_ ## hs ## _BASE_ADDR, \
16 .irq = soc ## _INT_USB_ ## hs, \
17 }
18
19#ifdef CONFIG_SOC_IMX27
20const struct imx_mxc_ehci_data imx27_mxc_ehci_otg_data __initconst =
21 imx_mxc_ehci_data_entry_single(MX27, 0, OTG);
22const struct imx_mxc_ehci_data imx27_mxc_ehci_hs_data[] __initconst = {
23 imx_mxc_ehci_data_entry_single(MX27, 1, HS1),
24 imx_mxc_ehci_data_entry_single(MX27, 2, HS2),
25};
26#endif /* ifdef CONFIG_SOC_IMX27 */
27
28struct platform_device *__init imx_add_mxc_ehci(
29 const struct imx_mxc_ehci_data *data,
30 const struct mxc_usbh_platform_data *pdata)
31{
32 struct resource res[] = {
33 {
34 .start = data->iobase,
35 .end = data->iobase + SZ_512 - 1,
36 .flags = IORESOURCE_MEM,
37 }, {
38 .start = data->irq,
39 .end = data->irq,
40 .flags = IORESOURCE_IRQ,
41 },
42 };
43 return imx_add_platform_device_dmamask("mxc-ehci", data->id,
44 res, ARRAY_SIZE(res),
45 pdata, sizeof(*pdata), DMA_BIT_MASK(32));
46}