From: shawn.guo@freescale.com (Shawn Guo)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: imx6: init enet MAC address
Date: Thu, 22 May 2014 14:12:30 +0800 [thread overview]
Message-ID: <20140522061229.GC32184@dragon> (raw)
In-Reply-To: <1400566266-22746-1-git-send-email-b38611@freescale.com>
On Tue, May 20, 2014 at 02:11:06PM +0800, Fugang Duan wrote:
> Enet get MAC address order:
> From module parameters or kernel command line -> device tree ->
> pfuse -> mac registers set by bootloader -> random mac address.
>
> When there have no "fec.macaddr" parameters set in kernel command
> line, enet driver get MAC address from device tree. And then if
> the MAC address set in device tree and is valid, enet driver get
> MAC address from device tree. Otherwise, enet get MAC address from
> pfuse. So, in the condition, update the MAC address (read from pfuse)
> to device tree.
>
> Signed-off-by: Fugang Duan <B38611@freescale.com>
I would think this is a board level configuration than SoC one. Though
the register name in Reference Manual, OCOTP_MAC0 and OCOTP_MAC1,
recommends that these fuse bits can be used to store MAC address, it's
really up to board designers how to use these fuse bits, e.g. how the
MAC bytes will be stored in these 64 fuse bits, or on some board designs
which do not have Ethernet interface at all, these bits can totally be
used for other purpose.
So to me, it's inappropriate to assume that these fuse bits always hold
MAC address, and do this setup in kernel unconditionally for every
board. I think it's more reasonable to do this setup in bootloader,
which should be more board specific and can understand these fuse bits
better.
Shawn
next prev parent reply other threads:[~2014-05-22 6:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-20 6:11 [PATCH] ARM: imx6: init enet MAC address Fugang Duan
2014-05-20 9:03 ` Sascha Hauer
2014-05-20 9:24 ` fugang.duan at freescale.com
2014-05-20 9:57 ` Sascha Hauer
2014-05-20 10:23 ` fugang.duan at freescale.com
2014-05-21 6:46 ` Shawn Guo
2014-05-22 6:12 ` Shawn Guo [this message]
2014-05-22 7:34 ` fugang.duan at freescale.com
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=20140522061229.GC32184@dragon \
--to=shawn.guo@freescale.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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;
as well as URLs for NNTP newsgroup(s).