1 --- a/drivers/usb/musb/tusb6010.c
2 +++ b/drivers/usb/musb/tusb6010.c
3 @@ -221,6 +221,7 @@ void musb_write_fifo(struct musb_hw_ep *
5 tusb_fifo_write_unaligned(fifo, buf, len);
7 +EXPORT_SYMBOL(musb_write_fifo);
9 void musb_read_fifo(struct musb_hw_ep *hw_ep, u16 len, u8 *buf)
11 @@ -268,6 +269,7 @@ void musb_read_fifo(struct musb_hw_ep *h
13 tusb_fifo_read_unaligned(fifo, buf, len);
15 +EXPORT_SYMBOL(musb_read_fifo);
17 static struct musb *the_musb;
19 @@ -1165,7 +1167,7 @@ static const struct musb_platform_ops tu
21 static u64 tusb_dmamask = DMA_BIT_MASK(32);
23 -static int __init tusb_probe(struct platform_device *pdev)
24 +static int tusb_probe(struct platform_device *pdev)
26 struct musb_hdrc_platform_data *pdata = pdev->dev.platform_data;
27 struct platform_device *musb;
28 @@ -1245,18 +1247,18 @@ static struct platform_driver tusb_drive
32 -MODULE_DESCRIPTION("TUSB6010 MUSB Glue Layer");
33 -MODULE_AUTHOR("Felipe Balbi <balbi@ti.com>");
34 -MODULE_LICENSE("GPL v2");
35 +//MODULE_DESCRIPTION("TUSB6010 MUSB Glue Layer");
36 +//MODULE_AUTHOR("Felipe Balbi <balbi@ti.com>");
37 +//MODULE_LICENSE("GPL v2");
39 -static int __init tusb_init(void)
40 +int musb_hdrc_glue_init(void)
42 return platform_driver_probe(&tusb_driver, tusb_probe);
44 -subsys_initcall(tusb_init);
45 +EXPORT_SYMBOL(musb_hdrc_glue_init);
47 -static void __exit tusb_exit(void)
48 +void musb_hdrc_glue_exit(void)
50 platform_driver_unregister(&tusb_driver);
52 -module_exit(tusb_exit);
53 +EXPORT_SYMBOL(musb_hdrc_glue_exit);
54 --- a/drivers/usb/musb/musb_core.c
55 +++ b/drivers/usb/musb/musb_core.c
56 @@ -207,7 +207,7 @@ static struct otg_io_access_ops musb_ulp
58 /*-------------------------------------------------------------------------*/
60 -#if !defined(CONFIG_USB_MUSB_TUSB6010) && !defined(CONFIG_USB_MUSB_BLACKFIN)
61 +#if !defined(CONFIG_USB_MUSB_TUSB6010) && !defined(CONFIG_USB_MUSB_TUSB6010_MODULE) && !defined(CONFIG_USB_MUSB_BLACKFIN)
64 * Load an endpoint's FIFO
65 @@ -250,7 +250,7 @@ void musb_write_fifo(struct musb_hw_ep *
69 -#if !defined(CONFIG_USB_MUSB_AM35X)
70 +#if !defined(CONFIG_USB_MUSB_AM35X) && !defined(CONFIG_USB_MUSB_TUSB6010) && !defined(CONFIG_USB_MUSB_TUSB6010_MODULE)
72 * Unload an endpoint's FIFO
74 @@ -2370,8 +2370,13 @@ static struct platform_driver musb_drive
76 /*-------------------------------------------------------------------------*/
78 +extern int musb_hdrc_glue_init(void);
79 +extern void musb_hdrc_glue_exit(void);
81 static int __init musb_init(void)
88 @@ -2380,7 +2385,17 @@ static int __init musb_init(void)
90 "otg (peripheral+host)",
92 - return platform_driver_probe(&musb_driver, musb_probe);
94 + err = musb_hdrc_glue_init();
97 + err = platform_driver_probe(&musb_driver, musb_probe);
99 + musb_hdrc_glue_exit();
106 /* make us init after usbcore and i2c (transceivers, regulators, etc)
107 @@ -2391,5 +2406,6 @@ fs_initcall(musb_init);
108 static void __exit musb_cleanup(void)
110 platform_driver_unregister(&musb_driver);
111 + musb_hdrc_glue_exit();
113 module_exit(musb_cleanup);
114 --- a/drivers/usb/Makefile
115 +++ b/drivers/usb/Makefile
116 @@ -51,7 +51,7 @@ obj-$(CONFIG_EARLY_PRINTK_DBGP) += early
117 obj-$(CONFIG_USB_ATM) += atm/
118 obj-$(CONFIG_USB_SPEEDTOUCH) += atm/
120 -obj-$(CONFIG_USB_MUSB_HDRC) += musb/
122 obj-$(CONFIG_USB_RENESAS_USBHS) += renesas_usbhs/
123 obj-$(CONFIG_USB_GADGET) += gadget/
125 --- a/drivers/usb/musb/Makefile
126 +++ b/drivers/usb/musb/Makefile
127 @@ -13,7 +13,7 @@ musb_hdrc-$(CONFIG_DEBUG_FS) += musb_d
128 # Hardware Glue Layer
129 obj-$(CONFIG_USB_MUSB_OMAP2PLUS) += omap2430.o
130 obj-$(CONFIG_USB_MUSB_AM35X) += am35x.o
131 -obj-$(CONFIG_USB_MUSB_TUSB6010) += tusb6010.o
132 +musb_hdrc-$(subst m,y,$(CONFIG_USB_MUSB_TUSB6010)) += tusb6010.o
133 obj-$(CONFIG_USB_MUSB_DAVINCI) += davinci.o
134 obj-$(CONFIG_USB_MUSB_DA8XX) += da8xx.o
135 obj-$(CONFIG_USB_MUSB_BLACKFIN) += blackfin.o