]> git.ipfire.org Git - people/ms/u-boot.git/blame - board/freescale/m5272c3/m5272c3.c
board_f: Drop return value from initdram()
[people/ms/u-boot.git] / board / freescale / m5272c3 / m5272c3.c
CommitLineData
4e5ca3eb
WD
1/*
2 * (C) Copyright 2000-2003
3 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4 *
32dbaafa
AW
5 * Copyright (C) 2012 Freescale Semiconductor, Inc. All Rights Reserved.
6 *
1a459660 7 * SPDX-License-Identifier: GPL-2.0+
4e5ca3eb
WD
8 */
9
10#include <common.h>
f28e1bd9 11#include <asm/immap.h>
32dbaafa 12#include <asm/io.h>
4e5ca3eb 13
088454cd 14DECLARE_GLOBAL_DATA_PTR;
bf9e3b38
WD
15
16int checkboard (void) {
17 puts ("Board: ");
f28e1bd9 18 puts ("Freescale MCF5272C3 EVB\n");
4e5ca3eb 19 return 0;
bf9e3b38
WD
20 };
21
088454cd 22int initdram(void)
52c41180 23{
32dbaafa 24 sdramctrl_t * sdp = (sdramctrl_t *)(MMAP_SDRAM);
bf9e3b38 25
32dbaafa
AW
26 out_be16(&sdp->sdram_sdtr, 0xf539);
27 out_be16(&sdp->sdram_sdcr, 0x4211);
bf9e3b38
WD
28
29 /* Dummy write to start SDRAM */
30 *((volatile unsigned long *)0) = 0;
31
088454cd
SG
32 gd->ram_size = CONFIG_SYS_SDRAM_SIZE * 1024 * 1024;
33
34 return 0;
bf9e3b38
WD
35 };
36
37int testdram (void) {
38 /* TODO: XXX XXX XXX */
39 printf ("DRAM test not implemented!\n");
4e5ca3eb 40
bf9e3b38 41 return (0);
4e5ca3eb 42}