From: Guenter Roeck <linux@roeck-us.net>
To: Ariel D'Alessandro <ariel@vanguardiasur.com.ar>,
Joachim Eastwood <manabian@gmail.com>
Cc: linux-watchdog@vger.kernel.org, wim@iguana.be,
Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v2 1/2] watchdog: NXP LPC18xx Watchdog Timer Driver
Date: Sat, 04 Jul 2015 19:36:40 -0700 [thread overview]
Message-ID: <55989838.3030003@roeck-us.net> (raw)
In-Reply-To: <5598911B.5020004@vanguardiasur.com.ar>
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
WARNING: multiple messages have this Message-ID (diff)
From: linux@roeck-us.net (Guenter Roeck)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 1/2] watchdog: NXP LPC18xx Watchdog Timer Driver
Date: Sat, 04 Jul 2015 19:36:40 -0700 [thread overview]
Message-ID: <55989838.3030003@roeck-us.net> (raw)
In-Reply-To: <5598911B.5020004@vanguardiasur.com.ar>
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
next prev parent reply other threads:[~2015-07-05 11:06 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-01 20:52 [PATCH v2 0/2] Add support for NXP LPC18xx Watchdog timer Ariel D'Alessandro
2015-07-01 20:52 ` Ariel D'Alessandro
2015-07-01 20:52 ` [PATCH v2 1/2] watchdog: NXP LPC18xx Watchdog Timer Driver Ariel D'Alessandro
2015-07-01 20:52 ` Ariel D'Alessandro
2015-07-01 23:04 ` Joachim Eastwood
2015-07-01 23:04 ` Joachim Eastwood
2015-07-02 0:14 ` Guenter Roeck
2015-07-02 0:14 ` Guenter Roeck
2015-07-02 9:03 ` Joachim Eastwood
2015-07-02 9:03 ` Joachim Eastwood
2015-07-05 2:46 ` Ariel D'Alessandro
2015-07-05 2:46 ` Ariel D'Alessandro
2015-07-03 14:56 ` Ezequiel Garcia
2015-07-03 14:56 ` Ezequiel Garcia
2015-07-05 2:06 ` Ariel D'Alessandro
2015-07-05 2:06 ` Ariel D'Alessandro
2015-07-05 2:36 ` Guenter Roeck [this message]
2015-07-05 2:36 ` Guenter Roeck
2015-07-01 20:52 ` [PATCH v2 2/2] DT: watchdog: Add NXP LPC18xx Watchdog Timer binding documentation Ariel D'Alessandro
2015-07-01 20:52 ` Ariel D'Alessandro
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55989838.3030003@roeck-us.net \
--to=linux@roeck-us.net \
--cc=ariel@vanguardiasur.com.ar \
--cc=ezequiel@vanguardiasur.com.ar \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=manabian@gmail.com \
--cc=wim@iguana.be \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.