int tegrausb_start_port(unsigned portnum, u32 *hccr, u32 *hcor) { struct usb_ctlr *usbctlr; if (portnum >= port_count) return -1; tegrausb_stop_port(); set_host_mode(&port[portnum]); usbctlr = port[portnum].reg; *hccr = (u32)&usbctlr->cap_length; *hcor = (u32)&usbctlr->usb_cmd; port_current = portnum; return 0; }
int tegrausb_start_port(unsigned portnum, u32 *hccr, u32 *hcor) { struct usb_ctlr *usbctlr; if (portnum >= port_count) return -1; tegrausb_stop_port(); usbctlr = port[portnum].reg; #if defined(CONFIG_TEGRA3) /* Set Controller Mode as Host mode after Controller Reset was done */ bf_writel(CM, CM_HOST_MODE, &usbctlr->usb_mode); /* Select UTMI parallel interface after setting host mode */ bf_writel(PTS, PTS_UTMI, &usbctlr->hostpc1_devlc); bf_writel(STS, STS_PARALLEL_IF, &usbctlr->hostpc1_devlc); #endif *hccr = (u32)&usbctlr->cap_length; *hcor = (u32)&usbctlr->usb_cmd; port_current = portnum; return 0; }
/* * Destroy the appropriate control structures corresponding * the the EHCI host controller. */ int ehci_hcd_stop(int index) { return tegrausb_stop_port(index); }