blob: 75aa4d139fb4061bcc749334a8f27ac405db3d39 [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
dillon minb83dabc2021-04-09 15:28:46 +08007#include <dm.h>
8#include <init.h>
9#include <log.h>
10#include <asm/global_data.h>
11
12DECLARE_GLOBAL_DATA_PTR;
13
14int dram_init(void)
15{
16 struct udevice *dev;
17 int ret;
18
19 ret = uclass_get_device(UCLASS_RAM, 0, &dev);
20 if (ret) {
21 debug("DRAM init failed: %d\n", ret);
22 return ret;
23 }
24
25 if (fdtdec_setup_mem_size_base() != 0)
26 ret = -EINVAL;
27
28 return ret;
29}
30
31int dram_init_banksize(void)
32{
33 fdtdec_setup_memory_banksize();
34
35 return 0;
36}
37
38int board_early_init_f(void)
39{
40 return 0;
41}
42
dillon minb83dabc2021-04-09 15:28:46 +080043int board_late_init(void)
44{
45 return 0;
46}
47
48int board_init(void)
49{
dillon minb83dabc2021-04-09 15:28:46 +080050 return 0;
51}