All of lore.kernel.org
 help / color / mirror / Atom feed
From: thor.thayer@linux.intel.com
To: bp@alien8.de, dinguyen@kernel.org, robh+dt@kernel.org,
	mark.rutland@arm.com, mchehab@kernel.org
Cc: thor.thayer@linux.intel.com, devicetree@vger.kernel.org,
	linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCHv2,5/5] EDAC, altera: Remove Stratix10 Machine compatible check
Date: Wed, 27 Feb 2019 11:27:25 -0600	[thread overview]
Message-ID: <1551288445-22335-6-git-send-email-thor.thayer@linux.intel.com> (raw)

From: Thor Thayer <thor.thayer@linux.intel.com>

Replace the Stratix10 Machine compatible check with
specific ECC block compatible tests.

Signed-off-by: Thor Thayer <thor.thayer@linux.intel.com>
---
v2 New patch
---
 drivers/edac/altera_edac.c | 18 +++++-------------
 1 file changed, 5 insertions(+), 13 deletions(-)

diff --git a/drivers/edac/altera_edac.c b/drivers/edac/altera_edac.c
index a92259d8afdc..3ff222a0c852 100644
--- a/drivers/edac/altera_edac.c
+++ b/drivers/edac/altera_edac.c
@@ -1013,11 +1013,6 @@ static int socfpga_is_a10(void)
 	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
 altr_init_a10_ecc_block(struct device_node *np, u32 irq_mask,
 			u32 ecc_ctrl_en_mask, bool dual_port)
@@ -1122,13 +1117,14 @@ static int __init __maybe_unused altr_init_a10_ecc_device_type(char *compat)
 	int irq;
 	struct device_node *child, *np;
 
-	if (!socfpga_is_a10() && !socfpga_is_s10())
-		return -ENODEV;
-
 	np = of_find_compatible_node(NULL, NULL,
 				     "altr,socfpga-a10-ecc-manager");
 	if (!np) {
-		edac_printk(KERN_ERR, EDAC_DEVICE, "ECC Manager not found\n");
+		/* Error only valid for Arria10 and Stratix10 */
+		if (!of_find_compatible_node(NULL, NULL,
+					     "altr,socfpga-ecc-manager"))
+			edac_printk(KERN_ERR, EDAC_DEVICE,
+				    "ECC Manager not found\n");
 		return -ENODEV;
 	}
 
@@ -1644,12 +1640,8 @@ static int __init socfpga_init_sdmmc_ecc(void)
 	int rc = -ENODEV;
 	struct device_node *child;
 
-	if (!socfpga_is_a10() && !socfpga_is_s10())
-		return -ENODEV;
-
 	child = of_find_compatible_node(NULL, NULL, "altr,socfpga-sdmmc-ecc");
 	if (!child) {
-		edac_printk(KERN_WARNING, EDAC_DEVICE, "SDMMC node not found\n");
 		return -ENODEV;
 	}
 

WARNING: multiple messages have this Message-ID (diff)
From: thor.thayer@linux.intel.com
To: bp@alien8.de, dinguyen@kernel.org, robh+dt@kernel.org,
	mark.rutland@arm.com, mchehab@kernel.org
Cc: thor.thayer@linux.intel.com, devicetree@vger.kernel.org,
	linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCHv2 5/5] EDAC, altera: Remove Stratix10 Machine compatible check
Date: Wed, 27 Feb 2019 11:27:25 -0600	[thread overview]
Message-ID: <1551288445-22335-6-git-send-email-thor.thayer@linux.intel.com> (raw)
In-Reply-To: <1551288445-22335-1-git-send-email-thor.thayer@linux.intel.com>

From: Thor Thayer <thor.thayer@linux.intel.com>

Replace the Stratix10 Machine compatible check with
specific ECC block compatible tests.

Signed-off-by: Thor Thayer <thor.thayer@linux.intel.com>
---
v2 New patch
---
 drivers/edac/altera_edac.c | 18 +++++-------------
 1 file changed, 5 insertions(+), 13 deletions(-)

diff --git a/drivers/edac/altera_edac.c b/drivers/edac/altera_edac.c
index a92259d8afdc..3ff222a0c852 100644
--- a/drivers/edac/altera_edac.c
+++ b/drivers/edac/altera_edac.c
@@ -1013,11 +1013,6 @@ static int socfpga_is_a10(void)
 	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
 altr_init_a10_ecc_block(struct device_node *np, u32 irq_mask,
 			u32 ecc_ctrl_en_mask, bool dual_port)
@@ -1122,13 +1117,14 @@ static int __init __maybe_unused altr_init_a10_ecc_device_type(char *compat)
 	int irq;
 	struct device_node *child, *np;
 
-	if (!socfpga_is_a10() && !socfpga_is_s10())
-		return -ENODEV;
-
 	np = of_find_compatible_node(NULL, NULL,
 				     "altr,socfpga-a10-ecc-manager");
 	if (!np) {
-		edac_printk(KERN_ERR, EDAC_DEVICE, "ECC Manager not found\n");
+		/* Error only valid for Arria10 and Stratix10 */
+		if (!of_find_compatible_node(NULL, NULL,
+					     "altr,socfpga-ecc-manager"))
+			edac_printk(KERN_ERR, EDAC_DEVICE,
+				    "ECC Manager not found\n");
 		return -ENODEV;
 	}
 
@@ -1644,12 +1640,8 @@ static int __init socfpga_init_sdmmc_ecc(void)
 	int rc = -ENODEV;
 	struct device_node *child;
 
-	if (!socfpga_is_a10() && !socfpga_is_s10())
-		return -ENODEV;
-
 	child = of_find_compatible_node(NULL, NULL, "altr,socfpga-sdmmc-ecc");
 	if (!child) {
-		edac_printk(KERN_WARNING, EDAC_DEVICE, "SDMMC node not found\n");
 		return -ENODEV;
 	}
 
-- 
2.7.4

             reply	other threads:[~2019-02-27 17:27 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-27 17:27 thor.thayer [this message]
2019-02-27 17:27 ` [PATCHv2 5/5] EDAC, altera: Remove Stratix10 Machine compatible check thor.thayer
  -- strict thread matches above, loose matches on Subject: below --
2019-03-15 16:24 [PATCHv2,2/5] Documentation: dt: edac: Add Stratix10 Peripheral bindings thor.thayer
2019-03-15 16:24 ` [PATCHv2 2/5] " Thor Thayer
2019-03-13 19:23 [PATCHv2,1/5] Documentation: dt: edac: Fix Stratix10 IRQ bindings Rob Herring
2019-03-13 19:23 ` [PATCHv2 1/5] " Rob Herring
2019-03-13 19:20 [PATCHv2,2/5] Documentation: dt: edac: Add Stratix10 Peripheral bindings Rob Herring
2019-03-13 19:20 ` [PATCHv2 2/5] " Rob Herring
2019-03-12 19:30 [PATCHv2,2/5] " thor.thayer
2019-03-12 19:30 ` [PATCHv2 2/5] " Thor Thayer
2019-03-12 19:15 [PATCHv2,1/5] Documentation: dt: edac: Fix Stratix10 IRQ bindings thor.thayer
2019-03-12 19:15 ` [PATCHv2 1/5] " Thor Thayer
2019-03-12 16:04 [PATCHv2,2/5] Documentation: dt: edac: Add Stratix10 Peripheral bindings Rob Herring
2019-03-12 16:04 ` [PATCHv2 2/5] " Rob Herring
2019-03-12 16:00 [PATCHv2,1/5] Documentation: dt: edac: Fix Stratix10 IRQ bindings Rob Herring
2019-03-12 16:00 ` [PATCHv2 1/5] " Rob Herring
2019-02-27 17:27 [PATCHv2,4/5] arm64: dts: stratix10: Use new Stratix10 EDAC bindings thor.thayer
2019-02-27 17:27 ` [PATCHv2 4/5] " thor.thayer
2019-02-27 17:27 [PATCHv2,3/5] EDAC, altera: Skip DB IRQ for Stratix10 thor.thayer
2019-02-27 17:27 ` [PATCHv2 3/5] " thor.thayer
2019-02-27 17:27 [PATCHv2,2/5] Documentation: dt: edac: Add Stratix10 Peripheral bindings thor.thayer
2019-02-27 17:27 ` [PATCHv2 2/5] " thor.thayer
2019-02-27 17:27 [PATCHv2,1/5] Documentation: dt: edac: Fix Stratix10 IRQ bindings thor.thayer
2019-02-27 17:27 ` [PATCHv2 1/5] " thor.thayer
2019-02-27 17:27 [PATCHv2 0/5] Update Stratix10 EDAC Bindings thor.thayer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1551288445-22335-6-git-send-email-thor.thayer@linux.intel.com \
    --to=thor.thayer@linux.intel.com \
    --cc=bp@alien8.de \
    --cc=devicetree@vger.kernel.org \
    --cc=dinguyen@kernel.org \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mchehab@kernel.org \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.