blob: 0ceaa1f772fa1d40341490350362c71079286176 [file] [log] [blame]
wdenkc4cbd342005-01-09 18:21:42 +00001/*
2 * (C) Copyright 2000-2003
3 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4 *
Wolfgang Denkd79de1d2013-07-08 09:37:19 +02005 * SPDX-License-Identifier: GPL-2.0+
wdenkc4cbd342005-01-09 18:21:42 +00006 */
7
8#include <common.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
35int testdram (void)
36{
37 /* TODO: XXX XXX XXX */
38 printf ("DRAM test not implemented!\n");
39
40 return (0);
41}