STRUCT XGENE_CLK_PMD(9)
β¨ struct xgene_clk_pmd β PMD clock β¨
okay bestie, so this is page struct xgene_clk_pmd(9) from the Kernel API Manual and honestly? it's giving "tiny struct, big responsibilities" π
she's just a little clock descriptor for the PMD (phase/frac divider thingy) on X-Gene, and she wants you to know every single one of her fields. let's get into it π«Ά
πΈ NAME πΈ
struct xgene_clk_pmd β the PMD clock π like, literally a struct that describes a PMD clock. no notes.
π SYNOPSIS π
struct xgene_clk_pmd {
struct clk_hw hw;
void __iomem *reg;
u8 shift;
u32 mask;
u64 denom;
u32 flags;
spinlock_t *lock;
};
look at her. seven fields. immaculate. π₯
π MEMBERS π
hwβ the handle that sits between the common clock interfaces and the hardware-specific ones π think of it as her little passport between two worlds, iykyk.regβ the register that contains the fractional scale multiplier (the scaler) π yes she'svoid __iomem *, yes she's memory-mapped, yes we stan.shiftβ the shift to the unit bit field.u8. she's small but she moves things. β¨maskβ the mask to the unit bit field.u32. she's the vibe check that keeps only the bits that matter πdenomβ the1/denominatorunit.u64, so she's got range πflagsβ here's the interesting one, bestie, so pay attention π
XGENE_CLK_PMD_SCALE_INVERTED β by default the scaler is the value read from the register plus one. so like:
0β(0 + 1) / denom1β(1 + 1) / denom- β¦and etc., you get the pattern, periodt π₯
but if this flag is set, she flips the whole thing:
0β(denom - 0) / denom1β(denom - 1) / denom- β¦and etc. π¦
same math, inverted energy. main character flag behaviour, no cap.
lockβ the register lock.spinlock_t *. she keeps everyone from touching the registers at the same time π respectful. collaborative. iconic.
π SEE ALSO π
- the Kernel file
./drivers/clk/clk-xgene.cβ go read her home, that's where the whole story lives π§
and that's the page, bestie! π go slay some clock registration.
π written from source ./drivers/clk, dated October 2026, and yes the footer said struct xgene_clk_pmd(9) again because she loves a dramatic re-entrance β¨ 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