hwmod fixes for MMC module reset on init
Subsystems (4)
cover hwmod fixes for MMC module reset on init
I've started to integrate the new hwmod/omapdev into the PM branch for the next release.
With the new MMC hwmod added, hwmod should do a full reset and idle of the MMC modules on init, so I decided to remove the patch from the PM branch which does the same.
To my surprise, the MMC blocks were preventing retention without the
original patch. In debugging hwmod, I found a couple problems. One
with the MMC sys[cs]_off values themselves, and another in that the reset code was not waiting for RESETDONE.
Kevin Hilman (2):
OMAP2/3: HS-MMC: correct hwmod offsets for SYSCONFIG/SYSSTATUS OMAP2/3/4: omap_hwmod: fix reset bug
arch/arm/mach-omap2/omap_hwmod.c | 2 +- arch/arm/mach-omap2/omap_hwmod_2430.h | 4 ++-- arch/arm/mach-omap2/omap_hwmod_34xx.h | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-)
PATCH 1/2 OMAP2/3: HS-MMC: correct hwmod offsets for SYSCONFIG/SYSSTATUS
--- arch/arm/mach-omap2/omap_hwmod_2430.h | 4 ++-- arch/arm/mach-omap2/omap_hwmod_34xx.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
arch/arm/mach-omap2/omap_hwmod_2430.h +2 -2
@@ -170,8 +170,8 @@ static struct omap_hwmod omap2430_mpu_hwmod = {/* MMC/SD/SDIO common */ static struct omap_hwmod_sysconfig mmc_if_ctrl = { - .rev_offs =0x10 , - .sysc_offs =0x14 , + .sysc_offs =0x10 , + .syss_offs =0x14 , .sysc_flags = (SYSC_HAS_CLOCKACTIVITY |SYSC_HAS_SIDLEMODE |SYSC_HAS_ENAWAKEUP |SYSC_HAS_SOFTRESET |SYSC_HAS_AUTOIDLE |SYSS_MISSING ),
arch/arm/mach-omap2/omap_hwmod_34xx.h +2 -2
@@ -236,8 +236,8 @@ static struct omap_hwmod omap34xx_mpu_hwmod = {/* MMC/SD/SDIO common */ static struct omap_hwmod_sysconfig mmc_if_ctrl = { - .rev_offs =0x10 , - .sysc_offs =0x14 , + .sysc_offs =0x10 , + .syss_offs =0x14 , .sysc_flags = (SYSC_HAS_CLOCKACTIVITY |SYSC_HAS_SIDLEMODE |SYSC_HAS_ENAWAKEUP |SYSC_HAS_SOFTRESET |SYSC_HAS_AUTOIDLE ),
Signature · 1 line
1.6.3.3
PATCH 2/2 OMAP2/3/4: omap_hwmod: fix reset bug
The _reset() hook should early when _soft_reset() fails, not it if succeeds. Currently, it aborts when _soft_reset() succeeds, resulting in not waiting for RESETDONE.
--- arch/arm/mach-omap2/omap_hwmod.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-omap2/omap_hwmod.c +1 -1
@@ -746,7 +746,7 @@ static int _reset(struct omap_hwmod *oh) v = oh->_sysc_cache; r =_set_softreset (oh, &v); -if (!r) +if (r)return r;_write_sysconfig (v, oh);
Signature · 1 line
1.6.3.3
Paul Walmsley
maintainerHi Kevin,
Quoted 12 lines · Kevin Hilman
I've started to integrate the new hwmod/omapdev into the PM branch for the next release.
With the new MMC hwmod added, hwmod should do a full reset and idle of the MMC modules on init, so I decided to remove the patch from the PM branch which does the same.
To my surprise, the MMC blocks were preventing retention without the
original patch. In debugging hwmod, I found a couple problems. One
with the MMC sys[cs]_off values themselves, and another in that the reset code was not waiting for RESETDONE.
Quoted 8 lines
Kevin Hilman (2):
OMAP2/3: HS-MMC: correct hwmod offsets for SYSCONFIG/SYSSTATUS OMAP2/3/4:omap_hwmod: fix reset bugarch/arm/mach-omap2/omap_hwmod.c | 2 +- arch/arm/mach-omap2/omap_hwmod_2430.h | 4 ++-- arch/arm/mach-omap2/omap_hwmod_34xx.h | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-)
thanks very much for these patches; they've both been incorporated.
- Paul