[PATCH] ARM: Phytec-phyCARD-imx27: Add missing compatible check
Sascha Hauer
s.hauer at pengutronix.de
Wed Jun 11 23:34:03 PDT 2014
Only run pca100 code when it's actually a pca100. While at it
consolidate two initcalls.
Signed-off-by: Sascha Hauer <s.hauer at 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
More information about the barebox
mailing list