Commit 08a260d9 authored by Thor Thayer's avatar Thor Thayer Committed by Borislav Petkov

EDAC/altera: Cleanup the ECC Manager

Cleanup the ECC Manager peripheral test in probe function as suggested
by James. Remove the check for Stratix10.
Suggested-by: default avatarJames Morse <james.morse@arm.com>
Signed-off-by: default avatarThor Thayer <thor.thayer@linux.intel.com>
Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
Cc: linux-edac <linux-edac@vger.kernel.org>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: Robert Richter <rrichter@marvell.com>
Cc: Tony Luck <tony.luck@intel.com>
Link: https://lkml.kernel.org/r/1573156890-26891-2-git-send-email-thor.thayer@linux.intel.com
parent 56d9e7bd
...@@ -1014,11 +1014,6 @@ static int socfpga_is_a10(void) ...@@ -1014,11 +1014,6 @@ static int socfpga_is_a10(void)
return of_machine_is_compatible("altr,socfpga-arria10"); return of_machine_is_compatible("altr,socfpga-arria10");
} }
static int socfpga_is_s10(void)
{
return of_machine_is_compatible("altr,socfpga-stratix10");
}
static __init int __maybe_unused static __init int __maybe_unused
altr_init_a10_ecc_block(struct device_node *np, u32 irq_mask, altr_init_a10_ecc_block(struct device_node *np, u32 irq_mask,
u32 ecc_ctrl_en_mask, bool dual_port) u32 ecc_ctrl_en_mask, bool dual_port)
...@@ -1126,9 +1121,6 @@ static int __init __maybe_unused altr_init_a10_ecc_device_type(char *compat) ...@@ -1126,9 +1121,6 @@ static int __init __maybe_unused altr_init_a10_ecc_device_type(char *compat)
int irq; int irq;
struct device_node *child, *np; struct device_node *child, *np;
if (!socfpga_is_a10() && !socfpga_is_s10())
return -ENODEV;
np = of_find_compatible_node(NULL, NULL, np = of_find_compatible_node(NULL, NULL,
"altr,socfpga-a10-ecc-manager"); "altr,socfpga-a10-ecc-manager");
if (!np) { if (!np) {
...@@ -2271,18 +2263,7 @@ static int altr_edac_a10_probe(struct platform_device *pdev) ...@@ -2271,18 +2263,7 @@ static int altr_edac_a10_probe(struct platform_device *pdev)
if (!of_device_is_available(child)) if (!of_device_is_available(child))
continue; continue;
if (of_device_is_compatible(child, "altr,socfpga-a10-l2-ecc") || if (of_match_node(altr_edac_a10_device_of_match, child))
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") ||
of_device_is_compatible(child, "altr,socfpga-dma-ecc") ||
of_device_is_compatible(child, "altr,socfpga-usb-ecc") ||
of_device_is_compatible(child, "altr,socfpga-qspi-ecc") ||
#ifdef CONFIG_EDAC_ALTERA_SDRAM
of_device_is_compatible(child, "altr,sdram-edac-s10") ||
#endif
of_device_is_compatible(child, "altr,socfpga-sdmmc-ecc"))
altr_edac_a10_device_add(edac, child); altr_edac_a10_device_add(edac, child);
#ifdef CONFIG_EDAC_ALTERA_SDRAM #ifdef CONFIG_EDAC_ALTERA_SDRAM
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment