diff options
author | Robin van der Gracht <robin@protonic.nl> | 2021-08-18 14:19:41 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2021-08-23 15:45:20 +0200 |
commit | abdd92ffe85ef5c436ae7f513f6381382779daf6 (patch) | |
tree | df17a35e9dcd34aac25a79906df2994252845ade /arch | |
parent | d38d91e272f824a68bd33e628457c0fad2c85a09 (diff) | |
download | barebox-abdd92ffe85ef5c436ae7f513f6381382779daf6.tar.gz barebox-abdd92ffe85ef5c436ae7f513f6381382779daf6.tar.xz |
ARM: boards: protonic-imx6: Don't fixup MAC address for disabled device
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 <robin@protonic.nl>
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Link: https://lore.barebox.org/20210818121945.26089-3-o.rempel@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/boards/protonic-imx6/board.c | 3 |
1 files changed, 3 insertions, 0 deletions
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")]; |