
29 Jan
2009
29 Jan
'09
11:18 p.m.
Dear Mike Frysinger,
In message 200901291648.02480.vapier@gentoo.org you wrote:
- misc_init_r() [or similar] sets up ethaddr in env if it isnt set already and sets bi_enetaddr in global data
- board_eth_init() calls the driver init (bfin_EMAC_initialize() in your case)
- driver init looks up ethaddr in env or bi_enetaddr
...
What is wrong with using bi_enetaddr? What sort of "handling/parsing code" (in addition to a plain simple memcpy(...,6) is needed?
converting the envvar to the raw 6 bytes and back again is duplicated all over the tree. and you suggest that both the board-specific misc_initr() and the driver init should handle this.
No, I don't. I suggest that it gets done once (for example in misc_initr()), and that you then use the binary data in bi_enetaddr.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
PoB = "Prisoner of Bill" -- those held captive, unwillingly or other-
wise, by the contemptible Microsoft monopoly.
-- Tom Christiansen in 6abo45$3lc$2@csnews.cs.colorado.edu