[U-Boot] [PATCH v3 4/4] c6x: Add support c6745-som board

Mike Frysinger vapier at gentoo.org
Thu Jul 19 06:05:55 CEST 2012


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: <http://lists.denx.de/pipermail/u-boot/attachments/20120719/8347fcee/attachment.pgp>


More information about the U-Boot mailing list