aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2021-12-17 18:08:47 -0500
committerTom Rini <trini@konsulko.com>2021-12-27 16:20:19 -0500
commit968c6210e6bc4c76edeeacc16f02aef2a14dd96f (patch)
treef0efc05e14169f9304b83481fdb6ad50279aabad /cmd
parentb2d1c828b973fc2355e6192610af56a4968261e0 (diff)
downloadu-boot-968c6210e6bc4c76edeeacc16f02aef2a14dd96f.zip
u-boot-968c6210e6bc4c76edeeacc16f02aef2a14dd96f.tar.gz
u-boot-968c6210e6bc4c76edeeacc16f02aef2a14dd96f.tar.bz2
Convert CONFIG_JFFS2_DEV et al to Kconfig
This converts the following to Kconfig: CONFIG_JFFS2_DEV CONFIG_JFFS2_LZO CONFIG_JFFS2_NAND CONFIG_JFFS2_PART_OFFSET CONFIG_JFFS2_PART_SIZE Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/Kconfig21
-rw-r--r--cmd/jffs2.c12
2 files changed, 21 insertions, 12 deletions
diff --git a/cmd/Kconfig b/cmd/Kconfig
index 7747ab5..ef82f79 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -2219,6 +2219,27 @@ config CMD_JFFS2
provide the ability to load files, list directories and obtain
filesystem information.
+config JFFS2_DEV
+ string "Default device for JFFS2"
+ depends on CMD_JFFS2
+ default "nor0"
+ help
+ The default device to use with the jffs2 command.
+
+config JFFS2_PART_OFFSET
+ hex "Default offset within flash to locate the JFFS2 image"
+ depends on CMD_JFFS2
+ default 0x0
+ help
+ The default offset within flash to locate the JFFS2 image.
+
+config JFFS2_PART_SIZE
+ hex "Default size of JFFS2 partition"
+ depends on CMD_JFFS2
+ default 0xFFFFFFFF
+ help
+ The default size of the JFFS2 partition
+
config CMD_MTDPARTS
bool "MTD partition support"
depends on MTD
diff --git a/cmd/jffs2.c b/cmd/jffs2.c
index 63bd552..6f15b57 100644
--- a/cmd/jffs2.c
+++ b/cmd/jffs2.c
@@ -360,11 +360,7 @@ int mtdparts_init(void)
/* id */
id->mtd_id = "single part";
-#if defined(CONFIG_JFFS2_DEV)
dev_name = CONFIG_JFFS2_DEV;
-#else
- dev_name = "nor0";
-#endif
if ((mtd_id_parse(dev_name, NULL, &id->type, &id->num) != 0) ||
(mtd_device_validate(id->type, id->num, &size) != 0)) {
@@ -382,17 +378,9 @@ int mtdparts_init(void)
part->name = "static";
part->auto_name = 0;
-#if defined(CONFIG_JFFS2_PART_SIZE)
part->size = CONFIG_JFFS2_PART_SIZE;
-#else
- part->size = SIZE_REMAINING;
-#endif
-#if defined(CONFIG_JFFS2_PART_OFFSET)
part->offset = CONFIG_JFFS2_PART_OFFSET;
-#else
- part->offset = 0x00000000;
-#endif
part->dev = current_mtd_dev;
INIT_LIST_HEAD(&part->link);