aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm47xx
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@openwrt.org>2013-11-11 23:04:00 +0000
committerHauke Mehrtens <hauke@openwrt.org>2013-11-11 23:04:00 +0000
commit602224b52dfce2d28abcf2226d1bbc4bbb39160d (patch)
treecb7b0129004a29cd819e74fa818189ad882e7a44 /target/linux/brcm47xx
parentf82ba9565701eb3c9fb2e8db69b756d1e31c6bff (diff)
downloadmaster-187ad058-602224b52dfce2d28abcf2226d1bbc4bbb39160d.tar.gz
master-187ad058-602224b52dfce2d28abcf2226d1bbc4bbb39160d.tar.bz2
master-187ad058-602224b52dfce2d28abcf2226d1bbc4bbb39160d.zip
linux/brcm47xx : Belkin F7Dx30x board detection
boardnum is unstable, so allow using NULL to make it unchecked. A method for differentiating F7D3301 from F7D3302 using nvram is unknown at this point. Reading the first 32bits of magic from the "linux" mtd partition would do the trick, but these 2 are similar enough that we don't need separate led/button definitions. Not knowing which one you have is only a usability issue for upgrading the device: they expect different magic numbers for their trx images. Signed-off-by: Cody P Schafer <devel@codyps.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38767 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/brcm47xx')
-rw-r--r--target/linux/brcm47xx/patches-3.10/076-MIPS-BCM47XX-fix-detection-of-some-boards-2.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/target/linux/brcm47xx/patches-3.10/076-MIPS-BCM47XX-fix-detection-of-some-boards-2.patch b/target/linux/brcm47xx/patches-3.10/076-MIPS-BCM47XX-fix-detection-of-some-boards-2.patch
new file mode 100644
index 0000000000..f3306693c2
--- /dev/null
+++ b/target/linux/brcm47xx/patches-3.10/076-MIPS-BCM47XX-fix-detection-of-some-boards-2.patch
@@ -0,0 +1,33 @@
+--- a/arch/mips/bcm47xx/board.c
++++ b/arch/mips/bcm47xx/board.c
+@@ -180,6 +180,7 @@ struct bcm47xx_board_type_list3 bcm47xx_
+ {{BCM47XX_BOARD_ZTE_H218N, "ZTE H218N"}, "0x053d", "1234", "0x1305"},
+ {{BCM47XX_BOARD_NETGEAR_WNR3500L, "Netgear WNR3500L"}, "0x04CF", "3500", "02"},
+ {{BCM47XX_BOARD_LINKSYS_WRT54GSV1, "Linksys WRT54GS V1"}, "0x0101", "42", "0x10"},
++ {{BCM47XX_BOARD_BELKIN_F7D330X, "Belkin F7D330X"}, "0xa4cf", NULL, "0x1102" },
+ { {0}, 0},
+ };
+
+@@ -270,9 +271,9 @@ static __init const struct bcm47xx_board
+ bcm47xx_nvram_getenv("boardnum", buf2, sizeof(buf2)) >= 0 &&
+ bcm47xx_nvram_getenv("boardrev", buf3, sizeof(buf3)) >= 0) {
+ for (e3 = bcm47xx_board_list_board; e3->value1; e3++) {
+- if (!strcmp(buf1, e3->value1) &&
+- !strcmp(buf2, e3->value2) &&
+- !strcmp(buf3, e3->value3))
++ if ((!e3->value1 || !strcmp(buf1, e3->value1)) &&
++ (!e3->value2 || !strcmp(buf2, e3->value2)) &&
++ (!e3->value3 || !strcmp(buf3, e3->value3)))
+ return &e3->board;
+ }
+ }
+--- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
++++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
+@@ -28,6 +28,7 @@ enum bcm47xx_board {
+ BCM47XX_BOARD_ASUS_WLHDD,
+
+ BCM47XX_BOARD_BELKIN_F7D4301,
++ BCM47XX_BOARD_BELKIN_F7D330X,
+
+ BCM47XX_BOARD_BUFFALO_WBR2_G54,
+ BCM47XX_BOARD_BUFFALO_WHR2_A54G54,