public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] fec_mxc: set ethaddr if fuses burned and not previously set
@ 2013-08-02 17:37 Eric Nelson
  2013-08-21 10:42 ` Stefano Babic
  2013-08-21 11:19 ` Stefano Babic
  0 siblings, 2 replies; 4+ messages in thread
From: Eric Nelson @ 2013-08-02 17:37 UTC (permalink / raw)
  To: u-boot

Without this change, the following message is generated:
	Warning: FEC using MAC address from net device

See doc/README.enetaddr for details.

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
---
 drivers/net/fec_mxc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
index e14a359..886be9c 100644
--- a/drivers/net/fec_mxc.c
+++ b/drivers/net/fec_mxc.c
@@ -980,6 +980,8 @@ static int fec_probe(bd_t *bd, int dev_id, uint32_t base_addr,
 	if (fec_get_hwaddr(edev, dev_id, ethaddr) == 0) {
 		debug("got MAC%d address from fuse: %pM\n", dev_id, ethaddr);
 		memcpy(edev->enetaddr, ethaddr, 6);
+		if (!getenv("ethaddr"))
+			eth_setenv_enetaddr("ethaddr",mac);
 	}
 	return ret;
 err3:
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] fec_mxc: set ethaddr if fuses burned and not previously set
  2013-08-02 17:37 [U-Boot] [PATCH] fec_mxc: set ethaddr if fuses burned and not previously set Eric Nelson
@ 2013-08-21 10:42 ` Stefano Babic
  2013-08-21 11:19 ` Stefano Babic
  1 sibling, 0 replies; 4+ messages in thread
From: Stefano Babic @ 2013-08-21 10:42 UTC (permalink / raw)
  To: u-boot

Hi Eric,

On 02/08/2013 19:37, Eric Nelson wrote:
> Without this change, the following message is generated:
> 	Warning: FEC using MAC address from net device
> 
> See doc/README.enetaddr for details.
> 
> Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
> ---

Applied to u-boot-imx, thanks !

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] fec_mxc: set ethaddr if fuses burned and not previously set
  2013-08-02 17:37 [U-Boot] [PATCH] fec_mxc: set ethaddr if fuses burned and not previously set Eric Nelson
  2013-08-21 10:42 ` Stefano Babic
@ 2013-08-21 11:19 ` Stefano Babic
  2013-08-21 13:28   ` Eric Nelson
  1 sibling, 1 reply; 4+ messages in thread
From: Stefano Babic @ 2013-08-21 11:19 UTC (permalink / raw)
  To: u-boot

Hi Eric,

On 02/08/2013 19:37, Eric Nelson wrote:
> Without this change, the following message is generated:
> 	Warning: FEC using MAC address from net device
> 
> See doc/README.enetaddr for details.
> 
> Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
> ---
>  drivers/net/fec_mxc.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
> index e14a359..886be9c 100644
> --- a/drivers/net/fec_mxc.c
> +++ b/drivers/net/fec_mxc.c
> @@ -980,6 +980,8 @@ static int fec_probe(bd_t *bd, int dev_id, uint32_t base_addr,
>  	if (fec_get_hwaddr(edev, dev_id, ethaddr) == 0) {
>  		debug("got MAC%d address from fuse: %pM\n", dev_id, ethaddr);
>  		memcpy(edev->enetaddr, ethaddr, 6);
> +		if (!getenv("ethaddr"))
> +			eth_setenv_enetaddr("ethaddr",mac);
                                                       ^--
of course, this should be ethaddr and not mac. I fixed it myself.

Best regards,
Stefano



-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] fec_mxc: set ethaddr if fuses burned and not previously set
  2013-08-21 11:19 ` Stefano Babic
@ 2013-08-21 13:28   ` Eric Nelson
  0 siblings, 0 replies; 4+ messages in thread
From: Eric Nelson @ 2013-08-21 13:28 UTC (permalink / raw)
  To: u-boot

On 08/21/2013 04:19 AM, Stefano Babic wrote:
> Hi Eric,
>
> On 02/08/2013 19:37, Eric Nelson wrote:
>> Without this change, the following message is generated:
>> 	Warning: FEC using MAC address from net device
>>
>> See doc/README.enetaddr for details.
>>
>> Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
>> ---
>>   drivers/net/fec_mxc.c | 2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
>> index e14a359..886be9c 100644
>> --- a/drivers/net/fec_mxc.c
>> +++ b/drivers/net/fec_mxc.c
>> @@ -980,6 +980,8 @@ static int fec_probe(bd_t *bd, int dev_id, uint32_t base_addr,
>>   	if (fec_get_hwaddr(edev, dev_id, ethaddr) == 0) {
>>   		debug("got MAC%d address from fuse: %pM\n", dev_id, ethaddr);
>>   		memcpy(edev->enetaddr, ethaddr, 6);
>> +		if (!getenv("ethaddr"))
>> +			eth_setenv_enetaddr("ethaddr",mac);
>                                                         ^--
> of course, this should be ethaddr and not mac. I fixed it myself.
>
Thanks Stefano.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-08-21 13:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-02 17:37 [U-Boot] [PATCH] fec_mxc: set ethaddr if fuses burned and not previously set Eric Nelson
2013-08-21 10:42 ` Stefano Babic
2013-08-21 11:19 ` Stefano Babic
2013-08-21 13:28   ` Eric Nelson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox