static int __devinit ohci_superh_start(struct usb_hcd *hcd) { struct ohci_hcd *ohci = hcd_to_ohci(hcd); int ret; ohci_dbg(ohci, "ohci_superh_start, ohci:%p", ohci); ohci->hcca = dma_alloc_coherent(hcd->self.controller, sizeof *ohci->hcca, &ohci->hcca_dma, 0); if (!ohci->hcca) return -ENOMEM; memset(ohci->hcca, 0, sizeof(struct ohci_hcca)); if ((ret = ohci_mem_init(ohci)) < 0) { ohci_stop(hcd); return ret; } ohci->regs = hcd->regs; if (ohci_run(ohci) < 0) { ohci_err(ohci, "can't start\n"); ohci_stop(hcd); return -EBUSY; } create_debug_files(ohci); #ifdef DEBUG ohci_dump(ohci, 1); #endif return 0; }
static int __devinit ohci_omap_start (struct usb_hcd *hcd) { struct ohci_hcd *ohci = hcd_to_ohci (hcd); int ret; ohci->hcca = dma_alloc_consistent (hcd->self.controller, sizeof *ohci->hcca, &ohci->hcca_dma); if (!ohci->hcca) return -ENOMEM; memset (ohci->hcca, 0, sizeof (struct ohci_hcca)); if ((ret = ohci_mem_init (ohci)) < 0) { ohci_stop (hcd); return ret; } ohci->regs = hcd->regs; if (hc_reset (ohci) < 0) { ohci_stop (hcd); return -ENODEV; } if (hc_start (ohci) < 0) { err ("can't start %s", ohci->hcd.self.bus_name); ohci_stop (hcd); return -EBUSY; } create_debug_files (ohci); #ifdef DEBUG ohci_dump (ohci, 1); #endif return 0; }
static int /*__devinit*/ ohci_rtl819x_start(struct usb_hcd *hcd) { struct ohci_hcd *ohci = hcd_to_ohci(hcd); int ret; unsigned int fminterval; ret = ohci_init(ohci); if (ret < 0) return ret; #if 1 fminterval = 0x2edf; ohci_writel (ohci,(fminterval * 9) / 10, &ohci->regs->periodicstart); fminterval |= ((((fminterval - 210) * 6) / 7) << 16); ohci_writel (ohci, fminterval, &ohci->regs->fminterval); ohci_writel (ohci, 0x0628, &ohci->regs->lsthresh); /* default value from datasheet */ ohci_writel (ohci, 0x3e67, &ohci->regs->periodicstart); /* default value from datasheet */ #endif ret = ohci_run(ohci); if (ret < 0) goto err; return 0; err: ohci_stop(hcd); return ret; }
static int __devinit ohci_pci_start (struct usb_hcd *hcd) { struct ohci_hcd *ohci = hcd_to_ohci (hcd); int ret; #ifdef CONFIG_PM /* avoid warnings about unused pdev */ if (hcd->self.controller) { struct pci_dev *pdev = to_pci_dev(hcd->self.controller); /* RWC may not be set for add-in PCI cards, since boot * firmware probably ignored them. This transfers PCI * PM wakeup capabilities. */ if (device_can_wakeup(&pdev->dev)) ohci->hc_control |= OHCI_CTRL_RWC; } #endif /* CONFIG_PM */ ret = ohci_run (ohci); if (ret < 0) { ohci_err (ohci, "can't start\n"); ohci_stop (hcd); } return ret; }
static int __devinit ohci_ep93xx_start (struct usb_hcd *hcd) { struct ohci_hcd *ohci = hcd_to_ohci (hcd); int ret; ohci_dbg(ohci, "ohci_ep93xx_start, ohci:%p", ohci); if ((ret = ohci_init(ohci)) < 0){ ohci_dbg(ohci, "ohci_ep93xx_start, ohci_init error=%x\n",ret); return ret; } ohci_dbg(ohci, "ohci_ep93xx_start, ohci->hcca:%p", ohci->hcca); if ((ret = ohci_run (ohci)) < 0) { pr_debug ("can't start %s", hcd->self.bus_name); ohci_stop (hcd); return ret; } create_debug_files(ohci); #ifdef DEBUG ohci_dump(ohci, 1); #endif /*DEBUG*/ return 0; }
static int ohci_omap_start(struct usb_hcd *hcd) { struct omap_usb_config *config; struct ohci_omap_clock_defs *ohci_clocks; int ret; struct ohci_hcd *ohci = hcd_to_ohci(hcd); ohci_clocks = (struct ohci_omap_clock_defs *) (((char *)hcd_to_ohci(hcd)) + sizeof(struct ohci_hcd)); if (!ohci_clocks->host_enabled) return 0; config = hcd->self.controller->platform_data; #ifdef HACK_OMAP_OHCI /* todo */ if (config->otg || config->rwc) { ohci->hc_control = OHCI_CTRL_RWC; writel(OHCI_CTRL_RWC, &ohci->regs->control); } #endif ohci->hc_control = OHCI_CTRL_RWC; writel(OHCI_CTRL_RWC, &ohci->regs->control); if ((ret = ohci_run(ohci)) < 0) { dev_err(hcd->self.controller, "can't start\n"); ohci_stop(hcd); return ret; } return 0; }
/*-------------------------------------------------------------------------*/ static int __devinit ohci_xls_start (struct usb_hcd *hcd) { struct ohci_hcd *ohci = hcd_to_ohci(hcd); int ret; if ((ret = ohci_run(ohci)) < 0) { err("can't start %s", hcd->self.bus_name); ohci_stop(hcd); return ret; } return 0; }
static void ohci_shutdown (hci_t *controller) { if (controller == 0) return; detach_controller (controller); ohci_stop(controller); OHCI_INST (controller)->roothub->destroy (OHCI_INST (controller)-> roothub); free (OHCI_INST (controller)); free (controller); }
static int ohci_sa1111_start(struct usb_hcd *hcd) { struct ohci_hcd *ohci = hcd_to_ohci(hcd); int ret; ret = ohci_run(ohci); if (ret < 0) { ohci_err(ohci, "can't start\n"); ohci_stop(hcd); } return ret; }
static int ohci_sm501_start(struct usb_hcd *hcd) { struct device *dev = hcd->self.controller; int ret; ret = ohci_run(hcd_to_ohci(hcd)); if (ret < 0) { dev_err(dev, "can't start %s", hcd->self.bus_name); ohci_stop(hcd); } return ret; }
static int ohci_platform_start(struct usb_hcd *hcd) { struct ohci_hcd *ohci = hcd_to_ohci(hcd); int err; err = ohci_run(ohci); if (err < 0) { ohci_err(ohci, "can't start\n"); ohci_stop(hcd); } return err; }
static int ohci_at91_start (struct usb_hcd *hcd) { struct ohci_hcd *ohci = hcd_to_ohci (hcd); int ret; if ((ret = ohci_run(ohci)) < 0) { dev_err(hcd->self.controller, "can't start %s\n", hcd->self.bus_name); ohci_stop(hcd); return ret; } return 0; }
static int ssb_ohci_start(struct usb_hcd *hcd) { struct ssb_ohci_device *ohcidev = hcd_to_ssb_ohci(hcd); struct ohci_hcd *ohci = &ohcidev->ohci; int err; err = ohci_run(ohci); if (err < 0) { ohci_err(ohci, "can't start\n"); ohci_stop(hcd); } return err; }
static int __devinit ohci_pnx4008_start(struct usb_hcd *hcd) { struct ohci_hcd *ohci = hcd_to_ohci(hcd); int ret; if ((ret = ohci_init(ohci)) < 0) return ret; if ((ret = ohci_run(ohci)) < 0) { dev_err(hcd->self.controller, "can't start\n"); ohci_stop(hcd); return ret; } return 0; }
static int __devinit ohci_pci_start (struct usb_hcd *hcd) { struct ohci_hcd *ohci = hcd_to_ohci (hcd); int ret; /* NOTE: there may have already been a first reset, to * keep bios/smm irqs from making trouble */ if ((ret = ohci_run (ohci)) < 0) { ohci_err (ohci, "can't start\n"); ohci_stop (hcd); return ret; } return 0; }
static int ohci_exynos_start(struct usb_hcd *hcd) { struct ohci_hcd *ohci = hcd_to_ohci(hcd); int ret; ohci_dbg(ohci, "ohci_exynos_start, ohci:%p", ohci); ret = ohci_run(ohci); if (ret < 0) { err("can't start %s", hcd->self.bus_name); ohci_stop(hcd); return ret; } return 0; }
static int sunxi_ohci_start(struct usb_hcd *hcd) { struct ohci_hcd *ohci = hcd_to_ohci(hcd); int ret; if ((ret = ohci_init(ohci)) < 0) return ret; if ((ret = ohci_run(ohci)) < 0) { DMSG_PANIC("can't start %s", hcd->self.bus_name); ohci_stop(hcd); return ret; } return 0; }
static int __devinit ohci_lh7a404_start (struct usb_hcd *hcd) { struct ohci_hcd *ohci = hcd_to_ohci (hcd); int ret; ohci_dbg (ohci, "ohci_lh7a404_start, ohci:%p", ohci); if ((ret = ohci_init(ohci)) < 0) return ret; if ((ret = ohci_run (ohci)) < 0) { err ("can't start %s", hcd->self.bus_name); ohci_stop (hcd); return ret; } return 0; }
static int __devinit sw_ohci_start(struct usb_hcd *hcd) { struct ohci_hcd *ohci = hcd_to_ohci(hcd); int ret; if ((ret = ohci_init(ohci)) < 0) return ret; if ((ret = ohci_run(ohci)) < 0) { pr_err("%s: cannot start %s, rc=%d", __func__, hcd->self.bus_name, ret); ohci_stop(hcd); return ret; } return 0; }
static int __devinit str9100_ohci_start(struct usb_hcd *hcd) { struct ohci_hcd *ohci = hcd_to_ohci(hcd); int ret; //ohci->regs = hcd->regs; //ohci->fminterval = 0x27782edf; if ((ret = ohci_init(ohci)) < 0) return ret; if ((ret = ohci_run(ohci)) < 0) { err("can't start %s", ohci_to_hcd(ohci)->self.bus_name); ohci_stop(hcd); return ret; } return 0; }
static int stm_ohci_start(struct usb_hcd *hcd) { struct ohci_hcd *ohci = hcd_to_ohci(hcd); int ret = 0; dgb_print("\n"); if ((ret = ohci_init(ohci)) < 0) return ret; if ((ret = ohci_run(ohci)) < 0) { err("can't start %s", hcd->self.bus_name); ohci_stop(hcd); return ret; } return 0; }
static int hiusb_ohci_start(struct usb_hcd *hcd) { struct ohci_hcd *ohci = hcd_to_ohci(hcd); int ret; ohci_dbg(ohci, "hiusb_ohci_start, ohci:%p", ohci); ret = ohci_init(ohci); if (ret < 0) return ret; ret = ohci_run(ohci); if (ret < 0) { pr_debug("can't start %s", hcd->self.bus_name); ohci_stop(hcd); return ret; } return 0; }
static int __devinit ohci_omap_start (struct usb_hcd *hcd) { struct omap_usb_config *config; struct ohci_hcd *ohci = hcd_to_ohci (hcd); int ret; config = hcd->self.controller->platform_data; if (config->otg || config->rwc) writel(OHCI_CTRL_RWC, &ohci->regs->control); if ((ret = ohci_run (ohci)) < 0) { dev_err(hcd->self.controller, "can't start\n"); ohci_stop (hcd); return ret; } return 0; }
static int __devinit ohci_mcs814x_start(struct usb_hcd *hcd) { struct ohci_hcd *ohci = hcd_to_ohci(hcd); int ret; ret = ohci_init(ohci); if (ret < 0) return ret; ret = ohci_run(ohci); if (ret < 0) { ohci_err(ohci, "can't start %s", hcd->self.bus_name); ohci_stop(hcd); return ret; } return 0; }
static int ohci_s3c2410_start(struct usb_hcd *hcd) { struct ohci_hcd *ohci = hcd_to_ohci(hcd); int ret; ret = ohci_init(ohci); if (ret < 0) return ret; ret = ohci_run(ohci); if (ret < 0) { err("can't start %s", hcd->self.bus_name); ohci_stop(hcd); return ret; } return 0; }
static int __devinit ohci_at91_start (struct usb_hcd *hcd) { struct at91_usbh_data *board = hcd->self.controller->platform_data; struct ohci_hcd *ohci = hcd_to_ohci (hcd); int ret; if ((ret = ohci_init(ohci)) < 0) return ret; ohci->num_ports = board->ports; if ((ret = ohci_run(ohci)) < 0) { err("can't start %s", hcd->self.bus_name); ohci_stop(hcd); return ret; } return 0; }
static int ohci_jz4740_start(struct usb_hcd *hcd) { struct ohci_hcd *ohci = hcd_to_ohci(hcd); int ret; ret = ohci_init(ohci); if (ret < 0) return ret; ohci->num_ports = 1; ret = ohci_run(ohci); if (ret < 0) { dev_err(hcd->self.controller, "Can not start %s", hcd->self.bus_name); ohci_stop(hcd); return ret; } return 0; }
static int ohci_omap3_start(struct usb_hcd *hcd) { struct ohci_hcd *ohci = hcd_to_ohci(hcd); int ret; /* * RemoteWakeupConnected has to be set explicitly before * calling ohci_run. The reset value of RWC is 0. */ ohci->hc_control = OHCI_CTRL_RWC; writel(OHCI_CTRL_RWC, &ohci->regs->control); ret = ohci_run(ohci); if (ret < 0) { dev_err(hcd->self.controller, "can't start\n"); ohci_stop(hcd); } return ret; }
static int __devinit ps3_ohci_hc_start(struct usb_hcd *hcd) { int result; struct ohci_hcd *ohci = hcd_to_ohci(hcd); /* Handle root hub init quirk in spider south bridge. */ /* Also set PwrOn2PwrGood to 0x7f (254ms). */ ohci_writel(ohci, 0x7f000000 | RH_A_PSM | RH_A_OCPM, &ohci->regs->roothub.a); ohci_writel(ohci, 0x00060000, &ohci->regs->roothub.b); result = ohci_run(ohci); if (result < 0) { err("can't start %s", hcd->self.bus_name); ohci_stop(hcd); } return result; }
static int __devinit ps3_ohci_hc_start(struct usb_hcd *hcd) { int result; struct ohci_hcd *ohci = hcd_to_ohci(hcd); ohci_writel(ohci, 0x7f000000 | RH_A_PSM | RH_A_OCPM, &ohci->regs->roothub.a); ohci_writel(ohci, 0x00060000, &ohci->regs->roothub.b); result = ohci_run(ohci); if (result < 0) { err("can't start %s", hcd->self.bus_name); ohci_stop(hcd); } return result; }