mmc: omap4: hsmmc: fix module re-insertion
Subsystems (2)
PATCH 1/1 mmc: omap4: hsmmc: fix module re-insertion
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.
--- drivers/mmc/host/omap_hsmmc.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-)
drivers/mmc/host/omap_hsmmc.c +1 -3
@@ -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 ;
Signature · 1 line
1.7.0.4
Chris,
Quoted 5 lines · Balaji T K
OMAP4 and OMAP3 HSMMC IP registers differ by
0x100offset. Addng the offset toplatform_deviceresource 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
Quoted 34 lines
Signed-off-by Balaji T K <[email protected]>--- drivers/mmc/host/omap_hsmmc.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-)drivers/mmc/host/omap_hsmmc.c +1
-3@@ -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 ;Signature · 6 lines
1.7.0.4 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Tony,
Quoted 11 lines · Tony Lindgren
Quoted 5 lines · Balaji T K
OMAP4 and OMAP3 HSMMC IP registers differ by
0x100offset. Addng the offset toplatform_deviceresource 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.
Signature · 2 lines
Chris Ball <[email protected]> <http://printf.net/> One Laptop Per Child
Quoted 10 lines · Chris Ball
Hi Tony,
Quoted 7 lines · Tony Lindgren
Quoted 5 lines · Balaji T K
OMAP4 and OMAP3 HSMMC IP registers differ by
0x100offset. Addng the offset toplatform_deviceresource 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.
Quoted 6 lines
Quoted 4 lines
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