mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Lucas Stach <l.stach@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 3/5] ARM: i.MX: edmqmx6: choose the environment at the correct time
Date: Thu, 27 Feb 2014 14:53:21 +0100	[thread overview]
Message-ID: <1393509203-836-3-git-send-email-l.stach@pengutronix.de> (raw)
In-Reply-To: <1393509203-836-1-git-send-email-l.stach@pengutronix.de>

From: Michael Olbrich <m.olbrich@pengutronix.de>

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
v2 lst:
- correct compatible
- proper function naming
---
 arch/arm/boards/datamodul-edm-qmx6/board.c | 21 +++++++++++++++------
 1 file changed, 15 insertions(+), 6 deletions(-)

diff --git a/arch/arm/boards/datamodul-edm-qmx6/board.c b/arch/arm/boards/datamodul-edm-qmx6/board.c
index 8a49beee2faa..3184912c4782 100644
--- a/arch/arm/boards/datamodul-edm-qmx6/board.c
+++ b/arch/arm/boards/datamodul-edm-qmx6/board.c
@@ -111,15 +111,11 @@ static int realq7_env_init(void)
 }
 late_initcall(realq7_env_init);
 
-static int realq7_console_init(void)
+static int realq7_device_init(void)
 {
 	if (!of_machine_is_compatible("dmo,imx6q-edmqmx6"))
 		return 0;
 
-	barebox_set_hostname("eDM-QMX6");
-
-	imx6_init_lowlevel();
-
 	switch (bootsource_get()) {
 	case BOOTSOURCE_MMC:
 		of_device_enable_path("/chosen/environment-emmc");
@@ -132,4 +128,17 @@ static int realq7_console_init(void)
 
 	return 0;
 }
-postcore_initcall(realq7_console_init);
+device_initcall(realq7_device_init);
+
+static int realq7_postcore_init(void)
+{
+	if (!of_machine_is_compatible("dmo,imx6q-edmqmx6"))
+		return 0;
+
+	barebox_set_hostname("eDM-QMX6");
+
+	imx6_init_lowlevel();
+
+	return 0;
+}
+postcore_initcall(realq7_postcore_init);
-- 
1.8.5.3


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

  parent reply	other threads:[~2014-02-27 13:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-27 13:53 [PATCH 1/5] ARM: i.MX: edmqmx6: fix startup Lucas Stach
2014-02-27 13:53 ` [PATCH 2/5] ARM: i.MX: edmqmx6: correct MMDC init Lucas Stach
2014-02-27 13:53 ` Lucas Stach [this message]
2014-02-27 13:53 ` [PATCH 4/5] ARM: i.MX: edmqmx6: set display GPIOs Lucas Stach
2014-02-27 13:53 ` [PATCH 5/5] ARM: i.MX: edmqmx6: choose correct env when booting from SD Lucas Stach
2014-02-27 20:10 ` [PATCH 1/5] ARM: i.MX: edmqmx6: fix startup 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=1393509203-836-3-git-send-email-l.stach@pengutronix.de \
    --to=l.stach@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