On Wed, Sep 1, 2010 at 5:56 PM, Adrian Hunter <adrian.hunter@xxxxxxxxx> wrote: > kishore kadiyala wrote: >> >> OMAP4 not only have newly added hsmmc registers but also >> have registers which were there in OMAP3 and which doesn't >> have a common offset deviation compared to OMAP3. >> >> For generic handling, OMAP3 and OMAP4 has different array's of >> register offset maintained and right one is choosen during run time. >> >> Cc: Tony Lindgren <tony@xxxxxxxxxxx> >> Cc: Adrian Hunter <adrian.hunter@xxxxxxxxx> >> Cc: Madhusudhan Chikkature <madhu.cr@xxxxxx> >> Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> >> Signed-off-by: Kishore Kadiyala <kishore.kadiyala@xxxxxx> >> --- >> arch/arm/mach-omap2/devices.c | 30 +++-- >> arch/arm/mach-omap2/hsmmc.c | 6 + >> arch/arm/plat-omap/include/plat/mmc.h | 78 ++++++++++- >> drivers/mmc/host/omap_hsmmc.c | 251 >> +++++++++++++++------------------ >> 4 files changed, 218 insertions(+), 147 deletions(-) >> >> diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c >> index 2dbb265..03add6e 100644 >> --- a/arch/arm/mach-omap2/devices.c >> +++ b/arch/arm/mach-omap2/devices.c >> @@ -506,6 +506,8 @@ static inline void omap_init_sham(void) { } >> #define MMCHS_SYSCONFIG_SWRESET (1 << 1) >> #define MMCHS_SYSSTATUS 0x0014 >> #define MMCHS_SYSSTATUS_RESETDONE (1 << 0) >> +#define OMAP4_MMCHS_SYSCONFIG_SWRESET (1 << 0) >> +#define OMAP4_MMCHS_OFFSET 0x100 >> >> static struct platform_device dummy_pdev = { >> .dev = { >> @@ -528,6 +530,8 @@ static struct platform_device dummy_pdev = { >> static void __init omap_hsmmc_reset(void) >> { >> u32 i, nr_controllers; >> + u32 reg_val = 0; >> + u32 reg_off = 0; >> >> if (cpu_is_omap242x()) >> return; >> @@ -562,9 +566,6 @@ static void __init omap_hsmmc_reset(void) >> break; >> } >> >> - if (cpu_is_omap44xx()) >> - base += OMAP4_MMC_REG_OFFSET; >> - >> dummy_pdev.id = i; >> dev_set_name(&dummy_pdev.dev, "mmci-omap-hs.%d", i); >> iclk = clk_get(dev, "ick"); >> @@ -582,9 +583,18 @@ static void __init omap_hsmmc_reset(void) >> break; >> } >> >> - omap_writel(MMCHS_SYSCONFIG_SWRESET, base + >> MMCHS_SYSCONFIG); >> - v = omap_readl(base + MMCHS_SYSSTATUS); >> - while (!(omap_readl(base + MMCHS_SYSSTATUS) & >> + if (cpu_is_omap44xx()) >> + reg_val = MMCHS_SYSCONFIG_SWRESET; > > Should this be OMAP4_MMCHS_SYSCONFIG_SWRESET? Yes, it should be as mentioned [Late night post's take's away quality :) ] , will correct it and repost . <snip> Thanks, Kishore -- 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