summaryrefslogtreecommitdiff
path: root/cpu
diff options
context:
space:
mode:
authorTerry Lv <r65388@freescale.com>2010-01-08 15:30:26 +0800
committerTerry Lv <r65388@freescale.com>2010-01-11 19:32:42 +0800
commita5510c49adac4e31c0bc13bad45ee073b3940dc5 (patch)
treeb803d30b72344e2a95fbfed78d939d813e378036 /cpu
parentc3b0a8706e5b3eb84875830e9acaa80cac088c14 (diff)
downloadu-boot-imx-a5510c49adac4e31c0bc13bad45ee073b3940dc5.zip
u-boot-imx-a5510c49adac4e31c0bc13bad45ee073b3940dc5.tar.gz
u-boot-imx-a5510c49adac4e31c0bc13bad45ee073b3940dc5.tar.bz2
ENGR00119890: Set right mac addr to FEC register in init
The mac addr set to FEC is smc911x's. So add a environment "fec_addr" to set fec address. Signed-off-by: Terry Lv <r65388@freescale.com>
Diffstat (limited to 'cpu')
-rw-r--r--cpu/arm1136/mx35/generic.c9
-rw-r--r--cpu/arm926ejs/mx25/generic.c9
2 files changed, 16 insertions, 2 deletions
diff --git a/cpu/arm1136/mx35/generic.c b/cpu/arm1136/mx35/generic.c
index e9abe0c..7d1bbca 100644
--- a/cpu/arm1136/mx35/generic.c
+++ b/cpu/arm1136/mx35/generic.c
@@ -2,7 +2,7 @@
* (C) Copyright 2007
* Sascha Hauer, Pengutronix
*
- * (C) Copyright 2008-2009 Freescale Semiconductor, Inc.
+ * (C) Copyright 2008-2010 Freescale Semiconductor, Inc.
*
* See file CREDITS for list of people who contributed to this
* project.
@@ -364,9 +364,16 @@ int print_cpuinfo(void)
int cpu_eth_init(bd_t *bis)
{
int rc = -ENODEV;
+ char *env = NULL;
+
#if defined(CONFIG_MXC_FEC)
rc = mxc_fec_initialize(bis);
#endif
+
+ env = getenv("fec_addr");
+ if (env)
+ mxc_fec_set_mac_from_env(env);
+
return rc;
}
diff --git a/cpu/arm926ejs/mx25/generic.c b/cpu/arm926ejs/mx25/generic.c
index bda3fbe..a47d796 100644
--- a/cpu/arm926ejs/mx25/generic.c
+++ b/cpu/arm926ejs/mx25/generic.c
@@ -2,7 +2,7 @@
* (C) Copyright 2007
* Sascha Hauer, Pengutronix
*
- * (C) Copyright 2009 Freescale Semiconductor
+ * (C) Copyright 2009-2010 Freescale Semiconductor
*
* See file CREDITS for list of people who contributed to this
* project.
@@ -119,9 +119,16 @@ int print_cpuinfo(void)
int cpu_eth_init(bd_t *bis)
{
int rc = -ENODEV;
+ char *env = NULL;
+
#if defined(CONFIG_MXC_FEC)
rc = mxc_fec_initialize(bis);
#endif
+
+ env = getenv("fec_addr");
+ if (env)
+ mxc_fec_set_mac_from_env(env);
+
return rc;
}
#endif