summaryrefslogtreecommitdiff
path: root/drivers/usb/host/ehci-tegra.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2015-03-25 21:22:23 +0300
committerSimon Glass <sjg@chromium.org>2015-04-18 20:11:24 +0300
commit11d18a1946bd290b83d584ab521e6940e1a11d69 (patch)
tree32bb06d968fafa69d73e289fe1f9a6f05ad17837 /drivers/usb/host/ehci-tegra.c
parent56d4273045e607ddac7c1e3acd809748a8d5e7c0 (diff)
downloadu-boot-11d18a1946bd290b83d584ab521e6940e1a11d69.tar.xz
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-tegra.c')
-rw-r--r--drivers/usb/host/ehci-tegra.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c
index 17f8be1de9..0e6b60e0d6 100644
--- a/drivers/usb/host/ehci-tegra.c
+++ b/drivers/usb/host/ehci-tegra.c
@@ -219,13 +219,12 @@ void ehci_powerup_fixup(struct ehci_ctrl *ctrl, uint32_t *status_reg,
* This ehci_set_usbmode overrides the weak function ehci_set_usbmode
* in "ehci-hcd.c".
*/
-void ehci_set_usbmode(int index)
+void ehci_set_usbmode(struct ehci_ctrl *ctrl)
{
- struct fdt_usb *config;
+ struct fdt_usb *config = ctrl->priv;
struct usb_ctlr *usbctlr;
uint32_t tmp;
- config = &port[index];
usbctlr = config->reg;
tmp = ehci_readl(&usbctlr->usb_mode);