Commit f2147de3 ("watchdog: sunxi: support parameterized compatible
strings") introduced a regression in sunxi_wdt_start(), by which
the system reset function of the watchdog is not enabled upon
starting the watchdog. Fix it.
Signed-off-by: Francesco Lavra <[email protected]>
---
drivers/watchdog/sunxi_wdt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/watchdog/sunxi_wdt.c b/drivers/watchdog/sunxi_wdt.c
index a29afb3..47bd8a1 100644
--- a/drivers/watchdog/sunxi_wdt.c
+++ b/drivers/watchdog/sunxi_wdt.c
@@ -184,7 +184,7 @@ static int sunxi_wdt_start(struct watchdog_device *wdt_dev)
/* Set system reset function */
reg = readl(wdt_base + regs->wdt_cfg);
reg &= ~(regs->wdt_reset_mask);
- reg |= ~(regs->wdt_reset_val);
+ reg |= regs->wdt_reset_val;
writel(reg, wdt_base + regs->wdt_cfg);
/* Enable watchdog */
--
1.9.1
On 07/06/2015 10:59 AM, Francesco Lavra wrote:
> Commit f2147de3 ("watchdog: sunxi: support parameterized compatible
> strings") introduced a regression in sunxi_wdt_start(), by which
> the system reset function of the watchdog is not enabled upon
> starting the watchdog. Fix it.
>
> Signed-off-by: Francesco Lavra <[email protected]>
Reviewed-by: Guenter Roeck <[email protected]>
> ---
> drivers/watchdog/sunxi_wdt.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/watchdog/sunxi_wdt.c b/drivers/watchdog/sunxi_wdt.c
> index a29afb3..47bd8a1 100644
> --- a/drivers/watchdog/sunxi_wdt.c
> +++ b/drivers/watchdog/sunxi_wdt.c
> @@ -184,7 +184,7 @@ static int sunxi_wdt_start(struct watchdog_device *wdt_dev)
> /* Set system reset function */
> reg = readl(wdt_base + regs->wdt_cfg);
> reg &= ~(regs->wdt_reset_mask);
> - reg |= ~(regs->wdt_reset_val);
> + reg |= regs->wdt_reset_val;
> writel(reg, wdt_base + regs->wdt_cfg);
>
> /* Enable watchdog */
>
Hi Francesco,
Your patch looks mostly good, but there's just a few minor things.
On Mon, Jul 06, 2015 at 07:59:39PM +0200, Francesco Lavra wrote:
> Commit f2147de3 ("watchdog: sunxi: support parameterized compatible
The commit ID should have at least 12 chars to avoid future ID
collisions (which already start to happen)
> strings") introduced a regression in sunxi_wdt_start(), by which
> the system reset function of the watchdog is not enabled upon
> starting the watchdog. Fix it.
Having a description of what that actually means for the end-user (I
guess that it won't reset the system when the watchdog expires) would
be nice.
> Signed-off-by: Francesco Lavra <[email protected]>
Could you also CC stable, and add a Fixes: tag please?
Thanks,
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
Hi,
On 07/20/2015 10:26 AM, Maxime Ripard wrote:
> Hi Francesco,
>
> Your patch looks mostly good, but there's just a few minor things.
>
> On Mon, Jul 06, 2015 at 07:59:39PM +0200, Francesco Lavra wrote:
>> Commit f2147de3 ("watchdog: sunxi: support parameterized compatible
>
> The commit ID should have at least 12 chars to avoid future ID
> collisions (which already start to happen)
Will do.
>> strings") introduced a regression in sunxi_wdt_start(), by which
>> the system reset function of the watchdog is not enabled upon
>> starting the watchdog. Fix it.
>
> Having a description of what that actually means for the end-user (I
> guess that it won't reset the system when the watchdog expires) would
> be nice.
Fair enough.
>> Signed-off-by: Francesco Lavra <[email protected]>
>
> Could you also CC stable, and add a Fixes: tag please?
Sure, a V2 patch will follow shortly.
> Thanks,
> Maxime