From e13afeef6f5d3c9c4fc130b21ee7c885f96d55f2 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Mon, 27 Apr 2015 16:50:04 +0200 Subject: sunxi: usb: Do not call phy_probe from hcd code The 2/3 usb-phys on the sunxi SoCs are really a single separate functional block, and are modelled as such in devicetree. So once we've moved all the sunxi usb code to the driver-model then phy_probe will be called once for the entire block from the driver-model enumeration code. Move to this now as this also avoids problems with phy_probe being called multiple times once we introduce ohci support. This also allows us to get rid of the sunxi_usb_phy_enabled_count variable as phy_probe now is guaranteed to be called only once. Since we're effectively rewriting the probe / remove functions, move them to the end of the file while we are at it, as that is the most logical place for them. Signed-off-by: Hans de Goede Acked-by: Ian Campbell --- drivers/usb/host/ehci-sunxi.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'drivers/usb/host/ehci-sunxi.c') diff --git a/drivers/usb/host/ehci-sunxi.c b/drivers/usb/host/ehci-sunxi.c index 9e74a0b..0edb643 100644 --- a/drivers/usb/host/ehci-sunxi.c +++ b/drivers/usb/host/ehci-sunxi.c @@ -20,11 +20,7 @@ int ehci_hcd_init(int index, enum usb_init_type init, struct ehci_hccr **hccr, struct ehci_hcor **hcor) { struct sunxi_ccm_reg *ccm = (struct sunxi_ccm_reg *)SUNXI_CCM_BASE; - int ahb_gate_offset, err; - - err = sunxi_usb_phy_probe(index + 1); - if (err) - return err; + int ahb_gate_offset; ahb_gate_offset = index ? AHB_GATE_OFFSET_USB_EHCI1 : AHB_GATE_OFFSET_USB_EHCI0; @@ -66,5 +62,5 @@ int ehci_hcd_stop(int index) #endif clrbits_le32(&ccm->ahb_gate0, 1 << ahb_gate_offset); - return sunxi_usb_phy_remove(index + 1); + return 0; } -- cgit v1.1