[PATCH 4/9] ARM i.MX51: Add USB device functions

Sascha Hauer s.hauer at pengutronix.de
Thu Dec 13 12:00:39 EST 2012


Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 arch/arm/mach-imx/imx51.c                      |    1 +
 arch/arm/mach-imx/include/mach/devices-imx51.h |   15 +++++++++++++++
 2 files changed, 16 insertions(+)

diff --git a/arch/arm/mach-imx/imx51.c b/arch/arm/mach-imx/imx51.c
index a62daf8..cffcca3 100644
--- a/arch/arm/mach-imx/imx51.c
+++ b/arch/arm/mach-imx/imx51.c
@@ -70,6 +70,7 @@ static int imx51_init(void)
 	add_generic_device("imx31-gpio", 3, NULL, MX51_GPIO4_BASE_ADDR, 0x1000, IORESOURCE_MEM, NULL);
 	add_generic_device("imx21-wdt", 0, NULL, MX51_WDOG_BASE_ADDR, 0x1000, IORESOURCE_MEM, NULL);
 	add_generic_device("imx51-esdctl", 0, NULL, MX51_ESDCTL_BASE_ADDR, 0x1000, IORESOURCE_MEM, NULL);
+	add_generic_device("imx51-usb-misc", 0, NULL, MX51_OTG_BASE_ADDR + 0x800, 0x100, IORESOURCE_MEM, NULL);
 
 	return 0;
 }
diff --git a/arch/arm/mach-imx/include/mach/devices-imx51.h b/arch/arm/mach-imx/include/mach/devices-imx51.h
index 95497fa..ec8467a 100644
--- a/arch/arm/mach-imx/include/mach/devices-imx51.h
+++ b/arch/arm/mach-imx/include/mach/devices-imx51.h
@@ -98,3 +98,18 @@ static inline struct device_d *imx51_add_pata(void)
 {
 	return imx_add_pata((void *)MX51_ATA_BASE_ADDR);
 }
+
+static inline struct device_d *imx51_add_usbotg(void *pdata)
+{
+	return imx_add_usb((void *)MX51_OTG_BASE_ADDR, 0, pdata);
+}
+
+static inline struct device_d *imx51_add_usbh1(void *pdata)
+{
+	return imx_add_usb((void *)MX51_OTG_BASE_ADDR + 0x200, 1, pdata);
+}
+
+static inline struct device_d *imx51_add_usbh2(void *pdata)
+{
+	return imx_add_usb((void *)MX51_OTG_BASE_ADDR + 0x400, 2, pdata);
+}
-- 
1.7.10.4




More information about the barebox mailing list