From mboxrd@z Thu Jan 1 00:00:00 1970 From: Balaji T K Subject: [PATCH] mmc: omap4: hsmmc: fix module re-insertion Date: Thu, 8 Mar 2012 21:28:40 +0530 Message-ID: <1331222320-31370-1-git-send-email-balajitk@ti.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Sender: linux-mmc-owner@vger.kernel.org To: linux-mmc@vger.kernel.org, cjb@laptop.org Cc: linux-omap@vger.kernel.org, Balaji T K List-Id: linux-omap@vger.kernel.org OMAP4 and OMAP3 HSMMC IP registers differ by 0x100 offset. Addng the offset to platform_device resource structure increments the start address for every insmod operation. MMC command fails on re-insertion as module due to incorrect register base. Fix this by updating the ioremap base address only. Signed-off-by: Balaji T K --- drivers/mmc/host/omap_hsmmc.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index e550170..102425c 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -1741,8 +1741,6 @@ static int __init omap_hsmmc_probe(struct platform_device *pdev) if (res == NULL || irq < 0) return -ENXIO; - res->start += pdata->reg_offset; - res->end += pdata->reg_offset; res = request_mem_region(res->start, resource_size(res), pdev->name); if (res == NULL) return -EBUSY; @@ -1766,7 +1764,7 @@ static int __init omap_hsmmc_probe(struct platform_device *pdev) host->dma_ch = -1; host->irq = irq; host->slot_id = 0; - host->mapbase = res->start; + host->mapbase = res->start + pdata->reg_offset; host->base = ioremap(host->mapbase, SZ_4K); host->power_mode = MMC_POWER_OFF; host->next_data.cookie = 1; -- 1.7.0.4