dt-bindings: edac: aspeed-sdram-edac: Add ast2400/ast2600 support
Subsystems (4)
PATCH v3 1/3 dt-bindings: edac: aspeed-sdram-edac: Add ast2400/ast2600 support
Adding Aspeed AST2400 and AST2600 binding for edac driver.
--- .../devicetree/bindings/edac/aspeed-sdram-edac.txt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
Documentation/devicetree/bindings/edac/aspeed-sdram-edac.txt +6 -3
@@ -1,6 +1,6 @@ -Aspeed AST2500 SoC EDAC node +Aspeed BMC SoC EDAC node -The Aspeed AST2500 SoC supports DDR3 and DDR4 memory with and without ECC (error +The Aspeed BMC SoC supports DDR3 and DDR4 memory with and without ECC (error correction check). The memory controller supports SECDED (single bit error correction, double bit
@@ -11,7 +11,10 @@ Note, the bootloader must configure ECC mode in the memory controller. Required properties: -- compatible: should be "aspeed,ast2500-sdram-edac" +- compatible: should be one of + - "aspeed,ast2400-sdram-edac" + - "aspeed,ast2500-sdram-edac" + - "aspeed,ast2600-sdram-edac" - reg: sdram controller register set should be <0x1e6e0000 0x174> - interrupts: should be AVIC interrupt #0
Signature · 1 line
2.17.1
PATCH v3 2/3 ARM: dts: aspeed: Add AST2600 edac into common devicetree
Adding Aspeed AST2600 edac node into common devicetree.
--- arch/arm/boot/dts/aspeed-g6.dtsi | 6 ++++++ 1 file changed, 6 insertions(+)
arch/arm/boot/dts/aspeed-g6.dtsi +6 -0
@@ -69,6 +69,12 @@ always-on; }; + edac: sdram at 1e6e0000 { + compatible = "aspeed,ast2600-sdram-edac", "syscon"; + reg = <0x1e6e0000 0x174>; + interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>; + }; + ahb { compatible = "simple-bus"; #address-cells = <1>;
Signature · 1 line
2.17.1
PATCH v3 3/3 edac: Supporting AST2400 and AST2600 edac driver
In reply to Troy LeeAdding AST2400 and AST2600 edac driver support.
---
Changes since v2:
- Remove cross dependencies export functions
- Update Kconfig depends on ARCH_ASPEED
- Patch create against latest Linux kernel mainline
--- drivers/edac/Kconfig | 6 +++--- drivers/edac/aspeed_edac.c | 15 +++++---------- 2 files changed, 8 insertions(+), 13 deletions(-)
drivers/edac/Kconfig +3 -3
@@ -515,10 +515,10 @@ config EDAC_QCOM health, you should probably say 'Y' here. config EDAC_ASPEED - tristate "Aspeed AST 2500 SoC" - depends on MACH_ASPEED_G5 + tristate "Aspeed AST BMC SoC" + depends on ARCH_ASPEED help - Support for error detection and correction on the Aspeed AST 2500 SoC. + Support for error detection and correction on the Aspeed AST BMC SoC. First, ECC must be configured in the bootloader. Then, this driver will expose error counters via the EDAC kernel framework.
drivers/edac/aspeed_edac.c +5 -10
@@ -239,7 +239,7 @@ static int init_csrows(struct mem_ctl_info *mci)int rc;/* retrieve info about physical memory from device tree */ - np =of_find_node_by_path ("/memory" ); + np =of_find_node_by_name (NULL ,"memory" );if (!np) {dev_err (mci->pdev,"dt: missing /memory node\n" );return -ENODEV ;
@@ -282,7 +282,6 @@ static int aspeed_probe(struct platform_device *pdev)struct edac_mc_layer layers[2 ];struct mem_ctl_info *mci;void __iomem *regs; -u32 reg04;int rc; regs =devm_platform_ioremap_resource (pdev,0 );
@@ -294,13 +293,6 @@ static int aspeed_probe(struct platform_device *pdev)if (IS_ERR (aspeed_regmap))return PTR_ERR (aspeed_regmap); -/* bail out if ECC mode is not configured */ -regmap_read (aspeed_regmap,ASPEED_MCR_CONF , ®04); -if (!(reg04 &ASPEED_MCR_CONF_ECC )) { -dev_err (&pdev->dev,"ECC mode is not configured in u-boot\n" ); -return -EPERM ; - } - edac_op_state =EDAC_OPSTATE_INT ;/* allocate & init EDAC MC data structure */
@@ -375,10 +367,13 @@ static int aspeed_remove(struct platform_device *pdev)static const struct of_device_id aspeed_of_match[] = { + { .compatible ="aspeed,ast2400-sdram-edac" }, { .compatible ="aspeed,ast2500-sdram-edac" }, + { .compatible ="aspeed,ast2600-sdram-edac" }, {}, }; +MODULE_DEVICE_TABLE (of, aspeed_of_match);static struct platform_driver aspeed_driver = { .driver = {
@@ -392,5 +387,5 @@ module_platform_driver(aspeed_driver);MODULE_LICENSE ("GPL" );MODULE_AUTHOR ("Stefan Schaeckeler <[email protected]>" ); -MODULE_DESCRIPTION ("Aspeed AST2500 EDAC driver" ); +MODULE_DESCRIPTION ("Aspeed BMC SoC EDAC driver" );MODULE_VERSION ("1.0" );
Signature · 1 line
2.17.1
Re: [PATCH v3 3/3] edac: Supporting AST2400 and AST2600 edac driver
Quoted 54 lines · Troy Lee
Adding AST2400 and AST2600 edac driver support.
Signed-off-by Troy Lee <[email protected]>---
Changes since v2:
- Remove cross dependencies export functions
- UpdateKconfigdepends onARCH_ASPEED
- Patch create against latest Linux kernel mainline--- drivers/edac/Kconfig | 6 +++--- drivers/edac/aspeed_edac.c | 15 +++++---------- 2 files changed, 8 insertions(+), 13 deletions(-)drivers/edac/Kconfig +3
-3@@ -515,10 +515,10 @@ config EDAC_QCOM health, you should probably say 'Y' here. config EDAC_ASPEED - tristate "Aspeed AST 2500 SoC" - depends on MACH_ASPEED_G5 + tristate "Aspeed AST BMC SoC" + depends on ARCH_ASPEED help - Support for error detection and correction on the Aspeed AST 2500 SoC. + Support for error detection and correction on the Aspeed AST BMC SoC. First, ECC must be configured in the bootloader. Then, this driver will expose error counters via the EDAC kernel framework.drivers/edac/aspeed_edac.c +1
-2@@ -239,7 +239,7 @@ static int init_csrows(struct mem_ctl_info *mci)int rc;/* retrieve info about physical memory from device tree */ - np =of_find_node_by_path ("/memory" ); + np =of_find_node_by_name (NULL ,"memory" );if (!np) {dev_err (mci->pdev,"dt: missing /memory node\n" );return -ENODEV ;@@ -282,7 +282,6 @@ static int aspeed_probe(struct platform_device *pdev)struct edac_mc_layer layers[2 ];struct mem_ctl_info *mci;void __iomem *regs; -u32 reg04;int rc; regs =devm_platform_ioremap_resource (pdev,0 );
drivers/edac/aspeed_edac.c static int aspeed_probe(struct platform_device *pdev) · line 303
Quoted 10 lines
drivers/edac/aspeed_edac.c +0
-7@@ -294,13 +293,6 @@ static int aspeed_probe(struct platform_device *pdev)if (IS_ERR (aspeed_regmap))return PTR_ERR (aspeed_regmap); -/* bail out if ECC mode is not configured */ -regmap_read (aspeed_regmap,ASPEED_MCR_CONF , ®04); -if (!(reg04 &ASPEED_MCR_CONF_ECC )) { -dev_err (&pdev->dev,"ECC mode is not configured in u-boot\n" ); -return -EPERM ; - } -
It might pay to separate this out as I think it's unrelated to the supporting the AST2[45]00?
Other than that I think the patch is on the right track.
Thanks for the quick responses Troy!
Andrew
Quoted 28 lines
drivers/edac/aspeed_edac.c +4
-1edac_op_state =EDAC_OPSTATE_INT ;/* allocate & init EDAC MC data structure */ @@ -375,10 +367,13 @@ static int aspeed_remove(struct platform_device *pdev)static const struct of_device_id aspeed_of_match[] = { + { .compatible ="aspeed,ast2400-sdram-edac" }, { .compatible ="aspeed,ast2500-sdram-edac" }, + { .compatible ="aspeed,ast2600-sdram-edac" }, {}, }; +MODULE_DEVICE_TABLE (of, aspeed_of_match);static struct platform_driver aspeed_driver = { .driver = {@@ -392,5 +387,5 @@ module_platform_driver(aspeed_driver);MODULE_LICENSE ("GPL" );MODULE_AUTHOR ("Stefan Schaeckeler <[email protected]>" ); -MODULE_DESCRIPTION ("Aspeed AST2500 EDAC driver" ); +MODULE_DESCRIPTION ("Aspeed BMC SoC EDAC driver" );MODULE_VERSION ("1.0" );Signature · 1 line
2.17.1