19 #include <linux/types.h>
20 #include <linux/errno.h>
23 #include <linux/slab.h>
33 #ifdef CONFIG_MFD_OMAP_USB_HOST
35 #define OMAP_USBHS_DEVICE "usbhs_omap"
36 #define OMAP_USBTLL_DEVICE "usbhs_tll"
37 #define USBHS_UHH_HWMODNAME "usb_host_hs"
38 #define USBHS_TLL_HWMODNAME "usb_tll_hs"
40 static struct usbhs_omap_platform_data usbhs_data;
41 static struct usbtll_omap_platform_data usbtll_data;
42 static struct ehci_hcd_omap_platform_data ehci_data;
43 static struct ohci_hcd_omap_platform_data ohci_data;
59 switch (port_mode[0]) {
75 omap_mux_init_signal(
"hsusb1_tll_stp",
77 omap_mux_init_signal(
"hsusb1_tll_clk",
79 omap_mux_init_signal(
"hsusb1_tll_dir",
81 omap_mux_init_signal(
"hsusb1_tll_nxt",
83 omap_mux_init_signal(
"hsusb1_tll_data0",
85 omap_mux_init_signal(
"hsusb1_tll_data1",
87 omap_mux_init_signal(
"hsusb1_tll_data2",
89 omap_mux_init_signal(
"hsusb1_tll_data3",
91 omap_mux_init_signal(
"hsusb1_tll_data4",
93 omap_mux_init_signal(
"hsusb1_tll_data5",
95 omap_mux_init_signal(
"hsusb1_tll_data6",
97 omap_mux_init_signal(
"hsusb1_tll_data7",
106 switch (port_mode[1]) {
112 omap_mux_init_signal(
"hsusb2_data0",
114 omap_mux_init_signal(
"hsusb2_data1",
116 omap_mux_init_signal(
"hsusb2_data2",
118 omap_mux_init_signal(
"hsusb2_data3",
120 omap_mux_init_signal(
"hsusb2_data4",
122 omap_mux_init_signal(
"hsusb2_data5",
124 omap_mux_init_signal(
"hsusb2_data6",
126 omap_mux_init_signal(
"hsusb2_data7",
130 omap_mux_init_signal(
"hsusb2_tll_stp",
132 omap_mux_init_signal(
"hsusb2_tll_clk",
134 omap_mux_init_signal(
"hsusb2_tll_dir",
136 omap_mux_init_signal(
"hsusb2_tll_nxt",
138 omap_mux_init_signal(
"hsusb2_tll_data0",
140 omap_mux_init_signal(
"hsusb2_tll_data1",
142 omap_mux_init_signal(
"hsusb2_tll_data2",
144 omap_mux_init_signal(
"hsusb2_tll_data3",
146 omap_mux_init_signal(
"hsusb2_tll_data4",
148 omap_mux_init_signal(
"hsusb2_tll_data5",
150 omap_mux_init_signal(
"hsusb2_tll_data6",
152 omap_mux_init_signal(
"hsusb2_tll_data7",
161 switch (port_mode[2]) {
166 omap_mux_init_signal(
"hsusb3_tll_stp",
168 omap_mux_init_signal(
"hsusb3_tll_clk",
170 omap_mux_init_signal(
"hsusb3_tll_dir",
172 omap_mux_init_signal(
"hsusb3_tll_nxt",
174 omap_mux_init_signal(
"hsusb3_tll_data0",
176 omap_mux_init_signal(
"hsusb3_tll_data1",
178 omap_mux_init_signal(
"hsusb3_tll_data2",
180 omap_mux_init_signal(
"hsusb3_tll_data3",
182 omap_mux_init_signal(
"hsusb3_tll_data4",
184 omap_mux_init_signal(
"hsusb3_tll_data5",
186 omap_mux_init_signal(
"hsusb3_tll_data6",
188 omap_mux_init_signal(
"hsusb3_tll_data7",
203 switch (port_mode[0]) {
205 omap_mux_init_signal(
"usbb1_ulpiphy_stp",
207 omap_mux_init_signal(
"usbb1_ulpiphy_clk",
209 omap_mux_init_signal(
"usbb1_ulpiphy_dir",
211 omap_mux_init_signal(
"usbb1_ulpiphy_nxt",
213 omap_mux_init_signal(
"usbb1_ulpiphy_dat0",
215 omap_mux_init_signal(
"usbb1_ulpiphy_dat1",
217 omap_mux_init_signal(
"usbb1_ulpiphy_dat2",
219 omap_mux_init_signal(
"usbb1_ulpiphy_dat3",
221 omap_mux_init_signal(
"usbb1_ulpiphy_dat4",
223 omap_mux_init_signal(
"usbb1_ulpiphy_dat5",
225 omap_mux_init_signal(
"usbb1_ulpiphy_dat6",
227 omap_mux_init_signal(
"usbb1_ulpiphy_dat7",
231 omap_mux_init_signal(
"usbb1_ulpitll_stp",
233 omap_mux_init_signal(
"usbb1_ulpitll_clk",
235 omap_mux_init_signal(
"usbb1_ulpitll_dir",
237 omap_mux_init_signal(
"usbb1_ulpitll_nxt",
239 omap_mux_init_signal(
"usbb1_ulpitll_dat0",
241 omap_mux_init_signal(
"usbb1_ulpitll_dat1",
243 omap_mux_init_signal(
"usbb1_ulpitll_dat2",
245 omap_mux_init_signal(
"usbb1_ulpitll_dat3",
247 omap_mux_init_signal(
"usbb1_ulpitll_dat4",
249 omap_mux_init_signal(
"usbb1_ulpitll_dat5",
251 omap_mux_init_signal(
"usbb1_ulpitll_dat6",
253 omap_mux_init_signal(
"usbb1_ulpitll_dat7",
260 switch (port_mode[1]) {
262 omap_mux_init_signal(
"usbb2_ulpiphy_stp",
264 omap_mux_init_signal(
"usbb2_ulpiphy_clk",
266 omap_mux_init_signal(
"usbb2_ulpiphy_dir",
268 omap_mux_init_signal(
"usbb2_ulpiphy_nxt",
270 omap_mux_init_signal(
"usbb2_ulpiphy_dat0",
272 omap_mux_init_signal(
"usbb2_ulpiphy_dat1",
274 omap_mux_init_signal(
"usbb2_ulpiphy_dat2",
276 omap_mux_init_signal(
"usbb2_ulpiphy_dat3",
278 omap_mux_init_signal(
"usbb2_ulpiphy_dat4",
280 omap_mux_init_signal(
"usbb2_ulpiphy_dat5",
282 omap_mux_init_signal(
"usbb2_ulpiphy_dat6",
284 omap_mux_init_signal(
"usbb2_ulpiphy_dat7",
288 omap_mux_init_signal(
"usbb2_ulpitll_stp",
290 omap_mux_init_signal(
"usbb2_ulpitll_clk",
292 omap_mux_init_signal(
"usbb2_ulpitll_dir",
294 omap_mux_init_signal(
"usbb2_ulpitll_nxt",
296 omap_mux_init_signal(
"usbb2_ulpitll_dat0",
298 omap_mux_init_signal(
"usbb2_ulpitll_dat1",
300 omap_mux_init_signal(
"usbb2_ulpitll_dat2",
302 omap_mux_init_signal(
"usbb2_ulpitll_dat3",
304 omap_mux_init_signal(
"usbb2_ulpitll_dat4",
306 omap_mux_init_signal(
"usbb2_ulpitll_dat5",
308 omap_mux_init_signal(
"usbb2_ulpitll_dat6",
310 omap_mux_init_signal(
"usbb2_ulpitll_dat7",
321 switch (port_mode[0]) {
326 omap_mux_init_signal(
"mm1_rxdp",
328 omap_mux_init_signal(
"mm1_rxdm",
333 omap_mux_init_signal(
"mm1_rxrcv",
342 omap_mux_init_signal(
"mm1_txse0",
344 omap_mux_init_signal(
"mm1_txdat",
352 switch (port_mode[1]) {
357 omap_mux_init_signal(
"mm2_rxdp",
359 omap_mux_init_signal(
"mm2_rxdm",
364 omap_mux_init_signal(
"mm2_rxrcv",
373 omap_mux_init_signal(
"mm2_txse0",
375 omap_mux_init_signal(
"mm2_txdat",
383 switch (port_mode[2]) {
388 omap_mux_init_signal(
"mm3_rxdp",
390 omap_mux_init_signal(
"mm3_rxdm",
395 omap_mux_init_signal(
"mm3_rxrcv",
404 omap_mux_init_signal(
"mm3_txse0",
406 omap_mux_init_signal(
"mm3_txdat",
419 switch (port_mode[0]) {
424 omap_mux_init_signal(
"usbb1_mm_rxdp",
426 omap_mux_init_signal(
"usbb1_mm_rxdm",
431 omap_mux_init_signal(
"usbb1_mm_rxrcv",
436 omap_mux_init_signal(
"usbb1_mm_txen",
442 omap_mux_init_signal(
"usbb1_mm_txdat",
444 omap_mux_init_signal(
"usbb1_mm_txse0",
453 switch (port_mode[1]) {
458 omap_mux_init_signal(
"usbb2_mm_rxdp",
460 omap_mux_init_signal(
"usbb2_mm_rxdm",
465 omap_mux_init_signal(
"usbb2_mm_rxrcv",
470 omap_mux_init_signal(
"usbb2_mm_txen",
476 omap_mux_init_signal(
"usbb2_mm_txdat",
478 omap_mux_init_signal(
"usbb2_mm_txse0",
505 usbhs_data.ehci_data = &ehci_data;
506 usbhs_data.ohci_data = &ohci_data;
518 pr_err(
"Could not look up %s\n", USBHS_UHH_HWMODNAME);
524 pr_err(
"Could not look up %s\n", USBHS_TLL_HWMODNAME);
529 &usbtll_data,
sizeof(usbtll_data),
533 pr_err(
"Could not build hwmod device %s\n",
534 USBHS_TLL_HWMODNAME);
539 &usbhs_data,
sizeof(usbhs_data),
543 pr_err(
"Could not build hwmod devices %s\n",
544 USBHS_UHH_HWMODNAME);