blob: 625b3a077bc27f55298616f537e6289f9a0288d5 [file] [log] [blame]
Patrice Chotard1e1d02d2017-09-13 18:00:12 +02001/*
2 * Copyright (C) STMicroelectronics SA 2017
3 * Author(s): Patrice CHOTARD, <patrice.chotard@st.com> for STMicroelectronics.
4 *
5 * SPDX-License-Identifier: GPL-2.0+
6 */
7
8#include <common.h>
9#include <dm.h>
10
11DECLARE_GLOBAL_DATA_PTR;
12
13int dram_init(void)
14{
15 struct udevice *dev;
16 int ret;
17
18 ret = uclass_get_device(UCLASS_RAM, 0, &dev);
19 if (ret) {
20 debug("DRAM init failed: %d\n", ret);
21 return ret;
22 }
23
24 if (fdtdec_setup_memory_size() != 0)
25 ret = -EINVAL;
26
27 return ret;
28}
29
30int dram_init_banksize(void)
31{
32 fdtdec_setup_memory_banksize();
33
34 return 0;
35}
36
37int board_early_init_f(void)
38{
39 return 0;
40}
41
42u32 get_board_rev(void)
43{
44 return 0;
45}
46
47int board_late_init(void)
48{
49 return 0;
50}
51
52int board_init(void)
53{
54 gd->bd->bi_boot_params = gd->bd->bi_dram[0].start + 0x100;
55 return 0;
56}