Commit 1ef4583e authored by Larry Finger's avatar Larry Finger Committed by John W. Linville

[PATCH] bcm43xx: Add firmware version printout

This patch prints microcode revision, patchlevel, date and time to
KERN_INFO. Also, version 4.xx microcodes (rev>0x128) will be rejected
by the driver, because they still do not work.
Signed-off-by: default avatarMartin Langer <martin-langer@gmx.de>
Acked-by: default avatarMichael Buesch <mb@bu3sch.de>
Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 6807b507
...@@ -306,6 +306,12 @@ ...@@ -306,6 +306,12 @@
#define BCM43xx_SBF_TIME_UPDATE 0x10000000 #define BCM43xx_SBF_TIME_UPDATE 0x10000000
#define BCM43xx_SBF_80000000 0x80000000 /*FIXME: fix name*/ #define BCM43xx_SBF_80000000 0x80000000 /*FIXME: fix name*/
/* Microcode */
#define BCM43xx_UCODE_REVISION 0x0000
#define BCM43xx_UCODE_PATCHLEVEL 0x0002
#define BCM43xx_UCODE_DATE 0x0004
#define BCM43xx_UCODE_TIME 0x0006
/* MicrocodeFlagsBitfield (addr + lo-word values?)*/ /* MicrocodeFlagsBitfield (addr + lo-word values?)*/
#define BCM43xx_UCODEFLAGS_OFFSET 0x005E #define BCM43xx_UCODEFLAGS_OFFSET 0x005E
......
...@@ -2384,6 +2384,33 @@ static int bcm43xx_chip_init(struct bcm43xx_private *bcm) ...@@ -2384,6 +2384,33 @@ static int bcm43xx_chip_init(struct bcm43xx_private *bcm)
} }
bcm43xx_read32(bcm, BCM43xx_MMIO_GEN_IRQ_REASON); /* dummy read */ bcm43xx_read32(bcm, BCM43xx_MMIO_GEN_IRQ_REASON); /* dummy read */
value16 = bcm43xx_shm_read16(bcm, BCM43xx_SHM_SHARED,
BCM43xx_UCODE_REVISION);
dprintk(KERN_INFO PFX "Microcode rev 0x%x, pl 0x%x "
"(20%.2i-%.2i-%.2i %.2i:%.2i:%.2i)\n", value16,
bcm43xx_shm_read16(bcm, BCM43xx_SHM_SHARED,
BCM43xx_UCODE_PATCHLEVEL),
(bcm43xx_shm_read16(bcm, BCM43xx_SHM_SHARED,
BCM43xx_UCODE_DATE) >> 12) & 0xf,
(bcm43xx_shm_read16(bcm, BCM43xx_SHM_SHARED,
BCM43xx_UCODE_DATE) >> 8) & 0xf,
bcm43xx_shm_read16(bcm, BCM43xx_SHM_SHARED,
BCM43xx_UCODE_DATE) & 0xff,
(bcm43xx_shm_read16(bcm, BCM43xx_SHM_SHARED,
BCM43xx_UCODE_TIME) >> 11) & 0x1f,
(bcm43xx_shm_read16(bcm, BCM43xx_SHM_SHARED,
BCM43xx_UCODE_TIME) >> 5) & 0x3f,
bcm43xx_shm_read16(bcm, BCM43xx_SHM_SHARED,
BCM43xx_UCODE_TIME) & 0x1f);
if ( value16 > 0x128 ) {
dprintk(KERN_ERR PFX
"Firmware: no support for microcode rev > 0x128\n");
err = -1;
goto err_release_fw;
}
err = bcm43xx_gpio_init(bcm); err = bcm43xx_gpio_init(bcm);
if (err) if (err)
goto err_release_fw; goto err_release_fw;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment