blob: a0a416b50c129726a36e586a54e8fe71a61e8d5b [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>
TsiChungLiewcfa2b482007-08-15 19:41:06 -05008#include <asm/immap.h>
wdenkc4cbd342005-01-09 18:21:42 +00009
Simon Glass39f90ba2017-03-31 08:40:25 -060010DECLARE_GLOBAL_DATA_PTR;
wdenkc4cbd342005-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 Glassd35f3382017-04-06 12:47:05 -060019int dram_init(void)
wdenkc4cbd342005-01-09 18:21:42 +000020{
TsiChungLiewcfa2b482007-08-15 19:41:06 -050021 volatile sdramctrl_t *sdp = (sdramctrl_t *) (MMAP_SDRAM);
wdenkc4cbd342005-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 Glass39f90ba2017-03-31 08:40:25 -060029 gd->ram_size = CONFIG_SYS_SDRAM_SIZE * 1024 * 1024;
30
31 return 0;
wdenkc4cbd342005-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}