351-0037-brcmfmac-add-support-for-bcm4339-chip-with-modalias-.patch 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. From 634faf3686900ccdee87b77e2c56df8b2159912b Mon Sep 17 00:00:00 2001
  2. From: Arend Van Spriel <arend.vanspriel@broadcom.com>
  3. Date: Mon, 5 Sep 2016 11:42:12 +0100
  4. Subject: [PATCH] brcmfmac: add support for bcm4339 chip with modalias
  5. sdio:c00v02D0d4339
  6. The driver already supports the bcm4339 chipset but only for the variant
  7. that shares the same modalias as the bcm4335, ie. sdio:c00v02D0d4335.
  8. It turns out that there are also bcm4339 devices out there that have a
  9. more distiguishable modalias sdio:c00v02D0d4339.
  10. Reported-by: Steve deRosier <derosier@gmail.com>
  11. Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
  12. Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
  13. Reviewed-by: Franky Lin <franky.lin@broadcom.com>
  14. Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
  15. Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
  16. ---
  17. drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 1 +
  18. drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 3 ++-
  19. include/linux/mmc/sdio_ids.h | 1 +
  20. 3 files changed, 4 insertions(+), 1 deletion(-)
  21. --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c
  22. +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c
  23. @@ -1097,6 +1097,7 @@ static const struct sdio_device_id brcmf
  24. BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_43341),
  25. BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_43362),
  26. BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_4335_4339),
  27. + BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_4339),
  28. BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_43430),
  29. BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_4345),
  30. BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_4354),
  31. --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
  32. +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
  33. @@ -3756,7 +3756,8 @@ static u32 brcmf_sdio_buscore_read32(voi
  34. u32 val, rev;
  35. val = brcmf_sdiod_regrl(sdiodev, addr, NULL);
  36. - if (sdiodev->func[0]->device == SDIO_DEVICE_ID_BROADCOM_4335_4339 &&
  37. + if ((sdiodev->func[0]->device == SDIO_DEVICE_ID_BROADCOM_4335_4339 ||
  38. + sdiodev->func[0]->device == SDIO_DEVICE_ID_BROADCOM_4339) &&
  39. addr == CORE_CC_REG(SI_ENUM_BASE, chipid)) {
  40. rev = (val & CID_REV_MASK) >> CID_REV_SHIFT;
  41. if (rev >= 2) {
  42. --- a/include/linux/mmc/sdio_ids.h
  43. +++ b/include/linux/mmc/sdio_ids.h
  44. @@ -32,6 +32,7 @@
  45. #define SDIO_DEVICE_ID_BROADCOM_43340 0xa94c
  46. #define SDIO_DEVICE_ID_BROADCOM_43341 0xa94d
  47. #define SDIO_DEVICE_ID_BROADCOM_4335_4339 0x4335
  48. +#define SDIO_DEVICE_ID_BROADCOM_4339 0x4339
  49. #define SDIO_DEVICE_ID_BROADCOM_43362 0xa962
  50. #define SDIO_DEVICE_ID_BROADCOM_43430 0xa9a6
  51. #define SDIO_DEVICE_ID_BROADCOM_4345 0x4345