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