[PATCH] [MTD] physmap: Add support for 64 bit resources on PPC44x

Lennert Buytenhek buytenh at wantstofly.org
Thu Jan 18 18:59:00 EST 2007


On Thu, Jan 18, 2007 at 06:07:53PM +0100, Stefan Roese wrote:

> --- a/drivers/mtd/maps/physmap.c
> +++ b/drivers/mtd/maps/physmap.c
> @@ -116,7 +116,14 @@ static int physmap_flash_probe(struct platform_device 
> *dev)
>  	info->map.bankwidth = physmap_data->width;
>  	info->map.set_vpp = physmap_data->set_vpp;
>  
> +#ifdef CONFIG_44x
> +	if (sizeof(dev->resource->start) == 4)

CONFIG_RESOURCES_64BIT


> +		info->map.virt = ioremap(info->map.phys, info->map.size);
> +	else
> +		info->map.virt = ioremap64(dev->resource->start, info->map.size);
> +#else
>  	info->map.virt = ioremap(info->map.phys, info->map.size);
> +#endif

Ugh.  Do you have crap like this everywhere ioremap() is called?

Why can't you fix ioremap() to take >= 4G addresses instead?




More information about the linux-mtd mailing list