EDAC/nuvoton: Add NPCM memory controller driver
Subsystems (4)
v14 cover EDAC/nuvoton: Add NPCM memory controller driver
This patch series add DTS node, dt-bindings document and driver for memory controller present on Nuvoton NPCM SoCs.
The memory controller supports single bit error correction and double bit error detection (in-line ECC in which a section 1/8th of the memory device used to store data is used for ECC storage).
Changes in v14:
- Fix compile warnings
Changes in v13:
- Support error injection via debugfs
- Fix coding style issues
Marvin Lin (3):
arm: dts: nuvoton: Add node for NPCM memory controller
dt-bindings: edac: nuvoton: Add document for NPCM memory controller EDAC/nuvoton: Add NPCM memory controller driver
.../edac/nuvoton,npcm-memory-controller.yaml | 54 ++ MAINTAINERS | 7 + arch/arm/boot/dts/nuvoton-common-npcm7xx.dtsi | 7 + drivers/edac/Kconfig | 11 + drivers/edac/Makefile | 1 + drivers/edac/npcm_edac.c | 516 ++++++++++++++++++ 6 files changed, 596 insertions(+) create mode 100644 Documentation/devicetree/bindings/edac/nuvoton,npcm-memory-controller.yaml create mode 100644 drivers/edac/npcm_edac.c
Signature · 1 line
2.17.1
PATCH v14 1/3 arm: dts: nuvoton: Add node for NPCM memory controller
Add node for memory controller present on Nuvoton NPCM SoCs. The memory controller supports single bit error correction and double bit error detection.
--- arch/arm/boot/dts/nuvoton-common-npcm7xx.dtsi | 7 +++++++ 1 file changed, 7 insertions(+)
arch/arm/boot/dts/nuvoton-common-npcm7xx.dtsi +7 -0
@@ -179,6 +179,13 @@ status = "disabled"; }; + mc: memory-controller@f0824000 { + compatible = "nuvoton,npcm750-memory-controller"; + reg = <0xf0824000 0x1000>; + interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>; + status = "disabled"; + }; + apb { #address-cells = <1>; #size-cells = <1>;
Signature · 1 line
2.17.1
PATCH v14 2/3 dt-bindings: edac: nuvoton: Add document for NPCM memory controller
In reply to Marvin LinAdd dt-bindings document for Nuvoton NPCM memory controller.
--- .../edac/nuvoton,npcm-memory-controller.yaml | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 Documentation/devicetree/bindings/edac/nuvoton,npcm-memory-controller.yaml
Documentation/devicetree/bindings/edac/nuvoton,npcm-memory-controller.yaml new file +54 -0
@@ -0,0 +1,54 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) + +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/edac/nuvoton,npcm-memory-controller.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Nuvoton NPCM Memory Controller Device Tree Bindings + +maintainers: + - Marvin Lin <[email protected]> + - Stanley Chu <[email protected]> + +description: | + The Nuvoton BMC SoC supports DDR4 memory with and without ECC (error + correction check). + + The memory controller supports single bit error correction, double bit + error detection (in-line ECC in which a section (1/8th) of the memory + device used to store data is used for ECC storage). + + Note, the bootloader must configure ECC mode for the memory controller. + +properties: + compatible: + enum: + - nuvoton,npcm750-memory-controller + - nuvoton,npcm845-memory-controller + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + +required: + - compatible + - reg + - interrupts + +additionalProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/arm-gic.h> + ahb { + #address-cells = <1>; + #size-cells = <1>; + mc: memory-controller@f0824000 { + compatible = "nuvoton,npcm750-memory-controller"; + reg = <0xf0824000 0x1000>; + interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>; + }; + };
Signature · 1 line
2.17.1
Re: [PATCH v14 2/3] dt-bindings: edac: nuvoton: Add document for NPCM memory controller
Quoted 15 lines · Marvin Lin
Add dt-bindings document for Nuvoton NPCM memory controller.
Signed-off-by Marvin Lin <[email protected]>Reviewed-by Rob Herring <[email protected]>--- .../edac/nuvoton,npcm-memory-controller.yaml | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 Documentation/devicetree/bindings/edac/nuvoton,npcm-memory-controller.yamlDocumentation/devicetree/bindings/edac/nuvoton,npcm-memory-controller.yaml new file +0
-0
Documentation/devicetree/bindings/edac/nuvoton,npcm-memory-controller.yaml line 5
Quoted 5 lines
Documentation/devicetree/bindings/edac/nuvoton,npcm-memory-controller.yaml new file +5
-0@@ -0,0 +1,54 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) + +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/edac/nuvoton,npcm-memory-controller.yaml#
This should be in memory-controllers directory.
Documentation/devicetree/bindings/edac/nuvoton,npcm-memory-controller.yaml line 8
Quoted 3 lines
Documentation/devicetree/bindings/edac/nuvoton,npcm-memory-controller.yaml new file +3
-0+$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Nuvoton NPCM Memory Controller Device Tree Bindings
s/Device Tree Bindings//
Best regards,
Krzysztof
Re: [PATCH v14 2/3] dt-bindings: edac: nuvoton: Add document for NPCM memory controller
Hi Krzysztof,
Quoted 10 lines
Documentation/devicetree/bindings/edac/nuvoton,npcm-memory-controller.yaml line 5
Quoted 7 lines
+++
b/Documentation/devicetree/bindings/edac/nuvoton,npcm-memory-controller.yamlDocumentation/devicetree/bindings/edac/nuvoton,npcm-memory-controller.yaml new file +5
-0@@ -0,0 +1,54 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) + +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/edac/nuvoton,npcm-memory-controller.yaml#This should be in memory-controllers directory.
Quoted 5 lines
Documentation/devicetree/bindings/edac/nuvoton,npcm-memory-controller.yaml line 8
Quoted 3 lines
Documentation/devicetree/bindings/edac/nuvoton,npcm-memory-controller.yaml new file +3
-0+$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Nuvoton NPCM Memory Controller Device Tree Bindingss/Device Tree Bindings//
Thanks for the review. Next version will move YAML to memory-controllers directory and remove "Device Tree Bindings".
Regards,
Marvin
PATCH v14 3/3 EDAC/nuvoton: Add NPCM memory controller driver
In reply to Marvin LinAdd driver for memory controller present on Nuvoton NPCM SoCs. The memory controller supports single bit error correction and double bit error detection.
--- MAINTAINERS | 7 + drivers/edac/Kconfig | 11 + drivers/edac/Makefile | 1 + drivers/edac/npcm_edac.c | 516 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 535 insertions(+) create mode 100644 drivers/edac/npcm_edac.c
MAINTAINERS +7 -0
@@ -7409,6 +7409,13 @@ L: [email protected] S: Maintained F: drivers/edac/mpc85xx_edac.[ch] +EDAC-NPCM +M: Marvin Lin <[email protected]> +L: [email protected] +S: Maintained +F: Documentation/devicetree/bindings/edac/nuvoton,npcm-memory-controller.yaml +F: drivers/edac/npcm_edac.c + EDAC-PASEMI M: Egor Martovetsky <[email protected]> L: [email protected]
drivers/edac/Kconfig +11 -0
@@ -541,4 +541,15 @@ config EDAC_DMC520 Support for error detection and correction on the SoCs with ARM DMC-520 DRAM controller. +config EDAC_NPCM + tristate "Nuvoton NPCM DDR Memory Controller" + depends on (ARCH_NPCM || COMPILE_TEST) + help + Support for error detection and correction on the Nuvoton NPCM DDR + memory controller. + + The memory controller supports single bit error correction, double bit + error detection (in-line ECC in which a section 1/8th of the memory + device used to store data is used for ECC storage). + endif # EDAC
drivers/edac/Makefile +1 -0
@@ -84,3 +84,4 @@ obj-$(CONFIG_EDAC_QCOM) += qcom_edac.o obj-$(CONFIG_EDAC_ASPEED) += aspeed_edac.o obj-$(CONFIG_EDAC_BLUEFIELD) += bluefield_edac.o obj-$(CONFIG_EDAC_DMC520) += dmc520_edac.o +obj-$(CONFIG_EDAC_NPCM) += npcm_edac.o
drivers/edac/npcm_edac.c new file +516 -0
516 lines not on this page · raw message
Signature · 1 line
2.17.1