drivers/net/wireless/mediatek/mt76/mt7921/sdio_mcu.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/mediatek/mt76/mt7921/sdio_mcu.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/mediatek/mt76/mt7921/sdio_mcu.c- Extension
.c- Size
- 4187 bytes
- Lines
- 176
- Domain
- Driver Families
- Bucket
- drivers/net
- Inferred role
- Driver Families: implementation source
- Status
- source 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/kernel.hlinux/mmc/sdio_func.hlinux/module.hlinux/iopoll.hmt7921.h../sdio.h../mt76_connac2_mac.hmcu.hregs.h
Detected Declarations
function mt7921s_mcu_send_messagefunction mt7921s_read_rm3rfunction mt7921s_clear_rm3r_drv_ownfunction mt7921s_mcu_initfunction mt7921s_mcu_drv_pmctrlfunction mt7921s_mcu_fw_pmctrl
Annotated Snippet
if (err < 0) {
dev_err(dev->mt76.dev, "mailbox ACK not cleared\n");
goto out;
}
}
sdio_writel(func, WHLPCR_FW_OWN_REQ_SET, MCR_WHLPCR, NULL);
err = readx_poll_timeout(mt76s_read_pcr, &dev->mt76, status,
!(status & WHLPCR_IS_DRIVER_OWN), 2000, 1000000);
out:
sdio_release_host(func);
if (err < 0) {
dev_err(dev->mt76.dev, "firmware own failed\n");
clear_bit(MT76_STATE_PM, &mphy->state);
return -EIO;
}
pm->stats.last_doze_event = jiffies;
pm->stats.awake_time += pm->stats.last_doze_event -
pm->stats.last_wake_event;
return 0;
}
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/mmc/sdio_func.h`, `linux/module.h`, `linux/iopoll.h`, `mt7921.h`, `../sdio.h`, `../mt76_connac2_mac.h`, `mcu.h`.
- Detected declarations: `function mt7921s_mcu_send_message`, `function mt7921s_read_rm3r`, `function mt7921s_clear_rm3r_drv_own`, `function mt7921s_mcu_init`, `function mt7921s_mcu_drv_pmctrl`, `function mt7921s_mcu_fw_pmctrl`.
- Atlas domain: Driver Families / drivers/net.
- 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.