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>
Subject: [PATCH] ARM: pfla02: Add notice about the used environment partition
Date: Wed, 26 Aug 2015 14:45:56 +0200	[thread overview]
Message-ID: <1440593156-18311-1-git-send-email-s.hauer@pengutronix.de> (raw)

From: Philipp Zabel <p.zabel@pengutronix.de>

Also, use the barebox partition on mmc2.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
---
 arch/arm/boards/phytec-phyflex-imx6/board.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boards/phytec-phyflex-imx6/board.c b/arch/arm/boards/phytec-phyflex-imx6/board.c
index f0c4fe2..d3100c8 100644
--- a/arch/arm/boards/phytec-phyflex-imx6/board.c
+++ b/arch/arm/boards/phytec-phyflex-imx6/board.c
@@ -86,7 +86,7 @@ static unsigned int get_module_rev(void)
 static int phytec_pfla02_init(void)
 {
 	int ret;
-	char *environment_path;
+	char *environment_path, *envdev;
 
 	if (!of_machine_is_compatible("phytec,imx6q-pfla02") &&
 			!of_machine_is_compatible("phytec,imx6dl-pfla02") &&
@@ -106,13 +106,16 @@ static int phytec_pfla02_init(void)
 	case BOOTSOURCE_MMC:
 		environment_path = asprintf("/chosen/environment-sd%d",
 					bootsource_get_instance() + 1);
+		envdev = "MMC";
 		break;
 	case BOOTSOURCE_NAND:
 		environment_path = asprintf("/chosen/environment-nand");
+		envdev = "NAND flash";
 		break;
 	default:
 	case BOOTSOURCE_SPI:
 		environment_path = asprintf("/chosen/environment-spinor");
+		envdev = "SPI NOR flash";
 		break;
 	}
 
@@ -123,6 +126,8 @@ static int phytec_pfla02_init(void)
 
 	free(environment_path);
 
+	pr_notice("Using environment in %s\n", envdev);
+
 	return 0;
 }
 device_initcall(phytec_pfla02_init);
-- 
2.5.0


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

                 reply	other threads:[~2015-08-26 12:46 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=1440593156-18311-1-git-send-email-s.hauer@pengutronix.de \
    --to=s.hauer@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