Add NAND, DMA, USB, and QSPI EDAC
Subsystems (3)
cover Add NAND, DMA, USB, and QSPI EDAC
From: Thor Thayer <[email protected]>
This patch series adds the NAND, DMA, USB and QSPI FIFO EDAC modules.
Thor Thayer (10):
Documentation: dt: socfpga: Add Arria10 NAND EDAC binding
Documentation: dt: socfpga: Add Arria10 DMA EDAC binding
Documentation: dt: socfpga: Add Arria10 USB EDAC binding
Documentation: dt: socfpga: Add Arria10 QSPI EDAC binding EDAC, altera: Add Arria10 NAND EDAC support EDAC, altera: Add Arria10 DMA EDAC support
EDAC, altera: Add Arria10 USB EDAC support
EDAC, altera: Add Arria10 QSPI EDAC support
ARM: dts: Add Arria10 DMA EDAC devicetree entry
ARM: dts: Add Arria10 USB EDAC devicetree entry
.../bindings/arm/altera/socfpga-eccmgr.txt | 79 ++++++++++++ arch/arm/boot/dts/socfpga_arria10.dtsi | 16 +++ drivers/edac/Kconfig | 28 +++++ drivers/edac/altera_edac.c | 130 +++++++++++++++++++- 4 files changed, 252 insertions(+), 1 deletion(-)
Signature · 1 line
1.7.9.5
PATCH 1/10 Documentation: dt: socfpga: Add Arria10 NAND EDAC binding
From: Thor Thayer <[email protected]>
Add the device tree bindings needed to support the Altera NAND FIFO buffers EDAC on the Arria10 chip.
--- .../bindings/arm/altera/socfpga-eccmgr.txt | 32 ++++++++++++++++++++ 1 file changed, 32 insertions(+)
Documentation/devicetree/bindings/arm/altera/socfpga-eccmgr.txt +32 -0
@@ -90,6 +90,14 @@ Required Properties: - interrupts : Should be single bit error interrupt, then double bit error interrupt, in this order. +NAND FIFO ECC +Required Properties: +- compatible : Should be "altr,socfpga-nand-ecc" +- reg : Address and size for ECC block registers. +- altr,ecc-parent : phandle to parent NAND node. +- interrupts : Should be single bit error interrupt, then double bit error + interrupt, in this order. + Example: eccmgr: eccmgr at ffd06000 {
@@ -132,4 +140,28 @@ Example: interrupts = <5 IRQ_TYPE_LEVEL_HIGH>, <37 IRQ_TYPE_LEVEL_HIGH>; }; + + nand-buf-ecc at ff8c2000 { + compatible = "altr,socfpga-nand-ecc"; + reg = <0xff8c2000 0x400>; + altr,ecc-parent = <&nand>; + interrupts = <11 IRQ_TYPE_LEVEL_HIGH>, + <43 IRQ_TYPE_LEVEL_HIGH>; + }; + + nand-rd-ecc at ff8c2400 { + compatible = "altr,socfpga-nand-ecc"; + reg = <0xff8c2400 0x400>; + altr,ecc-parent = <&nand>; + interrupts = <13 IRQ_TYPE_LEVEL_HIGH>, + <45 IRQ_TYPE_LEVEL_HIGH>; + }; + + nand-wr-ecc at ff8c2800 { + compatible = "altr,socfpga-nand-ecc"; + reg = <0xff8c2800 0x400>; + altr,ecc-parent = <&nand>; + interrupts = <12 IRQ_TYPE_LEVEL_HIGH>, + <44 IRQ_TYPE_LEVEL_HIGH>; + }; };
Signature · 1 line
1.7.9.5
Re: [PATCH 01/10] Documentation: dt: socfpga: Add Arria10 NAND EDAC binding
Quoted 9 lines · tthayer at opensource.altera.com
From: Thor Thayer <[email protected]>
Add the device tree bindings needed to support the Altera NAND FIFO buffers EDAC on the Arria10 chip.
Signed-off-by Thor Thayer <[email protected]>--- .../bindings/arm/altera/socfpga-eccmgr.txt | 32 ++++++++++++++++++++ 1 file changed, 32 insertions(+)
PATCH 2/10 Documentation: dt: socfpga: Add Arria10 DMA EDAC binding
In reply to [email protected]From: Thor Thayer <[email protected]>
Add the device tree bindings needed to support the Altera DMA FIFO buffer EDAC on the Arria10 chip.
--- .../bindings/arm/altera/socfpga-eccmgr.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
Documentation/devicetree/bindings/arm/altera/socfpga-eccmgr.txt +16 -0
@@ -98,6 +98,14 @@ Required Properties: - interrupts : Should be single bit error interrupt, then double bit error interrupt, in this order. +DMA FIFO ECC +Required Properties: +- compatible : Should be "altr,socfpga-dma-ecc" +- reg : Address and size for ECC block registers. +- altr,ecc-parent : phandle to parent DMA node. +- interrupts : Should be single bit error interrupt, then double bit error + interrupt, in this order. + Example: eccmgr: eccmgr at ffd06000 {
@@ -164,4 +172,12 @@ Example: interrupts = <12 IRQ_TYPE_LEVEL_HIGH>, <44 IRQ_TYPE_LEVEL_HIGH>; }; + + dma-ecc at ff8c8000 { + compatible = "altr,socfpga-dma-ecc"; + reg = <0xff8c8000 0x400>; + altr,ecc-parent = <&pdma>; + interrupts = <10 IRQ_TYPE_LEVEL_HIGH>, + <42 IRQ_TYPE_LEVEL_HIGH>; + }; };
Signature · 1 line
1.7.9.5
Re: [PATCH 02/10] Documentation: dt: socfpga: Add Arria10 DMA EDAC binding
Quoted 9 lines · tthayer at opensource.altera.com
From: Thor Thayer <[email protected]>
Add the device tree bindings needed to support the Altera DMA FIFO buffer EDAC on the Arria10 chip.
Signed-off-by Thor Thayer <[email protected]>--- .../bindings/arm/altera/socfpga-eccmgr.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
PATCH 3/10 Documentation: dt: socfpga: Add Arria10 USB EDAC binding
In reply to [email protected]From: Thor Thayer <[email protected]>
Add the device tree bindings needed to support the Altera USB FIFO buffer EDAC on the Arria10 chip.
--- .../bindings/arm/altera/socfpga-eccmgr.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
Documentation/devicetree/bindings/arm/altera/socfpga-eccmgr.txt +15 -0
@@ -106,6 +106,14 @@ Required Properties: - interrupts : Should be single bit error interrupt, then double bit error interrupt, in this order. +USB FIFO ECC +Required Properties: +- compatible : Should be "altr,socfpga-usb-ecc" +- reg : Address and size for ECC block registers. +- altr,ecc-parent : phandle to parent USB node. +- interrupts : Should be single bit error interrupt, then double bit error + interrupt, in this order. + Example: eccmgr: eccmgr at ffd06000 {
@@ -179,5 +187,12 @@ Example: altr,ecc-parent = <&pdma>; interrupts = <10 IRQ_TYPE_LEVEL_HIGH>, <42 IRQ_TYPE_LEVEL_HIGH>; + + usb0-ecc at ff8c8800 { + compatible = "altr,socfpga-usb-ecc"; + reg = <0xff8c8800 0x400>; + altr,ecc-parent = <&usb0>; + interrupts = <2 IRQ_TYPE_LEVEL_HIGH>, + <34 IRQ_TYPE_LEVEL_HIGH>; }; };
Signature · 1 line
1.7.9.5
Re: [PATCH 03/10] Documentation: dt: socfpga: Add Arria10 USB EDAC binding
Quoted 9 lines · tthayer at opensource.altera.com
From: Thor Thayer <[email protected]>
Add the device tree bindings needed to support the Altera USB FIFO buffer EDAC on the Arria10 chip.
Signed-off-by Thor Thayer <[email protected]>--- .../bindings/arm/altera/socfpga-eccmgr.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
PATCH 4/10 Documentation: dt: socfpga: Add Arria10 QSPI EDAC binding
In reply to [email protected]From: Thor Thayer <[email protected]>
Add the device tree bindings needed to support the Altera QSPI FIFO buffer EDAC on the Arria10 chip.
--- .../bindings/arm/altera/socfpga-eccmgr.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
Documentation/devicetree/bindings/arm/altera/socfpga-eccmgr.txt +16 -0
@@ -114,6 +114,14 @@ Required Properties: - interrupts : Should be single bit error interrupt, then double bit error interrupt, in this order. +QSPI FIFO ECC +Required Properties: +- compatible : Should be "altr,socfpga-qspi-ecc" +- reg : Address and size for ECC block registers. +- altr,ecc-parent : phandle to parent QSPI node. +- interrupts : Should be single bit error interrupt, then double bit error + interrupt, in this order. + Example: eccmgr: eccmgr at ffd06000 {
@@ -195,4 +203,12 @@ Example: interrupts = <2 IRQ_TYPE_LEVEL_HIGH>, <34 IRQ_TYPE_LEVEL_HIGH>; }; + + qspi-ecc at ff8c8400 { + compatible = "altr,socfpga-qspi-ecc"; + reg = <0xff8c8400 0x400>; + altr,ecc-parent = <&qspi>; + interrupts = <14 IRQ_TYPE_LEVEL_HIGH>, + <46 IRQ_TYPE_LEVEL_HIGH>; + }; };
Signature · 1 line
1.7.9.5
Re: [PATCH 04/10] Documentation: dt: socfpga: Add Arria10 QSPI EDAC binding
Quoted 9 lines · tthayer at opensource.altera.com
From: Thor Thayer <[email protected]>
Add the device tree bindings needed to support the Altera QSPI FIFO buffer EDAC on the Arria10 chip.
Signed-off-by Thor Thayer <[email protected]>--- .../bindings/arm/altera/socfpga-eccmgr.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
PATCH 5/10 EDAC, altera: Add Arria10 NAND EDAC support
In reply to [email protected]From: Thor Thayer <[email protected]>
Add Altera Arria10 NAND FIFO memory EDAC support.
--- drivers/edac/Kconfig | 7 +++++++ drivers/edac/altera_edac.c | 34 +++++++++++++++++++++++++++++++++- 2 files changed, 40 insertions(+), 1 deletion(-)
drivers/edac/Kconfig +7 -0
@@ -398,6 +398,13 @@ config EDAC_ALTERA_ETHERNET Support for error detection and correction on the Altera Ethernet FIFO Memory for Altera SoCs. +config EDAC_ALTERA_NAND + bool "Altera NAND FIFO ECC" + depends on EDAC_ALTERA=y && MTD_NAND_DENALI + help + Support for error detection and correction on the + Altera NAND FIFO Memory for Altera SoCs. + config EDAC_SYNOPSYS tristate "Synopsys DDR Memory Controller" depends on EDAC_MM_EDAC && ARCH_ZYNQ
drivers/edac/altera_edac.c +33 -1
@@ -1285,6 +1285,33 @@ early_initcall(socfpga_init_ethernet_ecc);#endif /* CONFIG_EDAC_ALTERA_ETHERNET */ +/********************** NAND Device Functions **********************/ + +#ifdef CONFIG_EDAC_ALTERA_NAND + +static const struct edac_device_prv_data a10_nandecc_data = { + .setup = altr_check_ecc_deps, + .ce_clear_mask =ALTR_A10_ECC_SERRPENA , + .ue_clear_mask =ALTR_A10_ECC_DERRPENA , + .dbgfs_name ="altr_trigger" , + .ecc_enable_mask =ALTR_A10_COMMON_ECC_EN_CTL , + .ecc_en_ofst =ALTR_A10_ECC_CTRL_OFST , + .ce_set_mask =ALTR_A10_ECC_TSERRA , + .ue_set_mask =ALTR_A10_ECC_TDERRA , + .set_err_ofst =ALTR_A10_ECC_INTTEST_OFST , + .ecc_irq_handler = altr_edac_a10_ecc_irq, + .inject_fops = &altr_edac_a10_device_inject_fops, +}; + +static int __init socfpga_init_nand_ecc (void ) +{ +return altr_init_a10_ecc_device_type ("altr,socfpga-nand-ecc" ); +} + +early_initcall (socfpga_init_nand_ecc); + +#endif /* CONFIG_EDAC_ALTERA_NAND */ +/********************* Arria10 EDAC Device Functions *************************/ static const struct of_device_id altr_edac_a10_device_of_match[] = { #ifdef CONFIG_EDAC_ALTERA_L2C
@@ -1298,6 +1325,9 @@ static const struct of_device_id altr_edac_a10_device_of_match[] = { { .compatible = "altr,socfpga-eth-mac-ecc", .data = &a10_enetecc_data }, #endif +#ifdef CONFIG_EDAC_ALTERA_NAND + { .compatible = "altr,socfpga-nand-ecc", .data = &a10_nandecc_data }, +#endif {}, }; MODULE_DEVICE_TABLE(of, altr_edac_a10_device_of_match);
@@ -1589,7 +1619,9 @@ static int altr_edac_a10_probe(struct platform_device *pdev)else if ((of_device_is_compatible (child,"altr,socfpga-a10-ocram-ecc" )) || (of_device_is_compatible (child, -"altr,socfpga-eth-mac-ecc" ))) +"altr,socfpga-eth-mac-ecc" )) || + (of_device_is_compatible (child, +"altr,socfpga-nand-ecc" )))altr_edac_a10_device_add (edac, child);else if (of_device_is_compatible (child,"altr,sdram-edac-a10" ))
Signature · 1 line
1.7.9.5
Borislav Petkov
maintainerRe: [PATCH 05/10] EDAC, altera: Add Arria10 NAND EDAC support
Quoted 9 lines · tthayer at opensource.altera.com
From: Thor Thayer <[email protected]>
Add Altera Arria10 NAND FIFO memory EDAC support.
Signed-off-by Thor Thayer <[email protected]>--- drivers/edac/Kconfig | 7 +++++++ drivers/edac/altera_edac.c | 34 +++++++++++++++++++++++++++++++++- 2 files changed, 40 insertions(+), 1 deletion(-)
...
drivers/edac/altera_edac.c static int altr_edac_a10_probe(struct platform_device *pdev) · line 1627
Quoted 11 lines
drivers/edac/altera_edac.c +3
-1@@ -1589,7 +1619,9 @@ static int altr_edac_a10_probe(struct platform_device *pdev)else if ((of_device_is_compatible (child,"altr,socfpga-a10-ocram-ecc" )) || (of_device_is_compatible (child, -"altr,socfpga-eth-mac-ecc" ))) +"altr,socfpga-eth-mac-ecc" )) || + (of_device_is_compatible (child, +"altr,socfpga-nand-ecc" )))altr_edac_a10_device_add (edac, child);else if (of_device_is_compatible (child,"altr,sdram-edac-a10" ))
Can we simplify this loop like this?
for_each_child_of_node(pdev->dev.of_node, child) {
if (!of_device_is_available(child))
continue;
if (of_device_is_compatible(child, "altr,socfpga-a10-l2-ecc") ||
of_device_is_compatible(child, "altr,socfpga-a10-ocram-ecc") ||
of_device_is_compatible(child, "altr,socfpga-eth-mac-ecc") ||
of_device_is_compatible(child, "altr,socfpga-nand-ecc"))
altr_edac_a10_device_add(edac, child);
else if (of_device_is_compatible(child, "altr,sdram-edac-a10"))
of_platform_populate(pdev->dev.of_node,
altr_sdram_ctrl_of_match,
NULL, &pdev->dev);
}I've merged the first "if" and subsequent "else if" because they all do altr_edac_a10_device_add(edac, child) and added spacing for better readability.
Look ok?
Or have I fatfingered it?
Signature · 5 lines
Regards/Gruss,
Boris.
ECO tip #101: Trim your mails when you reply.
--Re: [PATCH 05/10] EDAC, altera: Add Arria10 NAND EDAC support
Quoted 44 lines · Borislav Petkov
Quoted 9 lines · On Thu, Jul 14, 2016 at 11:06:43AM -0500, [email protected] wrote:
From: Thor Thayer <[email protected]>
Add Altera Arria10 NAND FIFO memory EDAC support.
Signed-off-by Thor Thayer <[email protected]>--- drivers/edac/Kconfig | 7 +++++++ drivers/edac/altera_edac.c | 34 +++++++++++++++++++++++++++++++++- 2 files changed, 40 insertions(+), 1 deletion(-)...
drivers/edac/altera_edac.c static int altr_edac_a10_probe(struct platform_device *pdev) · line 1627
Quoted 11 lines
drivers/edac/altera_edac.c +3
-1@@ -1589,7 +1619,9 @@ static int altr_edac_a10_probe(struct platform_device *pdev)else if ((of_device_is_compatible (child,"altr,socfpga-a10-ocram-ecc" )) || (of_device_is_compatible (child, -"altr,socfpga-eth-mac-ecc" ))) +"altr,socfpga-eth-mac-ecc" )) || + (of_device_is_compatible (child, +"altr,socfpga-nand-ecc" )))altr_edac_a10_device_add (edac, child);else if (of_device_is_compatible (child,"altr,sdram-edac-a10" ))Can we simplify this loop like this?
for_each_child_of_node(pdev->dev.of_node, child) { if (!of_device_is_available(child)) continue; if (of_device_is_compatible(child, "altr,socfpga-a10-l2-ecc") || of_device_is_compatible(child, "altr,socfpga-a10-ocram-ecc") || of_device_is_compatible(child, "altr,socfpga-eth-mac-ecc") || of_device_is_compatible(child, "altr,socfpga-nand-ecc")) altr_edac_a10_device_add(edac, child); else if (of_device_is_compatible(child, "altr,sdram-edac-a10")) of_platform_populate(pdev->dev.of_node, altr_sdram_ctrl_of_match, NULL, &pdev->dev); }
Quoted 8 lines
I've merged the first "if" and subsequent "else if" because they all do
altr_edac_a10_device_add(edac, child)and added spacing for better readability.Look ok?
Or have I fatfingered it?
Yes, that's better. I was trying to stay within the 80 character limit but missed the if/else if improvement. Thanks, Boris!
Should I re-submit?
Thanks,
Thor
Borislav Petkov
maintainerRe: [PATCH 05/10] EDAC, altera: Add Arria10 NAND EDAC support
Quoted 4 lines · Thor Thayer
Yes, that's better. I was trying to stay within the 80 character limit but missed the if/else if improvement. Thanks, Boris!
Should I re-submit?
Nah, no need.
I'd only ask you to test the final result once I've pushed it out after the merge window is over.
Thanks.
Signature · 5 lines
Regards/Gruss,
Boris.
ECO tip #101: Trim your mails when you reply.
--PATCH 6/10 EDAC, altera: Add Arria10 DMA EDAC support
In reply to [email protected]From: Thor Thayer <[email protected]>
Add Altera Arria10 DMA FIFO memory EDAC support.
--- drivers/edac/Kconfig | 7 +++++++ drivers/edac/altera_edac.c | 34 +++++++++++++++++++++++++++++++++- 2 files changed, 40 insertions(+), 1 deletion(-)
drivers/edac/Kconfig +7 -0
@@ -405,6 +405,13 @@ config EDAC_ALTERA_NAND Support for error detection and correction on the Altera NAND FIFO Memory for Altera SoCs. +config EDAC_ALTERA_DMA + bool "Altera DMA FIFO ECC" + depends on EDAC_ALTERA=y && PL330_DMA=y + help + Support for error detection and correction on the + Altera DMA FIFO Memory for Altera SoCs. + config EDAC_SYNOPSYS tristate "Synopsys DDR Memory Controller" depends on EDAC_MM_EDAC && ARCH_ZYNQ
drivers/edac/altera_edac.c +33 -1
@@ -1312,6 +1312,33 @@ early_initcall(socfpga_init_nand_ecc);#endif /* CONFIG_EDAC_ALTERA_NAND */ +/********************** DMA Device Functions **********************/ + +#ifdef CONFIG_EDAC_ALTERA_DMA + +static const struct edac_device_prv_data a10_dmaecc_data = { + .setup = altr_check_ecc_deps, + .ce_clear_mask =ALTR_A10_ECC_SERRPENA , + .ue_clear_mask =ALTR_A10_ECC_DERRPENA , + .dbgfs_name ="altr_trigger" , + .ecc_enable_mask =ALTR_A10_COMMON_ECC_EN_CTL , + .ecc_en_ofst =ALTR_A10_ECC_CTRL_OFST , + .ce_set_mask =ALTR_A10_ECC_TSERRA , + .ue_set_mask =ALTR_A10_ECC_TDERRA , + .set_err_ofst =ALTR_A10_ECC_INTTEST_OFST , + .ecc_irq_handler = altr_edac_a10_ecc_irq, + .inject_fops = &altr_edac_a10_device_inject_fops, +}; + +static int __init socfpga_init_dma_ecc (void ) +{ +return altr_init_a10_ecc_device_type ("altr,socfpga-dma-ecc" ); +} + +early_initcall (socfpga_init_dma_ecc); + +#endif /* CONFIG_EDAC_ALTERA_DMA */ +/********************* Arria10 EDAC Device Functions *************************/ static const struct of_device_id altr_edac_a10_device_of_match[] = { #ifdef CONFIG_EDAC_ALTERA_L2C
@@ -1328,6 +1355,9 @@ static const struct of_device_id altr_edac_a10_device_of_match[] = { #ifdef CONFIG_EDAC_ALTERA_NAND { .compatible = "altr,socfpga-nand-ecc", .data = &a10_nandecc_data }, #endif +#ifdef CONFIG_EDAC_ALTERA_DMA + { .compatible = "altr,socfpga-dma-ecc", .data = &a10_dmaecc_data }, +#endif {}, }; MODULE_DEVICE_TABLE(of, altr_edac_a10_device_of_match);
@@ -1621,7 +1651,9 @@ static int altr_edac_a10_probe(struct platform_device *pdev) (of_device_is_compatible(child, "altr,socfpga-eth-mac-ecc")) || (of_device_is_compatible(child, - "altr,socfpga-nand-ecc"))) + "altr,socfpga-nand-ecc")) || + (of_device_is_compatible(child, + "altr,socfpga-dma-ecc")))altr_edac_a10_device_add (edac, child); else if (of_device_is_compatible(child, "altr,sdram-edac-a10"))
Signature · 1 line
1.7.9.5
PATCH 7/10 EDAC, altera: Add Arria10 USB EDAC support
In reply to [email protected]From: Thor Thayer <[email protected]>
Add Altera Arria10 USB FIFO memory EDAC support.
--- drivers/edac/Kconfig | 7 +++++++ drivers/edac/altera_edac.c | 34 +++++++++++++++++++++++++++++++++- 2 files changed, 40 insertions(+), 1 deletion(-)
drivers/edac/Kconfig +7 -0
@@ -412,6 +412,13 @@ config EDAC_ALTERA_DMA Support for error detection and correction on the Altera DMA FIFO Memory for Altera SoCs. +config EDAC_ALTERA_USB + bool "Altera USB FIFO ECC" + depends on EDAC_ALTERA=y && USB_DWC2 + help + Support for error detection and correction on the + Altera USB FIFO Memory for Altera SoCs. + config EDAC_SYNOPSYS tristate "Synopsys DDR Memory Controller" depends on EDAC_MM_EDAC && ARCH_ZYNQ
drivers/edac/altera_edac.c +33 -1
@@ -1339,6 +1339,33 @@ early_initcall(socfpga_init_dma_ecc);#endif /* CONFIG_EDAC_ALTERA_DMA */ +/********************** USB Device Functions **********************/ + +#ifdef CONFIG_EDAC_ALTERA_USB + +static const struct edac_device_prv_data a10_usbecc_data = { + .setup = altr_check_ecc_deps, + .ce_clear_mask =ALTR_A10_ECC_SERRPENA , + .ue_clear_mask =ALTR_A10_ECC_DERRPENA , + .dbgfs_name ="altr_trigger" , + .ecc_enable_mask =ALTR_A10_COMMON_ECC_EN_CTL , + .ecc_en_ofst =ALTR_A10_ECC_CTRL_OFST , + .ce_set_mask =ALTR_A10_ECC_TSERRA , + .ue_set_mask =ALTR_A10_ECC_TDERRA , + .set_err_ofst =ALTR_A10_ECC_INTTEST_OFST , + .ecc_irq_handler = altr_edac_a10_ecc_irq, + .inject_fops = &altr_edac_a10_device_inject_fops, +}; + +static int __init socfpga_init_usb_ecc (void ) +{ +return altr_init_a10_ecc_device_type ("altr,socfpga-usb-ecc" ); +} + +early_initcall (socfpga_init_usb_ecc); + +#endif /* CONFIG_EDAC_ALTERA_USB */ +/********************* Arria10 EDAC Device Functions *************************/ static const struct of_device_id altr_edac_a10_device_of_match[] = { #ifdef CONFIG_EDAC_ALTERA_L2C
@@ -1358,6 +1385,9 @@ static const struct of_device_id altr_edac_a10_device_of_match[] = { #ifdef CONFIG_EDAC_ALTERA_DMA { .compatible = "altr,socfpga-dma-ecc", .data = &a10_dmaecc_data }, #endif +#ifdef CONFIG_EDAC_ALTERA_USB + { .compatible = "altr,socfpga-usb-ecc", .data = &a10_usbecc_data }, +#endif {}, }; MODULE_DEVICE_TABLE(of, altr_edac_a10_device_of_match);
@@ -1653,7 +1683,9 @@ static int altr_edac_a10_probe(struct platform_device *pdev) (of_device_is_compatible(child, "altr,socfpga-nand-ecc")) || (of_device_is_compatible(child, - "altr,socfpga-dma-ecc"))) + "altr,socfpga-dma-ecc")) || + (of_device_is_compatible(child, + "altr,socfpga-usb-ecc")))altr_edac_a10_device_add (edac, child); else if (of_device_is_compatible(child, "altr,sdram-edac-a10"))
Signature · 1 line
1.7.9.5
PATCH 8/10 EDAC, altera: Add Arria10 QSPI EDAC support
In reply to [email protected]From: Thor Thayer <[email protected]>
Add Altera Arria10 QSPI FIFO memory EDAC support.
--- drivers/edac/Kconfig | 7 +++++++ drivers/edac/altera_edac.c | 34 +++++++++++++++++++++++++++++++++- 2 files changed, 40 insertions(+), 1 deletion(-)
drivers/edac/Kconfig +7 -0
@@ -419,6 +419,13 @@ config EDAC_ALTERA_USB Support for error detection and correction on the Altera USB FIFO Memory for Altera SoCs. +config EDAC_ALTERA_QSPI + bool "Altera QSPI FIFO ECC" + depends on EDAC_ALTERA=y && SPI_CADENCE_QUADSPI + help + Support for error detection and correction on the + Altera QSPI FIFO Memory for Altera SoCs. + config EDAC_SYNOPSYS tristate "Synopsys DDR Memory Controller" depends on EDAC_MM_EDAC && ARCH_ZYNQ
drivers/edac/altera_edac.c +33 -1
@@ -1366,6 +1366,33 @@ early_initcall(socfpga_init_usb_ecc);#endif /* CONFIG_EDAC_ALTERA_USB */ +/********************** QSPI Device Functions **********************/ + +#ifdef CONFIG_EDAC_ALTERA_QSPI + +static const struct edac_device_prv_data a10_qspiecc_data = { + .setup = altr_check_ecc_deps, + .ce_clear_mask =ALTR_A10_ECC_SERRPENA , + .ue_clear_mask =ALTR_A10_ECC_DERRPENA , + .dbgfs_name ="altr_trigger" , + .ecc_enable_mask =ALTR_A10_COMMON_ECC_EN_CTL , + .ecc_en_ofst =ALTR_A10_ECC_CTRL_OFST , + .ce_set_mask =ALTR_A10_ECC_TSERRA , + .ue_set_mask =ALTR_A10_ECC_TDERRA , + .set_err_ofst =ALTR_A10_ECC_INTTEST_OFST , + .ecc_irq_handler = altr_edac_a10_ecc_irq, + .inject_fops = &altr_edac_a10_device_inject_fops, +}; + +static int __init socfpga_init_qspi_ecc (void ) +{ +return altr_init_a10_ecc_device_type ("altr,socfpga-qspi-ecc" ); +} + +early_initcall (socfpga_init_qspi_ecc); + +#endif /* CONFIG_EDAC_ALTERA_QSPI */ +/********************* Arria10 EDAC Device Functions *************************/ static const struct of_device_id altr_edac_a10_device_of_match[] = { #ifdef CONFIG_EDAC_ALTERA_L2C
@@ -1388,6 +1415,9 @@ static const struct of_device_id altr_edac_a10_device_of_match[] = { #ifdef CONFIG_EDAC_ALTERA_USB { .compatible = "altr,socfpga-usb-ecc", .data = &a10_usbecc_data }, #endif +#ifdef CONFIG_EDAC_ALTERA_QSPI + { .compatible = "altr,socfpga-qspi-ecc", .data = &a10_qspiecc_data }, +#endif {}, }; MODULE_DEVICE_TABLE(of, altr_edac_a10_device_of_match);
@@ -1685,7 +1715,9 @@ static int altr_edac_a10_probe(struct platform_device *pdev) (of_device_is_compatible(child, "altr,socfpga-dma-ecc")) || (of_device_is_compatible(child, - "altr,socfpga-usb-ecc"))) + "altr,socfpga-usb-ecc")) || + (of_device_is_compatible(child, + "altr,socfpga-qspi-ecc")))altr_edac_a10_device_add (edac, child); else if (of_device_is_compatible(child, "altr,sdram-edac-a10"))
Signature · 1 line
1.7.9.5
PATCH 9/10 ARM: dts: Add Arria10 DMA EDAC devicetree entry
In reply to [email protected]From: Thor Thayer <[email protected]>
Add the device tree entries needed to support the Altera DMA FIFO buffer EDAC on the Arria10 chip.
--- arch/arm/boot/dts/socfpga_arria10.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+)
arch/arm/boot/dts/socfpga_arria10.dtsi +8 -0
@@ -644,6 +644,14 @@ interrupts = <5 IRQ_TYPE_LEVEL_HIGH>, <37 IRQ_TYPE_LEVEL_HIGH>; }; + + dma-ecc at ff8c8000 { + compatible = "altr,socfpga-dma-ecc"; + reg = <0xff8c8000 0x400>; + altr,ecc-parent = <&pdma>; + interrupts = <10 IRQ_TYPE_LEVEL_HIGH>, + <42 IRQ_TYPE_LEVEL_HIGH>; + }; }; rst: rstmgr at ffd05000 {
Signature · 1 line
1.7.9.5
Re: [PATCH 09/10] ARM: dts: Add Arria10 DMA EDAC devicetree entry
Quoted 20 lines · tthayer at opensource.altera.com
From: Thor Thayer <[email protected]>
Add the device tree entries needed to support the Altera DMA FIFO buffer EDAC on the Arria10 chip.
Signed-off-by Thor Thayer <[email protected]>--- arch/arm/boot/dts/socfpga_arria10.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+)arch/arm/boot/dts/socfpga_arria10.dtsi +1
-0@@ -644,6 +644,14 @@ interrupts = <5 IRQ_TYPE_LEVEL_HIGH>, <37 IRQ_TYPE_LEVEL_HIGH>; }; +
arch/arm/boot/dts/socfpga_arria10.dtsi line 657
Quoted 10 lines
arch/arm/boot/dts/socfpga_arria10.dtsi +7
-0+ dma-ecc at ff8c8000 { + compatible = "altr,socfpga-dma-ecc"; + reg = <0xff8c8000 0x400>; + altr,ecc-parent = <&pdma>; + interrupts = <10 IRQ_TYPE_LEVEL_HIGH>, + <42 IRQ_TYPE_LEVEL_HIGH>; + }; }; rst: rstmgr at ffd05000 {
Dinh
PATCH 10/10 ARM: dts: Add Arria10 USB EDAC devicetree entry
In reply to [email protected]From: Thor Thayer <[email protected]>
Add the device tree entries needed to support the Altera USB FIFO buffer EDAC on the Arria10 chip.
--- arch/arm/boot/dts/socfpga_arria10.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+)
arch/arm/boot/dts/socfpga_arria10.dtsi +8 -0
@@ -652,6 +652,14 @@ interrupts = <10 IRQ_TYPE_LEVEL_HIGH>, <42 IRQ_TYPE_LEVEL_HIGH>; }; + + usb0-ecc at ff8c8800 { + compatible = "altr,socfpga-usb-ecc"; + reg = <0xff8c8800 0x400>; + altr,ecc-parent = <&usb0>; + interrupts = <2 IRQ_TYPE_LEVEL_HIGH>, + <34 IRQ_TYPE_LEVEL_HIGH>; + }; }; rst: rstmgr at ffd05000 {
Signature · 1 line
1.7.9.5
Re: [PATCH 10/10] ARM: dts: Add Arria10 USB EDAC devicetree entry
Quoted 20 lines · tthayer at opensource.altera.com
From: Thor Thayer <[email protected]>
Add the device tree entries needed to support the Altera USB FIFO buffer EDAC on the Arria10 chip.
Signed-off-by Thor Thayer <[email protected]>--- arch/arm/boot/dts/socfpga_arria10.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+)arch/arm/boot/dts/socfpga_arria10.dtsi +1
-0@@ -652,6 +652,14 @@ interrupts = <10 IRQ_TYPE_LEVEL_HIGH>, <42 IRQ_TYPE_LEVEL_HIGH>; }; +
arch/arm/boot/dts/socfpga_arria10.dtsi line 665
Quoted 10 lines
arch/arm/boot/dts/socfpga_arria10.dtsi +7
-0+ usb0-ecc at ff8c8800 { + compatible = "altr,socfpga-usb-ecc"; + reg = <0xff8c8800 0x400>; + altr,ecc-parent = <&usb0>; + interrupts = <2 IRQ_TYPE_LEVEL_HIGH>, + <34 IRQ_TYPE_LEVEL_HIGH>; + }; }; rst: rstmgr at ffd05000 {
Dinh
Borislav Petkov
maintainerQuoted 16 lines · tthayer at opensource.altera.com
From: Thor Thayer <[email protected]>
This patch series adds the NAND, DMA, USB and QSPI FIFO EDAC modules.
Thor Thayer (10):
Documentation: dt: socfpga: Add Arria10 NAND EDAC binding
Documentation: dt: socfpga: Add Arria10 DMA EDAC binding
Documentation: dt: socfpga: Add Arria10 USB EDAC binding
Documentation: dt: socfpga: Add Arria10 QSPI EDAC binding EDAC, altera: Add Arria10 NAND EDAC support EDAC, altera: Add Arria10 DMA EDAC support
EDAC, altera: Add Arria10 USB EDAC support
EDAC, altera: Add Arria10 QSPI EDAC support
ARM: dts: Add Arria10 DMA EDAC devicetree entry
ARM: dts: Add Arria10 USB EDAC devicetree entry
Quoted 5 lines
.../bindings/arm/altera/socfpga-eccmgr.txt | 79 ++++++++++++ arch/arm/boot/dts/socfpga_arria10.dtsi | 16 +++ drivers/edac/Kconfig | 28 +++++ drivers/edac/altera_edac.c | 130 +++++++++++++++++++- 4 files changed, 252 insertions(+), 1 deletion(-)
All applied, thanks!
Signature · 5 lines
Regards/Gruss,
Boris.
ECO tip #101: Trim your mails when you reply.
--