bus: ti-sysc: Use optional clocks on for enable and wait for softreset bit
authorTony Lindgren <tony@atomide.com>
Sun, 31 May 2020 19:37:54 +0000 (12:37 -0700)
committerTony Lindgren <tony@atomide.com>
Wed, 3 Jun 2020 17:12:19 +0000 (10:12 -0700)
commitd46f9fbec71997420e4fb83c04d9affdf423f879
treeb8571ddedae0956044f48c2f22043c54fab9d890
parent0df12a01f4857495816b05f048c4c31439446e35
bus: ti-sysc: Use optional clocks on for enable and wait for softreset bit

Some modules reset automatically when idled, and when re-enabled, we must
wait for the automatic OCP softreset to complete. And if optional clocks
are configured, we need to keep the clocks on while waiting for the reset
to complete.

Let's fix the issue by moving the OCP softreset code to a separate
function sysc_wait_softreset(), and call it also from sysc_enable_module()
with the optional clocks enabled.

This is based on what we're already doing for legacy platform data booting
in _enable_sysc().

Fixes: 7324a7a0d5e2 ("bus: ti-sysc: Implement display subsystem reset quirk")
Reported-by: Faiz Abbas <faiz_abbas@ti.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
drivers/bus/ti-sysc.c