Re: [PATCH] watchdog: add Alphascale asm9260-wdt driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

thank you for your time.


Am 27.10.2015 um 03:31 schrieb Guenter Roeck:
> On Fri, Sep 18, 2015 at 11:23:32AM +0200, Oleksij Rempel wrote:
>> Add WD support for Alphascale asm9260 SoC. This driver
>> provide support for different function modes:
>> - HW mode to trigger SoC reset on timeout
>> - SW mode do soft reset if needed
>> - DEBUG mode
>>
>> Optional support for stopping watchdog. If reset binding are not provided
>> this driver will work in nowayout mode.
> 
> Why ?

Because this controller can't be stopped. Only way to stop it is to
reset it from reset controller, which is out of scope of this driver.
On other side i can make reset binding as required...

>>
>> Signed-off-by: Oleksij Rempel <linux@xxxxxxxxxxxxxxxx>
>> ---
>>  .../bindings/watchdog/alphascale-asm9260.txt       |  38 ++
>>  drivers/watchdog/Kconfig                           |   9 +
>>  drivers/watchdog/Makefile                          |   1 +
>>  drivers/watchdog/asm9260_wdt.c                     | 405 +++++++++++++++++++++
>>  4 files changed, 453 insertions(+)
>>  create mode 100644 Documentation/devicetree/bindings/watchdog/alphascale-asm9260.txt
>>  create mode 100644 drivers/watchdog/asm9260_wdt.c
>>
>> diff --git a/Documentation/devicetree/bindings/watchdog/alphascale-asm9260.txt b/Documentation/devicetree/bindings/watchdog/alphascale-asm9260.txt
>> new file mode 100644
>> index 0000000..cbe388b
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/watchdog/alphascale-asm9260.txt
>> @@ -0,0 +1,38 @@
>> +Alphascale asm9260 Watchdog timer
>> +
>> +Required properties:
>> +
>> +- compatible : should be "alphascale,asm9260-wdt".
>> +- reg : Specifies base physical address and size of the registers.
>> +- clocks : the clock feeding the watchdog timer.
> 
> There are two -> clocks.
> 
>> +	Needed if platform uses clocks. See clock-bindings.txt
> 
> The rest of the code suggests that the clocks are mandatory.
> probe fails if asm9260_wdt_get_dt_clks() returns an error,
> and the clock frequency would be 0.
> 
>> +- clock-names : should be set to
>> +	"mod" - source for tick counter.
>> +	"ahb" - ahb gate.
>> +
>> +Optional properties:
>> +- resets : phandle pointing to the system reset controller with correct
>> +	reset line index for watchdog controller reset. This propertie is
>> +	required if you need to disable "nowayout" and it works only with
>> +	CONFIG_WATCHDOG_NOWAYOUT=n.
>> +- reset-names : should be set to "wdt_rst" if "resets" is used.
>> +- timeout-sec : shall contain the default watchdog timeout in seconds,
>> +	if unset, the default timeout is 30 seconds.
>> +- alphascale,mode : tree modes are supported
>> +	"hw" - hw reset (defaul).
>> +	"sw" - sw reset.
>> +	"debug" - no action is taken.
>> +
>> +Example:
>> +
>> +watchdog0: watchdog@80048000 {
>> +	compatible = "alphascale,asm9260-wdt";
>> +	reg = <0x80048000 0x10>;
>> +	clocks = <&acc CLKID_SYS_WDT>, <&acc CLKID_AHB_WDT>;
>> +	clock-names = "mod", "ahb";
>> +	interrupts = <55>;
>> +	resets = <&rst WDT_RESET>;
>> +	reset-names = "wdt_rst";
>> +	timeout-sec = <30>;
>> +	alphascale,mode = "hw"
> 
> Seems to miss a ';'.
> 
> Did you get any feedback from dt maintainers on those bindings ?

No, i'll CC updated patch to devicetree list.

Thank you for other comments, i'll take care of it.

-- 
Regards,
Oleksij

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux