]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
Convert CONFIG_JFFS2_DEV et al to Kconfig
authorTom Rini <trini@konsulko.com>
Fri, 17 Dec 2021 23:08:47 +0000 (18:08 -0500)
committerTom Rini <trini@konsulko.com>
Mon, 27 Dec 2021 21:20:19 +0000 (16:20 -0500)
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>
19 files changed:
README
cmd/Kconfig
cmd/jffs2.c
configs/devkit8000_defconfig
configs/ethernut5_defconfig
configs/ids8313_defconfig
configs/nas220_defconfig
configs/pm9263_defconfig
fs/jffs2/Kconfig
include/configs/M5329EVB.h
include/configs/M5373EVB.h
include/configs/devkit8000.h
include/configs/ethernut5.h
include/configs/ids8313.h
include/configs/imx27lite-common.h
include/configs/nas220.h
include/configs/pm9263.h
include/configs/stmark2.h
scripts/config_whitelist.txt

diff --git a/README b/README
index 9935666e4fce2f40145045ea283329b0f2816e5f..edf801e8428b7fd903b293c3e03b7e1c9ae22fec 100644 (file)
--- 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
index 7747ab50a0425173e6218e7043d4ca46e7a58b42..ef82f794b55729c239214d510452f6edf013cd36 100644 (file)
@@ -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
index 63bd55263a29611037bf75395bc5622d0a2e2d9b..6f15b57b6a18eb0132877271cfb3b70e0dc4d0d3 100644 (file)
@@ -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);
index 4017eb69add8966093bfc636009ed99c7e28ca44..4034f9ca751244eeae1089ae7922e0a012f49bbd 100644 (file)
@@ -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
index e7ebfef38619c4030a2d5f40687692c15c35e43b..1821b23ed5f2f5cb8de05371688d059b52f84139 100644 (file)
@@ -81,3 +81,4 @@ CONFIG_ATMEL_USART=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
 CONFIG_USB=y
+CONFIG_JFFS2_NAND=y
index 4ee97ae555570695bacb2d0018badb963ee00ca9..246cc3d045f894c4878b5374ec6d7bce4e6baab7 100644 (file)
@@ -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
index 259eb2fa32ce1601e4fdaa588beec6a460d2ee13..7e4e19a9f7885d34667dec6075744fa4113532f6 100644 (file)
@@ -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
index c755aaaae9733938e2bd9f54419d02b0922f5a8f..e8a5b4df9bdf368b6aa41c4ba3b29da1f572b56e 100644 (file)
@@ -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
index 1b9ecdd8cca3491891d21ff5311b2d777547c8c8..0e79c340906258d6ceb042c19f08b98c278e1b77 100644 (file)
@@ -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.
index 16343b5d3864fc2793e4bdb765e8c11b532b0d68..f96f54ef65bcc9c9592416386be3887f1d472ce7 100644 (file)
 #      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
index ccc59ebed253ace05c13dd511a95664cb5cb4096..b7906013e09eee36878e8717ee57f1f08ee65b8b 100644 (file)
 #      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
index d813d924a689b6f9409b1e69b1d62036ae844746..9282f83728509bbdb56114c82afbf7499ad4c7d6 100644 (file)
 
 /* 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
index 75409a4eccacdce92804fc25d94322232f9c570d..ccf615efa3df423c6a3d7631da15fae4aac98166 100644 (file)
@@ -54,9 +54,6 @@
 #endif
 
 /* JFFS2 */
-#ifdef CONFIG_CMD_JFFS2
-#define CONFIG_JFFS2_NAND
-#endif
 
 /* Ethernet */
 #define CONFIG_NET_RETRY_COUNT         20
index c88c72dfddabf7bf13b0d2a3ebe2e9bbf5648bab..206a57a653254d9201c8be259eedb95058ff9d94 100644 (file)
 #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 \
index c289d694e9b33f3a1549aeed762b7a877f6d1484..dffe175f50af5ead0b19901a54ba3b936fdfb247 100644 (file)
 #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
 
 /*
index a4347ae1aa152d8c96f742718c2546edae76e70d..815f81f6493d9a4cc38f918cec5b86de46cfcde1 100644 (file)
 #define CONFIG_PHY_BASE_ADR 8
 #endif /* CONFIG_CMD_NET */
 
-/*
- * File system
- */
-#define CONFIG_JFFS2_NAND
-#define CONFIG_JFFS2_LZO
-
 /*
  * EFI partition
  */
index d4f787029810cb2e08d75b6ad662768f3549bef2..e9eb736ecb1a055edefb390a9f7758254bef5dd2 100644 (file)
 
 #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 */
index 1a5cf6b781102ca05083bdc3cf2e6a7ea3e627ce..18a57f2231b68470709033f88236ac3832622441 100644 (file)
@@ -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
 
index 9f1a9165a043c45cb7e7c870d0ba1a79f64b2a68..38e2c1f1780d7b9f5a098eb15aed2a8961db0c3c 100644 (file)
@@ -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