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