[U-Boot] ColdFire/M68K board.c initialization / order matters [PATCH] -- resent in git format

Michael Durrant mdurrant at arcturusnetworks.com
Thu Jan 21 00:54:28 CET 2010


Ben Warren wrote:
> Hi Michael,
>
> Michael Durrant wrote:
>> lib_m68k_board.patch
>>    - eth_init() requires eth_current which is initialized in
>> eth_initialize()
>>      so eth_initialize (bd) should be called first then eth_init(bd)
>>
>>   
> Actually, eth_init() shouldn't be called in board.c at all.

Ok.  I am open to suggestions here.

Here is our rational for the change.  We moved the eth_init()
previously before eth_initialize (bd) to after as the eth_initialize
over writes  the current pointer.     Our usage case is to ensure
the Ethernet MAC address is retrieved from the eeprom and
is used to initialized into the FEC registers in the MCF5282
before executing the customers application code. 

Since MAC initialization normally only happens when u-boot
makes use of the Ethernet  for network services such as ping
or tftp we saw using eth_init() in board.c as an easy way to
ensure the FEC registers are set up.


Regards,
Michael Durrant

> regards,
> Ben


More information about the U-Boot mailing list