/openbmc/u-boot/test/dm/ |
H A D | eth.c | 89 * - "ethaddr" for all ethernet devices are not set 95 * - Remove all "ethaddr" environment variables 105 const char *addrname[DM_TEST_ETH_NUM] = {"ethaddr", "eth5addr", in dm_test_eth_act() 107 char ethaddr[DM_TEST_ETH_NUM][18]; in dm_test_eth_act() local 110 memset(ethaddr, '\0', sizeof(ethaddr)); in dm_test_eth_act() 120 strncpy(ethaddr[i], env_get(addrname[i]), 17); in dm_test_eth_act() 121 /* Must disable access protection for ethaddr before clearing */ in dm_test_eth_act() 135 env_set(addrname[i], ethaddr[i]); in dm_test_eth_act() 181 char ethaddr[18]; in dm_test_eth_rotate() local 188 memset(ethaddr, '\0', sizeof(ethaddr)); in dm_test_eth_rotate() [all …]
|
/openbmc/u-boot/board/rockchip/tinker_rk3288/ |
H A D | tinker-rk3288.c | 27 u8 ethaddr[6]; in rk_board_late_init() local 29 if (get_ethaddr_from_eeprom(ethaddr)) in rk_board_late_init() 32 if (is_valid_ethaddr(ethaddr)) in rk_board_late_init() 33 eth_env_set_enetaddr("ethaddr", ethaddr); in rk_board_late_init()
|
/openbmc/u-boot/board/toradex/common/ |
H A D | tdx-common.c | 68 unsigned char ethaddr[6]; in show_board_info() local 89 if (!eth_env_get_enetaddr("ethaddr", ethaddr)) in show_board_info() 90 eth_env_set_enetaddr("ethaddr", (u8 *)&tdx_eth_addr); in show_board_info() 93 if (!eth_env_get_enetaddr("eth1addr", ethaddr)) { in show_board_info() 98 memcpy(ethaddr, &tdx_eth_addr, 6); in show_board_info() 99 ethaddr[3] += 0x10; in show_board_info() 100 eth_env_set_enetaddr("eth1addr", ethaddr); in show_board_info()
|
/openbmc/u-boot/board/atmel/common/ |
H A D | mac_eeprom.c | 17 unsigned char ethaddr[ETH_ADDR_LEN]; in at91_set_ethaddr() local 18 const char *ETHADDR_NAME = "ethaddr"; in at91_set_ethaddr() 29 ret = i2c_eeprom_read(dev, offset, ethaddr, 6); in at91_set_ethaddr() 33 if (is_valid_ethaddr(ethaddr)) in at91_set_ethaddr() 34 eth_env_set_enetaddr(ETHADDR_NAME, ethaddr); in at91_set_ethaddr()
|
/openbmc/u-boot/board/Synology/ds414/ |
H A D | cmd_syno.c | 58 char ethaddr[ETH_ALEN]; in do_syno_populate() local 65 ethaddr[i] = bufp[i]; in do_syno_populate() 74 sprintf(var, "ethaddr"); in do_syno_populate() 79 ethaddr[0], ethaddr[1], ethaddr[2], in do_syno_populate() 80 ethaddr[3], ethaddr[4], ethaddr[5]); in do_syno_populate()
|
/openbmc/u-boot/doc/ |
H A D | README.enetaddr | 18 - environment ("ethaddr", "eth1addr", ...) 95 if (!eth_env_get_enetaddr("ethaddr", enetaddr)) { 96 /* "ethaddr" is not set in the environment */ 97 ... try and setup "ethaddr" in the env ... 99 /* enetaddr is now set to the value stored in the ethaddr env var */ 106 eth_env_set_enetaddr("ethaddr", enetaddr); 107 /* the "ethaddr" env var should now be set to "00:11:22:33:44:55" */
|
H A D | README.fec_mxc | 5 ethaddr from the SoC eFuses (see below). 36 Reading the ethaddr from the SoC eFuses: 38 ethaddr variable, then its value gets read from the corresponding eFuses in
|
/openbmc/u-boot/include/configs/ |
H A D | calimain.h | 199 "rootwait ethaddr=$ethaddr; " \ 203 "ethaddr=$ethaddr; bootm 0x60080000\0" \ 206 "rootwait ethaddr=$ethaddr; " \ 255 "echo MAC: $ethaddr; " \
|
H A D | colibri_imx6.h | 89 /* allow to overwrite serial and ethaddr */ 191 "setethupdate=if env exists ethaddr; then; else setenv ethaddr " \ 197 "setup=setenv setupargs fec_mac=${ethaddr} " \
|
H A D | apalis_imx6.h | 101 /* allow to overwrite serial and ethaddr */ 214 "setethupdate=if env exists ethaddr; then; else setenv ethaddr " \ 220 "setup=setenv setupargs fec_mac=${ethaddr} " \
|
/openbmc/u-boot/tools/ |
H A D | gen_ethaddr_crc.c | 26 uint8_t ethaddr[ARP_HLEN + 1] = { 0x00 }; in process_mac() local 36 ethaddr[i >> 1] |= nibble_to_hex(nibble, (i % 2) != 0); in process_mac() 42 printf("%.2x", ethaddr[i]); in process_mac() 43 printf("%.2x\n", crc8(0, ethaddr, ARP_HLEN)); in process_mac()
|
/openbmc/u-boot/board/xilinx/common/ |
H A D | board.c | 11 int zynq_board_read_rom_ethaddr(unsigned char *ethaddr) in zynq_board_read_rom_ethaddr() argument 30 ret = dm_i2c_read(dev, CONFIG_ZYNQ_GEM_I2C_MAC_OFFSET, ethaddr, 6); in zynq_board_read_rom_ethaddr() 34 debug("%s: I2C EEPROM MAC %pM\n", __func__, ethaddr); in zynq_board_read_rom_ethaddr()
|
/openbmc/u-boot/board/micronas/vct/ |
H A D | smc_eeprom.c | 350 unchar ethaddr[6], i; in do_eeprom_save_mac() local 356 ethaddr[i] = tmp ? simple_strtoul(tmp, &end, 16) : 0; in do_eeprom_save_mac() 361 hi16 = (ethaddr[5] << 8) | (ethaddr[4]); in do_eeprom_save_mac() 362 lo32 = (ethaddr[3] << 24) | (ethaddr[2] << 16) | in do_eeprom_save_mac() 363 (ethaddr[1] << 8) | (ethaddr[0]); in do_eeprom_save_mac()
|
/openbmc/u-boot/arch/arm/cpu/arm926ejs/spear/ |
H A D | spr_misc.c | 56 if (!eth_env_get_enetaddr("ethaddr", mac_id) && !i2c_read_mac(mac_id)) in misc_init_r() 57 eth_env_set_enetaddr("ethaddr", mac_id); in misc_init_r() 216 } else if (!strcmp(argv[1], "ethaddr")) { in do_chip_config() 232 printf("Ethaddr (from i2c mem) = %pM\n", mac); in do_chip_config() 234 printf("Ethaddr (from i2c mem) = Not set\n"); in do_chip_config() 247 "chip_config ethaddr XX:XX:XX:XX:XX:XX\n"
|
/openbmc/u-boot/board/technologic/ts4800/ |
H A D | ts4800.c | 171 unsigned char ethaddr[6]; in fec_get_mac_from_register() local 179 ethaddr[i] = (reg_mac[i / 4] >> ((i % 4) * 8)) & 0xFF; in fec_get_mac_from_register() 181 if (is_valid_ethaddr(ethaddr)) { in fec_get_mac_from_register() 182 eth_env_set_enetaddr("ethaddr", ethaddr); in fec_get_mac_from_register()
|
/openbmc/u-boot/board/ti/ti816x/ |
H A D | evm.c | 41 if (!eth_env_get_enetaddr("ethaddr", mac_addr)) { in board_eth_init() 42 printf("<ethaddr> not set. Reading from E-fuse\n"); in board_eth_init() 54 eth_env_set_enetaddr("ethaddr", mac_addr); in board_eth_init() 56 printf("Unable to read MAC address. Set <ethaddr>\n"); in board_eth_init()
|
/openbmc/linux/Documentation/devicetree/bindings/nvmem/ |
H A D | u-boot,env.yaml | 51 ethaddr: 78 mac: ethaddr { 97 ethaddr {
|
/openbmc/u-boot/board/varisys/common/ |
H A D | sys_eeprom.c | 384 char ethaddr[18]; in mac_read_from_generic_eeprom() local 394 sprintf(ethaddr, "%02X:%02X:%02X:%02X:%02X:%02X", in mac_read_from_generic_eeprom() 402 printf("MAC: %s\n", ethaddr); in mac_read_from_generic_eeprom() 403 env_set(envvar, ethaddr); in mac_read_from_generic_eeprom() 412 mac_read_from_generic_eeprom("ethaddr", CONFIG_SYS_I2C_MAC1_CHIP_ADDR, in mac_read_from_fixed_id() 474 char ethaddr[18]; in mac_read_from_eeprom_common() local 477 sprintf(ethaddr, "%02X:%02X:%02X:%02X:%02X:%02X", in mac_read_from_eeprom_common() 484 sprintf(enetvar, i ? "eth%daddr" : "ethaddr", i); in mac_read_from_eeprom_common() 489 env_set(enetvar, ethaddr); in mac_read_from_eeprom_common()
|
/openbmc/u-boot/board/ti/ti814x/ |
H A D | evm.c | 169 if (!eth_env_get_enetaddr("ethaddr", mac_addr)) { in board_eth_init() 170 printf("<ethaddr> not set. Reading from E-fuse\n"); in board_eth_init() 182 eth_env_set_enetaddr("ethaddr", mac_addr); in board_eth_init() 184 printf("Unable to read MAC address. Set <ethaddr>\n"); in board_eth_init()
|
/openbmc/u-boot/net/ |
H A D | Kconfig | 12 bool "Random ethaddr if unset" 15 even when the ethaddr variable for that interface is unset.
|
/openbmc/u-boot/board/amlogic/odroid-c2/ |
H A D | odroid-c2.c | 28 if (!eth_env_get_enetaddr("ethaddr", mac_addr)) { in misc_init_r() 32 eth_env_set_enetaddr("ethaddr", mac_addr); in misc_init_r()
|
/openbmc/u-boot/board/amlogic/p212/ |
H A D | p212.c | 30 if (!eth_env_get_enetaddr("ethaddr", mac_addr)) { in misc_init_r() 34 eth_env_set_enetaddr("ethaddr", mac_addr); in misc_init_r()
|
/openbmc/u-boot/board/amlogic/q200/ |
H A D | q200.c | 35 if (!eth_env_get_enetaddr("ethaddr", mac_addr)) { in misc_init_r() 39 eth_env_set_enetaddr("ethaddr", mac_addr); in misc_init_r()
|
/openbmc/linux/arch/mips/alchemy/common/ |
H A D | prom.c | 132 ethaddr_str = prom_getenv("ethaddr"); in prom_get_ethernet_addr() 135 ethaddr_str = strstr(arcs_cmdline, "ethaddr="); in prom_get_ethernet_addr() 139 ethaddr_str += strlen("ethaddr="); in prom_get_ethernet_addr()
|
/openbmc/u-boot/board/gardena/smart-gateway-mt7688/ |
H A D | board.c | 148 env = env_get("ethaddr"); in factory_data_env_config() 150 env_set("ethaddr", str); in factory_data_env_config() 247 if (!eth_env_get_enetaddr("ethaddr", fd->eth_mac)) in do_fd_write() 256 printf("ethaddr=%pM\n", fd->eth_mac); in do_fd_write()
|