_reset(9)
π
_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β astruct 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:
- 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 π
- otherwise, if the IP block has an
OCP_SYSCONFIGregister with aSOFTRESETbitfield 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 β - 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:
-EINVALif the hwmod cannot be reset this way or if the hwmod is in the wrong state-ETIMEDOUTif the module did not reset in time0upon success π
π§ SEE ALSO π§
the kernel file ./arch/arm/mach-omap2/omap_hwmod.c, and bestie... the whole friend group π:
struct clkctrl_provider(9)struct omap_hwmod_reset(9)struct omap_hwmod_soc_ops(9)_update_sysc_cache(9)_write_sysconfig(9)_set_master_standbymode(9)_set_slave_idlemode(9)_set_clockactivity(9)_set_softreset(9)_clear_softreset(9)_wait_softreset_complete(9)_set_dmadisable(9)_set_module_autoidle(9)_enable_wakeup(9)_add_initiator_dep(9)_del_initiator_dep(9)_init_main_clk(9)_init_interface_clks(9)_init_opt_clks(9)_enable_clocks(9)_omap4_clkctrl_managed_by_clkfwk(9)_omap4_has_clkctrl_clock(9)_disable_clocks(9)_omap4_enable_module(9)_omap4_wait_target_disable(9)_save_mpu_port_index(9)_find_mpu_rt_port(9)_enable_sysc(9)_idle_sysc(9)_shutdown_sysc(9)_lookup(9)_init_clkdm(9)_init_clocks(9)_lookup_hardreset(9)_assert_hardreset(9)_deassert_hardreset(9)_read_hardreset(9)_are_all_hardreset_lines_asserted(9)_are_any_hardreset_lines_asserted(9)_omap4_disable_module(9)_ocp_softreset(9)_omap4_update_context_lost(9)_omap4_get_context_lost(9)_enable(9)_idle(9)_shutdown(9)of_dev_hwmod_lookup(9)omap_hwmod_fix_mpu_rt_idx(9)omap_hwmod_parse_module_range(9)_init_mpu_rt_base(9)_init(9)_setup_iclk_autoidle(9)_setup_reset(9)_setup_postsetup(9)_setup(9)_register(9)_add_link(9)_register_link(9)_omap2xxx_3xxx_wait_target_ready(9)_omap4_wait_target_ready(9)_omap2_assert_hardreset(9)_omap2_deassert_hardreset(9)_omap2_is_hardreset_asserted(9)_omap4_assert_hardreset(9)_omap4_deassert_hardreset(9)_omap4_is_hardreset_asserted(9)_omap4_disable_direct_prcm(9)_am33xx_deassert_hardreset(9)omap_hwmod_softreset(9)omap_hwmod_lookup(9)omap_hwmod_for_each(9)omap_hwmod_register_links(9)_ensure_mpu_hwmod_is_setup(9)omap_hwmod_setup_one(9)omap_hwmod_check_sysc(9)omap_hwmod_init_regbits(9)omap_hwmod_init_reg_offs(9)omap_hwmod_init_sysc_flags(9)omap_hwmod_init_idlemodes(9)omap_hwmod_check_module(9)omap_hwmod_allocate_module(9)omap_hwmod_init_module(9)omap_hwmod_setup_earlycon_flags(9)omap_hwmod_setup_all(9)omap_hwmod_enable(9)omap_hwmod_idle(9)omap_hwmod_shutdown(9)omap_hwmod_get_mpu_rt_va(9)omap_hwmod_assert_hardreset(9)omap_hwmod_deassert_hardreset(9)omap_hwmod_for_each_by_class(9)omap_hwmod_set_postsetup_state(9)omap_hwmod_init(9)
π 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
- 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