wdenk | c4cbd34 | 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 | d79de1d | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 5 | * SPDX-License-Identifier: GPL-2.0+ |
wdenk | c4cbd34 | 2005-01-09 18:21:42 +0000 | [diff] [blame] | 6 | */ |
| 7 | |
| 8 | #include <common.h> |
TsiChungLiew | cfa2b48 | 2007-08-15 19:41:06 -0500 | [diff] [blame] | 9 | #include <asm/immap.h> |
wdenk | c4cbd34 | 2005-01-09 18:21:42 +0000 | [diff] [blame] | 10 | |
Simon Glass | 39f90ba | 2017-03-31 08:40:25 -0600 | [diff] [blame] | 11 | DECLARE_GLOBAL_DATA_PTR; |
wdenk | c4cbd34 | 2005-01-09 18:21:42 +0000 | [diff] [blame] | 12 | |
| 13 | int checkboard (void) |
| 14 | { |
| 15 | puts ("Board: "); |
| 16 | puts ("senTec COBRA5272 Board\n"); |
| 17 | return 0; |
| 18 | }; |
| 19 | |
Simon Glass | d35f338 | 2017-04-06 12:47:05 -0600 | [diff] [blame^] | 20 | int dram_init(void) |
wdenk | c4cbd34 | 2005-01-09 18:21:42 +0000 | [diff] [blame] | 21 | { |
TsiChungLiew | cfa2b48 | 2007-08-15 19:41:06 -0500 | [diff] [blame] | 22 | volatile sdramctrl_t *sdp = (sdramctrl_t *) (MMAP_SDRAM); |
wdenk | c4cbd34 | 2005-01-09 18:21:42 +0000 | [diff] [blame] | 23 | |
| 24 | sdp->sdram_sdtr = 0xf539; |
| 25 | sdp->sdram_sdcr = 0x4211; |
| 26 | |
| 27 | /* Dummy write to start SDRAM */ |
| 28 | *((volatile unsigned long *) 0) = 0; |
| 29 | |
Simon Glass | 39f90ba | 2017-03-31 08:40:25 -0600 | [diff] [blame] | 30 | gd->ram_size = CONFIG_SYS_SDRAM_SIZE * 1024 * 1024; |
| 31 | |
| 32 | return 0; |
wdenk | c4cbd34 | 2005-01-09 18:21:42 +0000 | [diff] [blame] | 33 | }; |
| 34 | |
| 35 | int testdram (void) |
| 36 | { |
| 37 | /* TODO: XXX XXX XXX */ |
| 38 | printf ("DRAM test not implemented!\n"); |
| 39 | |
| 40 | return (0); |
| 41 | } |