blob: c3160cef2091b83dbd744f9a158cf96e86d9eb6b [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 *
wdenkabf7a7c2003-12-08 01:34:36 +00007 * See file CREDITS for list of people who contributed to this
8 * project.
9 *
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License as
12 * published by the Free Software Foundation; either version 2 of
13 * the License, or (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
23 * MA 02111-1307 USA
24 */
25
26#include <common.h>
TsiChungLiew1692b482007-08-15 20:32:06 -050027#include <asm/immap.h>
Alison Wang95bed1f2012-03-26 21:49:04 +000028#include <asm/io.h>
wdenkabf7a7c2003-12-08 01:34:36 +000029
wdenke65527f2004-02-12 00:47:09 +000030
31int checkboard (void) {
32 puts ("Board: ");
TsiChungLiew1692b482007-08-15 20:32:06 -050033 puts ("Freescale MCF5272C3 EVB\n");
wdenkabf7a7c2003-12-08 01:34:36 +000034 return 0;
wdenke65527f2004-02-12 00:47:09 +000035 };
36
Becky Brucebd99ae72008-06-09 16:03:40 -050037phys_size_t initdram (int board_type) {
Alison Wang95bed1f2012-03-26 21:49:04 +000038 sdramctrl_t * sdp = (sdramctrl_t *)(MMAP_SDRAM);
wdenke65527f2004-02-12 00:47:09 +000039
Alison Wang95bed1f2012-03-26 21:49:04 +000040 out_be16(&sdp->sdram_sdtr, 0xf539);
41 out_be16(&sdp->sdram_sdcr, 0x4211);
wdenke65527f2004-02-12 00:47:09 +000042
43 /* Dummy write to start SDRAM */
44 *((volatile unsigned long *)0) = 0;
45
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020046 return CONFIG_SYS_SDRAM_SIZE * 1024 * 1024;
wdenke65527f2004-02-12 00:47:09 +000047 };
48
49int testdram (void) {
50 /* TODO: XXX XXX XXX */
51 printf ("DRAM test not implemented!\n");
wdenkabf7a7c2003-12-08 01:34:36 +000052
wdenke65527f2004-02-12 00:47:09 +000053 return (0);
wdenkabf7a7c2003-12-08 01:34:36 +000054}