Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
wdenk | a562e1b | 2005-01-09 18:21:42 +0000 | [diff] [blame] | 2 | /* |
| 3 | * (C) Copyright 2000-2003 |
| 4 | * Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
wdenk | a562e1b | 2005-01-09 18:21:42 +0000 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | #include <common.h> |
TsiChungLiew | 6706424 | 2007-08-15 19:41:06 -0500 | [diff] [blame] | 8 | #include <asm/immap.h> |
wdenk | a562e1b | 2005-01-09 18:21:42 +0000 | [diff] [blame] | 9 | |
Simon Glass | 088454c | 2017-03-31 08:40:25 -0600 | [diff] [blame] | 10 | DECLARE_GLOBAL_DATA_PTR; |
wdenk | a562e1b | 2005-01-09 18:21:42 +0000 | [diff] [blame] | 11 | |
| 12 | int checkboard (void) |
| 13 | { |
| 14 | puts ("Board: "); |
| 15 | puts ("senTec COBRA5272 Board\n"); |
| 16 | return 0; |
| 17 | }; |
| 18 | |
Simon Glass | f1683aa | 2017-04-06 12:47:05 -0600 | [diff] [blame] | 19 | int dram_init(void) |
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 | |
Simon Glass | 088454c | 2017-03-31 08:40:25 -0600 | [diff] [blame] | 29 | gd->ram_size = CONFIG_SYS_SDRAM_SIZE * 1024 * 1024; |
| 30 | |
| 31 | return 0; |
wdenk | a562e1b | 2005-01-09 18:21:42 +0000 | [diff] [blame] | 32 | }; |
| 33 | |
| 34 | int testdram (void) |
| 35 | { |
| 36 | /* TODO: XXX XXX XXX */ |
| 37 | printf ("DRAM test not implemented!\n"); |
| 38 | |
| 39 | return (0); |
| 40 | } |