mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Alexander Aring <alex.aring@gmail.com>
To: barebox@lists.infradead.org
Subject: [RFC 1/2] kirkwood: add support for booting via oftree probe
Date: Sun, 22 Jun 2014 22:34:14 +0200	[thread overview]
Message-ID: <1403469255-9019-1-git-send-email-alex.aring@gmail.com> (raw)

This patch initialize memory only if we boot a kirkwood arch with
device-tree probing. Otherwise some devices like timer or uart will
be probed twice.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
---
I don't know if this is right. The guruplug is the other kirkwood platform
but don't have devictree support.

 arch/arm/mach-mvebu/kirkwood.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-mvebu/kirkwood.c b/arch/arm/mach-mvebu/kirkwood.c
index c79d130..dd73ab0 100644
--- a/arch/arm/mach-mvebu/kirkwood.c
+++ b/arch/arm/mach-mvebu/kirkwood.c
@@ -86,6 +86,12 @@ static int kirkwood_init_soc(void)
 {
 	unsigned long phys_base, phys_size;
 
+	kirkwood_memory_find(&phys_base, &phys_size);
+	arm_add_mem_device("ram0", phys_base, phys_size);
+
+	if (IS_ENABLED(CONFIG_OFDEVICE))
+		return 0;
+
 	barebox_set_model("Marvell Kirkwood");
 	barebox_set_hostname("kirkwood");
 
@@ -94,8 +100,6 @@ static int kirkwood_init_soc(void)
 	add_generic_device("orion-timer", DEVICE_ID_SINGLE, NULL,
 			   (unsigned int)KIRKWOOD_TIMER_BASE, 0x30,
 			   IORESOURCE_MEM, NULL);
-	kirkwood_memory_find(&phys_base, &phys_size);
-	arm_add_mem_device("ram0", phys_base, phys_size);
 	kirkwood_add_uart();
 
 	return 0;
-- 
2.0.0


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

             reply	other threads:[~2014-06-22 20:34 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-22 20:34 Alexander Aring [this message]
2014-06-22 20:34 ` [RFC 2/2] dns325: initial support for D-Link DNS-325 Alexander Aring
2014-06-22 21:50   ` Sebastian Hesselbarth
2014-06-23  6:48     ` Alexander Aring
2014-06-26  4:27     ` Alexander Aring
2014-06-26  6:53       ` Sebastian Hesselbarth
2014-06-26  9:14         ` Alexander Aring
2014-06-24 11:54   ` Sebastian Hesselbarth
2014-06-25  6:57     ` Sascha Hauer
2014-06-22 21:45 ` [RFC 1/2] kirkwood: add support for booting via oftree probe Sebastian Hesselbarth
2014-06-23  6:51   ` Alexander Aring

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=1403469255-9019-1-git-send-email-alex.aring@gmail.com \
    --to=alex.aring@gmail.com \
    --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