dw_apb_clockevent_init(9)
okay so bestie, welcome to the dw_apb_clockevent_init(9) page from the Kernel API Manual π this one is all about turning an APB timer into a clock_event_device, and it's lowkey iconic. no cap, we're keeping every detail. π«Ά
β¨ NAME β¨
dw_apb_clockevent_init - use an APB timer as a clock_event_device.
πΈ SYNOPSIS πΈ
struct dw_apb_clock_event_device * dw_apb_clockevent_init (int cpu ,
const char *name , unsigned rating , void __iomem *base , int irq ,
unsigned long freq );
π ARGUMENTS π
cpuβ the CPU that the events will be targeted at, or-1if CPU affiliation isn't required. πnameβ the name used for the timer and the IRQ for it. cute, labeled, organized. πratingβ the rating to give the timer. βbaseβ the I/O base for the timer registers. that's where the magic lives. β¨irqβ the interrupt number to use for the timer. πfreqβ the frequency that the timer counts at. numbers, but make it fashion. π
π DESCRIPTION π
So this function creates a clock_event_device for using with the generic clock layer, but β and this is the important part β it does not start and register it. nope, not yet. That next step should be done with dw_apb_clockevent_register; think of init as the "get ready" and register as the "go live" moment. π
If this is the first time it has been called for a timer, then the IRQ will be requested. If it's not the first time, it just gets enabled β that's to allow CPU hotplug and avoid repeatedly requesting and releasing the IRQ. fr fr, efficiency. π
tiny but crucial vibe check:dw_apb_clockevent_initis setup only, bestie. don't skipdw_apb_clockevent_registerand assume it's already started/registered. π
π¦ SEE ALSO π¦
- Kernel file
./drivers/clocksource/dw_apb_timer.cπ§ dw_apb_clockevent_register(9)dw_apb_clocksource_start(9)dw_apb_clocksource_init(9)dw_apb_clocksource_register(9)dw_apb_clocksource_read(9)
that's the whole page, bestie π«Ά source/version: ./drivers/clocksource β’ date: October 2026 β’ manual: dw_apb_clockevent_init(9) β¨ catch you in the kernel, mwah π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms