Lines Matching refs:hcor
167 static int xhci_start(struct xhci_hcor *hcor) in xhci_start() argument
173 temp = xhci_readl(&hcor->or_usbcmd); in xhci_start()
175 xhci_writel(&hcor->or_usbcmd, temp); in xhci_start()
181 ret = handshake(&hcor->or_usbsts, STS_HALT, 0, XHCI_MAX_HALT_USEC); in xhci_start()
195 static int xhci_reset(struct xhci_hcor *hcor) in xhci_reset() argument
202 debug("// Halt the HC: %p\n", hcor); in xhci_reset()
203 state = xhci_readl(&hcor->or_usbsts) & STS_HALT; in xhci_reset()
205 cmd = xhci_readl(&hcor->or_usbcmd); in xhci_reset()
207 xhci_writel(&hcor->or_usbcmd, cmd); in xhci_reset()
210 ret = handshake(&hcor->or_usbsts, in xhci_reset()
219 cmd = xhci_readl(&hcor->or_usbcmd); in xhci_reset()
221 xhci_writel(&hcor->or_usbcmd, cmd); in xhci_reset()
223 ret = handshake(&hcor->or_usbcmd, CMD_RESET, 0, XHCI_MAX_RESET_USEC); in xhci_reset()
231 return handshake(&hcor->or_usbsts, STS_CNR, 0, XHCI_MAX_RESET_USEC); in xhci_reset()
893 struct xhci_hcor *hcor = ctrl->hcor; in xhci_submit_root() local
904 (&hcor->portregs[le16_to_cpu(req->index) - 1].or_portsc); in xhci_submit_root()
1195 struct xhci_hcor *hcor; in xhci_lowlevel_init() local
1201 hcor = ctrl->hcor; in xhci_lowlevel_init()
1207 val2 = xhci_readl(&hcor->or_config); in xhci_lowlevel_init()
1209 xhci_writel(&hcor->or_config, val); in xhci_lowlevel_init()
1212 if (xhci_mem_init(ctrl, hccr, hcor) < 0) in xhci_lowlevel_init()
1233 if (xhci_start(hcor)) { in xhci_lowlevel_init()
1234 xhci_reset(hcor); in xhci_lowlevel_init()
1252 xhci_reset(ctrl->hcor); in xhci_lowlevel_stop()
1255 temp = xhci_readl(&ctrl->hcor->or_usbsts); in xhci_lowlevel_stop()
1256 xhci_writel(&ctrl->hcor->or_usbsts, temp & ~STS_EINT); in xhci_lowlevel_stop()
1300 struct xhci_hcor *hcor; in usb_lowlevel_init() local
1306 if (xhci_hcd_init(index, &hccr, (struct xhci_hcor **)&hcor) != 0) in usb_lowlevel_init()
1309 if (xhci_reset(hcor) != 0) in usb_lowlevel_init()
1315 ctrl->hcor = hcor; in usb_lowlevel_init()
1321 ctrl->hcor = NULL; in usb_lowlevel_init()
1340 if (ctrl->hcor) { in usb_lowlevel_stop()
1488 struct xhci_hcor *hcor) in xhci_register() argument
1495 ctrl, hccr, hcor); in xhci_register()
1507 ret = xhci_reset(hcor); in xhci_register()
1512 ctrl->hcor = hcor; in xhci_register()