STRUCT OMAP_HWMOD(9)
π struct omap_hwmod β wait, what is it?? (NAME)
okay bestie so this is struct omap_hwmod, and it's literally the integration data for OMAP hardware "modules" (also known as IP blocks). that's it, that's the vibe. this page lives in the Kernel API Manual btw, so you know it's official β¨
πΈ SYNOPSIS πΈ
here's the whole struct, no cap, every field exactly as it is:
struct omap_hwmod {
const char *name;
struct omap_hwmod_class *class;
struct omap_device *od;
struct omap_hwmod_rst_info *rst_lines;
union {
struct omap_hwmod_omap2_prcm omap2;
struct omap_hwmod_omap4_prcm omap4;
} prcm;
const char *main_clk;
struct clk *_clk;
struct omap_hwmod_opt_clk *opt_clks;
const char *clkdm_name;
struct clockdomain *clkdm;
struct list_head slave_ports;
void *dev_attr;
u32 _sysc_cache;
void __iomem *_mpu_rt_va;
spinlock_t _lock;
struct lock_class_key hwmod_key;
struct list_head node;
struct omap_hwmod_ocp_if *_mpu_port;
u32 flags;
u8 mpu_rt_idx;
u8 response_lat;
u8 rst_lines_cnt;
u8 opt_clks_cnt;
u8 slaves_cnt;
u8 hwmods_cnt;
u8 _int_flags;
u8 _state;
u8 _postsetup_state;
struct omap_hwmod *parent_hwmod;
};
π Members π
okay so here's the member-by-member breakdown, and yes i'm doing all of them, we're not skipping π
nameβ the name of the hwmod, that's her whole identityclassβ astruct omap_hwmod_class *pointing at the class of this hwmod πodβ thestruct omap_devicecurrently associated with this hwmod (internal use, so hands off bestie)prcmβ the PRCM data pertaining to this hwmodmain_clkβ main clock, i.e. the OMAP clock name_clkβ pointer to the mainstruct clk(this one gets filled in at runtime, sneaky)opt_clksβ other device clocks that drivers can request, range is0..*so like, as many as you wantdev_attrβ arbitrary device attributes that can be passed to the driver, very "here's some extra stuff" energy_sysc_cacheβ internal-use hwmod flags_mpu_rt_vaβ cached register target start address (internal use)_lockβ a spinlock that serializes operations on this hwmod, one at a time babes πnodeβ list node for the hwmod list (internal use)_mpu_portβ cached MPU register target slave (internal use)flagsβ hwmod flags (these are documented below, btw)mpu_rt_idxβ index of the device address space for the register target (for DT boot)response_latβ device OCP response latency, measured in interface clock cycles β±οΈopt_clks_cntβ number ofopt_clksslaves_cntβ number of slave entries_int_flagsβ internal-use hwmod flags_stateβ internal-use hwmod state_postsetup_stateβ internal-use state to leave the hwmod in after_setupparent_hwmodβ (temporary!) a pointer to the hierarchical parent of this hwmod
π quick heads up: this list isn't the whole struct, it's the members the page spells out. the SYNOPSIS above is the full field list, so go look there if you need the rest, i'm not out here inventing lore.
β¨ Description β¨
okay so main_clk refers to this module's "main clock," and for our purposes that's defined as "the functional clock needed for register accesses to complete." that's the whole definition, it's giving very precise. and listen β modules may not have a main clock at all, if the interface clock also serves as a main clock. so don't come for me if it's missing, it's allowed π
Parameter names beginning with an underscore are managed internally by the omap_hwmod code, and bestie, you should not set them during initialization. that's an internal thing, stay out of it, fr fr π
masters and slaves are now deprecated. yes, both of them, deprecated. moving on π
parent_hwmod is temporary β there should be no need for it, because this information should already be expressed in the OCP interface structures. it's only present as a workaround until we improve handling for hwmods with multiple parents (e.g., OMAP4+ DSS with multiple register targets across different interconnects). so like, it's a temporary situation, it's giving "this is fine for now" π
π₯ SEE ALSO π₯
Kernel file ./arch/arm/mach-omap2/omap_hwmod.h struct, plus all of these besties:
omap_hwmod_rst_info(9)struct omap_hwmod_opt_clk(9)struct omap_hwmod_omap2_firewall(9)struct omap_hwmod_ocp_if(9)struct omap_hwmod_class_sysconfig(9)struct omap_hwmod_omap2_prcm(9)struct omap_hwmod_omap4_prcm(9)struct omap_hwmod_class(9)
okay that's the whole page, you ate that π«Ά this one comes to you from ./arch/arm/mach-omap2, dated October 2026, and the page itself is struct omap_hwmod(9) β mwah, go read some hwmod structs, ily, bye π
π¦ 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