1// SPDX-License-Identifier: GPL-2.0+
2/*
3 * Copyright (C) 2017, STMicroelectronics - All Rights Reserved
4 * Author(s): Patrice Chotard, <patrice.chotard@foss.st.com> for STMicroelectronics.
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_init(void)
40{
41	return 0;
42}
43