[U-Boot] [PATCH] ne2000: take MAC address from config if available

Ben Warren biggerbadderben at gmail.com
Sat Nov 29 06:27:37 CET 2008


Hi Daniel,

On Fri, Nov 28, 2008 at 8:16 AM, Daniel Mack <daniel at caiaq.de> wrote:

> Hi,
>
> the board I'm currently working on has an ASIX AX88796 NE2000 clone but
> no EEPROM attached to it. Hence, the get_prom() routine returns zeros
> only so the system won't work.
>
> This patch takes the MAC address given by CONFIG_ETHADDR and translates
> it to numeric values. This could probably go to some other, more generic
> place, but I didn't find any.
>

CONFIG_ETHADDR is bad and shouldn't be used unless you only ever plan on
building one board.  No new board ports will be accepted that define it.
What would be better here, although it's still not very good, would be to
have something like CONFIG_NE2000_NOPROM, and if defined, make a
'getenv("ethaddr")' call and program the hardware with the return value
(with proper error checking, of course).

regards,
Ben


More information about the U-Boot mailing list