From e4d34492017c95e4041ea0c581e1ab8d1d49381b Mon Sep 17 00:00:00 2001 From: Stefano Babic Date: Fri, 5 Mar 2010 17:54:37 +0100 Subject: MX51: removed warnings for the mx51evk The patch removes warnings at compile time and provides some cleanup code: - Removed comment on NAND (not yet supported) from lowlevel_init.S - Removed NFMS bit definition from imx-regs.h The bit is only related to MX.25/35 and can lead to confusion - Moved is_soc_rev() to soc specific code (removed from mx51evk.c) Signed-off-by: Stefano Babic --- cpu/arm_cortexa8/mx51/clock.c | 3 ++- cpu/arm_cortexa8/mx51/iomux.c | 1 + cpu/arm_cortexa8/mx51/lowlevel_init.S | 1 - cpu/arm_cortexa8/mx51/soc.c | 7 ++++++- cpu/arm_cortexa8/mx51/speed.c | 1 + 5 files changed, 10 insertions(+), 3 deletions(-) (limited to 'cpu') diff --git a/cpu/arm_cortexa8/mx51/clock.c b/cpu/arm_cortexa8/mx51/clock.c index 3c6f0c0..38480ac 100644 --- a/cpu/arm_cortexa8/mx51/clock.c +++ b/cpu/arm_cortexa8/mx51/clock.c @@ -28,6 +28,7 @@ #include #include #include +#include enum pll_clocks { PLL1_CLOCK = 0, @@ -42,7 +43,7 @@ struct mxc_pll_reg *mxc_plls[PLL_CLOCKS] = { [PLL3_CLOCK] = (struct mxc_pll_reg *)PLL3_BASE_ADDR, }; -struct mxc_ccm_reg *mxc_ccm = MXC_CCM_BASE; +struct mxc_ccm_reg *mxc_ccm = (struct mxc_ccm_reg *)MXC_CCM_BASE; /* * Calculate the frequency of this pll. diff --git a/cpu/arm_cortexa8/mx51/iomux.c b/cpu/arm_cortexa8/mx51/iomux.c index fc39e8a..62b2954 100644 --- a/cpu/arm_cortexa8/mx51/iomux.c +++ b/cpu/arm_cortexa8/mx51/iomux.c @@ -25,6 +25,7 @@ #include #include #include +#include /* IOMUX register (base) addresses */ enum iomux_reg_addr { diff --git a/cpu/arm_cortexa8/mx51/lowlevel_init.S b/cpu/arm_cortexa8/mx51/lowlevel_init.S index 680a90e..700506e 100644 --- a/cpu/arm_cortexa8/mx51/lowlevel_init.S +++ b/cpu/arm_cortexa8/mx51/lowlevel_init.S @@ -276,7 +276,6 @@ lowlevel_init: init_clock - /* return from mxc_nand_load */ /* r12 saved upper lr*/ mov pc,lr diff --git a/cpu/arm_cortexa8/mx51/soc.c b/cpu/arm_cortexa8/mx51/soc.c index 5e69301..2a139b2 100644 --- a/cpu/arm_cortexa8/mx51/soc.c +++ b/cpu/arm_cortexa8/mx51/soc.c @@ -25,9 +25,14 @@ #include #include +#include #include #include +#ifdef CONFIG_FSL_ESDHC +#include +#endif + u32 get_cpu_rev(void) { int reg; @@ -65,7 +70,7 @@ int print_cpuinfo(void) printf("CPU: Freescale i.MX51 family %d.%dV at %d MHz\n", (cpurev & 0xF0) >> 4, (cpurev & 0x0F) >> 4, - get_mcu_main_clk() / 1000000); + mxc_get_clock(MXC_ARM_CLK) / 1000000); return 0; } #endif diff --git a/cpu/arm_cortexa8/mx51/speed.c b/cpu/arm_cortexa8/mx51/speed.c index 10acbbf..a444def 100644 --- a/cpu/arm_cortexa8/mx51/speed.c +++ b/cpu/arm_cortexa8/mx51/speed.c @@ -26,6 +26,7 @@ #include #include +#include int get_clocks(void) { -- cgit v1.1