Skip to contentSkip to conversation

driver/edac/layerscape_edac: Add Layerscape EDAC support

PATCH Applied York Sun 2 participants 2 messages Aug 23, 2016 – Sep 1, 2016

Subsystems (3)
lore
Share & tools
lore

York Sun

author
#0 lore raw

PATCH v5 8/9 driver/edac/layerscape_edac: Add Layerscape EDAC support

Add DDR EDAC for ARM-based compatible controllers. Both big-endian and little-endian are supported, as specified in device tree.

---
Change log
v5: Update author and copyright for the new driver
Drop initializing varaible with 0
Add pr_fmt macro
v4: Drop adding atomic_scrub() for armv8
Drop NO_IRQ
v3: no change
v2: Create new driver using shared DDR object

 arch/arm64/Kconfig.platforms   |  1 +
 drivers/edac/Kconfig           |  7 ++++
 drivers/edac/Makefile          |  3 ++
 drivers/edac/fsl_ddr_edac.c    |  2 +-
 drivers/edac/layerscape_edac.c | 73 ++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 85 insertions(+), 1 deletion(-)
 create mode 100644 drivers/edac/layerscape_edac.c
arch/arm64/Kconfig.platforms +1 -0
index bb2616b..52f30a6 100644
@@ -55,6 +55,7 @@ config ARCH_EXYNOS
 
 config ARCH_LAYERSCAPE
 	bool "ARMv8 based Freescale Layerscape SoC family"
+	select EDAC_SUPPORT
 	help
 	  This enables support for the Freescale Layerscape SoC family.
 
drivers/edac/Kconfig +7 -0
index 394cd16..49d7900 100644
@@ -258,6 +258,13 @@ config EDAC_MPC85XX
 	  Support for error detection and correction on the Freescale
 	  MPC8349, MPC8560, MPC8540, MPC8548, T4240
 
+config EDAC_LAYERSCAPE
+	tristate "Freescale Layerscape DDR"
+	depends on EDAC_MM_EDAC && ARCH_LAYERSCAPE
+	help
+	  Support for error detection and correction on Freescale memory
+	  controllers on Layerscape SoCs.
+
 config EDAC_MV64X60
 	tristate "Marvell MV64x60"
 	depends on EDAC_MM_EDAC && MV64X60
drivers/edac/Makefile +3 -0
index ee047a4..910dc83 100644
@@ -54,6 +54,9 @@ obj-$(CONFIG_EDAC_PASEMI)		+= pasemi_edac.o
 mpc85xx_edac_mod-y			:= fsl_ddr_edac.o mpc85xx_edac.o
 obj-$(CONFIG_EDAC_MPC85XX)		+= mpc85xx_edac_mod.o
 
+layerscape_edac_mod-y			:= fsl_ddr_edac.o layerscape_edac.o
+obj-$(CONFIG_EDAC_LAYERSCAPE)		+= layerscape_edac_mod.o
+
 obj-$(CONFIG_EDAC_MV64X60)		+= mv64x60_edac.o
 obj-$(CONFIG_EDAC_CELL)			+= cell_edac.o
 obj-$(CONFIG_EDAC_PPC4XX)		+= ppc4xx_edac.o
drivers/edac/fsl_ddr_edac.c +1 -1
index d8ce1f6..afade14 100644
@@ -26,6 +26,7 @@
 
 #include <linux/of_platform.h>
 #include <linux/of_device.h>
+#include <linux/of_address.h>
 #include "edac_module.h"
 #include "edac_core.h"
 #include "fsl_ddr_edac.h"
@@ -478,7 +479,6 @@ int fsl_mc_err_probe(struct platform_device *op)
 
 	pdata = mci->pvt_info;
 	pdata->name = "fsl_mc_err";
-	pdata->irq = NO_IRQ;
 	mci->pdev = &op->dev;
 	pdata->edac_idx = edac_mc_idx++;
 	dev_set_drvdata(mci->pdev, mci);
drivers/edac/layerscape_edac.c new file +73 -0

73 lines not on this page · raw message

Signature · 1 line
2.7.4
maintainer Applied
#1 lore raw
Quoted 15 lines · York Sun

Add DDR EDAC for ARM-based compatible controllers. Both big-endian and little-endian are supported, as specified in device tree.

---
Change log
v5: Update author and copyright for the new driver
Drop initializing varaible with 0
Add pr_fmt macro
v4: Drop adding atomic_scrub() for armv8
Drop NO_IRQ
v3: no change
v2: Create new driver using shared DDR object

Quoted 7 lines
 arch/arm64/Kconfig.platforms   |  1 +
 drivers/edac/Kconfig           |  7 ++++
 drivers/edac/Makefile          |  3 ++
 drivers/edac/fsl_ddr_edac.c    |  2 +-
 drivers/edac/layerscape_edac.c | 73 ++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 85 insertions(+), 1 deletion(-)
 create mode 100644 drivers/edac/layerscape_edac.c

Applied, thanks.

Signature · 5 lines
Regards/Gruss,
    Boris.

ECO tip #101: Trim your mails when you reply.
--