From: yadi.hu@windriver.com (yhu2)
To: linux-arm-kernel@lists.infradead.org
Subject: zynq-edac reports error
Date: Fri, 5 Dec 2014 13:02:58 +0800 [thread overview]
Message-ID: <54813C82.4060204@windriver.com> (raw)
We see the following error printout from kernel:
[2000-01-01 00:00:05.365891] ERROR: xmu03 kernel:[ 5.828996] zynq-edac
f8006000.ps7-ddrc: ecc not enabled
We don't use ECC so the printout is valid. However, it should not be an
ERROR priority on this. The edac driver should
look at the "xlnx,has-ecc" property and take appropriate action.
Any comments would be appreciated!
---
drivers/edac/zynq_edac.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/edac/zynq_edac.c b/drivers/edac/zynq_edac.c
index 2b7635f..cec3203 100644
--- a/drivers/edac/zynq_edac.c
+++ b/drivers/edac/zynq_edac.c
@@ -19,6 +19,7 @@
*/
#include <linux/edac.h>
+#include <linux/of.h>
#include <linux/module.h>
#include <linux/platform_device.h>
@@ -507,6 +508,16 @@ static int zynq_edac_mc_probe(struct
platform_device *pdev)
int rc;
struct resource *res;
void __iomem *baseaddr;
+ struct device_node *np = pdev->dev.of_node;
+ u32 *edac_enable;
+
+ if (!np || !of_device_is_available(np))
+ return -ENODEV;
+
+ edac_enable = (u32 *)of_get_property(np, "xlnx,has-ecc", NULL);
+ if (!edac_enable || !(*edac_enable))/* property has-ecc disenabled
or no exist */
+ return -ENODEV;
+
/* Get the data from the platform device */
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
--
1.8.5.2.233.g932f7e4
next reply other threads:[~2014-12-05 5:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-05 5:02 yhu2 [this message]
2014-12-05 8:20 ` zynq-edac reports error Michal Simek
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=54813C82.4060204@windriver.com \
--to=yadi.hu@windriver.com \
--cc=linux-arm-kernel@lists.infradead.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.