MIPS: BCM47XX: add Microsoft MN-700 and Asus WL500G
This patch adds detection for the Microsoft MN-700 and the Asus WL500G router. This is based on some old code from OpenWrt. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Cc: zajec5@gmail.com Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/7490/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
This commit is contained in:

committed by
Ralf Baechle

parent
103c0bf3ff
commit
250dc03727
@@ -80,6 +80,14 @@ struct bcm47xx_board_type_list1 bcm47xx_board_list_hardware_version[] __initcons
|
||||
{ {0}, NULL},
|
||||
};
|
||||
|
||||
/* hardware_version, boardnum */
|
||||
static const
|
||||
struct bcm47xx_board_type_list2 bcm47xx_board_list_hw_version_num[] __initconst = {
|
||||
{{BCM47XX_BOARD_MICROSOFT_MN700, "Microsoft MN-700"}, "WL500-", "mn700"},
|
||||
{{BCM47XX_BOARD_ASUS_WL500G, "Asus WL500G"}, "WL500-", "asusX"},
|
||||
{ {0}, NULL},
|
||||
};
|
||||
|
||||
/* productid */
|
||||
static const
|
||||
struct bcm47xx_board_type_list1 bcm47xx_board_list_productid[] __initconst = {
|
||||
@@ -237,6 +245,15 @@ static __init const struct bcm47xx_board_type *bcm47xx_board_get_nvram(void)
|
||||
}
|
||||
}
|
||||
|
||||
if (bcm47xx_nvram_getenv("hardware_version", buf1, sizeof(buf1)) >= 0 &&
|
||||
bcm47xx_nvram_getenv("boardtype", buf2, sizeof(buf2)) >= 0) {
|
||||
for (e2 = bcm47xx_board_list_boot_hw; e2->value1; e2++) {
|
||||
if (!strstarts(buf1, e2->value1) &&
|
||||
!strcmp(buf2, e2->value2))
|
||||
return &e2->board;
|
||||
}
|
||||
}
|
||||
|
||||
if (bcm47xx_nvram_getenv("productid", buf1, sizeof(buf1)) >= 0) {
|
||||
for (e1 = bcm47xx_board_list_productid; e1->value1; e1++) {
|
||||
if (!strcmp(buf1, e1->value1))
|
||||
|
Reference in New Issue
Block a user