NAND: AMD Au1550 driver reads write-only register
[deliverable/linux.git] / drivers / mtd / nand / au1550nd.c
index 87d34351a86d3e6eb743153f0c05922afca8976c..839b35a386b6f8fe60021391716c52ec4f6c1768 100644 (file)
@@ -321,7 +321,7 @@ int au1550_device_ready(struct mtd_info *mtd)
 /*
  * Main initialization routine
  */
-int __init au1xxx_nand_init(void)
+static int __init au1xxx_nand_init(void)
 {
        struct nand_chip *this;
        u16 boot_swapboot = 0;  /* default value */
@@ -347,11 +347,9 @@ int __init au1xxx_nand_init(void)
        au1550_mtd->priv = this;
        au1550_mtd->owner = THIS_MODULE;
 
-       /* disable interrupts */
-       au_writel(au_readl(MEM_STNDCTL) & ~(1 << 8), MEM_STNDCTL);
 
-       /* disable NAND boot */
-       au_writel(au_readl(MEM_STNDCTL) & ~(1 << 0), MEM_STNDCTL);
+       /* MEM_STNDCTL: disable ints, disable nand boot */
+       au_writel(0, MEM_STNDCTL);
 
 #ifdef CONFIG_MIPS_PB1550
        /* set gpio206 high */
@@ -480,7 +478,6 @@ module_init(au1xxx_nand_init);
 /*
  * Clean up routine
  */
-#ifdef MODULE
 static void __exit au1550_cleanup(void)
 {
        struct nand_chip *this = (struct nand_chip *)&au1550_mtd[1];
@@ -496,7 +493,6 @@ static void __exit au1550_cleanup(void)
 }
 
 module_exit(au1550_cleanup);
-#endif
 
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Embedded Edge, LLC");
This page took 0.024145 seconds and 5 git commands to generate.