From: Alexander Stein Date: Wed, 11 Aug 2010 14:48:04 +0000 (+0200) Subject: CONFIG_CMD_JFFS2 is not necessary to use mtdparts on erase & protect on/off X-Git-Tag: v2010.12-rc1~132 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c000808b6aa08dc7f3137055866e6dcc3f7f8cdc;p=u-boot CONFIG_CMD_JFFS2 is not necessary to use mtdparts on erase & protect on/off The include is still necessary though. Signed-off-by: Alexander Stein Acked-by: Stefan Roese --- diff --git a/common/cmd_flash.c b/common/cmd_flash.c index 2a02eb90d4..4493948ec4 100644 --- a/common/cmd_flash.c +++ b/common/cmd_flash.c @@ -31,7 +31,7 @@ #include #endif -#if defined(CONFIG_CMD_JFFS2) && defined(CONFIG_CMD_MTDPARTS) +#if defined(CONFIG_CMD_MTDPARTS) #include /* partition handling routines */ @@ -327,7 +327,7 @@ int do_flerase (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) flash_info_t *info; ulong bank, addr_first, addr_last; int n, sect_first, sect_last; -#if defined(CONFIG_CMD_JFFS2) && defined(CONFIG_CMD_MTDPARTS) +#if 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 * const argv[]) return rcode; } -#if defined(CONFIG_CMD_JFFS2) && defined(CONFIG_CMD_MTDPARTS) +#if defined(CONFIG_CMD_MTDPARTS) /* erase - erase partition */ if ((argc == 2) && (mtd_id_parse(argv[1], NULL, &dev_type, &dev_num) == 0)) { mtdparts_init(); @@ -463,7 +463,7 @@ int do_protect (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) #if !defined(CONFIG_SYS_NO_FLASH) || defined(CONFIG_HAS_DATAFLASH) ulong addr_first, addr_last; #endif -#if defined(CONFIG_CMD_JFFS2) && defined(CONFIG_CMD_MTDPARTS) +#if defined(CONFIG_CMD_MTDPARTS) struct mtd_device *dev; struct part_info *part; u8 dev_type, dev_num, pnum; @@ -553,7 +553,7 @@ int do_protect (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) return rcode; } -#if defined(CONFIG_CMD_JFFS2) && defined(CONFIG_CMD_MTDPARTS) +#if defined(CONFIG_CMD_MTDPARTS) /* protect on/off */ if ((argc == 3) && (mtd_id_parse(argv[2], NULL, &dev_type, &dev_num) == 0)) { mtdparts_init(); @@ -681,7 +681,7 @@ int flash_sect_protect (int p, ulong addr_first, ulong addr_last) /**************************************************/ -#if defined(CONFIG_CMD_JFFS2) && defined(CONFIG_CMD_MTDPARTS) +#if defined(CONFIG_CMD_MTDPARTS) # define TMP_ERASE "erase \n - erase partition\n" # define TMP_PROT_ON "protect on \n - protect partition\n" # define TMP_PROT_OFF "protect off \n - make partition writable\n"