]> git.baikalelectronics.ru Git - kernel.git/commit
watchdog: sp805: Flush posted writes in enable/disable.
authorNick Bowler <nbowler@elliptictech.com>
Fri, 15 Jul 2011 15:04:02 +0000 (11:04 -0400)
committerWim Van Sebroeck <wim@iguana.be>
Tue, 26 Jul 2011 21:19:56 +0000 (21:19 +0000)
commit2381f53dbaa21ae79a728e2c30ab00c8615c0f5c
tree8d39c1fc1c3921f42afa009a8828180f1589931b
parent564165f65dfe1fdf78504d4e6456142b99a5d96c
watchdog: sp805: Flush posted writes in enable/disable.

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: Nick Bowler <nbowler@elliptictech.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
drivers/watchdog/sp805_wdt.c