From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.92.2 #3 (Red Hat Linux)) id 1iAUnC-0001qU-If for barebox@lists.infradead.org; Wed, 18 Sep 2019 07:54:28 +0000 From: Sascha Hauer Date: Wed, 18 Sep 2019 09:54:09 +0200 Message-Id: <20190918075421.20456-5-s.hauer@pengutronix.de> In-Reply-To: <20190918075421.20456-1-s.hauer@pengutronix.de> References: <20190918075421.20456-1-s.hauer@pengutronix.de> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 04/16] ARM: duckbill: Check machine type in initcalls To: Barebox List Check for the right machine type in initcalls before executing them to make the board multi image safe. Signed-off-by: Sascha Hauer --- 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@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox