sunxi: usb-phy: Never power off the usb ports
Subsystems (5)
PATCH 1/1 sunxi: usb-phy: Never power off the usb ports
USB devices are not really designed to get the power bounced off and on at them. Esp. USB powered harddisks do not like this.
Currently we power off the USB ports both on a "usb reset" and when booting the kernel, causing the usb-power to bounce off and then back on again.
This patch removes the powering off calls, fixing the undesirable power bouncing.
--- arch/arm/cpu/armv7/sunxi/usb_phy.c | 17 ----------------- arch/arm/include/asm/arch-sunxi/usb_phy.h | 1 - drivers/usb/host/ehci-sunxi.c | 1 - drivers/usb/host/ohci-sunxi.c | 1 - drivers/usb/musb-new/sunxi.c | 3 --- 5 files changed, 23 deletions(-)
arch/arm/cpu/armv7/sunxi/usb_phy.c +0 -17
@@ -47,7 +47,6 @@ static struct sunxi_usb_phy {int gpio_id_det;int id;int init_count; -int power_on_count; } sunxi_usb_phy[] = { { .usb_rst_mask = CCM_USB_CTRL_PHY0_RST | CCM_USB_CTRL_PHY0_CLK,
@@ -212,26 +211,10 @@ void sunxi_usb_phy_power_on(int index) {struct sunxi_usb_phy *phy = &sunxi_usb_phy[index]; - phy->power_on_count++; -if (phy->power_on_count !=1 ) -return ; -if (phy->gpio_vbus >=0 )gpio_set_value (phy->gpio_vbus,1 ); } -void sunxi_usb_phy_power_off (int index) -{ -struct sunxi_usb_phy *phy = &sunxi_usb_phy[index]; - - phy->power_on_count--; -if (phy->power_on_count !=0 ) -return ; - -if (phy->gpio_vbus >=0 ) -gpio_set_value (phy->gpio_vbus,0 ); -} -int sunxi_usb_phy_vbus_detect (int index) {struct sunxi_usb_phy *phy = &sunxi_usb_phy[index];
arch/arm/include/asm/arch-sunxi/usb_phy.h +0 -1
@@ -15,7 +15,6 @@ int sunxi_usb_phy_remove(void);void sunxi_usb_phy_init (int index);void sunxi_usb_phy_exit (int index);void sunxi_usb_phy_power_on (int index); -void sunxi_usb_phy_power_off (int index);int sunxi_usb_phy_vbus_detect (int index);int sunxi_usb_phy_id_detect (int index);void sunxi_usb_phy_enable_squelch_detect (int index,int enable);
drivers/usb/host/ehci-sunxi.c +0 -1
@@ -67,7 +67,6 @@ static int ehci_usb_remove(struct udevice *dev)if (ret)return ret; -sunxi_usb_phy_power_off (priv->phy_index);sunxi_usb_phy_exit (priv->phy_index);#ifdef CONFIG_SUNXI_GEN_SUN6I
drivers/usb/host/ohci-sunxi.c +0 -1
@@ -69,7 +69,6 @@ static int ohci_usb_remove(struct udevice *dev)if (ret)return ret; -sunxi_usb_phy_power_off (priv->phy_index);sunxi_usb_phy_exit (priv->phy_index);#ifdef CONFIG_SUNXI_GEN_SUN6I
drivers/usb/musb-new/sunxi.c +0 -3
@@ -233,9 +233,6 @@ static void sunxi_musb_disable(struct musb *musb)if (!enabled)return ; -if (is_host_enabled (musb)) -sunxi_usb_phy_power_off (0 );/* port power off */ -USBC_ForceVbusValidToLow (musb->mregs);mdelay (200 );/* Wait for the current session to timeout */
Signature · 1 line
2.4.3
PATCH 1/1 sunxi: usb-phy: Never power off the usb ports
Quoted 11 lines · Hans de Goede
USB devices are not really designed to get the power bounced off and on at them. Esp. USB powered harddisks do not like this.
Currently we power off the USB ports both on a "usb reset" and when booting the kernel, causing the usb-power to bounce off and then back on again.
This patch removes the powering off calls, fixing the undesirable power bouncing.
Signed-off-by Hans de Goede <[email protected]>
Shall I pick this through u-boot-usb or would you like this to go through u-boot-sunxi ? Recently, I feel a bit left out :-) (but I'm not opposed if you pick this through sunxi, don't get me wrong).
Best regards,
Marek Vasut
PATCH 1/1 sunxi: usb-phy: Never power off the usb ports
Hi,
Quoted 8 lines · Marek Vasut
Quoted 7 lines · Hans de Goede
USB devices are not really designed to get the power bounced off and on at them. Esp. USB powered harddisks do not like this.
Currently we power off the USB ports both on a "usb reset" and when booting the kernel, causing the usb-power to bounce off and then back on again.
Quoted 7 lines
Quoted 4 lines
This patch removes the powering off calls, fixing the undesirable power bouncing.
Signed-off-by Hans de Goede <[email protected]>Shall I pick this through u-boot-usb or would you like this to go through u-boot-sunxi ? Recently, I feel a bit left out :-)
Heh, sorry but we've a bunch of other sunxi/usb mixed patches already queued up, so I think it is best if I take this one through the sunxi tree to avoid conflicts.
Regards,
Hans
PATCH 1/1 sunxi: usb-phy: Never power off the usb ports
Quoted 1 line · Hans de Goede
Hi,
Hi!
Quoted 12 lines · Marek Vasut
Quoted 11 lines · Hans de Goede
Quoted 10 lines
USB devices are not really designed to get the power bounced off and on at them. Esp. USB powered harddisks do not like this.
Currently we power off the USB ports both on a "usb reset" and when booting the kernel, causing the usb-power to bounce off and then back on again.
This patch removes the powering off calls, fixing the undesirable power bouncing.
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
Signed-off-by Hans de Goede <[email protected]>Shall I pick this through u-boot-usb or would you like this to go through u-boot-sunxi ? Recently, I feel a bit left out :-)
Heh, sorry but we've a bunch of other sunxi/usb mixed patches already queued up, so I think it is best if I take this one through the sunxi tree to avoid conflicts.
*SULK* !!
All righty. Also:
Best regards,
Marek Vasut
PATCH 1/1 sunxi: usb-phy: Never power off the usb ports
In reply to Hans de GoedeQuoted 11 lines · Hans de Goede
USB devices are not really designed to get the power bounced off and on at them. Esp. USB powered harddisks do not like this.
Currently we power off the USB ports both on a "usb reset" and when booting the kernel, causing the usb-power to bounce off and then back on again.
This patch removes the powering off calls, fixing the undesirable power bouncing.
Signed-off-by Hans de Goede <[email protected]>