summaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2015-03-25 12:22:21 -0600
committerSimon Glass <sjg@chromium.org>2015-04-18 11:11:23 -0600
commit727fce369ee84e664d2a1d215cb48137837c6f8b (patch)
tree507bfc50e0fbd33269e0d39a58c63ef9f3257fec /drivers/usb
parent27f782b6a137b51fe81dc2900d64ea6cbe502663 (diff)
downloadtalos-obmc-uboot-727fce369ee84e664d2a1d215cb48137837c6f8b.tar.gz
talos-obmc-uboot-727fce369ee84e664d2a1d215cb48137837c6f8b.zip
dm: usb: Pass EHCI controller pointer to ehci_powerup_fixup()
Adjust this function so that it is passed an EHCI controller pointer so that implementations can look up their controller. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/host/ehci-hcd.c5
-rw-r--r--drivers/usb/host/ehci-tegra.c3
-rw-r--r--drivers/usb/host/ehci.h3
3 files changed, 7 insertions, 4 deletions
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 5c71882e3a..4adf98c112 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -138,7 +138,8 @@ __weak void ehci_set_usbmode(int index)
ehci_writel(reg_ptr, tmp);
}
-__weak void ehci_powerup_fixup(uint32_t *status_reg, uint32_t *reg)
+__weak void ehci_powerup_fixup(struct ehci_ctrl *ctrl, uint32_t *status_reg,
+ uint32_t *reg)
{
mdelay(50);
}
@@ -843,7 +844,7 @@ ehci_submit_root(struct usb_device *dev, unsigned long pipe, void *buffer,
* usb 2.0 specification say 50 ms resets on
* root
*/
- ehci_powerup_fixup(status_reg, &reg);
+ ehci_powerup_fixup(ctrl, status_reg, &reg);
ehci_writel(status_reg, reg & ~EHCI_PS_PR);
/*
diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c
index c89048f1f5..d39c34ce71 100644
--- a/drivers/usb/host/ehci-tegra.c
+++ b/drivers/usb/host/ehci-tegra.c
@@ -198,7 +198,8 @@ static struct fdt_usb_controller *controller;
* This ehci_powerup_fixup overrides the weak function ehci_powerup_fixup
* in "ehci-hcd.c".
*/
-void ehci_powerup_fixup(uint32_t *status_reg, uint32_t *reg)
+void ehci_powerup_fixup(struct ehci_ctrl *ctrl, uint32_t *status_reg,
+ uint32_t *reg)
{
mdelay(50);
/* This is to avoid PORT_ENABLE bit to be cleared in "ehci-hcd.c". */
diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h
index d538bb6e8d..a00c7e78bd 100644
--- a/drivers/usb/host/ehci.h
+++ b/drivers/usb/host/ehci.h
@@ -254,7 +254,8 @@ struct ehci_ctrl {
/* Weak functions that drivers can override */
int ehci_get_port_speed(struct ehci_ctrl *ctrl, uint32_t reg);
void ehci_set_usbmode(int index);
-void ehci_powerup_fixup(uint32_t *status_reg, uint32_t *reg);
+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);
/**
OpenPOWER on IntegriCloud