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 13 DECLARE_GLOBAL_DATA_PTR; 14 dram_init(void)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 dram_init_banksize(void)32int dram_init_banksize(void) 33 { 34 fdtdec_setup_memory_banksize(); 35 36 return 0; 37 } 38 get_board_rev(void)39u32 get_board_rev(void) 40 { 41 return 0; 42 } 43 board_init(void)44int board_init(void) 45 { 46 gd->bd->bi_boot_params = gd->bd->bi_dram[0].start + 0x100; 47 return 0; 48 } 49