Skip to contentSkip to conversation

Independent SOCFPGA SDRAM EDAC config

PATCH In review [email protected] 3 participants 6 messages Feb 25, 2019 – Feb 26, 2019

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

PATCH v2 1/2 EDAC, altera: Add separate SDRAM EDAC config

In reply to [email protected]

From: Thor Thayer <[email protected]>

The CONFIG_ALTERA_EDAC flag always enables the SDRAM EDAC. On the newer architectures, there are cases where the peripheral EDACs are enabled but SDRAM needs to be disabled.
This change moves SDRAM functions so they can be contained inside the conditional CONFIG.
Create new CONFIG option just for SDRAM.

---
v2 No change

---
 drivers/edac/Kconfig       | 14 +++++++---
 drivers/edac/altera_edac.c | 67 +++++++++++++++++++++++++---------------------
 2 files changed, 47 insertions(+), 34 deletions(-)
drivers/edac/Kconfig +11 -3
index 102a47a09f25..47eb4d13ed5f 100644
@@ -391,9 +391,17 @@ config EDAC_ALTERA
 	depends on EDAC=y && (ARCH_SOCFPGA || ARCH_STRATIX10)
 	help
 	  Support for error detection and correction on the
-	  Altera SOCs. This must be selected for SDRAM ECC.
-	  Note that the preloader must initialize the SDRAM
-	  before loading the kernel.
+	  Altera SOCs. This is the global enable for the
+	  various Altera peripherals.
+
+config EDAC_ALTERA_SDRAM
+	bool "Altera SDRAM ECC"
+	depends on EDAC_ALTERA=y
+	help
+	  Support for error detection and correction on the
+	  Altera SDRAM Memory for Altera SoCs. Note that the
+	  preloader must initialize the SDRAM before loading
+	  the kernel.
 
 config EDAC_ALTERA_L2C
 	bool "Altera L2 Cache ECC"
drivers/edac/altera_edac.c +36 -31

96 lines not on this page · raw message

#2 lore raw

PATCH v2 2/2 ARM: socfpga_defconfig: enable EDAC by default

In reply to [email protected]

From: Thor Thayer <[email protected]>

Enable the different ECC blocks by default on Cyclone5 and Arria10.

---
v2 Rebase patch to the arm/defconfig on the arm-soc tree

---
 arch/arm/configs/socfpga_defconfig | 12 ++++++++++++
 1 file changed, 12 insertions(+)
arch/arm/configs/socfpga_defconfig +12 -0
index 08d1b3e11d68..1f2056c76ef1 100644
@@ -122,11 +122,23 @@ CONFIG_LEDS_GPIO=y
 CONFIG_LEDS_TRIGGERS=y
 CONFIG_LEDS_TRIGGER_TIMER=y
 CONFIG_LEDS_TRIGGER_CPU=y
+CONFIG_EDAC=y
+CONFIG_EDAC_ALTERA=y
+CONFIG_EDAC_ALTERA_SDRAM=y
+CONFIG_EDAC_ALTERA_L2C=y
+CONFIG_EDAC_ALTERA_OCRAM=y
+CONFIG_EDAC_ALTERA_ETHERNET=y
+CONFIG_EDAC_ALTERA_NAND=y
+CONFIG_EDAC_ALTERA_DMA=y
+CONFIG_EDAC_ALTERA_USB=y
+CONFIG_EDAC_ALTERA_QSPI=y
+CONFIG_EDAC_ALTERA_SDMMC=y
 CONFIG_RTC_CLASS=y
 CONFIG_RTC_DRV_DS1307=y
 CONFIG_DMADEVICES=y
 CONFIG_PL330_DMA=y
 CONFIG_DMATEST=m
+CONFIG_RAS=y
 CONFIG_FPGA=y
 CONFIG_FPGA_MGR_SOCFPGA=y
 CONFIG_FPGA_MGR_SOCFPGA_A10=y
#0 lore raw

v2 cover Independent SOCFPGA SDRAM EDAC config

From: Thor Thayer <[email protected]>

Most users want EDAC support so make it the default.

SOCFPGA SDRAM EDAC reporting was enabled by the parent EDAC config (CONFIG_ALTERA_EDAC) since initial customers always wanted SDRAM EDAC enabled.
There are cases where the SDRAM needs to be disabled while the other block EDACs remain enabled.
This patch set 1) splits out the SDRAM EDAC into a separate config and 2) enables all the EDAC blocks by default for 32 bit SOCFPGA.

V2 Changes
Rebase socfpga_defconfig against arm-soc/arm/defconfig

Thor Thayer (2):
EDAC, altera: Add separate SDRAM EDAC config
ARM: socfpga_defconfig: enable EDAC by default

 arch/arm/configs/socfpga_defconfig | 12 +++++++
 drivers/edac/Kconfig               | 14 ++++++--
 drivers/edac/altera_edac.c         | 67 ++++++++++++++++++++------------------
 3 files changed, 59 insertions(+), 34 deletions(-)
Signature · 1 line
2.7.4
maintainer
#3 lore raw
Quoted 13 lines · On Mon, Feb 25, 2019 at 12:56:44PM -0600, [email protected] wrote:

From: Thor Thayer <[email protected]>

Most users want EDAC support so make it the default.

SOCFPGA SDRAM EDAC reporting was enabled by the parent EDAC config (CONFIG_ALTERA_EDAC) since initial customers always wanted SDRAM EDAC enabled.
There are cases where the SDRAM needs to be disabled while the other block EDACs remain enabled.
This patch set 1) splits out the SDRAM EDAC into a separate config and 2) enables all the EDAC blocks by default for 32 bit SOCFPGA.

Quoted 6 lines

V2 Changes
Rebase socfpga_defconfig against arm-soc/arm/defconfig

Thor Thayer (2):
EDAC, altera: Add separate SDRAM EDAC config
ARM: socfpga_defconfig: enable EDAC by default

Am I supposed to take the second patch too or is it going through Dinh's tree?

Signature · 4 lines
Regards/Gruss,
    Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.
maintainer
#4 lore raw

Hi Boris,

Quoted 17 lines · Borislav Petkov
Quoted 16 lines · On Mon, Feb 25, 2019 at 12:56:44PM -0600, [email protected] wrote:

From: Thor Thayer <[email protected]>

Most users want EDAC support so make it the default.

SOCFPGA SDRAM EDAC reporting was enabled by the parent EDAC config (CONFIG_ALTERA_EDAC) since initial customers always wanted SDRAM EDAC enabled.
There are cases where the SDRAM needs to be disabled while the other block EDACs remain enabled.
This patch set 1) splits out the SDRAM EDAC into a separate config and 2) enables all the EDAC blocks by default for 32 bit SOCFPGA.

V2 Changes
Rebase socfpga_defconfig against arm-soc/arm/defconfig

Quoted 7 lines
Quoted 3 lines

Thor Thayer (2):
EDAC, altera: Add separate SDRAM EDAC config
ARM: socfpga_defconfig: enable EDAC by default

Am I supposed to take the second patch too or is it going through Dinh's tree?

If you don't mind, I'll take the defconfig patch to avoid any conflicts.

Thanks,
Dinh

maintainer
#5 lore raw
Quoted 1 line · Dinh Nguyen

If you don't mind, I'll take the defconfig patch to avoid any conflicts.

Ok, thanks. Applied the first one.

Signature · 4 lines
Regards/Gruss,
    Boris.

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