Skip to content
  • Nick Bowler's avatar
    watchdog: sp805: Flush posted writes in enable/disable. · 081d83a3
    Nick Bowler authored
    
    
    There are no reads in these functions, so if MMIO writes are posted,
    the writes in enable/disable may not have completed by the time these
    functions return.  If the functions run from different CPUs, it's
    in theory possible for the writes to be interleaved, which would be
    disastrous for this driver.
    
    At the very least, we need an mmiowb() before releasing the lock, but
    since it seems desirable for the watchdog timer to be actually stopped
    or reset when these functions return, read the lock register to force
    the writes out.
    
    Signed-off-by: default avatarNick Bowler <nbowler@elliptictech.com>
    Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
    081d83a3