1 // SPDX-License-Identifier: GPL-2.0+ 2 /* 3 * Copyright 2020 Compass Electronics Group, LLC 4 */ 5 6 #include <common.h> 7 #include <asm/global_data.h> 8 #include <asm/io.h> 9 #include <asm/arch/rcar-mstp.h> 10 11 DECLARE_GLOBAL_DATA_PTR; 12 s_init(void)13void s_init(void) 14 { 15 } 16 17 /* Kconfig forces this on, so just return 0 */ board_early_init_f(void)18int board_early_init_f(void) 19 { 20 return 0; 21 } 22 board_init(void)23int board_init(void) 24 { 25 /* address of boot parameters */ 26 gd->bd->bi_boot_params = CONFIG_SYS_TEXT_BASE + 0x50000; 27 28 return 0; 29 } 30 dram_init(void)31int dram_init(void) 32 { 33 if (fdtdec_setup_mem_size_base() != 0) 34 return -EINVAL; 35 36 return 0; 37 } 38 dram_init_banksize(void)39int dram_init_banksize(void) 40 { 41 fdtdec_setup_memory_banksize(); 42 43 return 0; 44 } 45 46 #define RST_BASE 0xE6160000 47 #define RST_CA57RESCNT (RST_BASE + 0x40) 48 #define RST_CODE 0xA5A5000F 49 reset_cpu(ulong addr)50void reset_cpu(ulong addr) 51 { 52 writel(RST_CODE, RST_CA57RESCNT); 53 } 54