summaryrefslogtreecommitdiff
path: root/target/linux/brcm47xx
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2012-03-29 15:43:16 +0000
committerHauke Mehrtens <hauke@hauke-m.de>2012-03-29 15:43:16 +0000
commit9992ce3a51bd8a35fb62fa699dc1c85865bafb66 (patch)
tree9957d69db98cc5581606c6e8daed110f5bf23c60 /target/linux/brcm47xx
parent5f87ce91505792bc1482e1f62a8f1c1691d948d7 (diff)
downloadmtk-20170518-9992ce3a51bd8a35fb62fa699dc1c85865bafb66.zip
mtk-20170518-9992ce3a51bd8a35fb62fa699dc1c85865bafb66.tar.gz
mtk-20170518-9992ce3a51bd8a35fb62fa699dc1c85865bafb66.tar.bz2
brcm47xx: add missing breaks into the nvram read code in the switch case statements
SVN-Revision: 31142
Diffstat (limited to 'target/linux/brcm47xx')
-rw-r--r--target/linux/brcm47xx/patches-3.2/029-bcm47xx-read-nvram-from-sflash.patch6
-rw-r--r--target/linux/brcm47xx/patches-3.2/030-bcm47xx-bcma-nandflash.patch5
-rw-r--r--target/linux/brcm47xx/patches-3.2/197-MIPS-BCM47XX-return-number-of-written-bytes-in-nvram.patch2
-rw-r--r--target/linux/brcm47xx/patches-3.2/400-arch-bcm47xx.patch2
-rw-r--r--target/linux/brcm47xx/patches-3.2/820-wgt634u-nvram-fix.patch4
5 files changed, 12 insertions, 7 deletions
diff --git a/target/linux/brcm47xx/patches-3.2/029-bcm47xx-read-nvram-from-sflash.patch b/target/linux/brcm47xx/patches-3.2/029-bcm47xx-read-nvram-from-sflash.patch
index 2fc43dc..b3d13df 100644
--- a/target/linux/brcm47xx/patches-3.2/029-bcm47xx-read-nvram-from-sflash.patch
+++ b/target/linux/brcm47xx/patches-3.2/029-bcm47xx-read-nvram-from-sflash.patch
@@ -24,7 +24,7 @@
base = bcma_cc->pflash.window;
lim = bcma_cc->pflash.window_size;
break;
-@@ -86,7 +84,106 @@ found:
+@@ -86,7 +84,110 @@ found:
for (i = 0; i < sizeof(struct nvram_header); i += 4)
*dst++ = *src++;
for (; i < header->len && i < NVRAM_SPACE; i += 4)
@@ -87,10 +87,12 @@
+ switch (bcm47xx_bus.ssb.chipco.flash_type) {
+ case SSB_PFLASH:
+ early_nvram_init_pflash();
++ break;
+ case SSB_SFLASH:
+ err = early_nvram_init_sflash();
+ if (err < 0)
+ printk(KERN_WARNING "can not read from flash: %i\n", err);
++ break;
+ default:
+ printk(KERN_WARNING "unknow flash type\n");
+ }
@@ -105,10 +107,12 @@
+ switch (bcm47xx_bus.bcma.bus.drv_cc.flash_type) {
+ case BCMA_PFLASH:
+ early_nvram_init_pflash();
++ break;
+ case BCMA_SFLASH:
+ err = early_nvram_init_sflash();
+ if (err < 0)
+ printk(KERN_WARNING "can not read from flash: %i\n", err);
++ break;
+ default:
+ printk(KERN_WARNING "unknow flash type\n");
+ }
diff --git a/target/linux/brcm47xx/patches-3.2/030-bcm47xx-bcma-nandflash.patch b/target/linux/brcm47xx/patches-3.2/030-bcm47xx-bcma-nandflash.patch
index c9922a8..cc76f83 100644
--- a/target/linux/brcm47xx/patches-3.2/030-bcm47xx-bcma-nandflash.patch
+++ b/target/linux/brcm47xx/patches-3.2/030-bcm47xx-bcma-nandflash.patch
@@ -98,14 +98,15 @@
#ifdef CONFIG_BCM47XX_SSB
static void early_nvram_init_ssb(void)
{
-@@ -164,6 +211,10 @@ static void early_nvram_init_bcma(void)
- err = early_nvram_init_sflash();
+@@ -168,6 +215,11 @@ static void early_nvram_init_bcma(void)
if (err < 0)
printk(KERN_WARNING "can not read from flash: %i\n", err);
+ break;
+ case BCMA_NFLASH:
+ err = early_nvram_init_nflash();
+ if (err < 0)
+ printk(KERN_WARNING "can not read from nflash: %i\n", err);
++ break;
default:
printk(KERN_WARNING "unknow flash type\n");
}
diff --git a/target/linux/brcm47xx/patches-3.2/197-MIPS-BCM47XX-return-number-of-written-bytes-in-nvram.patch b/target/linux/brcm47xx/patches-3.2/197-MIPS-BCM47XX-return-number-of-written-bytes-in-nvram.patch
index 78ebea5..4c4507c 100644
--- a/target/linux/brcm47xx/patches-3.2/197-MIPS-BCM47XX-return-number-of-written-bytes-in-nvram.patch
+++ b/target/linux/brcm47xx/patches-3.2/197-MIPS-BCM47XX-return-number-of-written-bytes-in-nvram.patch
@@ -1,7 +1,7 @@
--- a/arch/mips/bcm47xx/nvram.c
+++ b/arch/mips/bcm47xx/nvram.c
-@@ -258,8 +258,7 @@ int nvram_getenv(char *name, char *val,
+@@ -263,8 +263,7 @@ int nvram_getenv(char *name, char *val,
value = eq + 1;
if ((eq - var) == strlen(name) &&
strncmp(var, name, (eq - var)) == 0) {
diff --git a/target/linux/brcm47xx/patches-3.2/400-arch-bcm47xx.patch b/target/linux/brcm47xx/patches-3.2/400-arch-bcm47xx.patch
index a67d4b5..0933fb6 100644
--- a/target/linux/brcm47xx/patches-3.2/400-arch-bcm47xx.patch
+++ b/target/linux/brcm47xx/patches-3.2/400-arch-bcm47xx.patch
@@ -1,6 +1,6 @@
--- a/arch/mips/bcm47xx/nvram.c
+++ b/arch/mips/bcm47xx/nvram.c
-@@ -264,3 +264,30 @@ int nvram_getenv(char *name, char *val,
+@@ -269,3 +269,30 @@ int nvram_getenv(char *name, char *val,
return NVRAM_ERR_ENVNOTFOUND;
}
EXPORT_SYMBOL(nvram_getenv);
diff --git a/target/linux/brcm47xx/patches-3.2/820-wgt634u-nvram-fix.patch b/target/linux/brcm47xx/patches-3.2/820-wgt634u-nvram-fix.patch
index dff1949..baf339d 100644
--- a/target/linux/brcm47xx/patches-3.2/820-wgt634u-nvram-fix.patch
+++ b/target/linux/brcm47xx/patches-3.2/820-wgt634u-nvram-fix.patch
@@ -280,7 +280,7 @@ out the configuration than the in kernel cfe config reader.
off = FLASH_MIN;
while (off <= lim) {
-@@ -247,6 +268,12 @@ int nvram_getenv(char *name, char *val,
+@@ -252,6 +273,12 @@ int nvram_getenv(char *name, char *val,
if (!nvram_buf[0])
early_nvram_init();
@@ -293,7 +293,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;
-@@ -275,6 +302,9 @@ char *nvram_get(const char *name)
+@@ -280,6 +307,9 @@ char *nvram_get(const char *name)
if (!nvram_buf[0])
early_nvram_init();