aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@openwrt.org>2012-11-12 21:32:33 +0000
committerHauke Mehrtens <hauke@openwrt.org>2012-11-12 21:32:33 +0000
commit4e9fb7e7742484e1c645b81354921ccb7e969f1e (patch)
treed05822c1c163fb50dc1a6795e9724c1fdcb4e526
parent3bd54a788897328e329fa75696cbaae38082e6bc (diff)
downloadmaster-187ad058-4e9fb7e7742484e1c645b81354921ccb7e969f1e.tar.gz
master-187ad058-4e9fb7e7742484e1c645b81354921ccb7e969f1e.tar.bz2
master-187ad058-4e9fb7e7742484e1c645b81354921ccb7e969f1e.zip
brcm47xx: fix cfe config detection on WGT634U broken in r33920
Thanks Russell Senior for reporting this. git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34175 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--target/linux/brcm47xx/patches-3.3/820-wgt634u-nvram-fix.patch19
1 files changed, 10 insertions, 9 deletions
diff --git a/target/linux/brcm47xx/patches-3.3/820-wgt634u-nvram-fix.patch b/target/linux/brcm47xx/patches-3.3/820-wgt634u-nvram-fix.patch
index 0aef7952d1..c2da5e0770 100644
--- a/target/linux/brcm47xx/patches-3.3/820-wgt634u-nvram-fix.patch
+++ b/target/linux/brcm47xx/patches-3.3/820-wgt634u-nvram-fix.patch
@@ -254,10 +254,10 @@ out the configuration than the in kernel cfe config reader.
static u32 find_nvram_size(u32 end)
{
-@@ -59,6 +61,25 @@ static void early_nvram_init_fill(u32 ba
- }
- off <<= 1;
- }
+@@ -47,6 +49,26 @@ static void early_nvram_init_fill(u32 ba
+ u32 *src, *dst;
+ u32 size;
+
+ cfe_env = 0;
+
+ /* XXX: hack for supporting the CFE environment stuff on WGT634U */
@@ -277,10 +277,11 @@ out the configuration than the in kernel cfe config reader.
+ return;
+ }
+ }
-
- /* Try embedded NVRAM at 4 KB and 1 KB as last resorts */
- header = (struct nvram_header *) KSEG1ADDR(base + 4096);
-@@ -166,6 +187,12 @@ int nvram_getenv(char *name, char *val,
++
+ /* TODO: when nvram is on nand flash check for bad blocks first. */
+ off = FLASH_MIN;
+ while (off <= lim) {
+@@ -166,6 +188,12 @@ int nvram_getenv(char *name, char *val,
if (!nvram_buf[0])
early_nvram_init();
@@ -293,7 +294,7 @@ out the configuration than the in kernel cfe config reader.
/* Look for name=value and return value */
var = &nvram_buf[sizeof(struct nvram_header)];
end = nvram_buf + sizeof(nvram_buf) - 2;
-@@ -194,6 +221,9 @@ char *nvram_get(const char *name)
+@@ -194,6 +222,9 @@ char *nvram_get(const char *name)
if (!nvram_buf[0])
early_nvram_init();