Changeset 39249


Ignore:
Timestamp:
2014-01-12T19:50:45+01:00 (4 years ago)
Author:
hauke
Message:

brcm47xx: update mtd drivers

This backports some patches from linux upstream.

Signed-off-by: Hauke Mehrtens <hauke@…>

Location:
trunk/target/linux/brcm47xx/patches-3.10
Files:
2 added
1 edited
3 moved

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/brcm47xx/patches-3.10/021-mtd-bcm47xxpart-detect-block-aligned-Squashfs-partit.patch

    r39248 r39249  
    1 mtd: bcm47xxpart: detect block aligned Squashfs partition 
     1From 020c6bcfbeabee72c18d862769d72cf9241b9004 Mon Sep 17 00:00:00 2001 
     2From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com> 
     3Date: Mon, 21 Oct 2013 22:34:37 +0200 
     4Subject: [PATCH] mtd: bcm47xxpart: detect block aligned Squashfs partition 
     5MIME-Version: 1.0 
     6Content-Type: text/plain; charset=UTF-8 
     7Content-Transfer-Encoding: 8bit 
    28 
    39Most of the bcm47xx devices use TRX format for storing kernel and some 
     
    1420 
    1521Signed-off-by: Rafał Miłecki <zajec5@gmail.com> 
     22Signed-off-by: Brian Norris <computersforpeace@gmail.com> 
     23--- 
     24 drivers/mtd/bcm47xxpart.c |    8 ++++++++ 
     25 1 file changed, 8 insertions(+) 
    1626 
    1727--- a/drivers/mtd/bcm47xxpart.c 
    1828+++ b/drivers/mtd/bcm47xxpart.c 
    19 @@ -33,6 +33,7 @@ 
     29@@ -32,6 +32,7 @@ 
    2030 #define ML_MAGIC1                      0x39685a42 
    2131 #define ML_MAGIC2                      0x26594131 
     
    2535 struct trx_header { 
    2636        uint32_t magic; 
    27 @@ -170,6 +171,13 @@ static int bcm47xxpart_parse(struct mtd_ 
     37@@ -174,6 +175,13 @@ static int bcm47xxpart_parse(struct mtd_ 
    2838                        offset = rounddown(offset + trx->length, blocksize); 
    2939                        continue; 
  • trunk/target/linux/brcm47xx/patches-3.10/022-mtd-bcm47xxpart-detect-factory-partition.patch

    r39248 r39249  
    1 mtd: bcm47xxpart: detect "factory" partition 
     1From 33094c736cd36a6cecadae6bce4daba89dabc326 Mon Sep 17 00:00:00 2001 
     2From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com> 
     3Date: Mon, 21 Oct 2013 22:35:34 +0200 
     4Subject: [PATCH] mtd: bcm47xxpart: detect "factory" partition 
     5MIME-Version: 1.0 
     6Content-Type: text/plain; charset=UTF-8 
     7Content-Transfer-Encoding: 8bit 
    28 
    39A new type of partition with magic FCTY was found on Huawei E970: 
     
    511 
    612Signed-off-by: Rafał Miłecki <zajec5@gmail.com> 
     13Signed-off-by: Brian Norris <computersforpeace@gmail.com> 
     14--- 
     15 drivers/mtd/bcm47xxpart.c |    8 ++++++++ 
     16 1 file changed, 8 insertions(+) 
    717 
    818--- a/drivers/mtd/bcm47xxpart.c 
    919+++ b/drivers/mtd/bcm47xxpart.c 
    10 @@ -28,6 +28,7 @@ 
     20@@ -27,6 +27,7 @@ 
     21  
    1122 /* Magics */ 
    12  #define CFE_MAGIC                      0x43464531      /* 1EFC */ 
    1323 #define BOARD_DATA_MAGIC               0x5246504D      /* MPFR */ 
    1424+#define FACTORY_MAGIC                  0x59544346      /* FCTY */ 
     
    1626 #define POT_MAGIC2                     0x504f          /* OP */ 
    1727 #define ML_MAGIC1                      0x39685a42 
    18 @@ -113,6 +114,13 @@ static int bcm47xxpart_parse(struct mtd_ 
     28@@ -117,6 +118,13 @@ static int bcm47xxpart_parse(struct mtd_ 
    1929                                             offset, MTD_WRITEABLE); 
    2030                        continue; 
  • trunk/target/linux/brcm47xx/patches-3.10/023-mtd-bcm47xxpart-find-boot-partition-by-CFE-magic.patch

    r39248 r39249  
     1From 4f8aaf72287578c846ed7ac8c6114aacbf416e45 Mon Sep 17 00:00:00 2001 
     2From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com> 
     3Date: Sat, 21 Dec 2013 19:39:11 +0100 
     4Subject: [PATCH] mtd: bcm47xxpart: find boot partition by CFE magic 
     5MIME-Version: 1.0 
     6Content-Type: text/plain; charset=UTF-8 
     7Content-Transfer-Encoding: 8bit 
     8 
     9Some devices have even nicer-to-recognize CFE thanks to the magic. 
     10 
     11Signed-off-by: Rafał Miłecki <zajec5@gmail.com> 
     12Signed-off-by: Brian Norris <computersforpeace@gmail.com> 
     13--- 
     14 drivers/mtd/bcm47xxpart.c |    8 +++++--- 
     15 1 file changed, 5 insertions(+), 3 deletions(-) 
     16 
    117--- a/drivers/mtd/bcm47xxpart.c 
    218+++ b/drivers/mtd/bcm47xxpart.c 
    3 @@ -23,9 +23,10 @@ 
     19@@ -23,10 +23,11 @@ 
    420  * Amount of bytes we read when analyzing each block of flash memory. 
    521  * Set it big enough to allow detecting partition and reading important data. 
     
    925  
    1026 /* Magics */ 
     27 #define BOARD_DATA_MAGIC               0x5246504D      /* MPFR */ 
    1128+#define CFE_MAGIC                      0x43464531      /* 1EFC */ 
    12  #define BOARD_DATA_MAGIC               0x5246504D      /* MPFR */ 
     29 #define FACTORY_MAGIC                  0x59544346      /* FCTY */ 
    1330 #define POT_MAGIC1                     0x54544f50      /* POTT */ 
    1431 #define POT_MAGIC2                     0x504f          /* OP */ 
    15 @@ -93,8 +94,9 @@ static int bcm47xxpart_parse(struct mtd_ 
     32@@ -102,8 +103,9 @@ static int bcm47xxpart_parse(struct mtd_ 
    1633                        continue; 
    1734                } 
     
    2037-               if (buf[0x400 / 4] == NVRAM_HEADER) { 
    2138+               /* Magic or small NVRAM at 0x400 */ 
    22 +               if (buf[0x4e0 / 4] == CFE_MAGIC || 
    23 +                   buf[0x400 / 4] == NVRAM_HEADER) { 
     39+               if ((buf[0x4e0 / 4] == CFE_MAGIC && buf[0x4e4 / 4] == CFE_MAGIC) || 
     40+                   (buf[0x400 / 4] == NVRAM_HEADER)) { 
    2441                        bcm47xxpart_add_part(&parts[curr_part++], "boot", 
    2542                                             offset, MTD_WRITEABLE); 
  • trunk/target/linux/brcm47xx/patches-3.10/027-mtd-bcm47xxpart-get-nvram.patch

    r37287 r39249  
    11--- a/drivers/mtd/bcm47xxpart.c 
    22+++ b/drivers/mtd/bcm47xxpart.c 
    3 @@ -65,6 +65,7 @@ static int bcm47xxpart_parse(struct mtd_ 
     3@@ -68,6 +68,7 @@ static int bcm47xxpart_parse(struct mtd_ 
    44        int trx_part = -1; 
    55        int last_trx_part = -1; 
     
    99        if (blocksize <= 0x10000) 
    1010                blocksize = 0x10000; 
    11 @@ -190,12 +191,23 @@ static int bcm47xxpart_parse(struct mtd_ 
     11@@ -229,12 +230,23 @@ static int bcm47xxpart_parse(struct mtd_ 
    1212                if (buf[0] == NVRAM_HEADER) { 
    1313                        bcm47xxpart_add_part(&parts[curr_part++], "nvram", 
Note: See TracChangeset for help on using the changeset viewer.