]> git.dujemihanovic.xyz Git - u-boot.git/commit
smt32mp: add setup_mac_address for stm32mp25
authorPatrick Delaunay <patrick.delaunay@foss.st.com>
Mon, 15 Jan 2024 14:05:51 +0000 (15:05 +0100)
committerPatrice Chotard <patrice.chotard@foss.st.com>
Fri, 19 Jan 2024 13:38:01 +0000 (14:38 +0100)
commit8eb535e3b0e029cefa629efc72557000c5270a0d
tree63f2c2b4a9a9f7ba2330def3b9d2e7d9b4b0e010
parent9c2f5b8ad6ab28c2196bddedcd69cca954270a89
smt32mp: add setup_mac_address for stm32mp25

Add a function setup_mac_address() to update the MAC address from the
default location in OTP for stm32mp2 platform.

The max number of OTP for MAC address is increased to 8 for STM32MP25,
defined with get_eth_nb() and checked in setup_mac_address.

The MAC address FF:FF:FF:FF:FF:FF, the broadcast ethaddr, is a invalid
value used for unused MAC address slot in OTP, for example for board
with STM32MP25x part number allows up to 5 ethernet ports but it is not
supported by the hardware, without switch; the associated variable
"enetaddr%d" is not created.

Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
arch/arm/mach-stm32mp/soc.c
arch/arm/mach-stm32mp/stm32mp1/cpu.c
arch/arm/mach-stm32mp/stm32mp2/cpu.c