lkml.org 
[lkml]   [2014]   [May]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 1/2] watchdog: Add Cadence WDT driver
On Tue, May 27, 2014 at 11:18:14AM +0100, Harini Katakam wrote:
> Add Cadence WDT driver. This is used by Xilinx Zynq.
>
> Signed-off-by: Harini Katakam <harinik@xilinx.com>
> ---
>
> Sorry for the delay in sending v2.
> v2 changes:
> - Update IO helpers.
> - Use dev_dbg instead of dev_info where possible.
> - Use watchdog_init_timeout
> - Spinlock for restart register where missing.
> - Change order of probe to move reboot notifier register to the end
> - Remove unecessary comments
> - Do clk_prepare_enabel and clk_disable_unprepare in resume/suspend
> respectively.
> - There is an input from dts to decide whether internal reset should be
> enabled or not. When this is enabled, reset happens wutomatically when
> counter reaches zero. In case this is not enabled, a message is disaplayed
> to indicate that the watchdog has timed out. Elaborated this message
> to describe the above.

When is that useful?

[...]

> + of_property_read_u32(pdev->dev.of_node, "reset", &wdt->rst);

For booleans use an empty property and of_property_read_bool.

[...]

> +static struct of_device_id cdns_wdt_of_match[] = {
> + { .compatible = "xlnx,zynq-wdt-r1p2", },
> + { .compatible = "cdns,wdt-r1p2", },

If these can currently be handled identically, why not just have
"cdns,wdt-r1p2" in the driver and in your dts have:

compatible = "xlnx,zynq-wdt-r1p2", "cdns,wdt-r1p2";

If we need to distinguish the two for some reason later we can always
add the "xlnx,zynq-wdt-r1p2" string to the driver.

Cheers,
Mark.


\
 
 \ /
  Last update: 2014-05-29 12:21    [W:0.061 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site