From: thor.thayer@linux.intel.com
To: bp@alien8.de, dinguyen@kernel.org, robh+dt@kernel.org,
mark.rutland@arm.com, mchehab@kernel.org, james.morse@arm.com
Cc: thor.thayer@linux.intel.com, devicetree@vger.kernel.org,
linux-edac@vger.kernel.org
Subject: [PATCHv2 3/4] EDAC, altera: Add Stratix10 OCRAM ECC support
Date: Tue, 22 Jan 2019 11:48:06 -0600 [thread overview]
Message-ID: <1548179287-21760-4-git-send-email-thor.thayer@linux.intel.com> (raw)
In-Reply-To: <1548179287-21760-1-git-send-email-thor.thayer@linux.intel.com>
From: Thor Thayer <thor.thayer@linux.intel.com>
Use the newer ECC error injection method for Arria10 and
Stratix10 OCRAM.
OCRAM can't call the common peripheral init routine since
OCRAM is being used. An OCRAM specific init routine ensures
the OCRAM ECC is setup without clearing memory.
Signed-off-by: Thor Thayer <thor.thayer@linux.intel.com>
---
v2 No changes
---
drivers/edac/altera_edac.c | 22 ++++++++++++++++++++--
1 file changed, 20 insertions(+), 2 deletions(-)
diff --git a/drivers/edac/altera_edac.c b/drivers/edac/altera_edac.c
index 56af98d18645..6a8993e6a278 100644
--- a/drivers/edac/altera_edac.c
+++ b/drivers/edac/altera_edac.c
@@ -1216,8 +1216,26 @@ static const struct edac_device_prv_data ocramecc_data = {
.inject_fops = &altr_edac_device_inject_fops,
};
+static int __maybe_unused
+altr_a10_check_ecc_deps_init(struct altr_edac_device_dev *device)
+{
+ void __iomem *base = device->base;
+ int ret;
+
+ ret = altr_check_ecc_deps(device);
+ if (ret)
+ return ret;
+
+ /* Enable IRQ on Single Bit Error */
+ writel(ALTR_A10_ECC_SERRINTEN, (base + ALTR_A10_ECC_ERRINTENS_OFST));
+ /* Ensure all writes complete */
+ wmb();
+
+ return 0;
+}
+
static const struct edac_device_prv_data a10_ocramecc_data = {
- .setup = altr_check_ecc_deps,
+ .setup = altr_a10_check_ecc_deps_init,
.ce_clear_mask = ALTR_A10_ECC_SERRPENA,
.ue_clear_mask = ALTR_A10_ECC_DERRPENA,
.irq_status_mask = A10_SYSMGR_ECC_INTSTAT_OCRAM,
@@ -1227,7 +1245,7 @@ static const struct edac_device_prv_data a10_ocramecc_data = {
.ue_set_mask = ALTR_A10_ECC_TDERRA,
.set_err_ofst = ALTR_A10_ECC_INTTEST_OFST,
.ecc_irq_handler = altr_edac_a10_ecc_irq,
- .inject_fops = &altr_edac_a10_device_inject_fops,
+ .inject_fops = &altr_edac_a10_device_inject2_fops,
/*
* OCRAM panic on uncorrectable error because sleep/resume
* functions and FPGA contents are stored in OCRAM. Prefer
--
2.7.4
next prev parent reply other threads:[~2019-01-22 17:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-22 17:48 [PATCHv2 0/4] Stratix10 EDAC Improvements thor.thayer
2019-01-22 17:48 ` [PATCHv2 1/4] EDAC, altera: Fix S10 persistent register offset thor.thayer
2019-01-22 17:48 ` [PATCHv2 2/4] EDAC, altera: Less Intrusive Error Injection thor.thayer
2019-01-22 17:48 ` thor.thayer [this message]
2019-01-22 17:48 ` [PATCHv2 4/4] arm64: dts: stratix10: Add OCRAM EDAC node thor.thayer
2019-01-23 16:56 ` Dinh Nguyen
2019-01-24 15:42 ` Thor Thayer
2019-01-23 12:22 ` [PATCHv2 0/4] Stratix10 EDAC Improvements Borislav Petkov
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=1548179287-21760-4-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=james.morse@arm.com \
--cc=linux-edac@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 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).