]> git.sur5r.net Git - u-boot/blobdiff - board/bf537-stamp/nand.c
Merge branch 'fixes'
[u-boot] / board / bf537-stamp / nand.c
index 9800083c9e9fc993749f0a92b725fbf92053f8bb..20a7d0ef4c62e81ac20d8c32bbe715e892930bbc 100644 (file)
@@ -44,13 +44,13 @@ static void bfin_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int ctrl)
 
        if (ctrl & NAND_CTRL_CHANGE) {
                if( ctrl & NAND_CLE )
-                       IO_ADDR_W = CFG_NAND_BASE + BFIN_NAND_CLE;
+                       IO_ADDR_W = CONFIG_SYS_NAND_BASE + BFIN_NAND_CLE;
                else
-                       IO_ADDR_W = CFG_NAND_BASE;
+                       IO_ADDR_W = CONFIG_SYS_NAND_BASE;
                if( ctrl & NAND_ALE )
-                       IO_ADDR_W = CFG_NAND_BASE + BFIN_NAND_ALE;
+                       IO_ADDR_W = CONFIG_SYS_NAND_BASE + BFIN_NAND_ALE;
                else
-                       IO_ADDR_W = CFG_NAND_BASE;
+                       IO_ADDR_W = CONFIG_SYS_NAND_BASE;
                this->IO_ADDR_W = (void __iomem *) IO_ADDR_W;
        }
        this->IO_ADDR_R = this->IO_ADDR_W;
@@ -87,7 +87,7 @@ int bfin_device_ready(struct mtd_info *mtd)
  * Members with a "?" were not set in the merged testing-NAND branch,
  * so they are not set here either.
  */
-void board_nand_init(struct nand_chip *nand)
+int board_nand_init(struct nand_chip *nand)
 {
        *PORT(CONFIG_NAND_GPIO_PORT, _FER) &= ~BFIN_NAND_READY;
        *PORT(CONFIG_NAND_GPIO_PORT, IO_DIR) &= ~BFIN_NAND_READY;
@@ -97,5 +97,7 @@ void board_nand_init(struct nand_chip *nand)
        nand->ecc.mode = NAND_ECC_SOFT;
        nand->dev_ready = bfin_device_ready;
        nand->chip_delay = 30;
+
+       return 0;
 }
 #endif