blob: 3ed4a7da9300e1b681027317a4cd7868be41f744 [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
Becky Brucebd99ae72008-06-09 16:03:40 -050021phys_size_t initdram (int board_type) {
Alison Wang95bed1f2012-03-26 21:49:04 +000022 sdramctrl_t * sdp = (sdramctrl_t *)(MMAP_SDRAM);
wdenke65527f2004-02-12 00:47:09 +000023
Alison Wang95bed1f2012-03-26 21:49:04 +000024 out_be16(&sdp->sdram_sdtr, 0xf539);
25 out_be16(&sdp->sdram_sdcr, 0x4211);
wdenke65527f2004-02-12 00:47:09 +000026
27 /* Dummy write to start SDRAM */
28 *((volatile unsigned long *)0) = 0;
29
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020030 return CONFIG_SYS_SDRAM_SIZE * 1024 * 1024;
wdenke65527f2004-02-12 00:47:09 +000031 };
32
33int testdram (void) {
34 /* TODO: XXX XXX XXX */
35 printf ("DRAM test not implemented!\n");
wdenkabf7a7c2003-12-08 01:34:36 +000036
wdenke65527f2004-02-12 00:47:09 +000037 return (0);
wdenkabf7a7c2003-12-08 01:34:36 +000038}