Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

authored by

Thor Thayer and committed by
Borislav Petkov
08a260d9 56d9e7bd

+1 -20
+1 -20
drivers/edac/altera_edac.c
··· 1014 1014 return of_machine_is_compatible("altr,socfpga-arria10"); 1015 1015 } 1016 1016 1017 - static int socfpga_is_s10(void) 1018 - { 1019 - return of_machine_is_compatible("altr,socfpga-stratix10"); 1020 - } 1021 - 1022 1017 static __init int __maybe_unused 1023 1018 altr_init_a10_ecc_block(struct device_node *np, u32 irq_mask, 1024 1019 u32 ecc_ctrl_en_mask, bool dual_port) ··· 1120 1125 { 1121 1126 int irq; 1122 1127 struct device_node *child, *np; 1123 - 1124 - if (!socfpga_is_a10() && !socfpga_is_s10()) 1125 - return -ENODEV; 1126 1128 1127 1129 np = of_find_compatible_node(NULL, NULL, 1128 1130 "altr,socfpga-a10-ecc-manager"); ··· 2263 2271 if (!of_device_is_available(child)) 2264 2272 continue; 2265 2273 2266 - if (of_device_is_compatible(child, "altr,socfpga-a10-l2-ecc") || 2267 - of_device_is_compatible(child, "altr,socfpga-a10-ocram-ecc") || 2268 - of_device_is_compatible(child, "altr,socfpga-eth-mac-ecc") || 2269 - of_device_is_compatible(child, "altr,socfpga-nand-ecc") || 2270 - of_device_is_compatible(child, "altr,socfpga-dma-ecc") || 2271 - of_device_is_compatible(child, "altr,socfpga-usb-ecc") || 2272 - of_device_is_compatible(child, "altr,socfpga-qspi-ecc") || 2273 - #ifdef CONFIG_EDAC_ALTERA_SDRAM 2274 - of_device_is_compatible(child, "altr,sdram-edac-s10") || 2275 - #endif 2276 - of_device_is_compatible(child, "altr,socfpga-sdmmc-ecc")) 2277 - 2274 + if (of_match_node(altr_edac_a10_device_of_match, child)) 2278 2275 altr_edac_a10_device_add(edac, child); 2279 2276 2280 2277 #ifdef CONFIG_EDAC_ALTERA_SDRAM