diff options
author | Larry Finger <Larry.Finger@lwfinger.net> | 2006-09-04 18:13:57 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2006-09-11 19:34:02 -0400 |
commit | 1ef4583ee3e1efab83d05b6ccdad378c9caaa95f (patch) | |
tree | 3a443ce3f33f020f0a1b89a9f9f0c5fe95caad14 /drivers/net/wireless | |
parent | 6807b5076373b8a6b6dac3b3b54645c85df91ad6 (diff) |
[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: Martin Langer <martin-langer@gmx.de>
Acked-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/bcm43xx/bcm43xx.h | 6 | ||||
-rw-r--r-- | drivers/net/wireless/bcm43xx/bcm43xx_main.c | 27 |
2 files changed, 33 insertions, 0 deletions
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx.h b/drivers/net/wireless/bcm43xx/bcm43xx.h index 62fd7e237789..e7d802157803 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx.h +++ b/drivers/net/wireless/bcm43xx/bcm43xx.h | |||
@@ -306,6 +306,12 @@ | |||
306 | #define BCM43xx_SBF_TIME_UPDATE 0x10000000 | 306 | #define BCM43xx_SBF_TIME_UPDATE 0x10000000 |
307 | #define BCM43xx_SBF_80000000 0x80000000 /*FIXME: fix name*/ | 307 | #define BCM43xx_SBF_80000000 0x80000000 /*FIXME: fix name*/ |
308 | 308 | ||
309 | /* Microcode */ | ||
310 | #define BCM43xx_UCODE_REVISION 0x0000 | ||
311 | #define BCM43xx_UCODE_PATCHLEVEL 0x0002 | ||
312 | #define BCM43xx_UCODE_DATE 0x0004 | ||
313 | #define BCM43xx_UCODE_TIME 0x0006 | ||
314 | |||
309 | /* MicrocodeFlagsBitfield (addr + lo-word values?)*/ | 315 | /* MicrocodeFlagsBitfield (addr + lo-word values?)*/ |
310 | #define BCM43xx_UCODEFLAGS_OFFSET 0x005E | 316 | #define BCM43xx_UCODEFLAGS_OFFSET 0x005E |
311 | 317 | ||
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_main.c b/drivers/net/wireless/bcm43xx/bcm43xx_main.c index c19bd866147e..cb9a3ae8463a 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_main.c +++ b/drivers/net/wireless/bcm43xx/bcm43xx_main.c | |||
@@ -2384,6 +2384,33 @@ static int bcm43xx_chip_init(struct bcm43xx_private *bcm) | |||
2384 | } | 2384 | } |
2385 | bcm43xx_read32(bcm, BCM43xx_MMIO_GEN_IRQ_REASON); /* dummy read */ | 2385 | bcm43xx_read32(bcm, BCM43xx_MMIO_GEN_IRQ_REASON); /* dummy read */ |
2386 | 2386 | ||
2387 | value16 = bcm43xx_shm_read16(bcm, BCM43xx_SHM_SHARED, | ||
2388 | BCM43xx_UCODE_REVISION); | ||
2389 | |||
2390 | dprintk(KERN_INFO PFX "Microcode rev 0x%x, pl 0x%x " | ||
2391 | "(20%.2i-%.2i-%.2i %.2i:%.2i:%.2i)\n", value16, | ||
2392 | bcm43xx_shm_read16(bcm, BCM43xx_SHM_SHARED, | ||
2393 | BCM43xx_UCODE_PATCHLEVEL), | ||
2394 | (bcm43xx_shm_read16(bcm, BCM43xx_SHM_SHARED, | ||
2395 | BCM43xx_UCODE_DATE) >> 12) & 0xf, | ||
2396 | (bcm43xx_shm_read16(bcm, BCM43xx_SHM_SHARED, | ||
2397 | BCM43xx_UCODE_DATE) >> 8) & 0xf, | ||
2398 | bcm43xx_shm_read16(bcm, BCM43xx_SHM_SHARED, | ||
2399 | BCM43xx_UCODE_DATE) & 0xff, | ||
2400 | (bcm43xx_shm_read16(bcm, BCM43xx_SHM_SHARED, | ||
2401 | BCM43xx_UCODE_TIME) >> 11) & 0x1f, | ||
2402 | (bcm43xx_shm_read16(bcm, BCM43xx_SHM_SHARED, | ||
2403 | BCM43xx_UCODE_TIME) >> 5) & 0x3f, | ||
2404 | bcm43xx_shm_read16(bcm, BCM43xx_SHM_SHARED, | ||
2405 | BCM43xx_UCODE_TIME) & 0x1f); | ||
2406 | |||
2407 | if ( value16 > 0x128 ) { | ||
2408 | dprintk(KERN_ERR PFX | ||
2409 | "Firmware: no support for microcode rev > 0x128\n"); | ||
2410 | err = -1; | ||
2411 | goto err_release_fw; | ||
2412 | } | ||
2413 | |||
2387 | err = bcm43xx_gpio_init(bcm); | 2414 | err = bcm43xx_gpio_init(bcm); |
2388 | if (err) | 2415 | if (err) |
2389 | goto err_release_fw; | 2416 | goto err_release_fw; |