summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPiotr Ziecik <kosmo@semihalf.com>2008-11-17 15:58:00 +0100
committerStefan Roese <sr@denx.de>2008-11-24 11:33:33 +0100
commit25ea652e907516a283b38237e83712a918f125d7 (patch)
tree3df88a882f2ca4a08fe0a3636461d3052f9f6798
parente6a7edbc1778d27431ac663b40a71dafa5d20578 (diff)
downloadu-boot-imx-25ea652e907516a283b38237e83712a918f125d7.zip
u-boot-imx-25ea652e907516a283b38237e83712a918f125d7.tar.gz
u-boot-imx-25ea652e907516a283b38237e83712a918f125d7.tar.bz2
UBI: Add proof-of-concept CFI flash support
With this patch UBI can be used on CFI flash chips. Signed-off-by: Piotr Ziecik <kosmo@semihalf.com> Signed-off-by: Stefan Roese <sr@denx.de>
-rw-r--r--common/cmd_ubi.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/common/cmd_ubi.c b/common/cmd_ubi.c
index 57ce3cc..8446765 100644
--- a/common/cmd_ubi.c
+++ b/common/cmd_ubi.c
@@ -26,6 +26,7 @@
#define DEV_TYPE_NONE 0
#define DEV_TYPE_NAND 1
#define DEV_TYPE_ONENAND 2
+#define DEV_TYPE_NOR 3
/* Private own data */
static struct ubi_device *ubi;
@@ -472,6 +473,13 @@ static int do_ubi(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
ubi_dev.mtd_info = &nand_info[ubi_dev.nr];
}
#endif
+#if defined(CONFIG_FLASH_CFI_MTD)
+ if (strcmp(argv[2], "nor") == 0) {
+ strcpy(ubi_dev.dev_name, "NOR");
+ ubi_dev.type = DEV_TYPE_NOR;
+ ubi_dev.mtd_info = get_mtd_device_nm(CFI_MTD_DEV_NAME);
+ }
+#endif
#if defined(CONFIG_CMD_ONENAND)
if (strcmp(argv[2], "onenand") == 0) {
strcpy(ubi_dev.dev_name, "OneNAND");
@@ -581,7 +589,7 @@ static int do_ubi(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
U_BOOT_CMD(ubi, 6, 1, do_ubi,
"ubi - ubi commands\n",
- "part [nand|onenand] [part]"
+ "part [nand|nor|onenand] [part]"
" - Show or set current partition\n"
"ubi info [l[ayout]]"
" - Display volume and ubi layout information\n"