EDAC: Add Nuvoton NPCM7xx EDAC driver
Subsystems (3)
PATCH 1/1 EDAC: Add Nuvoton NPCM7xx EDAC driver
Add support for the Nuvoton NPCM7xx SoC EDAC driver
--- .../bindings/edac/npcm7xx-sdram-edac.txt | 17 + drivers/edac/Kconfig | 7 + drivers/edac/Makefile | 1 + drivers/edac/npcm7xx_edac.c | 424 ++++++++++++++++++ 4 files changed, 449 insertions(+) create mode 100644 Documentation/devicetree/bindings/edac/npcm7xx-sdram-edac.txt create mode 100644 drivers/edac/npcm7xx_edac.c
Documentation/devicetree/bindings/edac/npcm7xx-sdram-edac.txt new file +17 -0
@@ -0,0 +1,17 @@ +Nuvoton NPCM7xx SoC EDAC device driver + +The Nuvoton NPCM7xx SoC supports DDR4 memory with/without ECC and the driver +uses the EDAC framework to implement the ECC detection and corrtection. + +Required properties: +- compatible: should be "nuvoton,npcm7xx-sdram-edac" +- reg: Memory controller register set should be <0xf0824000 0x1000> +- interrupts: should be MC interrupt #25 + +Example: + + mc: memory-controller@f0824000 { + compatible = "nuvoton,npcm7xx-sdram-edac"; + reg = <0xf0824000 0x1000>; + interrupts = <0 25 4>; + };
drivers/edac/Kconfig +7 -0
@@ -475,4 +475,11 @@ config EDAC_QCOM For debugging issues having to do with stability and overall system health, you should probably say 'Y' here. +config EDAC_NPCM7XX + tristate "Nuvoton NPCM7xx DDR Memory Controller" + depends on ARCH_NPCM7XX + help + Support for error detection and correction on the + Nuvoton NPCM7xx DDR memory controller. + endif # EDAC
drivers/edac/Makefile +1 -0
@@ -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_NPCM7XX) += npcm7xx_edac.o
drivers/edac/npcm7xx_edac.c new file +424 -0
424 lines not on this page · raw message
Signature · 1 line
2.21.0
Dear George,
Thank you for your patch.
First question, did you send this upstream already? See entry EDAC-CORE in MAINTAINERS.
Quoted 1 line · George Hung
Add support for the Nuvoton NPCM7xx SoC EDAC driver
Could you please add the datasheet name and version to the commit message. Also, how did you test this?
Quoted 9 lines
Signed-off-by George Hung <[email protected]>--- .../bindings/edac/npcm7xx-sdram-edac.txt | 17 + drivers/edac/Kconfig | 7 + drivers/edac/Makefile | 1 + drivers/edac/npcm7xx_edac.c | 424 ++++++++++++++++++ 4 files changed, 449 insertions(+) create mode 100644 Documentation/devicetree/bindings/edac/npcm7xx-sdram-edac.txt create mode 100644 drivers/edac/npcm7xx_edac.c
Could you please also add an entry to the file MAINTAINERS?
[…]
Kind regards,
Paul
Dear Paul,
Quoted 2 lines
First question, did you send this upstream already? See entry EDAC-CORE in
MAINTAINERS.
No, I don't send it to upstream yet.
Quoted 6 lines · George Hung
Quoted 1 line
Add support for the Nuvoton NPCM7xx SoC EDAC driver
Could you please add the datasheet name and version to the commit message.
OK, I will add the datasheet information to the commit message.
datasheet:
"Cadence DDR Controller User’s Manual For DDR3 & DDR4 Memories"
Quoted 1 line
Also, how did you test this?
The datasheet provide the forcing an ECC error event method:
Write a value to the xor_check_bits parameter that will trigger an ECC event once that word is read.
For example, to force a single-bit correctable error on bit 0 of the user-word space shown, write 0x75 into that byte of the xor_check_bits parameter.
(mem base: 0xf0824000, register: 0x178).
# devmem 0xf0824178 32 0x7501
To force a double-bit un-correctable error for the user-word space, write 0x03 into that byte of the xor_check_bits parameter.
# devmem 0xf0824178 32 0x301
Quoted 7 lines
Quoted 7 lines
Signed-off-by George Hung <[email protected]>--- .../bindings/edac/npcm7xx-sdram-edac.txt | 17 + drivers/edac/Kconfig | 7 + drivers/edac/Makefile | 1 + drivers/edac/npcm7xx_edac.c | 424
Quoted 7 lines
++++++++++++++++++
Quoted 2 lines
4 files changed, 449 insertions(+) create mode 100644
Documentation/devicetree/bindings/edac/npcm7xx-sdram-edac.txtQuoted 1 line
create mode 100644 drivers/edac/npcm7xx_edac.cCould you please also add an entry to the file
MAINTAINERS?
Yes, I will add the file, MAINTAINERS to the patch.
Quoted 7 lines
[…]
Kind regards,
Paul
BRs
George