339-brcmfmac-remove-duplication-of-ramsize-info.patch 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. From: Arend van Spriel <[email protected]>
  2. Date: Wed, 11 Mar 2015 16:11:27 +0100
  3. Subject: [PATCH] brcmfmac: remove duplication of ramsize info
  4. Removing the ramsize from the brcmf_sdio structure to avoid
  5. duplication. The information is available in brcmf_chip
  6. structure.
  7. Reviewed-by: Hante Meuleman <[email protected]>
  8. Reviewed-by: Pieter-Paul Giesberts <[email protected]>
  9. Signed-off-by: Arend van Spriel <[email protected]>
  10. Signed-off-by: Kalle Valo <[email protected]>
  11. ---
  12. --- a/drivers/net/wireless/brcm80211/brcmfmac/sdio.c
  13. +++ b/drivers/net/wireless/brcm80211/brcmfmac/sdio.c
  14. @@ -432,8 +432,6 @@ struct brcmf_sdio {
  15. struct brcmf_sdio_dev *sdiodev; /* sdio device handler */
  16. struct brcmf_chip *ci; /* Chip info struct */
  17. - u32 ramsize; /* Size of RAM in SOCRAM (bytes) */
  18. -
  19. u32 hostintmask; /* Copy of Host Interrupt Mask */
  20. atomic_t intstatus; /* Intstatus bits (events) pending */
  21. atomic_t fcstate; /* State of dongle flow-control */
  22. @@ -1075,7 +1073,7 @@ static int brcmf_sdio_readshared(struct
  23. struct sdpcm_shared_le sh_le;
  24. __le32 addr_le;
  25. - shaddr = bus->ci->rambase + bus->ramsize - 4;
  26. + shaddr = bus->ci->rambase + bus->ci->ramsize - 4;
  27. /*
  28. * Read last word in socram to determine
  29. @@ -3871,13 +3869,6 @@ brcmf_sdio_probe_attach(struct brcmf_sdi
  30. drivestrength = DEFAULT_SDIO_DRIVE_STRENGTH;
  31. brcmf_sdio_drivestrengthinit(bus->sdiodev, bus->ci, drivestrength);
  32. - /* Get info on the SOCRAM cores... */
  33. - bus->ramsize = bus->ci->ramsize;
  34. - if (!(bus->ramsize)) {
  35. - brcmf_err("failed to find SOCRAM memory!\n");
  36. - goto fail;
  37. - }
  38. -
  39. /* Set card control so an SDIO card reset does a WLAN backplane reset */
  40. reg_val = brcmf_sdiod_regrb(bus->sdiodev,
  41. SDIO_CCCR_BRCM_CARDCTRL, &err);