Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / drivers / mtd / maps / redwood.c
index 4ece1c8..50b1403 100644 (file)
@@ -1,14 +1,13 @@
 /*
- * $Id: redwood.c,v 1.6 2003/05/21 12:45:19 dwmw2 Exp $
+ * $Id: redwood.c,v 1.11 2005/11/07 11:14:28 gleixner Exp $
  *
  * drivers/mtd/maps/redwood.c
  *
  * FLASH map for the IBM Redwood 4/5/6 boards.
  *
+ * Author: MontaVista Software, Inc. <source@mvista.com>
  *
- * Author: Armin Kuster <akuster@mvista.com>
- *
- * 2001-2002 (c) MontaVista, Software, Inc. This file is licensed under
+ * 2001-2003 (c) MontaVista, Software, Inc. This file is licensed under
  * the terms of the GNU General Public License version 2. This program
  * is licensed "as is" without any warranty of any kind, whether express
  * or implied.
@@ -80,7 +79,7 @@ static struct mtd_partition redwood_flash_partitions[] = {
 
 #define RW_PART0_OF    0
 #define RW_PART0_SZ    0x400000        /* 4 MiB data */
-#define RW_PART1_OF    RW_PART0_OF + RW_PART0_SZ 
+#define RW_PART1_OF    RW_PART0_OF + RW_PART0_SZ
 #define RW_PART1_SZ    0x10000         /* 64K VPD */
 #define RW_PART2_OF    RW_PART1_OF + RW_PART1_SZ
 #define RW_PART2_SZ    0x400000 - (0x10000 + 0x20000)
@@ -89,7 +88,7 @@ static struct mtd_partition redwood_flash_partitions[] = {
 
 static struct mtd_partition redwood_flash_partitions[] = {
        {
-               .name = "Redwood kernel",
+               .name = "Redwood filesystem",
                .offset = RW_PART0_OF,
                .size = RW_PART0_SZ
        },
@@ -100,7 +99,7 @@ static struct mtd_partition redwood_flash_partitions[] = {
                .mask_flags = MTD_WRITEABLE     /* force read-only */
        },
        {
-               .name = "Redwood filesystem",
+               .name = "Redwood kernel",
                .offset = RW_PART2_OF,
                .size = RW_PART2_SZ
        },
@@ -117,13 +116,12 @@ static struct mtd_partition redwood_flash_partitions[] = {
 struct map_info redwood_flash_map = {
        .name = "IBM Redwood",
        .size = WINDOW_SIZE,
-       .buswidth = 2,
+       .bankwidth = 2,
        .phys = WINDOW_ADDR,
 };
 
 
-#define NUM_REDWOOD_FLASH_PARTITIONS \
-       (sizeof(redwood_flash_partitions)/sizeof(redwood_flash_partitions[0]))
+#define NUM_REDWOOD_FLASH_PARTITIONS ARRAY_SIZE(redwood_flash_partitions)
 
 static struct mtd_info *redwood_mtd;
 
@@ -132,8 +130,7 @@ int __init init_redwood_flash(void)
        printk(KERN_NOTICE "redwood: flash mapping: %x at %x\n",
                        WINDOW_SIZE, WINDOW_ADDR);
 
-       redwood_flash_map.virt =
-               (unsigned long)ioremap(WINDOW_ADDR, WINDOW_SIZE);
+       redwood_flash_map.virt = ioremap(WINDOW_ADDR, WINDOW_SIZE);
 
        if (!redwood_flash_map.virt) {
                printk("init_redwood_flash: failed to ioremap\n");
@@ -167,5 +164,5 @@ module_init(init_redwood_flash);
 module_exit(cleanup_redwood_flash);
 
 MODULE_LICENSE("GPL");
-MODULE_AUTHOR("Armin Kuster <akuster@mvista.com>");
+MODULE_AUTHOR("MontaVista Software <source@mvista.com>");
 MODULE_DESCRIPTION("MTD map driver for the IBM Redwood reference boards");