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