diff options
author | Balaji T K <balajitk@ti.com> | 2012-04-02 02:56:47 -0400 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2012-04-05 20:32:30 -0400 |
commit | fc307df88f0d77505c19756d95be66c981c421ea (patch) | |
tree | 3a35a8261cddfa9afeda36d940dd0fb70013f952 /drivers/mmc | |
parent | b796450b4590dbaee2d31c85b04791cafacff9b4 (diff) |
mmc: omap_hsmmc: fix module re-insertion
OMAP4 and OMAP3 HSMMC IP registers differ by 0x100 offset.
Adding 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 <balajitk@ti.com>
Signed-off-by: Venkatraman S <svenkatr@ti.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | 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 b4c59eac348..5c2b1c10af9 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c | |||
@@ -1818,8 +1818,6 @@ static int __devinit omap_hsmmc_probe(struct platform_device *pdev) | |||
1818 | if (res == NULL || irq < 0) | 1818 | if (res == NULL || irq < 0) |
1819 | return -ENXIO; | 1819 | return -ENXIO; |
1820 | 1820 | ||
1821 | res->start += pdata->reg_offset; | ||
1822 | res->end += pdata->reg_offset; | ||
1823 | res = request_mem_region(res->start, resource_size(res), pdev->name); | 1821 | res = request_mem_region(res->start, resource_size(res), pdev->name); |
1824 | if (res == NULL) | 1822 | if (res == NULL) |
1825 | return -EBUSY; | 1823 | return -EBUSY; |
@@ -1843,7 +1841,7 @@ static int __devinit omap_hsmmc_probe(struct platform_device *pdev) | |||
1843 | host->dma_ch = -1; | 1841 | host->dma_ch = -1; |
1844 | host->irq = irq; | 1842 | host->irq = irq; |
1845 | host->slot_id = 0; | 1843 | host->slot_id = 0; |
1846 | host->mapbase = res->start; | 1844 | host->mapbase = res->start + pdata->reg_offset; |
1847 | host->base = ioremap(host->mapbase, SZ_4K); | 1845 | host->base = ioremap(host->mapbase, SZ_4K); |
1848 | host->power_mode = MMC_POWER_OFF; | 1846 | host->power_mode = MMC_POWER_OFF; |
1849 | host->next_data.cookie = 1; | 1847 | host->next_data.cookie = 1; |