diff options
author | Simon Glass <sjg@chromium.org> | 2015-03-25 12:22:23 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-04-18 11:11:24 -0600 |
commit | 11d18a1946bd290b83d584ab521e6940e1a11d69 (patch) | |
tree | 32bb06d968fafa69d73e289fe1f9a6f05ad17837 /drivers/usb/host/ehci-hcd.c | |
parent | 56d4273045e607ddac7c1e3acd809748a8d5e7c0 (diff) | |
download | u-boot-imx-11d18a1946bd290b83d584ab521e6940e1a11d69.zip u-boot-imx-11d18a1946bd290b83d584ab521e6940e1a11d69.tar.gz u-boot-imx-11d18a1946bd290b83d584ab521e6940e1a11d69.tar.bz2 |
dm: usb: Pass EHCI controller pointer to ehci_set_usbmode()
Adjust this function so that it is passed an EHCI controller pointer so that
implementations can look up their controller. This makes the weak functions
use a consistent API.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Marek Vasut <marex@denx.de>
Diffstat (limited to 'drivers/usb/host/ehci-hcd.c')
-rw-r--r-- | drivers/usb/host/ehci-hcd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 4adf98c..4de7c81 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c @@ -124,12 +124,12 @@ __weak int ehci_get_port_speed(struct ehci_ctrl *ctrl, uint32_t reg) return PORTSC_PSPD(reg); } -__weak void ehci_set_usbmode(int index) +__weak void ehci_set_usbmode(struct ehci_ctrl *ctrl) { uint32_t tmp; uint32_t *reg_ptr; - reg_ptr = (uint32_t *)((u8 *)&ehcic[index].hcor->or_usbcmd + USBMODE); + reg_ptr = (uint32_t *)((u8 *)&ctrl->hcor->or_usbcmd + USBMODE); tmp = ehci_readl(reg_ptr); tmp |= USBMODE_CM_HC; #if defined(CONFIG_EHCI_MMIO_BIG_ENDIAN) @@ -187,7 +187,7 @@ static int ehci_reset(int index) } if (ehci_is_TDI()) - ehci_set_usbmode(index); + ehci_set_usbmode(&ehcic[index]); #ifdef CONFIG_USB_EHCI_TXFIFO_THRESH cmd = ehci_readl(&ehcic[index].hcor->or_txfilltuning); |