On Friday, February 04, 2011 14:56:42 Joe Xue wrote:
> +static int ax88783_init(struct eth_device *dev, bd_t * bd)
> +{
> +     ...
> +     /* set mac address*/
> +     mactmp[0] = dev->enetaddr[5];
> +     mactmp[1] = dev->enetaddr[4];
> +     mactmp[2] = dev->enetaddr[3];
> +     mactmp[3] = dev->enetaddr[2];
> +     writel(*mac, &reg->p0mac0);
> +
> +     mactmp[0] = dev->enetaddr[1];
> +     mactmp[1] = dev->enetaddr[0];
> +     writel(*mac, &reg->p0mac1);
> +
> +     /* write mac to forward entry */
> +     mactmp[0] = dev->enetaddr[3];
> +     mactmp[1] = dev->enetaddr[2];
> +     mactmp[2] = dev->enetaddr[1];
> +     mactmp[3] = dev->enetaddr[0];
> +     writel(*mac, &reg->ftdata);
> +
> +     tmp = dev->enetaddr[4] | (dev->enetaddr[5]<<8) | \
> +           FTCMD_FT_PORT(0x2) | FTCMD_FT_STATIC | \
> +           FTCMD_WRITE_FT;
> +     writel(tmp, &reg->ftcmd);

implement eth_device->write_hwaddr rather than inlining the code in the init
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
U-Boot mailing list
[email protected]
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to