summaryrefslogtreecommitdiff
path: root/board/freescale/mx53_evk
diff options
context:
space:
mode:
authorJason Liu <r64343@freescale.com>2010-05-19 22:15:05 +0800
committerJason Liu <r64343@freescale.com>2010-05-19 22:23:42 +0800
commitaf46d9f54b192076c1e3096299d594e2783fc175 (patch)
tree6c5c61d313950c0ee0e004d9635baf403664b8dd /board/freescale/mx53_evk
parenta0e1ec967f99d08ce0a48c45a509959453e5f3a7 (diff)
downloadu-boot-imx-af46d9f54b192076c1e3096299d594e2783fc175.zip
u-boot-imx-af46d9f54b192076c1e3096299d594e2783fc175.tar.gz
u-boot-imx-af46d9f54b192076c1e3096299d594e2783fc175.tar.bz2
ENGR00123630 Set ddr clk clock according to the board IDrel_imx_2.6.31_10.05.02imx_v2009.08_10.05.02
Set DDR clock to 400Mhz on MX53-EVK with DDR2 1GByte RevB Set DDR clock to 300Mhz on MX53-EVK with DDR2 2GByte RevA1 Remove the clock dump during boot, user can use clk command to get the clock information. Using help clk to get the command help Signed-off-by:Jason Liu <r64343@freescale.com>
Diffstat (limited to 'board/freescale/mx53_evk')
-rw-r--r--board/freescale/mx53_evk/mx53_evk.c29
1 files changed, 28 insertions, 1 deletions
diff --git a/board/freescale/mx53_evk/mx53_evk.c b/board/freescale/mx53_evk/mx53_evk.c
index 6be0b37..98d5938 100644
--- a/board/freescale/mx53_evk/mx53_evk.c
+++ b/board/freescale/mx53_evk/mx53_evk.c
@@ -44,6 +44,10 @@
#include <asm/arch/mmu.h>
#endif
+#ifdef CONFIG_CMD_CLOCK
+#include <asm/clock.h>
+#endif
+
DECLARE_GLOBAL_DATA_PTR;
static u32 system_rev;
@@ -415,6 +419,25 @@ static int __print_board_info(int id0, int id1)
return ret;
}
+static int _identify_board_fix_up(int id0, int id1)
+{
+ int ret = 0;
+
+#ifdef CONFIG_CMD_CLOCK
+ /* For EVK RevB, set DDR to 400MHz */
+ if (id0 == 21 && id1 == 15) {
+ ret = clk_config(CONFIG_REF_CLK_FREQ, 400, PERIPH_CLK);
+ if (ret < 0)
+ return ret;
+
+ ret = clk_config(CONFIG_REF_CLK_FREQ, 400, DDR_CLK);
+ if (ret < 0)
+ return ret;
+ }
+#endif
+ return ret;
+}
+
int identify_board_id(void)
{
int ret = 0;
@@ -440,6 +463,10 @@ int identify_board_id(void)
return ret;
ret = __print_board_info(bd_id0, bd_id1);
+ if (ret < 0)
+ return ret;
+
+ ret = _identify_board_fix_up(bd_id0, bd_id1);
return ret;
@@ -682,7 +709,7 @@ int board_late_init(void)
int checkboard(void)
{
- printf("Board: ");
+ printf("Board: ");
#ifdef CONFIG_I2C_MXC
identify_board_id();