History log of /drivers/bcma/sprom.c
Revision Date Author Comments
27cfdb0505e7bfdd84432823b9697b971d4fa731 24-Jul-2014 Rafał Miłecki <zajec5@gmail.com> bcma: add support for BCM43131 that was found in Tenda W311E

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
d1d3799fcb1037357b54be44e796a6253484268e 15-Jul-2014 Rafał Miłecki <zajec5@gmail.com> bcma: add support for BCM43217 found in Tenda W322E (14e4:43a9)

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
d8aef3239e7d6a1bd550014ac766e5ec11c63ea9 15-Jul-2014 Rafał Miłecki <zajec5@gmail.com> bcma: extract antenna gains from SPROM correctly

Just like in case of SSB SPROMs they are encoded in a bit tricky way.
SPROM struct already uses s8 type and it's supposed to store decoded
values.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
88f9b65d444794bb607f71644362ba0642585206 26-Jun-2013 Rafał Miłecki <zajec5@gmail.com> bcma: add support for BCM43142

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
78e578c5b43c4f274305075c68d055c8d6141fd5 13-May-2013 Rafał Miłecki <zajec5@gmail.com> bcma: support SPROM rev 10

This is pretty much the same as rev 9, there are just 2 extra fields we
know about, but are not used/stored yet anyway.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
92eb164258cfce173060d3fe7aaffa2afaf735d7 13-May-2013 Rafał Miłecki <zajec5@gmail.com> bcma: prepare for supporting more SPROM sizes

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
5179ed7c1bc1d4599f9643f9711c090648602f4b 13-May-2013 Rafał Miłecki <zajec5@gmail.com> bcma: don't hardcode SPROM length

Pass it as an argument to all functions. This is requires as newer SPROM
revisions have different lengths.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
7b828f09b282a1a3eb719e1080cf3764221049b1 19-Mar-2013 Rafał Miłecki <zajec5@gmail.com> bcma: extract board_type from SPROM

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
017c4c3bdeb4e6c38094eb2330a57370f68f4853 29-Sep-2012 Hauke Mehrtens <hauke@hauke-m.de> bcma: use fallback sprom if sprom on card was not valid

Sometimes the PCIe card indicates that it has a sprom somewhere and we
are able to read the memory region, but it is empty and not valid. In
these cases we should try to use the fallback sprom as a last chance.

This is the case for the PCIe cards in my ASUS RT-N66U (BCM4706 + 2
times BCM4331) and I have heard of someone having the same problem with
an other PCIe card connected to an other Broadcom SoC.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
646e0827df85f1305eeebf2108e9daafeabe0e0d 21-Sep-2012 Rafał Miłecki <zajec5@gmail.com> bcma: handle BCM43227

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Tested-by: Jack <x6719620@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
c263c2c1ad615e935d563cd7be11d417f94895d9 23-Jul-2012 Rafał Miłecki <zajec5@gmail.com> bcma: BCM43228 support

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
3d9d8af330a891f141db420115238f01e4c6ece7 05-Jul-2012 Rafał Miłecki <zajec5@gmail.com> bcma: use custom printing functions

Having bus number printed makes it much easier to anaylze logs on
systems with more buses. For example Netgear WNDR4500 has 3 AMBA buses
in total, which makes standard log really messy.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
4b4f5be2e49a604de11dee0ee9b3f151de061724 30-Jun-2012 Hauke Mehrtens <hauke@hauke-m.de> bcma: add constants for chip ids

The chip IDs are used all over bcma and no constants where defined.
This patch adds the constants and makes bcma use them.

Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
69aaedd3cfd23b2c732e3cf1227370a35f5c89d4 01-Jun-2012 Seth Forshee <seth.forshee@canonical.com> bcma: add ext PA workaround for BCM4331 and BCM43431

MacBook Pro models with BCM4331 wireless have been found to have the ext
PA lines disabled after resuming from S3 without external power attach.
This causes them to be unable to transmit. Add a workaround to ensure
that the ext PA lines are enabled on BCM4331. Also extend all handling
of ext PA line muxing to BCM43431 as is done in the Broadcom SDK.

BugLink: http://bugs.launchpad.net/bugs/925577
Cc: Arend van Spriel <arend@broadcom.com>
Cc: Hauke Mehrtens <hauke@hauke-m.de>
Cc: stable@vger.kernel.org
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
e2da4bd3ec7842fbef2bc7bffde3e1ad0c15f516 29-Apr-2012 Hauke Mehrtens <hauke@hauke-m.de> bcma/ssb: parse new attributes from sprom

These newly added attributes are used by brcmsmac. Now bcma should
parse all attributes used by brcmsmac out of the sprom.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
432c4d1eef64fc4c57faf713f361a96e58e66c72 29-Apr-2012 Hauke Mehrtens <hauke@hauke-m.de> bcma: read out some additional sprom attributes

This code is copied from the ssb sprom read code. These attributes are
partly used by b43 and brcmsmac and should also be read out on bcma
based devices.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
bf7d420b4a3ea06d9638ec7f1b9d7971fa7f4f66 29-Apr-2012 Hauke Mehrtens <hauke@hauke-m.de> ssb/bcma: fill attribute alpha2 from sprom

The attribute country_code and alpha2 are two different attributes in
the sprom. country_code contains some code in an 8 bit coding and
alpha2 contains two chars with the country code. The attributes where
read out wrongly in the past and country_code is only available on
sprom version 1.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
32998cc96a76cc3f42f66b55fec301377e439c66 14-Apr-2012 Hauke Mehrtens <hauke@hauke-m.de> bcma: use fallback sprom if no on chip sprom is available

bcma should check for a fallback sprom every time it can not find a
sprom on the card itself or a normal external sprom mapped into the
memory of the chip. When otp sprom support was introduced it tried to
read out the sprom from the wireless chip also if no otp sprom was
available. This caused a Data bus error in bcma_sprom_get() when
reading out the sprom for the SoC.

This fixes a regression introduced in commit:

commit 10d8493cd9efd38b1947b7a74276dbdc8311aa1a
Author: Arend van Spriel <arend@broadcom.com>
Date: Tue Mar 6 15:50:48 2012 +0100

bcma: add support for on-chip OTP memory used for SPROM storage

This patch was tested on a Netgear WNDR3400 (Broadcom BCM4718 SoC).

Reported-by: Nick Bowler <nbowler@elliptictech.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10d8493cd9efd38b1947b7a74276dbdc8311aa1a 06-Mar-2012 Arend van Spriel <arend@broadcom.com> bcma: add support for on-chip OTP memory used for SPROM storage

Wireless Broadcom chips can have either their SPROM data stored
on either external SPROM or on-chip OTP memory. Both are accessed
through the same register space. This patch adds support for the
on-chip OTP memory.

Tested with:
BCM43224 OTP and SPROM
BCM4331 SPROM
BCM4313 OTP

This patch is in response to linux-wireless thread [1].

[1] http://article.gmane.org/gmane.linux.kernel.wireless.general/85426

Tested-by: Saul St. John <saul.stjohn@gmail.com>
Tested-by: Rafal Milecki <zajec5@gmail.com>
Tested-by: Hauke Mehrtens <hauke@hauke-m.de>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
4ac887cfdad909f16ee1886fe4fa19b452fc7fd3 06-Mar-2012 Arend van Spriel <arend@broadcom.com> bcma: return error in bcma_sprom_get() when fallback fails

When not SPROM is available a fallback mechanism is used. However,
when that fails the code currently continues. This patch assures
that the bcma_sprom_get() function aborts when that happens.

Cc: Rafal Milecki <zajec5@gmail.com>
Cc: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
a027237a56f7d519eee5749cfb720e568d0bb0b6 28-Feb-2012 Hauke Mehrtens <hauke@hauke-m.de> bcma: add support for sprom not found on the device

On SoCs the sprom is stored in the nvram in a special partition on the
flash chip. The nvram contains the sprom for the main bus, but
sometimes also for a pci devices using bcma. This patch makes it
possible for the arch code to register a function to fetch the needed
sprom from the nvram and provide it to the bcma code.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
d6865dcc58f252480515101fd13532f0fc420b53 31-Jan-2012 Hauke Mehrtens <hauke@hauke-m.de> bcma: add extra sprom check

This check is needed on the BCM43224 device as it says in the
capabilities it has an sprom but is extra check says it has not.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
cebcab9e18725d8249f607af787ee92107a665b7 11-Jan-2012 Larry Finger <Larry.Finger@lwfinger.net> bcma: Enable logging of SPROM offset

The SPROM location has been relocated again for some devices. This patch
will log the offset when CONFIG_BCMA_DEBUG has been selected.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
507f9a71846a3d25d0e5322754da6b65adceda80 02-Jan-2012 Rafał Miłecki <zajec5@gmail.com> bcma: SPROM: extract power info for cores

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
b35a9aca631ee0cf67cd23098ea9076ca33c3f7b 02-Jan-2012 Rafał Miłecki <zajec5@gmail.com> bcma: SPROM: add macro for easier extraction

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
daadc6b3bd563128de67bafa1c0fc38508d5760e 12-Dec-2011 Rafał Miłecki <zajec5@gmail.com> bcma: extract revision and TX power IDs from SPROM

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
aee5ed563d56c713d2a51d6f16e08b83fd9665d5 08-Dec-2011 Rafał Miłecki <zajec5@gmail.com> bcma: extract FEM info from SPROM

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
d703a5ae3ab33226d143917051666fe20b528d9e 28-Aug-2011 Rafał Miłecki <zajec5@gmail.com> bcma: extract some basic info about board from SPROM

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
984e5befbafe2799be28c2209226a82fb3a3be7a 11-Aug-2011 Rafał Miłecki <zajec5@gmail.com> bcma: implement BCM4331 workaround for external PA lines

We need to disable ext. PA lines for reading SPROM. It's disabled by
default, but this patch allows using bcma after loading wl, which leaves
workaround enabled.

Cc: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
eb1577b7c4b2cdd0e18b0d5d8e940e36329215e5 17-Jul-2011 Rafał Miłecki <zajec5@gmail.com> bcma: handle alternative SPROM location

Some cards do not use additional 0x30 offset for SPROM location. We do
not know the real condition for it yet, make it BCM4331 specific for
now.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
c54dcd197c3f9a66b60cb85ca50df06981a45211 14-Jul-2011 Rafał Miłecki <zajec5@gmail.com> bcma: extract SPROM rev 9 the same way as rev 8

SPROM rev 9 was discovered on 14e4:4331, it seems to have very similar
layout to rev 8 one. Use the same extracting function until we find some
differences.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
534e7a4566ca5fd3c0c92a655bcbaa6f9bd13042 09-Jul-2011 Hauke Mehrtens <hauke@hauke-m.de> bcma: add check if sprom is available before accessing it.

The SoCs like the bcm4716 do not have a sprom on the bcma bus like a
pcie device. It stores the values in some partition on flash memory.
For ssb this informations are read out in the bcm47xx arch code,
something like that should also be implemented for bcma. Without this
patch bcma panics on SoCs.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
27f18dc2dafe66a93c7101fc94201b8c83903597 02-Jun-2011 Rafał Miłecki <zajec5@gmail.com> bcma: read SPROM and extract MAC from it

In case of BCMA cards SPROM is located in the ChipCommon core, it is
not mapped as separated host window. So far we have met only SPROMs rev
8.
SPROM layout seems to be the same as for SSB buses, so we decided to
share SPROM struct and some defines.
For now we extract MAC address only, this can be improved of course.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>