]>
Commit | Line | Data |
---|---|---|
83d290c5 | 1 | // SPDX-License-Identifier: GPL-2.0+ |
4e5ca3eb WD |
2 | /* |
3 | * (C) Copyright 2000-2003 | |
4 | * Wolfgang Denk, DENX Software Engineering, [email protected]. | |
5 | * | |
32dbaafa | 6 | * Copyright (C) 2012 Freescale Semiconductor, Inc. All Rights Reserved. |
4e5ca3eb WD |
7 | */ |
8 | ||
9 | #include <common.h> | |
49acd56e | 10 | #include <init.h> |
401d1c4f | 11 | #include <asm/global_data.h> |
f28e1bd9 | 12 | #include <asm/immap.h> |
32dbaafa | 13 | #include <asm/io.h> |
4e5ca3eb | 14 | |
088454cd | 15 | DECLARE_GLOBAL_DATA_PTR; |
bf9e3b38 WD |
16 | |
17 | int checkboard (void) { | |
18 | puts ("Board: "); | |
f28e1bd9 | 19 | puts ("Freescale MCF5272C3 EVB\n"); |
4e5ca3eb | 20 | return 0; |
bf9e3b38 WD |
21 | }; |
22 | ||
f1683aa7 | 23 | int dram_init(void) |
52c41180 | 24 | { |
32dbaafa | 25 | sdramctrl_t * sdp = (sdramctrl_t *)(MMAP_SDRAM); |
bf9e3b38 | 26 | |
32dbaafa AW |
27 | out_be16(&sdp->sdram_sdtr, 0xf539); |
28 | out_be16(&sdp->sdram_sdcr, 0x4211); | |
bf9e3b38 WD |
29 | |
30 | /* Dummy write to start SDRAM */ | |
31 | *((volatile unsigned long *)0) = 0; | |
32 | ||
088454cd SG |
33 | gd->ram_size = CONFIG_SYS_SDRAM_SIZE * 1024 * 1024; |
34 | ||
35 | return 0; | |
bf9e3b38 WD |
36 | }; |
37 | ||
49acd56e SG |
38 | int testdram(void) |
39 | { | |
bf9e3b38 WD |
40 | /* TODO: XXX XXX XXX */ |
41 | printf ("DRAM test not implemented!\n"); | |
4e5ca3eb | 42 | |
bf9e3b38 | 43 | return (0); |
4e5ca3eb | 44 | } |