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-04-01 20:23:37 +0000
committerRafał Miłecki <zajec5@gmail.com>2015-04-01 20:23:37 +0000
commitf7a510882f94bf60afcaf5e37f276ff896b12140 (patch)
treefcf24b7effb515405a9d2a809e67df0c6859cf30 /target/linux/brcm47xx/patches-3.18/820-wgt634u-nvram-fix.patch
parentee006ddf86516380f1e3560c464be1c01cd48a18 (diff)
downloadmaster-187ad058-f7a510882f94bf60afcaf5e37f276ff896b12140.tar.gz
master-187ad058-f7a510882f94bf60afcaf5e37f276ff896b12140.tar.bz2
master-187ad058-f7a510882f94bf60afcaf5e37f276ff896b12140.zip
brcm47xx: backport two MIPS nvram.c patches
Also replace SPROM patch with (the same) mainlined version. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45227 3c298f89-4303-0410-b956-a3cf2f4a3e73
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.patch11
1 files changed, 5 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 ea002fe732..818641bcbe 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
@@ -12,7 +12,7 @@ out the configuration than the in kernel cfe config reader.
+obj-y += cfe_env.o
--- /dev/null
+++ b/arch/mips/bcm47xx/cfe_env.c
-@@ -0,0 +1,229 @@
+@@ -0,0 +1,228 @@
+/*
+ * CFE environment variable access
+ *
@@ -138,8 +138,7 @@ out the configuration than the in kernel cfe config reader.
+ * @return value of variable or NULL if undefined
+ */
+
-+char*
-+cfe_env_get(unsigned char *nv_buf, char* name)
++char *cfe_env_get(unsigned char *nv_buf, const char *name)
+{
+ int size;
+ unsigned char *buffer;
@@ -244,7 +243,7 @@ out the configuration than the in kernel cfe config reader.
+
--- a/arch/mips/bcm47xx/nvram.c
+++ b/arch/mips/bcm47xx/nvram.c
-@@ -22,6 +22,8 @@
+@@ -33,6 +33,8 @@ struct nvram_header {
static char nvram_buf[NVRAM_SPACE];
static const u32 nvram_sizes[] = {0x8000, 0xF000, 0x10000};
@@ -253,7 +252,7 @@ out the configuration than the in kernel cfe config reader.
static u32 find_nvram_size(void __iomem *end)
{
-@@ -51,6 +53,26 @@ static int nvram_find_and_copy(void __io
+@@ -62,6 +64,26 @@ static int nvram_find_and_copy(void __io
return -EEXIST;
}
@@ -280,7 +279,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) {
-@@ -142,6 +164,13 @@ int bcm47xx_nvram_getenv(char *name, cha
+@@ -189,6 +211,13 @@ int bcm47xx_nvram_getenv(const char *nam
return err;
}