diff mbox

[v8,1/5] Documentation: add sbsa-gwdt driver documentation

Message ID 1445961999-9506-2-git-send-email-fu.wei@linaro.org
State New
Headers show

Commit Message

Fu Wei Fu Oct. 27, 2015, 4:06 p.m. UTC
From: Fu Wei <fu.wei@linaro.org>


The sbsa-gwdt.txt documentation in devicetree/bindings/watchdog is for
introducing SBSA(Server Base System Architecture) Generic Watchdog
device node info into FDT.

Also add sbsa-gwdt introduction in watchdog-parameters.txt

Acked-by: Arnd Bergmann <arnd@arndb.de>

Signed-off-by: Fu Wei <fu.wei@linaro.org>

---
 .../devicetree/bindings/watchdog/sbsa-gwdt.txt     | 46 ++++++++++++++++++++++
 Documentation/watchdog/watchdog-parameters.txt     |  6 +++
 2 files changed, 52 insertions(+)

-- 
2.4.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Comments

Fu Wei Fu Oct. 30, 2015, 6:35 p.m. UTC | #1
Hi Timur

On 31 October 2015 at 01:46, Timur Tabi <timur@codeaurora.org> wrote:
> On Tue, Oct 27, 2015 at 11:10 PM, Fu Wei <fu.wei@linaro.org> wrote:

>>

>>> Why is WS1 optional?

>>

>> According to the description of WS1 in SBSA 2.3 (5.2 Watchdog Operation) page 21

>> -----------------

>> The signal is fed to a higher agent as an interrupt or reset for it to

>> take executive action.

>> ----------------

>>

>> So WS1 maybe a interrupt.

>>

>> In a real Hardware,  WS1 hooks to a  reset signal pin of BMC, if this

>> pin is triggered, BMC will do a real warm reset.

>> In this case, WS1 is a reset, Linux doesn't need to deal with that.

>>

>> For now , I haven't found a hardware use WS1 as  interrupt.

>> In <ARM v8-A Foundation Platform User Guide> 3.2 Interrupt maps  Page 22

>> Table 3-3 Shared peripheral interrupt assignments

>> IRQ ID       SPI offset      Device

>> 60               28              EL2 Generic Watchdog WS1

>>

>> But I don't have further info about it.

>>

>> Anyway,  because this signal could be interrupt or reset, Linux don't

>> need know this signal sometimes.

>> So I think it should be optional in binding info.

>>

>> Do I miss something? Any suggestion ? Please correct me, thanks.

>

> I think maybe Mark was asking why WS1 is optional, not the WS1


My answer is for "why WS1 is optional"!

> interrupt.  Maybe you can reword the documentation to make is clear

> that


I didn't say : "only the *interrupt* for WS1 is optional."

>

> However, the ACPI table only allows for one interrupt, and it's not

> clear whether that's the WS0 or WS1 interrupt.  So if both WS0 and WS1

> generate an interrupt, how does the driver handle that?


register a interrupt handle for both

>

> --

> Qualcomm Innovation Center, Inc.

> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,

> a Linux Foundation Collaborative Project.




-- 
Best regards,

Fu Wei
Software Engineer
Red Hat Software (Beijing) Co.,Ltd.Shanghai Branch
Ph: +86 21 61221326(direct)
Ph: +86 186 2020 4684 (mobile)
Room 1512, Regus One Corporate Avenue,Level 15,
One Corporate Avenue,222 Hubin Road,Huangpu District,
Shanghai,China 200021
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
diff mbox

Patch

diff --git a/Documentation/devicetree/bindings/watchdog/sbsa-gwdt.txt b/Documentation/devicetree/bindings/watchdog/sbsa-gwdt.txt
new file mode 100644
index 0000000..ad8e99a
--- /dev/null
+++ b/Documentation/devicetree/bindings/watchdog/sbsa-gwdt.txt
@@ -0,0 +1,46 @@ 
+* SBSA (Server Base System Architecture) Generic Watchdog
+
+The SBSA Generic Watchdog Timer is used to force a reset of the system
+after two stages of timeout have elapsed.  A detailed definition of the
+watchdog timer can be found in the ARM document: ARM-DEN-0029 - Server
+Base System Architecture (SBSA)
+
+Required properties:
+- compatible: Should at least contain "arm,sbsa-gwdt".
+
+- reg: Each entry specifies the base physical 64-bit address of a register
+  frame and the 64-bit length of that frame; currently, two frames must be
+  defined, in this order:
+  1: Watchdog control frame
+  2: Refresh frame.
+
+- interrupts: At least one interrupt must be defined that will be used as
+  the WS0 interrupt.  A WS1 interrupt definition can be provided, but is
+  optional.  The interrupts must be defined in this order:
+  1: WS0 interrupt
+  2: WS1 interrupt
+
+Optional properties
+- timeout-sec: To use a timeout value that is different from the driver
+  default values, use this property.  If used, at least one timeout value
+  (in seconds) must be provided.  A second optional timeout value (in
+  seconds) may also be provided and will be used as the pre-timeout value,
+  if it is given.
+
+  There are two possible sources for driver default timeout values:
+  (1) the driver contains hard-coded default values, or
+  (2) module parameters can be given when the module is loaded
+
+  If timeout/pretimeout values are provided when the module loads, they
+  will take priority.  Second priority will be the timeout-sec from DTB,
+  and third the hard-coded driver values.
+
+Example for FVP Foundation Model v8:
+
+watchdog@2a440000 {
+	compatible = "arm,sbsa-gwdt";
+	reg = <0x0 0x2a440000 0 0x1000>,
+	      <0x0 0x2a450000 0 0x1000>;
+	interrupts = <0 27 4>;
+	timeout-sec = <60 30>;
+};
diff --git a/Documentation/watchdog/watchdog-parameters.txt b/Documentation/watchdog/watchdog-parameters.txt
index 9f9ec9f..e62c8c4 100644
--- a/Documentation/watchdog/watchdog-parameters.txt
+++ b/Documentation/watchdog/watchdog-parameters.txt
@@ -284,6 +284,12 @@  sbc_fitpc2_wdt:
 margin: Watchdog margin in seconds (default 60s)
 nowayout: Watchdog cannot be stopped once started
 -------------------------------------------------
+sbsa_gwdt:
+timeout: Watchdog timeout in seconds. (default 60s)
+pretimeout: Watchdog pretimeout in seconds. (default 30s)
+nowayout: Watchdog cannot be stopped once started
+	(default=kernel config parameter)
+-------------------------------------------------
 sc1200wdt:
 isapnp: When set to 0 driver ISA PnP support will be disabled (default=1)
 io: io port