drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c- Extension
.c- Size
- 39339 bytes
- Lines
- 1488
- Domain
- Driver Families
- Bucket
- drivers/net
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/kernel.hlinux/delay.hlinux/list.hlinux/ssb/ssb_regs.hlinux/bcma/bcma.hlinux/bcma/bcma_regs.hdefs.hsoc.hbrcm_hw_ids.hbrcmu_utils.hchipcommon.hdebug.hchip.h
Detected Declarations
struct sbconfigstruct sbsocramregsstruct brcmf_core_privstruct brcmf_chip_privfunction brcmf_chip_sb_corerevfunction brcmf_chip_sb_iscoreupfunction brcmf_chip_ai_iscoreupfunction brcmf_chip_sb_coredisablefunction brcmf_chip_ai_coredisablefunction brcmf_chip_sb_resetcorefunction brcmf_chip_ai_resetcorefunction brcmf_chip_cores_checkfunction list_for_each_entryfunction brcmf_chip_core_read32function brcmf_chip_core_write32function brcmf_chip_socram_banksizefunction brcmf_chip_socram_ramsizefunction brcmf_chip_sysmem_ramsizefunction brcmf_chip_tcm_ramsizefunction brcmf_chip_tcm_rambasefunction brcmf_chip_get_raminfofunction brcmf_chip_dmp_get_descfunction brcmf_chip_dmp_get_regaddrfunction brcmf_chip_dmp_erom_scanfunction brcmf_chip_enum_basefunction brcmf_chip_recognitionfunction brcmf_chip_disable_armfunction brcmf_chip_setupfunction brcmf_chip_detachfunction brcmf_chip_iscoreupfunction brcmf_chip_coredisablefunction brcmf_chip_resetcorefunction brcmf_chip_cm3_set_passivefunction brcmf_chip_cm3_set_activefunction brcmf_chip_cr4_set_passivefunction brcmf_chip_cr4_set_activefunction brcmf_chip_ca7_set_passivefunction brcmf_chip_ca7_set_activefunction brcmf_chip_set_passivefunction brcmf_chip_set_activefunction brcmf_chip_sr_capable
Annotated Snippet
struct sbconfig {
u32 PAD[2];
u32 sbipsflag; /* initiator port ocp slave flag */
u32 PAD[3];
u32 sbtpsflag; /* target port ocp slave flag */
u32 PAD[11];
u32 sbtmerrloga; /* (sonics >= 2.3) */
u32 PAD;
u32 sbtmerrlog; /* (sonics >= 2.3) */
u32 PAD[3];
u32 sbadmatch3; /* address match3 */
u32 PAD;
u32 sbadmatch2; /* address match2 */
u32 PAD;
u32 sbadmatch1; /* address match1 */
u32 PAD[7];
u32 sbimstate; /* initiator agent state */
u32 sbintvec; /* interrupt mask */
u32 sbtmstatelow; /* target state */
u32 sbtmstatehigh; /* target state */
u32 sbbwa0; /* bandwidth allocation table0 */
u32 PAD;
u32 sbimconfiglow; /* initiator configuration */
u32 sbimconfighigh; /* initiator configuration */
u32 sbadmatch0; /* address match0 */
u32 PAD;
u32 sbtmconfiglow; /* target configuration */
u32 sbtmconfighigh; /* target configuration */
u32 sbbconfig; /* broadcast configuration */
u32 PAD;
u32 sbbstate; /* broadcast state */
u32 PAD[3];
u32 sbactcnfg; /* activate configuration */
u32 PAD[3];
u32 sbflagst; /* current sbflags */
u32 PAD[3];
u32 sbidlow; /* identification */
u32 sbidhigh; /* identification */
};
#define INVALID_RAMBASE ((u32)(~0))
/* bankidx and bankinfo reg defines corerev >= 8 */
#define SOCRAM_BANKINFO_RETNTRAM_MASK 0x00010000
#define SOCRAM_BANKINFO_SZMASK 0x0000007f
#define SOCRAM_BANKIDX_ROM_MASK 0x00000100
#define SOCRAM_BANKIDX_MEMTYPE_SHIFT 8
/* socram bankinfo memtype */
#define SOCRAM_MEMTYPE_RAM 0
#define SOCRAM_MEMTYPE_R0M 1
#define SOCRAM_MEMTYPE_DEVRAM 2
#define SOCRAM_BANKINFO_SZBASE 8192
#define SRCI_LSS_MASK 0x00f00000
#define SRCI_LSS_SHIFT 20
#define SRCI_SRNB_MASK 0xf0
#define SRCI_SRNB_MASK_EXT 0x100
#define SRCI_SRNB_SHIFT 4
#define SRCI_SRBSZ_MASK 0xf
#define SRCI_SRBSZ_SHIFT 0
#define SR_BSZ_BASE 14
struct sbsocramregs {
u32 coreinfo;
u32 bwalloc;
u32 extracoreinfo;
u32 biststat;
u32 bankidx;
u32 standbyctrl;
u32 errlogstatus; /* rev 6 */
u32 errlogaddr; /* rev 6 */
/* used for patching rev 3 & 5 */
u32 cambankidx;
u32 cambankstandbyctrl;
u32 cambankpatchctrl;
u32 cambankpatchtblbaseaddr;
u32 cambankcmdreg;
u32 cambankdatareg;
u32 cambankmaskreg;
u32 PAD[1];
u32 bankinfo; /* corev 8 */
u32 bankpda;
u32 PAD[14];
u32 extmemconfig;
u32 extmemparitycsr;
u32 extmemparityerrdata;
u32 extmemparityerrcnt;
u32 extmemwrctrlandsize;
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/delay.h`, `linux/list.h`, `linux/ssb/ssb_regs.h`, `linux/bcma/bcma.h`, `linux/bcma/bcma_regs.h`, `defs.h`, `soc.h`.
- Detected declarations: `struct sbconfig`, `struct sbsocramregs`, `struct brcmf_core_priv`, `struct brcmf_chip_priv`, `function brcmf_chip_sb_corerev`, `function brcmf_chip_sb_iscoreup`, `function brcmf_chip_ai_iscoreup`, `function brcmf_chip_sb_coredisable`, `function brcmf_chip_ai_coredisable`, `function brcmf_chip_sb_resetcore`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.