cdns_wdt_start(9)
โจ cdns_wdt_start(9) โจ
okay bestie, so this is a page from the Kernel API Manual โ the cdns_wdt girlies, watchdog division ๐
and today's main character is cdns_wdt_start. she enables AND starts the watchdog, which is honestly giving "i do it all" energy ๐ฅ
๐ NAME ๐
cdns_wdt_start โ enable and start the watchdog. that's it, that's the vibe. ๐
๐ฆ SYNOPSIS ๐ฆ
int cdns_wdt_start (struct watchdog_device *wdd );
yes she returns an int, yes she takes exactly one thing, no we're not doing more than that โจ (and yes, the spacing in *wdd ) is literally how it's written, don't come for me ๐)
๐ธ ARGUMENTS ๐ธ
wddโ the watchdog device ๐ like, the actual watchdog device struct, that's the whole argument, she's low maintenance.
๐ DESCRIPTION ๐
okay so here's where it gets iconic. the counter value is calculated according to this formula, and you KNOW i'm putting it in a code block so nobody messes it up:
calculated count = (timeout * clock) / prescaler + 1
the calculated count then gets divided by 0x1000 to obtain the field value that we write to the counter control register. math ate, no cap. ๐งฎโจ
then it clears the contents of the prescaler and the counter reset value. bye bestie ๐
next: it sets the prescaler to 4096, and sets the calculated count and the access key, all to write to the CCR Register. ๐
and finally it sets the WDT (WDEN bit) plus EITHER the Reset signal (RSTEN bit) OR the Interrupt signal (IRQEN) โ with a specified cycles โ plus the access key, to write to the ZMR Register. both options are there, it's giving "choose your fighter" ๐ฅ๐
ngl the bit names matter here โWDEN,RSTEN,IRQEN, CCR Register, ZMR Register โ so keep them exactly as they are when you're reading along, iykyk ๐
โญ RETURN โญ
always 0. literally always. she does not miss, she does not fail, she returns 0 periodt. ๐ซถ
๐ SEE ALSO ๐
- Kernel file
./drivers/watchdog/cadence_wdt.c struct cdns_wdt(9)cdns_wdt_stop(9)cdns_wdt_reload(9)cdns_wdt_settimeout(9)cdns_wdt_irq_handler(9)cdns_wdt_probe(9)cdns_wdt_suspend(9)cdns_wdt_resume(9)
the whole friend group, honestly โ go read them all, they're all linked, obsessed ๐ญ๐
and that's the page!! ๐ซ source/version: ./drivers/watchdog, dated October 2026 โ so she's a fresh lil manual page, mwah ๐๐ฆ go forth and start some watchdogs bestie ๐
๐
๐ฆ 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