STRUCT OMAP_HWMOD_CLASS(9)
π struct omap_hwmod_class(9) π
Okay so this is from the Kernel API Manual, bestie β and itβs literally the blueprint for the type of an IP block. Letβs get into it π«Άβ¨
π NAME π
struct omap_hwmod_class β the type of an IP block π
β¨ SYNOPSIS β¨
struct omap_hwmod_class {
const char *name;
struct omap_hwmod_class_sysconfig *sysc;
int (*pre_shutdown)(struct omap_hwmod *oh);
int (*reset)(struct omap_hwmod *oh);
void (*lock)(struct omap_hwmod *oh);
void (*unlock)(struct omap_hwmod *oh);
};
π Members π
Hereβs the cast of this struct, no cap π
nameβ name of the hwmod_class β¨syscβ device SYSCONFIG/SYSSTATUS register data πpre_shutdownβ ptr to fn to be executed immediately prior to device shutdown π«Άresetβ ptr to fn to be executed in place of the standard hwmod reset fn πlockβ ptr to fn to be executed to lock IP registers πunlockβ ptr to fn to be executed to unlock IP registers π
π Description π
This represents the class of an OMAP hardware βmodulesβ situation β think timer, smartreflex, gpio, uart... π Itβs giving βblueprint for a whole category of hardware blocks,β periodt.
pre_shutdown is a function that will be run immediately before hwmod clocks are disabled, etc. Itβs intended for use for hwmods like the MPU watchdog, which cannot be disabled with the standard omap_hwmod_shutdown. The function should return 0 upon success, or some negative error upon failure. Returning an error will cause omap_hwmod_shutdown to abort the device shutdown and return an error π
If reset is defined, then the function it points to will be executed in place of the standard hwmod _reset code in mach-omap2/omap_hwmod.c. This is needed for IP blocks which have unusual reset sequences β usually processor IP blocks like the IVA. So yeah, custom reset main character energy πβ¨
π SEE ALSO π
- Kernel file
./arch/arm/mach-omap2/omap_hwmod.h struct 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(9)
Source check, bestie: ./arch/arm/mach-omap2 β date: October 2026 β manual page: struct omap_hwmod_class(9). Thatβs the whole thing, 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