diff options
author | Dinh Nguyen <Dinh.Nguyen@freescale.com> | 2010-04-30 16:48:24 -0400 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2010-05-03 09:18:13 -0400 |
commit | c53bdf1c4488ce196e9a0056285e7b4a36f6f76a (patch) | |
tree | 1a73e09c5b2ff6f7cf1fdb20e8be30d09cde3da8 /arch/arm/mach-mx5/devices.c | |
parent | 282f152219020c14064efa78374309e1df6a23a2 (diff) |
mx5: Add USB device definitions for Freescale MX51 Babbage HW
This patch is part of enabling USB for Freescale MX51 Babbage HW. This
patch adds device structures for USB Host1 and OTG port, and adds
clocking information for USB HW.
This patch applies to 2.6.34-rc6.
Signed-off-by: Dinh Nguyen <Dinh.Nguyen@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-mx5/devices.c')
-rw-r--r-- | arch/arm/mach-mx5/devices.c | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/arch/arm/mach-mx5/devices.c b/arch/arm/mach-mx5/devices.c index 5070ae1f94c6..e6262f31ed8f 100644 --- a/arch/arm/mach-mx5/devices.c +++ b/arch/arm/mach-mx5/devices.c | |||
@@ -11,6 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
14 | #include <linux/dma-mapping.h> | ||
14 | #include <linux/gpio.h> | 15 | #include <linux/gpio.h> |
15 | #include <mach/hardware.h> | 16 | #include <mach/hardware.h> |
16 | #include <mach/imx-uart.h> | 17 | #include <mach/imx-uart.h> |
@@ -92,6 +93,54 @@ struct platform_device mxc_fec_device = { | |||
92 | .resource = mxc_fec_resources, | 93 | .resource = mxc_fec_resources, |
93 | }; | 94 | }; |
94 | 95 | ||
96 | static u64 usb_dma_mask = DMA_BIT_MASK(32); | ||
97 | |||
98 | static struct resource usbotg_resources[] = { | ||
99 | { | ||
100 | .start = MX51_OTG_BASE_ADDR, | ||
101 | .end = MX51_OTG_BASE_ADDR + 0x1ff, | ||
102 | .flags = IORESOURCE_MEM, | ||
103 | }, | ||
104 | { | ||
105 | .start = MX51_MXC_INT_USB_OTG, | ||
106 | .flags = IORESOURCE_IRQ, | ||
107 | }, | ||
108 | }; | ||
109 | |||
110 | struct platform_device mxc_usbdr_host_device = { | ||
111 | .name = "mxc-ehci", | ||
112 | .id = 0, | ||
113 | .num_resources = ARRAY_SIZE(usbotg_resources), | ||
114 | .resource = usbotg_resources, | ||
115 | .dev = { | ||
116 | .dma_mask = &usb_dma_mask, | ||
117 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
118 | }, | ||
119 | }; | ||
120 | |||
121 | static struct resource usbh1_resources[] = { | ||
122 | { | ||
123 | .start = MX51_OTG_BASE_ADDR + 0x200, | ||
124 | .end = MX51_OTG_BASE_ADDR + 0x200 + 0x1ff, | ||
125 | .flags = IORESOURCE_MEM, | ||
126 | }, | ||
127 | { | ||
128 | .start = MX51_MXC_INT_USB_H1, | ||
129 | .flags = IORESOURCE_IRQ, | ||
130 | }, | ||
131 | }; | ||
132 | |||
133 | struct platform_device mxc_usbh1_device = { | ||
134 | .name = "mxc-ehci", | ||
135 | .id = 1, | ||
136 | .num_resources = ARRAY_SIZE(usbh1_resources), | ||
137 | .resource = usbh1_resources, | ||
138 | .dev = { | ||
139 | .dma_mask = &usb_dma_mask, | ||
140 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
141 | }, | ||
142 | }; | ||
143 | |||
95 | static struct mxc_gpio_port mxc_gpio_ports[] = { | 144 | static struct mxc_gpio_port mxc_gpio_ports[] = { |
96 | { | 145 | { |
97 | .chip.label = "gpio-0", | 146 | .chip.label = "gpio-0", |