xref: /openbmc/u-boot/board/cobra5272/cobra5272.c (revision 0649cd0d)
1 /*
2  * (C) Copyright 2000-2003
3  * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4  *
5  * SPDX-License-Identifier:	GPL-2.0+
6  */
7 
8 #include <common.h>
9 #include <asm/immap.h>
10 
11 DECLARE_GLOBAL_DATA_PTR;
12 
13 int checkboard (void)
14 {
15 	puts ("Board: ");
16 	puts ("senTec COBRA5272 Board\n");
17 	return 0;
18 };
19 
20 int dram_init(void)
21 {
22 	volatile sdramctrl_t *sdp = (sdramctrl_t *) (MMAP_SDRAM);
23 
24 	sdp->sdram_sdtr = 0xf539;
25 	sdp->sdram_sdcr = 0x4211;
26 
27 	/* Dummy write to start SDRAM */
28 	*((volatile unsigned long *) 0) = 0;
29 
30 	gd->ram_size = CONFIG_SYS_SDRAM_SIZE * 1024 * 1024;
31 
32 	return 0;
33 };
34 
35 int testdram (void)
36 {
37 	/* TODO: XXX XXX XXX */
38 	printf ("DRAM test not implemented!\n");
39 
40 	return (0);
41 }
42