Skip to contentSkip to conversation

MTD: enable partition parser in the default list when selected

PATCH In review Florian Fainelli 2 participants 3 messages Jun 22, 2009 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 MTD: enable partition parser in the default list when selected

This patch makes the physmap driver use the partition parsers that we enable in the kernel configuration as the list of partition parsers to use when probing the flash chip.

---

drivers/mtd/maps/physmap.c +10 -1
index 29a9011..2095b60 100644
@@ -80,7 +80,16 @@ static const char *rom_probe_types[] = {
 					"map_rom",
 					NULL };
 #ifdef CONFIG_MTD_PARTITIONS
-static const char *part_probe_types[] = { "cmdlinepart", "RedBoot", NULL };
+static const char *part_probe_types[] = {
+#ifdef CONFIG_MTD_CMDLINE_PARTS
+	"cmdlinepart",
+#elif defined CONFIG_MTD_REDBOOT_PARTS
+	"RedBoot",
+#elif defined CONFIG_MTD_AR7_PARTS
+	"ar7part",
+#endif
+	NULL
+};
 #endif
 
 static int physmap_flash_probe(struct platform_device *dev)
#1 lore raw
Quoted 12 lines · Florian Fainelli

 #ifdef CONFIG_MTD_PARTITIONS

drivers/mtd/maps/physmap.c +10 -1
-static const char *part_probe_types[] = { "cmdlinepart", "RedBoot", NULL };
+static const char *part_probe_types[] = {
+#ifdef CONFIG_MTD_CMDLINE_PARTS
+       "cmdlinepart",
+#elif defined CONFIG_MTD_REDBOOT_PARTS
+       "RedBoot",
+#elif defined CONFIG_MTD_AR7_PARTS
+       "ar7part",
+#endif
+       NULL
+};
Quoted 1 line

 #endif

you just broke systems that have both cmdline and redboot enabled -mike

#2 lore raw

Le Monday 22 June 2009 14:33:22 Mike Frysinger, vous avez écrit :

Quoted 9 lines · Florian Fainelli
Quoted 8 lines

 #ifdef CONFIG_MTD_PARTITIONS
-static const char *part_probe_types[] = { "cmdlinepart", "RedBoot", NULL }; +static const char *part_probe_types[] = {

drivers/mtd/maps/physmap.c +5 -0
+#ifdef CONFIG_MTD_CMDLINE_PARTS
+       "cmdlinepart",
+#elif defined CONFIG_MTD_REDBOOT_PARTS
+       "RedBoot",
+#elif defined CONFIG_MTD_AR7_PARTS
Quoted 8 lines
Quoted 5 lines

+       "ar7part",

drivers/mtd/maps/physmap.c +3 -0
+#endif
+       NULL
+};

 #endif

you just broke systems that have both cmdline and redboot enabled -mike

Right, let me respin that one.

Signature · 4 lines
Best regards, Florian Fainelli
Email : [email protected]
http://openwrt.org
-------------------------------