1
0
Fork 0

MLK-19517-17 brcmfmac: 4373 save-restore support

Use sr_eng_en bit to check 4373 sr support.

Signed-off-by: Chi-Hsien Lin <chi-hsien.lin@cypress.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
pull/10/head
Chi-Hsien Lin 2018-06-12 04:41:43 -05:00 committed by Jason Liu
parent 0678281f8a
commit d71dca8f5d
1 changed files with 7 additions and 1 deletions

View File

@ -1329,7 +1329,7 @@ bool brcmf_chip_set_active(struct brcmf_chip *pub, u32 rstvec)
bool brcmf_chip_sr_capable(struct brcmf_chip *pub)
{
u32 base, addr, reg, pmu_cc3_mask = ~0;
u32 base, addr, reg, sr_eng_en, pmu_cc3_mask = ~0;
struct brcmf_chip_priv *chip;
struct brcmf_core *pmu = brcmf_chip_get_pmu(pub);
@ -1362,6 +1362,12 @@ bool brcmf_chip_sr_capable(struct brcmf_chip *pub)
addr = CORE_CC_REG(base, sr_control1);
reg = chip->ops->read32(chip->ctx, addr);
return reg != 0;
case CY_CC_4373_CHIP_ID:
/* explicitly check SR engine enable bit */
sr_eng_en = BIT(0);
addr = CORE_CC_REG(base, sr_control0);
reg = chip->ops->read32(chip->ctx, addr);
return (reg & sr_eng_en) != 0;
case CY_CC_43012_CHIP_ID:
addr = CORE_CC_REG(pmu->base, retention_ctl);
reg = chip->ops->read32(chip->ctx, addr);