EDAC/synopsys: Use the quirk for version instead of ddr version
authorDinh Nguyen <dinguyen@kernel.org>
Tue, 12 Oct 2021 19:07:06 +0000 (14:07 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jan 2022 09:54:11 +0000 (10:54 +0100)
[ Upstream commit bd1d6da17c296bd005bfa656952710d256e77dd3 ]

Version 2.40a supports DDR_ECC_INTR_SUPPORT for a quirk, so use that
quirk to determine a call to setup_address_map().

Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Michal Simek <michal.simek@xilinx.com>
Link: https://lkml.kernel.org/r/20211012190709.1504152-1-dinguyen@kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/edac/synopsys_edac.c

index 1a801a5d3b08b3c66bd117a6a55b7cf475992e0c..92906b56b1a2b9f64045fe2acacbed2b7a39fa7a 100644 (file)
@@ -1351,8 +1351,7 @@ static int mc_probe(struct platform_device *pdev)
                }
        }
 
-       if (of_device_is_compatible(pdev->dev.of_node,
-                                   "xlnx,zynqmp-ddrc-2.40a"))
+       if (priv->p_data->quirks & DDR_ECC_INTR_SUPPORT)
                setup_address_map(priv);
 #endif