* [PATCH 1/4] MIPS: BCM47XX: add Belkin F7Dxxxx board detection
@ 2014-01-02 18:25 Hauke Mehrtens
2014-01-02 18:25 ` [PATCH 2/4] MIPS: BCM47XX: fix detection for some boards Hauke Mehrtens
` (3 more replies)
0 siblings, 4 replies; 13+ messages in thread
From: Hauke Mehrtens @ 2014-01-02 18:25 UTC (permalink / raw)
To: ralf, blogic; +Cc: linux-mips, zajec5, Hauke Mehrtens, Cody P Schafer
From: Cody P Schafer <devel@codyps.com>
Add a few Belkin F7Dxxxx entries, with F7D4401 sourced from online
documentation and the "F7D7302" being observed. F7D3301, F7D3302, and
F7D4302 are reasonable guesses which are unlikely to cause
mis-detection.
It also appears that at least the F7D3302, F7D3301, F7D7301, and F7D7302
have a shared boardtype and boardrev, so use that as a fallback to a
"generic" F7Dxxxx board.
Signed-off-by: Cody P Schafer <devel@codyps.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
arch/mips/bcm47xx/board.c | 12 +++++++++---
arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h | 5 +++++
2 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/arch/mips/bcm47xx/board.c b/arch/mips/bcm47xx/board.c
index f3f6bfe..b790bb7 100644
--- a/arch/mips/bcm47xx/board.c
+++ b/arch/mips/bcm47xx/board.c
@@ -65,7 +65,12 @@ struct bcm47xx_board_type_list1 bcm47xx_board_list_hardware_version[] __initcons
{{BCM47XX_BOARD_ASUS_WL500W, "Asus WL500W"}, "WL500gW-"},
{{BCM47XX_BOARD_ASUS_WL520GC, "Asus WL520GC"}, "WL520GC-"},
{{BCM47XX_BOARD_ASUS_WL520GU, "Asus WL520GU"}, "WL520GU-"},
+ {{BCM47XX_BOARD_BELKIN_F7D3301, "Belkin F7D3301"}, "F7D3301"},
+ {{BCM47XX_BOARD_BELKIN_F7D3302, "Belkin F7D3302"}, "F7D3302"},
+ {{BCM47XX_BOARD_BELKIN_F7D3302, "Belkin F7D7302"}, "F7D7302 v1"},
{{BCM47XX_BOARD_BELKIN_F7D4301, "Belkin F7D4301"}, "F7D4301"},
+ {{BCM47XX_BOARD_BELKIN_F7D4302, "Belkin F7D4302"}, "F7D4302"},
+ {{BCM47XX_BOARD_BELKIN_F7D4401, "Belkin F7D4401"}, "F7D4401"},
{ {0}, 0},
};
@@ -174,6 +179,7 @@ struct bcm47xx_board_type_list3 bcm47xx_board_list_board[] __initconst = {
{{BCM47XX_BOARD_HUAWEI_E970, "Huawei E970"}, "0x048e", "0x5347", "0x11"},
{{BCM47XX_BOARD_PHICOMM_M1, "Phicomm M1"}, "0x0590", "80", "0x1104"},
{{BCM47XX_BOARD_ZTE_H218N, "ZTE H218N"}, "0x053d", "1234", "0x1305"},
+ {{BCM47XX_BOARD_BELKIN_F7DXXXX, "Belkin F7Dxxxx"}, "0xa4cf", NULL, "0x1102"},
{ {0}, 0},
};
@@ -264,9 +270,9 @@ static __init const struct bcm47xx_board_type *bcm47xx_board_get_nvram(void)
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;
}
}
diff --git a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
index 00867dd..aa500f8 100644
--- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
+++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
@@ -27,7 +27,12 @@ enum bcm47xx_board {
BCM47XX_BOARD_ASUS_WL700GE,
BCM47XX_BOARD_ASUS_WLHDD,
+ BCM47XX_BOARD_BELKIN_F7DXXXX,
+ BCM47XX_BOARD_BELKIN_F7D3301,
+ BCM47XX_BOARD_BELKIN_F7D3302,
BCM47XX_BOARD_BELKIN_F7D4301,
+ BCM47XX_BOARD_BELKIN_F7D4302,
+ BCM47XX_BOARD_BELKIN_F7D4401,
BCM47XX_BOARD_BUFFALO_WBR2_G54,
BCM47XX_BOARD_BUFFALO_WHR2_A54G54,
--
1.7.10.4
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 2/4] MIPS: BCM47XX: fix detection for some boards
2014-01-02 18:25 [PATCH 1/4] MIPS: BCM47XX: add Belkin F7Dxxxx board detection Hauke Mehrtens
@ 2014-01-02 18:25 ` Hauke Mehrtens
2014-01-02 20:47 ` Rafał Miłecki
2014-01-02 18:25 ` [PATCH 3/4] MIPS: BCM47XX: add board detection for Linksys WRT54GS V1 Hauke Mehrtens
` (2 subsequent siblings)
3 siblings, 1 reply; 13+ messages in thread
From: Hauke Mehrtens @ 2014-01-02 18:25 UTC (permalink / raw)
To: ralf, blogic; +Cc: linux-mips, zajec5, Hauke Mehrtens
When a nvram reset was performed from CFE, it sometimes does not
contain the productid value in nvram, but it still contains
hardware_version.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
arch/mips/bcm47xx/board.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/mips/bcm47xx/board.c b/arch/mips/bcm47xx/board.c
index b790bb7..44e0a99 100644
--- a/arch/mips/bcm47xx/board.c
+++ b/arch/mips/bcm47xx/board.c
@@ -56,6 +56,10 @@ struct bcm47xx_board_type_list1 bcm47xx_board_list_machine_name[] __initconst =
/* hardware_version */
static const
struct bcm47xx_board_type_list1 bcm47xx_board_list_hardware_version[] __initconst = {
+ {{BCM47XX_BOARD_ASUS_RTN10U, "Asus RT-N10U"}, "RTN10U"},
+ {{BCM47XX_BOARD_ASUS_RTN12, "Asus RT-N12"}, "RT-N12"},
+ {{BCM47XX_BOARD_ASUS_RTN12D1, "Asus RT-N12D1"}, "RTN12D1"},
+ {{BCM47XX_BOARD_ASUS_RTN12B1, "Asus RT-N12B1"}, "RTN12B1"},
{{BCM47XX_BOARD_ASUS_RTN16, "Asus RT-N16"}, "RT-N16-"},
{{BCM47XX_BOARD_ASUS_WL320GE, "Asus WL320GE"}, "WL320G-"},
{{BCM47XX_BOARD_ASUS_WL330GE, "Asus WL330GE"}, "WL330GE-"},
@@ -179,6 +183,7 @@ struct bcm47xx_board_type_list3 bcm47xx_board_list_board[] __initconst = {
{{BCM47XX_BOARD_HUAWEI_E970, "Huawei E970"}, "0x048e", "0x5347", "0x11"},
{{BCM47XX_BOARD_PHICOMM_M1, "Phicomm M1"}, "0x0590", "80", "0x1104"},
{{BCM47XX_BOARD_ZTE_H218N, "ZTE H218N"}, "0x053d", "1234", "0x1305"},
+ {{BCM47XX_BOARD_NETGEAR_WNR3500L, "Netgear WNR3500L"}, "0x04CF", "3500", "02"},
{{BCM47XX_BOARD_BELKIN_F7DXXXX, "Belkin F7Dxxxx"}, "0xa4cf", NULL, "0x1102"},
{ {0}, 0},
};
--
1.7.10.4
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 3/4] MIPS: BCM47XX: add board detection for Linksys WRT54GS V1
2014-01-02 18:25 [PATCH 1/4] MIPS: BCM47XX: add Belkin F7Dxxxx board detection Hauke Mehrtens
2014-01-02 18:25 ` [PATCH 2/4] MIPS: BCM47XX: fix detection for some boards Hauke Mehrtens
@ 2014-01-02 18:25 ` Hauke Mehrtens
2014-01-02 20:53 ` Rafał Miłecki
2014-01-02 18:25 ` [PATCH 4/4] MIPS: BCM47XX: fix sparse warnings in board.c Hauke Mehrtens
2014-01-02 21:35 ` [PATCH 1/4] MIPS: BCM47XX: add Belkin F7Dxxxx board detection Rafał Miłecki
3 siblings, 1 reply; 13+ messages in thread
From: Hauke Mehrtens @ 2014-01-02 18:25 UTC (permalink / raw)
To: ralf, blogic; +Cc: linux-mips, zajec5, Hauke Mehrtens
This adds board detection for Linksys WRT54GS V1.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
arch/mips/bcm47xx/board.c | 1 +
arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h | 1 +
2 files changed, 2 insertions(+)
diff --git a/arch/mips/bcm47xx/board.c b/arch/mips/bcm47xx/board.c
index 44e0a99..0217273 100644
--- a/arch/mips/bcm47xx/board.c
+++ b/arch/mips/bcm47xx/board.c
@@ -184,6 +184,7 @@ struct bcm47xx_board_type_list3 bcm47xx_board_list_board[] __initconst = {
{{BCM47XX_BOARD_PHICOMM_M1, "Phicomm M1"}, "0x0590", "80", "0x1104"},
{{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_F7DXXXX, "Belkin F7Dxxxx"}, "0xa4cf", NULL, "0x1102"},
{ {0}, 0},
};
diff --git a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
index aa500f8..528ae61 100644
--- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
+++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
@@ -71,6 +71,7 @@ enum bcm47xx_board {
BCM47XX_BOARD_LINKSYS_WRT310NV1,
BCM47XX_BOARD_LINKSYS_WRT310NV2,
BCM47XX_BOARD_LINKSYS_WRT54G3GV2,
+ BCM47XX_BOARD_LINKSYS_WRT54GSV1,
BCM47XX_BOARD_LINKSYS_WRT610NV1,
BCM47XX_BOARD_LINKSYS_WRT610NV2,
BCM47XX_BOARD_LINKSYS_WRTSL54GS,
--
1.7.10.4
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 4/4] MIPS: BCM47XX: fix sparse warnings in board.c
2014-01-02 18:25 [PATCH 1/4] MIPS: BCM47XX: add Belkin F7Dxxxx board detection Hauke Mehrtens
2014-01-02 18:25 ` [PATCH 2/4] MIPS: BCM47XX: fix detection for some boards Hauke Mehrtens
2014-01-02 18:25 ` [PATCH 3/4] MIPS: BCM47XX: add board detection for Linksys WRT54GS V1 Hauke Mehrtens
@ 2014-01-02 18:25 ` Hauke Mehrtens
2014-01-02 21:35 ` [PATCH 1/4] MIPS: BCM47XX: add Belkin F7Dxxxx board detection Rafał Miłecki
3 siblings, 0 replies; 13+ messages in thread
From: Hauke Mehrtens @ 2014-01-02 18:25 UTC (permalink / raw)
To: ralf, blogic; +Cc: linux-mips, zajec5, Hauke Mehrtens
This fixes the following sparse warnings:
arch/mips/bcm47xx/board.c:39:16: warning: Using plain integer as NULL pointer
arch/mips/bcm47xx/board.c:46:16: warning: Using plain integer as NULL pointer
arch/mips/bcm47xx/board.c:53:16: warning: Using plain integer as NULL pointer
arch/mips/bcm47xx/board.c:78:16: warning: Using plain integer as NULL pointer
arch/mips/bcm47xx/board.c:99:16: warning: Using plain integer as NULL pointer
arch/mips/bcm47xx/board.c:109:16: warning: Using plain integer as NULL pointer
arch/mips/bcm47xx/board.c:124:16: warning: Using plain integer as NULL pointer
arch/mips/bcm47xx/board.c:155:16: warning: Using plain integer as NULL pointer
arch/mips/bcm47xx/board.c:177:16: warning: Using plain integer as NULL pointer
arch/mips/bcm47xx/board.c:189:16: warning: Using plain integer as NULL pointer
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
arch/mips/bcm47xx/board.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/arch/mips/bcm47xx/board.c b/arch/mips/bcm47xx/board.c
index 0217273..1ce2ac1 100644
--- a/arch/mips/bcm47xx/board.c
+++ b/arch/mips/bcm47xx/board.c
@@ -36,21 +36,21 @@ static const
struct bcm47xx_board_type_list1 bcm47xx_board_list_model_name[] __initconst = {
{{BCM47XX_BOARD_DLINK_DIR130, "D-Link DIR-130"}, "DIR-130"},
{{BCM47XX_BOARD_DLINK_DIR330, "D-Link DIR-330"}, "DIR-330"},
- { {0}, 0},
+ { {0}, NULL},
};
/* model_no */
static const
struct bcm47xx_board_type_list1 bcm47xx_board_list_model_no[] __initconst = {
{{BCM47XX_BOARD_ASUS_WL700GE, "Asus WL700"}, "WL700"},
- { {0}, 0},
+ { {0}, NULL},
};
/* machine_name */
static const
struct bcm47xx_board_type_list1 bcm47xx_board_list_machine_name[] __initconst = {
{{BCM47XX_BOARD_LINKSYS_WRTSL54GS, "Linksys WRTSL54GS"}, "WRTSL54GS"},
- { {0}, 0},
+ { {0}, NULL},
};
/* hardware_version */
@@ -75,7 +75,7 @@ struct bcm47xx_board_type_list1 bcm47xx_board_list_hardware_version[] __initcons
{{BCM47XX_BOARD_BELKIN_F7D4301, "Belkin F7D4301"}, "F7D4301"},
{{BCM47XX_BOARD_BELKIN_F7D4302, "Belkin F7D4302"}, "F7D4302"},
{{BCM47XX_BOARD_BELKIN_F7D4401, "Belkin F7D4401"}, "F7D4401"},
- { {0}, 0},
+ { {0}, NULL},
};
/* productid */
@@ -96,7 +96,7 @@ struct bcm47xx_board_type_list1 bcm47xx_board_list_productid[] __initconst = {
{{BCM47XX_BOARD_ASUS_RTN66U, "Asus RT-N66U"}, "RT-N66U"},
{{BCM47XX_BOARD_ASUS_WL300G, "Asus WL300G"}, "WL300g"},
{{BCM47XX_BOARD_ASUS_WLHDD, "Asus WLHDD"}, "WLHDD"},
- { {0}, 0},
+ { {0}, NULL},
};
/* ModelId */
@@ -106,7 +106,7 @@ struct bcm47xx_board_type_list1 bcm47xx_board_list_ModelId[] __initconst = {
{{BCM47XX_BOARD_MOTOROLA_WE800G, "Motorola WE800G"}, "WE800G"},
{{BCM47XX_BOARD_MOTOROLA_WR850GP, "Motorola WR850GP"}, "WR850GP"},
{{BCM47XX_BOARD_MOTOROLA_WR850GV2V3, "Motorola WR850G"}, "WR850G"},
- { {0}, 0},
+ { {0}, NULL},
};
/* melco_id or buf1falo_id */
@@ -121,7 +121,7 @@ struct bcm47xx_board_type_list1 bcm47xx_board_list_melco_id[] __initconst = {
{{BCM47XX_BOARD_BUFFALO_WZR_G300N, "Buffalo WZR-G300N"}, "31120"},
{{BCM47XX_BOARD_BUFFALO_WZR_RS_G54, "Buffalo WZR-RS-G54"}, "30083"},
{{BCM47XX_BOARD_BUFFALO_WZR_RS_G54HP, "Buffalo WZR-RS-G54HP"}, "30103"},
- { {0}, 0},
+ { {0}, NULL},
};
/* boot_hw_model, boot_hw_ver */
@@ -152,7 +152,7 @@ struct bcm47xx_board_type_list2 bcm47xx_board_list_boot_hw[] __initconst = {
{{BCM47XX_BOARD_LINKSYS_WRT54G3GV2, "Linksys WRT54G3GV2-VF"}, "WRT54G3GV2-VF", "1.0"},
{{BCM47XX_BOARD_LINKSYS_WRT610NV1, "Linksys WRT610N V1"}, "WRT610N", "1.0"},
{{BCM47XX_BOARD_LINKSYS_WRT610NV2, "Linksys WRT610N V2"}, "WRT610N", "2.0"},
- { {0}, 0},
+ { {0}, NULL},
};
/* board_id */
@@ -174,7 +174,7 @@ struct bcm47xx_board_type_list1 bcm47xx_board_list_board_id[] __initconst = {
{{BCM47XX_BOARD_NETGEAR_WNR3500V2, "Netgear WNR3500 V2"}, "U12H127T00_NETGEAR"},
{{BCM47XX_BOARD_NETGEAR_WNR3500V2VC, "Netgear WNR3500 V2vc"}, "U12H127T70_NETGEAR"},
{{BCM47XX_BOARD_NETGEAR_WNR834BV2, "Netgear WNR834B V2"}, "U12H081T00_NETGEAR"},
- { {0}, 0},
+ { {0}, NULL},
};
/* boardtype, boardnum, boardrev */
@@ -186,7 +186,7 @@ struct bcm47xx_board_type_list3 bcm47xx_board_list_board[] __initconst = {
{{BCM47XX_BOARD_NETGEAR_WNR3500L, "Netgear WNR3500L"}, "0x04CF", "3500", "02"},
{{BCM47XX_BOARD_LINKSYS_WRT54GSV1, "Linksys WRT54GS V1"}, "0x0101", "42", "0x10"},
{{BCM47XX_BOARD_BELKIN_F7DXXXX, "Belkin F7Dxxxx"}, "0xa4cf", NULL, "0x1102"},
- { {0}, 0},
+ { {0}, NULL},
};
static const
--
1.7.10.4
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH 2/4] MIPS: BCM47XX: fix detection for some boards
2014-01-02 18:25 ` [PATCH 2/4] MIPS: BCM47XX: fix detection for some boards Hauke Mehrtens
@ 2014-01-02 20:47 ` Rafał Miłecki
2014-01-02 22:35 ` Hauke Mehrtens
0 siblings, 1 reply; 13+ messages in thread
From: Rafał Miłecki @ 2014-01-02 20:47 UTC (permalink / raw)
To: Hauke Mehrtens; +Cc: Ralf Baechle, blogic, linux-mips@linux-mips.org
2014/1/2 Hauke Mehrtens <hauke@hauke-m.de>:
> When a nvram reset was performed from CFE, it sometimes does not
> contain the productid value in nvram, but it still contains
> hardware_version.
It seems you switched to a very solid detection with that.
Why not remove old entries?
--
Rafał
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 3/4] MIPS: BCM47XX: add board detection for Linksys WRT54GS V1
2014-01-02 18:25 ` [PATCH 3/4] MIPS: BCM47XX: add board detection for Linksys WRT54GS V1 Hauke Mehrtens
@ 2014-01-02 20:53 ` Rafał Miłecki
2014-01-02 22:35 ` Hauke Mehrtens
0 siblings, 1 reply; 13+ messages in thread
From: Rafał Miłecki @ 2014-01-02 20:53 UTC (permalink / raw)
To: Hauke Mehrtens; +Cc: Ralf Baechle, blogic, linux-mips@linux-mips.org
2014/1/2 Hauke Mehrtens <hauke@hauke-m.de>:
> This adds board detection for Linksys WRT54GS V1.
Could you check NVRAM for something that could be more model specific?
eou_device_id maybe?
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 1/4] MIPS: BCM47XX: add Belkin F7Dxxxx board detection
2014-01-02 18:25 [PATCH 1/4] MIPS: BCM47XX: add Belkin F7Dxxxx board detection Hauke Mehrtens
` (2 preceding siblings ...)
2014-01-02 18:25 ` [PATCH 4/4] MIPS: BCM47XX: fix sparse warnings in board.c Hauke Mehrtens
@ 2014-01-02 21:35 ` Rafał Miłecki
2014-01-02 22:03 ` Cody P Schafer
3 siblings, 1 reply; 13+ messages in thread
From: Rafał Miłecki @ 2014-01-02 21:35 UTC (permalink / raw)
To: Hauke Mehrtens
Cc: Ralf Baechle, blogic, linux-mips@linux-mips.org, Cody P Schafer
2014/1/2 Hauke Mehrtens <hauke@hauke-m.de>:
> From: Cody P Schafer <devel@codyps.com>
>
> Add a few Belkin F7Dxxxx entries, with F7D4401 sourced from online
> documentation and the "F7D7302" being observed. F7D3301, F7D3302, and
> F7D4302 are reasonable guesses which are unlikely to cause
> mis-detection.
>
> It also appears that at least the F7D3302, F7D3301, F7D7301, and F7D7302
> have a shared boardtype and boardrev, so use that as a fallback to a
> "generic" F7Dxxxx board.
Cody, Hauke: I'm starring at this patch for 10 minutes now and it's
still unclear for me.
You say 3301, 3302, 7301 and 7302 have the same board_* entries
stating they can be treated with a generic ID entry. At the same time
you define BELKIN_F7D3301 and BELKIN_F7D3302... so they are not
identical after all? Finally what about 4302? I can see it's untested,
but for some reason you assign it to the separated enum entry. Is this
not going to share config with the generic ones?
Sorry, but it looks really messy to me.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 1/4] MIPS: BCM47XX: add Belkin F7Dxxxx board detection
2014-01-02 21:35 ` [PATCH 1/4] MIPS: BCM47XX: add Belkin F7Dxxxx board detection Rafał Miłecki
@ 2014-01-02 22:03 ` Cody P Schafer
2014-01-02 22:47 ` Hauke Mehrtens
2014-01-03 6:40 ` Rafał Miłecki
0 siblings, 2 replies; 13+ messages in thread
From: Cody P Schafer @ 2014-01-02 22:03 UTC (permalink / raw)
To: Rafał Miłecki
Cc: Hauke Mehrtens, Ralf Baechle, blogic, linux-mips@linux-mips.org
On Thu, Jan 2, 2014 at 1:35 PM, Rafał Miłecki <zajec5@gmail.com> wrote:
> 2014/1/2 Hauke Mehrtens <hauke@hauke-m.de>:
>> From: Cody P Schafer <devel@codyps.com>
>>
>> Add a few Belkin F7Dxxxx entries, with F7D4401 sourced from online
>> documentation and the "F7D7302" being observed. F7D3301, F7D3302, and
>> F7D4302 are reasonable guesses which are unlikely to cause
>> mis-detection.
>>
>> It also appears that at least the F7D3302, F7D3301, F7D7301, and F7D7302
>> have a shared boardtype and boardrev, so use that as a fallback to a
>> "generic" F7Dxxxx board.
>
> Cody, Hauke: I'm starring at this patch for 10 minutes now and it's
> still unclear for me.
>
> You say 3301, 3302, 7301 and 7302 have the same board_* entries
> stating they can be treated with a generic ID entry.
I included the generic BCM47XX_BOARD_BELKIN_F7DXXXX entry to catch
those boards that we don't yet have specific entries for. It allows us
to get the leds and buttons working mostly correctly.
The specific names are included so that one can determine a more exact
board. The stock CFE requires different images for different boards
even though they are very similar. Hardware variations are simply
gigabit vs 100MB switches, usb port population, led population, and
5Ghz radio population (none of which truly require the greater detail
in board type).
> At the same time
> you define BELKIN_F7D3301 and BELKIN_F7D3302... so they are not
> identical after all?
[rehash of above] They have the same boardtype & boardrev, but
(unfortunately) have different image requirements from the stock CFE.
> Finally what about 4302? I can see it's untested,
> but for some reason you assign it to the separated enum entry. Is this
> not going to share config with the generic ones?
Sorry, I've had this patch go though a couple revisions (adding more
boards), and not all of them made it into the patch description. (4302
is just another variation on the generic f7dxxxx board).
> Sorry, but it looks really messy to me.
We can thank Belkin for that (see CFE issues mentioned above that
cause us to want these more specific BCM47XX_BOARD_* macros).
As an alternate to exposing the specific board names via this
interface, we (openwrt) could use the nvram userspace tool to look for
the specific type (the kernel really only needs the generic one,
unless we want to give a more accurate picture of which LEDs are
populated). Hauke - thoughts?
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 2/4] MIPS: BCM47XX: fix detection for some boards
2014-01-02 20:47 ` Rafał Miłecki
@ 2014-01-02 22:35 ` Hauke Mehrtens
0 siblings, 0 replies; 13+ messages in thread
From: Hauke Mehrtens @ 2014-01-02 22:35 UTC (permalink / raw)
To: Rafał Miłecki; +Cc: Ralf Baechle, blogic, linux-mips@linux-mips.org
On 01/02/2014 09:47 PM, Rafał Miłecki wrote:
> 2014/1/2 Hauke Mehrtens <hauke@hauke-m.de>:
>> When a nvram reset was performed from CFE, it sometimes does not
>> contain the productid value in nvram, but it still contains
>> hardware_version.
>
> It seems you switched to a very solid detection with that.
>
> Why not remove old entries?
>
Yes I will remove them.
Hauke
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 3/4] MIPS: BCM47XX: add board detection for Linksys WRT54GS V1
2014-01-02 20:53 ` Rafał Miłecki
@ 2014-01-02 22:35 ` Hauke Mehrtens
0 siblings, 0 replies; 13+ messages in thread
From: Hauke Mehrtens @ 2014-01-02 22:35 UTC (permalink / raw)
To: Rafał Miłecki; +Cc: Ralf Baechle, blogic, linux-mips@linux-mips.org
On 01/02/2014 09:53 PM, Rafał Miłecki wrote:
> 2014/1/2 Hauke Mehrtens <hauke@hauke-m.de>:
>> This adds board detection for Linksys WRT54GS V1.
>
> Could you check NVRAM for something that could be more model specific?
> eou_device_id maybe?
>
I already did that, but I could not find anything more specific.
This is a very old device, they tried to save space ;-)
Hauke
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 1/4] MIPS: BCM47XX: add Belkin F7Dxxxx board detection
2014-01-02 22:03 ` Cody P Schafer
@ 2014-01-02 22:47 ` Hauke Mehrtens
2014-01-03 6:40 ` Rafał Miłecki
1 sibling, 0 replies; 13+ messages in thread
From: Hauke Mehrtens @ 2014-01-02 22:47 UTC (permalink / raw)
To: Cody P Schafer, Rafał Miłecki
Cc: Ralf Baechle, blogic, linux-mips@linux-mips.org
On 01/02/2014 11:03 PM, Cody P Schafer wrote:
> On Thu, Jan 2, 2014 at 1:35 PM, Rafał Miłecki <zajec5@gmail.com> wrote:
>> 2014/1/2 Hauke Mehrtens <hauke@hauke-m.de>:
>>> From: Cody P Schafer <devel@codyps.com>
>>>
>>> Add a few Belkin F7Dxxxx entries, with F7D4401 sourced from online
>>> documentation and the "F7D7302" being observed. F7D3301, F7D3302, and
>>> F7D4302 are reasonable guesses which are unlikely to cause
>>> mis-detection.
>>>
>>> It also appears that at least the F7D3302, F7D3301, F7D7301, and F7D7302
>>> have a shared boardtype and boardrev, so use that as a fallback to a
>>> "generic" F7Dxxxx board.
>>
>> Cody, Hauke: I'm starring at this patch for 10 minutes now and it's
>> still unclear for me.
>>
>> You say 3301, 3302, 7301 and 7302 have the same board_* entries
>> stating they can be treated with a generic ID entry.
>
> I included the generic BCM47XX_BOARD_BELKIN_F7DXXXX entry to catch
> those boards that we don't yet have specific entries for. It allows us
> to get the leds and buttons working mostly correctly.
>
> The specific names are included so that one can determine a more exact
> board. The stock CFE requires different images for different boards
> even though they are very similar. Hardware variations are simply
> gigabit vs 100MB switches, usb port population, led population, and
> 5Ghz radio population (none of which truly require the greater detail
> in board type).
>
>> At the same time
>> you define BELKIN_F7D3301 and BELKIN_F7D3302... so they are not
>> identical after all?
>
> [rehash of above] They have the same boardtype & boardrev, but
> (unfortunately) have different image requirements from the stock CFE.
>
>> Finally what about 4302? I can see it's untested,
>> but for some reason you assign it to the separated enum entry. Is this
>> not going to share config with the generic ones?
>
> Sorry, I've had this patch go though a couple revisions (adding more
> boards), and not all of them made it into the patch description. (4302
> is just another variation on the generic f7dxxxx board).
>
>> Sorry, but it looks really messy to me.
>
> We can thank Belkin for that (see CFE issues mentioned above that
> cause us to want these more specific BCM47XX_BOARD_* macros).
>
>
> As an alternate to exposing the specific board names via this
> interface, we (openwrt) could use the nvram userspace tool to look for
> the specific type (the kernel really only needs the generic one,
> unless we want to give a more accurate picture of which LEDs are
> populated). Hauke - thoughts?
>
If it is possible to detect the specific board I would go with that. At
least when the led configuration is different we have to do different
things for the different boards. In the current way it does not take a
lot of memory to add a new board to the detect code just some bytes <
50 in init ram. I would remove the generic entry now and leave the
others in, if someone has a different board we can add it.
Hauke
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 1/4] MIPS: BCM47XX: add Belkin F7Dxxxx board detection
2014-01-02 22:03 ` Cody P Schafer
2014-01-02 22:47 ` Hauke Mehrtens
@ 2014-01-03 6:40 ` Rafał Miłecki
2014-01-03 6:43 ` Rafał Miłecki
1 sibling, 1 reply; 13+ messages in thread
From: Rafał Miłecki @ 2014-01-03 6:40 UTC (permalink / raw)
To: Cody P Schafer
Cc: Hauke Mehrtens, Ralf Baechle, blogic, linux-mips@linux-mips.org
2014/1/2 Cody P Schafer <devel@codyps.com>:
> On Thu, Jan 2, 2014 at 1:35 PM, Rafał Miłecki <zajec5@gmail.com> wrote:
>> 2014/1/2 Hauke Mehrtens <hauke@hauke-m.de>:
>>> From: Cody P Schafer <devel@codyps.com>
>>>
>>> Add a few Belkin F7Dxxxx entries, with F7D4401 sourced from online
>>> documentation and the "F7D7302" being observed. F7D3301, F7D3302, and
>>> F7D4302 are reasonable guesses which are unlikely to cause
>>> mis-detection.
>>>
>>> It also appears that at least the F7D3302, F7D3301, F7D7301, and F7D7302
>>> have a shared boardtype and boardrev, so use that as a fallback to a
>>> "generic" F7Dxxxx board.
>>
>> Cody, Hauke: I'm starring at this patch for 10 minutes now and it's
>> still unclear for me.
>>
>> You say 3301, 3302, 7301 and 7302 have the same board_* entries
>> stating they can be treated with a generic ID entry.
>
> I included the generic BCM47XX_BOARD_BELKIN_F7DXXXX entry to catch
> those boards that we don't yet have specific entries for. It allows us
> to get the leds and buttons working mostly correctly.
>
> The specific names are included so that one can determine a more exact
> board. The stock CFE requires different images for different boards
> even though they are very similar. Hardware variations are simply
> gigabit vs 100MB switches, usb port population, led population, and
> 5Ghz radio population (none of which truly require the greater detail
> in board type).
OK, maybe this is sth I'm missing... Why we should care about CFE in
kernel? We don't talk with CFE, do we? So we don't have to know which
device's CFE is that.
--
Rafał
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 1/4] MIPS: BCM47XX: add Belkin F7Dxxxx board detection
2014-01-03 6:40 ` Rafał Miłecki
@ 2014-01-03 6:43 ` Rafał Miłecki
0 siblings, 0 replies; 13+ messages in thread
From: Rafał Miłecki @ 2014-01-03 6:43 UTC (permalink / raw)
To: Cody P Schafer
Cc: Hauke Mehrtens, Ralf Baechle, blogic, linux-mips@linux-mips.org
2014/1/3 Rafał Miłecki <zajec5@gmail.com>:
> 2014/1/2 Cody P Schafer <devel@codyps.com>:
>> On Thu, Jan 2, 2014 at 1:35 PM, Rafał Miłecki <zajec5@gmail.com> wrote:
>>> 2014/1/2 Hauke Mehrtens <hauke@hauke-m.de>:
>>>> From: Cody P Schafer <devel@codyps.com>
>>>>
>>>> Add a few Belkin F7Dxxxx entries, with F7D4401 sourced from online
>>>> documentation and the "F7D7302" being observed. F7D3301, F7D3302, and
>>>> F7D4302 are reasonable guesses which are unlikely to cause
>>>> mis-detection.
>>>>
>>>> It also appears that at least the F7D3302, F7D3301, F7D7301, and F7D7302
>>>> have a shared boardtype and boardrev, so use that as a fallback to a
>>>> "generic" F7Dxxxx board.
>>>
>>> Cody, Hauke: I'm starring at this patch for 10 minutes now and it's
>>> still unclear for me.
>>>
>>> You say 3301, 3302, 7301 and 7302 have the same board_* entries
>>> stating they can be treated with a generic ID entry.
>>
>> I included the generic BCM47XX_BOARD_BELKIN_F7DXXXX entry to catch
>> those boards that we don't yet have specific entries for. It allows us
>> to get the leds and buttons working mostly correctly.
>>
>> The specific names are included so that one can determine a more exact
>> board. The stock CFE requires different images for different boards
>> even though they are very similar. Hardware variations are simply
>> gigabit vs 100MB switches, usb port population, led population, and
>> 5Ghz radio population (none of which truly require the greater detail
>> in board type).
>
> OK, maybe this is sth I'm missing... Why we should care about CFE in
> kernel? We don't talk with CFE, do we? So we don't have to know which
> device's CFE is that.
Also: are the CFEs in 3302 and 7302 identical? Because you use
BCM47XX_BOARD_BELKIN_F7D3302 for both of them.
I'd prefer to see BCM47XX_BOARD_BELKIN_F7DX302, or maybe even better:
two separated entries that can be combined in leds.c and buttons.c.
--
Rafał
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2014-01-03 6:43 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-02 18:25 [PATCH 1/4] MIPS: BCM47XX: add Belkin F7Dxxxx board detection Hauke Mehrtens
2014-01-02 18:25 ` [PATCH 2/4] MIPS: BCM47XX: fix detection for some boards Hauke Mehrtens
2014-01-02 20:47 ` Rafał Miłecki
2014-01-02 22:35 ` Hauke Mehrtens
2014-01-02 18:25 ` [PATCH 3/4] MIPS: BCM47XX: add board detection for Linksys WRT54GS V1 Hauke Mehrtens
2014-01-02 20:53 ` Rafał Miłecki
2014-01-02 22:35 ` Hauke Mehrtens
2014-01-02 18:25 ` [PATCH 4/4] MIPS: BCM47XX: fix sparse warnings in board.c Hauke Mehrtens
2014-01-02 21:35 ` [PATCH 1/4] MIPS: BCM47XX: add Belkin F7Dxxxx board detection Rafał Miłecki
2014-01-02 22:03 ` Cody P Schafer
2014-01-02 22:47 ` Hauke Mehrtens
2014-01-03 6:40 ` Rafał Miłecki
2014-01-03 6:43 ` Rafał Miłecki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox