Lines Matching full:pub

217 	struct brcmf_core pub;  member
224 struct brcmf_chip pub; member
254 address = CORE_SB(core->pub.base, sbtmstatelow); in brcmf_chip_sb_iscoreup()
284 base = core->pub.base; in brcmf_chip_sb_coredisable()
389 base = core->pub.base; in brcmf_chip_sb_resetcore()
442 if (core->pub.id == BCMA_CORE_80211) { in brcmf_chip_ai_resetcore()
443 d11core2 = brcmf_chip_get_d11core(&ci->pub, 1); in brcmf_chip_ai_resetcore()
447 struct brcmf_core_priv, pub); in brcmf_chip_ai_resetcore()
511 core->pub.id = coreid; in brcmf_chip_add_core()
512 core->pub.base = base; in brcmf_chip_add_core()
517 return &core->pub; in brcmf_chip_add_core()
531 idx++, core->pub.id, core->pub.rev, core->pub.base, in brcmf_chip_cores_check()
534 switch (core->pub.id) { in brcmf_chip_cores_check()
567 return core->chip->ops->read32(core->chip->ctx, core->pub.base + reg); in brcmf_chip_core_read32()
573 core->chip->ops->write32(core->chip->ctx, core->pub.base + reg, val); in brcmf_chip_core_write32()
601 if (WARN_ON(sr->pub.rev < 4)) in brcmf_chip_socram_ramsize()
604 if (!brcmf_chip_iscoreup(&sr->pub)) in brcmf_chip_socram_ramsize()
605 brcmf_chip_resetcore(&sr->pub, 0, 0, 0); in brcmf_chip_socram_ramsize()
611 if ((sr->pub.rev <= 7) || (sr->pub.rev == 12)) { in brcmf_chip_socram_ramsize()
621 if (sr->pub.rev >= 23) { in brcmf_chip_socram_ramsize()
636 switch (sr->chip->pub.chip) { in brcmf_chip_socram_ramsize()
638 if (sr->chip->pub.chiprev < 2) in brcmf_chip_socram_ramsize()
661 if (!brcmf_chip_iscoreup(&sysmem->pub)) in brcmf_chip_sysmem_ramsize()
662 brcmf_chip_resetcore(&sysmem->pub, 0, 0, 0); in brcmf_chip_sysmem_ramsize()
703 switch (ci->pub.chip) { in brcmf_chip_tcm_rambase()
725 return (ci->pub.chiprev < 9) ? 0x180000 : 0x160000; in brcmf_chip_tcm_rambase()
730 brcmf_err("unknown chip: %s\n", ci->pub.name); in brcmf_chip_tcm_rambase()
736 int brcmf_chip_get_raminfo(struct brcmf_chip *pub) in brcmf_chip_get_raminfo() argument
738 struct brcmf_chip_priv *ci = container_of(pub, struct brcmf_chip_priv, in brcmf_chip_get_raminfo()
739 pub); in brcmf_chip_get_raminfo()
743 mem = brcmf_chip_get_core(&ci->pub, BCMA_CORE_ARM_CR4); in brcmf_chip_get_raminfo()
745 mem_core = container_of(mem, struct brcmf_core_priv, pub); in brcmf_chip_get_raminfo()
746 ci->pub.ramsize = brcmf_chip_tcm_ramsize(mem_core); in brcmf_chip_get_raminfo()
747 ci->pub.rambase = brcmf_chip_tcm_rambase(ci); in brcmf_chip_get_raminfo()
748 if (!ci->pub.rambase) { in brcmf_chip_get_raminfo()
753 mem = brcmf_chip_get_core(&ci->pub, BCMA_CORE_SYS_MEM); in brcmf_chip_get_raminfo()
756 pub); in brcmf_chip_get_raminfo()
757 ci->pub.ramsize = brcmf_chip_sysmem_ramsize(mem_core); in brcmf_chip_get_raminfo()
758 ci->pub.rambase = brcmf_chip_tcm_rambase(ci); in brcmf_chip_get_raminfo()
759 if (!ci->pub.rambase) { in brcmf_chip_get_raminfo()
764 mem = brcmf_chip_get_core(&ci->pub, in brcmf_chip_get_raminfo()
771 pub); in brcmf_chip_get_raminfo()
772 brcmf_chip_socram_ramsize(mem_core, &ci->pub.ramsize, in brcmf_chip_get_raminfo()
773 &ci->pub.srsize); in brcmf_chip_get_raminfo()
777 ci->pub.rambase, ci->pub.ramsize, ci->pub.ramsize, in brcmf_chip_get_raminfo()
778 ci->pub.srsize, ci->pub.srsize); in brcmf_chip_get_raminfo()
780 if (!ci->pub.ramsize) { in brcmf_chip_get_raminfo()
785 if (ci->pub.ramsize > BRCMF_CHIP_MAX_MEMSIZE) { in brcmf_chip_get_raminfo()
957 ci->pub.chip = regdata & CID_ID_MASK; in brcmf_chip_recognition()
958 ci->pub.chiprev = (regdata & CID_REV_MASK) >> CID_REV_SHIFT; in brcmf_chip_recognition()
961 brcmf_chip_name(ci->pub.chip, ci->pub.chiprev, in brcmf_chip_recognition()
962 ci->pub.name, sizeof(ci->pub.name)); in brcmf_chip_recognition()
964 socitype == SOCI_SB ? "SB" : "AXI", ci->pub.name); in brcmf_chip_recognition()
967 if (ci->pub.chip != BRCM_CC_4329_CHIP_ID) { in brcmf_chip_recognition()
1007 brcmf_chip_set_passive(&ci->pub); in brcmf_chip_recognition()
1013 ci->ops->reset(ci->ctx, &ci->pub); in brcmf_chip_recognition()
1014 brcmf_chip_set_passive(&ci->pub); in brcmf_chip_recognition()
1017 return brcmf_chip_get_raminfo(&ci->pub); in brcmf_chip_recognition()
1027 core = brcmf_chip_get_core(&chip->pub, id); in brcmf_chip_disable_arm()
1037 cpu = container_of(core, struct brcmf_core_priv, pub); in brcmf_chip_disable_arm()
1053 struct brcmf_chip *pub; in brcmf_chip_setup() local
1060 pub = &chip->pub; in brcmf_chip_setup()
1062 base = cc->pub.base; in brcmf_chip_setup()
1065 pub->cc_caps = chip->ops->read32(chip->ctx, in brcmf_chip_setup()
1067 pub->cc_caps_ext = chip->ops->read32(chip->ctx, in brcmf_chip_setup()
1072 pmu = brcmf_chip_get_pmu(pub); /* after reading cc_caps_ext */ in brcmf_chip_setup()
1073 if (pub->cc_caps & CC_CAP_PMU) { in brcmf_chip_setup()
1076 pub->pmurev = val & PCAP_REV_MASK; in brcmf_chip_setup()
1077 pub->pmucaps = val; in brcmf_chip_setup()
1081 cc->pub.rev, pub->pmurev, pub->pmucaps); in brcmf_chip_setup()
1085 ret = chip->ops->setup(chip->ctx, pub); in brcmf_chip_setup()
1128 return &chip->pub; in brcmf_chip_attach()
1131 brcmf_chip_detach(&chip->pub); in brcmf_chip_attach()
1135 void brcmf_chip_detach(struct brcmf_chip *pub) in brcmf_chip_detach() argument
1141 chip = container_of(pub, struct brcmf_chip_priv, pub); in brcmf_chip_detach()
1149 struct brcmf_core *brcmf_chip_get_d11core(struct brcmf_chip *pub, u8 unit) in brcmf_chip_get_d11core() argument
1154 chip = container_of(pub, struct brcmf_chip_priv, pub); in brcmf_chip_get_d11core()
1156 if (core->pub.id == BCMA_CORE_80211) { in brcmf_chip_get_d11core()
1158 return &core->pub; in brcmf_chip_get_d11core()
1164 struct brcmf_core *brcmf_chip_get_core(struct brcmf_chip *pub, u16 coreid) in brcmf_chip_get_core() argument
1169 chip = container_of(pub, struct brcmf_chip_priv, pub); in brcmf_chip_get_core()
1171 if (core->pub.id == coreid) in brcmf_chip_get_core()
1172 return &core->pub; in brcmf_chip_get_core()
1177 struct brcmf_core *brcmf_chip_get_chipcommon(struct brcmf_chip *pub) in brcmf_chip_get_chipcommon() argument
1182 chip = container_of(pub, struct brcmf_chip_priv, pub); in brcmf_chip_get_chipcommon()
1184 if (WARN_ON(!cc || cc->pub.id != BCMA_CORE_CHIPCOMMON)) in brcmf_chip_get_chipcommon()
1185 return brcmf_chip_get_core(pub, BCMA_CORE_CHIPCOMMON); in brcmf_chip_get_chipcommon()
1186 return &cc->pub; in brcmf_chip_get_chipcommon()
1189 struct brcmf_core *brcmf_chip_get_pmu(struct brcmf_chip *pub) in brcmf_chip_get_pmu() argument
1191 struct brcmf_core *cc = brcmf_chip_get_chipcommon(pub); in brcmf_chip_get_pmu()
1196 pub->cc_caps_ext & BCMA_CC_CAP_EXT_AOB_PRESENT) { in brcmf_chip_get_pmu()
1197 pmu = brcmf_chip_get_core(pub, BCMA_CORE_PMU); in brcmf_chip_get_pmu()
1206 bool brcmf_chip_iscoreup(struct brcmf_core *pub) in brcmf_chip_iscoreup() argument
1210 core = container_of(pub, struct brcmf_core_priv, pub); in brcmf_chip_iscoreup()
1214 void brcmf_chip_coredisable(struct brcmf_core *pub, u32 prereset, u32 reset) in brcmf_chip_coredisable() argument
1218 core = container_of(pub, struct brcmf_core_priv, pub); in brcmf_chip_coredisable()
1222 void brcmf_chip_resetcore(struct brcmf_core *pub, u32 prereset, u32 reset, in brcmf_chip_resetcore() argument
1227 core = container_of(pub, struct brcmf_core_priv, pub); in brcmf_chip_resetcore()
1238 core = brcmf_chip_get_core(&chip->pub, BCMA_CORE_80211); in brcmf_chip_cm3_set_passive()
1243 core = brcmf_chip_get_core(&chip->pub, BCMA_CORE_INTERNAL_MEM); in brcmf_chip_cm3_set_passive()
1247 if (chip->pub.chip == BRCM_CC_43430_CHIP_ID) { in brcmf_chip_cm3_set_passive()
1248 sr = container_of(core, struct brcmf_core_priv, pub); in brcmf_chip_cm3_set_passive()
1258 core = brcmf_chip_get_core(&chip->pub, BCMA_CORE_INTERNAL_MEM); in brcmf_chip_cm3_set_active()
1264 chip->ops->activate(chip->ctx, &chip->pub, 0); in brcmf_chip_cm3_set_active()
1266 core = brcmf_chip_get_core(&chip->pub, BCMA_CORE_ARM_CM3); in brcmf_chip_cm3_set_active()
1279 core = brcmf_chip_get_core(&chip->pub, BCMA_CORE_80211); in brcmf_chip_cr4_set_passive()
1290 chip->ops->activate(chip->ctx, &chip->pub, rstvec); in brcmf_chip_cr4_set_active()
1293 core = brcmf_chip_get_core(&chip->pub, BCMA_CORE_ARM_CR4); in brcmf_chip_cr4_set_active()
1306 core = brcmf_chip_get_core(&chip->pub, BCMA_CORE_80211); in brcmf_chip_ca7_set_passive()
1317 chip->ops->activate(chip->ctx, &chip->pub, rstvec); in brcmf_chip_ca7_set_active()
1320 core = brcmf_chip_get_core(&chip->pub, BCMA_CORE_ARM_CA7); in brcmf_chip_ca7_set_active()
1326 void brcmf_chip_set_passive(struct brcmf_chip *pub) in brcmf_chip_set_passive() argument
1333 chip = container_of(pub, struct brcmf_chip_priv, pub); in brcmf_chip_set_passive()
1334 arm = brcmf_chip_get_core(pub, BCMA_CORE_ARM_CR4); in brcmf_chip_set_passive()
1339 arm = brcmf_chip_get_core(pub, BCMA_CORE_ARM_CA7); in brcmf_chip_set_passive()
1344 arm = brcmf_chip_get_core(pub, BCMA_CORE_ARM_CM3); in brcmf_chip_set_passive()
1351 bool brcmf_chip_set_active(struct brcmf_chip *pub, u32 rstvec) in brcmf_chip_set_active() argument
1358 chip = container_of(pub, struct brcmf_chip_priv, pub); in brcmf_chip_set_active()
1359 arm = brcmf_chip_get_core(pub, BCMA_CORE_ARM_CR4); in brcmf_chip_set_active()
1362 arm = brcmf_chip_get_core(pub, BCMA_CORE_ARM_CA7); in brcmf_chip_set_active()
1365 arm = brcmf_chip_get_core(pub, BCMA_CORE_ARM_CM3); in brcmf_chip_set_active()
1372 bool brcmf_chip_sr_capable(struct brcmf_chip *pub) in brcmf_chip_sr_capable() argument
1376 struct brcmf_core *pmu = brcmf_chip_get_pmu(pub); in brcmf_chip_sr_capable()
1381 if (pub->pmurev < 17) in brcmf_chip_sr_capable()
1384 base = brcmf_chip_get_chipcommon(pub)->base; in brcmf_chip_sr_capable()
1385 chip = container_of(pub, struct brcmf_chip_priv, pub); in brcmf_chip_sr_capable()
1387 switch (pub->chip) { in brcmf_chip_sr_capable()