mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] ARM: Phytec-phyCARD-imx27: Add missing compatible check
@ 2014-06-12  6:34 Sascha Hauer
  0 siblings, 0 replies; only message in thread
From: Sascha Hauer @ 2014-06-12  6:34 UTC (permalink / raw)
  To: barebox

Only run pca100 code when it's actually a pca100. While at it
consolidate two initcalls.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/boards/phytec-phycard-imx27/pca100.c | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)

diff --git a/arch/arm/boards/phytec-phycard-imx27/pca100.c b/arch/arm/boards/phytec-phycard-imx27/pca100.c
index 4b355bc..895a3a3 100644
--- a/arch/arm/boards/phytec-phycard-imx27/pca100.c
+++ b/arch/arm/boards/phytec-phycard-imx27/pca100.c
@@ -119,6 +119,12 @@ static int pca100_devices_init(void)
 		PE25_PF_USBOTG_DATA7,
 	};
 
+	if (!of_machine_is_compatible("phytec,imx27-pca100"))
+		return 0;
+
+	barebox_set_model("Phytec phyCARD-i.MX27");
+	barebox_set_hostname("phycard-imx27");
+
 	pca100_usb_init();
 
 	/* initizalize gpios */
@@ -137,13 +143,3 @@ static int pca100_devices_init(void)
 }
 
 device_initcall(pca100_devices_init);
-
-static int pca100_console_init(void)
-{
-	barebox_set_model("Phytec phyCARD-i.MX27");
-	barebox_set_hostname("phycard-imx27");
-
-	return 0;
-}
-
-console_initcall(pca100_console_init);
-- 
2.0.0.rc2


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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-06-12  6:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-12  6:34 [PATCH] ARM: Phytec-phyCARD-imx27: Add missing compatible check Sascha Hauer

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