Skip to contentSkip to conversation

Separate mtdparts command from jffs2

PATCH Superseded Stefan Roese 2 participants 4 messages Mar 19, 2009

Subsystems (2)

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 Separate mtdparts command from jffs2

Currently the mtdparts commands are included in the jffs2 command support. This doesn't make sense anymore since other commands (e.g. UBI) use this infrastructure as well now. This patch separates the mtdparts commands from the jffs2 commands making it possible to only select mtdparts when no JFFS2 support is needed.

---
v2:
This patch is based in the original version by Kyungmin Park with some additional changes by Jean-Christophe Plagniol-Villard. Changes are the patch description and removal of the compilation errors/warnings.

 README                                 |    1 +
 board/fads/fads.h                      |    4 +-
 common/Makefile                        |    1 +
 common/cmd_flash.c                     |   12 +-
 common/cmd_jffs2.c                     | 1725 +-------------------------------
 common/{cmd_jffs2.c => cmd_mtdparts.c} |  378 +-------
 common/cmd_nand.c                      |   10 +-
 include/config_cmd_all.h               |    1 +
 include/configs/ADNPESC1.h             |    4 +-
 include/configs/Alaska8220.h           |    4 +-
 include/configs/BAB7xx.h               |    4 +-
 include/configs/BC3450.h               |    2 +-
 include/configs/CATcenter.h            |    4 +-
 include/configs/DB64360.h              |    4 +-
 include/configs/DB64460.h              |    4 +-
 include/configs/DK1C20.h               |    4 +-
 include/configs/DK1S10.h               |    4 +-
 include/configs/ELPPC.h                |    4 +-
 include/configs/FPS850L.h              |    2 +-
 include/configs/FPS860L.h              |    2 +-
 include/configs/LANTEC.h               |    4 +-
 include/configs/MHPC.h                 |    4 +-
 include/configs/MIP405.h               |    4 +-
 include/configs/ML2.h                  |    4 +-
 include/configs/MPC8266ADS.h           |    4 +-
 include/configs/NC650.h                |    4 +-
 include/configs/NETTA.h                |    4 +-
 include/configs/PPChameleonEVB.h       |    4 +-
 include/configs/R360MPI.h              |    4 +-
 include/configs/RBC823.h               |    4 +-
 include/configs/Rattler.h              |    4 +-
 include/configs/SIMPC8313.h            |    2 +-
 include/configs/SXNI855T.h             |    4 +-
 include/configs/TB5200.h               |    2 +-
 include/configs/TQM5200.h              |    2 +-
 include/configs/TQM823L.h              |    2 +-
 include/configs/TQM823M.h              |    2 +-
 include/configs/TQM834x.h              |    2 +-
 include/configs/TQM850L.h              |    2 +-
 include/configs/TQM850M.h              |    2 +-
 include/configs/TQM855L.h              |    2 +-
 include/configs/TQM855M.h              |    2 +-
 include/configs/TQM85xx.h              |    4 +-
 include/configs/TQM860L.h              |    2 +-
 include/configs/TQM860M.h              |    2 +-
 include/configs/TQM862L.h              |    2 +-
 include/configs/TQM862M.h              |    2 +-
 include/configs/TQM866M.h              |    2 +-
 include/configs/ZUMA.h                 |    4 +-
 include/configs/apollon.h              |    2 +-
 include/configs/cm5200.h               |    2 +-
 include/configs/debris.h               |    4 +-
 include/configs/ep7312.h               |    4 +-
 include/configs/ep8260.h               |    4 +-
 include/configs/fx12mm.h               |    2 +-
 include/configs/hymod.h                |    4 +-
 include/configs/idmr.h                 |    2 +-
 include/configs/impa7.h                |    4 +-
 include/configs/imx31_litekit.h        |    2 +-
 include/configs/imx31_phycore.h        |    2 +-
 include/configs/incaip.h               |    4 +-
 include/configs/innokom.h              |    4 +-
 include/configs/microblaze-generic.h   |    2 +-
 include/configs/modnet50.h             |    4 +-
 include/configs/motionpro.h            |    2 +-
 include/configs/mx1fs2.h               |    4 +-
 include/configs/mx31ads.h              |    2 +-
 include/configs/netstar.h              |    2 +-
 include/configs/omap2420h4.h           |    4 +-
 include/configs/qong.h                 |    2 +-
 include/configs/sc3.h                  |    2 +-
 include/configs/sc520_cdp.h            |    4 +-
 include/configs/sc520_spunk.h          |    4 +-
 include/configs/smmaco4.h              |    2 +-
 include/configs/trab.h                 |    2 +-
 include/configs/v37.h                  |    4 +-
 include/configs/vct.h                  |    2 +-
 include/configs/virtlab2.h             |    2 +-
 include/configs/voiceblue.h            |    2 +-
 include/configs/xilinx-ppc.h           |    4 +-
 include/configs/xsengine.h             |    4 +-
 81 files changed, 131 insertions(+), 2223 deletions(-)
 copy common/{cmd_jffs2.c => cmd_mtdparts.c} (84%)
README +1 -0
index 43fb1c0..c59652d 100644
@@ -633,6 +633,7 @@ The following options need to be configured:
 		CONFIG_CMD_MII		* MII utility commands
 		CONFIG_CMD_NAND		* NAND support
 		CONFIG_CMD_NET		  bootp, tftpboot, rarpboot
+		CONFIG_CMD_MTDPARTS	* MTD partition support
 		CONFIG_CMD_PCA953X	* PCA953x I2C gpio commands
 		CONFIG_CMD_PCA953X_INFO	* PCA953x I2C gpio info command
 		CONFIG_CMD_PCI		* pciinfo
board/fads/fads.h +2 -2
index 24e43ea..4ab4b26 100644
@@ -241,7 +241,7 @@
  *
  */
 /* No command line, one static partition, whole device */
-#undef CONFIG_JFFS2_CMDLINE
+#undef CONFIG_CMD_MTDPARTS
 #define CONFIG_JFFS2_DEV		"nor0"
 #define CONFIG_JFFS2_PART_SIZE		0xFFFFFFFF
 #define CONFIG_JFFS2_PART_OFFSET	0x00000000
@@ -249,7 +249,7 @@
 /* mtdparts command line support */
 /* Note: fake mtd_id used, no linux mtd map file */
 /*
-#define CONFIG_JFFS2_CMDLINE
+#define CONFIG_CMD_MTDPARTS
 #define MTDIDS_DEFAULT		"nor0=fads0,nor1=fads-1,nor2=fads-2,nor3=fads-3"
 #define MTDPARTS_DEFAULT	"mtdparts=fads-0:- at 1m(user1),fads-1:-(user2),fads-2:-(user3),fads-3:-(user4)"
 */
common/Makefile +1 -0
index f13cd11..6a8a541 100644
@@ -98,6 +98,7 @@ COBJS-$(CONFIG_CMD_IMMAP) += cmd_immap.o
 COBJS-$(CONFIG_CMD_IRQ) += cmd_irq.o
 COBJS-$(CONFIG_CMD_ITEST) += cmd_itest.o
 COBJS-$(CONFIG_CMD_JFFS2) += cmd_jffs2.o
+COBJS-$(CONFIG_CMD_MTDPARTS) += cmd_mtdparts.o
 COBJS-$(CONFIG_CMD_LICENSE) += cmd_license.o
 COBJS-y += cmd_load.o
 COBJS-$(CONFIG_LOGBUFFER) += cmd_log.o
common/cmd_flash.c +6 -6
index 510654e..7c2668c 100644
@@ -31,7 +31,7 @@
 #include <dataflash.h>
 #endif
 
-#if defined(CONFIG_CMD_JFFS2) && defined(CONFIG_JFFS2_CMDLINE)
+#if defined(CONFIG_CMD_JFFS2) && defined(CONFIG_CMD_MTDPARTS)
 #include <jffs2/jffs2.h>
 
 /* parition handling routines */
@@ -325,7 +325,7 @@ int do_flerase (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 	flash_info_t *info;
 	ulong bank, addr_first, addr_last;
 	int n, sect_first, sect_last;
-#if defined(CONFIG_CMD_JFFS2) && defined(CONFIG_JFFS2_CMDLINE)
+#if defined(CONFIG_CMD_JFFS2) && defined(CONFIG_CMD_MTDPARTS)
 	struct mtd_device *dev;
 	struct part_info *part;
 	u8 dev_type, dev_num, pnum;
@@ -357,7 +357,7 @@ int do_flerase (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 		return rcode;
 	}
 
-#if defined(CONFIG_CMD_JFFS2) && defined(CONFIG_JFFS2_CMDLINE)
+#if defined(CONFIG_CMD_JFFS2) && defined(CONFIG_CMD_MTDPARTS)
 	/* erase <part-id> - erase partition */
 	if ((argc == 2) && (id_parse(argv[1], NULL, &dev_type, &dev_num) == 0)) {
 		mtdparts_init();
@@ -470,7 +470,7 @@ int do_protect (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 #endif /* CONFIG_SYS_NO_FLASH */
 	ulong addr_first, addr_last;
 	int p;
-#if defined(CONFIG_CMD_JFFS2) && defined(CONFIG_JFFS2_CMDLINE)
+#if defined(CONFIG_CMD_JFFS2) && defined(CONFIG_CMD_MTDPARTS)
 	struct mtd_device *dev;
 	struct part_info *part;
 	u8 dev_type, dev_num, pnum;
@@ -563,7 +563,7 @@ int do_protect (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 		return rcode;
 	}
 
-#if defined(CONFIG_CMD_JFFS2) && defined(CONFIG_JFFS2_CMDLINE)
+#if defined(CONFIG_CMD_JFFS2) && defined(CONFIG_CMD_MTDPARTS)
 	/* protect on/off <part-id> */
 	if ((argc == 3) && (id_parse(argv[2], NULL, &dev_type, &dev_num) == 0)) {
 		mtdparts_init();
@@ -698,7 +698,7 @@ int flash_sect_protect (int p, ulong addr_first, ulong addr_last)
 
 
 /**************************************************/
-#if defined(CONFIG_CMD_JFFS2) && defined(CONFIG_JFFS2_CMDLINE)
+#if defined(CONFIG_CMD_JFFS2) && defined(CONFIG_CMD_MTDPARTS)
 # define TMP_ERASE	"erase <part-id>\n    - erase partition\n"
 # define TMP_PROT_ON	"protect on <part-id>\n    - protect partition\n"
 # define TMP_PROT_OFF	"protect off <part-id>\n    - make partition writable\n"
common/cmd_jffs2.c +3 -1722

1,771 lines not on this page · raw message

common/cmd_mtdparts.c renamed from common/cmd_jffs2.c +1 -377

454 lines not on this page · raw message

common/cmd_nand.c +5 -5
index 11f9096..92cc940 100644
@@ -29,7 +29,7 @@
 #include <jffs2/jffs2.h>
 #include <nand.h>
 
-#if defined(CONFIG_CMD_JFFS2) && defined(CONFIG_JFFS2_CMDLINE)
+#if defined(CONFIG_CMD_JFFS2) && defined(CONFIG_CMD_MTDPARTS)
 
 /* parition handling routines */
 int mtdparts_init(void);
@@ -105,7 +105,7 @@ static int
 arg_off_size(int argc, char *argv[], nand_info_t *nand, ulong *off, size_t *size)
 {
 	int idx = nand_curr_device;
-#if defined(CONFIG_CMD_JFFS2) && defined(CONFIG_JFFS2_CMDLINE)
+#if defined(CONFIG_CMD_JFFS2) && defined(CONFIG_CMD_MTDPARTS)
 	struct mtd_device *dev;
 	struct part_info *part;
 	u8 pnum;
@@ -153,7 +153,7 @@ arg_off_size(int argc, char *argv[], nand_info_t *nand, ulong *off, size_t *size
 		*size = nand->size - *off;
 	}
 
-#if  defined(CONFIG_CMD_JFFS2) && defined(CONFIG_JFFS2_CMDLINE)
+#if  defined(CONFIG_CMD_JFFS2) && defined(CONFIG_CMD_MTDPARTS)
 out:
 #endif
 	printf("device %d ", idx);
@@ -590,7 +590,7 @@ int do_nandboot(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
 	char *boot_device = NULL;
 	int idx;
 	ulong addr, offset = 0;
-#if defined(CONFIG_CMD_JFFS2) && defined(CONFIG_JFFS2_CMDLINE)
+#if defined(CONFIG_CMD_JFFS2) && defined(CONFIG_CMD_MTDPARTS)
 	struct mtd_device *dev;
 	struct part_info *part;
 	u8 pnum;
@@ -635,7 +635,7 @@ int do_nandboot(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
 		offset = simple_strtoul(argv[3], NULL, 16);
 		break;
 	default:
-#if defined(CONFIG_CMD_JFFS2) && defined(CONFIG_JFFS2_CMDLINE)
+#if defined(CONFIG_CMD_JFFS2) && defined(CONFIG_CMD_MTDPARTS)
 usage:
 #endif
 		cmd_usage(cmdtp);
include/config_cmd_all.h +1 -0
index 205dd1f..4c6a4b1 100644
@@ -62,6 +62,7 @@
 #define CONFIG_CMD_NET		/* bootp, tftpboot, rarpboot	*/
 #define CONFIG_CMD_NFS		/* NFS support			*/
 #define CONFIG_CMD_ONENAND	/* OneNAND support		*/
+#define CONFIG_CMD_MTDPARTS	/* mtd parts support		*/
 #define CONFIG_CMD_PCI		/* pciinfo			*/
 #define CONFIG_CMD_PCMCIA	/* PCMCIA support		*/
 #define CONFIG_CMD_PING		/* ping support			*/
include/configs/ADNPESC1.h +2 -2
index e61a3e1..0977bee 100644
@@ -673,14 +673,14 @@
  *
  */
 /* No command line, one static partition */
-#undef CONFIG_JFFS2_CMDLINE
+#undef CONFIG_CMD_MTDPARTS
 #define CONFIG_JFFS2_DEV		"nor"
 #define CONFIG_JFFS2_PART_SIZE		0xFFFFFFFF
 #define CONFIG_JFFS2_PART_OFFSET	0x00000000
 
 /* mtdparts command line support */
 /*
-#define CONFIG_JFFS2_CMDLINE
+#define CONFIG_CMD_MTDPARTS
 #define MTDIDS_DEFAULT		""
 #define MTDPARTS_DEFAULT	""
 */
include/configs/Alaska8220.h +2 -2
index 2581fdf..576aa74 100644
@@ -320,7 +320,7 @@
 
 /* No command line, one static partition */
 /*
-#undef CONFIG_JFFS2_CMDLINE
+#undef CONFIG_CMD_MTDPARTS
 #define CONFIG_JFFS2_DEV		"nor0"
 #define CONFIG_JFFS2_PART_SIZE		0x00400000
 #define CONFIG_JFFS2_PART_OFFSET	0x00000000
@@ -328,7 +328,7 @@
 
 /* mtdparts command line support */
 /*
-#define CONFIG_JFFS2_CMDLINE
+#define CONFIG_CMD_MTDPARTS
 #define MTDIDS_DEFAULT		"nor0=alaska-0"
 #define MTDPARTS_DEFAULT	"mtdparts=alaska-0:4m(user)"
 */
include/configs/BAB7xx.h +2 -2
index 1910b34..40a1c40 100644
@@ -219,7 +219,7 @@
  *
  */
 /* No command line, one static partition */
-#undef CONFIG_JFFS2_CMDLINE
+#undef CONFIG_CMD_MTDPARTS
 #define CONFIG_JFFS2_DEV		"nor"
 #define CONFIG_JFFS2_PART_SIZE		0xFFFFFFFF
 #define CONFIG_JFFS2_PART_OFFSET	0x00000000
@@ -229,7 +229,7 @@
  * Note: fake mtd_id used, no linux mtd map file
  */
 /*
-#define CONFIG_JFFS2_CMDLINE
+#define CONFIG_CMD_MTDPARTS
 #define MTDIDS_DEFAULT		"nor0=bab7xx-0"
 #define MTDPARTS_DEFAULT	"mtdparts=bab7xx-0:-(jffs2)"
 */
include/configs/BC3450.h +1 -1
index bced118..9934f29 100644
@@ -346,7 +346,7 @@
 #define CONFIG_SYS_FLASH_WRITE_TOUT	500	/* Flash Write Timeout (in ms)	*/
 
 /* Dynamic MTD partition support */
-#define CONFIG_JFFS2_CMDLINE
+#define CONFIG_CMD_MTDPARTS
 #define MTDIDS_DEFAULT		"nor0=TQM5200-0"
 #define MTDPARTS_DEFAULT	"mtdparts=TQM5200-0:640k(firmware),"	\
 						"1408k(kernel),"	\
include/configs/CATcenter.h +2 -2
index fa9fc23..39f41e6 100644
@@ -781,7 +781,7 @@
  *
  */
 /* No command line, one static partition */
-#undef CONFIG_JFFS2_CMDLINE
+#undef CONFIG_CMD_MTDPARTS
 #define CONFIG_JFFS2_DEV		"nand"
 #define CONFIG_JFFS2_PART_SIZE		0x00200000
 #define CONFIG_JFFS2_PART_OFFSET	0x00000000
@@ -791,7 +791,7 @@
  * Note: fake mtd_id used, no linux mtd map file
  */
 /*
-#define CONFIG_JFFS2_CMDLINE
+#define CONFIG_CMD_MTDPARTS
 #define MTDIDS_DEFAULT		"nand0=catcenter"
 #define MTDPARTS_DEFAULT	"mtdparts=catcenter:2m(nand)"
 */
include/configs/DB64360.h +2 -2
index daed934..160871b 100644
@@ -230,7 +230,7 @@ ip=${ipaddr}:${serverip}${bootargs_end}; bootm 0x400000;\0"
  *
  */
 /* No command line, one static partition, whole device */
-#undef CONFIG_JFFS2_CMDLINE
+#undef CONFIG_CMD_MTDPARTS
 #define CONFIG_JFFS2_DEV		"nor1"
 #define CONFIG_JFFS2_PART_SIZE		0xFFFFFFFF
 #define CONFIG_JFFS2_PART_OFFSET	0x00000000
@@ -242,7 +242,7 @@ ip=${ipaddr}:${serverip}${bootargs_end}; bootm 0x400000;\0"
  * Note: fake mtd_id's used, no linux mtd map file.
  */
 /*
-#define CONFIG_JFFS2_CMDLINE
+#define CONFIG_CMD_MTDPARTS
 #define MTDIDS_DEFAULT		"nor1=db64360-1"
 #define MTDPARTS_DEFAULT	"mtdparts=db64360-1:-(jffs2)"
 */
include/configs/DB64460.h +2 -2
index 604fd45..06fd157 100644
@@ -168,7 +168,7 @@ ip=${ipaddr}:${serverip}${bootargs_end}; bootm 0x400000;\0"
  *
  */
 /* No command line, one static partition, whole device */
-#undef CONFIG_JFFS2_CMDLINE
+#undef CONFIG_CMD_MTDPARTS
 #define CONFIG_JFFS2_DEV		"nor1"
 #define CONFIG_JFFS2_PART_SIZE		0xFFFFFFFF
 #define CONFIG_JFFS2_PART_OFFSET	0x00000000
@@ -180,7 +180,7 @@ ip=${ipaddr}:${serverip}${bootargs_end}; bootm 0x400000;\0"
  * Note: fake mtd_id's used, no linux mtd map file.
  */
 /*
-#define CONFIG_JFFS2_CMDLINE
+#define CONFIG_CMD_MTDPARTS
 #define MTDIDS_DEFAULT		"nor1=db64460-1"
 #define MTDPARTS_DEFAULT	"mtdparts=db64460-1:-(jffs2)"
 */
include/configs/DK1C20.h +2 -2
index 6fdc566..db9c17d 100644
@@ -539,14 +539,14 @@
  *
  */
 /* No command line, one static partition, whole device */
-#undef CONFIG_JFFS2_CMDLINE
+#undef CONFIG_CMD_MTDPARTS
 #define CONFIG_JFFS2_DEV		"nor0"
 #define CONFIG_JFFS2_PART_SIZE		0xFFFFFFFF
 #define CONFIG_JFFS2_PART_OFFSET	0x00000000
 
 /* mtdparts command line support */
 /*
-#define CONFIG_JFFS2_CMDLINE
+#define CONFIG_CMD_MTDPARTS
 #define MTDIDS_DEFAULT		""
 #define MTDPARTS_DEFAULT	""
 */
include/configs/DK1S10.h +2 -2
index 1d031f1..3bd270c 100644
@@ -545,14 +545,14 @@
  *
  */
 /* No command line, one static partition, whole device */
-#undef CONFIG_JFFS2_CMDLINE
+#undef CONFIG_CMD_MTDPARTS
 #define CONFIG_JFFS2_DEV		"nor0"
 #define CONFIG_JFFS2_PART_SIZE		0xFFFFFFFF
 #define CONFIG_JFFS2_PART_OFFSET	0x00000000
 
 /* mtdparts command line support */
 /*
-#define CONFIG_JFFS2_CMDLINE
+#define CONFIG_CMD_MTDPARTS
 #define MTDIDS_DEFAULT		""
 #define MTDPARTS_DEFAULT	""
 */
include/configs/ELPPC.h +2 -2
index 7939266..d2aa8b9 100644
@@ -196,7 +196,7 @@
  *
  */
 /* No command line, one static partition, whole device */
-#undef CONFIG_JFFS2_CMDLINE
+#undef CONFIG_CMD_MTDPARTS
 #define CONFIG_JFFS2_DEV		"nor0"
 #define CONFIG_JFFS2_PART_SIZE		0xFFFFFFFF
 #define CONFIG_JFFS2_PART_OFFSET	0x00000000
@@ -204,7 +204,7 @@
 /* mtdparts command line support */
 /* Note: fake mtd_id used, no linux mtd map file */
 /*
-#define CONFIG_JFFS2_CMDLINE
+#define CONFIG_CMD_MTDPARTS
 #define MTDIDS_DEFAULT		"nor0=elppc-0,nor1=elppc-1"
 #define MTDPARTS_DEFAULT	"mtdparts=elppc-0:-(jffs2),elppc-1:-(user)"
 */
include/configs/FPS850L.h +1 -1
index 08408e2..f152230 100644
@@ -216,7 +216,7 @@
 /*-----------------------------------------------------------------------
  * Dynamic MTD partition support
  */
-#define CONFIG_JFFS2_CMDLINE
+#define CONFIG_CMD_MTDPARTS
 #define MTDIDS_DEFAULT		"nor0=TQM8xxL-0"
 
 #define MTDPARTS_DEFAULT	"mtdparts=TQM8xxL-0:256k(u-boot),"	\
include/configs/FPS860L.h +1 -1
index e5f3b60..5eaed84 100644
@@ -216,7 +216,7 @@
 /*-----------------------------------------------------------------------
  * Dynamic MTD partition support
  */
-#define CONFIG_JFFS2_CMDLINE
+#define CONFIG_CMD_MTDPARTS
 #define MTDIDS_DEFAULT		"nor0=TQM8xxL-0"
 
 #define MTDPARTS_DEFAULT	"mtdparts=TQM8xxL-0:256k(u-boot),"	\
include/configs/LANTEC.h +2 -2
index f14d945..6e8a4b8 100644
@@ -352,14 +352,14 @@
  *
  */
 /* No command line, one static partition, whole device */
-#undef CONFIG_JFFS2_CMDLINE
+#undef CONFIG_CMD_MTDPARTS
 #define CONFIG_JFFS2_DEV		"nor0"
 #define CONFIG_JFFS2_PART_SIZE		0xFFFFFFFF
 #define CONFIG_JFFS2_PART_OFFSET	0x00000000
 
 /* mtdparts command line support */
 /*
-#define CONFIG_JFFS2_CMDLINE
+#define CONFIG_CMD_MTDPARTS
 #define MTDIDS_DEFAULT		""
 #define MTDPARTS_DEFAULT	""
 */
include/configs/MHPC.h +2 -2
index 8e7f9cd..19a288c 100644
@@ -200,7 +200,7 @@
  *
  */
 /* No command line, one static partition, whole device */
-#undef CONFIG_JFFS2_CMDLINE
+#undef CONFIG_CMD_MTDPARTS
 #define CONFIG_JFFS2_DEV		"nor0"
 #define CONFIG_JFFS2_PART_SIZE		0xFFFFFFFF
 #define CONFIG_JFFS2_PART_OFFSET	0x00000000
@@ -208,7 +208,7 @@
 /* mtdparts command line support */
 /* Note: fake mtd_id used, no linux mtd map file */
 /*
-#define CONFIG_JFFS2_CMDLINE
+#define CONFIG_CMD_MTDPARTS
 #define MTDIDS_DEFAULT		"nor0=mhpc-0"
 #define MTDPARTS_DEFAULT	"mtdparts=mhpc-0:-(jffs2)"
 */
include/configs/MIP405.h +2 -2
index c58ce05..a3869c8 100644
@@ -243,7 +243,7 @@
  *
  */
 /* No command line, one static partition, whole device */
-#undef CONFIG_JFFS2_CMDLINE
+#undef CONFIG_CMD_MTDPARTS
 #define CONFIG_JFFS2_DEV		"nor0"
 #define CONFIG_JFFS2_PART_SIZE		0xFFFFFFFF
 #define CONFIG_JFFS2_PART_OFFSET	0x00000000
@@ -251,7 +251,7 @@
 /* mtdparts command line support */
 /* Note: fake mtd_id used, no linux mtd map file */
 /*
-#define CONFIG_JFFS2_CMDLINE
+#define CONFIG_CMD_MTDPARTS
 #define MTDIDS_DEFAULT		"nor0=mip405-0"
 #define MTDPARTS_DEFAULT	"mtdparts=mip405-0:-(jffs2)"
 */
include/configs/ML2.h +2 -2
index 1902397..5fcc173 100644
@@ -249,7 +249,7 @@
  *
  */
 /* No command line, one static partition, whole device */
-#undef CONFIG_JFFS2_CMDLINE
+#undef CONFIG_CMD_MTDPARTS
 #define CONFIG_JFFS2_DEV		"nor0"
 #define CONFIG_JFFS2_PART_SIZE		0xFFFFFFFF
 #define CONFIG_JFFS2_PART_OFFSET	0x00080000
@@ -257,7 +257,7 @@
 /* mtdparts command line support */
 /* Note: fake mtd_id used, no linux mtd map file */
 /*
-#define CONFIG_JFFS2_CMDLINE
+#define CONFIG_CMD_MTDPARTS
 #define MTDIDS_DEFAULT		"nor0=ml2-0"
 #define MTDPARTS_DEFAULT	"mtdparts=ml2-0:- at 512k(jffs2)"
 */
include/configs/MPC8266ADS.h +2 -2
index fe1cc17..4fd86d3 100644
@@ -563,14 +563,14 @@
  *
  */
 /* No command line, one static partition, whole device */
-#undef CONFIG_JFFS2_CMDLINE
+#undef CONFIG_CMD_MTDPARTS
 #define CONFIG_JFFS2_DEV		"nor0"
 #define CONFIG_JFFS2_PART_SIZE		0xFFFFFFFF
 #define CONFIG_JFFS2_PART_OFFSET	0x00000000
 
 /* mtdparts command line support */
 /*
-#define CONFIG_JFFS2_CMDLINE
+#define CONFIG_CMD_MTDPARTS
 #define MTDIDS_DEFAULT		""
 #define MTDPARTS_DEFAULT	""
 */
include/configs/NC650.h +2 -2
index 0b97f0c..6343cfe 100644
@@ -440,13 +440,13 @@
  */
 
 /* No command line, one static partition */
-#undef CONFIG_JFFS2_CMDLINE
+#undef CONFIG_CMD_MTDPARTS
 #define CONFIG_JFFS2_DEV		"nand0"
 #define CONFIG_JFFS2_PART_SIZE		0x00400000
 #define CONFIG_JFFS2_PART_OFFSET	0x00000000
 
 /* mtdparts command line support */
-#define CONFIG_JFFS2_CMDLINE
+#define CONFIG_CMD_MTDPARTS
 #define MTDIDS_DEFAULT		"nor0=nc650-0,nand0=nc650-nand"
 
 #define MTDPARTS_DEFAULT	"mtdparts=nc650-0:1m(kernel1),1m(kernel2)," \
include/configs/NETTA.h +2 -2
index 34fdba5..724e807 100644
@@ -702,7 +702,7 @@
  *
  */
 /* No command line, one static partition, whole device */
-#undef CONFIG_JFFS2_CMDLINE
+#undef CONFIG_CMD_MTDPARTS
 #define CONFIG_JFFS2_DEV		"nand0"
 #define CONFIG_JFFS2_PART_SIZE		0x00100000
 #define CONFIG_JFFS2_PART_OFFSET	0x00200000
@@ -710,7 +710,7 @@
 /* mtdparts command line support */
 /* Note: fake mtd_id used, no linux mtd map file */
 /*
-#define CONFIG_JFFS2_CMDLINE
+#define CONFIG_CMD_MTDPARTS
 #define MTDIDS_DEFAULT		"nand0=netta-nand"
 #define MTDPARTS_DEFAULT	"mtdparts=netta-nand:1m at 2m(jffs2)"
 */
include/configs/PPChameleonEVB.h +2 -2
index d2eae1d..16baf8c 100644
@@ -804,14 +804,14 @@
  */
 
 /* No command line, one static partition */
-#undef CONFIG_JFFS2_CMDLINE
+#undef CONFIG_CMD_MTDPARTS
 #define CONFIG_JFFS2_DEV		"nand0"
 #define CONFIG_JFFS2_PART_SIZE		0x00400000
 #define CONFIG_JFFS2_PART_OFFSET	0x00000000
 
 /* mtdparts command line support */
 /*
-#define CONFIG_JFFS2_CMDLINE
+#define CONFIG_CMD_MTDPARTS
 #define MTDIDS_DEFAULT		"nor0=PPChameleon-0,nand0=ppchameleonevb-nand"
 */
 
include/configs/R360MPI.h +2 -2
index bab4460..830f4bc 100644
@@ -167,14 +167,14 @@
  */
 /* No command line, one static partition
  * use all the space starting at offset 3MB*/
-#undef CONFIG_JFFS2_CMDLINE
+#undef CONFIG_CMD_MTDPARTS
 #define CONFIG_JFFS2_DEV		"nor0"
 #define CONFIG_JFFS2_PART_SIZE		0xFFFFFFFF
 #define CONFIG_JFFS2_PART_OFFSET	0x00300000
 
 /* mtdparts command line support */
 /*
-#define CONFIG_JFFS2_CMDLINE
+#define CONFIG_CMD_MTDPARTS
 #define MTDIDS_DEFAULT		"nor0=r360-0"
 #define MTDPARTS_DEFAULT	"mtdparts=r360-0:- at 3m(user)"
 */
include/configs/RBC823.h +2 -2
index 280175a..f36244d 100644
@@ -429,7 +429,7 @@
  *
  */
 /* No command line, one static partition, whole device */
-#undef CONFIG_JFFS2_CMDLINE
+#undef CONFIG_CMD_MTDPARTS
 #define CONFIG_JFFS2_DEV		"nor0"
 #define CONFIG_JFFS2_PART_SIZE		0xFFFFFFFF
 #define CONFIG_JFFS2_PART_OFFSET	0x00000000
@@ -437,7 +437,7 @@
 /* mtdparts command line support */
 /* Note: fake mtd_id used, no linux mtd map file */
 /*
-#define CONFIG_JFFS2_CMDLINE
+#define CONFIG_CMD_MTDPARTS
 #define MTDIDS_DEFAULT		""
 #define MTDPARTS_DEFAULT	""
 */
include/configs/Rattler.h +2 -2
index 01d0d5f..5b6f271 100644
@@ -202,7 +202,7 @@
  *
  */
 /* No command line, one static partition */
-#undef CONFIG_JFFS2_CMDLINE
+#undef CONFIG_CMD_MTDPARTS
 #define CONFIG_JFFS2_DEV		"nor0"
 #define CONFIG_JFFS2_PART_SIZE		0xFFFFFFFF
 #define CONFIG_JFFS2_PART_OFFSET	0x00100000
@@ -210,7 +210,7 @@
 /* mtdparts command line support */
 /* Note: fake mtd_id used, no linux mtd map file */
 /*
-#define CONFIG_JFFS2_CMDLINE
+#define CONFIG_CMD_MTDPARTS
 #define MTDIDS_DEFAULT		"nor0=rattler-0"
 #define MTDPARTS_DEFAULT	"mtdparts=rattler-0:- at 1m(jffs2)"
 */
include/configs/SIMPC8313.h +1 -1
index b939cfa..e20527e 100644
@@ -189,7 +189,7 @@
 #define CONFIG_JFFS2_DEV	"nand0"
 
 /* mtdparts command line support */
-#define CONFIG_JFFS2_CMDLINE
+#define CONFIG_CMD_MTDPARTS
 #define MTDIDS_DEFAULT		"nand0=nand0"
 #define MTDPARTS_DEFAULT	"mtdparts=nand0:2M(u-boot),6M(kernel),-(jffs2)"
 
include/configs/SXNI855T.h +2 -2
index 9857bf6..cac04b4 100644
@@ -174,7 +174,7 @@
  *
  */
 /* No command line, one static partition */
-#undef CONFIG_JFFS2_CMDLINE
+#undef CONFIG_CMD_MTDPARTS
 
 /*
 #define CONFIG_JFFS2_DEV		"nor0"
@@ -189,7 +189,7 @@
 /* mtdparts command line support */
 /* Note: fake mtd_id used, no linux mtd map file */
 /*
-#define CONFIG_JFFS2_CMDLINE
+#define CONFIG_CMD_MTDPARTS
 #define MTDIDS_DEFAULT		"nor0=sixnet-0,nand0=sixnet-nand"
 #define MTDPARTS_DEFAULT	"mtdparts=sixnet-0:7680k at 512k();sixnet-nand:2m(jffs2-nand)"
 */
include/configs/TB5200.h +1 -1
index b42d3d9..92b4fa5 100644
@@ -275,7 +275,7 @@
 					   (= chip selects) */
 
 /* Dynamic MTD partition support */
-#define CONFIG_JFFS2_CMDLINE
+#define CONFIG_CMD_MTDPARTS
 #define MTDIDS_DEFAULT		"nor0=TQM5200-0"
 #if defined(CONFIG_TQM5200_B)
 #define MTDPARTS_DEFAULT	"mtdparts=TQM5200-0:768k(firmware),"	\
include/configs/TQM5200.h +1 -1
index 6850eba..d374981 100644
@@ -407,7 +407,7 @@
 #endif
 
 /* Dynamic MTD partition support */
-#define CONFIG_JFFS2_CMDLINE
+#define CONFIG_CMD_MTDPARTS
 #define MTDIDS_DEFAULT		"nor0=TQM5200-0"
 
 #ifdef CONFIG_STK52XX
include/configs/TQM823L.h +1 -1
index 8934d51..87e5a65 100644
@@ -231,7 +231,7 @@
 /*-----------------------------------------------------------------------
  * Dynamic MTD partition support
  */
-#define CONFIG_JFFS2_CMDLINE
+#define CONFIG_CMD_MTDPARTS
 #define MTDIDS_DEFAULT		"nor0=TQM8xxL-0"
 
 #define MTDPARTS_DEFAULT	"mtdparts=TQM8xxL-0:256k(u-boot),"	\
include/configs/TQM823M.h +1 -1
index fd41573..f666443 100644
@@ -227,7 +227,7 @@
 /*-----------------------------------------------------------------------
  * Dynamic MTD partition support
  */
-#define CONFIG_JFFS2_CMDLINE
+#define CONFIG_CMD_MTDPARTS
 #define MTDIDS_DEFAULT		"nor0=TQM8xxM-0"
 
 #define MTDPARTS_DEFAULT	"mtdparts=TQM8xxM-0:512k(u-boot),"	\
include/configs/TQM834x.h +1 -1
index e126dc3..b74b404 100644
@@ -537,7 +537,7 @@ extern int tqm834x_num_flash_banks;
  * JFFS2 partitions
  */
 /* mtdparts command line support */
-#define CONFIG_JFFS2_CMDLINE
+#define CONFIG_CMD_MTDPARTS
 #define MTDIDS_DEFAULT		"nor0=TQM834x-0"
 
 /* default mtd partition table */
include/configs/TQM850L.h +1 -1
index 77eb5a9..dc80b47 100644
@@ -216,7 +216,7 @@
 /*-----------------------------------------------------------------------
  * Dynamic MTD partition support
  */
-#define CONFIG_JFFS2_CMDLINE
+#define CONFIG_CMD_MTDPARTS
 #define MTDIDS_DEFAULT		"nor0=TQM8xxL-0"
 
 #define MTDPARTS_DEFAULT	"mtdparts=TQM8xxL-0:256k(u-boot),"	\
include/configs/TQM850M.h +1 -1
index bb8825b..2289443 100644
@@ -216,7 +216,7 @@
 /*-----------------------------------------------------------------------
  * Dynamic MTD partition support
  */
-#define CONFIG_JFFS2_CMDLINE
+#define CONFIG_CMD_MTDPARTS
 #define MTDIDS_DEFAULT		"nor0=TQM8xxM-0"
 
 #define MTDPARTS_DEFAULT	"mtdparts=TQM8xxM-0:512k(u-boot),"	\
include/configs/TQM855L.h +1 -1
index 2ccbaf8..999bdaa 100644
@@ -221,7 +221,7 @@
 /*-----------------------------------------------------------------------
  * Dynamic MTD partition support
  */
-#define CONFIG_JFFS2_CMDLINE
+#define CONFIG_CMD_MTDPARTS
 #define MTDIDS_DEFAULT		"nor0=TQM8xxL-0"
 
 #define MTDPARTS_DEFAULT	"mtdparts=TQM8xxL-0:256k(u-boot),"	\
include/configs/TQM855M.h +1 -1
index 8a65183..b54967d 100644
@@ -256,7 +256,7 @@
 /*-----------------------------------------------------------------------
  * Dynamic MTD partition support
  */
-#define CONFIG_JFFS2_CMDLINE
+#define CONFIG_CMD_MTDPARTS
 #define MTDIDS_DEFAULT		"nor0=TQM8xxM-0"
 
 #define MTDPARTS_DEFAULT	"mtdparts=TQM8xxM-0:512k(u-boot),"	\
include/configs/TQM85xx.h +2 -2
index 3b2272c..72db26c 100644
@@ -597,14 +597,14 @@
 
 #define	CONFIG_JFFS2_NAND	1
 
-#ifdef CONFIG_JFFS2_CMDLINE
+#ifdef CONFIG_CMD_MTDPARTS
 #define MTDIDS_DEFAULT		"nand0=TQM85xx-nand"
 #define MTDPARTS_DEFAULT	"mtdparts=TQM85xx-nand:-"
 #else
 #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	0x200000 /* size of jffs2 partition	*/
-#endif /* CONFIG_JFFS2_CMDLINE */
+#endif /* CONFIG_CMD_MTDPARTS */
 
 #endif /* CONFIG_NAND */
 
include/configs/TQM860L.h +1 -1
index 8bd1fe0..2e2a165 100644
@@ -220,7 +220,7 @@
 /*-----------------------------------------------------------------------
  * Dynamic MTD partition support
  */
-#define CONFIG_JFFS2_CMDLINE
+#define CONFIG_CMD_MTDPARTS
 #define MTDIDS_DEFAULT		"nor0=TQM8xxL-0"
 
 #define MTDPARTS_DEFAULT	"mtdparts=TQM8xxL-0:256k(u-boot),"	\
include/configs/TQM860M.h +1 -1
index ad2c71c..1148f2e 100644
@@ -221,7 +221,7 @@
 /*-----------------------------------------------------------------------
  * Dynamic MTD partition support
  */
-#define CONFIG_JFFS2_CMDLINE
+#define CONFIG_CMD_MTDPARTS
 #define MTDIDS_DEFAULT		"nor0=TQM8xxM-0"
 
 #define MTDPARTS_DEFAULT	"mtdparts=TQM8xxM-0:512k(u-boot),"	\
include/configs/TQM862L.h +1 -1
index 0a5180e..577f982 100644
@@ -224,7 +224,7 @@
 /*-----------------------------------------------------------------------
  * Dynamic MTD partition support
  */
-#define CONFIG_JFFS2_CMDLINE
+#define CONFIG_CMD_MTDPARTS
 #define MTDIDS_DEFAULT		"nor0=TQM8xxL-0"
 
 #define MTDPARTS_DEFAULT	"mtdparts=TQM8xxL-0:256k(u-boot),"	\
include/configs/TQM862M.h +1 -1
index ee6980c..69070e6 100644
@@ -225,7 +225,7 @@
 /*-----------------------------------------------------------------------
  * Dynamic MTD partition support
  */
-#define CONFIG_JFFS2_CMDLINE
+#define CONFIG_CMD_MTDPARTS
 #define MTDIDS_DEFAULT		"nor0=TQM8xxM-0"
 
 #define MTDPARTS_DEFAULT	"mtdparts=TQM8xxM-0:512k(u-boot),"	\
include/configs/TQM866M.h +1 -1
index 421a2d8..bb68614 100644
@@ -265,7 +265,7 @@
 /*-----------------------------------------------------------------------
  * Dynamic MTD partition support
  */
-#define CONFIG_JFFS2_CMDLINE
+#define CONFIG_CMD_MTDPARTS
 #define MTDIDS_DEFAULT		"nor0=TQM8xxM-0"
 
 #define MTDPARTS_DEFAULT	"mtdparts=TQM8xxM-0:512k(u-boot),"	\
include/configs/ZUMA.h +2 -2
index 08c4ced..b73aaa8 100644
@@ -130,7 +130,7 @@
  *
  */
 /* No command line, one static partition, whole device */
-#undef CONFIG_JFFS2_CMDLINE
+#undef CONFIG_CMD_MTDPARTS
 #define CONFIG_JFFS2_DEV		"nor0"
 #define CONFIG_JFFS2_PART_SIZE		0xFFFFFFFF
 #define CONFIG_JFFS2_PART_OFFSET	0x00000000
@@ -138,7 +138,7 @@
 /* mtdparts command line support */
 /* Note: fake mtd_id used, no linux mtd map file */
 /*
-#define CONFIG_JFFS2_CMDLINE
+#define CONFIG_CMD_MTDPARTS
 #define MTDIDS_DEFAULT		"nor1=zuma-1,nor2=zuma-2"
 #define MTDPARTS_DEFAULT	"mtdparts=zuma-1:-(jffs2),zuma-2:-(user)"
 */
include/configs/apollon.h +1 -1
index dff47fc..f83dd9c 100644
@@ -258,7 +258,7 @@
 #define CONFIG_ENV_ADDR		0x00020000
 
 #ifdef CONFIG_SYS_USE_UBI
-#define CONFIG_JFFS2_CMDLINE
+#define CONFIG_CMD_MTDPARTS
 #define MTDIDS_DEFAULT		"onenand0=onenand"
 #define MTDPARTS_DEFAULT	"mtdparts=onenand:128k(bootloader),"	\
 					"128k(params),"			\
include/configs/cm5200.h +1 -1
index ddcc6aa..54cf40d 100644
@@ -222,7 +222,7 @@
 /*
  * MTD configuration
  */
-#define CONFIG_JFFS2_CMDLINE	1
+#define CONFIG_CMD_MTDPARTS	1
 #define MTDIDS_DEFAULT		"nor0=cm5200-0"
 #define MTDPARTS_DEFAULT	"mtdparts=cm5200-0:"			\
 					"384k(uboot),128k(env),"	\
include/configs/debris.h +2 -2
index 4d65f6a..dc59df9 100644
@@ -234,7 +234,7 @@
  *
  */
 /* No command line, one static partition, whole device */
-#undef CONFIG_JFFS2_CMDLINE
+#undef CONFIG_CMD_MTDPARTS
 #define CONFIG_JFFS2_DEV		"nor0"
 #define CONFIG_JFFS2_PART_SIZE		0xFFFFFFFF
 #define CONFIG_JFFS2_PART_OFFSET	0x00000000
@@ -246,7 +246,7 @@
  * Note: fake mtd_id's used, no linux mtd map file.
  */
 /*
-#define CONFIG_JFFS2_CMDLINE
+#define CONFIG_CMD_MTDPARTS
 #define MTDIDS_DEFAULT		"nor0=debris-0"
 #define MTDPARTS_DEFAULT	"mtdparts=debris-0:-(jffs2)"
 */
include/configs/ep7312.h +2 -2
index 0581842..322a3ca 100644
@@ -158,7 +158,7 @@
  *
  */
 /* No command line, one static partition, whole device */
-#undef CONFIG_JFFS2_CMDLINE
+#undef CONFIG_CMD_MTDPARTS
 #define CONFIG_JFFS2_DEV		"nor0"
 #define CONFIG_JFFS2_PART_SIZE		0xFFFFFFFF
 #define CONFIG_JFFS2_PART_OFFSET	0x00000000
@@ -166,7 +166,7 @@
 /* mtdparts command line support */
 /* Note: fake mtd_id used, no linux mtd map file */
 /*
-#define CONFIG_JFFS2_CMDLINE
+#define CONFIG_CMD_MTDPARTS
 #define MTDIDS_DEFAULT		"nor0=ep7312-0"
 #define MTDPARTS_DEFAULT	"mtdparts=ep7312-0:-(jffs2)"
 */
include/configs/ep8260.h +2 -2
index d49d02f..3f4425a 100644
@@ -758,7 +758,7 @@
  *
  */
 /* No command line, one static partition, whole device */
-#undef CONFIG_JFFS2_CMDLINE
+#undef CONFIG_CMD_MTDPARTS
 #define CONFIG_JFFS2_DEV		"nor0"
 #define CONFIG_JFFS2_PART_SIZE		0xFFFFFFFF
 #define CONFIG_JFFS2_PART_OFFSET	0x00000000
@@ -766,7 +766,7 @@
 /* mtdparts command line support */
 /* Note: fake mtd_id used, no linux mtd map file */
 /*
-#define CONFIG_JFFS2_CMDLINE
+#define CONFIG_CMD_MTDPARTS
 #define MTDIDS_DEFAULT		""
 #define MTDPARTS_DEFAULT	""
 */
include/configs/fx12mm.h +1 -1
index 5844567..27c6e7d 100644
@@ -37,7 +37,7 @@
 
 /* cmd config */
 #define CONFIG_CMD_JFFS2
-#define CONFIG_JFFS2_CMDLINE
+#define CONFIG_CMD_MTDPARTS
 #undef CONFIG_CMD_NET
 
 /* sdram */
include/configs/hymod.h +2 -2
index 0fdcda2..2dacfb6 100644
@@ -730,14 +730,14 @@
  *
  */
 /* No command line, one static partition, whole device */
-#undef CONFIG_JFFS2_CMDLINE
+#undef CONFIG_CMD_MTDPARTS
 #define CONFIG_JFFS2_DEV		"nor0"
 #define CONFIG_JFFS2_PART_SIZE		0xFFFFFFFF
 #define CONFIG_JFFS2_PART_OFFSET	0x00000000
 
 /* mtdparts command line support */
 /*
-#define CONFIG_JFFS2_CMDLINE
+#define CONFIG_CMD_MTDPARTS
 #define MTDIDS_DEFAULT		""
 #define MTDPARTS_DEFAULT	""
 */
include/configs/idmr.h +1 -1
index 1dd89f9..944d06f 100644
@@ -229,7 +229,7 @@
 
 
 /* Dynamic MTD partition support */
-#define CONFIG_JFFS2_CMDLINE
+#define CONFIG_CMD_MTDPARTS
 #define MTDIDS_DEFAULT		"nor0=idmr-0"
 
 #define MTDPARTS_DEFAULT	"mtdparts=idmr-0:128k(u-boot),"	\
include/configs/impa7.h +2 -2
index bb3c02e..a3d023f 100644
@@ -160,14 +160,14 @@
  *
  */
 /* No command line, one static partition, whole device */
-#undef CONFIG_JFFS2_CMDLINE
+#undef CONFIG_CMD_MTDPARTS
 #define CONFIG_JFFS2_DEV		"nor0"
 #define CONFIG_JFFS2_PART_SIZE		0xFFFFFFFF
 #define CONFIG_JFFS2_PART_OFFSET	0x00020000
 
 /* mtdparts command line support */
 /*
-#define CONFIG_JFFS2_CMDLINE
+#define CONFIG_CMD_MTDPARTS
 #define MTDIDS_DEFAULT		"nor0=impA7 NOR Flash Bank #0,nor1=impA7 NOR Flash Bank #1"
 #define MTDPARTS_DEFAULT	"mtdparts=impA7 NOR Flash Bank #0:-(FileSystem1);impA7 NOR Flash Bank #1:-(FileSystem2)"
 */
include/configs/imx31_litekit.h +1 -1
index 6c150ae..9ac6eec 100644
@@ -170,7 +170,7 @@
 /*
  * JFFS2 partitions
  */
-#undef CONFIG_JFFS2_CMDLINE
+#undef CONFIG_CMD_MTDPARTS
 #define CONFIG_JFFS2_DEV	"nor0"
 
 #endif /* __CONFIG_H */
include/configs/imx31_phycore.h +1 -1
index 2dd9e92..cbc0b92 100644
@@ -175,7 +175,7 @@
 /*
  * JFFS2 partitions
  */
-#undef CONFIG_JFFS2_CMDLINE
+#undef CONFIG_CMD_MTDPARTS
 #define CONFIG_JFFS2_DEV	"nor0"
 
 /* EET platform additions */
include/configs/incaip.h +2 -2
index a18ba80..2129dfd 100644
@@ -168,14 +168,14 @@
  * JFFS2 partitions
  */
 /* No command line, one static partition, use all space on the device */
-#undef CONFIG_JFFS2_CMDLINE
+#undef CONFIG_CMD_MTDPARTS
 #define CONFIG_JFFS2_DEV		"nor1"
 #define CONFIG_JFFS2_PART_SIZE		0xFFFFFFFF
 #define CONFIG_JFFS2_PART_OFFSET	0x00000000
 
 /* mtdparts command line support */
 /*
[… more lines in the raw message]

Lines of this file are not shown. View the raw message.

include/configs/innokom.h +2 -2
index d9b1555..043ae2f 100644

Lines of this file are not shown. View the raw message.

include/configs/microblaze-generic.h +1 -1
index ac18c87..aa117c8 100644

Lines of this file are not shown. View the raw message.

include/configs/modnet50.h +2 -2
index c4f5286..27213a8 100644

Lines of this file are not shown. View the raw message.

include/configs/motionpro.h +1 -1
index e6e3729..99a02cc 100644

Lines of this file are not shown. View the raw message.

include/configs/mx1fs2.h +2 -2
index aaa4e98..a19eb78 100644

Lines of this file are not shown. View the raw message.

include/configs/mx31ads.h +1 -1
index 1649f1f..c31c06a 100644

Lines of this file are not shown. View the raw message.

include/configs/netstar.h +1 -1
index 2c90265..5294b2f 100644

Lines of this file are not shown. View the raw message.

include/configs/omap2420h4.h +2 -2
index 92df0b4..983b5f2 100644

Lines of this file are not shown. View the raw message.

include/configs/qong.h +1 -1
index ccc2625..a67006a 100644

Lines of this file are not shown. View the raw message.

include/configs/sc3.h +1 -1
index 515b097..5b68ef9 100644

Lines of this file are not shown. View the raw message.

include/configs/sc520_cdp.h +2 -2
index 9f2357b..854f619 100644

Lines of this file are not shown. View the raw message.

include/configs/sc520_spunk.h +2 -2
index 50af732..43dcb85 100644

Lines of this file are not shown. View the raw message.

include/configs/smmaco4.h +1 -1
index a3f2677..35f3e3a 100644

Lines of this file are not shown. View the raw message.

include/configs/trab.h +1 -1
index 0a7a73d..8f13c35 100644

Lines of this file are not shown. View the raw message.

include/configs/v37.h +2 -2
index a6b0f0d..7f1670e 100644

Lines of this file are not shown. View the raw message.

include/configs/vct.h +1 -1
index 391535e..5371e2d 100644

Lines of this file are not shown. View the raw message.

include/configs/virtlab2.h +1 -1
index 7b61c82..021012d 100644

Lines of this file are not shown. View the raw message.

include/configs/voiceblue.h +1 -1
index f460610..cadd906 100644

Lines of this file are not shown. View the raw message.

include/configs/xilinx-ppc.h +2 -2
index e7daa07..e3ea84b 100644

Lines of this file are not shown. View the raw message.

include/configs/xsengine.h +2 -2
index 6761438..5d13f96 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
1.6.1.3

Part of the diff is not shown here. View the raw message.

#1 lore raw

PATCH v2 1/1 Separate mtdparts command from jffs2

Dear Stefan Roese,

Quoted 8 lines · In message <[email protected]> you wrote:

Currently the mtdparts commands are included in the jffs2 command support. This doesn't make sense anymore since other commands (e.g. UBI) use this infrastructure as well now. This patch separates the mtdparts commands from the jffs2 commands making it possible to only select mtdparts when no JFFS2 support is needed.

...

README The following options need to be configured: · line 636

Quoted 9 lines
README +1 -0
index 43fb1c0..c59652d 100644
@@ -633,6 +633,7 @@ The following options need to be configured:
 		CONFIG_CMD_MII		* MII utility commands
 		CONFIG_CMD_NAND		* NAND support
 		CONFIG_CMD_NET		  bootp, tftpboot, rarpboot
+		CONFIG_CMD_MTDPARTS	* MTD partition support

Please keep list sorted.

common/Makefile COBJS-$(CONFIG_CMD_IMMAP) += cmd_immap.o · line 102

Quoted 10 lines
common/Makefile +1 -0
index f13cd11..6a8a541 100644
@@ -98,6 +98,7 @@ COBJS-$(CONFIG_CMD_IMMAP) += cmd_immap.o
 COBJS-$(CONFIG_CMD_IRQ) += cmd_irq.o
 COBJS-$(CONFIG_CMD_ITEST) += cmd_itest.o
 COBJS-$(CONFIG_CMD_JFFS2) += cmd_jffs2.o
+COBJS-$(CONFIG_CMD_MTDPARTS) += cmd_mtdparts.o
 COBJS-$(CONFIG_CMD_LICENSE) += cmd_license.o

Please keep list sorted.

Quoted 32 lines
common/cmd_jffs2.c +0 -24
index d0a7cea..05aaca5 100644
@@ -136,40 +136,6 @@
  * field for read-only partitions */
 #define MTD_WRITEABLE_CMD		1
 
-#ifdef CONFIG_JFFS2_CMDLINE
-/* default values for mtdids and mtdparts variables */
-#if defined(MTDIDS_DEFAULT)
-static const char *const mtdids_default = MTDIDS_DEFAULT;
-#else
-#warning "MTDIDS_DEFAULT not defined!"
-static const char *const mtdids_default = NULL;
-#endif
-
-#if defined(MTDPARTS_DEFAULT)
-static const char *const mtdparts_default = MTDPARTS_DEFAULT;
-#else
-#warning "MTDPARTS_DEFAULT not defined!"
-static const char *const mtdparts_default = NULL;
-#endif
-
-/* copies of last seen 'mtdids', 'mtdparts' and 'partition' env variables */
-#define MTDIDS_MAXLEN		128
-#define MTDPARTS_MAXLEN		512
-#define PARTITION_MAXLEN	16
-static char last_ids[MTDIDS_MAXLEN];
-static char last_parts[MTDPARTS_MAXLEN];
-static char last_partition[PARTITION_MAXLEN];
-

common/cmd_jffs2.c line 172

Quoted 10 lines
common/cmd_jffs2.c +0 -10
-/* low level jffs2 cache cleaning routine */
-extern void jffs2_free_cache(struct part_info *part);
-
-/* mtdids mapping list, filled by parse_ids() */
-struct list_head mtdids;
-
-/* device/partition list, parse_cmdline() parses into here */
-struct list_head devices;
-#endif /* #ifdef CONFIG_JFFS2_CMDLINE */
-

Hm... here and downwards the whole mtdparts code gets deleted. But I see no place where that functionality gets added again?

You can see this also from the patch statistics:

 81 files changed, 131 insertions(+), 2223 deletions(-)

We drop > 2000 lines of code here, which represents a lot of important functions.

I wonder if this patch has ever been tested?

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Gew?hnlich glaubt der Mensch,  wenn er nur Worte h?rt,  es m?sse sich
dabei doch auch was denken lassen.                 -- Goethe, Faust I
#2 lore raw

PATCH v2 1/1 Separate mtdparts command from jffs2

Quoted 11 lines · Wolfgang Denk

README The following options need to be configured: · line 636

Quoted 9 lines
README +1 -0
index 43fb1c0..c59652d 100644
@@ -633,6 +633,7 @@ The following options need to be configured:
 		CONFIG_CMD_MII		* MII utility commands
 		CONFIG_CMD_NAND		* NAND support
 		CONFIG_CMD_NET		  bootp, tftpboot, rarpboot
+		CONFIG_CMD_MTDPARTS	* MTD partition support

Please keep list sorted.

OK.

Quoted 4 lines
Quoted 4 lines
common/Makefile +0 -0
index f13cd11..6a8a541 100644
Quoted 8 lines

common/Makefile COBJS-$(CONFIG_CMD_IMMAP) += cmd_immap.o · line 102

Quoted 6 lines
common/Makefile +1 -0
@@ -98,6 +98,7 @@ COBJS-$(CONFIG_CMD_IMMAP) += cmd_immap.o
 COBJS-$(CONFIG_CMD_IRQ) += cmd_irq.o
 COBJS-$(CONFIG_CMD_ITEST) += cmd_itest.o
 COBJS-$(CONFIG_CMD_JFFS2) += cmd_jffs2.o
+COBJS-$(CONFIG_CMD_MTDPARTS) += cmd_mtdparts.o
 COBJS-$(CONFIG_CMD_LICENSE) += cmd_license.o

Please keep list sorted.

OK.

Quoted 46 lines
Quoted 32 lines
common/cmd_jffs2.c +0 -17
index d0a7cea..05aaca5 100644
@@ -136,40 +136,6 @@
  * field for read-only partitions */
 #define MTD_WRITEABLE_CMD		1
 
-#ifdef CONFIG_JFFS2_CMDLINE
-/* default values for mtdids and mtdparts variables */
-#if defined(MTDIDS_DEFAULT)
-static const char *const mtdids_default = MTDIDS_DEFAULT;
-#else
-#warning "MTDIDS_DEFAULT not defined!"
-static const char *const mtdids_default = NULL;
-#endif
-
-#if defined(MTDPARTS_DEFAULT)
-static const char *const mtdparts_default = MTDPARTS_DEFAULT;
-#else
-#warning "MTDPARTS_DEFAULT not defined!"
-static const char *const mtdparts_default = NULL;
-#endif
-
-/* copies of last seen 'mtdids', 'mtdparts' and 'partition' env

variables */ -#define MTDIDS_MAXLEN 128

common/cmd_jffs2.c +0 -6
-#define MTDPARTS_MAXLEN		512
-#define PARTITION_MAXLEN	16
-static char last_ids[MTDIDS_MAXLEN];
-static char last_parts[MTDPARTS_MAXLEN];
-static char last_partition[PARTITION_MAXLEN];
-

common/cmd_jffs2.c line 172

Quoted 10 lines
common/cmd_jffs2.c +0 -10
-/* low level jffs2 cache cleaning routine */
-extern void jffs2_free_cache(struct part_info *part);
-
-/* mtdids mapping list, filled by parse_ids() */
-struct list_head mtdids;
-
-/* device/partition list, parse_cmdline() parses into here */
-struct list_head devices;
-#endif /* #ifdef CONFIG_JFFS2_CMDLINE */
-

Hm... here and downwards the whole mtdparts code gets deleted. But I see no place where that functionality gets added again?

Quoted 8 lines

You can see this also from the patch statistics:

 81 files changed, 131 insertions(+), 2223 deletions(-)

We drop > 2000 lines of code here, which represents a lot of important functions.

I wonder if this patch has ever been tested?

Yes, it has.

I generated this patch with the "find-copies-harder" option. This makes the status output harder to read. I'll send an updated patch in short while.

Best regards,
Stefan

=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================

#3 lore raw

PATCH v2 1/1 Separate mtdparts command from jffs2

Dear Stefan Roese,

Quoted 1 line · In message <[email protected]> you wrote:

...

Quoted 9 lines
Quoted 4 lines

We drop > 2000 lines of code here, which represents a lot of important functions.

I wonder if this patch has ever been tested?

Yes, it has.

I generated this patch with the "find-copies-harder" option. This makes the status output harder to read. I'll send an updated patch in short while.

You are right. Stupid me.

So here the rest of my review comments:

common/cmd_jffs2.c static struct mtdids* id_find_by_mtd_id(const char *mtd_id, unsigned int mtd_id_ · line 220

Quoted 6 lines
common/cmd_jffs2.c +1 -1
@@ -1142,7 +217,7 @@ static struct mtdids* id_find_by_mtd_id(const char *mtd_id, unsigned int mtd_id_
  * @param dev_num parsed device number (output)
  * @return 0 on success, 1 otherwise
  */
-int id_parse(const char *id, const char **ret_id, u8 *dev_type, u8 *dev_num)
+static int id_parse(const char *id, const char **ret_id, u8 *dev_type, u8 *dev_num)

...

mtd_id_parse() ?

common/cmd_mtdparts.c static int part_parse(const char *const partdef, const char **ret, struct part_i · line 766

Quoted 6 lines
common/cmd_mtdparts.c renamed from common/cmd_jffs2.c +1 -1
@@ -782,7 +763,7 @@ static int part_parse(const char *const partdef, const char **ret, struct part_i
  * @param dev device to validate
  * @return 0 if device is valid, 1 otherwise
  */
-static int device_validate(u8 type, u8 num, u32 *size)
+int device_validate(u8 type, u8 num, u32 *size)

mtd_device_validate() ?

Now that we make these funtions publicly visible we whould make sure that there will be no namespace collissions. I think we shoudl therefor rename these functions.

include/config_cmd_all.h line 68

Quoted 12 lines
include/config_cmd_all.h +1 -0
index 205dd1f..4c6a4b1 100644
@@ -62,6 +62,7 @@
 #define CONFIG_CMD_NET		/* bootp, tftpboot, rarpboot	*/
 #define CONFIG_CMD_NFS		/* NFS support			*/
 #define CONFIG_CMD_ONENAND	/* OneNAND support		*/
+#define CONFIG_CMD_MTDPARTS	/* mtd parts support		*/
 #define CONFIG_CMD_PCI		/* pciinfo			*/
 #define CONFIG_CMD_PCMCIA	/* PCMCIA support		*/
 #define CONFIG_CMD_PING		/* ping support			*/

Please keep lists sorted.

Best regards,

Wolfgang Denk

Signature · 6 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
When properly administered, vacations do not  diminish  productivity:
for every week you're away and get nothing done, there's another when
your boss is away and you get twice as much done.  -- Daniel B. Luten