aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm47xx/patches-3.18/820-wgt634u-nvram-fix.patch
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2015-01-16 12:48:27 +0000
committerRafał Miłecki <zajec5@gmail.com>2015-01-16 12:48:27 +0000
commit3bdf05441aa8e7df8e41793eff8a9bbd50c5f153 (patch)
tree0c169fc1a9842639eacd6173cac51d45e3916a55 /target/linux/brcm47xx/patches-3.18/820-wgt634u-nvram-fix.patch
parent8a103d5c56e7ef007816bdc2cace883a611bfcb3 (diff)
downloadupstream-3bdf05441aa8e7df8e41793eff8a9bbd50c5f153.tar.gz
upstream-3bdf05441aa8e7df8e41793eff8a9bbd50c5f153.tar.bz2
upstream-3bdf05441aa8e7df8e41793eff8a9bbd50c5f153.zip
brcm47xx: backport BCM47XX arch patches (clean NVRAM code, later init)
SVN-Revision: 43979
Diffstat (limited to 'target/linux/brcm47xx/patches-3.18/820-wgt634u-nvram-fix.patch')
-rw-r--r--target/linux/brcm47xx/patches-3.18/820-wgt634u-nvram-fix.patch12
1 files changed, 6 insertions, 6 deletions
diff --git a/target/linux/brcm47xx/patches-3.18/820-wgt634u-nvram-fix.patch b/target/linux/brcm47xx/patches-3.18/820-wgt634u-nvram-fix.patch
index e2bbdcc15f..ea002fe732 100644
--- a/target/linux/brcm47xx/patches-3.18/820-wgt634u-nvram-fix.patch
+++ b/target/linux/brcm47xx/patches-3.18/820-wgt634u-nvram-fix.patch
@@ -251,17 +251,17 @@ out the configuration than the in kernel cfe config reader.
+static int cfe_env;
+extern char *cfe_env_get(char *nv_buf, const char *name);
- static u32 find_nvram_size(u32 end)
+ static u32 find_nvram_size(void __iomem *end)
{
-@@ -46,6 +48,26 @@ static int nvram_find_and_copy(u32 base,
- u32 *src, *dst;
- u32 size;
+@@ -51,6 +53,26 @@ static int nvram_find_and_copy(void __io
+ return -EEXIST;
+ }
+ cfe_env = 0;
+
+ /* XXX: hack for supporting the CFE environment stuff on WGT634U */
+ if (lim >= 8 * 1024 * 1024) {
-+ src = (u32 *) KSEG1ADDR(base + 8 * 1024 * 1024 - 0x2000);
++ src = (u32 *) iobase + 8 * 1024 * 1024 - 0x2000;
+ dst = (u32 *) nvram_buf;
+
+ if ((*src & 0xff00ff) == 0x000001) {
@@ -280,7 +280,7 @@ out the configuration than the in kernel cfe config reader.
/* TODO: when nvram is on nand flash check for bad blocks first. */
off = FLASH_MIN;
while (off <= lim) {
-@@ -172,6 +194,13 @@ int bcm47xx_nvram_getenv(char *name, cha
+@@ -142,6 +164,13 @@ int bcm47xx_nvram_getenv(char *name, cha
return err;
}