* [PATCH] mmc: omap4: hsmmc: fix module re-insertion
@ 2012-03-08 15:58 Balaji T K
2012-04-05 22:11 ` Tony Lindgren
0 siblings, 1 reply; 4+ messages in thread
From: Balaji T K @ 2012-03-08 15:58 UTC (permalink / raw)
To: linux-mmc, cjb; +Cc: linux-omap, Balaji T K
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 <balajitk@ti.com>
---
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] mmc: omap4: hsmmc: fix module re-insertion
2012-03-08 15:58 [PATCH] mmc: omap4: hsmmc: fix module re-insertion Balaji T K
@ 2012-04-05 22:11 ` Tony Lindgren
2012-04-05 22:14 ` Chris Ball
0 siblings, 1 reply; 4+ messages in thread
From: Tony Lindgren @ 2012-04-05 22:11 UTC (permalink / raw)
To: cjb; +Cc: linux-mmc, linux-omap, Balaji T K
Chris,
* Balaji T K <balajitk@ti.com> [120308 07:27]:
> 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.
Any news on getting this fix merged during the -rc cycle?
This is pretty important fix for anybody wanting to reload
the omap_hsmmc.ko module..
Regards,
Tony
> Signed-off-by: Balaji T K <balajitk@ti.com>
> ---
> 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
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mmc: omap4: hsmmc: fix module re-insertion
2012-04-05 22:11 ` Tony Lindgren
@ 2012-04-05 22:14 ` Chris Ball
2012-04-05 22:14 ` Tony Lindgren
0 siblings, 1 reply; 4+ messages in thread
From: Chris Ball @ 2012-04-05 22:14 UTC (permalink / raw)
To: Tony Lindgren; +Cc: linux-mmc, linux-omap, Balaji T K
Hi Tony,
On Thu, Apr 05 2012, Tony Lindgren wrote:
> * Balaji T K <balajitk@ti.com> [120308 07:27]:
>> 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.
>
> Any news on getting this fix merged during the -rc cycle?
>
> This is pretty important fix for anybody wanting to reload
> the omap_hsmmc.ko module..
It's in my fixes branch, planning on sending that to Linus tomorrow.
Thanks,
- Chris.
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mmc: omap4: hsmmc: fix module re-insertion
2012-04-05 22:14 ` Chris Ball
@ 2012-04-05 22:14 ` Tony Lindgren
0 siblings, 0 replies; 4+ messages in thread
From: Tony Lindgren @ 2012-04-05 22:14 UTC (permalink / raw)
To: Chris Ball; +Cc: linux-mmc, linux-omap, Balaji T K
* Chris Ball <cjb@laptop.org> [120405 15:17]:
> Hi Tony,
>
> On Thu, Apr 05 2012, Tony Lindgren wrote:
> > * Balaji T K <balajitk@ti.com> [120308 07:27]:
> >> 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.
> >
> > Any news on getting this fix merged during the -rc cycle?
> >
> > This is pretty important fix for anybody wanting to reload
> > the omap_hsmmc.ko module..
>
> It's in my fixes branch, planning on sending that to Linus tomorrow.
OK thanks for the update.
Tony
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-04-05 22:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-08 15:58 [PATCH] mmc: omap4: hsmmc: fix module re-insertion Balaji T K
2012-04-05 22:11 ` Tony Lindgren
2012-04-05 22:14 ` Chris Ball
2012-04-05 22:14 ` Tony Lindgren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).