Skip to contentSkip to conversation

Add support for the Aspeed AST2500 SoC EDAC driver

PATCH Applied Stefan Schaeckeler 3 participants 5 messages Jan 17, 2019 – Jan 18, 2019

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

v2 cover Add support for the Aspeed AST2500 SoC EDAC driver

From: Stefan M Schaeckeler <[email protected]>

Add support for the Aspeed AST2500 SoC EDAC driver.

Changes since v1:
- Addressed all cosmetic issues
- Fixed (un-)recoverable address calculation in reg58 and reg5c
- Removed status field from the example device tree binding
- Added little more text to Kconfig

Stefan M Schaeckeler (2):
EDAC: Add Aspeed AST2500 EDAC driver
dt-bindings: edac: Aspeed AST2500

 .../bindings/edac/aspeed-sdram-edac.txt       |  25 ++
 MAINTAINERS                                   |   6 +
 arch/arm/boot/dts/aspeed-g5.dtsi              |   7 +
 drivers/edac/Kconfig                          |   8 +
 drivers/edac/Makefile                         |   1 +
 drivers/edac/aspeed_edac.c                    | 421 ++++++++++++++++++
 6 files changed, 468 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/edac/aspeed-sdram-edac.txt
 create mode 100644 drivers/edac/aspeed_edac.c
Signature · 1 line
2.19.1
#1 lore raw

PATCH v2 1/2 EDAC: Add Aspeed AST2500 EDAC driver

From: Stefan M Schaeckeler <[email protected]>

Add support for the Aspeed AST2500 SoC EDAC driver.

---
 MAINTAINERS                      |   6 +
 arch/arm/boot/dts/aspeed-g5.dtsi |   7 +
 drivers/edac/Kconfig             |   8 +
 drivers/edac/Makefile            |   1 +
 drivers/edac/aspeed_edac.c       | 421 +++++++++++++++++++++++++++++++
 5 files changed, 443 insertions(+)
 create mode 100644 drivers/edac/aspeed_edac.c
MAINTAINERS +6 -0
index 3318f30903b2..1feb92b14029 100644
@@ -5315,6 +5315,12 @@ L:	linux-edac at vger.kernel.org
 S:	Maintained
 F:	drivers/edac/amd64_edac*
 
+EDAC-AST2500
+M:	Stefan Schaeckeler <[email protected]>
+S:	Supported
+F:	drivers/edac/aspeed_edac.c
+F:	Documentation/devicetree/bindings/edac/aspeed-sdram-edac.txt
+
 EDAC-CALXEDA
 M:	Robert Richter <[email protected]>
 L:	linux-edac at vger.kernel.org
arch/arm/boot/dts/aspeed-g5.dtsi +7 -0
index d107459fc0f8..b4e479ab5a2d 100644
@@ -47,6 +47,13 @@
 		reg = <0x80000000 0>;
 	};
 
+	edac: sdram at 1e6e0000 {
+		compatible = "aspeed,ast2500-sdram-edac";
+		reg = <0x1e6e0000 0x174>;
+		interrupts = <0>;
+		status = "disabled";
+	};
+
 	ahb {
 		compatible = "simple-bus";
 		#address-cells = <1>;
drivers/edac/Kconfig +8 -0
index 41c9ccdd20d6..2ef2bb763577 100644
@@ -475,4 +475,12 @@ config EDAC_QCOM
 	  For debugging issues having to do with stability and overall system
 	  health, you should probably say 'Y' here.
 
+config EDAC_ASPEED
+	tristate "Aspeed AST 2500 SoC"
+	depends on MACH_ASPEED_G5
+	help
+	  Support for error detection and correction on the Aspeed AST 2500 SoC.
+
+	  First, ECC must be configured in the bootloader. Then, this driver
+	  will expose error counters via the edac kernel framework.
 endif # EDAC
drivers/edac/Makefile +1 -0
index 716096d08ea0..e1f23d4ff860 100644
@@ -78,3 +78,4 @@ obj-$(CONFIG_EDAC_SYNOPSYS)		+= synopsys_edac.o
 obj-$(CONFIG_EDAC_XGENE)		+= xgene_edac.o
 obj-$(CONFIG_EDAC_TI)			+= ti_edac.o
 obj-$(CONFIG_EDAC_QCOM)			+= qcom_edac.o
+obj-$(CONFIG_EDAC_ASPEED)		+= aspeed_edac.o
drivers/edac/aspeed_edac.c new file +421 -0

421 lines not on this page · raw message

Signature · 1 line
2.19.1
#2 lore raw

PATCH v2 2/2 dt-bindings: edac: Aspeed AST2500

In reply to Stefan Schaeckeler

From: Stefan M Schaeckeler <[email protected]>

Add support for EDAC on the Aspeed AST2500 SoC.

---
 .../bindings/edac/aspeed-sdram-edac.txt       | 25 +++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/edac/aspeed-sdram-edac.txt
Documentation/devicetree/bindings/edac/aspeed-sdram-edac.txt new file +25 -0
new file mode 100644
index 000000000000..6a0f3d90d682
@@ -0,0 +1,25 @@
+Aspeed AST2500 SoC EDAC node
+
+The Aspeed AST2500 SoC supports DDR3 and DDR4 memory with and without ECC (error
+correction check).
+
+The memory controller supports SECDED (single bit error correction, double bit
+error detection) and single bit error auto scrubbing by reserving 8 bits for
+every 64 bit word (effectively reducing available memory to 8/9).
+
+Note, the bootloader must configure ECC mode in the memory controller.
+
+
+Required properties:
+- compatible: should be "aspeed,ast2500-sdram-edac"
+- reg:        sdram controller register set should be <0x1e6e0000 0x174>
+- interrupts: should be AVIC interrupt #0
+
+
+Example:
+
+	edac: sdram at 1e6e0000 {
+		compatible = "aspeed,ast2500-sdram-edac";
+		reg = <0x1e6e0000 0x174>;
+		interrupts = <0>;
+	};
Signature · 1 line
2.19.1
Reviewed-by on v2 2/2
#3 lore raw

Re: [PATCH v2 2/2] dt-bindings: edac: Aspeed AST2500

Quoted 5 lines · Stefan Schaeckeler

From: Stefan M Schaeckeler <[email protected]>

Add support for EDAC on the Aspeed AST2500 SoC.

Quoted 44 lines
---
 .../bindings/edac/aspeed-sdram-edac.txt       | 25 +++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/edac/aspeed-sdram-edac.txt
(quoted diff) +0 -0

edac.txt b/Documentation/devicetree/bindings/edac/aspeed-sdram-edac.txt new file mode 100644
index 000000000000..6a0f3d90d682

Documentation/devicetree/bindings/edac/aspeed-sdram-edac.txt new file +3 -0
@@ -0,0 +1,25 @@
+Aspeed AST2500 SoC EDAC node
+
+The Aspeed AST2500 SoC supports DDR3 and DDR4 memory with and without 

ECC (error

Documentation/devicetree/bindings/edac/aspeed-sdram-edac.txt new file +3 -0
+correction check).
+
+The memory controller supports SECDED (single bit error correction, 

double bit
+error detection) and single bit error auto scrubbing by reserving 8 bits for

Documentation/devicetree/bindings/edac/aspeed-sdram-edac.txt new file +8 -0
+every 64 bit word (effectively reducing available memory to 8/9).
+
+Note, the bootloader must configure ECC mode in the memory controller.
+
+
+Required properties:
+- compatible: should be "aspeed,ast2500-sdram-edac"
+- reg:        sdram controller register set should be <0x1e6e0000 

0x174>
+- interrupts: should be AVIC interrupt #0

Documentation/devicetree/bindings/edac/aspeed-sdram-edac.txt new file +9 -0
+
+
+Example:
+
+	edac: sdram at 1e6e0000 {
+		compatible = "aspeed,ast2500-sdram-edac";
+		reg = <0x1e6e0000 0x174>;
+		interrupts = <0>;
+	};
Signature · 1 line
2.19.1
maintainer Applied
#4 lore raw
In reply to Stefan Schaeckeler
Quoted 15 lines · Stefan Schaeckeler

From: Stefan M Schaeckeler <[email protected]>

Add support for the Aspeed AST2500 SoC EDAC driver.

Changes since v1:
- Addressed all cosmetic issues
- Fixed (un-)recoverable address calculation in reg58 and reg5c
- Removed status field from the example device tree binding
- Added little more text to Kconfig

Stefan M Schaeckeler (2):
EDAC: Add Aspeed AST2500 EDAC driver
dt-bindings: edac: Aspeed AST2500

Quoted 11 lines
 .../bindings/edac/aspeed-sdram-edac.txt       |  25 ++
 MAINTAINERS                                   |   6 +
 arch/arm/boot/dts/aspeed-g5.dtsi              |   7 +
 drivers/edac/Kconfig                          |   8 +
 drivers/edac/Makefile                         |   1 +
 drivers/edac/aspeed_edac.c                    | 421 ++++++++++++++++++
 6 files changed, 468 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/edac/aspeed-sdram-edac.txt
 create mode 100644 drivers/edac/aspeed_edac.c

Queued, thanks.

Signature · 4 lines
Regards/Gruss,
    Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.