[U-Boot] [PATCH] net: altera_tse: add write_hwaddr support

Ben Warren biggerbadderben at gmail.com
Tue Apr 27 09:27:04 CEST 2010


Hi Thomas,

On 4/26/2010 11:11 PM, Thomas Chou wrote:
> Signed-off-by: Thomas Chou<thomas at wytron.com.tw>
> ---
>   drivers/net/altera_tse.c |   63 ++++++++++++++++++++++++++-------------------
>   1 files changed, 36 insertions(+), 27 deletions(-)
>
>    
<snip>
>   static int tse_eth_init(struct eth_device *dev, bd_t * bd)
>   {
>   	int dat;
> @@ -830,33 +864,7 @@ static int tse_eth_init(struct eth_device *dev, bd_t * bd)
>   	mac_dev->command_config.image = dat;
>
>   	/* Set the MAC address */
> -	debug("Setting MAC address to 0x%x%x%x%x%x%x\n",
> -	      dev->enetaddr[5], dev->enetaddr[4],
> -	      dev->enetaddr[3], dev->enetaddr[2],
> -	      dev->enetaddr[1], dev->enetaddr[0]);
> -	mac_dev->mac_addr_0 = ((dev->enetaddr[3])<<  24 |
> -			       (dev->enetaddr[2])<<  16 |
> -			       (dev->enetaddr[1])<<  8 | (dev->enetaddr[0]));
> -
> -	mac_dev->mac_addr_1 = ((dev->enetaddr[5]<<  8 |
> -				(dev->enetaddr[4]))&  0xFFFF);
> -
> -	/* Set the MAC address */
> -	mac_dev->supp_mac_addr_0_0 = mac_dev->mac_addr_0;
> -	mac_dev->supp_mac_addr_0_1 = mac_dev->mac_addr_1;
> -
> -	/* Set the MAC address */
> -	mac_dev->supp_mac_addr_1_0 = mac_dev->mac_addr_0;
> -	mac_dev->supp_mac_addr_1_1 = mac_dev->mac_addr_1;
> -
> -	/* Set the MAC address */
> -	mac_dev->supp_mac_addr_2_0 = mac_dev->mac_addr_0;
> -	mac_dev->supp_mac_addr_2_1 = mac_dev->mac_addr_1;
> -
> -	/* Set the MAC address */
> -	mac_dev->supp_mac_addr_3_0 = mac_dev->mac_addr_0;
> -	mac_dev->supp_mac_addr_3_1 = mac_dev->mac_addr_1;
> -
> +	tse_set_mac_address(dev);
>    
Why is this needed?  Do you see a situation where the user would 'setenv 
ethmacskip' and then actually use the interface?

regards,
Ben


More information about the U-Boot mailing list