public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Ian Campbell <ijc@hellion.org.uk>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] sunxi: use random parts of SID to set ethaddr
Date: Sat, 14 Jun 2014 10:46:37 +0100	[thread overview]
Message-ID: <1402739197.31087.81.camel@dagon.hellion.org.uk> (raw)
In-Reply-To: <1402729149-9266-1-git-send-email-hdegoede@redhat.com>

On Sat, 2014-06-14 at 08:59 +0200, Hans de Goede wrote:
> From: Jonathan Liu <net147@gmail.com>
> 
> Similar to the USB NIC found on OMAP5uEVM, PandaBoard and BeagleBoard-XM
> boards, the sunxi SoCs have a NIC onboard without an embedded MAC address.
> 
> Just like the omap used on these boards, the sunxi SoCs do have a unique chip
> id, in the form of the 128 bit SID register:
> http://linux-sunxi.org/SID_Register_Guide
> 
> So mimick the BeagleBoard-XM board code (commit 548a64d8) and use the chip id
> to generate a unique fixed MAC address.
> 
> We check for the SID not being all 0, since some early A20 batches
> shipped without having there SID programmed.
> 
> Note we use specific parts of the 128 bits, since some parts indicate the
> SoC family / revision, and thus are fixed. The algorithm for this was taken
> from the linux-sunxi.org kernels.
> 
> Signed-off-by: Jonathan Liu <net147@gmail.com>
> [hdegoede at redhat.com: Expanded the commit message with some more info]
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>

Acked-by: Ian Campbell <ijc@hellion.org.uk>

  reply	other threads:[~2014-06-14  9:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-14  6:59 [U-Boot] [PATCH] sunxi: use random parts of SID to set ethaddr Hans de Goede
2014-06-14  9:46 ` Ian Campbell [this message]
2014-07-23 19:05   ` Siarhei Siamashka

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=1402739197.31087.81.camel@dagon.hellion.org.uk \
    --to=ijc@hellion.org.uk \
    --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