[U-Boot] [PATCH] net: axi_ethernet: Add driver to u-boot

Mike Frysinger vapier at gentoo.org
Wed Aug 31 21:24:08 CEST 2011


On Tuesday, August 30, 2011 08:05:19 Michal Simek wrote:
> +static void setup_mac(struct eth_device *dev)
> +{
> +	/* Set the MAC address */
> +	int val = ((dev->enetaddr[3] << 24) | (dev->enetaddr[2] << 16) |
> +		(dev->enetaddr[1] << 8) | (dev->enetaddr[0]));
> +	aximac_out32(dev->iobase, XAE_UAW0_OFFSET, val);
> +
> +	val = (dev->enetaddr[5] << 8) | dev->enetaddr[4] ;
> +	val |= aximac_in32(dev->iobase, XAE_UAW1_OFFSET) &
> +						~XAE_UAW1_UNICASTADDR_MASK;
> +	aximac_out32(dev->iobase, XAE_UAW1_OFFSET, val);
> +}
> +
> +static int axiemac_init(struct eth_device *dev, bd_t * bis)
> +{
> +	setup_mac(dev);

pretty sure this should be dev->write_hwaddr

> +int xilinx_axiemac_initialize(bd_t *bis, unsigned long base_addr, int
> dma_addr)

you got base_addr right, but forgot to change dma_addr to unsigned long too ;)

otherwise it seems that Marek covered much of what i would have suggested
-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/20110831/9c258c03/attachment.pgp 


More information about the U-Boot mailing list