summaryrefslogtreecommitdiff
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
parentb2d1c828b973fc2355e6192610af56a4968261e0 (diff)
downloadu-boot-968c6210e6bc4c76edeeacc16f02aef2a14dd96f.tar.gz
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>
-rw-r--r--README3
-rw-r--r--cmd/Kconfig21
-rw-r--r--cmd/jffs2.c12
-rw-r--r--configs/devkit8000_defconfig4
-rw-r--r--configs/ethernut5_defconfig1
-rw-r--r--configs/ids8313_defconfig1
-rw-r--r--configs/nas220_defconfig2
-rw-r--r--configs/pm9263_defconfig3
-rw-r--r--fs/jffs2/Kconfig12
-rw-r--r--include/configs/M5329EVB.h4
-rw-r--r--include/configs/M5373EVB.h4
-rw-r--r--include/configs/devkit8000.h9
-rw-r--r--include/configs/ethernut5.h3
-rw-r--r--include/configs/ids8313.h3
-rw-r--r--include/configs/imx27lite-common.h1
-rw-r--r--include/configs/nas220.h6
-rw-r--r--include/configs/pm9263.h5
-rw-r--r--include/configs/stmark2.h3
-rw-r--r--scripts/config_whitelist.txt4
19 files changed, 44 insertions, 57 deletions
diff --git a/README b/README
index 9935666e4f..edf801e842 100644
--- a/README
+++ b/README
@@ -999,9 +999,6 @@ The following options need to be configured:
sending again an USB request to the device.
- Journaling Flash filesystem support:
- CONFIG_JFFS2_NAND
- Define these for a default partition on a NAND device
-
CONFIG_SYS_JFFS2_FIRST_SECTOR,
CONFIG_SYS_JFFS2_FIRST_BANK, CONFIG_SYS_JFFS2_NUM_BANKS
Define these for a default partition on a NOR device
diff --git a/cmd/Kconfig b/cmd/Kconfig
index 7747ab50a0..ef82f794b5 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 63bd55263a..6f15b57b6a 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);
diff --git a/configs/devkit8000_defconfig b/configs/devkit8000_defconfig
index 4017eb69ad..4034f9ca75 100644
--- a/configs/devkit8000_defconfig
+++ b/configs/devkit8000_defconfig
@@ -27,6 +27,9 @@ CONFIG_CMD_NAND_LOCK_UNLOCK=y
CONFIG_BOOTP_DNS2=y
CONFIG_BOOTP_NTPSERVER=y
CONFIG_CMD_JFFS2=y
+CONFIG_JFFS2_DEV="nand0"
+CONFIG_JFFS2_PART_OFFSET=0x680000
+CONFIG_JFFS2_PART_SIZE=0xF980000
CONFIG_CMD_MTDPARTS=y
CONFIG_MTDIDS_DEFAULT="nand0=nand"
CONFIG_MTDPARTS_DEFAULT="mtdparts=nand:512k(x-loader),1920k(u-boot),128k(u-boot-env),4m(kernel),-(fs)"
@@ -50,4 +53,5 @@ CONFIG_SYS_NAND_BUSWIDTH_16BIT=y
CONFIG_SYS_NAND_U_BOOT_LOCATIONS=y
CONFIG_SYS_NAND_U_BOOT_OFFS=0x80000
CONFIG_CONS_INDEX=3
+CONFIG_JFFS2_NAND=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/ethernut5_defconfig b/configs/ethernut5_defconfig
index e7ebfef386..1821b23ed5 100644
--- a/configs/ethernut5_defconfig
+++ b/configs/ethernut5_defconfig
@@ -81,3 +81,4 @@ CONFIG_ATMEL_USART=y
CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_USB=y
+CONFIG_JFFS2_NAND=y
diff --git a/configs/ids8313_defconfig b/configs/ids8313_defconfig
index 4ee97ae555..246cc3d045 100644
--- a/configs/ids8313_defconfig
+++ b/configs/ids8313_defconfig
@@ -199,4 +199,5 @@ CONFIG_TSEC_ENET=y
CONFIG_RTC_PCF8563=y
CONFIG_SYS_NS16550=y
CONFIG_WATCHDOG=y
+CONFIG_JFFS2_NAND=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/nas220_defconfig b/configs/nas220_defconfig
index 259eb2fa32..7e4e19a9f7 100644
--- a/configs/nas220_defconfig
+++ b/configs/nas220_defconfig
@@ -54,3 +54,5 @@ CONFIG_SYS_NS16550=y
CONFIG_USB=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_STORAGE=y
+CONFIG_JFFS2_LZO=y
+CONFIG_JFFS2_NAND=y
diff --git a/configs/pm9263_defconfig b/configs/pm9263_defconfig
index c755aaaae9..e8a5b4df9b 100644
--- a/configs/pm9263_defconfig
+++ b/configs/pm9263_defconfig
@@ -31,6 +31,8 @@ CONFIG_CMD_DHCP=y
CONFIG_CMD_PING=y
CONFIG_CMD_CACHE=y
CONFIG_CMD_JFFS2=y
+CONFIG_JFFS2_DEV="nand0"
+CONFIG_JFFS2_PART_SIZE=0x10000000
CONFIG_MTDIDS_DEFAULT="nor0=physmap-flash.0,nand0=nand"
CONFIG_MTDPARTS_DEFAULT="mtdparts=physmap-flash.0:256k(u-boot)ro,64k(u-boot-env)ro,1408k(kernel),-(rootfs);nand:-(nand)"
CONFIG_OF_CONTROL=y
@@ -63,3 +65,4 @@ CONFIG_USB=y
CONFIG_DM_VIDEO=y
# CONFIG_VIDEO_BPP32 is not set
CONFIG_LCD=y
+CONFIG_JFFS2_NAND=y
diff --git a/fs/jffs2/Kconfig b/fs/jffs2/Kconfig
index 1b9ecdd8cc..0e79c34090 100644
--- a/fs/jffs2/Kconfig
+++ b/fs/jffs2/Kconfig
@@ -5,3 +5,15 @@ config FS_JFFS2
Flash File System version 2). JFFS2 is a log-structured file system
for use with flash memory devices. It supports raw NAND devices,
hard links and compression.
+
+config JFFS2_LZO
+ bool "Enable LZO compression in JFFS2"
+ depends on FS_JFFS2
+ help
+ Enable LZO compression in the JFFS2 filesystem
+
+config JFFS2_NAND
+ bool "Enable JFFS2 support for NAND flash"
+ depends on FS_JFFS2
+ help
+ Enable support for NAND flash as the backing store for JFFS2.
diff --git a/include/configs/M5329EVB.h b/include/configs/M5329EVB.h
index 16343b5d38..f96f54ef65 100644
--- a/include/configs/M5329EVB.h
+++ b/include/configs/M5329EVB.h
@@ -135,10 +135,6 @@
# define CONFIG_SYS_NAND_SIZE 1
# define CONFIG_SYS_NAND_BASE_LIST { CONFIG_SYS_NAND_BASE }
# define NAND_ALLOW_ERASE_ALL 1
-# define CONFIG_JFFS2_NAND 1
-# define CONFIG_JFFS2_DEV "nand0"
-# define CONFIG_JFFS2_PART_SIZE (CONFIG_SYS_CS2_MASK & ~1)
-# define CONFIG_JFFS2_PART_OFFSET 0x00000000
#endif
#define CONFIG_SYS_FLASH_BASE CONFIG_SYS_CS0_BASE
diff --git a/include/configs/M5373EVB.h b/include/configs/M5373EVB.h
index ccc59ebed2..b7906013e0 100644
--- a/include/configs/M5373EVB.h
+++ b/include/configs/M5373EVB.h
@@ -137,10 +137,6 @@
# define CONFIG_SYS_NAND_SIZE 1
# define CONFIG_SYS_NAND_BASE_LIST { CONFIG_SYS_NAND_BASE }
# define NAND_ALLOW_ERASE_ALL 1
-# define CONFIG_JFFS2_NAND 1
-# define CONFIG_JFFS2_DEV "nand0"
-# define CONFIG_JFFS2_PART_SIZE (CONFIG_SYS_CS2_MASK & ~1)
-# define CONFIG_JFFS2_PART_OFFSET 0x00000000
#endif
#define CONFIG_SYS_FLASH_BASE CONFIG_SYS_CS0_BASE
diff --git a/include/configs/devkit8000.h b/include/configs/devkit8000.h
index d813d924a6..9282f83728 100644
--- a/include/configs/devkit8000.h
+++ b/include/configs/devkit8000.h
@@ -46,15 +46,6 @@
/* TWL4030 */
-/* Board NAND Info */
-#define CONFIG_JFFS2_NAND
-/* nand device jffs2 lives on */
-#define CONFIG_JFFS2_DEV "nand0"
-/* start of jffs2 partition */
-#define CONFIG_JFFS2_PART_OFFSET 0x680000
-#define CONFIG_JFFS2_PART_SIZE 0xf980000 /* size of jffs2 */
- /* partition */
-
/* BOOTP/DHCP options */
#define CONFIG_BOOTP_NISDOMAIN
#define CONFIG_BOOTP_BOOTFILESIZE
diff --git a/include/configs/ethernut5.h b/include/configs/ethernut5.h
index 75409a4ecc..ccf615efa3 100644
--- a/include/configs/ethernut5.h
+++ b/include/configs/ethernut5.h
@@ -54,9 +54,6 @@
#endif
/* JFFS2 */
-#ifdef CONFIG_CMD_JFFS2
-#define CONFIG_JFFS2_NAND
-#endif
/* Ethernet */
#define CONFIG_NET_RETRY_COUNT 20
diff --git a/include/configs/ids8313.h b/include/configs/ids8313.h
index c88c72dfdd..206a57a653 100644
--- a/include/configs/ids8313.h
+++ b/include/configs/ids8313.h
@@ -233,9 +233,6 @@
#define CONFIG_TIMESTAMP
#undef CONFIG_SYS_LOADS_BAUD_CHANGE
-#define CONFIG_JFFS2_NAND
-#define CONFIG_JFFS2_DEV "0"
-
/* mtdparts command line support */
#define CONFIG_EXTRA_ENV_SETTINGS \
diff --git a/include/configs/imx27lite-common.h b/include/configs/imx27lite-common.h
index c289d694e9..dffe175f50 100644
--- a/include/configs/imx27lite-common.h
+++ b/include/configs/imx27lite-common.h
@@ -103,7 +103,6 @@
#define CONFIG_MXC_NAND_REGS_BASE 0xd8000000
#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BASE 0xd8000000
-#define CONFIG_JFFS2_NAND
#define CONFIG_MXC_NAND_HWECC
/*
diff --git a/include/configs/nas220.h b/include/configs/nas220.h
index a4347ae1aa..815f81f649 100644
--- a/include/configs/nas220.h
+++ b/include/configs/nas220.h
@@ -54,12 +54,6 @@
#endif /* CONFIG_CMD_NET */
/*
- * File system
- */
-#define CONFIG_JFFS2_NAND
-#define CONFIG_JFFS2_LZO
-
-/*
* EFI partition
*/
diff --git a/include/configs/pm9263.h b/include/configs/pm9263.h
index d4f7870298..e9eb736ecb 100644
--- a/include/configs/pm9263.h
+++ b/include/configs/pm9263.h
@@ -179,11 +179,6 @@
#endif
-#define CONFIG_JFFS2_NAND 1
-#define CONFIG_JFFS2_DEV "nand0" /* NAND device jffs2 lives on */
-#define CONFIG_JFFS2_PART_OFFSET 0 /* start of jffs2 partition */
-#define CONFIG_JFFS2_PART_SIZE (256 * 1024 * 1024) /* partition size*/
-
/* PSRAM */
#define PHYS_PSRAM 0x70000000
#define PHYS_PSRAM_SIZE 0x00400000 /* 4MB */
diff --git a/include/configs/stmark2.h b/include/configs/stmark2.h
index 1a5cf6b781..18a57f2231 100644
--- a/include/configs/stmark2.h
+++ b/include/configs/stmark2.h
@@ -41,9 +41,6 @@
#define CONFIG_RTC_MCFRRTC
#define CONFIG_SYS_MCFRRTC_BASE 0xFC0A8000
-/* spi not partitions */
-#define CONFIG_JFFS2_DEV "nor0"
-
/* Timer */
#define CONFIG_MCFTMR
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index 9f1a9165a0..38e2c1f178 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -461,10 +461,6 @@ CONFIG_IRAM_SIZE
CONFIG_IRAM_STACK
CONFIG_IRAM_TOP
CONFIG_IRDA_BASE
-CONFIG_JFFS2_DEV
-CONFIG_JFFS2_LZO
-CONFIG_JFFS2_NAND
-CONFIG_JFFS2_PART_OFFSET
CONFIG_JFFS2_PART_SIZE
CONFIG_JRSTARTR_JR0
CONFIG_KEEP_SERVERADDR