1 From: Arend van Spriel <arend@broadcom.com>
2 Date: Wed, 11 Mar 2015 16:11:28 +0100
3 Subject: [PATCH] brcmfmac: always perform cores checks
5 Instead of checking the cores in the chip only if CONFIG_BRCMDBG
6 is selected perform the check always and extend it with more sanity
9 Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
10 Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
11 Signed-off-by: Arend van Spriel <arend@broadcom.com>
12 Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
15 --- a/drivers/net/wireless/brcm80211/brcmfmac/chip.c
16 +++ b/drivers/net/wireless/brcm80211/brcmfmac/chip.c
17 @@ -419,13 +419,13 @@ static struct brcmf_core *brcmf_chip_add
22 /* safety check for chipinfo */
23 static int brcmf_chip_cores_check(struct brcmf_chip_priv *ci)
25 struct brcmf_core_priv *core;
26 bool need_socram = false;
27 bool has_socram = false;
28 + bool cpu_found = false;
31 list_for_each_entry(core, &ci->cores, list) {
32 @@ -435,12 +435,14 @@ static int brcmf_chip_cores_check(struct
34 switch (core->pub.id) {
35 case BCMA_CORE_ARM_CM3:
39 case BCMA_CORE_INTERNAL_MEM:
42 case BCMA_CORE_ARM_CR4:
44 if (ci->pub.rambase == 0) {
45 brcmf_err("RAM base not provided with ARM CR4 core\n");
47 @@ -451,19 +453,21 @@ static int brcmf_chip_cores_check(struct
52 + brcmf_err("CPU core not detected\n");
55 /* check RAM core presence for ARM CM3 core */
56 if (need_socram && !has_socram) {
57 brcmf_err("RAM core not provided with ARM CM3 core\n");
60 + if (!ci->pub.ramsize) {
61 + brcmf_err("RAM size is undetermined\n");
67 -static inline int brcmf_chip_cores_check(struct brcmf_chip_priv *ci)
73 static void brcmf_chip_get_raminfo(struct brcmf_chip_priv *ci)