[PATCH v2 1/2] watchdog: NXP LPC18xx Watchdog Timer Driver
Guenter Roeck
linux at roeck-us.net
Sat Jul 4 19:36:40 PDT 2015
On 07/04/2015 07:06 PM, Ariel D'Alessandro wrote:
> Hi Joachim,
>
[ ... ]
>>> +
>>> +static int lpc18xx_wdt_start(struct watchdog_device *wdt_dev)
>>> +{
>>> + struct lpc18xx_wdt_dev *lpc18xx_wdt = watchdog_get_drvdata(wdt_dev);
>>> + unsigned int val;
>>> +
>>> + if (timer_pending(&lpc18xx_wdt->timer))
>>> + del_timer(&lpc18xx_wdt->timer);
>>> +
>>> + val = readl(lpc18xx_wdt->base + LPC18XX_WDT_MOD);
>>> + val |= LPC18XX_WDT_MOD_WDEN;
>>> + val |= LPC18XX_WDT_MOD_WDRESET;
>>> + writel(val, lpc18xx_wdt->base + LPC18XX_WDT_MOD);
>>
>> R-M-W sequence should probably be protect with a lock.
>
> We can continue discussing this point on Ezequiel's response.
>
Please avoid unnecessary locks.
Thanks,
Guenter
More information about the linux-arm-kernel
mailing list