Commit b021a6bc authored by Chi-Hsien Lin's avatar Chi-Hsien Lin Committed by Kalle Valo

brcmfmac: allow GCI core enumuration

GCI core is needed for ULP operation. Allow GCI core enumuration with
below changes:
 - Allow GCI to be added to core list even when it doesn't have a wrapper.
 - Allow 8K address space size.
 - Don't overwrite the address value when an additional size descriptor
   is in place.
Reviewed-by: default avatarArend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: default avatarChi-Hsien Lin <chi-hsien.lin@cypress.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 35cb51b2
...@@ -786,7 +786,7 @@ static int brcmf_chip_dmp_get_regaddr(struct brcmf_chip_priv *ci, u32 *eromaddr, ...@@ -786,7 +786,7 @@ static int brcmf_chip_dmp_get_regaddr(struct brcmf_chip_priv *ci, u32 *eromaddr,
u32 *regbase, u32 *wrapbase) u32 *regbase, u32 *wrapbase)
{ {
u8 desc; u8 desc;
u32 val; u32 val, szdesc;
u8 mpnum = 0; u8 mpnum = 0;
u8 stype, sztype, wraptype; u8 stype, sztype, wraptype;
...@@ -832,14 +832,15 @@ static int brcmf_chip_dmp_get_regaddr(struct brcmf_chip_priv *ci, u32 *eromaddr, ...@@ -832,14 +832,15 @@ static int brcmf_chip_dmp_get_regaddr(struct brcmf_chip_priv *ci, u32 *eromaddr,
/* next size descriptor can be skipped */ /* next size descriptor can be skipped */
if (sztype == DMP_SLAVE_SIZE_DESC) { if (sztype == DMP_SLAVE_SIZE_DESC) {
val = brcmf_chip_dmp_get_desc(ci, eromaddr, NULL); szdesc = brcmf_chip_dmp_get_desc(ci, eromaddr, NULL);
/* skip upper size descriptor if present */ /* skip upper size descriptor if present */
if (val & DMP_DESC_ADDRSIZE_GT32) if (szdesc & DMP_DESC_ADDRSIZE_GT32)
brcmf_chip_dmp_get_desc(ci, eromaddr, NULL); brcmf_chip_dmp_get_desc(ci, eromaddr, NULL);
} }
/* only look for 4K register regions */ /* look for 4K or 8K register regions */
if (sztype != DMP_SLAVE_SIZE_4K) if (sztype != DMP_SLAVE_SIZE_4K &&
sztype != DMP_SLAVE_SIZE_8K)
continue; continue;
stype = (val & DMP_SLAVE_TYPE) >> DMP_SLAVE_TYPE_S; stype = (val & DMP_SLAVE_TYPE) >> DMP_SLAVE_TYPE_S;
...@@ -896,7 +897,8 @@ int brcmf_chip_dmp_erom_scan(struct brcmf_chip_priv *ci) ...@@ -896,7 +897,8 @@ int brcmf_chip_dmp_erom_scan(struct brcmf_chip_priv *ci)
/* need core with ports */ /* need core with ports */
if (nmw + nsw == 0 && if (nmw + nsw == 0 &&
id != BCMA_CORE_PMU) id != BCMA_CORE_PMU &&
id != BCMA_CORE_GCI)
continue; continue;
/* try to obtain register address info */ /* try to obtain register address info */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment