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