blob: 9fab24ebb9de422fed009e7ef1153c13700064de [file] [log] [blame]
wdenkabf7a7c2003-12-08 01:34:36 +00001/*
2 * (C) Copyright 2000-2003
3 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4 *
Alison Wang95bed1f2012-03-26 21:49:04 +00005 * Copyright (C) 2012 Freescale Semiconductor, Inc. All Rights Reserved.
6 *
Wolfgang Denkd79de1d2013-07-08 09:37:19 +02007 * SPDX-License-Identifier: GPL-2.0+
wdenkabf7a7c2003-12-08 01:34:36 +00008 */
9
10#include <common.h>
TsiChungLiew1692b482007-08-15 20:32:06 -050011#include <asm/immap.h>
Alison Wang95bed1f2012-03-26 21:49:04 +000012#include <asm/io.h>
wdenkabf7a7c2003-12-08 01:34:36 +000013
wdenke65527f2004-02-12 00:47:09 +000014
15int checkboard (void) {
16 puts ("Board: ");
TsiChungLiew1692b482007-08-15 20:32:06 -050017 puts ("Freescale MCF5272C3 EVB\n");
wdenkabf7a7c2003-12-08 01:34:36 +000018 return 0;
wdenke65527f2004-02-12 00:47:09 +000019 };
20
Simon Glassb4de3f32017-03-31 08:40:24 -060021phys_size_t initdram(void)
22{
Alison Wang95bed1f2012-03-26 21:49:04 +000023 sdramctrl_t * sdp = (sdramctrl_t *)(MMAP_SDRAM);
wdenke65527f2004-02-12 00:47:09 +000024
Alison Wang95bed1f2012-03-26 21:49:04 +000025 out_be16(&sdp->sdram_sdtr, 0xf539);
26 out_be16(&sdp->sdram_sdcr, 0x4211);
wdenke65527f2004-02-12 00:47:09 +000027
28 /* Dummy write to start SDRAM */
29 *((volatile unsigned long *)0) = 0;
30
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020031 return CONFIG_SYS_SDRAM_SIZE * 1024 * 1024;
wdenke65527f2004-02-12 00:47:09 +000032 };
33
34int testdram (void) {
35 /* TODO: XXX XXX XXX */
36 printf ("DRAM test not implemented!\n");
wdenkabf7a7c2003-12-08 01:34:36 +000037
wdenke65527f2004-02-12 00:47:09 +000038 return (0);
wdenkabf7a7c2003-12-08 01:34:36 +000039}