blob: a79884cb506fa262d25a2ef5a3613959b9ec0a23 [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
wdenka562e1b2005-01-09 18:21:42 +00002/*
3 * (C) Copyright 2000-2003
4 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
wdenka562e1b2005-01-09 18:21:42 +00005 */
6
7#include <common.h>
Simon Glass49acd562019-12-28 10:45:06 -07008#include <init.h>
TsiChungLiew67064242007-08-15 19:41:06 -05009#include <asm/immap.h>
wdenka562e1b2005-01-09 18:21:42 +000010
Simon Glass088454c2017-03-31 08:40:25 -060011DECLARE_GLOBAL_DATA_PTR;
wdenka562e1b2005-01-09 18:21:42 +000012
13int checkboard (void)
14{
15 puts ("Board: ");
16 puts ("senTec COBRA5272 Board\n");
17 return 0;
18};
19
Simon Glassf1683aa2017-04-06 12:47:05 -060020int dram_init(void)
wdenka562e1b2005-01-09 18:21:42 +000021{
TsiChungLiew67064242007-08-15 19:41:06 -050022 volatile sdramctrl_t *sdp = (sdramctrl_t *) (MMAP_SDRAM);
wdenka562e1b2005-01-09 18:21:42 +000023
24 sdp->sdram_sdtr = 0xf539;
25 sdp->sdram_sdcr = 0x4211;
26
27 /* Dummy write to start SDRAM */
28 *((volatile unsigned long *) 0) = 0;
29
Simon Glass088454c2017-03-31 08:40:25 -060030 gd->ram_size = CONFIG_SYS_SDRAM_SIZE * 1024 * 1024;
31
32 return 0;
wdenka562e1b2005-01-09 18:21:42 +000033};
34
Simon Glass49acd562019-12-28 10:45:06 -070035int testdram(void)
wdenka562e1b2005-01-09 18:21:42 +000036{
37 /* TODO: XXX XXX XXX */
38 printf ("DRAM test not implemented!\n");
39
40 return (0);
41}