aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-davinci
diff options
context:
space:
mode:
authorSergei Shtylyov <sshtylyov@ru.mvista.com>2009-10-30 15:49:44 -0400
committerKevin Hilman <khilman@deeprootsystems.com>2009-11-25 13:21:33 -0500
commitb0ea26e1c8970c1b252a43e6c33555829ba4b0d2 (patch)
treecb9eced03c78455de98ee50f7659f7acddab3b43 /arch/arm/mach-davinci
parent355fb4e3ea590976819c03070bf2c9491aede258 (diff)
DA8xx: MUSB platform device registration
Add the function to register the MUSB platform device. Additional compile warning fixes by Sekhar Nori. Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Sekhar Nori <nsekhar@ti.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm/mach-davinci')
-rw-r--r--arch/arm/mach-davinci/include/mach/da8xx.h1
-rw-r--r--arch/arm/mach-davinci/usb.c35
2 files changed, 36 insertions, 0 deletions
diff --git a/arch/arm/mach-davinci/include/mach/da8xx.h b/arch/arm/mach-davinci/include/mach/da8xx.h
index b4cf8b146e8e..174c75817d32 100644
--- a/arch/arm/mach-davinci/include/mach/da8xx.h
+++ b/arch/arm/mach-davinci/include/mach/da8xx.h
@@ -80,6 +80,7 @@ void __init da850_init(void);
80int da8xx_register_edma(void); 80int da8xx_register_edma(void);
81int da8xx_register_i2c(int instance, struct davinci_i2c_platform_data *pdata); 81int da8xx_register_i2c(int instance, struct davinci_i2c_platform_data *pdata);
82int da8xx_register_watchdog(void); 82int da8xx_register_watchdog(void);
83int da8xx_register_usb20(unsigned mA, unsigned potpgt);
83int da8xx_register_usb11(struct da8xx_ohci_root_hub *pdata); 84int da8xx_register_usb11(struct da8xx_ohci_root_hub *pdata);
84int da8xx_register_emac(void); 85int da8xx_register_emac(void);
85int da8xx_register_lcdc(struct da8xx_lcdc_platform_data *pdata); 86int da8xx_register_lcdc(struct da8xx_lcdc_platform_data *pdata);
diff --git a/arch/arm/mach-davinci/usb.c b/arch/arm/mach-davinci/usb.c
index fe20cc2e8385..31f0cbea0caa 100644
--- a/arch/arm/mach-davinci/usb.c
+++ b/arch/arm/mach-davinci/usb.c
@@ -13,6 +13,8 @@
13#include <mach/usb.h> 13#include <mach/usb.h>
14 14
15#define DAVINCI_USB_OTG_BASE 0x01c64000 15#define DAVINCI_USB_OTG_BASE 0x01c64000
16
17#define DA8XX_USB0_BASE 0x01e00000
16#define DA8XX_USB1_BASE 0x01e25000 18#define DA8XX_USB1_BASE 0x01e25000
17 19
18#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) 20#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE)
@@ -98,12 +100,45 @@ void __init davinci_setup_usb(unsigned mA, unsigned potpgt_ms)
98 platform_device_register(&usb_dev); 100 platform_device_register(&usb_dev);
99} 101}
100 102
103#ifdef CONFIG_ARCH_DAVINCI_DA8XX
104static struct resource da8xx_usb20_resources[] = {
105 {
106 .start = DA8XX_USB0_BASE,
107 .end = DA8XX_USB0_BASE + SZ_64K - 1,
108 .flags = IORESOURCE_MEM,
109 },
110 {
111 .start = IRQ_DA8XX_USB_INT,
112 .flags = IORESOURCE_IRQ,
113 },
114};
115
116int __init da8xx_register_usb20(unsigned mA, unsigned potpgt)
117{
118 usb_data.clock = "usb20";
119 usb_data.power = mA > 510 ? 255 : mA / 2;
120 usb_data.potpgt = (potpgt + 1) / 2;
121
122 usb_dev.resource = da8xx_usb20_resources;
123 usb_dev.num_resources = ARRAY_SIZE(da8xx_usb20_resources);
124
125 return platform_device_register(&usb_dev);
126}
127#endif /* CONFIG_DAVINCI_DA8XX */
128
101#else 129#else
102 130
103void __init davinci_setup_usb(unsigned mA, unsigned potpgt_ms) 131void __init davinci_setup_usb(unsigned mA, unsigned potpgt_ms)
104{ 132{
105} 133}
106 134
135#ifdef CONFIG_ARCH_DAVINCI_DA8XX
136int __init da8xx_register_usb20(unsigned mA, unsigned potpgt)
137{
138 return 0;
139}
140#endif
141
107#endif /* CONFIG_USB_MUSB_HDRC */ 142#endif /* CONFIG_USB_MUSB_HDRC */
108 143
109#ifdef CONFIG_ARCH_DAVINCI_DA8XX 144#ifdef CONFIG_ARCH_DAVINCI_DA8XX