Skip to content

Commit e5ce2f1

Browse files
committed
Merge tag 'edac_updates_for_v6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras
Pull EDAC updates from Borislav Petkov: - amd64_edac: Add support for Zen4 client hardware - amd64_edac: Remove the version string as it is useless and actively confusing when looking at backported versions of the driver - Add a driver for the Nuvoton NPCM memory controller - A debugfs error checking cleanup * tag 'edac_updates_for_v6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras: EDAC/npcm: Add NPCM memory controller driver dt-bindings: memory-controllers: nuvoton: Add NPCM memory controller EDAC/thunderx: Check debugfs file creation retval properly EDAC/amd64: Add support for ECC on family 19h model 60h-7Fh EDAC/amd64: Remove module version string
2 parents 88afbb2 + 852667c commit e5ce2f1

8 files changed

Lines changed: 623 additions & 5 deletions

File tree

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/memory-controllers/nuvoton,npcm-memory-controller.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Nuvoton NPCM Memory Controller
8+
9+
maintainers:
10+
- Marvin Lin <kflin@nuvoton.com>
11+
- Stanley Chu <yschu@nuvoton.com>
12+
13+
description: |
14+
The Nuvoton BMC SoC supports DDR4 memory with or without ECC (error correction
15+
check).
16+
17+
The memory controller supports single bit error correction, double bit error
18+
detection (in-line ECC in which a section (1/8th) of the memory device used to
19+
store data is used for ECC storage).
20+
21+
Note, the bootloader must configure ECC mode for the memory controller.
22+
23+
properties:
24+
compatible:
25+
enum:
26+
- nuvoton,npcm750-memory-controller
27+
- nuvoton,npcm845-memory-controller
28+
29+
reg:
30+
maxItems: 1
31+
32+
interrupts:
33+
maxItems: 1
34+
35+
required:
36+
- compatible
37+
- reg
38+
- interrupts
39+
40+
additionalProperties: false
41+
42+
examples:
43+
- |
44+
#include <dt-bindings/interrupt-controller/arm-gic.h>
45+
46+
mc: memory-controller@f0824000 {
47+
compatible = "nuvoton,npcm750-memory-controller";
48+
reg = <0xf0824000 0x1000>;
49+
interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
50+
};

MAINTAINERS

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7494,6 +7494,14 @@ L: linux-edac@vger.kernel.org
74947494
S: Maintained
74957495
F: drivers/edac/mpc85xx_edac.[ch]
74967496

7497+
EDAC-NPCM
7498+
M: Marvin Lin <kflin@nuvoton.com>
7499+
M: Stanley Chu <yschu@nuvoton.com>
7500+
L: linux-edac@vger.kernel.org
7501+
S: Maintained
7502+
F: Documentation/devicetree/bindings/memory-controllers/nuvoton,npcm-memory-controller.yaml
7503+
F: drivers/edac/npcm_edac.c
7504+
74977505
EDAC-PASEMI
74987506
M: Egor Martovetsky <egor@pasemi.com>
74997507
L: linux-edac@vger.kernel.org

drivers/edac/Kconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -550,4 +550,15 @@ config EDAC_ZYNQMP
550550
Xilinx ZynqMP OCM (On Chip Memory) controller. It can also be
551551
built as a module. In that case it will be called zynqmp_edac.
552552

553+
config EDAC_NPCM
554+
tristate "Nuvoton NPCM DDR Memory Controller"
555+
depends on (ARCH_NPCM || COMPILE_TEST)
556+
help
557+
Support for error detection and correction on the Nuvoton NPCM DDR
558+
memory controller.
559+
560+
The memory controller supports single bit error correction, double bit
561+
error detection (in-line ECC in which a section 1/8th of the memory
562+
device used to store data is used for ECC storage).
563+
553564
endif # EDAC

drivers/edac/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,5 @@ obj-$(CONFIG_EDAC_QCOM) += qcom_edac.o
8484
obj-$(CONFIG_EDAC_ASPEED) += aspeed_edac.o
8585
obj-$(CONFIG_EDAC_BLUEFIELD) += bluefield_edac.o
8686
obj-$(CONFIG_EDAC_DMC520) += dmc520_edac.o
87+
obj-$(CONFIG_EDAC_NPCM) += npcm_edac.o
8788
obj-$(CONFIG_EDAC_ZYNQMP) += zynqmp_edac.o

drivers/edac/amd64_edac.c

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3816,6 +3816,14 @@ static int per_family_init(struct amd64_pvt *pvt)
38163816
case 0x50 ... 0x5f:
38173817
pvt->ctl_name = "F19h_M50h";
38183818
break;
3819+
case 0x60 ... 0x6f:
3820+
pvt->ctl_name = "F19h_M60h";
3821+
pvt->flags.zn_regs_v2 = 1;
3822+
break;
3823+
case 0x70 ... 0x7f:
3824+
pvt->ctl_name = "F19h_M70h";
3825+
pvt->flags.zn_regs_v2 = 1;
3826+
break;
38193827
case 0xa0 ... 0xaf:
38203828
pvt->ctl_name = "F19h_MA0h";
38213829
pvt->max_mcs = 12;
@@ -4074,8 +4082,6 @@ static int __init amd64_edac_init(void)
40744082
amd64_err("%s on 32-bit is unsupported. USE AT YOUR OWN RISK!\n", EDAC_MOD_STR);
40754083
#endif
40764084

4077-
printk(KERN_INFO "AMD64 EDAC driver v%s\n", EDAC_AMD64_VERSION);
4078-
40794085
return 0;
40804086

40814087
err_pci:
@@ -4121,7 +4127,7 @@ module_exit(amd64_edac_exit);
41214127

41224128
MODULE_LICENSE("GPL");
41234129
MODULE_AUTHOR("SoftwareBitMaker: Doug Thompson, Dave Peterson, Thayne Harbaugh; AMD");
4124-
MODULE_DESCRIPTION("MC support for AMD64 memory controllers - " EDAC_AMD64_VERSION);
4130+
MODULE_DESCRIPTION("MC support for AMD64 memory controllers");
41254131

41264132
module_param(edac_op_state, int, 0444);
41274133
MODULE_PARM_DESC(edac_op_state, "EDAC Error Reporting state: 0=Poll,1=NMI");

drivers/edac/amd64_edac.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@
8585
* sections 3.5.4 and 3.5.5 for more information.
8686
*/
8787

88-
#define EDAC_AMD64_VERSION "3.5.0"
8988
#define EDAC_MOD_STR "amd64_edac"
9089

9190
/* Extended Model from CPUID, for CPU Revision numbers */

0 commit comments

Comments
 (0)