STRUCT POWERDOMAIN(9)
πΈ struct powerdomain (9) β Kernel API Manual πΈ
okay bestie, so this is a powerdomain(9) page from the Kernel API Manual, and it's giving "let me introduce you to the OMAP powerdomain struct" energy. no cap, it's a big one, so grab a lil snack π and let's get into it.
β¨ NAME β¨
struct powerdomain β the OMAP powerdomain. that's it, that's the whole vibe. π
π¦ SYNOPSIS π¦
here's the struct in all its glory, copied exactly so you can't mess it up:
struct powerdomain {
const char *name;
union {
const char *name;
struct voltagedomain *ptr;
} voltdm;
const s16 prcm_offs;
const u8 pwrsts;
const u8 pwrsts_logic_ret;
const u8 flags;
const u8 banks;
const u8 pwrsts_mem_ret[PWRDM_MAX_MEM_BANKS];
const u8 pwrsts_mem_on[PWRDM_MAX_MEM_BANKS];
const u8 prcm_partition;
struct clockdomain *pwrdm_clkdms[PWRDM_MAX_CLKDMS];
struct list_head node;
struct list_head voltdm_node;
int state;
unsigned state_counter[PWRDM_MAX_PWRSTS];
unsigned ret_logic_off_counter;
unsigned ret_mem_off_counter[PWRDM_MAX_MEM_BANKS];
spinlock_t _lock;
unsigned long _lock_flags;
const u8 pwrstctrl_offs;
const u8 pwrstst_offs;
const u32 logicretstate_mask;
const u32 mem_on_mask[PWRDM_MAX_MEM_BANKS];
const u32 mem_ret_mask[PWRDM_MAX_MEM_BANKS];
const u32 mem_pwrst_mask[PWRDM_MAX_MEM_BANKS];
const u32 mem_retst_mask[PWRDM_MAX_MEM_BANKS];
#ifdef CONFIG_PM_DEBUG;
s64 timer;
s64 state_timer[PWRDM_MAX_PWRSTS];
#endif;
u32 context;
};
likeβ¦ yes, those #ifdef lines really do have semicolons on them. that's not me, that's the page. don't @ me π
π Members π
every single field, coming right up. no skipping, we don't do that here π
nameβ the powerdomain's name. iconic, self-explanatory, we love.voltdmβ the voltagedomain that contains this powerdomain. it's a union btw β it's either aconst char *nameor astruct voltagedomain *ptr, bestie's choice π¦prcm_offsβ the address offset fromCM_BASE/PRM_BASE.pwrstsβ the possible powerdomain power states.pwrsts_logic_retβ the possible logic power states when the pwrdm is in RETENTION.flagsβ powerdomain flags.banksβ how many software-controllable memory banks live in this powerdomain.pwrsts_mem_retβ possible memory bank pwrstates when the pwrdm is in RETENTION.pwrsts_mem_onβ possible memory bank pwrstates when the pwrdm is in ON.prcm_partitionβ (OMAP4 only) the PRCM partition ID that containsprcm_offs.pwrdm_clkdmsβ the clockdomains in this powerdomain.nodeβ alist_headlinking all powerdomains together. it's the group chat of powerdomains πvoltdm_nodeβ alist_headlinking all powerdomains inside a voltagedomain. nested group chats, truly.stateβ listed with no extra description on the page, so that's all we're saying πstate_counterβ also listed bare, no description given. it's mysterious, it's main character energy._lockβ the spinlock used to serialize powerdomain ops and some clockdomain ops. very "one at a time please" of it._lock_flagsβ the stored flags for when_lockis taken.pwrstctrl_offsβ (AM33XX only) theXXX_PWRSTCTRLreg offset fromprcm_offs.pwrstst_offsβ (AM33XX only) theXXX_PWRSTSTreg offset fromprcm_offs.logicretstate_maskβ (AM33XX only) the mask for the logic retention bitfield inpwrstctrl_offs.mem_on_maskβ (AM33XX only) the mask for the mem on bitfield inpwrstctrl_offs.mem_ret_maskβ (AM33XX only) the mask for the mem ret bitfield inpwrstctrl_offs.mem_pwrst_maskβ (AM33XX only) the mask for the mem state bitfield inpwrstst_offs.mem_retst_maskβ (AM33XX only) the mask for the mem retention state bitfield inpwrstctrl_offs.timerβ bare listing again, no description on the page. it's underCONFIG_PM_DEBUG, so, y'know. πstate_timerβ same deal, listed with no description. also chilling underCONFIG_PM_DEBUG.
heads up bestie:timerandstate_timeronly exist whenCONFIG_PM_DEBUGis defined β they're wrapped in that#ifdef CONFIG_PM_DEBUG;in the synopsis up there. β
π Description π
short and sweet: the possible values for prcm_partition are defined in mach-omap2/prcm44xx.h. that's the whole description. i know, i wanted more too π
π SEE ALSO π
go peek at these, fr fr:
- the kernel file
./arch/arm/mach-omap2/powerdomain.h struct pwrdm_ops(9)
and that's the page!! slay. it's from ./arch/arm/mach-omap2, dated October 2026 β so like, jot that down in your notes app, bestie π«Άπβ¨ periodt.
π¦ 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