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 / autcpu12-nvram.c
index f4c27c4..7ed3424 100644 (file)
@@ -1,8 +1,8 @@
 /*
- * NV-RAM memory access on autcpu12 
+ * NV-RAM memory access on autcpu12
  * (C) 2002 Thomas Gleixner (gleixner@autronix.de)
  *
- * $Id: autcpu12-nvram.c,v 1.5 2003/05/21 12:45:18 dwmw2 Exp $ 
+ * $Id: autcpu12-nvram.c,v 1.9 2005/11/07 11:14:26 gleixner Exp $
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -39,7 +39,7 @@ static struct mtd_info *sram_mtd;
 struct map_info autcpu12_sram_map = {
        .name = "SRAM",
        .size = 32768,
-       .buswidth = 4,
+       .bankwidth = 4,
        .phys = 0x12000000,
 };
 
@@ -47,7 +47,7 @@ static int __init init_autcpu12_sram (void)
 {
        int err, save0, save1;
 
-       autcpu12_sram_map.virt = (unsigned long)ioremap(0x12000000, SZ_128K);
+       autcpu12_sram_map.virt = ioremap(0x12000000, SZ_128K);
        if (!autcpu12_sram_map.virt) {
                printk("Failed to ioremap autcpu12 NV-RAM space\n");
                err = -EIO;
@@ -55,10 +55,10 @@ static int __init init_autcpu12_sram (void)
        }
        simple_map_init(&autcpu_sram_map);
 
-       /* 
-        * Check for 32K/128K 
-        * read ofs 0 
-        * read ofs 0x10000 
+       /*
+        * Check for 32K/128K
+        * read ofs 0
+        * read ofs 0x10000
         * Write complement to ofs 0x100000
         * Read and check result on ofs 0x0
         * Restore contents
@@ -66,7 +66,7 @@ static int __init init_autcpu12_sram (void)
        save0 = map_read32(&autcpu12_sram_map,0);
        save1 = map_read32(&autcpu12_sram_map,0x10000);
        map_write32(&autcpu12_sram_map,~save0,0x10000);
-       /* if we find this pattern on 0x0, we have 32K size 
+       /* if we find this pattern on 0x0, we have 32K size
         * restore contents and exit
         */
        if ( map_read32(&autcpu12_sram_map,0) != save0) {
@@ -76,7 +76,7 @@ static int __init init_autcpu12_sram (void)
        /* We have a 128K found, restore 0x10000 and set size
         * to 128K
         */
-       ma[_write32(&autcpu12_sram_map,save1,0x10000);
+       map_write32(&autcpu12_sram_map,save1,0x10000);
        autcpu12_sram_map.size = SZ_128K;
 
 map:
@@ -89,7 +89,7 @@ map:
 
        sram_mtd->owner = THIS_MODULE;
        sram_mtd->erasesize = 16;
-       
+
        if (add_mtd_device(sram_mtd)) {
                printk("NV-RAM device addition failed\n");
                err = -ENOMEM;
@@ -97,7 +97,7 @@ map:
        }
 
        printk("NV-RAM device size %ldKiB registered on AUTCPU12\n",autcpu12_sram_map.size/SZ_1K);
-               
+
        return 0;
 
 out_probe: