brcm63xx: do not require fixed partitions when probing from DT
authorJonas Gorski <jonas.gorski@gmail.com>
Tue, 7 Feb 2017 13:20:25 +0000 (14:20 +0100)
committerÁlvaro Fernández Rojas <noltari@gmail.com>
Sun, 26 Mar 2017 09:50:32 +0000 (11:50 +0200)
Allow the parser to be invoked from DT without fixed cfe/linux/nvram
partitions. This allows flash to be probed from DT also for multi
flash-size images.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
target/linux/brcm63xx/patches-4.4/425-bcm63xxpart_parse_paritions_from_dt.patch

index 330ec1ecafa32b22debfb53077dc8207ad419e06..d208a07fc75f1cb0a89bc4224a2c467dee611201 100644 (file)
 +                                  struct mtd_partition **pparts,
 +                                  struct mtd_part_parser_data *data)
 +{
-+      if (mtd_get_of_node(master))
++      if (mtd_get_of_node(master) && of_get_child_count(mtd_get_of_node(master)))
 +              return bcm63xx_parse_cfe_partitions_of(master, pparts, data);
 +      else
 +              return bcm63xx_parse_cfe_partitions(master, pparts, data);