• Home
  • Raw
  • Download

Lines Matching refs:pub

227 	struct brcmf_core pub;  member
234 struct brcmf_chip pub; member
264 address = CORE_SB(core->pub.base, sbtmstatelow); in brcmf_chip_sb_iscoreup()
294 base = core->pub.base; in brcmf_chip_sb_coredisable()
399 base = core->pub.base; in brcmf_chip_sb_resetcore()
486 core->pub.id = coreid; in brcmf_chip_add_core()
487 core->pub.base = base; in brcmf_chip_add_core()
492 return &core->pub; in brcmf_chip_add_core()
506 idx++, core->pub.id, core->pub.rev, core->pub.base, in brcmf_chip_cores_check()
509 switch (core->pub.id) { in brcmf_chip_cores_check()
542 return core->chip->ops->read32(core->chip->ctx, core->pub.base + reg); in brcmf_chip_core_read32()
548 core->chip->ops->write32(core->chip->ctx, core->pub.base + reg, val); in brcmf_chip_core_write32()
576 if (WARN_ON(sr->pub.rev < 4)) in brcmf_chip_socram_ramsize()
579 if (!brcmf_chip_iscoreup(&sr->pub)) in brcmf_chip_socram_ramsize()
580 brcmf_chip_resetcore(&sr->pub, 0, 0, 0); in brcmf_chip_socram_ramsize()
586 if ((sr->pub.rev <= 7) || (sr->pub.rev == 12)) { in brcmf_chip_socram_ramsize()
605 switch (sr->chip->pub.chip) { in brcmf_chip_socram_ramsize()
607 if (sr->chip->pub.chiprev < 2) in brcmf_chip_socram_ramsize()
630 if (!brcmf_chip_iscoreup(&sysmem->pub)) in brcmf_chip_sysmem_ramsize()
631 brcmf_chip_resetcore(&sysmem->pub, 0, 0, 0); in brcmf_chip_sysmem_ramsize()
672 switch (ci->pub.chip) { in brcmf_chip_tcm_rambase()
691 brcmf_err("unknown chip: %s\n", ci->pub.name); in brcmf_chip_tcm_rambase()
702 mem = brcmf_chip_get_core(&ci->pub, BCMA_CORE_ARM_CR4); in brcmf_chip_get_raminfo()
704 mem_core = container_of(mem, struct brcmf_core_priv, pub); in brcmf_chip_get_raminfo()
705 ci->pub.ramsize = brcmf_chip_tcm_ramsize(mem_core); in brcmf_chip_get_raminfo()
706 ci->pub.rambase = brcmf_chip_tcm_rambase(ci); in brcmf_chip_get_raminfo()
707 if (!ci->pub.rambase) { in brcmf_chip_get_raminfo()
712 mem = brcmf_chip_get_core(&ci->pub, BCMA_CORE_SYS_MEM); in brcmf_chip_get_raminfo()
715 pub); in brcmf_chip_get_raminfo()
716 ci->pub.ramsize = brcmf_chip_sysmem_ramsize(mem_core); in brcmf_chip_get_raminfo()
717 ci->pub.rambase = brcmf_chip_tcm_rambase(ci); in brcmf_chip_get_raminfo()
718 if (!ci->pub.rambase) { in brcmf_chip_get_raminfo()
723 mem = brcmf_chip_get_core(&ci->pub, in brcmf_chip_get_raminfo()
730 pub); in brcmf_chip_get_raminfo()
731 brcmf_chip_socram_ramsize(mem_core, &ci->pub.ramsize, in brcmf_chip_get_raminfo()
732 &ci->pub.srsize); in brcmf_chip_get_raminfo()
736 ci->pub.rambase, ci->pub.ramsize, ci->pub.ramsize, in brcmf_chip_get_raminfo()
737 ci->pub.srsize, ci->pub.srsize); in brcmf_chip_get_raminfo()
739 if (!ci->pub.ramsize) { in brcmf_chip_get_raminfo()
744 if (ci->pub.ramsize > BRCMF_CHIP_MAX_MEMSIZE) { in brcmf_chip_get_raminfo()
910 ci->pub.chip = regdata & CID_ID_MASK; in brcmf_chip_recognition()
911 ci->pub.chiprev = (regdata & CID_REV_MASK) >> CID_REV_SHIFT; in brcmf_chip_recognition()
914 brcmf_chip_name(ci->pub.chip, ci->pub.name, sizeof(ci->pub.name)); in brcmf_chip_recognition()
916 socitype == SOCI_SB ? "SB" : "AXI", ci->pub.name, in brcmf_chip_recognition()
917 ci->pub.chiprev); in brcmf_chip_recognition()
920 if (ci->pub.chip != BRCM_CC_4329_CHIP_ID) { in brcmf_chip_recognition()
960 brcmf_chip_set_passive(&ci->pub); in brcmf_chip_recognition()
966 ci->ops->reset(ci->ctx, &ci->pub); in brcmf_chip_recognition()
967 brcmf_chip_set_passive(&ci->pub); in brcmf_chip_recognition()
980 core = brcmf_chip_get_core(&chip->pub, id); in brcmf_chip_disable_arm()
990 cpu = container_of(core, struct brcmf_core_priv, pub); in brcmf_chip_disable_arm()
1006 struct brcmf_chip *pub; in brcmf_chip_setup() local
1012 pub = &chip->pub; in brcmf_chip_setup()
1014 base = cc->pub.base; in brcmf_chip_setup()
1017 pub->cc_caps = chip->ops->read32(chip->ctx, in brcmf_chip_setup()
1021 if (pub->cc_caps & CC_CAP_PMU) { in brcmf_chip_setup()
1024 pub->pmurev = val & PCAP_REV_MASK; in brcmf_chip_setup()
1025 pub->pmucaps = val; in brcmf_chip_setup()
1029 cc->pub.rev, pub->pmurev, pub->pmucaps); in brcmf_chip_setup()
1033 ret = chip->ops->setup(chip->ctx, pub); in brcmf_chip_setup()
1076 return &chip->pub; in brcmf_chip_attach()
1079 brcmf_chip_detach(&chip->pub); in brcmf_chip_attach()
1083 void brcmf_chip_detach(struct brcmf_chip *pub) in brcmf_chip_detach() argument
1089 chip = container_of(pub, struct brcmf_chip_priv, pub); in brcmf_chip_detach()
1097 struct brcmf_core *brcmf_chip_get_core(struct brcmf_chip *pub, u16 coreid) in brcmf_chip_get_core() argument
1102 chip = container_of(pub, struct brcmf_chip_priv, pub); in brcmf_chip_get_core()
1104 if (core->pub.id == coreid) in brcmf_chip_get_core()
1105 return &core->pub; in brcmf_chip_get_core()
1110 struct brcmf_core *brcmf_chip_get_chipcommon(struct brcmf_chip *pub) in brcmf_chip_get_chipcommon() argument
1115 chip = container_of(pub, struct brcmf_chip_priv, pub); in brcmf_chip_get_chipcommon()
1117 if (WARN_ON(!cc || cc->pub.id != BCMA_CORE_CHIPCOMMON)) in brcmf_chip_get_chipcommon()
1118 return brcmf_chip_get_core(pub, BCMA_CORE_CHIPCOMMON); in brcmf_chip_get_chipcommon()
1119 return &cc->pub; in brcmf_chip_get_chipcommon()
1122 bool brcmf_chip_iscoreup(struct brcmf_core *pub) in brcmf_chip_iscoreup() argument
1126 core = container_of(pub, struct brcmf_core_priv, pub); in brcmf_chip_iscoreup()
1130 void brcmf_chip_coredisable(struct brcmf_core *pub, u32 prereset, u32 reset) in brcmf_chip_coredisable() argument
1134 core = container_of(pub, struct brcmf_core_priv, pub); in brcmf_chip_coredisable()
1138 void brcmf_chip_resetcore(struct brcmf_core *pub, u32 prereset, u32 reset, in brcmf_chip_resetcore() argument
1143 core = container_of(pub, struct brcmf_core_priv, pub); in brcmf_chip_resetcore()
1154 core = brcmf_chip_get_core(&chip->pub, BCMA_CORE_80211); in brcmf_chip_cm3_set_passive()
1159 core = brcmf_chip_get_core(&chip->pub, BCMA_CORE_INTERNAL_MEM); in brcmf_chip_cm3_set_passive()
1163 if (chip->pub.chip == BRCM_CC_43430_CHIP_ID) { in brcmf_chip_cm3_set_passive()
1164 sr = container_of(core, struct brcmf_core_priv, pub); in brcmf_chip_cm3_set_passive()
1174 core = brcmf_chip_get_core(&chip->pub, BCMA_CORE_INTERNAL_MEM); in brcmf_chip_cm3_set_active()
1180 chip->ops->activate(chip->ctx, &chip->pub, 0); in brcmf_chip_cm3_set_active()
1182 core = brcmf_chip_get_core(&chip->pub, BCMA_CORE_ARM_CM3); in brcmf_chip_cm3_set_active()
1195 core = brcmf_chip_get_core(&chip->pub, BCMA_CORE_80211); in brcmf_chip_cr4_set_passive()
1206 chip->ops->activate(chip->ctx, &chip->pub, rstvec); in brcmf_chip_cr4_set_active()
1209 core = brcmf_chip_get_core(&chip->pub, BCMA_CORE_ARM_CR4); in brcmf_chip_cr4_set_active()
1222 core = brcmf_chip_get_core(&chip->pub, BCMA_CORE_80211); in brcmf_chip_ca7_set_passive()
1233 chip->ops->activate(chip->ctx, &chip->pub, rstvec); in brcmf_chip_ca7_set_active()
1236 core = brcmf_chip_get_core(&chip->pub, BCMA_CORE_ARM_CA7); in brcmf_chip_ca7_set_active()
1242 void brcmf_chip_set_passive(struct brcmf_chip *pub) in brcmf_chip_set_passive() argument
1249 chip = container_of(pub, struct brcmf_chip_priv, pub); in brcmf_chip_set_passive()
1250 arm = brcmf_chip_get_core(pub, BCMA_CORE_ARM_CR4); in brcmf_chip_set_passive()
1255 arm = brcmf_chip_get_core(pub, BCMA_CORE_ARM_CA7); in brcmf_chip_set_passive()
1260 arm = brcmf_chip_get_core(pub, BCMA_CORE_ARM_CM3); in brcmf_chip_set_passive()
1267 bool brcmf_chip_set_active(struct brcmf_chip *pub, u32 rstvec) in brcmf_chip_set_active() argument
1274 chip = container_of(pub, struct brcmf_chip_priv, pub); in brcmf_chip_set_active()
1275 arm = brcmf_chip_get_core(pub, BCMA_CORE_ARM_CR4); in brcmf_chip_set_active()
1278 arm = brcmf_chip_get_core(pub, BCMA_CORE_ARM_CA7); in brcmf_chip_set_active()
1281 arm = brcmf_chip_get_core(pub, BCMA_CORE_ARM_CM3); in brcmf_chip_set_active()
1288 bool brcmf_chip_sr_capable(struct brcmf_chip *pub) in brcmf_chip_sr_capable() argument
1296 if (pub->pmurev < 17) in brcmf_chip_sr_capable()
1299 base = brcmf_chip_get_chipcommon(pub)->base; in brcmf_chip_sr_capable()
1300 chip = container_of(pub, struct brcmf_chip_priv, pub); in brcmf_chip_sr_capable()
1302 switch (pub->chip) { in brcmf_chip_sr_capable()