summaryrefslogtreecommitdiff
path: root/board/at91sam9260ek/nand.c
diff options
context:
space:
mode:
authorJustin Waters <justin@justin-linux.(none)>2008-01-21 16:38:46 -0500
committerJustin Waters <justin@justin-linux.(none)>2008-01-22 11:25:35 -0500
commit405bb978ee2321b6cf5381a012c812bdc7679e40 (patch)
treefcab2b9817cbadafc512f39972468ea9ccecc8d5 /board/at91sam9260ek/nand.c
parent3c7ac4df9c9718e0bf11705a1a4d0e4b9dae700f (diff)
Fix various configuration problems with Atmel patch
The CMD API has changed significantly since the patches were originally written. This fixes these problems and cleans up the code a little. Signed-off-by: Justin Waters <justin.waters@timesys.com>
Diffstat (limited to 'board/at91sam9260ek/nand.c')
-rw-r--r--board/at91sam9260ek/nand.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/board/at91sam9260ek/nand.c b/board/at91sam9260ek/nand.c
index 2a339a9ed7..0d9bdde153 100644
--- a/board/at91sam9260ek/nand.c
+++ b/board/at91sam9260ek/nand.c
@@ -23,7 +23,7 @@
#include <common.h>
#include <asm/arch/hardware.h>
-#if (CONFIG_COMMANDS & CFG_CMD_NAND)
+#ifdef CONFIG_CMD_NAND
#include <nand.h>
@@ -95,7 +95,7 @@ static int at91sam9260ek_nand_ready(struct mtd_info *mtd)
return (*AT91C_PIOC_PDSR & AT91C_PIO_PC13);
}
-void board_nand_init(struct nand_chip *nand)
+int board_nand_init(struct nand_chip *nand)
{
nand->eccmode = NAND_ECC_SOFT;
nand->hwcontrol = at91sam9260ek_nand_hwcontrol;
@@ -103,5 +103,7 @@ void board_nand_init(struct nand_chip *nand)
nand->chip_delay = 18;
at91sam9260ek_nand_init(nand);
+
+ return 0;
}
-#endif
+#endif /* CONFIG_CMD_NAND */