From mboxrd@z Thu Jan 1 00:00:00 1970 From: Siarhei Siamashka Date: Wed, 23 Jul 2014 22:05:11 +0300 Subject: [U-Boot] [PATCH] sunxi: use random parts of SID to set ethaddr In-Reply-To: <1402739197.31087.81.camel@dagon.hellion.org.uk> References: <1402729149-9266-1-git-send-email-hdegoede@redhat.com> <1402739197.31087.81.camel@dagon.hellion.org.uk> Message-ID: <20140723220511.55be1de3@i7> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Sat, 14 Jun 2014 10:46:37 +0100 Ian Campbell wrote: > On Sat, 2014-06-14 at 08:59 +0200, Hans de Goede wrote: > > From: Jonathan Liu > > > > 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 > > [hdegoede at redhat.com: Expanded the commit message with some more info] > > Signed-off-by: Hans de Goede > > Acked-by: Ian Campbell Acked-by: Siarhei Siamashka -- Best regards, Siarhei Siamashka