Hi,

On Thu, Mar 15, 2012 at 08:03:42PM +0530, Venkatraman S wrote:
> From: Balaji T K <[email protected]>
> 
> 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 <[email protected]>
> ---
>  drivers/mmc/host/omap_hsmmc.c |    4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
> index 4476b26..f324cf4 100644
> --- a/drivers/mmc/host/omap_hsmmc.c
> +++ b/drivers/mmc/host/omap_hsmmc.c
> @@ -1813,8 +1813,6 @@ static int __devinit 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;
> @@ -1838,7 +1836,7 @@ static int __devinit 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;

could this be done with a revision check at some point so we drop the
pdata requirement ? Not part of $SUBJECT though, because you're just
moving the increment.

-- 
balbi

Attachment: signature.asc
Description: Digital signature

Reply via email to