linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* zynq-edac reports error
@ 2014-12-05  5:02 yhu2
  2014-12-05  8:20 ` Michal Simek
  0 siblings, 1 reply; 2+ messages in thread
From: yhu2 @ 2014-12-05  5:02 UTC (permalink / raw)
  To: linux-arm-kernel

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* zynq-edac reports error
  2014-12-05  5:02 zynq-edac reports error yhu2
@ 2014-12-05  8:20 ` Michal Simek
  0 siblings, 0 replies; 2+ messages in thread
From: Michal Simek @ 2014-12-05  8:20 UTC (permalink / raw)
  To: linux-arm-kernel

On 12/05/2014 06:02 AM, yhu2 wrote:
> 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(+)

This driver is out of mainline that's why you shouldn't CC arm mailing list.
Will reply privately.

Thanks,
Michal

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-12-05  8:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-05  5:02 zynq-edac reports error yhu2
2014-12-05  8:20 ` Michal Simek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).