U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Robert P. J. Day <rpjday@crashcourse.ca>
To: u-boot@lists.denx.de
Subject: [U-Boot] wanting to confirm i'm setting the MAC address the right way
Date: Tue, 24 May 2016 12:31:25 -0400 (EDT)	[thread overview]
Message-ID: <alpine.LFD.2.20.1605241224160.4837@localhost.localdomain> (raw)


  i want to use the fdt_fixup_ethernet() routine to automate most of
the work of setting the MAC address in the FDT before passing it to
the kernel, so here's what i'm about to do, and i'd appreciate someone
saying, "yup, looks good" if it will indeed work.

  on either a MPC8280 or MPC8360 system, i will first set up the DTS
file with some variation of:

        aliases {
                ethernet0 = &ucc0;
        };

	... snip ...

                ucc0:ucc at 2000 {
                        device_type = "network";
                        compatible = "ucc_geth";
                        model = "UCC";
                        device-id = <1>;
                        reg = <0x2000 0x200>;
                        interrupts = <0x20>;
                        local-mac-address = [ 00 01 02 03 04 05 ];
                        rx-clock = <0x1c>;  // CLK12
                        tx-clock = <0x1b>;  // CLK11
                        phy-handle = <&PHY0>;
                };

at that point, given all the work done in fdt_fixup_ethernet(), i
*think* that all i need to do in the board's ft_board_setup() routine
is:

  eth_setenv_enetaddr("ethaddr", <physical addr of 6-byte MAC address>);

is that about it? it *looks* like all i have to do, and
fdt_fixup_etherhet() will do all the rest.

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================

             reply	other threads:[~2016-05-24 16:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-24 16:31 Robert P. J. Day [this message]
2016-05-25  2:18 ` [U-Boot] wanting to confirm i'm setting the MAC address the right way Bin Meng
2016-05-25 10:09   ` Robert P. J. Day

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LFD.2.20.1605241224160.4837@localhost.localdomain \
    --to=rpjday@crashcourse.ca \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox