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

2017-03-06 Thread Wenyou.Yang
> -Original Message- > From: Alexandre Belloni [mailto:alexandre.bell...@free-electrons.com] > Sent: 2017年3月3日 1:31 > To: Guenter Roeck > Cc: Wim Van Sebroeck ; Nicolas Ferre - M43238 > ; Wenyou Yang - A41535 > ; linux-watch...@vger.kernel.org; linux-arm- > ker...@lists.infradead.org; li

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

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