mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Cc: str@pengutronix.de
Subject: [PATCH] ARM: SoCFPGA: arria10: Fix DMA accesses at addresses < 256KiB
Date: Wed, 26 Oct 2022 14:54:51 +0200	[thread overview]
Message-ID: <20221026125451.3357318-1-s.hauer@pengutronix.de> (raw)

Setting BIT(1) in the ARRIA10_SYSMGR_NOC_ADDR_REMAP_VALUE results in
mapping the OCRAM to 0x0, at least for the CPU. Peripherals doing
DMA like the SDMMC controller see the SDRAM instead. Linux happens
to use this low memory for DMA sometimes and things explode nicely
at that point.

Clear the OCRAM mapping so that both the CPU and DMA controllers access
SDRAM.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/mach-socfpga/arria10-init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-socfpga/arria10-init.c b/arch/arm/mach-socfpga/arria10-init.c
index 2fa44c21c5..93bc3368d3 100644
--- a/arch/arm/mach-socfpga/arria10-init.c
+++ b/arch/arm/mach-socfpga/arria10-init.c
@@ -174,7 +174,7 @@ void arria10_init(struct arria10_mainpll_cfg *mainpll,
 	 * Enable address filtering (Bit[0])
 	 */
 	writel(0x00000001, ARRIA10_MPUL2_ADRFLTR_START);
-	writel(0x00000002, ARRIA10_SYSMGR_NOC_ADDR_REMAP_VALUE);
+	writel(0x00000000, ARRIA10_SYSMGR_NOC_ADDR_REMAP_VALUE);
 
 	arria10_reset_peripherals();
 
-- 
2.30.2




                 reply	other threads:[~2022-10-26 12:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20221026125451.3357318-1-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=str@pengutronix.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