]> www.infradead.org Git - users/willy/linux.git/commitdiff
EDAC: altera: merge ARCH_SOCFPGA and ARCH_STRATIX10
authorKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Thu, 11 Mar 2021 15:25:37 +0000 (16:25 +0100)
committerDinh Nguyen <dinguyen@kernel.org>
Tue, 23 Mar 2021 16:03:35 +0000 (11:03 -0500)
Simplify 32-bit and 64-bit Intel SoCFPGA Kconfig options by having only
one for both of them.  This the common practice for other platforms.
Additionally, the ARCH_SOCFPGA is too generic as SoCFPGA designs come
from multiple vendors.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
drivers/edac/Kconfig
drivers/edac/altera_edac.c

index 27d0c4cdc58d5204361044127965d5762c6c8f1b..1e836e320edd965cb0072596a8d9e35a8d699f88 100644 (file)
@@ -396,7 +396,7 @@ config EDAC_THUNDERX
 
 config EDAC_ALTERA
        bool "Altera SOCFPGA ECC"
-       depends on EDAC=y && (ARCH_SOCFPGA || ARCH_STRATIX10)
+       depends on EDAC=y && ARCH_INTEL_SOCFPGA
        help
          Support for error detection and correction on the
          Altera SOCs. This is the global enable for the
index e91cf1147a4e0f4740a65f39560c35bc5a5ecec0..5f7fd79ec82fc98f50b836b3c68a40fc1e14a481 100644 (file)
@@ -1501,8 +1501,13 @@ static int altr_portb_setup(struct altr_edac_device_dev *device)
        dci->mod_name = ecc_name;
        dci->dev_name = ecc_name;
 
-       /* Update the PortB IRQs - A10 has 4, S10 has 2, Index accordingly */
-#ifdef CONFIG_ARCH_STRATIX10
+       /*
+        * Update the PortB IRQs - A10 has 4, S10 has 2, Index accordingly
+        *
+        * FIXME: Instead of ifdefs with different architectures the driver
+        *        should properly use compatibles.
+        */
+#ifdef CONFIG_64BIT
        altdev->sb_irq = irq_of_parse_and_map(np, 1);
 #else
        altdev->sb_irq = irq_of_parse_and_map(np, 2);
@@ -1521,7 +1526,7 @@ static int altr_portb_setup(struct altr_edac_device_dev *device)
                goto err_release_group_1;
        }
 
-#ifdef CONFIG_ARCH_STRATIX10
+#ifdef CONFIG_64BIT
        /* Use IRQ to determine SError origin instead of assigning IRQ */
        rc = of_property_read_u32_index(np, "interrupts", 1, &altdev->db_irq);
        if (rc) {
@@ -1931,7 +1936,7 @@ static int altr_edac_a10_device_add(struct altr_arria10_edac *edac,
                goto err_release_group1;
        }
 
-#ifdef CONFIG_ARCH_STRATIX10
+#ifdef CONFIG_64BIT
        /* Use IRQ to determine SError origin instead of assigning IRQ */
        rc = of_property_read_u32_index(np, "interrupts", 0, &altdev->db_irq);
        if (rc) {
@@ -2016,7 +2021,7 @@ static const struct irq_domain_ops a10_eccmgr_ic_ops = {
 /************** Stratix 10 EDAC Double Bit Error Handler ************/
 #define to_a10edac(p, m) container_of(p, struct altr_arria10_edac, m)
 
-#ifdef CONFIG_ARCH_STRATIX10
+#ifdef CONFIG_64BIT
 /* panic routine issues reboot on non-zero panic_timeout */
 extern int panic_timeout;
 
@@ -2109,7 +2114,7 @@ static int altr_edac_a10_probe(struct platform_device *pdev)
                                         altr_edac_a10_irq_handler,
                                         edac);
 
-#ifdef CONFIG_ARCH_STRATIX10
+#ifdef CONFIG_64BIT
        {
                int dberror, err_addr;