* [PATCH 1/2] Watchdog: allow orion_wdt to be built for Dove
@ 2013-06-18 16:19 ` Russell King
0 siblings, 0 replies; 8+ messages in thread
From: Russell King @ 2013-06-18 16:19 UTC (permalink / raw)
To: Jason Cooper, Andrew Lunn, Wim Van Sebroeck, linux-arm-kernel,
linux-watchdog
The watchdog infrastructure in Dove is no different from that in
Orion5x or Kirkwood, so let's enable it for Dove. The only things
missing are a few register settings in Dove's bridge-regs.h.
Rather than duplicating the same register bit masks for the RSTOUTn_MASK
and BRIDGE_CAUSE registers, move the definitions into the watchdog
driver itself.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
arch/arm/mach-dove/include/mach/bridge-regs.h | 1 +
arch/arm/mach-kirkwood/include/mach/bridge-regs.h | 2 --
arch/arm/mach-orion5x/include/mach/bridge-regs.h | 3 ---
drivers/watchdog/Kconfig | 2 +-
drivers/watchdog/orion_wdt.c | 3 +++
5 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/arch/arm/mach-dove/include/mach/bridge-regs.h b/arch/arm/mach-dove/include/mach/bridge-regs.h
index 99f259e..5362df3 100644
--- a/arch/arm/mach-dove/include/mach/bridge-regs.h
+++ b/arch/arm/mach-dove/include/mach/bridge-regs.h
@@ -26,6 +26,7 @@
#define SYSTEM_SOFT_RESET (BRIDGE_VIRT_BASE + 0x010c)
#define SOFT_RESET 0x00000001
+#define BRIDGE_CAUSE (BRIDGE_VIRT_BASE + 0x0110)
#define BRIDGE_INT_TIMER1_CLR (~0x0004)
#define IRQ_VIRT_BASE (BRIDGE_VIRT_BASE + 0x0200)
diff --git a/arch/arm/mach-kirkwood/include/mach/bridge-regs.h b/arch/arm/mach-kirkwood/include/mach/bridge-regs.h
index 5c82b7d..95a4c87 100644
--- a/arch/arm/mach-kirkwood/include/mach/bridge-regs.h
+++ b/arch/arm/mach-kirkwood/include/mach/bridge-regs.h
@@ -20,14 +20,12 @@
#define CPU_RESET 0x00000002
#define RSTOUTn_MASK (BRIDGE_VIRT_BASE + 0x0108)
-#define WDT_RESET_OUT_EN 0x00000002
#define SOFT_RESET_OUT_EN 0x00000004
#define SYSTEM_SOFT_RESET (BRIDGE_VIRT_BASE + 0x010c)
#define SOFT_RESET 0x00000001
#define BRIDGE_CAUSE (BRIDGE_VIRT_BASE + 0x0110)
-#define WDT_INT_REQ 0x0008
#define BRIDGE_INT_TIMER1_CLR (~0x0004)
diff --git a/arch/arm/mach-orion5x/include/mach/bridge-regs.h b/arch/arm/mach-orion5x/include/mach/bridge-regs.h
index 461fd69..f727d03 100644
--- a/arch/arm/mach-orion5x/include/mach/bridge-regs.h
+++ b/arch/arm/mach-orion5x/include/mach/bridge-regs.h
@@ -18,7 +18,6 @@
#define CPU_CTRL (ORION5X_BRIDGE_VIRT_BASE + 0x104)
#define RSTOUTn_MASK (ORION5X_BRIDGE_VIRT_BASE + 0x108)
-#define WDT_RESET_OUT_EN 0x0002
#define CPU_SOFT_RESET (ORION5X_BRIDGE_VIRT_BASE + 0x10c)
@@ -26,8 +25,6 @@
#define POWER_MNG_CTRL_REG (ORION5X_BRIDGE_VIRT_BASE + 0x11C)
-#define WDT_INT_REQ 0x0008
-
#define BRIDGE_INT_TIMER1_CLR (~0x0004)
#define MAIN_IRQ_CAUSE (ORION5X_BRIDGE_VIRT_BASE + 0x200)
diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
index e89fc31..c077ae9 100644
--- a/drivers/watchdog/Kconfig
+++ b/drivers/watchdog/Kconfig
@@ -291,7 +291,7 @@ config DAVINCI_WATCHDOG
config ORION_WATCHDOG
tristate "Orion watchdog"
- depends on ARCH_ORION5X || ARCH_KIRKWOOD
+ depends on ARCH_ORION5X || ARCH_KIRKWOOD || ARCH_DOVE
select WATCHDOG_CORE
help
Say Y here if to include support for the watchdog timer
diff --git a/drivers/watchdog/orion_wdt.c b/drivers/watchdog/orion_wdt.c
index da57798..4074244 100644
--- a/drivers/watchdog/orion_wdt.c
+++ b/drivers/watchdog/orion_wdt.c
@@ -38,6 +38,9 @@
#define WDT_IN_USE 0
#define WDT_OK_TO_CLOSE 1
+#define WDT_RESET_OUT_EN BIT(1)
+#define WDT_INT_REQ BIT(3)
+
static bool nowayout = WATCHDOG_NOWAYOUT;
static int heartbeat = -1; /* module parameter (seconds) */
static unsigned int wdt_max_duration; /* (seconds) */
--
1.7.4.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 1/2] Watchdog: allow orion_wdt to be built for Dove
@ 2013-06-18 16:19 ` Russell King
0 siblings, 0 replies; 8+ messages in thread
From: Russell King @ 2013-06-18 16:19 UTC (permalink / raw)
To: linux-arm-kernel
The watchdog infrastructure in Dove is no different from that in
Orion5x or Kirkwood, so let's enable it for Dove. The only things
missing are a few register settings in Dove's bridge-regs.h.
Rather than duplicating the same register bit masks for the RSTOUTn_MASK
and BRIDGE_CAUSE registers, move the definitions into the watchdog
driver itself.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
arch/arm/mach-dove/include/mach/bridge-regs.h | 1 +
arch/arm/mach-kirkwood/include/mach/bridge-regs.h | 2 --
arch/arm/mach-orion5x/include/mach/bridge-regs.h | 3 ---
drivers/watchdog/Kconfig | 2 +-
drivers/watchdog/orion_wdt.c | 3 +++
5 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/arch/arm/mach-dove/include/mach/bridge-regs.h b/arch/arm/mach-dove/include/mach/bridge-regs.h
index 99f259e..5362df3 100644
--- a/arch/arm/mach-dove/include/mach/bridge-regs.h
+++ b/arch/arm/mach-dove/include/mach/bridge-regs.h
@@ -26,6 +26,7 @@
#define SYSTEM_SOFT_RESET (BRIDGE_VIRT_BASE + 0x010c)
#define SOFT_RESET 0x00000001
+#define BRIDGE_CAUSE (BRIDGE_VIRT_BASE + 0x0110)
#define BRIDGE_INT_TIMER1_CLR (~0x0004)
#define IRQ_VIRT_BASE (BRIDGE_VIRT_BASE + 0x0200)
diff --git a/arch/arm/mach-kirkwood/include/mach/bridge-regs.h b/arch/arm/mach-kirkwood/include/mach/bridge-regs.h
index 5c82b7d..95a4c87 100644
--- a/arch/arm/mach-kirkwood/include/mach/bridge-regs.h
+++ b/arch/arm/mach-kirkwood/include/mach/bridge-regs.h
@@ -20,14 +20,12 @@
#define CPU_RESET 0x00000002
#define RSTOUTn_MASK (BRIDGE_VIRT_BASE + 0x0108)
-#define WDT_RESET_OUT_EN 0x00000002
#define SOFT_RESET_OUT_EN 0x00000004
#define SYSTEM_SOFT_RESET (BRIDGE_VIRT_BASE + 0x010c)
#define SOFT_RESET 0x00000001
#define BRIDGE_CAUSE (BRIDGE_VIRT_BASE + 0x0110)
-#define WDT_INT_REQ 0x0008
#define BRIDGE_INT_TIMER1_CLR (~0x0004)
diff --git a/arch/arm/mach-orion5x/include/mach/bridge-regs.h b/arch/arm/mach-orion5x/include/mach/bridge-regs.h
index 461fd69..f727d03 100644
--- a/arch/arm/mach-orion5x/include/mach/bridge-regs.h
+++ b/arch/arm/mach-orion5x/include/mach/bridge-regs.h
@@ -18,7 +18,6 @@
#define CPU_CTRL (ORION5X_BRIDGE_VIRT_BASE + 0x104)
#define RSTOUTn_MASK (ORION5X_BRIDGE_VIRT_BASE + 0x108)
-#define WDT_RESET_OUT_EN 0x0002
#define CPU_SOFT_RESET (ORION5X_BRIDGE_VIRT_BASE + 0x10c)
@@ -26,8 +25,6 @@
#define POWER_MNG_CTRL_REG (ORION5X_BRIDGE_VIRT_BASE + 0x11C)
-#define WDT_INT_REQ 0x0008
-
#define BRIDGE_INT_TIMER1_CLR (~0x0004)
#define MAIN_IRQ_CAUSE (ORION5X_BRIDGE_VIRT_BASE + 0x200)
diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
index e89fc31..c077ae9 100644
--- a/drivers/watchdog/Kconfig
+++ b/drivers/watchdog/Kconfig
@@ -291,7 +291,7 @@ config DAVINCI_WATCHDOG
config ORION_WATCHDOG
tristate "Orion watchdog"
- depends on ARCH_ORION5X || ARCH_KIRKWOOD
+ depends on ARCH_ORION5X || ARCH_KIRKWOOD || ARCH_DOVE
select WATCHDOG_CORE
help
Say Y here if to include support for the watchdog timer
diff --git a/drivers/watchdog/orion_wdt.c b/drivers/watchdog/orion_wdt.c
index da57798..4074244 100644
--- a/drivers/watchdog/orion_wdt.c
+++ b/drivers/watchdog/orion_wdt.c
@@ -38,6 +38,9 @@
#define WDT_IN_USE 0
#define WDT_OK_TO_CLOSE 1
+#define WDT_RESET_OUT_EN BIT(1)
+#define WDT_INT_REQ BIT(3)
+
static bool nowayout = WATCHDOG_NOWAYOUT;
static int heartbeat = -1; /* module parameter (seconds) */
static unsigned int wdt_max_duration; /* (seconds) */
--
1.7.4.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] Watchdog: allow orion_wdt to be built for Dove
2013-06-18 16:19 ` Russell King
@ 2013-06-18 16:31 ` Jason Cooper
-1 siblings, 0 replies; 8+ messages in thread
From: Jason Cooper @ 2013-06-18 16:31 UTC (permalink / raw)
To: Russell King
Cc: Andrew Lunn, Wim Van Sebroeck, linux-arm-kernel, linux-watchdog
On Tue, Jun 18, 2013 at 05:19:32PM +0100, Russell King wrote:
> The watchdog infrastructure in Dove is no different from that in
> Orion5x or Kirkwood, so let's enable it for Dove. The only things
> missing are a few register settings in Dove's bridge-regs.h.
>
> Rather than duplicating the same register bit masks for the RSTOUTn_MASK
> and BRIDGE_CAUSE registers, move the definitions into the watchdog
> driver itself.
>
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
> arch/arm/mach-dove/include/mach/bridge-regs.h | 1 +
> arch/arm/mach-kirkwood/include/mach/bridge-regs.h | 2 --
> arch/arm/mach-orion5x/include/mach/bridge-regs.h | 3 ---
> drivers/watchdog/Kconfig | 2 +-
> drivers/watchdog/orion_wdt.c | 3 +++
> 5 files changed, 5 insertions(+), 6 deletions(-)
There shouldn't be any conflicts on the mvebu side. Wim, feel free to
take it:
Acked-by: Jason Cooper <jason@lakedaemon.net>
thx,
Jason.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/2] Watchdog: allow orion_wdt to be built for Dove
@ 2013-06-18 16:31 ` Jason Cooper
0 siblings, 0 replies; 8+ messages in thread
From: Jason Cooper @ 2013-06-18 16:31 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Jun 18, 2013 at 05:19:32PM +0100, Russell King wrote:
> The watchdog infrastructure in Dove is no different from that in
> Orion5x or Kirkwood, so let's enable it for Dove. The only things
> missing are a few register settings in Dove's bridge-regs.h.
>
> Rather than duplicating the same register bit masks for the RSTOUTn_MASK
> and BRIDGE_CAUSE registers, move the definitions into the watchdog
> driver itself.
>
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
> arch/arm/mach-dove/include/mach/bridge-regs.h | 1 +
> arch/arm/mach-kirkwood/include/mach/bridge-regs.h | 2 --
> arch/arm/mach-orion5x/include/mach/bridge-regs.h | 3 ---
> drivers/watchdog/Kconfig | 2 +-
> drivers/watchdog/orion_wdt.c | 3 +++
> 5 files changed, 5 insertions(+), 6 deletions(-)
There shouldn't be any conflicts on the mvebu side. Wim, feel free to
take it:
Acked-by: Jason Cooper <jason@lakedaemon.net>
thx,
Jason.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] Watchdog: allow orion_wdt to be built for Dove
2013-06-18 16:31 ` Jason Cooper
@ 2013-06-18 18:36 ` Sebastian Hesselbarth
-1 siblings, 0 replies; 8+ messages in thread
From: Sebastian Hesselbarth @ 2013-06-18 18:36 UTC (permalink / raw)
To: Jason Cooper
Cc: Russell King, Andrew Lunn, Wim Van Sebroeck, linux-watchdog,
linux-arm-kernel
On 06/18/2013 06:31 PM, Jason Cooper wrote:
> On Tue, Jun 18, 2013 at 05:19:32PM +0100, Russell King wrote:
>> The watchdog infrastructure in Dove is no different from that in
>> Orion5x or Kirkwood, so let's enable it for Dove. The only things
>> missing are a few register settings in Dove's bridge-regs.h.
>>
>> Rather than duplicating the same register bit masks for the RSTOUTn_MASK
>> and BRIDGE_CAUSE registers, move the definitions into the watchdog
>> driver itself.
>>
>> Signed-off-by: Russell King<rmk+kernel@arm.linux.org.uk>
>> ---
>> arch/arm/mach-dove/include/mach/bridge-regs.h | 1 +
>> arch/arm/mach-kirkwood/include/mach/bridge-regs.h | 2 --
>> arch/arm/mach-orion5x/include/mach/bridge-regs.h | 3 ---
>> drivers/watchdog/Kconfig | 2 +-
>> drivers/watchdog/orion_wdt.c | 3 +++
>> 5 files changed, 5 insertions(+), 6 deletions(-)
>
> There shouldn't be any conflicts on the mvebu side. Wim, feel free to
> take it:
>
> Acked-by: Jason Cooper<jason@lakedaemon.net>
FWIW, you also kind of get my Acked-by, although I was silently hoping
we can postpone orion wdt until we remove non-DT ;)
With irqchip queued for 3.11, we will ack the timer irqs by a
chained irq handler. But this will be DT-only and currently also only
for Kirkwood and Dove (Orion5x DT progress is slow).
With 3.11 out, I will see how to handle wdt. Either make it non-DT/DT
aware or also move non-DT to irqchip.
Sebastian
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/2] Watchdog: allow orion_wdt to be built for Dove
@ 2013-06-18 18:36 ` Sebastian Hesselbarth
0 siblings, 0 replies; 8+ messages in thread
From: Sebastian Hesselbarth @ 2013-06-18 18:36 UTC (permalink / raw)
To: linux-arm-kernel
On 06/18/2013 06:31 PM, Jason Cooper wrote:
> On Tue, Jun 18, 2013 at 05:19:32PM +0100, Russell King wrote:
>> The watchdog infrastructure in Dove is no different from that in
>> Orion5x or Kirkwood, so let's enable it for Dove. The only things
>> missing are a few register settings in Dove's bridge-regs.h.
>>
>> Rather than duplicating the same register bit masks for the RSTOUTn_MASK
>> and BRIDGE_CAUSE registers, move the definitions into the watchdog
>> driver itself.
>>
>> Signed-off-by: Russell King<rmk+kernel@arm.linux.org.uk>
>> ---
>> arch/arm/mach-dove/include/mach/bridge-regs.h | 1 +
>> arch/arm/mach-kirkwood/include/mach/bridge-regs.h | 2 --
>> arch/arm/mach-orion5x/include/mach/bridge-regs.h | 3 ---
>> drivers/watchdog/Kconfig | 2 +-
>> drivers/watchdog/orion_wdt.c | 3 +++
>> 5 files changed, 5 insertions(+), 6 deletions(-)
>
> There shouldn't be any conflicts on the mvebu side. Wim, feel free to
> take it:
>
> Acked-by: Jason Cooper<jason@lakedaemon.net>
FWIW, you also kind of get my Acked-by, although I was silently hoping
we can postpone orion wdt until we remove non-DT ;)
With irqchip queued for 3.11, we will ack the timer irqs by a
chained irq handler. But this will be DT-only and currently also only
for Kirkwood and Dove (Orion5x DT progress is slow).
With 3.11 out, I will see how to handle wdt. Either make it non-DT/DT
aware or also move non-DT to irqchip.
Sebastian
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] Watchdog: allow orion_wdt to be built for Dove
2013-06-18 18:36 ` Sebastian Hesselbarth
@ 2013-06-18 18:54 ` Russell King - ARM Linux
-1 siblings, 0 replies; 8+ messages in thread
From: Russell King - ARM Linux @ 2013-06-18 18:54 UTC (permalink / raw)
To: Sebastian Hesselbarth
Cc: Jason Cooper, Andrew Lunn, Wim Van Sebroeck, linux-watchdog,
linux-arm-kernel
On Tue, Jun 18, 2013 at 08:36:25PM +0200, Sebastian Hesselbarth wrote:
> On 06/18/2013 06:31 PM, Jason Cooper wrote:
>> On Tue, Jun 18, 2013 at 05:19:32PM +0100, Russell King wrote:
>>> The watchdog infrastructure in Dove is no different from that in
>>> Orion5x or Kirkwood, so let's enable it for Dove. The only things
>>> missing are a few register settings in Dove's bridge-regs.h.
>>>
>>> Rather than duplicating the same register bit masks for the RSTOUTn_MASK
>>> and BRIDGE_CAUSE registers, move the definitions into the watchdog
>>> driver itself.
>>>
>>> Signed-off-by: Russell King<rmk+kernel@arm.linux.org.uk>
>>> ---
>>> arch/arm/mach-dove/include/mach/bridge-regs.h | 1 +
>>> arch/arm/mach-kirkwood/include/mach/bridge-regs.h | 2 --
>>> arch/arm/mach-orion5x/include/mach/bridge-regs.h | 3 ---
>>> drivers/watchdog/Kconfig | 2 +-
>>> drivers/watchdog/orion_wdt.c | 3 +++
>>> 5 files changed, 5 insertions(+), 6 deletions(-)
>>
>> There shouldn't be any conflicts on the mvebu side. Wim, feel free to
>> take it:
>>
>> Acked-by: Jason Cooper<jason@lakedaemon.net>
>
> FWIW, you also kind of get my Acked-by, although I was silently hoping
> we can postpone orion wdt until we remove non-DT ;)
>
> With irqchip queued for 3.11, we will ack the timer irqs by a
> chained irq handler. But this will be DT-only and currently also only
> for Kirkwood and Dove (Orion5x DT progress is slow).
>
> With 3.11 out, I will see how to handle wdt. Either make it non-DT/DT
> aware or also move non-DT to irqchip.
Well, it doesn't actually use IRQs at all. What it needs to do though
is ensure that the watchdog IRQ is cleared. For the sake of speculation,
this may be because it needs to be cleared otherwise setting
WDT_RESET_OUT_EN might provoke an immediate reset... Unfortunately
the Armada 510 manual seems to lack very many words about the Watchdog
behaviour.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/2] Watchdog: allow orion_wdt to be built for Dove
@ 2013-06-18 18:54 ` Russell King - ARM Linux
0 siblings, 0 replies; 8+ messages in thread
From: Russell King - ARM Linux @ 2013-06-18 18:54 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Jun 18, 2013 at 08:36:25PM +0200, Sebastian Hesselbarth wrote:
> On 06/18/2013 06:31 PM, Jason Cooper wrote:
>> On Tue, Jun 18, 2013 at 05:19:32PM +0100, Russell King wrote:
>>> The watchdog infrastructure in Dove is no different from that in
>>> Orion5x or Kirkwood, so let's enable it for Dove. The only things
>>> missing are a few register settings in Dove's bridge-regs.h.
>>>
>>> Rather than duplicating the same register bit masks for the RSTOUTn_MASK
>>> and BRIDGE_CAUSE registers, move the definitions into the watchdog
>>> driver itself.
>>>
>>> Signed-off-by: Russell King<rmk+kernel@arm.linux.org.uk>
>>> ---
>>> arch/arm/mach-dove/include/mach/bridge-regs.h | 1 +
>>> arch/arm/mach-kirkwood/include/mach/bridge-regs.h | 2 --
>>> arch/arm/mach-orion5x/include/mach/bridge-regs.h | 3 ---
>>> drivers/watchdog/Kconfig | 2 +-
>>> drivers/watchdog/orion_wdt.c | 3 +++
>>> 5 files changed, 5 insertions(+), 6 deletions(-)
>>
>> There shouldn't be any conflicts on the mvebu side. Wim, feel free to
>> take it:
>>
>> Acked-by: Jason Cooper<jason@lakedaemon.net>
>
> FWIW, you also kind of get my Acked-by, although I was silently hoping
> we can postpone orion wdt until we remove non-DT ;)
>
> With irqchip queued for 3.11, we will ack the timer irqs by a
> chained irq handler. But this will be DT-only and currently also only
> for Kirkwood and Dove (Orion5x DT progress is slow).
>
> With 3.11 out, I will see how to handle wdt. Either make it non-DT/DT
> aware or also move non-DT to irqchip.
Well, it doesn't actually use IRQs at all. What it needs to do though
is ensure that the watchdog IRQ is cleared. For the sake of speculation,
this may be because it needs to be cleared otherwise setting
WDT_RESET_OUT_EN might provoke an immediate reset... Unfortunately
the Armada 510 manual seems to lack very many words about the Watchdog
behaviour.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2013-06-18 18:54 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-18 16:19 [PATCH 1/2] Watchdog: allow orion_wdt to be built for Dove Russell King
2013-06-18 16:19 ` Russell King
2013-06-18 16:31 ` Jason Cooper
2013-06-18 16:31 ` Jason Cooper
2013-06-18 18:36 ` Sebastian Hesselbarth
2013-06-18 18:36 ` Sebastian Hesselbarth
2013-06-18 18:54 ` Russell King - ARM Linux
2013-06-18 18:54 ` Russell King - ARM Linux
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.