drivers/clocksource/sh_tmu.c
Source file repositories/reference/linux-study-clean/drivers/clocksource/sh_tmu.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/clocksource/sh_tmu.c- Extension
.c- Size
- 14562 bytes
- Lines
- 658
- Domain
- Driver Families
- Bucket
- drivers/clocksource
- 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/clk.hlinux/clockchips.hlinux/clocksource.hlinux/delay.hlinux/err.hlinux/init.hlinux/interrupt.hlinux/io.hlinux/ioport.hlinux/irq.hlinux/module.hlinux/of.hlinux/platform_device.hlinux/pm_domain.hlinux/pm_runtime.hlinux/sh_timer.hlinux/slab.hlinux/spinlock.hasm/platform_early.h
Detected Declarations
struct sh_tmu_devicestruct sh_tmu_channelstruct sh_tmu_deviceenum sh_tmu_modelfunction sh_tmu_readfunction sh_tmu_writefunction sh_tmu_start_stop_chfunction __sh_tmu_enablefunction sh_tmu_enablefunction __sh_tmu_disablefunction sh_tmu_disablefunction sh_tmu_set_nextfunction sh_tmu_interruptfunction sh_tmu_clocksource_readfunction sh_tmu_clocksource_enablefunction sh_tmu_clocksource_disablefunction sh_tmu_clocksource_suspendfunction sh_tmu_clocksource_resumefunction sh_tmu_register_clocksourcefunction sh_tmu_clock_event_startfunction sh_tmu_clock_event_shutdownfunction sh_tmu_clock_event_set_statefunction sh_tmu_clock_event_set_oneshotfunction sh_tmu_clock_event_set_periodicfunction sh_tmu_clock_event_nextfunction sh_tmu_clock_event_suspendfunction sh_tmu_clock_event_resumefunction sh_tmu_register_clockeventfunction sh_tmu_registerfunction sh_tmu_channel_setupfunction sh_tmu_map_memoryfunction sh_tmu_parse_dtfunction sh_tmu_setupfunction sh_tmu_probefunction sh_tmu_initfunction sh_tmu_exitmodule init sh_tmu_init
Annotated Snippet
subsys_initcall(sh_tmu_init);
module_exit(sh_tmu_exit);
MODULE_AUTHOR("Magnus Damm");
MODULE_DESCRIPTION("SuperH TMU Timer Driver");
Annotation
- Immediate include surface: `linux/clk.h`, `linux/clockchips.h`, `linux/clocksource.h`, `linux/delay.h`, `linux/err.h`, `linux/init.h`, `linux/interrupt.h`, `linux/io.h`.
- Detected declarations: `struct sh_tmu_device`, `struct sh_tmu_channel`, `struct sh_tmu_device`, `enum sh_tmu_model`, `function sh_tmu_read`, `function sh_tmu_write`, `function sh_tmu_start_stop_ch`, `function __sh_tmu_enable`, `function sh_tmu_enable`, `function __sh_tmu_disable`.
- Atlas domain: Driver Families / drivers/clocksource.
- 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.