_reset(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… _reset(9) β€” the Kernel API Manual page for resetting an omap_hwmod, bestie edition

okay so picture this: you're in the Kernel API Manual (yes THAT one), section 9, and the vibe is resetting hardware πŸŽ€ buckle up.


✨ NAME ✨

_reset β€” resets an omap_hwmod, that's literally it, that's the whole job πŸ’–


🌸 SYNOPSIS 🌸

int _reset (struct omap_hwmod *oh );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • oh β€” a struct omap_hwmod *. the main character of this whole function ngl πŸ‘‘

πŸ’œ DESCRIPTION πŸ’œ

So _reset resets an omap_hwmod named oh ✨ and it has options, like a girl with a plan. here's the tea:

  1. if the module has a custom reset function pointer defined, then we call it to reset the IP block, and we pass along its return value to the caller. slay, delegation πŸ’…
  2. otherwise, if the IP block has an OCP_SYSCONFIG register with a SOFTRESET bitfield associated with it, we call a function to reset the IP block via that method, and pass along the return value to the caller. iconic, standard procedure ⭐
  3. finally, if the IP block has some hardreset lines associated with it, we assert all of them, but do _not_ deassert them 😀 not even a little bit. (this is because driver authors have expressed an apparent requirement to control the deassertion of the hardreset lines themselves β€” they want the deassert, they're handling the deassert, hands off πŸ™ˆ)
listen. assert yes, deassert NO. do not touch the deassert. that is not our deassert to touch. fr fr.

The default software reset mechanism for most OMAP IP blocks is triggered via the OCP_SYSCONFIG.SOFTRESET bit ✨. However β€” and this is the plot twist β€” some hwmods cannot be reset via this method 😭:

  • some are not targets and therefore have no OCP header registers to access
  • others (like the IVA) have idiosyncratic reset sequences πŸ™ƒ

So for these relatively rare cases, custom reset code can be supplied in the struct omap_hwmod_class .reset function pointer. problem solved, periodt πŸ’–

Also, _set_dmadisable is called to set the DMADISABLE bit so that it does not prevent idling of the system πŸŒ€. This is necessary for cases where ROMCODE/BOOTLOADER uses dma and transfers control to the kernel without disabling dma. like, they just handed it over, dma still on, no note, no text, nothing πŸ’€

_reset passes along the return value from either _ocp_softreset or the custom reset function 🫢 β€” and these must return:

  • -EINVAL if the hwmod cannot be reset this way or if the hwmod is in the wrong state
  • -ETIMEDOUT if the module did not reset in time
  • 0 upon success 🌈

🧚 SEE ALSO 🧚

the kernel file ./arch/arm/mach-omap2/omap_hwmod.c, and bestie... the whole friend group πŸ’œ:


πŸŽ€ the sign-off πŸŽ€

this page came straight out of ./arch/arm/mach-omap2, dated October 2026, and it's filed under _reset(9) 🫢 go reset something responsibly bestie, and remember: assert the hardreset lines, do NOT deassert them πŸ’…βœ¨

ily, go touch grass, then go touch registers πŸ’–

πŸ“¦ where this page comes from