When U-Boot initializes, it will call the common function eth_initialize().
This will in turn call the board-specific board_eth_init() (or if that fails,
the cpu-specific cpu_eth_init()). These board-specific functions can do random
system handling, but ultimately they will call the driver-specific register
function which in turn takes care of initializing that particular instance.
Keep in mind that you should code the driver to avoid storing state in global
data as someone might want to hook up two of the same devices to one board.
Any such information that is specific to an interface should be stored in a
private, driver-defined data structure and pointed to by eth->priv (see below).
So the call graph at this stage would look something like:
board_eth_init() / cpu_eth_init()
board_eth_init()->setup_net_chip() -> aml_eth_init()->aml_ethernet_init -> … eth_reset() -> “Error: Fail to reset mac!”