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> |
Adam Ford | 3867688 | 2020-06-30 09:30:11 -0500 | [diff] [blame] | 9 | |
| 10 | DECLARE_GLOBAL_DATA_PTR; |
| 11 | |
Adam Ford | 3867688 | 2020-06-30 09:30:11 -0500 | [diff] [blame] | 12 | int board_init(void) |
| 13 | { |
| 14 | /* address of boot parameters */ |
Simon Glass | 72cc538 | 2022-10-20 18:22:39 -0600 | [diff] [blame] | 15 | gd->bd->bi_boot_params = CONFIG_TEXT_BASE + 0x50000; |
Adam Ford | 3867688 | 2020-06-30 09:30:11 -0500 | [diff] [blame] | 16 | |
| 17 | return 0; |
| 18 | } |
| 19 | |
Adam Ford | 2458e1a | 2021-09-20 11:14:27 -0500 | [diff] [blame] | 20 | #if IS_ENABLED(CONFIG_MULTI_DTB_FIT) |
| 21 | int board_fit_config_name_match(const char *name) |
| 22 | { |
| 23 | if (!strcmp(rzg_get_cpu_name(), "R8A774A1") && !strcmp(name, "r8a774a1-beacon-rzg2m-kit")) |
| 24 | return 0; |
| 25 | |
| 26 | if (!strcmp(rzg_get_cpu_name(), "R8A774B1") && !strcmp(name, "r8a774b1-beacon-rzg2n-kit")) |
| 27 | return 0; |
| 28 | |
| 29 | if (!strcmp(rzg_get_cpu_name(), "R8A774E1") && !strcmp(name, "r8a774e1-beacon-rzg2h-kit")) |
| 30 | return 0; |
| 31 | |
| 32 | return -1; |
| 33 | } |
| 34 | #endif |