Skip to content

Commit 08a260d

Browse files
tthayer-intelsuryasaimadhu
authored andcommitted
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: James Morse <james.morse@arm.com> Signed-off-by: Thor Thayer <thor.thayer@linux.intel.com> Signed-off-by: Borislav 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
1 parent 56d9e7b commit 08a260d

1 file changed

Lines changed: 1 addition & 20 deletions

File tree

drivers/edac/altera_edac.c

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1014,11 +1014,6 @@ static int socfpga_is_a10(void)
10141014
return of_machine_is_compatible("altr,socfpga-arria10");
10151015
}
10161016

1017-
static int socfpga_is_s10(void)
1018-
{
1019-
return of_machine_is_compatible("altr,socfpga-stratix10");
1020-
}
1021-
10221017
static __init int __maybe_unused
10231018
altr_init_a10_ecc_block(struct device_node *np, u32 irq_mask,
10241019
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)
11261121
int irq;
11271122
struct device_node *child, *np;
11281123

1129-
if (!socfpga_is_a10() && !socfpga_is_s10())
1130-
return -ENODEV;
1131-
11321124
np = of_find_compatible_node(NULL, NULL,
11331125
"altr,socfpga-a10-ecc-manager");
11341126
if (!np) {
@@ -2271,18 +2263,7 @@ static int altr_edac_a10_probe(struct platform_device *pdev)
22712263
if (!of_device_is_available(child))
22722264
continue;
22732265

2274-
if (of_device_is_compatible(child, "altr,socfpga-a10-l2-ecc") ||
2275-
of_device_is_compatible(child, "altr,socfpga-a10-ocram-ecc") ||
2276-
of_device_is_compatible(child, "altr,socfpga-eth-mac-ecc") ||
2277-
of_device_is_compatible(child, "altr,socfpga-nand-ecc") ||
2278-
of_device_is_compatible(child, "altr,socfpga-dma-ecc") ||
2279-
of_device_is_compatible(child, "altr,socfpga-usb-ecc") ||
2280-
of_device_is_compatible(child, "altr,socfpga-qspi-ecc") ||
2281-
#ifdef CONFIG_EDAC_ALTERA_SDRAM
2282-
of_device_is_compatible(child, "altr,sdram-edac-s10") ||
2283-
#endif
2284-
of_device_is_compatible(child, "altr,socfpga-sdmmc-ecc"))
2285-
2266+
if (of_match_node(altr_edac_a10_device_of_match, child))
22862267
altr_edac_a10_device_add(edac, child);
22872268

22882269
#ifdef CONFIG_EDAC_ALTERA_SDRAM

0 commit comments

Comments
 (0)