Commit f470b678d1d12febc367def781f38c7d0870c5a2

Authored by Dave Gerlach
1 parent 539ca54672

ARM: OMAP2+: omap_hwmod: Always restore saved hardreset context

Previously when restoring hardreset context during
omap_hwmod_restore_context we would only deassert the hardreset lines if
the module was previously active, however, if a hwmod has all hardresets
asserted then _enable will return without actually enabling the module.

This is a problem for the gfx hwmod on am437x as it gets disabled in
suspend path so it appears as disabled to the restore context code but
then during the attempted enable call during the regular kernel resume
path, the hwmod cannot actually be enabled.

Acked-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

arch/arm/mach-omap2/omap_hwmod.c
... ... @@ -4436,7 +4436,7 @@
4436 4436 for (i = 0; i < oh->rst_lines_cnt; i++)
4437 4437 if (oh->rst_lines[i].context)
4438 4438 _assert_hardreset(oh, oh->rst_lines[i].name);
4439   - else if (oh->_state == _HWMOD_STATE_ENABLED)
  4439 + else
4440 4440 _deassert_hardreset(oh, oh->rst_lines[i].name);
4441 4441  
4442 4442 if (oh->_state == _HWMOD_STATE_ENABLED) {