All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 0/4] watchdog: at91sam9_wdt: handle already configured wdt
@ 2013-10-04  7:24 ` Boris BREZILLON
  0 siblings, 0 replies; 51+ messages in thread
From: Boris BREZILLON @ 2013-10-04  7:24 UTC (permalink / raw)
  To: Rob Herring, Pawel Moll, Mark Rutland, Stephen Warren,
	Ian Campbell, Rob Landley, Russell King, Wim Van Sebroeck,
	Fabio Porcedda, Nicolas Ferre, Guenter Roeck, Yang Wenyou
  Cc: devicetree, linux-doc, linux-kernel, linux-arm-kernel,
	linux-watchdog, Boris BREZILLON

Hello,

This patch series is a porposal to enhance the sam9 watchdog timer support.

The at91sam9 watchdog timer can only be configured once, and the current
implementation tries to configure it in a static way:
- 2 seconds timeout
- wdt restart every 500ms

If the timer has already been configured with different values, it returns an
error and do not create any watchdog device.

This is not critical if the watchdog is disabled, but if it has been enabled
with different timeout values it will lead to a SoC reset.

This patch series tries to address this issue by adapting the heartbeat value
according the WDT timer config:
- it first tries to configure the timer as requested.
- if it fails it fallbacks to the current config, adapting its heartbeat timer
to the needs

This patch series also move to a dynamically allocated at91wdt device instead
of the static instance. I'm not sure this is the best solution, so please tell
me if you prefer to keep static instance of watchdog.

It adds a new at91 wdt type: software. This new type make use of the at91 wdt
interrupt to trigger a software reboot.

Finally it adds several properties to the device tree bindings.

Best Regards,
Boris

Changes since v4:
 - fix coding style issues
 - remove unneeded watchdog_active test

Changes since v3:
 - fix a bug in heartbeat time computation
 - fix a bug in at91_wdt_set_timeout when new timeout is bigger than the old
   one
 - rename at91_wdt_ping into at91_wdt_start
 - remove unneeded ping callback assignment

Changes since v2:
 - fix documentation
 - rework the heartbeat computation to get a more flexible behaviour
 - fix xx_to_yy macros
 - modify warning and error messages
 - remove unneeded parenthesis in arithmetic operations
 - use devm functions to map io memory
 - remove unneeded devm_kfree calls

Change since v1:
 - fix typo in documentaion
 - fix irq dt definition for sama5d3 SoC


Boris BREZILLON (4):
  watchdog: at91sam9_wdt: better watchdog support
  watchdog: at91sam9_wdt: update device tree doc
  ARM: at91/dt: add sam9 watchdog default options to SoCs
  ARM: at91/dt: add watchdog properties to kizbox board

 .../devicetree/bindings/watchdog/atmel-wdt.txt     |   30 +-
 arch/arm/boot/dts/at91sam9260.dtsi                 |    5 +
 arch/arm/boot/dts/at91sam9263.dtsi                 |    5 +
 arch/arm/boot/dts/at91sam9g45.dtsi                 |    5 +
 arch/arm/boot/dts/at91sam9n12.dtsi                 |    5 +
 arch/arm/boot/dts/at91sam9x5.dtsi                  |    5 +
 arch/arm/boot/dts/kizbox.dts                       |    6 +
 arch/arm/boot/dts/sama5d3.dtsi                     |    5 +
 drivers/watchdog/at91sam9_wdt.c                    |  309 ++++++++++++++------
 9 files changed, 287 insertions(+), 88 deletions(-)

-- 
1.7.9.5


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

end of thread, other threads:[~2013-11-03 17:55 UTC | newest]

Thread overview: 51+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-04  7:24 [PATCH v5 0/4] watchdog: at91sam9_wdt: handle already configured wdt Boris BREZILLON
2013-10-04  7:24 ` Boris BREZILLON
2013-10-04  7:24 ` [PATCH v5 1/4] watchdog: at91sam9_wdt: better watchdog support Boris BREZILLON
2013-10-04  7:24   ` Boris BREZILLON
2013-10-04  7:24   ` Boris BREZILLON
2013-10-04 22:30   ` Guenter Roeck
2013-10-04 22:30     ` Guenter Roeck
2013-10-04 22:30     ` Guenter Roeck
2013-10-04  7:24 ` [PATCH v5 2/4] watchdog: at91sam9_wdt: update device tree doc Boris BREZILLON
2013-10-04  7:24   ` Boris BREZILLON
2013-10-04 22:30   ` Guenter Roeck
2013-10-04 22:30     ` Guenter Roeck
2013-10-04  7:24 ` [PATCH v5 3/4] ARM: at91/dt: add sam9 watchdog default options to SoCs Boris BREZILLON
2013-10-04  7:24   ` Boris BREZILLON
2013-10-04  7:24   ` Boris BREZILLON
2013-10-04 22:31   ` Guenter Roeck
2013-10-04 22:31     ` Guenter Roeck
2013-10-04  7:24 ` [PATCH v5 4/4] ARM: at91/dt: add watchdog properties to kizbox board Boris BREZILLON
2013-10-04  7:24   ` Boris BREZILLON
2013-10-04  7:24   ` Boris BREZILLON
2013-10-04 22:32   ` Guenter Roeck
2013-10-04 22:32     ` Guenter Roeck
2013-10-04 22:32     ` Guenter Roeck
2013-10-29  7:50 ` [PATCH v5 0/4] watchdog: at91sam9_wdt: handle already configured wdt Wim Van Sebroeck
2013-10-29 10:31   ` boris brezillon
2013-10-29 10:31     ` boris brezillon
2013-10-29 12:58     ` Wim Van Sebroeck
2013-10-29 13:25       ` boris brezillon
2013-10-29 13:25         ` boris brezillon
2013-10-29 10:37   ` [PATCH] watchdog: at91sam9_wdt: various fixes Boris BREZILLON
2013-10-29 10:37     ` Boris BREZILLON
2013-10-29 15:45     ` Guenter Roeck
2013-10-29 15:45       ` Guenter Roeck
2013-10-29 16:22       ` boris brezillon
2013-10-29 16:22         ` boris brezillon
2013-10-29 16:43         ` Guenter Roeck
2013-10-29 16:43           ` Guenter Roeck
2013-10-29 17:22           ` boris brezillon
2013-10-29 17:22             ` boris brezillon
2013-10-29 21:27             ` Guenter Roeck
2013-10-29 21:27               ` Guenter Roeck
2013-10-30  6:01               ` b.brezillon
2013-10-30  6:01                 ` b.brezillon at overkiz.com
2013-10-31 10:13               ` Jean-Christophe PLAGNIOL-VILLARD
2013-10-31 10:13                 ` Jean-Christophe PLAGNIOL-VILLARD
2013-11-03 14:42             ` boris brezillon
2013-11-03 14:42               ` boris brezillon
2013-11-03 16:22               ` Guenter Roeck
2013-11-03 16:22                 ` Guenter Roeck
2013-11-03 17:55                 ` boris brezillon
2013-11-03 17:55                   ` boris brezillon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.