public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] ppc4xx: NAND configuration
@ 2008-08-26 17:55 Wolfgang Ocker
  2008-08-29  8:22 ` Stefan Roese
  0 siblings, 1 reply; 2+ messages in thread
From: Wolfgang Ocker @ 2008-08-26 17:55 UTC (permalink / raw)
  To: u-boot

Made NAND bank configuration setting a config variable.

Signed-off-by: Wolfgang Ocker <weo@reccoware.de>

---
 cpu/ppc4xx/ndfc.c       |    6 +++++-
 include/configs/cdspr.h |    2 ++
 2 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/cpu/ppc4xx/ndfc.c b/cpu/ppc4xx/ndfc.c
index 72acfd0..a8e8aba 100644
--- a/cpu/ppc4xx/ndfc.c
+++ b/cpu/ppc4xx/ndfc.c
@@ -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)

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-08-29  8:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-26 17:55 [U-Boot] [PATCH] ppc4xx: NAND configuration Wolfgang Ocker
2008-08-29  8:22 ` Stefan Roese

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox