All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Eichenberger <eichest@gmail.com>
To: francesco.dolcini@toradex.com, trini@konsulko.com, s-k6@ti.com,
	w.egorov@phytec.de, n-francis@ti.com
Cc: u-boot@lists.denx.de,
	Stefan Eichenberger <stefan.eichenberger@toradex.com>
Subject: [PATCH v1] board: verdin-am62: add dram_init_banksize
Date: Mon, 10 Feb 2025 08:27:47 +0100	[thread overview]
Message-ID: <20250210072834.9135-1-eichest@gmail.com> (raw)

From: Stefan Eichenberger <stefan.eichenberger@toradex.com>

Add the dram_init_banksize function to the board file to properly set
DRAM memory sizes during boot.

The commit bc07851897bd ("board: ti: Pull redundant DDR functions to a
common location and Fixup DDR size when ECC is enabled") relocated the
dram_init_banksize function from architecture specific initialization to
the TI board initialization code. As a result, boards relying on the
previous setup now require this function to be defined within their
board file to handle DRAM sizing correctly.

Without this function defined the following error appears during boot:
    ERROR: Failed to allocate 0x1000 bytes below 0x0.

Fixes: bc07851897bd ("board: ti: Pull redundant DDR functions to a common location and Fixup DDR size when ECC is enabled")
Signed-off-by: Stefan Eichenberger <stefan.eichenberger@toradex.com>
---
 board/toradex/verdin-am62/verdin-am62.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/board/toradex/verdin-am62/verdin-am62.c b/board/toradex/verdin-am62/verdin-am62.c
index e948fc16ba9..b80b39b6767 100644
--- a/board/toradex/verdin-am62/verdin-am62.c
+++ b/board/toradex/verdin-am62/verdin-am62.c
@@ -35,6 +35,17 @@ int dram_init(void)
 	return 0;
 }
 
+int dram_init_banksize(void)
+{
+	s32 ret;
+
+	ret = fdtdec_setup_memory_banksize();
+	if (ret)
+		printf("Error setting up memory banksize. %d\n", ret);
+
+	return ret;
+}
+
 /*
  * Avoid relocated U-Boot clash with Linux reserved-memory on 512 MB SoM
  */
-- 
2.45.2


             reply	other threads:[~2025-02-10 13:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-10  7:27 Stefan Eichenberger [this message]
2025-02-10 13:45 ` [PATCH v1] board: verdin-am62: add dram_init_banksize Francesco Dolcini
2025-02-19  2:04 ` Tom Rini
2025-02-19  9:25   ` Francesco Dolcini
2025-02-19 13:41     ` Tom Rini
2025-02-20 17:19 ` Tom Rini

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=20250210072834.9135-1-eichest@gmail.com \
    --to=eichest@gmail.com \
    --cc=francesco.dolcini@toradex.com \
    --cc=n-francis@ti.com \
    --cc=s-k6@ti.com \
    --cc=stefan.eichenberger@toradex.com \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=w.egorov@phytec.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 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.