2023-03-28 10:27:29

by Poovendhan Selvaraj

[permalink] [raw]
Subject: [PATCH V6 0/2] Enable crashdump collection support for IPQ9574

Crashdump collection is enabled based on the DLOAD bit in the TCSR register.
This bit is set during bootup and clearing during shutdown. During crash,
dload bit is not cleared, due to which uboot starts crashdump collection.

Enable the support for download mode to collect the crashdumps if
system crashes, to debug crashes extensively.

During the bootup, bootloaders initialize the SMEM. However the bootup
after crash, SMEM will not be initialized again. If the memory for the
SMEM is not reserved, linux consumes that region, which leads to the
loss of SMEM data. So, during the next bootup after crash, bootloaders
will hang due to invalid data present in the SMEM region. Due to this,
added the SMEM support along with crashdump collection series.

This patch series adds the support for crashdump collection.

DTS patch depends on the IPQ9574 baseport series
https://lore.kernel.org/linux-arm-kernel/[email protected]/

V6:
- Dropped the below patches as it is already part of linux-next/master
[1/5] dt-bindings: scm: Add compatible for IPQ9574
[2/5] dt-bindings: mfd: Add the tcsr compatible for IPQ9574
- Dropping patch [5/5] firmware: scm: Modify only the DLOAD bit in TCSR
register for download mode as it is posted part of below series
https://lore.kernel.org/lkml/[email protected]/#r

V5 can be found at
https://lore.kernel.org/linux-arm-kernel/[email protected]/

V4 can be found at
https://lore.kernel.org/linux-arm-kernel/[email protected]/

V3 can be found at
https://lore.kernel.org/linux-arm-msm/[email protected]/

Changes in V2:
- rebased on linux-next/master
- dropped co-developed by tag wherever applicable
- V1 can be found at
https://lore.kernel.org/linux-arm-kernel/[email protected]/

Poovendhan Selvaraj (2):
arm64: dts: qcom: ipq9574: Enable the download mode support
arm64: dts: qcom: ipq9574: Add SMEM support

arch/arm64/boot/dts/qcom/ipq9574.dtsi | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)


base-commit: a6faf7ea9fcb7267d06116d4188947f26e00e57e
--
2.17.1


2023-03-28 10:27:56

by Poovendhan Selvaraj

[permalink] [raw]
Subject: [PATCH V6 1/2] arm64: dts: qcom: ipq9574: Enable the download mode support

Enable the support for download mode to collect the crashdumps if
system crashes, to debug crashes extensively.

Signed-off-by: Poovendhan Selvaraj <[email protected]>
---
Changes in V6:
- No changes

Changes in V5:
- No changes

Changes in V4:
- Dropped smem related nodes from this patch
- Mapped the entire TCSR_REGS region and updated the offset in
qcom,dload-mode property
- updated the commit message

Changes in V3:
- No changes

arch/arm64/boot/dts/qcom/ipq9574.dtsi | 12 ++++++++++++
1 file changed, 12 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/ipq9574.dtsi b/arch/arm64/boot/dts/qcom/ipq9574.dtsi
index 3bb7435f5e7f..099948f36efc 100644
--- a/arch/arm64/boot/dts/qcom/ipq9574.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq9574.dtsi
@@ -81,6 +81,13 @@
reg = <0x0 0x40000000 0x0 0x0>;
};

+ firmware {
+ scm {
+ compatible = "qcom,scm-ipq9574", "qcom,scm";
+ qcom,dload-mode = <&tcsr 0x6100>;
+ };
+ };
+
pmu {
compatible = "arm,cortex-a73-pmu";
interrupts = <GIC_PPI 7 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
@@ -142,6 +149,11 @@
#power-domain-cells = <1>;
};

+ tcsr: syscon@1937000 {
+ compatible = "qcom,tcsr-ipq9574", "syscon";
+ reg = <0x01937000 0x21000>;
+ };
+
sdhc_1: mmc@7804000 {
compatible = "qcom,ipq9574-sdhci", "qcom,sdhci-msm-v5";
reg = <0x07804000 0x1000>, <0x07805000 0x1000>;
--
2.17.1

2023-03-28 10:28:42

by Poovendhan Selvaraj

[permalink] [raw]
Subject: [PATCH V6 2/2] arm64: dts: qcom: ipq9574: Add SMEM support

Add the required nodes to support SMEM

Signed-off-by: Poovendhan Selvaraj <[email protected]>
---
Changes in V6:
- No changes

Changes in V5:
- Dropped unrelated changes

Changes in V4:
- Added required nodes for smem support

arch/arm64/boot/dts/qcom/ipq9574.dtsi | 13 +++++++++++++
1 file changed, 13 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/ipq9574.dtsi b/arch/arm64/boot/dts/qcom/ipq9574.dtsi
index 099948f36efc..14a3396b0381 100644
--- a/arch/arm64/boot/dts/qcom/ipq9574.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq9574.dtsi
@@ -107,6 +107,13 @@
reg = <0x0 0x4a600000 0x0 0x400000>;
no-map;
};
+
+ smem@4aa00000 {
+ compatible = "qcom,smem";
+ reg = <0x0 0x4aa00000 0x0 0x00100000>;
+ hwlocks = <&tcsr_mutex 0>;
+ no-map;
+ };
};

soc: soc@0 {
@@ -149,6 +156,12 @@
#power-domain-cells = <1>;
};

+ tcsr_mutex: hwlock@1905000 {
+ compatible = "qcom,tcsr-mutex";
+ reg = <0x01905000 0x20000>;
+ #hwlock-cells = <1>;
+ };
+
tcsr: syscon@1937000 {
compatible = "qcom,tcsr-ipq9574", "syscon";
reg = <0x01937000 0x21000>;
--
2.17.1