Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 306745
b: refs/heads/master
c: a9bba18
h: refs/heads/master
i:
  306743: b1cea70
v: v3
  • Loading branch information
Hauke Mehrtens authored and John W. Linville committed May 16, 2012
1 parent e6b5f0e commit 2fa7aa8
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5a20ef3db28faa42dd5dc86ad75d2736bcd3da4c
refs/heads/master: a9bba182a1f3f33ba11abde8226ab2a4c39ce4e7
7 changes: 1 addition & 6 deletions trunk/arch/mips/bcm47xx/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,7 @@ static int bcm47xx_get_invariants(struct ssb_bus *bus,
/* Fill boardinfo structure */
memset(&(iv->boardinfo), 0 , sizeof(struct ssb_boardinfo));

if (nvram_getenv("boardvendor", buf, sizeof(buf)) >= 0)
iv->boardinfo.vendor = (u16)simple_strtoul(buf, NULL, 0);
else
iv->boardinfo.vendor = SSB_BOARDVENDOR_BCM;
if (nvram_getenv("boardtype", buf, sizeof(buf)) >= 0)
iv->boardinfo.type = (u16)simple_strtoul(buf, NULL, 0);
bcm47xx_fill_ssb_boardinfo(&iv->boardinfo, NULL);

bcm47xx_fill_sprom(&iv->sprom, NULL);

Expand Down
12 changes: 12 additions & 0 deletions trunk/arch/mips/bcm47xx/sprom.c
Original file line number Diff line number Diff line change
Expand Up @@ -618,3 +618,15 @@ void bcm47xx_fill_sprom(struct ssb_sprom *sprom, const char *prefix)
bcm47xx_fill_sprom_r1(sprom, prefix);
}
}

#ifdef CONFIG_BCM47XX_SSB
void bcm47xx_fill_ssb_boardinfo(struct ssb_boardinfo *boardinfo,
const char *prefix)
{
nvram_read_u16(prefix, NULL, "boardvendor", &boardinfo->vendor, 0);
if (!boardinfo->vendor)
boardinfo->vendor = SSB_BOARDVENDOR_BCM;

nvram_read_u16(prefix, NULL, "boardtype", &boardinfo->type, 0);
}
#endif
5 changes: 5 additions & 0 deletions trunk/arch/mips/include/asm/mach-bcm47xx/bcm47xx.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,9 @@ extern enum bcm47xx_bus_type bcm47xx_bus_type;
void bcm47xx_fill_sprom(struct ssb_sprom *sprom, const char *prefix);
void bcm47xx_fill_sprom_ethernet(struct ssb_sprom *sprom, const char *prefix);

#ifdef CONFIG_BCM47XX_SSB
void bcm47xx_fill_ssb_boardinfo(struct ssb_boardinfo *boardinfo,
const char *prefix);
#endif

#endif /* __ASM_BCM47XX_H */

0 comments on commit 2fa7aa8

Please sign in to comment.