2003-12-08 01:34:36 +00:00
|
|
|
/*
|
|
|
|
* (C) Copyright 2000-2003
|
|
|
|
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
|
|
|
*
|
2012-03-26 21:49:04 +00:00
|
|
|
* Copyright (C) 2012 Freescale Semiconductor, Inc. All Rights Reserved.
|
|
|
|
*
|
2013-07-08 07:37:19 +00:00
|
|
|
* SPDX-License-Identifier: GPL-2.0+
|
2003-12-08 01:34:36 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <common.h>
|
2007-08-16 01:32:06 +00:00
|
|
|
#include <asm/immap.h>
|
2012-03-26 21:49:04 +00:00
|
|
|
#include <asm/io.h>
|
2003-12-08 01:34:36 +00:00
|
|
|
|
2004-02-12 00:47:09 +00:00
|
|
|
|
|
|
|
int checkboard (void) {
|
|
|
|
puts ("Board: ");
|
2007-08-16 01:32:06 +00:00
|
|
|
puts ("Freescale MCF5272C3 EVB\n");
|
2003-12-08 01:34:36 +00:00
|
|
|
return 0;
|
2004-02-12 00:47:09 +00:00
|
|
|
};
|
|
|
|
|
2008-06-09 21:03:40 +00:00
|
|
|
phys_size_t initdram (int board_type) {
|
2012-03-26 21:49:04 +00:00
|
|
|
sdramctrl_t * sdp = (sdramctrl_t *)(MMAP_SDRAM);
|
2004-02-12 00:47:09 +00:00
|
|
|
|
2012-03-26 21:49:04 +00:00
|
|
|
out_be16(&sdp->sdram_sdtr, 0xf539);
|
|
|
|
out_be16(&sdp->sdram_sdcr, 0x4211);
|
2004-02-12 00:47:09 +00:00
|
|
|
|
|
|
|
/* Dummy write to start SDRAM */
|
|
|
|
*((volatile unsigned long *)0) = 0;
|
|
|
|
|
2008-10-16 13:01:15 +00:00
|
|
|
return CONFIG_SYS_SDRAM_SIZE * 1024 * 1024;
|
2004-02-12 00:47:09 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
int testdram (void) {
|
|
|
|
/* TODO: XXX XXX XXX */
|
|
|
|
printf ("DRAM test not implemented!\n");
|
2003-12-08 01:34:36 +00:00
|
|
|
|
2004-02-12 00:47:09 +00:00
|
|
|
return (0);
|
2003-12-08 01:34:36 +00:00
|
|
|
}
|