On 11/6/2018 4:50 AM, Chi-Hsien Lin wrote:
From: Praveen Babu C <praveen.chandran@xxxxxxxxxxx>
Add saverestore register settings for 43012.
I would collapse this commit with PATCH 04/11.
Reviewed-by: Arend van Spriel <arend.vanspriel@xxxxxxxxxxxx>
Signed-off-by: Praveen Babu C <praveen.chandran@xxxxxxxxxxx>
Signed-off-by: Chi-Hsien Lin <chi-hsien.lin@xxxxxxxxxxx>
---
.../wireless/broadcom/brcm80211/brcmfmac/chip.c | 5 +++++
.../wireless/broadcom/brcm80211/brcmfmac/sdio.c | 22 +++++++++++++++++-----
2 files changed, 22 insertions(+), 5 deletions(-)
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
index 299f59f58d8c..a32eb5f868b5 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
@@ -3354,16 +3354,29 @@ static void brcmf_sdio_sr_init(struct brcmf_sdio *bus)
{
int err = 0;
u8 val;
+ u8 wakeupctrl;
+ u8 cardcap;
+ u8 chipclkcsr;
brcmf_dbg(TRACE, "Enter\n");
+ if (bus->ci->chip == CY_CC_43012_CHIP_ID) {
Use brcmf_chip_is_ulp() here as well (see PATCH 04/11).
hmmm..wait. This is actually disabling the command decode for 43012,
which is claimed to be done in PATCH 09/11. So maybe another helper
would be more appropriate here, eg. brcmf_sdio_aos_no_decode(bus).
+ wakeupctrl = SBSDIO_FUNC1_WCTRL_ALPWAIT_SHIFT;
+ cardcap = SDIO_CCCR_BRCM_CARDCAP_CMD_NODEC;
+ chipclkcsr = SBSDIO_HT_AVAIL_REQ;
+ } else {
+ wakeupctrl = SBSDIO_FUNC1_WCTRL_HTWAIT_SHIFT;
+ cardcap = (SDIO_CCCR_BRCM_CARDCAP_CMD14_SUPPORT |
+ SDIO_CCCR_BRCM_CARDCAP_CMD14_EXT);
+ chipclkcsr = SBSDIO_FORCE_HT;
+ }
+