blob: c12ff77fb24472f7216ec8f58ebe5c00124f0116 [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>
Simon Glass3ba929a2020-10-30 21:38:53 -06007#include <asm/global_data.h>
Adam Ford38676882020-06-30 09:30:11 -05008#include <asm/io.h>
9#include <asm/arch/rcar-mstp.h>
10
11DECLARE_GLOBAL_DATA_PTR;
12
13void s_init(void)
14{
15}
16
17/* Kconfig forces this on, so just return 0 */
18int board_early_init_f(void)
19{
20 return 0;
21}
22
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
Adam Ford38676882020-06-30 09:30:11 -050031#define RST_BASE 0xE6160000
32#define RST_CA57RESCNT (RST_BASE + 0x40)
33#define RST_CODE 0xA5A5000F
34
Harald Seiler6f14d5f2020-12-15 16:47:52 +010035void reset_cpu(void)
Adam Ford38676882020-06-30 09:30:11 -050036{
37 writel(RST_CODE, RST_CA57RESCNT);
38}