ARM: socfpga: vining_fpga: Extract eth1 MAC from EEPROM
authorMarek Vasut <marex@denx.de>
Wed, 26 Jun 2019 22:19:35 +0000 (00:19 +0200)
committermarex <marex@chi.lan>
Wed, 9 Oct 2019 20:57:41 +0000 (22:57 +0200)
The EEPROM contains eth1 MAC address as well, use it.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Silvio Fricke <silvio.fricke@softing.com>
Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
board/softing/vining_fpga/socfpga.c

index 1e095a4e7db0feeabcaf6a37ca9a0ffa02217a7a..3f597fb99e958201781e1092edad9248d5c037e4 100644 (file)
@@ -87,6 +87,8 @@ int misc_init_r(void)
        /* Set ethernet address from EEPROM. */
        if (!env_get("ethaddr") && is_valid_ethaddr(&data[0x62]))
                eth_env_set_enetaddr("ethaddr", &data[0x62]);
+       if (!env_get("eth1addr") && is_valid_ethaddr(&data[0x6a]))
+               eth_env_set_enetaddr("eth1addr", &data[0x6a]);
 
        return 0;
 }