blob: a0a416b50c129726a36e586a54e8fe71a61e8d5b [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>
TsiChungLiew67064242007-08-15 19:41:06 -05008#include <asm/immap.h>
wdenka562e1b2005-01-09 18:21:42 +00009
Simon Glass088454c2017-03-31 08:40:25 -060010DECLARE_GLOBAL_DATA_PTR;
wdenka562e1b2005-01-09 18:21:42 +000011
12int checkboard (void)
13{
14 puts ("Board: ");
15 puts ("senTec COBRA5272 Board\n");
16 return 0;
17};
18
Simon Glassf1683aa2017-04-06 12:47:05 -060019int dram_init(void)
wdenka562e1b2005-01-09 18:21:42 +000020{
TsiChungLiew67064242007-08-15 19:41:06 -050021 volatile sdramctrl_t *sdp = (sdramctrl_t *) (MMAP_SDRAM);
wdenka562e1b2005-01-09 18:21:42 +000022
23 sdp->sdram_sdtr = 0xf539;
24 sdp->sdram_sdcr = 0x4211;
25
26 /* Dummy write to start SDRAM */
27 *((volatile unsigned long *) 0) = 0;
28
Simon Glass088454c2017-03-31 08:40:25 -060029 gd->ram_size = CONFIG_SYS_SDRAM_SIZE * 1024 * 1024;
30
31 return 0;
wdenka562e1b2005-01-09 18:21:42 +000032};
33
34int testdram (void)
35{
36 /* TODO: XXX XXX XXX */
37 printf ("DRAM test not implemented!\n");
38
39 return (0);
40}