public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] Device tree and u-boot passing MAC address questions
@ 2007-12-17 17:56 robert lazarski
  2007-12-17 18:37 ` Timur Tabi
  0 siblings, 1 reply; 7+ messages in thread
From: robert lazarski @ 2007-12-17 17:56 UTC (permalink / raw)
  To: u-boot

Hi all,

I'm noticing some different behavior in between 1.3.0RC3 and the
latest 85xx git repo regarding MAC addresses. With 1.3.0RC3 and
before, my mac address defined for CONFIG_ETH2ADDR et all got passed
into the blob I sent to my 2.6.24RC2 kernel via u-boot. Now, the
address doesn't get set and the kernel sees "00:00:00:00:00:00" for my
eth2 and of course it doesn't work.

I noticed at least one other recent case of this issue, and the
'solution' was to code in the mac address into the dts file - I tried
that and it does work. However, what's a proper solution for passing a
MAC address to the kernel from the latest u-boot?

Thanks,
Robert

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

* [U-Boot-Users] Device tree and u-boot passing MAC address questions
  2007-12-17 17:56 [U-Boot-Users] Device tree and u-boot passing MAC address questions robert lazarski
@ 2007-12-17 18:37 ` Timur Tabi
  2007-12-17 18:47   ` robert lazarski
  0 siblings, 1 reply; 7+ messages in thread
From: Timur Tabi @ 2007-12-17 18:37 UTC (permalink / raw)
  To: u-boot

robert lazarski wrote:

> I noticed at least one other recent case of this issue, and the
> 'solution' was to code in the mac address into the dts file - I tried
> that and it does work. However, what's a proper solution for passing a
> MAC address to the kernel from the latest u-boot?

Which property in the DTS did you update?  Also, you need to make sure that 
CONFIG_HAS_ETH2 is defined in your U-Boot board header file.

-- 
Timur Tabi
Linux kernel developer at Freescale

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

* [U-Boot-Users] Device tree and u-boot passing MAC address questions
  2007-12-17 18:37 ` Timur Tabi
@ 2007-12-17 18:47   ` robert lazarski
  2007-12-17 20:27     ` [U-Boot-Users] Device tree and u-boot passing MAC addressquestions Joe Hamman
  0 siblings, 1 reply; 7+ messages in thread
From: robert lazarski @ 2007-12-17 18:47 UTC (permalink / raw)
  To: u-boot

On Dec 17, 2007 1:37 PM, Timur Tabi <timur@freescale.com> wrote:
> robert lazarski wrote:
>
> > I noticed at least one other recent case of this issue, and the
> > 'solution' was to code in the mac address into the dts file - I tried
> > that and it does work. However, what's a proper solution for passing a
> > MAC address to the kernel from the latest u-boot?
>
> Which property in the DTS did you update?  Also, you need to make sure that
> CONFIG_HAS_ETH2 is defined in your U-Boot board header file.
>

I'm using the same header file in 1.3.0RC3 and the latest 85xx git
repo, which has:

#define CONFIG_TSEC_ENET        1       /* tsec ethernet support */

/* The mac addresses for all ethernet interface */
#if defined(CONFIG_TSEC_ENET)
#define CONFIG_HAS_ETH0
#define CONFIG_ETHADDR   00:E0:0C:00:00:FD
#define CONFIG_HAS_ETH1
#define CONFIG_ETH1ADDR  00:E0:0C:00:01:FD
#define CONFIG_HAS_ETH2
#define CONFIG_ETH2ADDR  00:E0:0C:00:02:FD
#define CONFIG_HAS_ETH3
#define CONFIG_ETH3ADDR  00:E0:0C:00:03:FD
#endif

To get eth2 to link, I put this MAC in my device tree:

local-mac-address = [ 00 E0 0C 00 02 FD ];

Otherwise the kernel just sees a series of zero's . Is this change on
purpose and I missed what I need to do now?

Robert

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

* [U-Boot-Users] Device tree and u-boot passing MAC addressquestions
  2007-12-17 18:47   ` robert lazarski
@ 2007-12-17 20:27     ` Joe Hamman
  2007-12-17 20:30       ` Jerry Van Baren
  2007-12-17 20:56       ` Timur Tabi
  0 siblings, 2 replies; 7+ messages in thread
From: Joe Hamman @ 2007-12-17 20:27 UTC (permalink / raw)
  To: u-boot

Hi Robert,

[snip]

> 
> To get eth2 to link, I put this MAC in my device tree:
> 
> local-mac-address = [ 00 E0 0C 00 02 FD ];
> 
> Otherwise the kernel just sees a series of zero's . Is this change on
> purpose and I missed what I need to do now?
> 

I recently encountered the same problem.  By using the 'fdt b' command, I
was able to see that the MAC addresses were not being filled in prior to
calling the kernel.

Adding aliases to the dtb file fixed my problem. (Search the mailing
lists...)

Best regards,
Joe

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

* [U-Boot-Users] Device tree and u-boot passing MAC addressquestions
  2007-12-17 20:27     ` [U-Boot-Users] Device tree and u-boot passing MAC addressquestions Joe Hamman
@ 2007-12-17 20:30       ` Jerry Van Baren
  2007-12-17 20:37         ` Joe Hamman
  2007-12-17 20:56       ` Timur Tabi
  1 sibling, 1 reply; 7+ messages in thread
From: Jerry Van Baren @ 2007-12-17 20:30 UTC (permalink / raw)
  To: u-boot

Joe Hamman wrote:
> Hi Robert,
> 
> [snip]
> 
>> To get eth2 to link, I put this MAC in my device tree:
>>
>> local-mac-address = [ 00 E0 0C 00 02 FD ];
>>
>> Otherwise the kernel just sees a series of zero's . Is this change on
>> purpose and I missed what I need to do now?
>>
> 
> I recently encountered the same problem.  By using the 'fdt b' command, I
                                                               ^
"fdt p" I presume.                                            |

> was able to see that the MAC addresses were not being filled in prior to
> calling the kernel.
> 
> Adding aliases to the dtb file fixed my problem. (Search the mailing
> lists...)
> 
> Best regards,
> Joe

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

* [U-Boot-Users] Device tree and u-boot passing MAC addressquestions
  2007-12-17 20:30       ` Jerry Van Baren
@ 2007-12-17 20:37         ` Joe Hamman
  0 siblings, 0 replies; 7+ messages in thread
From: Joe Hamman @ 2007-12-17 20:37 UTC (permalink / raw)
  To: u-boot



> -----Original Message-----
> From: Jerry Van Baren [mailto:gerald.vanbaren at ge.com]
> Sent: Monday, December 17, 2007 2:30 PM
> To: joe.hamman at embeddedspecialties.com
> Cc: 'robert lazarski'; 'U-Boot-Users'
> Subject: Re: [U-Boot-Users] Device tree and u-boot passing MAC
> addressquestions
> 
> Joe Hamman wrote:
> > Hi Robert,
> >
> > [snip]
> >
> >> To get eth2 to link, I put this MAC in my device tree:
> >>
> >> local-mac-address = [ 00 E0 0C 00 02 FD ];
> >>
> >> Otherwise the kernel just sees a series of zero's . Is this change on
> >> purpose and I missed what I need to do now?
> >>
> >
> > I recently encountered the same problem.  By using the 'fdt b' command,
> I
>                                                                ^
> "fdt p" I presume.                                            |

Sorry, I should have listed all the steps:
tftp 10000 filename.dtb		# load the dtb
fdt a 10000				# tell fdt where it loaded
fdt b					# do the board specific setup (fills
in MAC)
fdt p					# verify the values are correct

> 
> > was able to see that the MAC addresses were not being filled in prior to
> > calling the kernel.
> >
> > Adding aliases to the dtb file fixed my problem. (Search the mailing
> > lists...)
> >
> > Best regards,
> > Joe

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

* [U-Boot-Users] Device tree and u-boot passing MAC addressquestions
  2007-12-17 20:27     ` [U-Boot-Users] Device tree and u-boot passing MAC addressquestions Joe Hamman
  2007-12-17 20:30       ` Jerry Van Baren
@ 2007-12-17 20:56       ` Timur Tabi
  1 sibling, 0 replies; 7+ messages in thread
From: Timur Tabi @ 2007-12-17 20:56 UTC (permalink / raw)
  To: u-boot

Joe Hamman wrote:

> I recently encountered the same problem.  By using the 'fdt b' command, I
> was able to see that the MAC addresses were not being filled in prior to
> calling the kernel.

Most device tree properties are not filled in until you execute the bootm 
command.  The MAC address is one such property.

> Adding aliases to the dtb file fixed my problem. (Search the mailing
> lists...)

It looks like U-Boot was updated before the device trees were updated.  When the 
code for aliases was added to U-Boot, the code for older device trees should not 
have been removed.

-- 
Timur Tabi
Linux kernel developer at Freescale

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

end of thread, other threads:[~2007-12-17 20:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-17 17:56 [U-Boot-Users] Device tree and u-boot passing MAC address questions robert lazarski
2007-12-17 18:37 ` Timur Tabi
2007-12-17 18:47   ` robert lazarski
2007-12-17 20:27     ` [U-Boot-Users] Device tree and u-boot passing MAC addressquestions Joe Hamman
2007-12-17 20:30       ` Jerry Van Baren
2007-12-17 20:37         ` Joe Hamman
2007-12-17 20:56       ` Timur Tabi

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