X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fmtd%2Fmaps%2Fh720x-flash.c;h=0667101ccbe1df53ef15e8baf88655b1bdf0496f;hb=43bc926fffd92024b46cafaf7350d669ba9ca884;hp=3a0c58db2981a3c60039b4e397324b373ae99868;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/drivers/mtd/maps/h720x-flash.c b/drivers/mtd/maps/h720x-flash.c index 3a0c58db2..0667101cc 100644 --- a/drivers/mtd/maps/h720x-flash.c +++ b/drivers/mtd/maps/h720x-flash.c @@ -1,10 +1,12 @@ /* - * Flash memory access on Hynix GMS30C7201/HMS30C7202 based + * Flash memory access on Hynix GMS30C7201/HMS30C7202 based * evaluation boards - * + * + * $Id: h720x-flash.c,v 1.12 2005/11/07 11:14:27 gleixner Exp $ + * * (C) 2002 Jungjun Kim - * 2003 Thomas Gleixner -*/ + * 2003 Thomas Gleixner + */ #include #include @@ -24,7 +26,7 @@ static struct mtd_info *mymtd; static struct map_info h720x_map = { .name = "H720X", - .buswidth = 4, + .bankwidth = 4, .size = FLASH_SIZE, .phys = FLASH_PHYS, }; @@ -57,7 +59,7 @@ static struct mtd_partition h720x_partitions[] = { } }; -#define NUM_PARTITIONS (sizeof(h720x_partitions)/sizeof(h720x_partitions[0])) +#define NUM_PARTITIONS ARRAY_SIZE(h720x_partitions) static int nr_mtd_parts; static struct mtd_partition *mtd_parts; @@ -70,8 +72,8 @@ int __init h720x_mtd_init(void) { char *part_type = NULL; - - h720x_map.virt = (unsigned long)ioremap(FLASH_PHYS, FLASH_SIZE); + + h720x_map.virt = ioremap(FLASH_PHYS, FLASH_SIZE); if (!h720x_map.virt) { printk(KERN_ERR "H720x-MTD: ioremap failed\n"); @@ -80,16 +82,16 @@ int __init h720x_mtd_init(void) simple_map_init(&h720x_map); - // Probe for flash buswidth 4 + // Probe for flash bankwidth 4 printk (KERN_INFO "H720x-MTD probing 32bit FLASH\n"); mymtd = do_map_probe("cfi_probe", &h720x_map); if (!mymtd) { printk (KERN_INFO "H720x-MTD probing 16bit FLASH\n"); - // Probe for buswidth 2 - h720x_map.buswidth = 2; + // Probe for bankwidth 2 + h720x_map.bankwidth = 2; mymtd = do_map_probe("cfi_probe", &h720x_map); } - + if (mymtd) { mymtd->owner = THIS_MODULE; @@ -122,11 +124,11 @@ static void __exit h720x_mtd_cleanup(void) del_mtd_partitions(mymtd); map_destroy(mymtd); } - + /* Free partition info, if commandline partition was used */ if (mtd_parts && (mtd_parts != h720x_partitions)) kfree (mtd_parts); - + if (h720x_map.virt) { iounmap((void *)h720x_map.virt); h720x_map.virt = 0;