Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 306746
b: refs/heads/master
c: 0a2fcaa
h: refs/heads/master
v: v3
  • Loading branch information
Hauke Mehrtens authored and John W. Linville committed May 16, 2012
1 parent 2fa7aa8 commit f8a16ee
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 4 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: a9bba182a1f3f33ba11abde8226ab2a4c39ce4e7
refs/heads/master: 0a2fcaa70ce96be6e663234072984fd2b0ffa36e
2 changes: 2 additions & 0 deletions trunk/arch/mips/bcm47xx/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@ static void __init bcm47xx_register_bcma(void)
err = bcma_host_soc_register(&bcm47xx_bus.bcma);
if (err)
panic("Failed to initialize BCMA bus (err %d)", err);

bcm47xx_fill_bcma_boardinfo(&bcm47xx_bus.bcma.bus.boardinfo, NULL);
}
#endif

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 @@ -630,3 +630,15 @@ void bcm47xx_fill_ssb_boardinfo(struct ssb_boardinfo *boardinfo,
nvram_read_u16(prefix, NULL, "boardtype", &boardinfo->type, 0);
}
#endif

#ifdef CONFIG_BCM47XX_BCMA
void bcm47xx_fill_bcma_boardinfo(struct bcma_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
4 changes: 4 additions & 0 deletions trunk/arch/mips/include/asm/mach-bcm47xx/bcm47xx.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,9 @@ void bcm47xx_fill_sprom_ethernet(struct ssb_sprom *sprom, const char *prefix);
void bcm47xx_fill_ssb_boardinfo(struct ssb_boardinfo *boardinfo,
const char *prefix);
#endif
#ifdef CONFIG_BCM47XX_BCMA
void bcm47xx_fill_bcma_boardinfo(struct bcma_boardinfo *boardinfo,
const char *prefix);
#endif

#endif /* __ASM_BCM47XX_H */
3 changes: 3 additions & 0 deletions trunk/drivers/bcma/host_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,9 @@ static int __devinit bcma_host_pci_probe(struct pci_dev *dev,
bus->hosttype = BCMA_HOSTTYPE_PCI;
bus->ops = &bcma_host_pci_ops;

bus->boardinfo.vendor = bus->host_pci->subsystem_vendor;
bus->boardinfo.type = bus->host_pci->subsystem_device;

/* Register */
err = bcma_bus_register(bus);
if (err)
Expand Down
4 changes: 1 addition & 3 deletions trunk/drivers/net/wireless/b43/bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,9 @@ struct b43_bus_dev *b43_bus_dev_bcma_init(struct bcma_device *core)
dev->dma_dev = core->dma_dev;
dev->irq = core->irq;

/*
dev->board_vendor = core->bus->boardinfo.vendor;
dev->board_type = core->bus->boardinfo.type;
dev->board_rev = core->bus->boardinfo.rev;
*/
dev->board_rev = core->bus->sprom.board_rev;

dev->chip_id = core->bus->chipinfo.id;
dev->chip_rev = core->bus->chipinfo.rev;
Expand Down
7 changes: 7 additions & 0 deletions trunk/include/linux/bcma/bcma.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ struct bcma_chipinfo {
u8 pkg;
};

struct bcma_boardinfo {
u16 vendor;
u16 type;
};

enum bcma_clkmode {
BCMA_CLKMODE_FAST,
BCMA_CLKMODE_DYNAMIC,
Expand Down Expand Up @@ -198,6 +203,8 @@ struct bcma_bus {

struct bcma_chipinfo chipinfo;

struct bcma_boardinfo boardinfo;

struct bcma_device *mapped_core;
struct list_head cores;
u8 nr_cores;
Expand Down

0 comments on commit f8a16ee

Please sign in to comment.