From: Guenter Roeck <linux@roeck-us.net>
To: Sergey Ryazanov <ryazanov.s.a@gmail.com>
Cc: Ralf Baechle <ralf@linux-mips.org>,
Linux MIPS <linux-mips@linux-mips.org>,
Wim Van Sebroeck <wim@iguana.be>,
linux-watchdog@vger.kernel.org
Subject: Re: [RFC 13/18] watchdog: add Atheros AR2315 watchdog driver
Date: Mon, 15 Sep 2014 06:22:40 -0700 [thread overview]
Message-ID: <5416E820.3070305@roeck-us.net> (raw)
In-Reply-To: <CAHNKnsT5AHT9xaaY44yTo7uMiOGL9fekGkEzjQuYvdUyJs-WQA@mail.gmail.com>
On 09/15/2014 02:42 AM, Sergey Ryazanov wrote:
> 2014-09-15 7:01 GMT+04:00, Guenter Roeck <linux@roeck-us.net>:
>> On 09/14/2014 12:33 PM, Sergey Ryazanov wrote:
>>> Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
>>> Cc: Wim Van Sebroeck <wim@iguana.be>
>>> Cc: linux-watchdog@vger.kernel.org
>>> ---
>>> arch/mips/ar231x/ar2315.c | 26 +++++-
>>> drivers/watchdog/Kconfig | 7 ++
>>> drivers/watchdog/Makefile | 1 +
>>> drivers/watchdog/ar2315-wtd.c | 202
>>> ++++++++++++++++++++++++++++++++++++++++++
>>
>> This should be two patches: One to instantiate the watchdog,
>> the second the watchdog driver itself. The weatchdog driver
>> should use the watchdog infrastructure.
>>
> Ok. Will do in v2.
>
> [skipped]
>
>>> + *
>>> + * Copyright (C) 2008 John Crispin <blogic@openwrt.org>
>>> + * Based on EP93xx and ifxmips wdt driver
>>
>> 2008 ?
>>
> Yes. This driver is pretty old.
>
> [skipped]
>
>>> +
>>> +#define CLOCK_RATE 40000000
>>> +#define HEARTBEAT(x) (x < 1 || x > 90 ? 20 : x)
>>> +
>> Whatever the logic is here, it does not make much sense to me.
>>
> 90 second is maximal value which we could write to register, and value
> below 1 second is senseless. So this macros always return a value
> which make sense: specified by user or default.
>
I would agree that the value generates would be clamped, for example
by using the clamp_val macro. Bit your logic is such that the user
gets a timeout of 90 seconds when specifying 90 seconds, and 20
seconds when specifying 91 seconds.
Doesn't really matter much if you use the watchdog framework,
as it takes care of range checking.
Guenter
next prev parent reply other threads:[~2014-09-15 13:22 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-14 19:33 [RFC 00/18] MIPS: support for the Atheros AR231X SoCs Sergey Ryazanov
2014-09-14 19:33 ` [RFC 01/18] MIPS: ar231x: add common parts Sergey Ryazanov
2014-09-14 19:33 ` [RFC 02/18] MIPS: ar231x: add basic AR5312 SoC support Sergey Ryazanov
2014-09-14 19:33 ` [RFC 03/18] MIPS: ar231x: add basic AR2315 " Sergey Ryazanov
2014-09-14 19:33 ` [RFC 04/18] MIPS: ar231x: add interrupts handling routines Sergey Ryazanov
2014-09-14 19:33 ` [RFC 05/18] MIPS: ar231x: add early printk support Sergey Ryazanov
2014-09-14 19:33 ` [RFC 06/18] MIPS: ar231x: add UART support Sergey Ryazanov
2014-09-14 19:33 ` [RFC 07/18] MIPS: ar231x: add board configuration detection Sergey Ryazanov
2014-09-14 19:33 ` [RFC 08/18] gpio: add driver for Atheros AR5312 SoC GPIO controller Sergey Ryazanov
2014-09-29 9:03 ` Linus Walleij
2014-09-29 9:04 ` Linus Walleij
2014-09-29 20:18 ` Sergey Ryazanov
2014-09-14 19:33 ` [RFC 09/18] " Sergey Ryazanov
2014-09-29 9:18 ` Linus Walleij
2014-09-29 9:24 ` Jonas Gorski
2014-09-29 20:43 ` Sergey Ryazanov
2014-10-21 8:29 ` Linus Walleij
2014-10-21 8:59 ` Sergey Ryazanov
2014-10-28 16:12 ` Linus Walleij
2014-09-14 19:33 ` [RFC 10/18] MIPS: ar231x: add SoC type detection Sergey Ryazanov
2014-09-14 19:33 ` [RFC 11/18] MIPS: ar231x: add AR5312 flash support Sergey Ryazanov
2014-09-14 19:33 ` [RFC 12/18] mtd: add Atheros AR2315 SPI Flash driver Sergey Ryazanov
2014-09-14 19:33 ` [RFC 13/18] watchdog: add Atheros AR2315 watchdog driver Sergey Ryazanov
2014-09-15 3:01 ` Guenter Roeck
2014-09-15 9:42 ` Sergey Ryazanov
2014-09-15 13:22 ` Guenter Roeck [this message]
2014-09-14 19:33 ` [RFC 14/18] MIPS: ar231x: add AR2315 PCI host controller driver Sergey Ryazanov
2014-09-14 19:33 ` [RFC 15/18] MIPS: ar231x: add Wireless device support Sergey Ryazanov
2014-09-14 19:33 ` [RFC 16/18] ath5k: correct conditional compilation Sergey Ryazanov
2014-09-14 19:33 ` [RFC 17/18] ath5k: update dependency Sergey Ryazanov
2014-09-14 19:33 ` [RFC 18/18] ath5k: correct dependency Sergey Ryazanov
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=5416E820.3070305@roeck-us.net \
--to=linux@roeck-us.net \
--cc=linux-mips@linux-mips.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=ralf@linux-mips.org \
--cc=ryazanov.s.a@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox