diff options
author | wdenk <wdenk> | 2004-04-18 19:43:36 +0000 |
---|---|---|
committer | wdenk <wdenk> | 2004-04-18 19:43:36 +0000 |
commit | 998eaaecd46ee5f00550e30e606cb5556e0b9345 (patch) | |
tree | 3b9784427a7c1ffd08d8b912d81c78681943b82c /common/cmd_nand.c | |
parent | 6e5923851ec5c11a36136abc77160d834537c4dd (diff) | |
download | u-boot-imx-998eaaecd46ee5f00550e30e606cb5556e0b9345.zip u-boot-imx-998eaaecd46ee5f00550e30e606cb5556e0b9345.tar.gz u-boot-imx-998eaaecd46ee5f00550e30e606cb5556e0b9345.tar.bz2 |
* Configure PPChameleon board to use redundand environment in flash
* Configure PPChameleon board to use JFFS2 NAND support.
* Added support for JFFS2 filesystem (read-only) on top of NAND flash
Diffstat (limited to 'common/cmd_nand.c')
-rw-r--r-- | common/cmd_nand.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/common/cmd_nand.c b/common/cmd_nand.c index c2e67ab..4b693a9 100644 --- a/common/cmd_nand.c +++ b/common/cmd_nand.c @@ -232,7 +232,7 @@ int do_nand (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) &total, (u_char*)addr); printf (" %d bytes %s: %s\n", total, - (cmd & NANDRW_READ) ? "read" : "write", + (cmd & NANDRW_READ) ? "read" : "written", ret ? "ERROR" : "OK"); return ret; @@ -1669,4 +1669,17 @@ static int nand_correct_data (u_char *dat, u_char *read_ecc, u_char *calc_ecc) } #endif + +#ifdef CONFIG_JFFS2_NAND + +int read_jffs2_nand(size_t start, size_t len, + size_t * retlen, u_char * buf, int nanddev) +{ + return nand_rw(nand_dev_desc + nanddev, NANDRW_READ | NANDRW_JFFS2, + start, len, retlen, buf); +} + +#endif /* CONFIG_JFFS2_NAND */ + + #endif /* (CONFIG_COMMANDS & CFG_CMD_NAND) */ |