diff options
author | Jonas Gorski <jonas.gorski@gmail.com> | 2018-01-13 13:18:10 +0100 |
---|---|---|
committer | Jonas Gorski <jonas.gorski@gmail.com> | 2018-02-11 23:15:05 +0100 |
commit | b0c5e8b9274188bf3bb238e013e324542ee747c4 (patch) | |
tree | 4cd32d3be6ef96eaa069d2e6cd52b625da07def1 /target/linux/brcm63xx/patches-4.9/311-bcm63xxpart_use_cfedetection.patch | |
parent | a27d59bb427466311fe7e69da3f0f53be18237aa (diff) | |
download | upstream-b0c5e8b9274188bf3bb238e013e324542ee747c4.tar.gz upstream-b0c5e8b9274188bf3bb238e013e324542ee747c4.tar.bz2 upstream-b0c5e8b9274188bf3bb238e013e324542ee747c4.zip |
brcm63xx: add kernel 4.9 support
Add support for kernel 4.9 based on the more upstream comformant
partition defintions. Increases compressed kernel size by ~95k
compared to 4.4.
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
Diffstat (limited to 'target/linux/brcm63xx/patches-4.9/311-bcm63xxpart_use_cfedetection.patch')
-rw-r--r-- | target/linux/brcm63xx/patches-4.9/311-bcm63xxpart_use_cfedetection.patch | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/target/linux/brcm63xx/patches-4.9/311-bcm63xxpart_use_cfedetection.patch b/target/linux/brcm63xx/patches-4.9/311-bcm63xxpart_use_cfedetection.patch new file mode 100644 index 0000000000..bca6adbf3c --- /dev/null +++ b/target/linux/brcm63xx/patches-4.9/311-bcm63xxpart_use_cfedetection.patch @@ -0,0 +1,51 @@ +--- a/drivers/mtd/bcm63xxpart.c ++++ b/drivers/mtd/bcm63xxpart.c +@@ -35,6 +35,8 @@ + #include <linux/mtd/mtd.h> + #include <linux/mtd/partitions.h> + #include <linux/of.h> ++ ++#include <asm/mach-bcm63xx/bcm63xx_board.h> + + #define BCM963XX_CFE_BLOCK_SIZE SZ_64K /* always at least 64KiB */ + +@@ -46,30 +48,6 @@ + #define STR_NULL_TERMINATE(x) \ + do { char *_str = (x); _str[sizeof(x) - 1] = 0; } while (0) + +-static int bcm63xx_detect_cfe(struct mtd_info *master) +-{ +- char buf[9]; +- int ret; +- size_t retlen; +- +- ret = mtd_read(master, BCM963XX_CFE_VERSION_OFFSET, 5, &retlen, +- (void *)buf); +- buf[retlen] = 0; +- +- if (ret) +- return ret; +- +- if (strncmp("cfe-v", buf, 5) == 0) +- return 0; +- +- /* very old CFE's do not have the cfe-v string, so check for magic */ +- ret = mtd_read(master, BCM963XX_CFE_MAGIC_OFFSET, 8, &retlen, +- (void *)buf); +- buf[retlen] = 0; +- +- return strncmp("CFE1CFE1", buf, 8); +-} +- + static int bcm63xx_read_nvram(struct mtd_info *master, + struct bcm963xx_nvram *nvram) + { +@@ -152,7 +130,7 @@ static int bcm63xx_parse_cfe_partitions( + struct bcm963xx_nvram *nvram = NULL; + int ret; + +- if (bcm63xx_detect_cfe(master)) ++ if (!bcm63xx_is_cfe_present()) + return -EINVAL; + + nvram = vzalloc(sizeof(*nvram)); |