include/linux/mailbox/mtk-cmdq-mailbox.h
Source file repositories/reference/linux-study-clean/include/linux/mailbox/mtk-cmdq-mailbox.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/mailbox/mtk-cmdq-mailbox.h- Extension
.h- Size
- 2849 bytes
- Lines
- 112
- 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/platform_device.hlinux/slab.hlinux/types.h
Detected Declarations
struct cmdq_cb_datastruct cmdq_mbox_privstruct cmdq_pktenum cmdq_code
Annotated Snippet
struct cmdq_cb_data {
int sta;
struct cmdq_pkt *pkt;
};
struct cmdq_mbox_priv {
u8 shift_pa;
dma_addr_t mminfra_offset;
};
struct cmdq_pkt {
void *va_base;
dma_addr_t pa_base;
size_t cmd_buf_size; /* command occupied size */
size_t buf_size; /* real buffer size */
struct cmdq_mbox_priv priv; /* for generating instruction */
};
/**
* cmdq_get_mbox_priv() - get the private data of mailbox channel
* @chan: mailbox channel
* @priv: pointer to store the private data of mailbox channel
*
* While generating the GCE instruction to command buffer, the private data
* of GCE hardware may need to be referenced, such as the shift bits of
* physical address.
*
* This function should be called before generating the GCE instruction.
*/
void cmdq_get_mbox_priv(struct mbox_chan *chan, struct cmdq_mbox_priv *priv);
/**
* cmdq_get_shift_pa() - get the shift bits of physical address
* @chan: mailbox channel
*
* GCE can only fetch the command buffer address from a 32-bit register.
* Some SOCs support more than 32-bit command buffer address for GCE, which
* requires some shift bits to make the address fit into the 32-bit register.
*
* Return: the shift bits of physical address
*/
u8 cmdq_get_shift_pa(struct mbox_chan *chan);
#endif /* __MTK_CMDQ_MAILBOX_H__ */
Annotation
- Immediate include surface: `linux/platform_device.h`, `linux/slab.h`, `linux/types.h`.
- Detected declarations: `struct cmdq_cb_data`, `struct cmdq_mbox_priv`, `struct cmdq_pkt`, `enum cmdq_code`.
- 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.