323-0003-brcmfmac-read-extended-capabilities-of-ChipCommon-co.patch 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
  2. Date: Tue, 26 Jan 2016 17:57:03 +0100
  3. Subject: [PATCH] brcmfmac: read extended capabilities of ChipCommon core
  4. MIME-Version: 1.0
  5. Content-Type: text/plain; charset=UTF-8
  6. Content-Transfer-Encoding: 8bit
  7. This is an extra bitfield with info about some present hardware.
  8. Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
  9. Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
  10. ---
  11. --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c
  12. +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c
  13. @@ -1025,6 +1025,9 @@ static int brcmf_chip_setup(struct brcmf
  14. /* get chipcommon capabilites */
  15. pub->cc_caps = chip->ops->read32(chip->ctx,
  16. CORE_CC_REG(base, capabilities));
  17. + pub->cc_caps_ext = chip->ops->read32(chip->ctx,
  18. + CORE_CC_REG(base,
  19. + capabilities_ext));
  20. /* get pmu caps & rev */
  21. if (pub->cc_caps & CC_CAP_PMU) {
  22. --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.h
  23. +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.h
  24. @@ -27,6 +27,7 @@
  25. * @chip: chip identifier.
  26. * @chiprev: chip revision.
  27. * @cc_caps: chipcommon core capabilities.
  28. + * @cc_caps_ext: chipcommon core extended capabilities.
  29. * @pmucaps: PMU capabilities.
  30. * @pmurev: PMU revision.
  31. * @rambase: RAM base address (only applicable for ARM CR4 chips).
  32. @@ -38,6 +39,7 @@ struct brcmf_chip {
  33. u32 chip;
  34. u32 chiprev;
  35. u32 cc_caps;
  36. + u32 cc_caps_ext;
  37. u32 pmucaps;
  38. u32 pmurev;
  39. u32 rambase;