bcma: log the id, rev and pkg of the chip found
authorHauke Mehrtens <hauke@hauke-m.de>
Tue, 31 Jan 2012 23:13:54 +0000 (00:13 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 6 Feb 2012 19:53:11 +0000 (14:53 -0500)
This makes us see what type of hardware someone uses by the dmesg
output.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/bcma/scan.c

index e513aa83ec25bed0b838f5b6941915ca0b5da27e..6621b2221b4084d8ecbbfc275a2231bd8a74f554 100644 (file)
@@ -364,6 +364,7 @@ static int bcma_get_next_core(struct bcma_bus *bus, u32 __iomem **eromptr,
 void bcma_init_bus(struct bcma_bus *bus)
 {
        s32 tmp;
+       struct bcma_chipinfo *chipinfo = &(bus->chipinfo);
 
        if (bus->init_done)
                return;
@@ -374,9 +375,12 @@ void bcma_init_bus(struct bcma_bus *bus)
        bcma_scan_switch_core(bus, BCMA_ADDR_BASE);
 
        tmp = bcma_scan_read32(bus, 0, BCMA_CC_ID);
-       bus->chipinfo.id = (tmp & BCMA_CC_ID_ID) >> BCMA_CC_ID_ID_SHIFT;
-       bus->chipinfo.rev = (tmp & BCMA_CC_ID_REV) >> BCMA_CC_ID_REV_SHIFT;
-       bus->chipinfo.pkg = (tmp & BCMA_CC_ID_PKG) >> BCMA_CC_ID_PKG_SHIFT;
+       chipinfo->id = (tmp & BCMA_CC_ID_ID) >> BCMA_CC_ID_ID_SHIFT;
+       chipinfo->rev = (tmp & BCMA_CC_ID_REV) >> BCMA_CC_ID_REV_SHIFT;
+       chipinfo->pkg = (tmp & BCMA_CC_ID_PKG) >> BCMA_CC_ID_PKG_SHIFT;
+       pr_info("Found chip with id 0x%04X, rev 0x%02X and package 0x%02X\n",
+               chipinfo->id, chipinfo->rev, chipinfo->pkg);
+
        bus->init_done = true;
 }