drivers/mailbox/mtk-cmdq-mailbox.c
Source file repositories/reference/linux-study-clean/drivers/mailbox/mtk-cmdq-mailbox.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/mailbox/mtk-cmdq-mailbox.c- Extension
.c- Size
- 23717 bytes
- Lines
- 888
- Domain
- Driver Families
- Bucket
- drivers/mailbox
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- 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/bitops.hlinux/clk.hlinux/clk-provider.hlinux/dma-mapping.hlinux/errno.hlinux/interrupt.hlinux/io.hlinux/iopoll.hlinux/kernel.hlinux/module.hlinux/platform_device.hlinux/pm_runtime.hlinux/sizes.hlinux/mailbox_controller.hlinux/mailbox/mtk-cmdq-mailbox.hlinux/of.h
Detected Declarations
struct cmdq_threadstruct cmdq_taskstruct cmdqstruct gce_platfunction cmdq_convert_gce_addrfunction cmdq_revert_gce_addrfunction cmdq_get_mbox_privfunction cmdq_get_shift_pafunction cmdq_vm_initfunction cmdq_gctl_value_togglefunction cmdq_thread_suspendfunction cmdq_thread_resumefunction cmdq_initfunction cmdq_thread_resetfunction cmdq_thread_disablefunction cmdq_thread_invalidate_fetched_datafunction cmdq_task_insert_into_threadfunction cmdq_thread_is_in_wfefunction cmdq_task_exec_donefunction cmdq_task_handle_errorfunction cmdq_thread_irq_handlerfunction list_for_each_entry_safefunction cmdq_irq_handlerfunction for_each_clear_bitfunction cmdq_runtime_resumefunction cmdq_runtime_suspendfunction cmdq_suspendfunction cmdq_resumefunction cmdq_removefunction cmdq_mbox_send_datafunction cmdq_mbox_startupfunction cmdq_mbox_shutdownfunction list_for_each_entry_safefunction cmdq_mbox_flushfunction list_for_each_entry_safefunction cmdq_get_clocksfunction cmdq_probefunction cmdq_drv_initfunction cmdq_drv_exitmodule init cmdq_drv_initexport cmdq_get_mbox_privexport cmdq_get_shift_pa
Annotated Snippet
subsys_initcall(cmdq_drv_init);
module_exit(cmdq_drv_exit);
MODULE_DESCRIPTION("Mediatek Command Queue(CMDQ) Mailbox driver");
MODULE_LICENSE("GPL v2");
Annotation
- Immediate include surface: `linux/bitops.h`, `linux/clk.h`, `linux/clk-provider.h`, `linux/dma-mapping.h`, `linux/errno.h`, `linux/interrupt.h`, `linux/io.h`, `linux/iopoll.h`.
- Detected declarations: `struct cmdq_thread`, `struct cmdq_task`, `struct cmdq`, `struct gce_plat`, `function cmdq_convert_gce_addr`, `function cmdq_revert_gce_addr`, `function cmdq_get_mbox_priv`, `function cmdq_get_shift_pa`, `function cmdq_vm_init`, `function cmdq_gctl_value_toggle`.
- Atlas domain: Driver Families / drivers/mailbox.
- Implementation status: integration implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
- 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.