[PATCH 04/16] ARM: duckbill: Check machine type in initcalls

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Check for the right machine type in initcalls before executing them to
make the board multi image safe.

Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 arch/arm/boards/duckbill/board.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/arm/boards/duckbill/board.c b/arch/arm/boards/duckbill/board.c
index 3c6ab8e596..13d4ae43cf 100644
--- a/arch/arm/boards/duckbill/board.c
+++ b/arch/arm/boards/duckbill/board.c
@@ -62,6 +62,9 @@ static struct fsl_usb2_platform_data usb_pdata = {
 
 static int duckbill_devices_init(void)
 {
+	if (!of_machine_is_compatible("i2se,duckbill"))
+		return 0;
+
 	duckbill_get_ethaddr(); /* must be after registering ocotp */
 
 	imx28_usb_phy0_enable();
@@ -74,6 +77,9 @@ fs_initcall(duckbill_devices_init);
 
 static int duckbill_console_init(void)
 {
+	if (!of_machine_is_compatible("i2se,duckbill"))
+		return 0;
+
 	barebox_set_model("I2SE Duckbill");
 	barebox_set_hostname("duckbill");
 
-- 
2.23.0


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



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux