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