summaryrefslogtreecommitdiff
path: root/board/atmel/at91cap9adk/nand.c
diff options
context:
space:
mode:
authorStelian Pop <stelian@popies.net>2008-05-08 20:52:14 +0200
committerJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2008-05-10 11:32:06 +0200
commit1c90df3e148ce0a3e2c86c63b38b19d47772f2a0 (patch)
tree0b0351443b181f11cd2e2cac8cffe2fdfb036f8f /board/atmel/at91cap9adk/nand.c
parent11b162bae058e96c7929e358d4adff2bee6c2cc4 (diff)
downloadu-boot-imx-1c90df3e148ce0a3e2c86c63b38b19d47772f2a0.zip
u-boot-imx-1c90df3e148ce0a3e2c86c63b38b19d47772f2a0.tar.gz
u-boot-imx-1c90df3e148ce0a3e2c86c63b38b19d47772f2a0.tar.bz2
AT91CAP9ADK: Handle 8 or 16 bit NAND
The Atmel boards can handle 8 or 16 bit NAND memories. This patch makes the support configurable in the board config header file (CFG_NAND_DBW_8 or CFG_NAND_DBW_16). Signed-off-by: Stelian Pop <stelian@popies.net> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Diffstat (limited to 'board/atmel/at91cap9adk/nand.c')
-rw-r--r--board/atmel/at91cap9adk/nand.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/board/atmel/at91cap9adk/nand.c b/board/atmel/at91cap9adk/nand.c
index 28091a4..0432ef1 100644
--- a/board/atmel/at91cap9adk/nand.c
+++ b/board/atmel/at91cap9adk/nand.c
@@ -63,6 +63,9 @@ static void at91cap9adk_nand_hwcontrol(struct mtd_info *mtd, int cmd)
int board_nand_init(struct nand_chip *nand)
{
nand->eccmode = NAND_ECC_SOFT;
+#ifdef CFG_NAND_DBW_16
+ nand->options = NAND_BUSWIDTH_16;
+#endif
nand->hwcontrol = at91cap9adk_nand_hwcontrol;
nand->chip_delay = 20;