include/linux/bcma/bcma.h
Source file repositories/reference/linux-study-clean/include/linux/bcma/bcma.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/bcma/bcma.h- Extension
.h- Size
- 15344 bytes
- Lines
- 490
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: operation-table or driver-model contract
- Status
- pattern implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Defines an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/pci.hlinux/mod_devicetable.hlinux/bcma/bcma_driver_arm_c9.hlinux/bcma/bcma_driver_chipcommon.hlinux/bcma/bcma_driver_pci.hlinux/bcma/bcma_driver_pcie2.hlinux/bcma/bcma_driver_mips.hlinux/bcma/bcma_driver_gmac_cmn.hlinux/ssb/ssb.hlinux/bcma/bcma_regs.h
Detected Declarations
struct bcma_devicestruct bcma_busstruct bcma_chipinfostruct bcma_boardinfostruct bcma_host_opsstruct bcma_devicestruct bcma_driverstruct bcma_busenum bcma_hosttypeenum bcma_clkmodefunction bcma_set_drvdatafunction bcma_read8function bcma_read16function bcma_read32function bcma_write8function bcma_write16function bcma_write32function bcma_block_readfunction bcma_block_writefunction bcma_aread32function bcma_awrite32function bcma_mask32function bcma_set32function bcma_maskset32function bcma_mask16function bcma_set16function bcma_maskset16function bcma_host_pci_up
Annotated Snippet
struct device_driver drv;
};
extern
int __bcma_driver_register(struct bcma_driver *drv, struct module *owner);
#define bcma_driver_register(drv) \
__bcma_driver_register(drv, THIS_MODULE)
extern void bcma_driver_unregister(struct bcma_driver *drv);
/* module_bcma_driver() - Helper macro for drivers that don't do
* anything special in module init/exit. This eliminates a lot of
* boilerplate. Each module may only use this macro once, and
* calling it replaces module_init() and module_exit()
*/
#define module_bcma_driver(__bcma_driver) \
module_driver(__bcma_driver, bcma_driver_register, \
bcma_driver_unregister)
/* Set a fallback SPROM.
* See kdoc at the function definition for complete documentation. */
extern int bcma_arch_register_fallback_sprom(
int (*sprom_callback)(struct bcma_bus *bus,
struct ssb_sprom *out));
struct bcma_bus {
struct device *dev;
/* The MMIO area. */
void __iomem *mmio;
const struct bcma_host_ops *ops;
enum bcma_hosttype hosttype;
bool host_is_pcie2; /* Used for BCMA_HOSTTYPE_PCI only */
struct pci_dev *host_pci; /* PCI bus pointer (BCMA_HOSTTYPE_PCI only) */
struct bcma_chipinfo chipinfo;
struct bcma_boardinfo boardinfo;
struct bcma_device *mapped_core;
struct list_head cores;
u8 nr_cores;
u8 num;
struct bcma_drv_cc drv_cc;
struct bcma_drv_cc_b drv_cc_b;
struct bcma_drv_pci drv_pci[2];
struct bcma_drv_pcie2 drv_pcie2;
struct bcma_drv_mips drv_mips;
struct bcma_drv_gmac_cmn drv_gmac_cmn;
/* We decided to share SPROM struct with SSB as long as we do not need
* any hacks for BCMA. This simplifies drivers code. */
struct ssb_sprom sprom;
};
static inline u32 bcma_read8(struct bcma_device *core, u16 offset)
{
return core->bus->ops->read8(core, offset);
}
static inline u32 bcma_read16(struct bcma_device *core, u16 offset)
{
return core->bus->ops->read16(core, offset);
}
static inline u32 bcma_read32(struct bcma_device *core, u16 offset)
{
return core->bus->ops->read32(core, offset);
}
static inline
void bcma_write8(struct bcma_device *core, u16 offset, u32 value)
{
core->bus->ops->write8(core, offset, value);
}
static inline
void bcma_write16(struct bcma_device *core, u16 offset, u32 value)
{
core->bus->ops->write16(core, offset, value);
}
static inline
void bcma_write32(struct bcma_device *core, u16 offset, u32 value)
{
core->bus->ops->write32(core, offset, value);
}
#ifdef CONFIG_BCMA_BLOCKIO
static inline void bcma_block_read(struct bcma_device *core, void *buffer,
size_t count, u16 offset, u8 reg_width)
{
core->bus->ops->block_read(core, buffer, count, offset, reg_width);
}
Annotation
- Immediate include surface: `linux/pci.h`, `linux/mod_devicetable.h`, `linux/bcma/bcma_driver_arm_c9.h`, `linux/bcma/bcma_driver_chipcommon.h`, `linux/bcma/bcma_driver_pci.h`, `linux/bcma/bcma_driver_pcie2.h`, `linux/bcma/bcma_driver_mips.h`, `linux/bcma/bcma_driver_gmac_cmn.h`.
- Detected declarations: `struct bcma_device`, `struct bcma_bus`, `struct bcma_chipinfo`, `struct bcma_boardinfo`, `struct bcma_host_ops`, `struct bcma_device`, `struct bcma_driver`, `struct bcma_bus`, `enum bcma_hosttype`, `enum bcma_clkmode`.
- Atlas domain: Core OS / Core Kernel Interface.
- Implementation status: pattern implementation candidate.
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.