Skip to contentSkip to conversation

ppc4xx: NAND configuration

PATCH New Wolfgang Ocker 2 participants 2 messages Aug 26, 2008 – Aug 29, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ppc4xx: NAND configuration

Made NAND bank configuration setting a config variable.

---
 cpu/ppc4xx/ndfc.c       |    6 +++++-
 include/configs/cdspr.h |    2 ++
 2 files changed, 7 insertions(+), 1 deletions(-)
cpu/ppc4xx/ndfc.c +5 -1
index 72acfd0..a8e8aba 100644
@@ -149,6 +149,10 @@ static int ndfc_verify_buf(struct mtd_info *mtdinfo, const uint8_t *buf, int len
 }
 #endif /* #ifndef CONFIG_NAND_SPL */
 
+#ifndef CFG_NAND_BCR
+#define CFG_NAND_BCR 0x80002222
+#endif
+
 void board_nand_select_device(struct nand_chip *nand, int chip)
 {
 	/*
@@ -161,7 +165,7 @@ void board_nand_select_device(struct nand_chip *nand, int chip)
 	/* Set NandFlash Core Configuration Register */
 	/* 1 col x 2 rows */
 	out_be32((u32 *)(base + NDFC_CCR), 0x00000000 | (cs << 24));
-	out_be32((u32 *)(base + NDFC_BCFG0 + (cs << 2)), 0x80002222);
+	out_be32((u32 *)(base + NDFC_BCFG0 + (cs << 2)), CFG_NAND_BCR);
 }
 
 int board_nand_init(struct nand_chip *nand)
#1 lore raw

PATCH 1/1 ppc4xx: NAND configuration

Quoted 1 line · Wolfgang Ocker

Made NAND bank configuration setting a config variable.

Applied to u-boot-ppc4xx. Thanks.

Best regards,
Stefan

=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================