summaryrefslogtreecommitdiffstats
path: root/board/sixnet/sixnet.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/sixnet/sixnet.c')
-rw-r--r--board/sixnet/sixnet.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/board/sixnet/sixnet.c b/board/sixnet/sixnet.c
index 1570c46823..ec1cb8b00f 100644
--- a/board/sixnet/sixnet.c
+++ b/board/sixnet/sixnet.c
@@ -32,6 +32,11 @@
# include <status_led.h>
#endif
+#if (CONFIG_COMMANDS & CFG_CMD_NAND)
+#include <linux/mtd/nand.h>
+extern struct nand_chip nand_dev_desc[CFG_MAX_NAND_DEVICE];
+#endif
+
#define ORMASK(size) ((-size) & OR_AM_MSK)
static long ram_size(ulong *, long);
@@ -321,6 +326,17 @@ int misc_init_r (void)
return (0);
}
+#if (CONFIG_COMMANDS & CFG_CMD_NAND)
+void nand_init(void)
+{
+ nand_probe(CFG_DFLASH_BASE); /* see if any NAND flash present */
+ if (nand_dev_desc[0].ChipID != NAND_ChipID_UNKNOWN) {
+ puts("NAND: ");
+ print_size(nand_dev_desc[0].totlen, "\n");
+ }
+}
+#endif
+
/* ------------------------------------------------------------------------- */
/*