Re: [RFC/PATCH 4/4] add phy low power suspend for older chipidea core

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 14 May 2012, Matthieu CASTET wrote:

> Signed-off-by: Matthieu CASTET <matthieu.castet@xxxxxxxxxx>
> ---
>  drivers/usb/host/ehci-hub.c |   46 +++++++++++++++++++++++++++----------------
>  1 file changed, 29 insertions(+), 17 deletions(-)
> 
> diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c
> index b70fca6..3b3f201 100644
> --- a/drivers/usb/host/ehci-hub.c
> +++ b/drivers/usb/host/ehci-hub.c
> @@ -33,34 +33,46 @@
>  
>  static void tdi_phy_lpm_clear(struct ehci_hcd *ehci, int port)
>  {
> +	u32 temp;
> +	u32 __iomem *reg;
> +	u32 bit;
>  	if (ehci->has_hostpc) {
> -		u32 __iomem	*hostpc_reg;
> -		u32		temp;
> -
> -		hostpc_reg = (u32 __iomem *)((u8 *) ehci->regs
> +		reg = (u32 __iomem *)((u8 *) ehci->regs
>  				+ HOSTPC0 + 4 * port);
> -		temp = ehci_readl(ehci, hostpc_reg);
> -		ehci_writel(ehci, temp & ~HOSTPC_PHCD, hostpc_reg);
> +		bit = HOSTPC_PHCD;
> +	}
> +	else {
> +		reg = &ehci->regs->port_status[port];
> +		bit = HOSTPC_PHCD << 1;
>  	}
> +
> +	temp = ehci_readl(ehci, reg);
> +	ehci_writel(ehci, temp & ~bit, reg);

This can't be right.  In the !has_hostpc case, you do not turn off the 
RWC bits before writing them back.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux