]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
watchdog: orion: Remove unneeded atomic access
authorEzequiel Garcia <ezequiel.garcia@free-electrons.com>
Sat, 15 Mar 2014 18:17:58 +0000 (15:17 -0300)
committerWim Van Sebroeck <wim@iguana.be>
Mon, 26 May 2014 20:51:57 +0000 (22:51 +0200)
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>
drivers/watchdog/orion_wdt.c

index 75f623f5e6c3fea30cbe1257a54b17aaed3645df..365d6cc53074fc153f21a6fbcbbce79b5b613578 100644 (file)
@@ -145,6 +145,7 @@ static int orion_wdt_ping(struct watchdog_device *wdt_dev)
 static int armada370_start(struct watchdog_device *wdt_dev)
 {
        struct orion_watchdog *dev = watchdog_get_drvdata(wdt_dev);
+       u32 reg;
 
        /* Set watchdog duration */
        writel(dev->clk_rate * wdt_dev->timeout,
@@ -157,8 +158,10 @@ static int armada370_start(struct watchdog_device *wdt_dev)
        atomic_io_modify(dev->reg + TIMER_CTRL, dev->data->wdt_enable_bit,
                                                dev->data->wdt_enable_bit);
 
-       atomic_io_modify(dev->rstout, dev->data->rstout_enable_bit,
-                                     dev->data->rstout_enable_bit);
+       /* Enable reset on watchdog */
+       reg = readl(dev->rstout);
+       reg |= dev->data->rstout_enable_bit;
+       writel(reg, dev->rstout);
        return 0;
 }