RE: [PATCH 2/4] watchdog: sama5d4: fix race condition

2017-03-06 Thread Wenyou.Yang
r...@lists.infradead.org; linux-kernel@vger.kernel.org; Alexandre Belloni > > Subject: [PATCH 2/4] watchdog: sama5d4: fix race condition > > WDT_MR and WDT_CR must not updated within three slow clock periods after > the last ping (write to WDT_CR or WDT_MR). Ensure enough time has e

Re: [PATCH 2/4] watchdog: sama5d4: fix race condition

2017-03-04 Thread Guenter Roeck
On 03/02/2017 09:31 AM, Alexandre Belloni wrote: WDT_MR and WDT_CR must not updated within three slow clock periods after the last ping (write to WDT_CR or WDT_MR). Ensure enough time has elapsed before writing those registers. wdt_write() waits for 4 periods to ensure at least 3 edges are seen b

[PATCH 2/4] watchdog: sama5d4: fix race condition

2017-03-03 Thread Alexandre Belloni
WDT_MR and WDT_CR must not updated within three slow clock periods after the last ping (write to WDT_CR or WDT_MR). Ensure enough time has elapsed before writing those registers. wdt_write() waits for 4 periods to ensure at least 3 edges are seen by the IP. Signed-off-by: Alexandre Belloni --- d

Re: [PATCH 2/4] watchdog: sama5d4: fix race condition

2017-03-02 Thread Guenter Roeck
On Thu, Mar 02, 2017 at 06:31:12PM +0100, Alexandre Belloni wrote: > WDT_MR and WDT_CR must not updated within three slow clock periods after > the last ping (write to WDT_CR or WDT_MR). Ensure enough time has elapsed > before writing those registers. > wdt_write() waits for 4 periods to ensure at

Re: [PATCH 2/4] watchdog: sama5d4: fix race condition

2017-03-02 Thread Alexandre Belloni
On 02/03/2017 at 09:42:24 -0800, Guenter Roeck wrote: > On Thu, Mar 02, 2017 at 06:31:12PM +0100, Alexandre Belloni wrote: > > WDT_MR and WDT_CR must not updated within three slow clock periods after > > the last ping (write to WDT_CR or WDT_MR). Ensure enough time has elapsed > > before writing th