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_jffs2.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_jffs2.c')
-rw-r--r-- | common/cmd_jffs2.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/common/cmd_jffs2.c b/common/cmd_jffs2.c index c4f5a97..3cf00b8 100644 --- a/common/cmd_jffs2.c +++ b/common/cmd_jffs2.c @@ -49,6 +49,8 @@ static int part_num=0; static struct part_info part; +#ifndef CONFIG_JFFS2_NAND + struct part_info* jffs2_part_info(int part_num) { @@ -88,6 +90,33 @@ jffs2_part_info(int part_num) } return 0; } + +#else /* CONFIG_JFFS2_NAND */ + +struct part_info* +jffs2_part_info(int part_num) +{ + if(part_num==0){ + + if(part.usr_priv==(void*)1) + return ∂ + + memset(&part, 0, sizeof(part)); + + part.offset = CONFIG_JFFS2_NAND_OFF; + part.size = CONFIG_JFFS2_NAND_SIZE; /* the bigger size the slower jffs2 */ + +#ifndef CONFIG_JFFS2_NAND_DEV +#define CONFIG_JFFS2_NAND_DEV 0 +#endif + /* nand device with the JFFS2 parition plus 1 */ + part.usr_priv = (void*)(CONFIG_JFFS2_NAND_DEV+1); + return ∂ + } + return 0; +} + +#endif /* CONFIG_JFFS2_NAND */ #endif /* ifndef CFG_JFFS_CUSTOM_PART */ int |