2018-05-06 21:58:06 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0+
|
2005-01-09 18:21:42 +00:00
|
|
|
/*
|
|
|
|
* (C) Copyright 2000-2003
|
|
|
|
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <common.h>
|
2019-12-28 17:45:06 +00:00
|
|
|
#include <init.h>
|
2020-10-31 03:38:53 +00:00
|
|
|
#include <asm/global_data.h>
|
2007-08-16 00:41:06 +00:00
|
|
|
#include <asm/immap.h>
|
2005-01-09 18:21:42 +00:00
|
|
|
|
2017-03-31 14:40:25 +00:00
|
|
|
DECLARE_GLOBAL_DATA_PTR;
|
2005-01-09 18:21:42 +00:00
|
|
|
|
|
|
|
int checkboard (void)
|
|
|
|
{
|
|
|
|
puts ("Board: ");
|
|
|
|
puts ("senTec COBRA5272 Board\n");
|
|
|
|
return 0;
|
|
|
|
};
|
|
|
|
|
2017-04-06 18:47:05 +00:00
|
|
|
int dram_init(void)
|
2005-01-09 18:21:42 +00:00
|
|
|
{
|
2007-08-16 00:41:06 +00:00
|
|
|
volatile sdramctrl_t *sdp = (sdramctrl_t *) (MMAP_SDRAM);
|
2005-01-09 18:21:42 +00:00
|
|
|
|
|
|
|
sdp->sdram_sdtr = 0xf539;
|
|
|
|
sdp->sdram_sdcr = 0x4211;
|
|
|
|
|
|
|
|
/* Dummy write to start SDRAM */
|
|
|
|
*((volatile unsigned long *) 0) = 0;
|
|
|
|
|
2022-11-16 18:10:37 +00:00
|
|
|
gd->ram_size = CFG_SYS_SDRAM_SIZE * 1024 * 1024;
|
2017-03-31 14:40:25 +00:00
|
|
|
|
|
|
|
return 0;
|
2005-01-09 18:21:42 +00:00
|
|
|
};
|
|
|
|
|
2019-12-28 17:45:06 +00:00
|
|
|
int testdram(void)
|
2005-01-09 18:21:42 +00:00
|
|
|
{
|
|
|
|
/* TODO: XXX XXX XXX */
|
|
|
|
printf ("DRAM test not implemented!\n");
|
|
|
|
|
|
|
|
return (0);
|
|
|
|
}
|