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