summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJonathan Liu <net147@gmail.com>2014-06-14 08:59:09 +0200
committerIan Campbell <ijc@hellion.org.uk>2014-07-18 19:42:22 +0100
commitb41d7d05b7a7ab56d961c144ca93b15de0fc4308 (patch)
tree49fb676b1de90bdbc530181beaba64486bc29705 /include
parentae5de5a19df2d25ccf0e58bf59b74ebdb18612a2 (diff)
downloadu-boot-imx-b41d7d05b7a7ab56d961c144ca93b15de0fc4308.zip
u-boot-imx-b41d7d05b7a7ab56d961c144ca93b15de0fc4308.tar.gz
u-boot-imx-b41d7d05b7a7ab56d961c144ca93b15de0fc4308.tar.bz2
sunxi: use random parts of SID to set ethaddr
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@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>
Diffstat (limited to 'include')
-rw-r--r--include/configs/sunxi-common.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index 4083388..13e72d5 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -207,6 +207,8 @@
#define CONFIG_ENV_IS_NOWHERE
#endif
+#define CONFIG_MISC_INIT_R
+
#ifndef CONFIG_SPL_BUILD
#include <config_distro_defaults.h>
#endif