diff options
author | Vladimir Zapolskiy <vz@mleia.com> | 2016-11-28 00:15:31 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-12-02 21:32:51 -0500 |
commit | cdbb0cf8ecf30d5dbbfa500e8939a32ef45896c5 (patch) | |
tree | 6d01620f6567eaa8b5b5177a3882501752d17552 /arch/sh/lib/board.c | |
parent | 18a40e8470246da3ee4cdef721524140f54cc6c9 (diff) |
sh: add common dram_init() function for all boards
Generic board support assumes a different method of specifying
DRAM size on board, also it can be shared among all boards, notably
only sh7763rdp board has a custom legacy dram_init(), however
the difference is only in printing some additional information,
this feature can be removed.
Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/sh/lib/board.c')
-rw-r--r-- | arch/sh/lib/board.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/sh/lib/board.c b/arch/sh/lib/board.c new file mode 100644 index 0000000000..7cb594e31a --- /dev/null +++ b/arch/sh/lib/board.c @@ -0,0 +1,17 @@ +/* + * Copyright (C) 2016 Vladimir Zapolskiy <vz@mleia.com> + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include <common.h> + +DECLARE_GLOBAL_DATA_PTR; + +int dram_init(void) +{ + gd->ram_size = get_ram_size((long *)CONFIG_SYS_SDRAM_BASE, + CONFIG_SYS_SDRAM_SIZE); + + return 0; +} |