1 /*
2  * (C) Copyright 2000-2003
3  * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4  *
5  * Copyright (C) 2012 Freescale Semiconductor, Inc. All Rights Reserved.
6  *
7  * SPDX-License-Identifier:	GPL-2.0+
8  */
9 
10 #include <common.h>
11 #include <asm/immap.h>
12 #include <asm/io.h>
13 
14 
15 int checkboard (void) {
16 	puts ("Board: ");
17 	puts ("Freescale MCF5272C3 EVB\n");
18 	return 0;
19 	};
20 
21 phys_size_t initdram (int board_type) {
22 	sdramctrl_t * sdp = (sdramctrl_t *)(MMAP_SDRAM);
23 
24 	out_be16(&sdp->sdram_sdtr, 0xf539);
25 	out_be16(&sdp->sdram_sdcr, 0x4211);
26 
27 	/* Dummy write to start SDRAM */
28 	*((volatile unsigned long *)0) = 0;
29 
30 	return CONFIG_SYS_SDRAM_SIZE * 1024 * 1024;
31 	};
32 
33 int testdram (void) {
34 	/* TODO: XXX XXX XXX */
35 	printf ("DRAM test not implemented!\n");
36 
37 	return (0);
38 }
39