3 * Stefan Roese, DENX Software Engineering, sr@denx.de.
5 * See file CREDITS for list of people who contributed to this
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of
11 * the License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
25 #include <asm/processor.h>
33 long int initdram(int board_type)
35 return (CFG_MBYTES_SDRAM << 20);
38 #if defined(CFG_DRAM_TEST)
41 printf ("testdram\n");
42 #if defined (CONFIG_NAND_U_BOOT)
45 uint *pstart = (uint *) 0x00000000;
46 uint *pend = (uint *) 0x00001000;
49 for (p = pstart; p < pend; p++) {
53 for (p = pstart; p < pend; p++) {
54 if (*p != 0xaaaaaaaa) {
55 #if !defined (CONFIG_NAND_SPL)
56 printf ("SDRAM test fails at: %08x\n", (uint) p);
62 for (p = pstart; p < pend; p++) {
66 for (p = pstart; p < pend; p++) {
67 if (*p != 0x55555555) {
68 #if !defined (CONFIG_NAND_SPL)
69 printf ("SDRAM test fails at: %08x\n", (uint) p);
74 #if !defined (CONFIG_NAND_SPL)
75 printf ("SDRAM test passed!!!\n");