summaryrefslogtreecommitdiff
path: root/cpu/arm1136/mx35
diff options
context:
space:
mode:
authorTerry Lv <r65388@freescale.com>2010-02-24 18:34:13 +0800
committerTerry Lv <r65388@freescale.com>2010-03-04 14:55:00 +0800
commitbd6578e46d1ba93ffe6e00147704d7d18c7e5573 (patch)
tree424b9a30a2e791ff267b2aaa27d0d52186693b8e /cpu/arm1136/mx35
parent871825c1148b233fb562c09204700b59fcd28b67 (diff)
downloadu-boot-imx-bd6578e46d1ba93ffe6e00147704d7d18c7e5573.zip
u-boot-imx-bd6578e46d1ba93ffe6e00147704d7d18c7e5573.tar.gz
u-boot-imx-bd6578e46d1ba93ffe6e00147704d7d18c7e5573.tar.bz2
ENGR00120520: Enable MMU for mx51 and mx35
MMU enable code is missed in mx51 and mx35 u-boot. So add these codes. Signed-off-by: Terry Lv <r65388@freescale.com>
Diffstat (limited to 'cpu/arm1136/mx35')
-rw-r--r--cpu/arm1136/mx35/generic.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/cpu/arm1136/mx35/generic.c b/cpu/arm1136/mx35/generic.c
index 7d1bbca..05feda4 100644
--- a/cpu/arm1136/mx35/generic.c
+++ b/cpu/arm1136/mx35/generic.c
@@ -27,6 +27,7 @@
#include <asm/io.h>
#include <asm/errno.h>
#include <asm/arch/mx35.h>
+#include <asm/cache-cp15.h>
#include "crm_regs.h"
#define CLK_CODE(arm, ahb, sel) (((arm) << 16) + ((ahb) << 8) + (sel))
@@ -116,7 +117,7 @@ static u32 __decode_pll(u32 reg, u32 infreq)
static u32 __get_mcu_main_clk(void)
{
- u32 arm_div, fi, fd;
+ u32 arm_div = 0, fi = 0, fd = 0;
arm_div = __get_arm_div(__REG(CCM_BASE_ADDR + CLKCTL_PDR0), &fi, &fd);
fi *=
__decode_pll(__REG(MCU_PLL),
@@ -357,6 +358,11 @@ int print_cpuinfo(void)
}
#endif
+#if defined(CONFIG_MXC_FEC)
+extern int mxc_fec_initialize(bd_t *bis);
+extern void mxc_fec_set_mac_from_env(char *mac_addr);
+#endif
+
/*
* Initializes on-chip ethernet controllers.
* to override, implement board_eth_init()
@@ -364,15 +370,16 @@ int print_cpuinfo(void)
int cpu_eth_init(bd_t *bis)
{
int rc = -ENODEV;
- char *env = NULL;
#if defined(CONFIG_MXC_FEC)
+ char *env = NULL;
+
rc = mxc_fec_initialize(bis);
-#endif
env = getenv("fec_addr");
if (env)
mxc_fec_set_mac_from_env(env);
+#endif
return rc;
}