1 --- a/drivers/usb/musb/tusb6010.c
2 +++ b/drivers/usb/musb/tusb6010.c
3 @@ -56,6 +56,7 @@ u8 tusb_get_revision(struct musb *musb)
7 +EXPORT_SYMBOL(tusb_get_revision);
9 static int tusb_print_revision(struct musb *musb)
11 @@ -220,6 +221,7 @@ void musb_write_fifo(struct musb_hw_ep *
13 tusb_fifo_write_unaligned(fifo, buf, len);
15 +EXPORT_SYMBOL(musb_write_fifo);
17 void musb_read_fifo(struct musb_hw_ep *hw_ep, u16 len, u8 *buf)
19 @@ -267,6 +269,7 @@ void musb_read_fifo(struct musb_hw_ep *h
21 tusb_fifo_read_unaligned(fifo, buf, len);
23 +EXPORT_SYMBOL(musb_read_fifo);
25 static struct musb *the_musb;
27 @@ -1244,18 +1247,18 @@ static struct platform_driver tusb_drive
31 -MODULE_DESCRIPTION("TUSB6010 MUSB Glue Layer");
32 -MODULE_AUTHOR("Felipe Balbi <balbi@ti.com>");
33 -MODULE_LICENSE("GPL v2");
34 +//MODULE_DESCRIPTION("TUSB6010 MUSB Glue Layer");
35 +//MODULE_AUTHOR("Felipe Balbi <balbi@ti.com>");
36 +//MODULE_LICENSE("GPL v2");
38 -static int __init tusb_init(void)
39 +int musb_hdrc_glue_init(void)
41 return platform_driver_probe(&tusb_driver, tusb_probe);
43 -subsys_initcall(tusb_init);
44 +EXPORT_SYMBOL(musb_hdrc_glue_init);
46 -static void __exit tusb_exit(void)
47 +void musb_hdrc_glue_exit(void)
49 platform_driver_unregister(&tusb_driver);
51 -module_exit(tusb_exit);
52 +EXPORT_SYMBOL(musb_hdrc_glue_exit);
53 --- a/drivers/usb/musb/musb_core.c
54 +++ b/drivers/usb/musb/musb_core.c
55 @@ -207,7 +207,7 @@ static struct otg_io_access_ops musb_ulp
57 /*-------------------------------------------------------------------------*/
59 -#if !defined(CONFIG_USB_MUSB_TUSB6010) && !defined(CONFIG_USB_MUSB_BLACKFIN)
60 +#if !defined(CONFIG_USB_MUSB_TUSB6010) && !defined(CONFIG_USB_MUSB_TUSB6010_MODULE) && !defined(CONFIG_USB_MUSB_BLACKFIN)
63 * Load an endpoint's FIFO
64 @@ -250,7 +250,7 @@ void musb_write_fifo(struct musb_hw_ep *
68 -#if !defined(CONFIG_USB_MUSB_AM35X)
69 +#if !defined(CONFIG_USB_MUSB_AM35X) && !defined(CONFIG_USB_MUSB_TUSB6010) && !defined(CONFIG_USB_MUSB_TUSB6010_MODULE)
71 * Unload an endpoint's FIFO
73 @@ -1432,7 +1432,7 @@ static int __init musb_core_init(u16 mus
74 struct musb_hw_ep *hw_ep = musb->endpoints + i;
76 hw_ep->fifo = MUSB_FIFO_OFFSET(i) + mbase;
77 -#ifdef CONFIG_USB_MUSB_TUSB6010
78 +#if defined(CONFIG_USB_MUSB_TUSB6010) || defined(CONFIG_USB_MUSB_TUSB6010_MODULE)
79 hw_ep->fifo_async = musb->async + 0x400 + MUSB_FIFO_OFFSET(i);
80 hw_ep->fifo_sync = musb->sync + 0x400 + MUSB_FIFO_OFFSET(i);
82 @@ -2368,8 +2368,13 @@ static struct platform_driver musb_drive
84 /*-------------------------------------------------------------------------*/
86 +extern int musb_hdrc_glue_init(void);
87 +extern void musb_hdrc_glue_exit(void);
89 static int __init musb_init(void)
96 @@ -2378,7 +2383,17 @@ static int __init musb_init(void)
98 "otg (peripheral+host)",
100 - return platform_driver_probe(&musb_driver, musb_probe);
102 + err = musb_hdrc_glue_init();
105 + err = platform_driver_probe(&musb_driver, musb_probe);
107 + musb_hdrc_glue_exit();
114 /* make us init after usbcore and i2c (transceivers, regulators, etc)
115 @@ -2389,5 +2404,6 @@ fs_initcall(musb_init);
116 static void __exit musb_cleanup(void)
118 platform_driver_unregister(&musb_driver);
119 + musb_hdrc_glue_exit();
121 module_exit(musb_cleanup);
122 --- a/drivers/usb/Makefile
123 +++ b/drivers/usb/Makefile
124 @@ -47,7 +47,7 @@ obj-$(CONFIG_EARLY_PRINTK_DBGP) += early
125 obj-$(CONFIG_USB_ATM) += atm/
126 obj-$(CONFIG_USB_SPEEDTOUCH) += atm/
128 -obj-$(CONFIG_USB_MUSB_HDRC) += musb/
130 obj-$(CONFIG_USB_RENESAS_USBHS) += renesas_usbhs/
131 obj-$(CONFIG_USB_OTG_UTILS) += otg/
132 obj-$(CONFIG_USB_GADGET) += gadget/
133 --- a/drivers/usb/musb/Makefile
134 +++ b/drivers/usb/musb/Makefile
135 @@ -13,7 +13,7 @@ musb_hdrc-$(CONFIG_DEBUG_FS) += musb_d
136 # Hardware Glue Layer
137 obj-$(CONFIG_USB_MUSB_OMAP2PLUS) += omap2430.o
138 obj-$(CONFIG_USB_MUSB_AM35X) += am35x.o
139 -obj-$(CONFIG_USB_MUSB_TUSB6010) += tusb6010.o
140 +musb_hdrc-$(subst m,y,$(CONFIG_USB_MUSB_TUSB6010)) += tusb6010.o
141 obj-$(CONFIG_USB_MUSB_DAVINCI) += davinci.o
142 obj-$(CONFIG_USB_MUSB_DA8XX) += da8xx.o
143 obj-$(CONFIG_USB_MUSB_BLACKFIN) += blackfin.o