drivers/clocksource/sh_mtu2.c
Source file repositories/reference/linux-study-clean/drivers/clocksource/sh_mtu2.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/clocksource/sh_mtu2.c- Extension
.c- Size
- 12269 bytes
- Lines
- 527
- 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/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_mtu2_devicestruct sh_mtu2_channelstruct sh_mtu2_devicefunction sh_mtu2_readfunction sh_mtu2_writefunction sh_mtu2_start_stop_chfunction sh_mtu2_enablefunction sh_mtu2_disablefunction sh_mtu2_interruptfunction sh_mtu2_clock_event_shutdownfunction sh_mtu2_clock_event_set_periodicfunction sh_mtu2_clock_event_suspendfunction sh_mtu2_clock_event_resumefunction sh_mtu2_register_clockeventfunction sh_mtu2_registerfunction sh_mtu2_setup_channelfunction sh_mtu2_map_memoryfunction sh_mtu2_setupfunction sh_mtu2_probefunction sh_mtu2_initfunction sh_mtu2_exitmodule init sh_mtu2_init
Annotated Snippet
subsys_initcall(sh_mtu2_init);
module_exit(sh_mtu2_exit);
MODULE_AUTHOR("Magnus Damm");
MODULE_DESCRIPTION("SuperH MTU2 Timer Driver");
Annotation
- Immediate include surface: `linux/clk.h`, `linux/clockchips.h`, `linux/delay.h`, `linux/err.h`, `linux/init.h`, `linux/interrupt.h`, `linux/io.h`, `linux/ioport.h`.
- Detected declarations: `struct sh_mtu2_device`, `struct sh_mtu2_channel`, `struct sh_mtu2_device`, `function sh_mtu2_read`, `function sh_mtu2_write`, `function sh_mtu2_start_stop_ch`, `function sh_mtu2_enable`, `function sh_mtu2_disable`, `function sh_mtu2_interrupt`, `function sh_mtu2_clock_event_shutdown`.
- 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.