mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/3] i.MX6: phytec: Separate SoM specific code
@ 2015-01-16  2:32 Andrey Smirnov
  2015-01-16  2:32 ` [PATCH v2] i.MX: SPI: Respect SPI_LSB_FIRST flag in mode settings Andrey Smirnov
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Andrey Smirnov @ 2015-01-16  2:32 UTC (permalink / raw)
  To: barebox; +Cc: Andrey Smirnov

Separate SoM(designator PFLA02) specific and base board(designator
PBAB0x) code into two distinct functions. PHYTEC default environment
for PHYFLEX references peripherals that may or may not be used on
custom baseboards used with SoMs. Move the code appending it into a
separate function that would have effect only for boards explicitly
claiming compatibility with PHYTEC baseboards.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 arch/arm/boards/phytec-phyflex-imx6/board.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boards/phytec-phyflex-imx6/board.c b/arch/arm/boards/phytec-phyflex-imx6/board.c
index 1551460..7ac7928 100644
--- a/arch/arm/boards/phytec-phyflex-imx6/board.c
+++ b/arch/arm/boards/phytec-phyflex-imx6/board.c
@@ -87,8 +87,19 @@ static int phytec_pfla02_init(void)
 		break;
 	}
 
+	return 0;
+}
+device_initcall(phytec_pfla02_init);
+
+static int phytec_pbab0x_init(void)
+{
+	if (!of_machine_is_compatible("phytec,imx6x-pbab01") &&
+		!of_machine_is_compatible("phytec,imx6dl-pbab05") &&
+		!of_machine_is_compatible("phytec,imx6q-pbab02"))
+		return 0;
+
 	defaultenv_append_directory(defaultenv_phyflex_imx6);
 
 	return 0;
 }
-device_initcall(phytec_pfla02_init);
+device_initcall(phytec_pbab0x_init);
-- 
2.1.0


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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-01-16  7:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-16  2:32 [PATCH 1/3] i.MX6: phytec: Separate SoM specific code Andrey Smirnov
2015-01-16  2:32 ` [PATCH v2] i.MX: SPI: Respect SPI_LSB_FIRST flag in mode settings Andrey Smirnov
2015-01-16  2:32 ` [PATCH 2/3] i.MX6: phytec: Check environment path selection for errors Andrey Smirnov
2015-01-16  2:32 ` [PATCH 3/3] i.MX6: phytec: Allow multiple MMC devices to contain boot environment Andrey Smirnov
2015-01-16  7:12 ` [PATCH 1/3] i.MX6: phytec: Separate SoM specific code Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox