• Tony Lindgren's avatar
    bus: ti-sysc: Use optional clocks on for enable and wait for softreset bit · d46f9fbe
    Tony Lindgren authored
    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: 7324a7a0 ("bus: ti-sysc: Implement display subsystem reset quirk")
    Reported-by: default avatarFaiz Abbas <faiz_abbas@ti.com>
    Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
    Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
    d46f9fbe
ti-sysc.c 74.7 KB