blob: a79884cb506fa262d25a2ef5a3613959b9ec0a23 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
wdenkc4cbd342005-01-09 18:21:42 +00002/*
3 * (C) Copyright 2000-2003
4 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
wdenkc4cbd342005-01-09 18:21:42 +00005 */
6
7#include <common.h>
Simon Glass0ffd9db2019-12-28 10:45:06 -07008#include <init.h>
TsiChungLiewcfa2b482007-08-15 19:41:06 -05009#include <asm/immap.h>
wdenkc4cbd342005-01-09 18:21:42 +000010
Simon Glass39f90ba2017-03-31 08:40:25 -060011DECLARE_GLOBAL_DATA_PTR;
wdenkc4cbd342005-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 Glassd35f3382017-04-06 12:47:05 -060020int dram_init(void)
wdenkc4cbd342005-01-09 18:21:42 +000021{
TsiChungLiewcfa2b482007-08-15 19:41:06 -050022 volatile sdramctrl_t *sdp = (sdramctrl_t *) (MMAP_SDRAM);
wdenkc4cbd342005-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 Glass39f90ba2017-03-31 08:40:25 -060030 gd->ram_size = CONFIG_SYS_SDRAM_SIZE * 1024 * 1024;
31
32 return 0;
wdenkc4cbd342005-01-09 18:21:42 +000033};
34
Simon Glass0ffd9db2019-12-28 10:45:06 -070035int testdram(void)
wdenkc4cbd342005-01-09 18:21:42 +000036{
37 /* TODO: XXX XXX XXX */
38 printf ("DRAM test not implemented!\n");
39
40 return (0);
41}