From: Robin van der Gracht <[email protected]>

The prtvt7 board variant has no enabled ethernet interface. For these
boards the MAC address in the RFID flash is unset or invalid and should
not be copied to the device-tree.

Signed-off-by: Robin van der Gracht <[email protected]>
Signed-off-by: Oleksij Rempel <[email protected]>
---
 arch/arm/boards/protonic-imx6/board.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/boards/protonic-imx6/board.c 
b/arch/arm/boards/protonic-imx6/board.c
index e7938ac0fd..7368f3458f 100644
--- a/arch/arm/boards/protonic-imx6/board.c
+++ b/arch/arm/boards/protonic-imx6/board.c
@@ -171,6 +171,9 @@ static int prt_imx6_set_mac(struct prt_imx6_priv *priv,
                return -ENODEV;
        }
 
+       if (!of_device_is_available(node))
+               return 0;
+
        if (!is_valid_ether_addr(&rfid->mac[0])) {
                unsigned char ethaddr_str[sizeof("xx:xx:xx:xx:xx:xx")];
 
-- 
2.30.2


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

Reply via email to