From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Frysinger Date: Thu, 19 Jul 2012 00:05:55 -0400 Subject: [U-Boot] [PATCH v3 4/4] c6x: Add support c6745-som board In-Reply-To: <1340647361-23387-5-git-send-email-bond@inmys.ru> References: <1340647361-23387-5-git-send-email-bond@inmys.ru> Message-ID: <201207190005.56346.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Monday 25 June 2012 14:02:41 Dmitry Bondar wrote: > --- /dev/null > +++ b/board/inmys/c6745-som/c6745-som.c > > +int board_init() (void) > +int board_eth_init(bd_t *bis) > +{ > + u_int8_t mac_addr[6]; uchar > + /* Read Ethernet MAC address from EEPROM */ > + if (dvevm_read_mac_address(mac_addr)) > + /* set address env if not already set */ > + davinci_sync_env_enetaddr(mac_addr); > + > + /* read the address back from env */ > + if (!eth_getenv_enetaddr("ethaddr", mac_addr)) > + return -1; i think logic here is incorrect. usually it's: if (!eth_getenv_enetaddr("ethaddr", mac_addr)) /* read mac from hardware */ > + dev = eth_get_dev(); > + > + /* provide the resulting addr to the driver */ > + memcpy(dev->enetaddr, mac_addr, 6); > + dev->write_hwaddr(dev); err, this should be in the driver, not the board init > --- /dev/null > +++ b/include/configs/c6745-som-inmys.h > @@ -0,0 +1,294 @@ > +#ifndef __CONFIG_H > +#define __CONFIG_H missing intro comment block -mike -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: This is a digitally signed message part. URL: