diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2012-04-28 20:04:07 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-05-16 12:45:20 -0400 |
commit | a9bba182a1f3f33ba11abde8226ab2a4c39ce4e7 (patch) | |
tree | c43aad92f8f473f6d59d748cc7cd616f305528fe /arch/mips/bcm47xx/sprom.c | |
parent | 5a20ef3db28faa42dd5dc86ad75d2736bcd3da4c (diff) |
MIPS: bcm47xx: refactor fetching board data
Now the fetching of board data also uses nvram_read_u16 and not
simple_strtoul any more.
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/bcm47xx/sprom.c')
-rw-r--r-- | arch/mips/bcm47xx/sprom.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/mips/bcm47xx/sprom.c b/arch/mips/bcm47xx/sprom.c index 5c8dcd2a8a93..279991a3583b 100644 --- a/arch/mips/bcm47xx/sprom.c +++ b/arch/mips/bcm47xx/sprom.c | |||
@@ -618,3 +618,15 @@ void bcm47xx_fill_sprom(struct ssb_sprom *sprom, const char *prefix) | |||
618 | bcm47xx_fill_sprom_r1(sprom, prefix); | 618 | bcm47xx_fill_sprom_r1(sprom, prefix); |
619 | } | 619 | } |
620 | } | 620 | } |
621 | |||
622 | #ifdef CONFIG_BCM47XX_SSB | ||
623 | void bcm47xx_fill_ssb_boardinfo(struct ssb_boardinfo *boardinfo, | ||
624 | const char *prefix) | ||
625 | { | ||
626 | nvram_read_u16(prefix, NULL, "boardvendor", &boardinfo->vendor, 0); | ||
627 | if (!boardinfo->vendor) | ||
628 | boardinfo->vendor = SSB_BOARDVENDOR_BCM; | ||
629 | |||
630 | nvram_read_u16(prefix, NULL, "boardtype", &boardinfo->type, 0); | ||
631 | } | ||
632 | #endif | ||