diff options
author | David Ungar <david.ungar@timesys.com> | 2010-10-11 14:22:33 -0400 |
---|---|---|
committer | David Ungar <david.ungar@timesys.com> | 2010-10-11 14:22:33 -0400 |
commit | c455ad7d7ceff60f0850697dc1949218972db3c8 (patch) | |
tree | be7b0391c166c296c231f5000ad3156960f178af /cpu | |
parent | b52e80bcc86390b6d2f09cec70a1a4bc5e970cb9 (diff) |
yaffs support
Diffstat (limited to 'cpu')
-rw-r--r-- | cpu/arm_cortexa8/omap3/board.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/cpu/arm_cortexa8/omap3/board.c b/cpu/arm_cortexa8/omap3/board.c index 59336d7a0d..1c29e2143e 100644 --- a/cpu/arm_cortexa8/omap3/board.c +++ b/cpu/arm_cortexa8/omap3/board.c @@ -36,6 +36,7 @@ #include <asm/io.h> #include <asm/arch/sys_proto.h> #include <asm/arch/mem.h> +#include <nand.h> #include <asm/cache.h> extern omap3_sysinfo sysinfo; @@ -317,6 +318,25 @@ void abort(void) *****************************************************************************/ static int do_switch_ecc(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) { + struct mtd_info *mtd; + struct nand_chip *nand; + + /* the following commands operate on the current device */ + if (nand_curr_device < 0 || nand_curr_device >= CONFIG_SYS_MAX_NAND_DEVICE || + !nand_info[nand_curr_device].name) { + puts("\nno devices available\n"); + return 1; + } + mtd = &nand_info[nand_curr_device]; + nand = mtd->priv; + + if (argc == 1) { + if (nand->ecc.mode == NAND_ECC_SOFT) + printf("Software ECC\n"); + else + printf("Hardware ECC\n"); + return 0; + } if (argc != 2) goto usage; if (strncmp(argv[1], "hw", 2) == 0) |