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