From: thor.thayer at linux.intel.com <thor.thayer@linux.intel.com>
To: u-boot@lists.denx.de
Subject: [PATCHv2 2/2] ddr: socfpga: Enable ARM64 Non-Secure SDRAM ECC Access
Date: Fri, 6 Dec 2019 13:47:32 -0600 [thread overview]
Message-ID: <1575661652-25254-3-git-send-email-thor.thayer@linux.intel.com> (raw)
In-Reply-To: <1575661652-25254-1-git-send-email-thor.thayer@linux.intel.com>
From: Thor Thayer <thor.thayer@linux.intel.com>
The ECC registers in the SDRAM HMC Adapter should always
be accessible (both when ECC is enabled and disabled).
Currently, the registers are accessible only when ECC is enabled.
The ECC Enabled bit is used to determine the status of
ECC by later OSes so always allow access.
Signed-off-by: Thor Thayer <thor.thayer@linux.intel.com>
---
v2 New Patch. Rebase patch on top of pending patchset
[PATCH v8 00/19] Add Intel Agilex SoC support
https://patchwork.ozlabs.org/cover/1201373/
---
drivers/ddr/altera/sdram_agilex.c | 6 +++---
drivers/ddr/altera/sdram_s10.c | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/ddr/altera/sdram_agilex.c b/drivers/ddr/altera/sdram_agilex.c
index cc7679a6e4c1..0cbcd1405607 100644
--- a/drivers/ddr/altera/sdram_agilex.c
+++ b/drivers/ddr/altera/sdram_agilex.c
@@ -143,9 +143,6 @@ int sdram_mmr_init_full(struct udevice *dev)
setbits_le32(plat->hmc + ERRINTEN,
DDR_HMC_ERRINTEN_DERRINTEN_EN_SET_MSK);
- /* Enable non-secure writes to HMC Adapter for SDRAM ECC */
- writel(FW_HMC_ADAPTOR_MPU_MASK, FW_HMC_ADAPTOR_REG_ADDR);
-
if (!cpu_has_been_warmreset())
sdram_init_ecc_bits(&bd);
} else {
@@ -158,6 +155,9 @@ int sdram_mmr_init_full(struct udevice *dev)
DDR_HMC_ECCCTL2_AWB_EN_SET_MSK));
}
+ /* Enable non-secure reads/writes to HMC Adapter for SDRAM ECC */
+ writel(FW_HMC_ADAPTOR_MPU_MASK, FW_HMC_ADAPTOR_REG_ADDR);
+
sdram_size_check(&bd);
priv->info.base = bd.bi_dram[0].start;
diff --git a/drivers/ddr/altera/sdram_s10.c b/drivers/ddr/altera/sdram_s10.c
index a7bf82e4e5ce..2b8889260f9f 100644
--- a/drivers/ddr/altera/sdram_s10.c
+++ b/drivers/ddr/altera/sdram_s10.c
@@ -306,9 +306,6 @@ int sdram_mmr_init_full(struct udevice *dev)
DDR_HMC_ECCCTL2_AWB_EN_SET_MSK));
hmc_ecc_writel(plat, DDR_HMC_ERRINTEN_INTMASK, ERRINTENS);
- /* Enable non-secure writes to HMC Adapter for SDRAM ECC */
- writel(FW_HMC_ADAPTOR_MPU_MASK, FW_HMC_ADAPTOR_REG_ADDR);
-
/* Initialize memory content if not from warm reset */
if (!cpu_has_been_warmreset())
sdram_init_ecc_bits(&bd);
@@ -322,6 +319,9 @@ int sdram_mmr_init_full(struct udevice *dev)
DDR_HMC_ECCCTL2_AWB_EN_SET_MSK));
}
+ /* Enable non-secure reads/writes to HMC Adapter for SDRAM ECC */
+ writel(FW_HMC_ADAPTOR_MPU_MASK, FW_HMC_ADAPTOR_REG_ADDR);
+
sdram_size_check(&bd);
priv->info.base = bd.bi_dram[0].start;
--
2.7.4
next prev parent reply other threads:[~2019-12-06 19:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-06 19:47 [PATCHv2 0/2] Intel Stratix10/Agilex Additions thor.thayer at linux.intel.com
2019-12-06 19:47 ` [PATCHv2 1/2] arm: socfpga: stratix10: Enable SMMU access thor.thayer at linux.intel.com
2019-12-12 6:30 ` Tan, Ley Foon
2019-12-06 19:47 ` thor.thayer at linux.intel.com [this message]
2019-12-12 6:33 ` [PATCHv2 2/2] ddr: socfpga: Enable ARM64 Non-Secure SDRAM ECC Access Tan, Ley Foon
2019-12-07 0:24 ` [PATCHv2 0/2] Intel Stratix10/Agilex Additions Marek Vasut
2019-12-11 3:18 ` Tan, Ley Foon
2019-12-12 6:38 ` Tan, Ley Foon
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=1575661652-25254-3-git-send-email-thor.thayer@linux.intel.com \
--to=thor.thayer@linux.intel.com \
--cc=u-boot@lists.denx.de \
/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