blob: 4ca5e847212ea7d1ed57f937375e06e11d4f990c [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
Patrice Chotard0f8106f2020-12-02 18:47:30 +01004 * Author(s): Patrice Chotard, <patrice.chotard@foss.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>
Simon Glass401d1c42020-10-30 21:38:53 -060011#include <asm/global_data.h>
Patrice Chotard246771b2017-09-13 18:00:12 +020012
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
Siva Durga Prasad Paladugu12308b12018-07-16 15:56:11 +053026 if (fdtdec_setup_mem_size_base() != 0)
Patrice Chotard246771b2017-09-13 18:00:12 +020027 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
Patrice Chotard246771b2017-09-13 18:00:12 +020039int board_init(void)
40{
Patrice Chotard246771b2017-09-13 18:00:12 +020041 return 0;
42}