Re: [PATCH] USB: MUSB: Better sysconf reg settings on PM point of view

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

 



* Felipe Balbi <felipe.balbi@xxxxxxxxx> [080429 04:08]:
> The following patch is needed because usb is preventing core
> powerdomain to enter sleep state.
> 
> Thanks to Jouni Högander for pointing this

Pushing today.

FYI, I'm putting together patches to get rid of the __REG32 and
__REG16 macros in order to get multi-omap booting working between
926, arm11, and cortex using the same kernel.

The __REG macros won't work for multi-omap when the IO
bases are different as these macros cannot be replaced by
functions in io.c.

Tony


> Signed-off-by: Felipe Balbi <felipe.balbi@xxxxxxxxx>
> Signed-off-by: Jouni Högander <jouni.hogander@xxxxxxxxx>
> ---
>  drivers/usb/musb/omap2430.c |   23 ++++++++++++-----------
>  1 files changed, 12 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
> index e092393..36f1739 100644
> --- a/drivers/usb/musb/omap2430.c
> +++ b/drivers/usb/musb/omap2430.c
> @@ -224,6 +224,14 @@ int __init musb_platform_init(struct musb *musb)
>  	musb->xceiv = *xceiv;
>  	musb_platform_resume(musb);
>  
> +	OTG_SYSCONFIG_REG &= ~ENABLEWAKEUP;	/* disable wakeup */
> +	OTG_SYSCONFIG_REG &= ~NOSTDBY;		/* remove possible nostdby */
> +	OTG_SYSCONFIG_REG |= SMARTSTDBY;	/* enable smart standby */
> +	OTG_SYSCONFIG_REG &= ~AUTOIDLE;		/* disable auto idle */
> +	OTG_SYSCONFIG_REG &= ~NOIDLE;		/* remove possible noidle */
> +	OTG_SYSCONFIG_REG |= SMARTIDLE;		/* enable smart idle */
> +	OTG_SYSCONFIG_REG |= AUTOIDLE;		/* enable auto idle */
> +
>  	OTG_INTERFSEL_REG |= ULPI_12PIN;
>  
>  	pr_debug("HS USB OTG: revision 0x%x, sysconfig 0x%02x, "
> @@ -250,12 +258,8 @@ int musb_platform_suspend(struct musb *musb)
>  		return 0;
>  
>  	/* in any role */
> -	OTG_FORCESTDBY_REG &= ~ENABLEFORCE; /* disable MSTANDBY */
> -	OTG_SYSCONFIG_REG &= FORCESTDBY;	/* enable force standby */
> -	OTG_SYSCONFIG_REG &= ~AUTOIDLE;		/* disable auto idle */
> -	OTG_SYSCONFIG_REG |= SMARTIDLE;		/* enable smart idle */
> -	OTG_FORCESTDBY_REG |= ENABLEFORCE; /* enable MSTANDBY */
> -	OTG_SYSCONFIG_REG |= AUTOIDLE;		/* enable auto idle */
> +	OTG_FORCESTDBY_REG |= ENABLEFORCE;	/* enable MSTANDBY */
> +	OTG_SYSCONFIG_REG |= ENABLEWAKEUP;	/* enable wakeup */
>  
>  	if (musb->xceiv.set_suspend)
>  		musb->xceiv.set_suspend(&musb->xceiv, 1);
> @@ -281,11 +285,8 @@ int musb_platform_resume(struct musb *musb)
>  	else
>  		clk_enable(musb->clock);
>  
> -	OTG_FORCESTDBY_REG &= ~ENABLEFORCE; /* disable MSTANDBY */
> -	OTG_SYSCONFIG_REG |= SMARTSTDBY;	/* enable smart standby */
> -	OTG_SYSCONFIG_REG &= ~AUTOIDLE;		/* disable auto idle */
> -	OTG_SYSCONFIG_REG |= SMARTIDLE;		/* enable smart idle */
> -	OTG_SYSCONFIG_REG |= AUTOIDLE;		/* enable auto idle */
> +	OTG_SYSCONFIG_REG &= ~ENABLEWAKEUP;	/* disable wakeup */
> +	OTG_FORCESTDBY_REG &= ~ENABLEFORCE;	/* disable MSTANDBY */
>  
>  	return 0;
>  }
> -- 
> 1.5.5.1.99.gf0ec4
> 
> --
> 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
--
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