brcm47xx: apply serial flash size trick to Netgear WNR1000 V3

It also uses different block size just like WGR614 V10.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 46810
lede-17.01
Rafał Miłecki 2015-09-08 05:24:57 +00:00
parent d196b1fc2e
commit bda4c3d5e5
2 changed files with 6 additions and 4 deletions

View File

@ -35,7 +35,7 @@ Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
static const struct bcma_sflash_tbl_e bcma_sflash_sst_tbl[] = { static const struct bcma_sflash_tbl_e bcma_sflash_sst_tbl[] = {
{ "SST25WF512", 1, 0x1000, 16, }, { "SST25WF512", 1, 0x1000, 16, },
{ "SST25VF512", 0x48, 0x1000, 16, }, { "SST25VF512", 0x48, 0x1000, 16, },
@@ -84,6 +92,23 @@ static void bcma_sflash_cmd(struct bcma_ @@ -84,6 +92,24 @@ static void bcma_sflash_cmd(struct bcma_
bcma_err(cc->core->bus, "SFLASH control command failed (timeout)!\n"); bcma_err(cc->core->bus, "SFLASH control command failed (timeout)!\n");
} }
@ -46,6 +46,7 @@ Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
+ +
+ switch (board) { + switch (board) {
+ case BCM47XX_BOARD_NETGEAR_WGR614_V10: + case BCM47XX_BOARD_NETGEAR_WGR614_V10:
+ case BCM47XX_BOARD_NETGEAR_WNR1000_V3:
+ for (e = bcma_sflash_st_shrink_tbl; e->name; e++) { + for (e = bcma_sflash_st_shrink_tbl; e->name; e++) {
+ if (e->id == id) + if (e->id == id)
+ return e; + return e;
@ -59,7 +60,7 @@ Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
/* Initialize serial flash access */ /* Initialize serial flash access */
int bcma_sflash_init(struct bcma_drv_cc *cc) int bcma_sflash_init(struct bcma_drv_cc *cc)
{ {
@@ -114,6 +139,10 @@ int bcma_sflash_init(struct bcma_drv_cc @@ -114,6 +140,10 @@ int bcma_sflash_init(struct bcma_drv_cc
case 0x13: case 0x13:
return -ENOTSUPP; return -ENOTSUPP;
default: default:

View File

@ -35,7 +35,7 @@ Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
static const struct bcma_sflash_tbl_e bcma_sflash_sst_tbl[] = { static const struct bcma_sflash_tbl_e bcma_sflash_sst_tbl[] = {
{ "SST25WF512", 1, 0x1000, 16, }, { "SST25WF512", 1, 0x1000, 16, },
{ "SST25VF512", 0x48, 0x1000, 16, }, { "SST25VF512", 0x48, 0x1000, 16, },
@@ -84,6 +92,23 @@ static void bcma_sflash_cmd(struct bcma_ @@ -84,6 +92,24 @@ static void bcma_sflash_cmd(struct bcma_
bcma_err(cc->core->bus, "SFLASH control command failed (timeout)!\n"); bcma_err(cc->core->bus, "SFLASH control command failed (timeout)!\n");
} }
@ -46,6 +46,7 @@ Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
+ +
+ switch (board) { + switch (board) {
+ case BCM47XX_BOARD_NETGEAR_WGR614_V10: + case BCM47XX_BOARD_NETGEAR_WGR614_V10:
+ case BCM47XX_BOARD_NETGEAR_WNR1000_V3:
+ for (e = bcma_sflash_st_shrink_tbl; e->name; e++) { + for (e = bcma_sflash_st_shrink_tbl; e->name; e++) {
+ if (e->id == id) + if (e->id == id)
+ return e; + return e;
@ -59,7 +60,7 @@ Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
/* Initialize serial flash access */ /* Initialize serial flash access */
int bcma_sflash_init(struct bcma_drv_cc *cc) int bcma_sflash_init(struct bcma_drv_cc *cc)
{ {
@@ -114,6 +139,10 @@ int bcma_sflash_init(struct bcma_drv_cc @@ -114,6 +140,10 @@ int bcma_sflash_init(struct bcma_drv_cc
case 0x13: case 0x13:
return -ENOTSUPP; return -ENOTSUPP;
default: default: