wdenk | a562e1b | 2005-01-09 18:21:42 +0000 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2000-2003 |
| 3 | * Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
| 4 | * |
Wolfgang Denk | 1a45966 | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 5 | * SPDX-License-Identifier: GPL-2.0+ |
wdenk | a562e1b | 2005-01-09 18:21:42 +0000 | [diff] [blame] | 6 | */ |
| 7 | |
| 8 | #include <common.h> |
TsiChungLiew | 6706424 | 2007-08-15 19:41:06 -0500 | [diff] [blame] | 9 | #include <asm/immap.h> |
wdenk | a562e1b | 2005-01-09 18:21:42 +0000 | [diff] [blame] | 10 | |
| 11 | |
| 12 | int checkboard (void) |
| 13 | { |
| 14 | puts ("Board: "); |
| 15 | puts ("senTec COBRA5272 Board\n"); |
| 16 | return 0; |
| 17 | }; |
| 18 | |
Becky Bruce | 9973e3c | 2008-06-09 16:03:40 -0500 | [diff] [blame] | 19 | phys_size_t initdram (int board_type) |
wdenk | a562e1b | 2005-01-09 18:21:42 +0000 | [diff] [blame] | 20 | { |
TsiChungLiew | 6706424 | 2007-08-15 19:41:06 -0500 | [diff] [blame] | 21 | volatile sdramctrl_t *sdp = (sdramctrl_t *) (MMAP_SDRAM); |
wdenk | a562e1b | 2005-01-09 18:21:42 +0000 | [diff] [blame] | 22 | |
| 23 | sdp->sdram_sdtr = 0xf539; |
| 24 | sdp->sdram_sdcr = 0x4211; |
| 25 | |
| 26 | /* Dummy write to start SDRAM */ |
| 27 | *((volatile unsigned long *) 0) = 0; |
| 28 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 29 | return CONFIG_SYS_SDRAM_SIZE * 1024 * 1024; |
wdenk | a562e1b | 2005-01-09 18:21:42 +0000 | [diff] [blame] | 30 | }; |
| 31 | |
| 32 | int testdram (void) |
| 33 | { |
| 34 | /* TODO: XXX XXX XXX */ |
| 35 | printf ("DRAM test not implemented!\n"); |
| 36 | |
| 37 | return (0); |
| 38 | } |