Lines Matching full:ehci
28 #include "ehci.h"
29 #include "ehci-fsl.h"
31 #define DRIVER_DESC "Freescale EHCI Host controller driver"
32 #define DRV_NAME "fsl-ehci"
147 struct ehci_hcd *ehci = hcd_to_ehci(hcd); in fsl_ehci_drv_probe() local
150 dev_dbg(&pdev->dev, "hcd=0x%p ehci=0x%p, phy=0x%p\n", in fsl_ehci_drv_probe()
151 hcd, ehci, hcd->usb_phy); in fsl_ehci_drv_probe()
155 &ehci_to_hcd(ehci)->self); in fsl_ehci_drv_probe()
196 struct ehci_hcd *ehci = hcd_to_ehci(hcd); in ehci_fsl_setup_phy() local
206 portsc = ehci_readl(ehci, &ehci->regs->port_status[port_offset]); in ehci_fsl_setup_phy()
283 ehci_writel(ehci, portsc, &ehci->regs->port_status[port_offset]); in ehci_fsl_setup_phy()
295 static int ehci_fsl_usb_setup(struct ehci_hcd *ehci) in ehci_fsl_usb_setup() argument
297 struct usb_hcd *hcd = ehci_to_hcd(ehci); in ehci_fsl_usb_setup()
320 ehci->has_fsl_hs_errata = 1; in ehci_fsl_usb_setup()
323 ehci->has_fsl_susp_errata = 1; in ehci_fsl_usb_setup()
334 ehci->has_fsl_port_bug = 1; in ehci_fsl_usb_setup()
360 static int ehci_fsl_reinit(struct ehci_hcd *ehci) in ehci_fsl_reinit() argument
362 if (ehci_fsl_usb_setup(ehci)) in ehci_fsl_reinit()
371 struct ehci_hcd *ehci = hcd_to_ehci(hcd); in ehci_fsl_setup() local
378 ehci->big_endian_desc = pdata->big_endian_desc; in ehci_fsl_setup()
379 ehci->big_endian_mmio = pdata->big_endian_mmio; in ehci_fsl_setup()
381 /* EHCI registers start at offset 0x100 */ in ehci_fsl_setup()
382 ehci->caps = hcd->regs + 0x100; in ehci_fsl_setup()
390 ehci->need_oc_pp_cycle = 1; in ehci_fsl_setup()
405 ehci_writel(ehci, SBUSCFG_INCR8, in ehci_fsl_setup()
409 retval = ehci_fsl_reinit(ehci); in ehci_fsl_setup()
414 struct ehci_hcd ehci; member
428 struct ehci_hcd *ehci = hcd_to_ehci(hcd); in ehci_fsl_mpc512x_drv_suspend() local
433 u32 mode = ehci_readl(ehci, hcd->regs + FSL_SOC_USB_USBMODE); in ehci_fsl_mpc512x_drv_suspend()
435 tmp = ehci_readl(ehci, hcd->regs + 0x140); /* usbcmd */ in ehci_fsl_mpc512x_drv_suspend()
455 ehci->rh_state = EHCI_RH_SUSPENDED; in ehci_fsl_mpc512x_drv_suspend()
462 tmp = ehci_readl(ehci, &ehci->regs->command); in ehci_fsl_mpc512x_drv_suspend()
464 ehci_writel(ehci, tmp, &ehci->regs->command); in ehci_fsl_mpc512x_drv_suspend()
466 /* save EHCI registers */ in ehci_fsl_mpc512x_drv_suspend()
467 pdata->pm_command = ehci_readl(ehci, &ehci->regs->command); in ehci_fsl_mpc512x_drv_suspend()
469 pdata->pm_status = ehci_readl(ehci, &ehci->regs->status); in ehci_fsl_mpc512x_drv_suspend()
470 pdata->pm_intr_enable = ehci_readl(ehci, &ehci->regs->intr_enable); in ehci_fsl_mpc512x_drv_suspend()
471 pdata->pm_frame_index = ehci_readl(ehci, &ehci->regs->frame_index); in ehci_fsl_mpc512x_drv_suspend()
472 pdata->pm_segment = ehci_readl(ehci, &ehci->regs->segment); in ehci_fsl_mpc512x_drv_suspend()
473 pdata->pm_frame_list = ehci_readl(ehci, &ehci->regs->frame_list); in ehci_fsl_mpc512x_drv_suspend()
474 pdata->pm_async_next = ehci_readl(ehci, &ehci->regs->async_next); in ehci_fsl_mpc512x_drv_suspend()
476 ehci_readl(ehci, &ehci->regs->configured_flag); in ehci_fsl_mpc512x_drv_suspend()
477 pdata->pm_portsc = ehci_readl(ehci, &ehci->regs->port_status[0]); in ehci_fsl_mpc512x_drv_suspend()
478 pdata->pm_usbgenctrl = ehci_readl(ehci, in ehci_fsl_mpc512x_drv_suspend()
482 pdata->pm_portsc &= cpu_to_hc32(ehci, ~PORT_RWC_BITS); in ehci_fsl_mpc512x_drv_suspend()
487 tmp = ehci_readl(ehci, &ehci->regs->port_status[0]); in ehci_fsl_mpc512x_drv_suspend()
489 ehci_writel(ehci, tmp, &ehci->regs->port_status[0]); in ehci_fsl_mpc512x_drv_suspend()
497 struct ehci_hcd *ehci = hcd_to_ehci(hcd); in ehci_fsl_mpc512x_drv_resume() local
525 ehci_writel(ehci, tmp, hcd->regs + FSL_SOC_USB_USBMODE); in ehci_fsl_mpc512x_drv_resume()
527 ehci_writel(ehci, pdata->pm_usbgenctrl, in ehci_fsl_mpc512x_drv_resume()
529 ehci_writel(ehci, ISIPHYCTRL_PXE | ISIPHYCTRL_PHYE, in ehci_fsl_mpc512x_drv_resume()
532 ehci_writel(ehci, SBUSCFG_INCR8, hcd->regs + FSL_SOC_USB_SBUSCFG); in ehci_fsl_mpc512x_drv_resume()
534 /* restore EHCI registers */ in ehci_fsl_mpc512x_drv_resume()
535 ehci_writel(ehci, pdata->pm_command, &ehci->regs->command); in ehci_fsl_mpc512x_drv_resume()
536 ehci_writel(ehci, pdata->pm_intr_enable, &ehci->regs->intr_enable); in ehci_fsl_mpc512x_drv_resume()
537 ehci_writel(ehci, pdata->pm_frame_index, &ehci->regs->frame_index); in ehci_fsl_mpc512x_drv_resume()
538 ehci_writel(ehci, pdata->pm_segment, &ehci->regs->segment); in ehci_fsl_mpc512x_drv_resume()
539 ehci_writel(ehci, pdata->pm_frame_list, &ehci->regs->frame_list); in ehci_fsl_mpc512x_drv_resume()
540 ehci_writel(ehci, pdata->pm_async_next, &ehci->regs->async_next); in ehci_fsl_mpc512x_drv_resume()
541 ehci_writel(ehci, pdata->pm_configured_flag, in ehci_fsl_mpc512x_drv_resume()
542 &ehci->regs->configured_flag); in ehci_fsl_mpc512x_drv_resume()
543 ehci_writel(ehci, pdata->pm_portsc, &ehci->regs->port_status[0]); in ehci_fsl_mpc512x_drv_resume()
546 ehci->rh_state = EHCI_RH_RUNNING; in ehci_fsl_mpc512x_drv_resume()
549 tmp = ehci_readl(ehci, &ehci->regs->command); in ehci_fsl_mpc512x_drv_resume()
551 ehci_writel(ehci, tmp, &ehci->regs->command); in ehci_fsl_mpc512x_drv_resume()
571 struct ehci_hcd *ehci = hcd_to_ehci(hcd); in hcd_to_ehci_fsl() local
573 return container_of(ehci, struct ehci_fsl, ehci); in hcd_to_ehci_fsl()
600 struct ehci_hcd *ehci = hcd_to_ehci(hcd); in ehci_fsl_drv_resume() local
608 ehci_prepare_ports_for_controller_resume(ehci); in ehci_fsl_drv_resume()
617 ehci_reset(ehci); in ehci_fsl_drv_resume()
618 ehci_fsl_reinit(ehci); in ehci_fsl_drv_resume()
645 struct ehci_hcd *ehci = hcd_to_ehci(hcd); in ehci_start_port_reset() local
654 status = readl(&ehci->regs->port_status[port]); in ehci_start_port_reset()
659 if (ehci_is_TDI(ehci)) { in ehci_start_port_reset()
662 &ehci->regs->port_status[port]); in ehci_start_port_reset()
664 writel(PORT_RESET, &ehci->regs->port_status[port]); in ehci_start_port_reset()
725 "Freescale On-Chip EHCI Host Controller"; in ehci_fsl_init()