aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/usb-musb.c
diff options
context:
space:
mode:
authorMaulik Mankad <x0082077@ti.com>2010-02-17 17:09:30 -0500
committerTony Lindgren <tony@atomide.com>2010-02-19 18:22:17 -0500
commit884b8369ee78c081b5e5a99d1d09a95815d13c28 (patch)
treeb9242dfe2fc11fb743bb265f4ee4ee2a2a43e7b6 /arch/arm/mach-omap2/usb-musb.c
parentf9828552b945b9522f15f9eccea6d6df0af49753 (diff)
omap: musb: Pass board specific data from board file
Pass board specific data for MUSB (like interface_type, mode etc) from board file by defining board specific structure. Each board file can define this structure based on its requirement and pass this information to the driver. Signed-off-by: Maulik Mankad <x0082077@ti.com> Cc: Tony Lindgren <tony@atomide.com> Cc: Felipe Balbi <felipe.balbi@nokia.com> Cc: David Brownell <david-b@pacbell.net> Cc: Greg Kroah-Hartman <gregkh@suse.de> Cc: Gupta Ajay Kumar <ajay.gupta@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/usb-musb.c')
-rw-r--r--arch/arm/mach-omap2/usb-musb.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/usb-musb.c b/arch/arm/mach-omap2/usb-musb.c
index ba71f762db71..2ddc316d9394 100644
--- a/arch/arm/mach-omap2/usb-musb.c
+++ b/arch/arm/mach-omap2/usb-musb.c
@@ -146,7 +146,7 @@ static struct platform_device musb_device = {
146 .resource = musb_resources, 146 .resource = musb_resources,
147}; 147};
148 148
149void __init usb_musb_init(void) 149void __init usb_musb_init(struct omap_musb_board_data *board_data)
150{ 150{
151 if (cpu_is_omap243x()) 151 if (cpu_is_omap243x())
152 musb_resources[0].start = OMAP243X_HS_BASE; 152 musb_resources[0].start = OMAP243X_HS_BASE;
@@ -159,6 +159,9 @@ void __init usb_musb_init(void)
159 * musb_core.c have been converted to use use clkdev. 159 * musb_core.c have been converted to use use clkdev.
160 */ 160 */
161 musb_plat.clock = "ick"; 161 musb_plat.clock = "ick";
162 musb_plat.board_data = board_data;
163 musb_plat.power = board_data->power >> 1;
164 musb_plat.mode = board_data->mode;
162 165
163 if (platform_device_register(&musb_device) < 0) { 166 if (platform_device_register(&musb_device) < 0) {
164 printk(KERN_ERR "Unable to register HS-USB (MUSB) device\n"); 167 printk(KERN_ERR "Unable to register HS-USB (MUSB) device\n");
@@ -167,7 +170,7 @@ void __init usb_musb_init(void)
167} 170}
168 171
169#else 172#else
170void __init usb_musb_init(void) 173void __init usb_musb_init(struct omap_musb_board_data *board_data)
171{ 174{
172} 175}
173#endif /* CONFIG_USB_MUSB_SOC */ 176#endif /* CONFIG_USB_MUSB_SOC */