blob: 0484c3c25049fd9de98c790837c86251d47702f8 [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Patrice Chotard246771b2017-09-13 18:00:12 +02002/*
Patrice Chotard3bc599c2017-10-23 09:53:58 +02003 * Copyright (C) 2017, STMicroelectronics - All Rights Reserved
4 * Author(s): Patrice Chotard, <patrice.chotard@st.com> for STMicroelectronics.
Patrice Chotard246771b2017-09-13 18:00:12 +02005 */
6
7#include <common.h>
8#include <dm.h>
Simon Glass52559322019-11-14 12:57:46 -07009#include <init.h>
Simon Glassf7ae49f2020-05-10 11:40:05 -060010#include <log.h>
Patrice Chotard246771b2017-09-13 18:00:12 +020011
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
Siva Durga Prasad Paladugu12308b12018-07-16 15:56:11 +053025 if (fdtdec_setup_mem_size_base() != 0)
Patrice Chotard246771b2017-09-13 18:00:12 +020026 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
43u32 get_board_rev(void)
44{
45 return 0;
46}
47
48int board_late_init(void)
49{
50 return 0;
51}
52
53int board_init(void)
54{
55 gd->bd->bi_boot_params = gd->bd->bi_dram[0].start + 0x100;
56 return 0;
57}