summaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2012-04-29 02:04:09 +0200
committerJohn W. Linville <linville@tuxdriver.com>2012-05-16 12:45:21 -0400
commita25595562291baea4ccc2ed570dd15c638b67b21 (patch)
treebbbadbd8af780c2e095aa97b6b0334feb5856ce6 /arch/mips
parent0a2fcaa70ce96be6e663234072984fd2b0ffa36e (diff)
downloadtalos-op-linux-a25595562291baea4ccc2ed570dd15c638b67b21.tar.gz
talos-op-linux-a25595562291baea4ccc2ed570dd15c638b67b21.zip
MIPS: bcm47xx: read baordrev without prefix from sprom
When the boardrev with a prefix is not available, try to read it without a prefix. This is based on code from the Broadcom SDK. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Acked-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/bcm47xx/sprom.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/mips/bcm47xx/sprom.c b/arch/mips/bcm47xx/sprom.c
index a29d20743039..17282e0d7835 100644
--- a/arch/mips/bcm47xx/sprom.c
+++ b/arch/mips/bcm47xx/sprom.c
@@ -165,6 +165,8 @@ static void bcm47xx_fill_sprom_r1234589(struct ssb_sprom *sprom,
const char *prefix)
{
nvram_read_u16(prefix, NULL, "boardrev", &sprom->board_rev, 0);
+ if (!sprom->board_rev)
+ nvram_read_u16(NULL, NULL, "boardrev", &sprom->board_rev, 0);
nvram_read_u16(prefix, NULL, "boardnum", &sprom->board_num, 0);
nvram_read_u8(prefix, NULL, "ledbh0", &sprom->gpio0, 0xff);
nvram_read_u8(prefix, NULL, "ledbh1", &sprom->gpio1, 0xff);
OpenPOWER on IntegriCloud