"ext Felipe Balbi" <felipe.balbi@xxxxxxxxx> writes: > On Thu, Sep 18, 2008 at 03:22:32PM +0300, ext Kevin Hilman wrote: >> This ensures that an unused HSMMC block will not interfere with sleep. >> >> Signed-off-by: Kevin Hilman <khilman@xxxxxxxxxxxxxxxxxxx> > > It was observed that bootrom code initializes mmc in such a way that > prevents system from idling. This was just my guess, back then when I was debugging it. The case here is that after bootup mmc parent clock (96 Mhz fck) is not automatically cut off by hw, even if all it's child clocks are gated. This prevents core to enter sleep state. I found out that it is mmc who is guilty for this and resetting it helps. Funny part here is that this doesn't happen with all SDP boards. Again I have guess for this also:) This is sysboot pins. Boot sequence can be selected in SDP board using dip switches. If mmc is selected as a one bootdevice then this problem happens (or vice versa). Anyway the plan is to have some generic code which resets all omap modules on boot. Maybe even configure them in a way that they do not break PM (or anything else). This would make sure that omap modules that do not have drivers, would still be in a known state. This is planned to be implemented in tiocp code. Paul, am I in line with you in this? If it is true what I wrote above about tiocp, then this fix is temporary and will be removed as tiocp code gets in. > > Acked-by: Felipe Balbi <felipe.balbi@xxxxxxxxx> >> --- >> arch/arm/mach-omap2/hsmmc.c | 8 ++++++++ >> 1 files changed, 8 insertions(+), 0 deletions(-) >> >> diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c >> index 7334d86..03fe820 100644 >> --- a/arch/arm/mach-omap2/hsmmc.c >> +++ b/arch/arm/mach-omap2/hsmmc.c >> @@ -280,8 +280,16 @@ static struct omap_mmc_platform_data hsmmc_data = { >> }, >> }; >> >> +static void __init hsmmc_reset(void) >> +{ >> + omap_writel(MMCHS_SYSCONFIG_SWRESET, MMCHS1_SYSCONFIG); >> + omap_writel(MMCHS_SYSCONFIG_SWRESET, MMCHS2_SYSCONFIG); >> + omap_writel(MMCHS_SYSCONFIG_SWRESET, MMCHS3_SYSCONFIG); >> +} >> + >> void __init hsmmc_init(void) >> { >> + hsmmc_reset(); >> omap2_init_mmc(&hsmmc_data); >> } >> >> -- >> 1.5.4.3 >> >> -- >> 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 > > -- > balbi > -- > 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 > > -- Jouni Högander -- 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