blob: 0d39ce849a62d8e58f7b973df78cfadb0aa5776d [file] [log] [blame]
dillon min38ac6a12021-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
dillon min38ac6a12021-04-09 15:28:46 +080044int board_late_init(void)
45{
46 return 0;
47}
48
49int board_init(void)
50{
dillon min38ac6a12021-04-09 15:28:46 +080051 return 0;
52}