bcm53xx: add support for TP-LINK Archer C5 V2
[openwrt/openwrt.git] / target / linux / bcm53xx / patches-4.9 / 900-mtd-bcm47xxpart-add-device-specific-workarounds.patch
index 0ffa82f86909ef9e2bcee7c3bc2a25216a1c7542..0223ab477628fbd7e2f42041ef7327b30b0f400c 100644 (file)
@@ -17,7 +17,7 @@ Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
  
  #include <uapi/linux/magic.h>
  
-@@ -249,6 +250,28 @@ static int bcm47xxpart_parse(struct mtd_
+@@ -249,6 +250,36 @@ static int bcm47xxpart_parse(struct mtd_
                        break;
                }
  
@@ -33,6 +33,14 @@ Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
 +                       */
 +                      bcm47xxpart_add_part(&parts[curr_part++], "asus", offset, MTD_WRITEABLE);
 +                      continue;
++              } else  if (of_machine_is_compatible("tplink,archer-c5-v2") && offset == 0xe40000) {
++                      /*
++                       * There is a whole set of partitions (not even listed
++                       * by original firmware): "default-mac", "pin",
++                       * "partition-table", etc.
++                       */
++                      bcm47xxpart_add_part(&parts[curr_part++], "tplink", offset, MTD_WRITEABLE);
++                      continue;
 +              } else  if (of_machine_is_compatible("tplink,archer-c9-v1") && offset == 0xe40000) {
 +                      /*
 +                       * There is a whole set of partitions (not even listed