include/linux/mfd/intel-m10-bmc.h
Source file repositories/reference/linux-study-clean/include/linux/mfd/intel-m10-bmc.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/mfd/intel-m10-bmc.h- Extension
.h- Size
- 10107 bytes
- Lines
- 310
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source 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 or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/bitfield.hlinux/bits.hlinux/dev_printk.hlinux/regmap.hlinux/rwsem.h
Detected Declarations
struct m10bmc_csr_mapstruct intel_m10bmc_platform_infostruct intel_m10bmcstruct intel_m10bmc_flash_bulk_opsstruct intel_m10bmcenum m10bmc_fw_statefunction m10bmc_raw_read
Annotated Snippet
struct m10bmc_csr_map {
unsigned int base;
unsigned int build_version;
unsigned int fw_version;
unsigned int mac_low;
unsigned int mac_high;
unsigned int doorbell;
unsigned int auth_result;
unsigned int bmc_prog_addr;
unsigned int bmc_reh_addr;
unsigned int bmc_magic;
unsigned int sr_prog_addr;
unsigned int sr_reh_addr;
unsigned int sr_magic;
unsigned int pr_prog_addr;
unsigned int pr_reh_addr;
unsigned int pr_magic;
unsigned int rsu_update_counter;
unsigned int staging_size;
};
/**
* struct intel_m10bmc_platform_info - Intel MAX 10 BMC platform specific information
* @cells: MFD cells
* @n_cells: MFD cells ARRAY_SIZE()
* @handshake_sys_reg_ranges: array of register ranges for fw handshake regs
* @handshake_sys_reg_nranges: number of register ranges for fw handshake regs
* @csr_map: the mappings for register definition of MAX10 BMC
*/
struct intel_m10bmc_platform_info {
struct mfd_cell *cells;
int n_cells;
const struct regmap_range *handshake_sys_reg_ranges;
unsigned int handshake_sys_reg_nranges;
const struct m10bmc_csr_map *csr_map;
};
struct intel_m10bmc;
/**
* struct intel_m10bmc_flash_bulk_ops - device specific operations for flash R/W
* @read: read a block of data from flash
* @write: write a block of data to flash
* @lock_write: locks flash access for erase+write
* @unlock_write: unlock flash access
*
* Write must be protected with @lock_write and @unlock_write. While the flash
* is locked, @read returns -EBUSY.
*/
struct intel_m10bmc_flash_bulk_ops {
int (*read)(struct intel_m10bmc *m10bmc, u8 *buf, u32 addr, u32 size);
int (*write)(struct intel_m10bmc *m10bmc, const u8 *buf, u32 offset, u32 size);
int (*lock_write)(struct intel_m10bmc *m10bmc);
void (*unlock_write)(struct intel_m10bmc *m10bmc);
};
enum m10bmc_fw_state {
M10BMC_FW_STATE_NORMAL,
M10BMC_FW_STATE_SEC_UPDATE_PREPARE,
M10BMC_FW_STATE_SEC_UPDATE_WRITE,
M10BMC_FW_STATE_SEC_UPDATE_PROGRAM,
};
/**
* struct intel_m10bmc - Intel MAX 10 BMC parent driver data structure
* @dev: this device
* @regmap: the regmap used to access registers by m10bmc itself
* @info: the platform information for MAX10 BMC
* @flash_bulk_ops: optional device specific operations for flash R/W
* @bmcfw_lock: read/write semaphore to BMC firmware running state
* @bmcfw_state: BMC firmware running state. Available only when
* handshake_sys_reg_nranges > 0.
*/
struct intel_m10bmc {
struct device *dev;
struct regmap *regmap;
const struct intel_m10bmc_platform_info *info;
const struct intel_m10bmc_flash_bulk_ops *flash_bulk_ops;
struct rw_semaphore bmcfw_lock; /* Protects bmcfw_state */
enum m10bmc_fw_state bmcfw_state;
};
/*
* register access helper functions.
*
* m10bmc_raw_read - read m10bmc register per addr
* m10bmc_sys_read - read m10bmc system register per offset
* m10bmc_sys_update_bits - update m10bmc system register per offset
*/
static inline int
Annotation
- Immediate include surface: `linux/bitfield.h`, `linux/bits.h`, `linux/dev_printk.h`, `linux/regmap.h`, `linux/rwsem.h`.
- Detected declarations: `struct m10bmc_csr_map`, `struct intel_m10bmc_platform_info`, `struct intel_m10bmc`, `struct intel_m10bmc_flash_bulk_ops`, `struct intel_m10bmc`, `enum m10bmc_fw_state`, `function m10bmc_raw_read`.
- Atlas domain: Core OS / Core Kernel Interface.
- Implementation status: source 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.