arm: mvebu: turris_omnia: fix adapters MAC addresses
authorMarek Behún <marek.behun@nic.cz>
Fri, 24 May 2019 12:57:49 +0000 (14:57 +0200)
committerStefan Roese <sr@denx.de>
Thu, 11 Jul 2019 08:58:02 +0000 (10:58 +0200)
The board code reads MAC addresses from the ATSHA204A cryptochip.
For compatibility reasons the ethernet adapters on this SOC are not
enumerated in register address order. But when Omnia was first
manufactured this was done differently.

Change setting of MAC addresses to conform to the description on the
stickers sticked on actual Omnias.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
board/CZ.NIC/turris_omnia/turris_omnia.c

index ad6e290..cddde50 100644 (file)
@@ -514,17 +514,17 @@ int misc_init_r(void)
        mac[5] = mac1[3];
 
        if (is_valid_ethaddr(mac))
-               eth_env_set_enetaddr("ethaddr", mac);
+               eth_env_set_enetaddr("eth1addr", mac);
 
        increment_mac(mac);
 
        if (is_valid_ethaddr(mac))
-               eth_env_set_enetaddr("eth1addr", mac);
+               eth_env_set_enetaddr("eth2addr", mac);
 
        increment_mac(mac);
 
        if (is_valid_ethaddr(mac))
-               eth_env_set_enetaddr("eth2addr", mac);
+               eth_env_set_enetaddr("ethaddr", mac);
 
 out:
        return 0;