drivers/media/pci/intel/ipu6/ipu6-fw-com.c
Source file repositories/reference/linux-study-clean/drivers/media/pci/intel/ipu6/ipu6-fw-com.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/pci/intel/ipu6/ipu6-fw-com.c- Extension
.c- Size
- 11655 bytes
- Lines
- 414
- Domain
- Driver Families
- Bucket
- drivers/media
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- 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/device.hlinux/dma-mapping.hlinux/io.hlinux/math.hlinux/overflow.hlinux/slab.hlinux/types.hipu6-bus.hipu6-dma.hipu6-fw-com.h
Detected Declarations
struct ipu6_fw_sys_queuestruct ipu6_fw_sys_queue_resstruct ipu6_fw_syscom_configstruct ipu6_fw_com_contextenum syscom_stateenum syscom_cmdenum regmem_idenum buttress_syscom_idfunction ipu6_sys_queue_initfunction ipu6_fw_com_openfunction ipu6_fw_com_closefunction ipu6_fw_com_releasefunction ipu6_fw_com_readyfunction ipu6_send_put_tokenfunction ipu6_recv_put_token
Annotated Snippet
struct ipu6_fw_sys_queue {
u64 host_address;
u32 vied_address;
u32 size;
u32 token_size;
u32 wr_reg; /* reg number in subsystem's regmem */
u32 rd_reg;
u32 _align;
} __packed;
struct ipu6_fw_sys_queue_res {
u64 host_address;
u32 vied_address;
u32 reg;
} __packed;
enum syscom_state {
/* Program load or explicit host setting should init to this */
SYSCOM_STATE_UNINIT = 0x57a7e000,
/* SP Syscom sets this when it is ready for use */
SYSCOM_STATE_READY = 0x57a7e001,
/* SP Syscom sets this when no more syscom accesses will happen */
SYSCOM_STATE_INACTIVE = 0x57a7e002,
};
enum syscom_cmd {
/* Program load or explicit host setting should init to this */
SYSCOM_COMMAND_UNINIT = 0x57a7f000,
/* Host Syscom requests syscom to become inactive */
SYSCOM_COMMAND_INACTIVE = 0x57a7f001,
};
/* firmware config: data that sent from the host to SP via DDR */
/* Cell copies data into a context */
struct ipu6_fw_syscom_config {
u32 firmware_address;
u32 num_input_queues;
u32 num_output_queues;
/* ISP pointers to an array of ipu6_fw_sys_queue structures */
u32 input_queue;
u32 output_queue;
/* ISYS / PSYS private data */
u32 specific_addr;
u32 specific_size;
};
struct ipu6_fw_com_context {
struct ipu6_bus_device *adev;
void __iomem *dmem_addr;
int (*cell_ready)(struct ipu6_bus_device *adev);
void (*cell_start)(struct ipu6_bus_device *adev);
void *dma_buffer;
dma_addr_t dma_addr;
unsigned int dma_size;
struct ipu6_fw_sys_queue *input_queue; /* array of host to SP queues */
struct ipu6_fw_sys_queue *output_queue; /* array of SP to host */
u32 config_vied_addr;
unsigned int buttress_boot_offset;
void __iomem *base_addr;
};
#define FW_COM_WR_REG 0
#define FW_COM_RD_REG 4
#define REGMEM_OFFSET 0
#define TUNIT_MAGIC_PATTERN 0x5a5a5a5a
enum regmem_id {
/* pass pkg_dir address to SPC in non-secure mode */
PKG_DIR_ADDR_REG = 0,
/* Tunit CFG blob for secure - provided by host.*/
TUNIT_CFG_DWR_REG = 1,
/* syscom commands - modified by the host */
SYSCOM_COMMAND_REG = 2,
/* Store interrupt status - updated by SP */
SYSCOM_IRQ_REG = 3,
/* first syscom queue pointer register */
SYSCOM_QPR_BASE_REG = 4
};
#define BUTTRESS_FW_BOOT_PARAMS_0 0x4000
#define BUTTRESS_FW_BOOT_PARAM_REG(base, offset, id) \
Annotation
- Immediate include surface: `linux/device.h`, `linux/dma-mapping.h`, `linux/io.h`, `linux/math.h`, `linux/overflow.h`, `linux/slab.h`, `linux/types.h`, `ipu6-bus.h`.
- Detected declarations: `struct ipu6_fw_sys_queue`, `struct ipu6_fw_sys_queue_res`, `struct ipu6_fw_syscom_config`, `struct ipu6_fw_com_context`, `enum syscom_state`, `enum syscom_cmd`, `enum regmem_id`, `enum buttress_syscom_id`, `function ipu6_sys_queue_init`, `function ipu6_fw_com_open`.
- Atlas domain: Driver Families / drivers/media.
- Implementation status: integration 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.