/* * This ehci_get_port_speed overrides the weak function ehci_get_port_speed * in "ehci-hcd.c". */ int ehci_get_port_speed(struct ehci_hcor *hcor, uint32_t reg) { uint32_t tmp; uint32_t *reg_ptr; if (controller->has_hostpc) { reg_ptr = (uint32_t *)((u8 *)&hcor->or_usbcmd + HOSTPC1_DEVLC); tmp = ehci_readl(reg_ptr); return HOSTPC1_PSPD(tmp); } else return PORTSC_PSPD(reg); }
static int tegra_ehci_get_port_speed(struct ehci_ctrl *ctrl, uint32_t reg) { struct fdt_usb *config = ctrl->priv; struct fdt_usb_controller *controller; uint32_t tmp; uint32_t *reg_ptr; controller = &fdt_usb_controllers[config->type]; if (controller->has_hostpc) { reg_ptr = (uint32_t *)((u8 *)&ctrl->hcor->or_usbcmd + HOSTPC1_DEVLC); tmp = ehci_readl(reg_ptr); return HOSTPC1_PSPD(tmp); } else return PORTSC_PSPD(reg); }
static int ehci_get_port_speed(struct ehci_ctrl *ctrl, uint32_t reg) { return PORTSC_PSPD(reg); }
int __ehci_get_port_speed(struct ehci_hcor *hcor, uint32_t reg) { return PORTSC_PSPD(reg); }