21 #include <linux/module.h>
22 #include <linux/kernel.h>
53 #define INT_USB_IRQ_GEN IH2_BASE + 20
54 #define INT_USB_IRQ_NISO IH2_BASE + 30
55 #define INT_USB_IRQ_ISO IH2_BASE + 29
56 #define INT_USB_IRQ_HGEN INT_USB_HHC_1
57 #define INT_USB_IRQ_OTG IH2_BASE + 8
59 #ifdef CONFIG_ARCH_OMAP_OTG
71 pr_debug(
"USB resets not complete?\n");
76 if (config->
pins[0] > 2)
91 pr_debug(
"USB_TRANSCEIVER_CTRL = %03x\n",
98 printk(
", usb2 alt %d wires", config->
pins[2]);
99 else if (config->
pins[0])
104 if (!alt_pingroup && config->
pins[2])
107 printk(
", Mini-AB on usb%d", config->
otg - 1);
126 #ifdef CONFIG_USB_GADGET_OMAP
135 pr_debug(
"can't register UDC device, %d\n", status);
139 #if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
148 pr_debug(
"can't register OHCI device, %d\n", status);
152 #ifdef CONFIG_USB_OTG
161 pr_debug(
"can't register OTG device, %d\n", status);
172 #ifdef CONFIG_USB_GADGET_OMAP
174 static struct resource udc_resources[] = {
192 static u64 udc_dmamask = ~(
u32)0;
198 .dma_mask = &udc_dmamask,
199 .coherent_dma_mask = 0xffffffff,
202 .resource = udc_resources,
224 #if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
227 static u64 ohci_dmamask = ~(
u32)0;
229 static struct resource ohci_resources[] = {
245 .dma_mask = &ohci_dmamask,
246 .coherent_dma_mask = 0xffffffff,
249 .resource = ohci_resources,
268 #if defined(CONFIG_USB_OTG) && defined(CONFIG_ARCH_OMAP_OTG)
270 static struct resource otg_resources[] = {
286 .resource = otg_resources,
409 return syscon1 << 16;
444 pr_debug(
"usb%d cpu unrecognized\n", 1);
475 return syscon1 << 20;
483 if (alt_pingroup || nwires == 0)
510 pr_debug(
"usb%d cpu unrecognized\n", 1);
548 return syscon1 << 24;
551 #ifdef CONFIG_ARCH_OMAP15XX
554 #define DPLL_IOB (1 << 13)
555 #define DPLL_PLL_ENABLE (1 << 4)
556 #define DPLL_LOCK (1 << 0)
559 #define APLL_NDPLL_SWITCH (1 << 0)
589 w &= ~APLL_NDPLL_SWITCH;
593 w |= DPLL_IOB | DPLL_PLL_ENABLE;
603 #ifdef CONFIG_USB_GADGET_OMAP
610 pr_debug(
"can't register UDC device, %d\n", status);
615 #if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
622 pr_debug(
"can't register OHCI device, %d\n", status);
629 static inline void omap_1510_usb_init(
struct omap_usb_config *config) {}
637 udc_device_init(pdata);
638 ohci_device_init(pdata);
639 otg_device_init(pdata);
644 omap_1510_usb_init(pdata);