Adam Ford | 3867688 | 2020-06-30 09:30:11 -0500 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
| 2 | /* |
| 3 | * Copyright 2020 Compass Electronics Group, LLC |
| 4 | */ |
| 5 | |
| 6 | #include <common.h> |
Simon Glass | 3ba929a | 2020-10-30 21:38:53 -0600 | [diff] [blame] | 7 | #include <asm/global_data.h> |
Adam Ford | 3867688 | 2020-06-30 09:30:11 -0500 | [diff] [blame] | 8 | #include <asm/io.h> |
| 9 | #include <asm/arch/rcar-mstp.h> |
| 10 | |
| 11 | DECLARE_GLOBAL_DATA_PTR; |
| 12 | |
| 13 | void s_init(void) |
| 14 | { |
| 15 | } |
| 16 | |
| 17 | /* Kconfig forces this on, so just return 0 */ |
| 18 | int board_early_init_f(void) |
| 19 | { |
| 20 | return 0; |
| 21 | } |
| 22 | |
| 23 | int 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 Ford | 3867688 | 2020-06-30 09:30:11 -0500 | [diff] [blame] | 31 | #define RST_BASE 0xE6160000 |
| 32 | #define RST_CA57RESCNT (RST_BASE + 0x40) |
| 33 | #define RST_CODE 0xA5A5000F |
| 34 | |
Harald Seiler | 6f14d5f | 2020-12-15 16:47:52 +0100 | [diff] [blame] | 35 | void reset_cpu(void) |
Adam Ford | 3867688 | 2020-06-30 09:30:11 -0500 | [diff] [blame] | 36 | { |
| 37 | writel(RST_CODE, RST_CA57RESCNT); |
| 38 | } |