[PATCH 09/23] ARM: zii-imx7d-dev: Differentiate between RPU2 and RMU2

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

 



Add code to configure hostname so we could differentiate between the
two in scripts.

Signed-off-by: Andrey Smirnov <andrew.smirnov@xxxxxxxxx>
---
 arch/arm/boards/zii-imx7d-dev/board.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm/boards/zii-imx7d-dev/board.c b/arch/arm/boards/zii-imx7d-dev/board.c
index e46a4b181..b53a6af49 100644
--- a/arch/arm/boards/zii-imx7d-dev/board.c
+++ b/arch/arm/boards/zii-imx7d-dev/board.c
@@ -48,3 +48,13 @@ static int zii_imx7d_rpu2_coredevices_init(void)
 }
 coredevice_initcall(zii_imx7d_rpu2_coredevices_init);
 
+static int zii_imx7d_dev_init(void)
+{
+	if (of_machine_is_compatible("zii,imx7d-rpu2"))
+		barebox_set_hostname("rpu2");
+	else if (of_machine_is_compatible("zii,imx7d-rmu2"))
+		barebox_set_hostname("rmu2");
+
+	return 0;
+}
+late_initcall(zii_imx7d_dev_init);
-- 
2.21.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