aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-davinci/usb.c
diff options
context:
space:
mode:
authorSergei Shtylyov <sshtylyov@ru.mvista.com>2009-09-25 15:14:02 -0400
committerKevin Hilman <khilman@deeprootsystems.com>2009-11-25 13:21:27 -0500
commite5d3d252d5e06e846d767166e254831b711ee243 (patch)
treefb0d4b75058abf03365d4e056e2d997e86c08d5a /arch/arm/mach-davinci/usb.c
parent371b53e02546dd49249e8a4ffdafcc649b348357 (diff)
davinci: DA8xx: OHCI platform device
Add the function to register the OHCI platform device, given the root hub related platform data passed from the board specific code. The platfrom data provide for overriding the OHCI port power and over-current bits at the board level. Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm/mach-davinci/usb.c')
-rw-r--r--arch/arm/mach-davinci/usb.c37
1 files changed, 36 insertions, 1 deletions
diff --git a/arch/arm/mach-davinci/usb.c b/arch/arm/mach-davinci/usb.c
index 06f55931620c..2fff9a6295b9 100644
--- a/arch/arm/mach-davinci/usb.c
+++ b/arch/arm/mach-davinci/usb.c
@@ -14,8 +14,10 @@
14#include <mach/hardware.h> 14#include <mach/hardware.h>
15#include <mach/irqs.h> 15#include <mach/irqs.h>
16#include <mach/cputype.h> 16#include <mach/cputype.h>
17#include <mach/usb.h>
17 18
18#define DAVINCI_USB_OTG_BASE 0x01C64000 19#define DAVINCI_USB_OTG_BASE 0x01c64000
20#define DA8XX_USB1_BASE 0x01e25000
19 21
20#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) 22#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE)
21static struct musb_hdrc_eps_bits musb_eps[] = { 23static struct musb_hdrc_eps_bits musb_eps[] = {
@@ -108,3 +110,36 @@ void __init setup_usb(unsigned mA, unsigned potpgt_msec)
108 110
109#endif /* CONFIG_USB_MUSB_HDRC */ 111#endif /* CONFIG_USB_MUSB_HDRC */
110 112
113#ifdef CONFIG_ARCH_DAVINCI_DA8XX
114static struct resource da8xx_usb11_resources[] = {
115 [0] = {
116 .start = DA8XX_USB1_BASE,
117 .end = DA8XX_USB1_BASE + SZ_4K - 1,
118 .flags = IORESOURCE_MEM,
119 },
120 [1] = {
121 .start = IRQ_DA8XX_IRQN,
122 .end = IRQ_DA8XX_IRQN,
123 .flags = IORESOURCE_IRQ,
124 },
125};
126
127static u64 da8xx_usb11_dma_mask = DMA_BIT_MASK(32);
128
129static struct platform_device da8xx_usb11_device = {
130 .name = "ohci",
131 .id = 0,
132 .dev = {
133 .dma_mask = &da8xx_usb11_dma_mask,
134 .coherent_dma_mask = DMA_BIT_MASK(32),
135 },
136 .num_resources = ARRAY_SIZE(da8xx_usb11_resources),
137 .resource = da8xx_usb11_resources,
138};
139
140int __init da8xx_register_usb11(struct da8xx_ohci_root_hub *pdata)
141{
142 da8xx_usb11_device.dev.platform_data = pdata;
143 return platform_device_register(&da8xx_usb11_device);
144}
145#endif /* CONFIG_DAVINCI_DA8XX */