[PATCH] ARM: pfla02: Add notice about the used environment partition

Sascha Hauer s.hauer at pengutronix.de
Wed Aug 26 05:45:56 PDT 2015


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

Also, use the barebox partition on mmc2.

Signed-off-by: Philipp Zabel <p.zabel at 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




More information about the barebox mailing list