aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm63xx/patches-3.10/032-MTD-bcm63xxpart-use-nvram-for-PSI-size.patch
diff options
context:
space:
mode:
authorJonas Gorski <jogo@openwrt.org>2013-07-20 11:30:26 +0000
committerJonas Gorski <jogo@openwrt.org>2013-07-20 11:30:26 +0000
commit2f038ae881a80ac4edf5a5e5f16e6c6cf4faaa9c (patch)
tree97aa81a655299693d0ea0196efb50a79a13d7566 /target/linux/brcm63xx/patches-3.10/032-MTD-bcm63xxpart-use-nvram-for-PSI-size.patch
parentc38dd0ac480380e45436ff89a8b5a0ba4d7a981b (diff)
downloadmaster-187ad058-2f038ae881a80ac4edf5a5e5f16e6c6cf4faaa9c.tar.gz
master-187ad058-2f038ae881a80ac4edf5a5e5f16e6c6cf4faaa9c.tar.bz2
master-187ad058-2f038ae881a80ac4edf5a5e5f16e6c6cf4faaa9c.zip
brcm63xx: add linux 3.10 support
Signed-off-by: Jonas Gorski <jogo@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37481 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/brcm63xx/patches-3.10/032-MTD-bcm63xxpart-use-nvram-for-PSI-size.patch')
-rw-r--r--target/linux/brcm63xx/patches-3.10/032-MTD-bcm63xxpart-use-nvram-for-PSI-size.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/target/linux/brcm63xx/patches-3.10/032-MTD-bcm63xxpart-use-nvram-for-PSI-size.patch b/target/linux/brcm63xx/patches-3.10/032-MTD-bcm63xxpart-use-nvram-for-PSI-size.patch
new file mode 100644
index 0000000000..f1c1a0fa88
--- /dev/null
+++ b/target/linux/brcm63xx/patches-3.10/032-MTD-bcm63xxpart-use-nvram-for-PSI-size.patch
@@ -0,0 +1,42 @@
+From f6eefaa4a08ec27c69485c2fc4db23247b84f8c9 Mon Sep 17 00:00:00 2001
+From: Jonas Gorski <jogo@openwrt.org>
+Date: Tue, 1 May 2012 14:10:39 +0200
+Subject: [PATCH v2 3/3] MTD: bcm63xxpart: use nvram for PSI size
+
+Read out the SPI size from nvram instead of defaulting to 64K - some
+vendors actually use values larger than the "max" value of 64.
+
+Signed-off-by: Jonas Gorski <jogo@openwrt.org>
+---
+ drivers/mtd/bcm63xxpart.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+--- a/drivers/mtd/bcm63xxpart.c
++++ b/drivers/mtd/bcm63xxpart.c
+@@ -4,7 +4,7 @@
+ * Copyright © 2006-2008 Florian Fainelli <florian@openwrt.org>
+ * Mike Albon <malbon@openwrt.org>
+ * Copyright © 2009-2010 Daniel Dickinson <openwrt@cshore.neomailbox.net>
+- * Copyright © 2011-2012 Jonas Gorski <jonas.gorski@gmail.com>
++ * Copyright © 2011-2013 Jonas Gorski <jonas.gorski@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+@@ -34,6 +34,7 @@
+ #include <linux/mtd/partitions.h>
+
+ #include <linux/bcm963xx_tag.h>
++#include <asm/mach-bcm63xx/bcm63xx_nvram.h>
+ #include <asm/mach-bcm63xx/board_bcm963xx.h>
+
+ #define BCM63XX_EXTENDED_SIZE 0xBFC00000 /* Extended flash address */
+@@ -91,7 +92,8 @@ static int bcm63xx_parse_cfe_partitions(
+ BCM63XX_CFE_BLOCK_SIZE);
+
+ cfelen = cfe_erasesize;
+- nvramlen = cfe_erasesize;
++ nvramlen = bcm63xx_nvram_get_psi_size();
++ nvramlen = roundup(nvramlen, cfe_erasesize);
+
+ /* Allocate memory for buffer */
+ buf = vmalloc(sizeof(struct bcm_tag));