STRUCT POWERDOMAIN(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 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 a const char *name or a struct voltagedomain *ptr, bestie's choice πŸ¦‹
  • prcm_offs β€” the address offset from CM_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 contains prcm_offs.
  • pwrdm_clkdms β€” the clockdomains in this powerdomain.
  • node β€” a list_head linking all powerdomains together. it's the group chat of powerdomains πŸ’€
  • voltdm_node β€” a list_head linking 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 _lock is taken.
  • pwrstctrl_offs β€” (AM33XX only) the XXX_PWRSTCTRL reg offset from prcm_offs.
  • pwrstst_offs β€” (AM33XX only) the XXX_PWRSTST reg offset from prcm_offs.
  • logicretstate_mask β€” (AM33XX only) the mask for the logic retention bitfield in pwrstctrl_offs.
  • mem_on_mask β€” (AM33XX only) the mask for the mem on bitfield in pwrstctrl_offs.
  • mem_ret_mask β€” (AM33XX only) the mask for the mem ret bitfield in pwrstctrl_offs.
  • mem_pwrst_mask β€” (AM33XX only) the mask for the mem state bitfield in pwrstst_offs.
  • mem_retst_mask β€” (AM33XX only) the mask for the mem retention state bitfield in pwrstctrl_offs.
  • timer β€” bare listing again, no description on the page. it's under CONFIG_PM_DEBUG, so, y'know. πŸ™ˆ
  • state_timer β€” same deal, listed with no description. also chilling under CONFIG_PM_DEBUG.
heads up bestie: timer and state_timer only exist when CONFIG_PM_DEBUG is 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