diff options
author | Hauke Mehrtens <hauke@openwrt.org> | 2014-01-12 18:50:45 +0000 |
---|---|---|
committer | Hauke Mehrtens <hauke@openwrt.org> | 2014-01-12 18:50:45 +0000 |
commit | b26aeffe76854b683b28273108c97d560138cef7 (patch) | |
tree | e9b37577fc52e745c79274ae458da97281b9c854 /target/linux/brcm47xx/patches-3.10/022-mtd-bcm47xxpart-detect-factory-partition.patch | |
parent | efd0e137a75a29619b8121fe8266267f4a1ea195 (diff) | |
download | master-187ad058-b26aeffe76854b683b28273108c97d560138cef7.tar.gz master-187ad058-b26aeffe76854b683b28273108c97d560138cef7.tar.bz2 master-187ad058-b26aeffe76854b683b28273108c97d560138cef7.zip |
brcm47xx: update mtd drivers
This backports some patches from linux upstream.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39249 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/brcm47xx/patches-3.10/022-mtd-bcm47xxpart-detect-factory-partition.patch')
-rw-r--r-- | target/linux/brcm47xx/patches-3.10/022-mtd-bcm47xxpart-detect-factory-partition.patch | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/target/linux/brcm47xx/patches-3.10/022-mtd-bcm47xxpart-detect-factory-partition.patch b/target/linux/brcm47xx/patches-3.10/022-mtd-bcm47xxpart-detect-factory-partition.patch new file mode 100644 index 0000000000..389976cb85 --- /dev/null +++ b/target/linux/brcm47xx/patches-3.10/022-mtd-bcm47xxpart-detect-factory-partition.patch @@ -0,0 +1,41 @@ +From 33094c736cd36a6cecadae6bce4daba89dabc326 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com> +Date: Mon, 21 Oct 2013 22:35:34 +0200 +Subject: [PATCH] mtd: bcm47xxpart: detect "factory" partition +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +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> +Signed-off-by: Brian Norris <computersforpeace@gmail.com> +--- + drivers/mtd/bcm47xxpart.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +--- a/drivers/mtd/bcm47xxpart.c ++++ b/drivers/mtd/bcm47xxpart.c +@@ -27,6 +27,7 @@ + + /* Magics */ + #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 +@@ -117,6 +118,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 && |