Re: [PATCHv2 1/1] OMAP3: PM: Fix OTG autoidle workaround

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

 



Eduardo Valentin <eduardo.valentin@xxxxxxxxx> writes:

> From: Eduardo Valentin <eduardo.valentin@xxxxxxxxx>
>
> This patch fix the OTG autoidle workaround so now
> usb gadget modules can be properly loaded.
>
> Besides it also adds a cpu check, because this hardware
> but is present only in OMAP34xx chips.

s/but/bug/

> Signed-off-by: Eduardo Valentin <eduardo.valentin@xxxxxxxxx>

Thanks, adding to PM branch with above typo fix.

Kevin

>  arch/arm/mach-omap2/pm34xx.c   |    3 ++-
>  arch/arm/mach-omap2/usb-musb.c |    9 ++++++++-
>  2 files changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
> index c301261..db75975 100644
> --- a/arch/arm/mach-omap2/pm34xx.c
> +++ b/arch/arm/mach-omap2/pm34xx.c
> @@ -505,7 +505,8 @@ void omap_sram_idle(void)
>  			 * Errata 1.164 fix : OTG autoidle can prevent
>  			 * sleep
>  			 */
> -			usb_musb_disable_autoidle();
> +			if (cpu_is_omap3430())
> +				usb_musb_disable_autoidle();
>  		}
>  		omap_uart_resume_idle(0);
>  		omap_uart_resume_idle(1);
> diff --git a/arch/arm/mach-omap2/usb-musb.c b/arch/arm/mach-omap2/usb-musb.c
> index bb3cee4..cbd4e45 100644
> --- a/arch/arm/mach-omap2/usb-musb.c
> +++ b/arch/arm/mach-omap2/usb-musb.c
> @@ -81,7 +81,14 @@ static void __init usb_musb_pm_init(void)
>  
>  void usb_musb_disable_autoidle(void)
>  {
> -	__raw_writel(0, otg_base + OTG_SYSCONFIG);
> +	if (otg_clk) {
> +		unsigned long reg;
> +
> +		clk_enable(otg_clk);
> +		reg = __raw_readl(otg_base + OTG_SYSCONFIG);
> +		__raw_writel(reg & ~1, otg_base + OTG_SYSCONFIG);
> +		clk_disable(otg_clk);
> +	}
>  }
>  
>  #ifdef CONFIG_USB_MUSB_SOC
> -- 
> 1.6.5.7.g9ecb2
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux