linux/3.2: build mdio_register_board_info into the kernel if PHYLIB is selected
[openwrt.git] / target / linux / omap24xx / patches-2.6.38 / 850-musb-tusb-modular-fixes.patch
1 --- a/drivers/Makefile
2 +++ b/drivers/Makefile
3 @@ -66,7 +66,7 @@ obj-$(CONFIG_TC) += tc/
4 obj-$(CONFIG_UWB) += uwb/
5 obj-$(CONFIG_USB_OTG_UTILS) += usb/otg/
6 obj-$(CONFIG_USB) += usb/
7 -obj-$(CONFIG_USB_MUSB_HDRC) += usb/musb/
8 +obj-y += usb/musb/
9 obj-$(CONFIG_PCI) += usb/
10 obj-$(CONFIG_USB_GADGET) += usb/gadget/
11 obj-$(CONFIG_SERIO) += input/serio/
12 --- a/drivers/usb/musb/Kconfig
13 +++ b/drivers/usb/musb/Kconfig
14 @@ -46,7 +46,7 @@ config USB_MUSB_DA8XX
15 depends on ARCH_DAVINCI_DA8XX
16
17 config USB_MUSB_TUSB6010
18 - bool "TUSB6010"
19 + tristate "TUSB6010"
20 depends on ARCH_OMAP
21
22 config USB_MUSB_OMAP2PLUS
23 --- a/drivers/usb/musb/tusb6010.c
24 +++ b/drivers/usb/musb/tusb6010.c
25 @@ -55,6 +55,7 @@ u8 tusb_get_revision(struct musb *musb)
26
27 return rev;
28 }
29 +EXPORT_SYMBOL(tusb_get_revision);
30
31 static int tusb_print_revision(struct musb *musb)
32 {
33 @@ -218,6 +219,7 @@ void musb_write_fifo(struct musb_hw_ep *
34 if (len > 0)
35 tusb_fifo_write_unaligned(fifo, buf, len);
36 }
37 +EXPORT_SYMBOL(musb_write_fifo);
38
39 void musb_read_fifo(struct musb_hw_ep *hw_ep, u16 len, u8 *buf)
40 {
41 @@ -264,6 +266,7 @@ void musb_read_fifo(struct musb_hw_ep *h
42 if (len > 0)
43 tusb_fifo_read_unaligned(fifo, buf, len);
44 }
45 +EXPORT_SYMBOL(musb_read_fifo);
46
47 static struct musb *the_musb;
48
49 @@ -1259,18 +1262,16 @@ static struct platform_driver tusb_drive
50 },
51 };
52
53 -MODULE_DESCRIPTION("TUSB6010 MUSB Glue Layer");
54 -MODULE_AUTHOR("Felipe Balbi <balbi@ti.com>");
55 -MODULE_LICENSE("GPL v2");
56 +//MODULE_DESCRIPTION("TUSB6010 MUSB Glue Layer");
57 +//MODULE_AUTHOR("Felipe Balbi <balbi@ti.com>");
58 +//MODULE_LICENSE("GPL v2");
59
60 -static int __init tusb_init(void)
61 +int musb_hdrc_glue_init(void)
62 {
63 return platform_driver_probe(&tusb_driver, tusb_probe);
64 }
65 -subsys_initcall(tusb_init);
66
67 -static void __exit tusb_exit(void)
68 +void musb_hdrc_glue_exit(void)
69 {
70 platform_driver_unregister(&tusb_driver);
71 }
72 -module_exit(tusb_exit);
73 --- a/drivers/usb/musb/Makefile
74 +++ b/drivers/usb/musb/Makefile
75 @@ -13,13 +13,13 @@ musb_hdrc-$(CONFIG_USB_MUSB_HDRC_HCD) +
76 musb_hdrc-$(CONFIG_DEBUG_FS) += musb_debugfs.o
77
78 # Hardware Glue Layer
79 -obj-$(CONFIG_USB_MUSB_OMAP2PLUS) += omap2430.o
80 -obj-$(CONFIG_USB_MUSB_AM35X) += am35x.o
81 -obj-$(CONFIG_USB_MUSB_TUSB6010) += tusb6010.o
82 -obj-$(CONFIG_USB_MUSB_DAVINCI) += davinci.o
83 -obj-$(CONFIG_USB_MUSB_DA8XX) += da8xx.o
84 -obj-$(CONFIG_USB_MUSB_BLACKFIN) += blackfin.o
85 -obj-$(CONFIG_USB_MUSB_UX500) += ux500.o
86 +musb_hdrc-$(CONFIG_USB_MUSB_OMAP2PLUS) += omap2430.o
87 +musb_hdrc-$(CONFIG_USB_MUSB_AM35X) += am35x.o
88 +musb_hdrc-$(CONFIG_USB_MUSB_TUSB6010) += tusb6010.o
89 +musb_hdrc-$(CONFIG_USB_MUSB_DAVINCI) += davinci.o
90 +musb_hdrc-$(CONFIG_USB_MUSB_DA8XX) += da8xx.o
91 +musb_hdrc-$(CONFIG_USB_MUSB_BLACKFIN) += blackfin.o
92 +musb_hdrc-$(CONFIG_USB_MUSB_UX500) += ux500.o
93
94 # the kconfig must guarantee that only one of the
95 # possible I/O schemes will be enabled at a time ...
96 --- a/drivers/usb/musb/musb_core.c
97 +++ b/drivers/usb/musb/musb_core.c
98 @@ -2427,8 +2427,13 @@ static struct platform_driver musb_drive
99
100 /*-------------------------------------------------------------------------*/
101
102 +extern int musb_hdrc_glue_init(void);
103 +extern void musb_hdrc_glue_exit(void);
104 +
105 static int __init musb_init(void)
106 {
107 + int err;
108 +
109 #ifdef CONFIG_USB_MUSB_HDRC_HCD
110 if (usb_disabled())
111 return 0;
112 @@ -2456,7 +2461,17 @@ static int __init musb_init(void)
113 #endif
114 ", debug=%d\n",
115 musb_driver_name, musb_debug);
116 - return platform_driver_probe(&musb_driver, musb_probe);
117 +
118 + err = musb_hdrc_glue_init();
119 + if (err)
120 + return err;
121 + err = platform_driver_probe(&musb_driver, musb_probe);
122 + if (err) {
123 + musb_hdrc_glue_exit();
124 + return err;
125 + }
126 +
127 + return 0;
128 }
129
130 /* make us init after usbcore and i2c (transceivers, regulators, etc)
131 @@ -2467,5 +2482,6 @@ fs_initcall(musb_init);
132 static void __exit musb_cleanup(void)
133 {
134 platform_driver_unregister(&musb_driver);
135 + musb_hdrc_glue_exit();
136 }
137 module_exit(musb_cleanup);
This page took 0.047276 seconds and 5 git commands to generate.