blob: 69a9df942311949cc6712be30ede9712aea7ba77 [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>
Simon Glass49acd562019-12-28 10:45:06 -07008#include <init.h>
Simon Glass401d1c42020-10-30 21:38:53 -06009#include <asm/global_data.h>
TsiChungLiew67064242007-08-15 19:41:06 -050010#include <asm/immap.h>
wdenka562e1b2005-01-09 18:21:42 +000011
Simon Glass088454c2017-03-31 08:40:25 -060012DECLARE_GLOBAL_DATA_PTR;
wdenka562e1b2005-01-09 18:21:42 +000013
14int checkboard (void)
15{
16 puts ("Board: ");
17 puts ("senTec COBRA5272 Board\n");
18 return 0;
19};
20
Simon Glassf1683aa2017-04-06 12:47:05 -060021int dram_init(void)
wdenka562e1b2005-01-09 18:21:42 +000022{
TsiChungLiew67064242007-08-15 19:41:06 -050023 volatile sdramctrl_t *sdp = (sdramctrl_t *) (MMAP_SDRAM);
wdenka562e1b2005-01-09 18:21:42 +000024
25 sdp->sdram_sdtr = 0xf539;
26 sdp->sdram_sdcr = 0x4211;
27
28 /* Dummy write to start SDRAM */
29 *((volatile unsigned long *) 0) = 0;
30
Tom Riniaa6e94d2022-11-16 13:10:37 -050031 gd->ram_size = CFG_SYS_SDRAM_SIZE * 1024 * 1024;
Simon Glass088454c2017-03-31 08:40:25 -060032
33 return 0;
wdenka562e1b2005-01-09 18:21:42 +000034};
35
Simon Glass49acd562019-12-28 10:45:06 -070036int testdram(void)
wdenka562e1b2005-01-09 18:21:42 +000037{
38 /* TODO: XXX XXX XXX */
39 printf ("DRAM test not implemented!\n");
40
41 return (0);
42}