DHDAXCW-Rockchip-OpenWrt/target/linux/bcm53xx/patches-4.14/901-mtd-bcm47xxpart-add-partition-workaround-for-PHICOMM.patch
2018-04-09 13:35:01 +08:00

20 lines
828 B
Diff

Index: linux-4.14.29/drivers/mtd/bcm47xxpart.c
===================================================================
--- linux-4.14.29.orig/drivers/mtd/bcm47xxpart.c
+++ linux-4.14.29/drivers/mtd/bcm47xxpart.c
@@ -163,6 +163,14 @@ static int bcm47xxpart_parse(struct mtd_
*/
bcm47xxpart_add_part(&parts[curr_part++], "tplink", offset, MTD_WRITEABLE);
continue;
+ } else if (of_machine_is_compatible("phicomm,k3") && offset == 0x180000) {
+ /*
+ * This device has nvram_back, res_info, pro_info and dev_info from
+ * 0x180000 (end of nvram) to 0x400000 (start of linux). These partitions
+ * has essential information for original firwamre. We do not want these.
+ */
+ bcm47xxpart_add_part(&parts[curr_part++], "phicomm", offset, MTD_WRITEABLE);
+ continue;
}
/* Read beginning of the block */