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