* This ehci_get_portsc_register() overrides the weak function
* in "ehci-hcd.c".
*/
-uint32_t *ehci_get_portsc_register(struct ehci_hcor *hcor, int port)
+uint32_t *ehci_get_portsc_register(struct ehci_ctrl *ctrl, int port)
{
/* Faraday EHCI has one and only one portsc register */
if (port) {
}
/* Faraday EHCI PORTSC register offset is 0x20 from hcor */
- return (uint32_t *)((uint8_t *)hcor + 0x20);
+ return (uint32_t *)((uint8_t *)ctrl->hcor + 0x20);
}
mdelay(50);
}
-__weak uint32_t *ehci_get_portsc_register(struct ehci_hcor *hcor, int port)
+__weak uint32_t *ehci_get_portsc_register(struct ehci_ctrl *ctrl, int port)
{
if (port < 0 || port >= CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS) {
/* Printing the message would cause a scan failure! */
return NULL;
}
- return (uint32_t *)&hcor->or_portsc[port];
+ return (uint32_t *)&ctrl->hcor->or_portsc[port];
}
static int handshake(uint32_t *ptr, uint32_t mask, uint32_t done, int usec)
case USB_REQ_GET_STATUS | ((USB_RT_PORT | USB_DIR_IN) << 8):
case USB_REQ_SET_FEATURE | ((USB_DIR_OUT | USB_RT_PORT) << 8):
case USB_REQ_CLEAR_FEATURE | ((USB_DIR_OUT | USB_RT_PORT) << 8):
- status_reg = ehci_get_portsc_register(ctrl->hcor, port - 1);
+ status_reg = ehci_get_portsc_register(ctrl, port - 1);
if (!status_reg)
return -1;
break;
void ehci_set_usbmode(struct ehci_ctrl *ctrl);
void ehci_powerup_fixup(struct ehci_ctrl *ctrl, uint32_t *status_reg,
uint32_t *reg);
-uint32_t *ehci_get_portsc_register(struct ehci_hcor *hcor, int port);
+uint32_t *ehci_get_portsc_register(struct ehci_ctrl *ctrl, int port);
/**
* ehci_set_controller_priv() - Set up private data for the controller