__prci_register_clocks(9)
π __prci_register_clocks β register clock controls in the PRCI π
okay so bestie, welcome to the Kernel API Manual section 9 page for __prci_register_clocks β yes that's a mouthful, and yes the double underscore is load-bearing, don't touch it π«Ά this is the little helper that gets your SiFive PRCI clock controls officially introduced to the Linux clock framework. it's giving "networking but for clocks" honestly β¨
β¨ SYNOPSIS β¨
int __prci_register_clocks (struct device *dev , struct __prci_data *pd
, const struct prci_clk_desc *desc );
like, three args, one int out. no cap. π
π ARGUMENTS π
devβ the Linuxstruct deviceπ§ that's your device, your main character, the whole reason we're here.pdβ the pointer for PRCI per-device instance data. it's the "who am I, where do I live" bag of stuff for this specific PRCI instance. πdescβ the pointer for the information of clocks of each SoC. literally the per-SoC clock lore. πΈ
π¦ DESCRIPTION π¦
it registers the list of clock controls described in __prci_init_clocks[] with the Linux clock framework. that's the whole vibe π« the array says "here are the clocks", and this function goes "say less" and hands them over to the clock framework so they actually exist as far as Linux is concerned π₯
π RETURN π
returns 0 upon success, or a negative error code upon failure. so like β zero means slay, negative means π, check your error handling bestie, don't just ignore it π
π SEE ALSO π
kernel file ./drivers/clk/sifive/sifive-prci.c, plus the whole friend group:
__prci_readl(9)__prci_wrpll_unpack(9)__prci_wrpll_pack(9)__prci_wrpll_read_cfg0(9)__prci_wrpll_write_cfg0(9)__prci_wrpll_write_cfg1(9)sifive_prci_coreclksel_use_hfclk(9)sifive_prci_coreclksel_use_corepll(9)sifive_prci_coreclksel_use_final_corepll(9)sifive_prci_corepllsel_use_dvfscorepll(9)sifive_prci_corepllsel_use_corepll(9)sifive_prci_hfpclkpllsel_use_hfclk(9)sifive_prci_hfpclkpllsel_use_hfpclkpll(9)sifive_prci_probe(9)
iykyk π go read them, they're iconic.
and that's the page!! sourced from ./drivers/clk/sifive, dated October 2026 β so mark your calendars bestie, this manual's from the future and it ate πβ bye 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