[U-Boot] [PATCH 01/27 v2] Blackfin: bfin_mac: force board_get_enetaddr() usage

Mike Frysinger vapier at gentoo.org
Thu Jan 29 22:48:01 CET 2009


On Thursday 29 January 2009 16:17:09 Wolfgang Denk wrote:
> In message <200901291605.09474.vapier at gentoo.org> you wrote:
> > > Rather:
> > >
> > > 	- 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
> >
> > well this gets us into the realm of what i was trying to avoid/fix in the
> > first place: duplication of the env/ethaddr handling/parsing code.  i get
>
> 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.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20090129/e2e502b1/attachment.pgp 


More information about the U-Boot mailing list