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 DECLARE_GLOBAL_DATA_PTR;
15 
16 int checkboard (void) {
17 	puts ("Board: ");
18 	puts ("Freescale MCF5272C3 EVB\n");
19 	return 0;
20 	};
21 
22 int dram_init(void)
23 {
24 	sdramctrl_t * sdp = (sdramctrl_t *)(MMAP_SDRAM);
25 
26 	out_be16(&sdp->sdram_sdtr, 0xf539);
27 	out_be16(&sdp->sdram_sdcr, 0x4211);
28 
29 	/* Dummy write to start SDRAM */
30 	*((volatile unsigned long *)0) = 0;
31 
32 	gd->ram_size = CONFIG_SYS_SDRAM_SIZE * 1024 * 1024;
33 
34 	return 0;
35 	};
36 
37 int testdram (void) {
38 	/* TODO: XXX XXX XXX */
39 	printf ("DRAM test not implemented!\n");
40 
41 	return (0);
42 }
43