brcm47xx: print the chip id and rev found by ssb and bcma
[openwrt/openwrt.git] / target / linux / brcm47xx / patches-3.2 / 0047-bcma-log-the-id-rev-and-pkg-of-the-chip-found.patch
1 From 293fcc92dae1284c35a3bb51e7f9eb13b52e58fe Mon Sep 17 00:00:00 2001
2 From: Hauke Mehrtens <hauke@hauke-m.de>
3 Date: Tue, 31 Jan 2012 23:36:44 +0100
4 Subject: [PATCH 2/4] bcma: log the id, rev and pkg of the chip found
5
6 This makes us see what type of hardware someone uses by the dmesg
7 output.
8
9 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
10 ---
11 drivers/bcma/scan.c | 10 +++++++---
12 1 files changed, 7 insertions(+), 3 deletions(-)
13
14 --- a/drivers/bcma/scan.c
15 +++ b/drivers/bcma/scan.c
16 @@ -380,6 +380,7 @@ static int bcma_get_next_core(struct bcm
17 void bcma_init_bus(struct bcma_bus *bus)
18 {
19 s32 tmp;
20 + struct bcma_chipinfo *chipinfo = &(bus->chipinfo);
21
22 if (bus->init_done)
23 return;
24 @@ -390,9 +391,12 @@ void bcma_init_bus(struct bcma_bus *bus)
25 bcma_scan_switch_core(bus, BCMA_ADDR_BASE);
26
27 tmp = bcma_scan_read32(bus, 0, BCMA_CC_ID);
28 - bus->chipinfo.id = (tmp & BCMA_CC_ID_ID) >> BCMA_CC_ID_ID_SHIFT;
29 - bus->chipinfo.rev = (tmp & BCMA_CC_ID_REV) >> BCMA_CC_ID_REV_SHIFT;
30 - bus->chipinfo.pkg = (tmp & BCMA_CC_ID_PKG) >> BCMA_CC_ID_PKG_SHIFT;
31 + chipinfo->id = (tmp & BCMA_CC_ID_ID) >> BCMA_CC_ID_ID_SHIFT;
32 + chipinfo->rev = (tmp & BCMA_CC_ID_REV) >> BCMA_CC_ID_REV_SHIFT;
33 + chipinfo->pkg = (tmp & BCMA_CC_ID_PKG) >> BCMA_CC_ID_PKG_SHIFT;
34 + pr_info("Found chip with id 0x%04X, rev 0x%02X and package 0x%02X\n",
35 + chipinfo->id, chipinfo->rev, chipinfo->pkg);
36 +
37 bus->init_done = true;
38 }
39