On 02/14/2012 02:20 PM, Hauke Mehrtens wrote:
> I think it is more complicated than the above. On my 43224, I get the
> message "No SPROM available", which arises because bcma_sprom_get() is
> returning -ENOENT. The reason is that the value tested in "if
> (!(sromctrl& BCMA_CC_SROM_CONTROL_PRESENT))" is zero. The contents of
> sromctl are 0x12, and the mask is 1.
This check is the main part of ai_is_sprom_available() in brcmsmac. If
this check fails, like in your case, brcmsmac tries otp_read_pci() to
read out the sprom, which is not implemented in bcma.
I will try implementing a similar routine in bcma.
> I am still investigating. When I comment out the test of sromctl, then
> the driver seems to find the SPROM at offset 0x830, but neither b43 nor
> brcmsmac works.
Where did you get the 0x830 from and for which devices do you get a
correct sprom at that position?
I don't know that I found a correct SPROM at that location. As I said, the
device does not work. All I know is that the following fragment did not report
an error. When the offset is 0x800, err is -71.
/* Try to get SPROM */
err = bcma_sprom_get(bus);
if (err == -ENOENT) {
pr_err("No SPROM available\n");
} else if (err)
pr_err("Failed to get SPROM: %d\n", err);
The chip is reported by lspci as "Network controller [0280]: Broadcom
Corporation BCM43224 802.11a/b/g/n [14e4:4353] (rev 01)"
From bcma, the core info is
bcma: Found chip with id 0xA8D8, rev 0x01 and package 0x08
bcma: Core 0 found: ChipCommon (manuf 0x4BF, id 0x800, rev 0x22, class 0x0)
bcma: Core 1 found: IEEE 802.11 (manuf 0x4BF, id 0x812, rev 0x17, class 0x0)
bcma: Core 2 found: PCIe (manuf 0x4BF, id 0x820, rev 0x0F, class 0x0)
bcma: Found rev 6 PMU (capabilities 0x108C2606)
bcma: bus->drv_cc.capabilities 0x58500000
bcma: sromctrl 0x12
bcma: SPROM offset 0x830
That offset comes from
offset = bus->chipinfo.id == (0x4331 || bus->chipinfo.id == 43224) ?
BCMA_CC_SPROM : BCMA_CC_SPROM_PCIE6;
which includes the trial patch from the initial posting in this thread.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html