aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm47xx
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@openwrt.org>2013-09-16 19:47:30 +0000
committerHauke Mehrtens <hauke@openwrt.org>2013-09-16 19:47:30 +0000
commit77cbd421b4737f8b7ccc00f13c3cc5477a771e38 (patch)
tree273ca4b62e9b35509162856827ac713e727e7bca /target/linux/brcm47xx
parentdb3414a7e15c2f690d565d5a75169609736a16cf (diff)
downloadmaster-187ad058-77cbd421b4737f8b7ccc00f13c3cc5477a771e38.tar.gz
master-187ad058-77cbd421b4737f8b7ccc00f13c3cc5477a771e38.tar.bz2
master-187ad058-77cbd421b4737f8b7ccc00f13c3cc5477a771e38.zip
brcm47xx: mtd: bcm47xxpart: detect "factory" partition
A new type of partition with magic FCTY was found on Huawei E970: 46 43 54 59 4b 51 37 4e 41 42 31 38 41 32 39 30 |FCTYKQ7NAB18A290| Signed-off-by: Rafał Miłecki <zajec5@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38005 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/brcm47xx')
-rw-r--r--target/linux/brcm47xx/patches-3.10/030-mtd-bcm47xxpart_detect_factory_partition.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/target/linux/brcm47xx/patches-3.10/030-mtd-bcm47xxpart_detect_factory_partition.patch b/target/linux/brcm47xx/patches-3.10/030-mtd-bcm47xxpart_detect_factory_partition.patch
new file mode 100644
index 0000000000..6630700e87
--- /dev/null
+++ b/target/linux/brcm47xx/patches-3.10/030-mtd-bcm47xxpart_detect_factory_partition.patch
@@ -0,0 +1,31 @@
+mtd: bcm47xxpart: detect "factory" partition
+
+A new type of partition with magic FCTY was found on Huawei E970:
+46 43 54 59 4b 51 37 4e 41 42 31 38 41 32 39 30 |FCTYKQ7NAB18A290|
+
+Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
+
+--- a/drivers/mtd/bcm47xxpart.c
++++ b/drivers/mtd/bcm47xxpart.c
+@@ -28,6 +28,7 @@
+ /* Magics */
+ #define CFE_MAGIC 0x43464531 /* 1EFC */
+ #define BOARD_DATA_MAGIC 0x5246504D /* MPFR */
++#define FACTORY_MAGIC 0x59544346 /* FCTY */
+ #define POT_MAGIC1 0x54544f50 /* POTT */
+ #define POT_MAGIC2 0x504f /* OP */
+ #define ML_MAGIC1 0x39685a42
+@@ -113,6 +114,13 @@ static int bcm47xxpart_parse(struct mtd_
+ offset, MTD_WRITEABLE);
+ continue;
+ }
++
++ /* Found on Huawei E970 */
++ if (buf[0x000 / 4] == FACTORY_MAGIC) {
++ bcm47xxpart_add_part(&parts[curr_part++], "factory",
++ offset, MTD_WRITEABLE);
++ continue;
++ }
+
+ /* POT(TOP) */
+ if (buf[0x000 / 4] == POT_MAGIC1 &&