mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH v1 1/2] watchdog: ar9344-wdt: disable watchdog in probe
@ 2018-02-28 17:22 Oleksij Rempel
  2018-02-28 17:22 ` [PATCH v1 2/2] MIPS: dts: enable heartbeat led for ar9331-dptechnics-dpt-module Oleksij Rempel
  2018-03-01  9:03 ` [PATCH v1 1/2] watchdog: ar9344-wdt: disable watchdog in probe Sascha Hauer
  0 siblings, 2 replies; 4+ messages in thread
From: Oleksij Rempel @ 2018-02-28 17:22 UTC (permalink / raw)
  To: barebox; +Cc: Oleksij Rempel

This should avoid of triggering reset if we boot barebox from
barebox.

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
---
 drivers/watchdog/ar9344_wdt.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/watchdog/ar9344_wdt.c b/drivers/watchdog/ar9344_wdt.c
index d570cb40f..b61786b1b 100644
--- a/drivers/watchdog/ar9344_wdt.c
+++ b/drivers/watchdog/ar9344_wdt.c
@@ -101,6 +101,8 @@ static int ar9344_wdt_probe(struct device_d *dev)
 	dev->priv = priv;
 
 	ar9344_watchdog_detect_reset_source(priv);
+	/* disable watchdog on probe */
+	iowrite32be(0, priv->base + AR9344_WD_REG_CTRL);
 
 	priv->clk = clk_get(dev, NULL);
 	if (IS_ERR(priv->clk)) {
-- 
2.14.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v1 2/2] MIPS: dts: enable heartbeat led for ar9331-dptechnics-dpt-module
  2018-02-28 17:22 [PATCH v1 1/2] watchdog: ar9344-wdt: disable watchdog in probe Oleksij Rempel
@ 2018-02-28 17:22 ` Oleksij Rempel
  2018-03-01  9:04   ` Sascha Hauer
  2018-03-01  9:03 ` [PATCH v1 1/2] watchdog: ar9344-wdt: disable watchdog in probe Sascha Hauer
  1 sibling, 1 reply; 4+ messages in thread
From: Oleksij Rempel @ 2018-02-28 17:22 UTC (permalink / raw)
  To: barebox; +Cc: Oleksij Rempel

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
---
 arch/mips/dts/ar9331-dptechnics-dpt-module.dts | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/mips/dts/ar9331-dptechnics-dpt-module.dts b/arch/mips/dts/ar9331-dptechnics-dpt-module.dts
index 39eb36600..2c38bbc09 100644
--- a/arch/mips/dts/ar9331-dptechnics-dpt-module.dts
+++ b/arch/mips/dts/ar9331-dptechnics-dpt-module.dts
@@ -12,6 +12,12 @@
 			device-path = &spiflash, "partname:barebox-environment";
 		};
 	};
+
+	leds {
+		system {
+			barebox,default-trigger = "heartbeat";
+		};
+	};
 };
 
 &spiflash {
-- 
2.14.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v1 1/2] watchdog: ar9344-wdt: disable watchdog in probe
  2018-02-28 17:22 [PATCH v1 1/2] watchdog: ar9344-wdt: disable watchdog in probe Oleksij Rempel
  2018-02-28 17:22 ` [PATCH v1 2/2] MIPS: dts: enable heartbeat led for ar9331-dptechnics-dpt-module Oleksij Rempel
@ 2018-03-01  9:03 ` Sascha Hauer
  1 sibling, 0 replies; 4+ messages in thread
From: Sascha Hauer @ 2018-03-01  9:03 UTC (permalink / raw)
  To: Oleksij Rempel; +Cc: barebox

On Wed, Feb 28, 2018 at 06:22:05PM +0100, Oleksij Rempel wrote:
> This should avoid of triggering reset if we boot barebox from
> barebox.
> 
> Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
> ---
>  drivers/watchdog/ar9344_wdt.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/watchdog/ar9344_wdt.c b/drivers/watchdog/ar9344_wdt.c
> index d570cb40f..b61786b1b 100644
> --- a/drivers/watchdog/ar9344_wdt.c
> +++ b/drivers/watchdog/ar9344_wdt.c
> @@ -101,6 +101,8 @@ static int ar9344_wdt_probe(struct device_d *dev)
>  	dev->priv = priv;
>  
>  	ar9344_watchdog_detect_reset_source(priv);
> +	/* disable watchdog on probe */
> +	iowrite32be(0, priv->base + AR9344_WD_REG_CTRL);

Do we really want this? I would assume that if the watchdog is enabled
here, then it is enabled on purpose and disabling it just bypasses this
purpose.

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v1 2/2] MIPS: dts: enable heartbeat led for ar9331-dptechnics-dpt-module
  2018-02-28 17:22 ` [PATCH v1 2/2] MIPS: dts: enable heartbeat led for ar9331-dptechnics-dpt-module Oleksij Rempel
@ 2018-03-01  9:04   ` Sascha Hauer
  0 siblings, 0 replies; 4+ messages in thread
From: Sascha Hauer @ 2018-03-01  9:04 UTC (permalink / raw)
  To: Oleksij Rempel; +Cc: barebox

On Wed, Feb 28, 2018 at 06:22:06PM +0100, Oleksij Rempel wrote:
> Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
> ---
>  arch/mips/dts/ar9331-dptechnics-dpt-module.dts | 6 ++++++
>  1 file changed, 6 insertions(+)
> 

Applied, thanks

Sascha

> diff --git a/arch/mips/dts/ar9331-dptechnics-dpt-module.dts b/arch/mips/dts/ar9331-dptechnics-dpt-module.dts
> index 39eb36600..2c38bbc09 100644
> --- a/arch/mips/dts/ar9331-dptechnics-dpt-module.dts
> +++ b/arch/mips/dts/ar9331-dptechnics-dpt-module.dts
> @@ -12,6 +12,12 @@
>  			device-path = &spiflash, "partname:barebox-environment";
>  		};
>  	};
> +
> +	leds {
> +		system {
> +			barebox,default-trigger = "heartbeat";
> +		};
> +	};
>  };
>  
>  &spiflash {
> -- 
> 2.14.1
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-03-01  9:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-28 17:22 [PATCH v1 1/2] watchdog: ar9344-wdt: disable watchdog in probe Oleksij Rempel
2018-02-28 17:22 ` [PATCH v1 2/2] MIPS: dts: enable heartbeat led for ar9331-dptechnics-dpt-module Oleksij Rempel
2018-03-01  9:04   ` Sascha Hauer
2018-03-01  9:03 ` [PATCH v1 1/2] watchdog: ar9344-wdt: disable watchdog in probe Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox