X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fmtd%2Fmaps%2Fixp4xx.c;h=7ebc8cc5b39816877aa966e458c3c5e789b0d4b1;hb=9bf4aaab3e101692164d49b7ca357651eb691cb6;hp=a10f92126fd4505fa7f26e12a505bf7151bfcc2d;hpb=e812ccbe0c915857ebea6a632bfadc631f7504a9;p=linux-2.6.git diff --git a/drivers/mtd/maps/ixp4xx.c b/drivers/mtd/maps/ixp4xx.c index a10f92126..7ebc8cc5b 100644 --- a/drivers/mtd/maps/ixp4xx.c +++ b/drivers/mtd/maps/ixp4xx.c @@ -1,5 +1,5 @@ /* - * $Id: ixp4xx.c,v 1.1 2004/05/13 22:21:26 dsaxena Exp $ + * $Id: ixp4xx.c,v 1.3 2004/07/12 22:38:29 dwmw2 Exp $ * * drivers/mtd/maps/ixp4xx.c * @@ -39,10 +39,11 @@ #define BYTE1(h) ((h) & 0xFF) #endif -static __u16 -ixp4xx_read16(struct map_info *map, unsigned long ofs) +static map_word ixp4xx_read16(struct map_info *map, unsigned long ofs) { - return *(__u16 *) (map->map_priv_1 + ofs); + map_word val; + val.x[0] = *(__u16 *) (map->map_priv_1 + ofs); + return val; } /* @@ -50,9 +51,8 @@ ixp4xx_read16(struct map_info *map, unsigned long ofs) * when attached to a 16-bit wide device (such as the 28F128J3A), * so we can't just memcpy_fromio(). */ -static void -ixp4xx_copy_from(struct map_info *map, void *to, - unsigned long from, ssize_t len) +static void ixp4xx_copy_from(struct map_info *map, void *to, + unsigned long from, ssize_t len) { int i; u8 *dest = (u8 *) to; @@ -69,10 +69,9 @@ ixp4xx_copy_from(struct map_info *map, void *to, dest[len - 1] = BYTE0(src[i]); } -static void -ixp4xx_write16(struct map_info *map, __u16 d, unsigned long adr) +static void ixp4xx_write16(struct map_info *map, map_word d, unsigned long adr) { - *(__u16 *) (map->map_priv_1 + adr) = d; + *(__u16 *) (map->map_priv_1 + adr) = d.x[0]; } struct ixp4xx_flash_info { @@ -84,8 +83,7 @@ struct ixp4xx_flash_info { static const char *probes[] = { "RedBoot", "cmdlinepart", NULL }; -static int -ixp4xx_flash_remove(struct device *_dev) +static int ixp4xx_flash_remove(struct device *_dev) { struct platform_device *dev = to_platform_device(_dev); struct flash_platform_data *plat = dev->dev.platform_data; @@ -168,10 +166,10 @@ static int ixp4xx_flash_probe(struct device *_dev) * any board use 8-bit access, we'll fixup the driver to * handle that. */ - info->map.buswidth = 2; + info->map.bankwidth = 2; info->map.name = dev->dev.bus_id; - info->map.read16 = ixp4xx_read16, - info->map.write16 = ixp4xx_write16, + info->map.read = ixp4xx_read16, + info->map.write = ixp4xx_write16, info->map.copy_from = ixp4xx_copy_from, info->res = request_mem_region(dev->resource->start,