]> git.karo-electronics.de Git - karo-tx-uboot.git/commitdiff
dm: usb: Pass EHCI controller pointer to ehci_powerup_fixup()
authorSimon Glass <sjg@chromium.org>
Wed, 25 Mar 2015 18:22:21 +0000 (12:22 -0600)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 8 Sep 2015 19:47:55 +0000 (21:47 +0200)
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>
board/genesi/mx51_efikamx/efikamx-usb.c
drivers/usb/host/ehci-hcd.c
drivers/usb/host/ehci-tegra.c
drivers/usb/host/ehci.h

index 0b431019104c231852c90f4989a36c7f839bac59..0c0b8d31818baced625539a8a55f765403532ec9 100644 (file)
@@ -173,7 +173,8 @@ int board_ehci_hcd_init(int port)
        return 0;
 }
 
-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 port = OTG_BASE_ADDR + (0x200 * CONFIG_MXC_USB_PORT);
        struct usb_ehci *ehci = (struct usb_ehci *)port;
index 5c71882e3a40b47c3989c7d06743f91b1ece2e53..4adf98c112fb61f79fd76972de4870b139226476 100644 (file)
@@ -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);
                                /*
index c89048f1f5aca7196fc013a034508fd372e800dc..d39c34ce71be9023127b056383582509e537a57b 100644 (file)
@@ -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". */
index d538bb6e8dd075dba29a3907da397672ca66c7ea..a00c7e78bdf5fd5217984df8ca17e789ccc61d65 100644 (file)
@@ -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);
 
 /**