Skip to content
  • Kevin Hilman's avatar
    OMAP2+: PM/serial: fix console semaphore acquire during suspend · e83df17f
    Kevin Hilman authored
    commit 0d8e2d0d
    
     (OMAP2+: PM/serial:
    hold console semaphore while OMAP UARTs are disabled) added use of the
    console semaphore to protect UARTs from being accessed after disabled
    during idle, but this causes problems in suspend.
    
    During suspend, the console semaphore is acquired by the console
    suspend method (console_suspend()) so the try_acquire_console_sem()
    will always fail and suspend will be aborted.
    
    To fix, introduce a check so the console semaphore is only attempted
    during idle, and not during suspend.  Also use the same check so that
    the console semaphore is not prematurely released during resume.
    
    Thanks to Paul Walmsley for suggesting adding the same check during
    resume.
    
    Cc: Paul Walmsley <paul@pwsan.com>
    Tested-by: default avatarJean Pihet <j-pihet@ti.com>
    Tested-by: default avatarPaul Walmsley <paul@pwsan.com>
    Signed-off-by: default avatarKevin Hilman <khilman@deeprootsystems.com>
    Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
    e83df17f