msm: msm_watchdog_v2: convert ipi-ping to boolean
The data type of the ipi-ping field should match its semantics: a
boolean value. Change the watchdog driver to use the boolean
procedures and change all device tree clients to use the boolean
syntax.
Change-Id: I36459ebc5dc25efe8939f477405fd34ea7b650d1
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
diff --git a/Documentation/devicetree/bindings/arm/msm/msm_watchdog.txt b/Documentation/devicetree/bindings/arm/msm/msm_watchdog.txt
index 9f0c922..a665431 100644
--- a/Documentation/devicetree/bindings/arm/msm/msm_watchdog.txt
+++ b/Documentation/devicetree/bindings/arm/msm/msm_watchdog.txt
@@ -12,14 +12,17 @@
The device tree parameters for the watchdog are:
-Required parameters:
+Required properties:
- compatible : "qcom,msm-watchdog"
- reg : offset and length of the register set for the watchdog block.
- interrupts : should contain bark and bite irq numbers
- qcom,pet-time : Non zero time interval at which watchdog should be pet in ms.
- qcom,bark-time : Non zero timeout value for a watchdog bark in ms.
-- qcom,ipi-ping : send keep alive ping to other cpus if set to 1 else set to 0.
+
+Optional properties:
+
+- qcom,ipi-ping : (boolean) send keep alive ping to other cpus if present
Example:
@@ -29,5 +32,5 @@
interrupts = <0 3 0 0 4 0>;
qcom,bark-time = <11000>;
qcom,pet-time = <10000>;
- qcom,ipi-ping = <1>;
+ qcom,ipi-ping;
};
diff --git a/arch/arm/boot/dts/msm8226.dtsi b/arch/arm/boot/dts/msm8226.dtsi
index 475ed40..96e491c 100644
--- a/arch/arm/boot/dts/msm8226.dtsi
+++ b/arch/arm/boot/dts/msm8226.dtsi
@@ -89,7 +89,7 @@
interrupts = <0 3 0>, <0 4 0>;
qcom,bark-time = <11000>;
qcom,pet-time = <10000>;
- qcom,ipi-ping = <1>;
+ qcom,ipi-ping;
};
qcom,smem@fa00000 {
diff --git a/arch/arm/boot/dts/msm8910.dtsi b/arch/arm/boot/dts/msm8910.dtsi
index 8ad4eda..61f1dcd 100644
--- a/arch/arm/boot/dts/msm8910.dtsi
+++ b/arch/arm/boot/dts/msm8910.dtsi
@@ -214,7 +214,7 @@
interrupts = <0 3 0>, <0 4 0>;
qcom,bark-time = <11000>;
qcom,pet-time = <10000>;
- qcom,ipi-ping = <1>;
+ qcom,ipi-ping;
};
spmi_bus: qcom,spmi@fc4c0000 {
diff --git a/arch/arm/boot/dts/msm8974.dtsi b/arch/arm/boot/dts/msm8974.dtsi
index 74b6521..bd0711c 100644
--- a/arch/arm/boot/dts/msm8974.dtsi
+++ b/arch/arm/boot/dts/msm8974.dtsi
@@ -998,7 +998,7 @@
interrupts = <0 3 0 0 4 0>;
qcom,bark-time = <11000>;
qcom,pet-time = <10000>;
- qcom,ipi-ping = <1>;
+ qcom,ipi-ping;
};
qcom,tz-log@fc03000 {
diff --git a/arch/arm/boot/dts/msm9625.dtsi b/arch/arm/boot/dts/msm9625.dtsi
index 6fee4e6..9f5bdde 100644
--- a/arch/arm/boot/dts/msm9625.dtsi
+++ b/arch/arm/boot/dts/msm9625.dtsi
@@ -170,7 +170,6 @@
interrupts = <1 2 0>, <1 1 0>;
qcom,bark-time = <11000>;
qcom,pet-time = <10000>;
- qcom,ipi-ping = <0>;
};
rpm_bus: qcom,rpm-smd {
diff --git a/arch/arm/mach-msm/msm_watchdog_v2.c b/arch/arm/mach-msm/msm_watchdog_v2.c
index f88c611..2a4422e 100644
--- a/arch/arm/mach-msm/msm_watchdog_v2.c
+++ b/arch/arm/mach-msm/msm_watchdog_v2.c
@@ -50,7 +50,7 @@
unsigned int bark_time;
unsigned int bark_irq;
unsigned int bite_irq;
- unsigned int do_ipi_ping;
+ bool do_ipi_ping;
unsigned long long last_pet;
unsigned min_slack_ticks;
unsigned long long min_slack_ns;
@@ -488,11 +488,7 @@
dev_err(&pdev->dev, "reading pet time failed\n");
return -ENXIO;
}
- ret = of_property_read_u32(node, "qcom,ipi-ping", &pdata->do_ipi_ping);
- if (ret) {
- dev_err(&pdev->dev, "reading do ipi failed\n");
- return -ENXIO;
- }
+ pdata->do_ipi_ping = of_property_read_bool(node, "qcom,ipi-ping");
if (!pdata->bark_time) {
dev_err(&pdev->dev, "%s watchdog bark time not setup\n",
__func__);
@@ -503,11 +499,6 @@
__func__);
return -ENXIO;
}
- if (pdata->do_ipi_ping > 1) {
- dev_err(&pdev->dev, "%s invalid watchdog ipi value\n",
- __func__);
- return -ENXIO;
- }
pdata->irq_ppi = irq_is_per_cpu(pdata->bark_irq);
dump_pdata(pdata);
return 0;