diff options
author | Ezequiel Garcia <ezequiel.garcia@free-electrons.com> | 2014-03-15 14:17:58 -0400 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2014-06-10 15:44:20 -0400 |
commit | eba985e20c70d99a278c04ff5c492d90d53a20dd (patch) | |
tree | d02ad515840e6256f187bd8a75a3d409ffb86ca1 /drivers/watchdog | |
parent | 92d4fc1a1f56a12fa09c92d8c89873509a8012c9 (diff) |
watchdog: orion: Remove unneeded atomic access
The RSTOUT register on the Armada 370 SoC variant is a dedicated register
(not shared across orthogonal subsystems) and so it's not needed to write
it atomically.
Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jason Cooper <jason@lakedaemon.net>
Tested-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers/watchdog')
-rw-r--r-- | drivers/watchdog/orion_wdt.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/watchdog/orion_wdt.c b/drivers/watchdog/orion_wdt.c index 75f623f5e6c3..365d6cc53074 100644 --- a/drivers/watchdog/orion_wdt.c +++ b/drivers/watchdog/orion_wdt.c | |||
@@ -145,6 +145,7 @@ static int orion_wdt_ping(struct watchdog_device *wdt_dev) | |||
145 | static int armada370_start(struct watchdog_device *wdt_dev) | 145 | static int armada370_start(struct watchdog_device *wdt_dev) |
146 | { | 146 | { |
147 | struct orion_watchdog *dev = watchdog_get_drvdata(wdt_dev); | 147 | struct orion_watchdog *dev = watchdog_get_drvdata(wdt_dev); |
148 | u32 reg; | ||
148 | 149 | ||
149 | /* Set watchdog duration */ | 150 | /* Set watchdog duration */ |
150 | writel(dev->clk_rate * wdt_dev->timeout, | 151 | writel(dev->clk_rate * wdt_dev->timeout, |
@@ -157,8 +158,10 @@ static int armada370_start(struct watchdog_device *wdt_dev) | |||
157 | atomic_io_modify(dev->reg + TIMER_CTRL, dev->data->wdt_enable_bit, | 158 | atomic_io_modify(dev->reg + TIMER_CTRL, dev->data->wdt_enable_bit, |
158 | dev->data->wdt_enable_bit); | 159 | dev->data->wdt_enable_bit); |
159 | 160 | ||
160 | atomic_io_modify(dev->rstout, dev->data->rstout_enable_bit, | 161 | /* Enable reset on watchdog */ |
161 | dev->data->rstout_enable_bit); | 162 | reg = readl(dev->rstout); |
163 | reg |= dev->data->rstout_enable_bit; | ||
164 | writel(reg, dev->rstout); | ||
162 | return 0; | 165 | return 0; |
163 | } | 166 | } |
164 | 167 | ||