drivers/clocksource/timer-armada-370-xp.c
Source file repositories/reference/linux-study-clean/drivers/clocksource/timer-armada-370-xp.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/clocksource/timer-armada-370-xp.c- Extension
.c- Size
- 10208 bytes
- Lines
- 417
- Domain
- Driver Families
- Bucket
- drivers/clocksource
- 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.
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/init.hlinux/platform_device.hlinux/kernel.hlinux/clk.hlinux/cpu.hlinux/timer.hlinux/clockchips.hlinux/interrupt.hlinux/of.hlinux/of_irq.hlinux/of_address.hlinux/irq.hlinux/module.hlinux/sched_clock.hlinux/percpu.hlinux/syscore_ops.hasm/delay.h
Detected Declarations
function local_timer_ctrl_clrsetfunction armada_370_xp_read_sched_clockfunction armada_370_xp_clkevt_next_eventfunction armada_370_xp_clkevt_shutdownfunction armada_370_xp_clkevt_set_periodicfunction armada_370_xp_timer_interruptfunction armada_370_xp_timer_starting_cpufunction armada_370_xp_timer_dying_cpufunction armada_370_xp_timer_suspendfunction armada_370_xp_timer_resumefunction armada_370_delay_timer_readfunction armada_370_xp_timer_common_initfunction armada_xp_timer_initfunction armada_375_timer_initfunction armada_370_timer_init
Annotated Snippet
if (IS_ERR(clk)) {
pr_err("Failed to get clock\n");
return PTR_ERR(clk);
}
ret = clk_prepare_enable(clk);
if (ret)
return ret;
timer_clk = clk_get_rate(clk) / TIMER_DIVIDER;
timer25Mhz = false;
}
return armada_370_xp_timer_common_init(np);
}
TIMER_OF_DECLARE(armada_375, "marvell,armada-375-timer",
armada_375_timer_init);
static int __init armada_370_timer_init(struct device_node *np)
{
struct clk *clk;
int ret;
clk = of_clk_get(np, 0);
if (IS_ERR(clk)) {
pr_err("Failed to get clock\n");
return PTR_ERR(clk);
}
ret = clk_prepare_enable(clk);
if (ret)
return ret;
timer_clk = clk_get_rate(clk) / TIMER_DIVIDER;
timer25Mhz = false;
return armada_370_xp_timer_common_init(np);
}
TIMER_OF_DECLARE(armada_370, "marvell,armada-370-timer",
armada_370_timer_init);
Annotation
- Immediate include surface: `linux/init.h`, `linux/platform_device.h`, `linux/kernel.h`, `linux/clk.h`, `linux/cpu.h`, `linux/timer.h`, `linux/clockchips.h`, `linux/interrupt.h`.
- Detected declarations: `function local_timer_ctrl_clrset`, `function armada_370_xp_read_sched_clock`, `function armada_370_xp_clkevt_next_event`, `function armada_370_xp_clkevt_shutdown`, `function armada_370_xp_clkevt_set_periodic`, `function armada_370_xp_timer_interrupt`, `function armada_370_xp_timer_starting_cpu`, `function armada_370_xp_timer_dying_cpu`, `function armada_370_xp_timer_suspend`, `function armada_370_xp_timer_resume`.
- Atlas domain: Driver Families / drivers/clocksource.
- Implementation status: source 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.