mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Philipp Zabel <p.zabel@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH] ARM: AM335x: Beaglebone: Fix memory setup for Beaglebone black
Date: Mon, 16 Jun 2014 17:13:54 +0200	[thread overview]
Message-ID: <1402931635-18830-1-git-send-email-p.zabel@pengutronix.de> (raw)

From: Philipp Zabel <philipp.zabel@gmail.com>

Commit 0d6392de4ad824a6553c0e3e3e18edef689a7c85 introduced a stripped
down device tree used for both white and black Beaglebone variants
that included the 256 MiB memory node from am335x-bone-common.dtsi.
This leads to the following error in the MLO:

    mmu: Critical Error: Can't request SDRAM region for ttb at 9fff4000

This patch removes the (for the Beaglebone black) invalid memory size
from the common device tree and instead registers the memory bank
manually in the board file.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
---
 arch/arm/boards/beaglebone/board.c   | 17 +++++++++++++++++
 arch/arm/dts/am335x-bone-common.dtsi |  5 -----
 2 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/arch/arm/boards/beaglebone/board.c b/arch/arm/boards/beaglebone/board.c
index 993d05b..3042189 100644
--- a/arch/arm/boards/beaglebone/board.c
+++ b/arch/arm/boards/beaglebone/board.c
@@ -51,6 +51,23 @@ static int beaglebone_coredevice_init(void)
 }
 coredevice_initcall(beaglebone_coredevice_init);
 
+static int beaglebone_mem_init(void)
+{
+	uint32_t sdram_size;
+
+	if (!of_machine_is_compatible("ti,am335x-bone"))
+		return 0;
+
+	if (is_beaglebone_black())
+		sdram_size = SZ_512M;
+	else
+		sdram_size = SZ_256M;
+
+	arm_add_mem_device("ram0", 0x80000000, sdram_size);
+	return 0;
+}
+mem_initcall(beaglebone_mem_init);
+
 static int beaglebone_devices_init(void)
 {
 	int black;
diff --git a/arch/arm/dts/am335x-bone-common.dtsi b/arch/arm/dts/am335x-bone-common.dtsi
index 00271c4..4cf7fdb 100644
--- a/arch/arm/dts/am335x-bone-common.dtsi
+++ b/arch/arm/dts/am335x-bone-common.dtsi
@@ -17,11 +17,6 @@
 		};
 	};
 
-	memory {
-		device_type = "memory";
-		reg = <0x80000000 0x10000000>; /* 256 MB */
-	};
-
 	leds {
 		pinctrl-names = "default";
 		pinctrl-0 = <&user_leds_s0>;
-- 
2.0.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

             reply	other threads:[~2014-06-16 15:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-16 15:13 Philipp Zabel [this message]
2014-06-16 17:08 ` Antony Pavlov
2014-06-16 21:35   ` Sascha Hauer
2014-06-17  5:35     ` Antony Pavlov
2014-06-17 18:30       ` Sascha Hauer
2014-06-18  8:40         ` Antony Pavlov
2014-06-17 18:34 ` Sascha Hauer

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=1402931635-18830-1-git-send-email-p.zabel@pengutronix.de \
    --to=p.zabel@pengutronix.de \
    --cc=barebox@lists.infradead.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