summaryrefslogtreecommitdiff
path: root/target/linux
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2013-04-06 19:02:25 +0000
committerHauke Mehrtens <hauke@hauke-m.de>2013-04-06 19:02:25 +0000
commit204bde8d98c3ef9e0c03c55ed6700f4deaa1089a (patch)
tree569027b9a2c7608dd7b5990014d9658a162e65db /target/linux
parentd45ef216e66e2b6e68175da675a46d7b261d6598 (diff)
downloadmtk-20170518-204bde8d98c3ef9e0c03c55ed6700f4deaa1089a.zip
mtk-20170518-204bde8d98c3ef9e0c03c55ed6700f4deaa1089a.tar.gz
mtk-20170518-204bde8d98c3ef9e0c03c55ed6700f4deaa1089a.tar.bz2
brcm47xx: fix error in board detection when nvram is not available.
SVN-Revision: 36234
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/brcm47xx/patches-3.6/260-MIPS-BCM47XX-add-board-detection.patch6
-rw-r--r--target/linux/brcm47xx/patches-3.8/260-MIPS-BCM47XX-add-board-detection.patch6
2 files changed, 8 insertions, 4 deletions
diff --git a/target/linux/brcm47xx/patches-3.6/260-MIPS-BCM47XX-add-board-detection.patch b/target/linux/brcm47xx/patches-3.6/260-MIPS-BCM47XX-add-board-detection.patch
index ec307b1..08c0a97 100644
--- a/target/linux/brcm47xx/patches-3.6/260-MIPS-BCM47XX-add-board-detection.patch
+++ b/target/linux/brcm47xx/patches-3.6/260-MIPS-BCM47XX-add-board-detection.patch
@@ -8,7 +8,7 @@
obj-$(CONFIG_BCM47XX_SSB) += wgt634u.o
--- /dev/null
+++ b/arch/mips/bcm47xx/board.c
-@@ -0,0 +1,220 @@
+@@ -0,0 +1,222 @@
+#include <linux/export.h>
+#include <linux/string.h>
+#include <bcm47xx_board.h>
@@ -209,8 +209,10 @@
+ if (bcm47xx_board != NULL)
+ return;
+ /* check if the nvram is available */
-+ if (bcm47xx_nvram_getenv("boardtype", buf, sizeof(buf)) == -ENXIO)
++ if (bcm47xx_nvram_getenv("boardtype", buf, sizeof(buf)) == -ENXIO) {
++ bcm47xx_board = bcm47xx_board_unknown;
+ return;
++ }
+
+ bcm47xx_board = bcm47xx_board_get_nvram();
+ pr_info("Found board: \"%s\"\n", bcm47xx_board->name);
diff --git a/target/linux/brcm47xx/patches-3.8/260-MIPS-BCM47XX-add-board-detection.patch b/target/linux/brcm47xx/patches-3.8/260-MIPS-BCM47XX-add-board-detection.patch
index ec307b1..08c0a97 100644
--- a/target/linux/brcm47xx/patches-3.8/260-MIPS-BCM47XX-add-board-detection.patch
+++ b/target/linux/brcm47xx/patches-3.8/260-MIPS-BCM47XX-add-board-detection.patch
@@ -8,7 +8,7 @@
obj-$(CONFIG_BCM47XX_SSB) += wgt634u.o
--- /dev/null
+++ b/arch/mips/bcm47xx/board.c
-@@ -0,0 +1,220 @@
+@@ -0,0 +1,222 @@
+#include <linux/export.h>
+#include <linux/string.h>
+#include <bcm47xx_board.h>
@@ -209,8 +209,10 @@
+ if (bcm47xx_board != NULL)
+ return;
+ /* check if the nvram is available */
-+ if (bcm47xx_nvram_getenv("boardtype", buf, sizeof(buf)) == -ENXIO)
++ if (bcm47xx_nvram_getenv("boardtype", buf, sizeof(buf)) == -ENXIO) {
++ bcm47xx_board = bcm47xx_board_unknown;
+ return;
++ }
+
+ bcm47xx_board = bcm47xx_board_get_nvram();
+ pr_info("Found board: \"%s\"\n", bcm47xx_board->name);