Lokesh Vutla | 5d83fd2 | 2018-11-02 19:51:05 +0530 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
| 2 | /* |
| 3 | * K3: Common Architecture initialization |
| 4 | * |
Nishanth Menon | eaa39c6 | 2023-11-01 15:56:03 -0500 | [diff] [blame] | 5 | * Copyright (C) 2018 Texas Instruments Incorporated - https://www.ti.com/ |
Lokesh Vutla | 5d83fd2 | 2018-11-02 19:51:05 +0530 | [diff] [blame] | 6 | * Lokesh Vutla <lokeshvutla@ti.com> |
| 7 | */ |
| 8 | |
Tom Rini | b7f7046 | 2023-12-14 13:16:45 -0500 | [diff] [blame] | 9 | #include <config.h> |
Simon Glass | afb0215 | 2019-12-28 10:45:01 -0700 | [diff] [blame] | 10 | #include <cpu_func.h> |
Simon Glass | 2dc9c34 | 2020-05-10 11:40:01 -0600 | [diff] [blame] | 11 | #include <image.h> |
Simon Glass | 9758973 | 2020-05-10 11:40:02 -0600 | [diff] [blame] | 12 | #include <init.h> |
Simon Glass | 0f2af88 | 2020-05-10 11:40:05 -0600 | [diff] [blame] | 13 | #include <log.h> |
Lokesh Vutla | 5d83fd2 | 2018-11-02 19:51:05 +0530 | [diff] [blame] | 14 | #include <spl.h> |
Simon Glass | 3ba929a | 2020-10-30 21:38:53 -0600 | [diff] [blame] | 15 | #include <asm/global_data.h> |
Simon Glass | bdd5f81 | 2023-09-14 18:21:46 -0600 | [diff] [blame] | 16 | #include <linux/printk.h> |
Lokesh Vutla | 5d83fd2 | 2018-11-02 19:51:05 +0530 | [diff] [blame] | 17 | #include "common.h" |
| 18 | #include <dm.h> |
| 19 | #include <remoteproc.h> |
Simon Glass | 274e0b0 | 2020-05-10 11:39:56 -0600 | [diff] [blame] | 20 | #include <asm/cache.h> |
Lokesh Vutla | 28cd824 | 2019-03-08 11:47:33 +0530 | [diff] [blame] | 21 | #include <linux/soc/ti/ti_sci_protocol.h> |
Lokesh Vutla | 16cf5d2 | 2019-03-08 11:47:34 +0530 | [diff] [blame] | 22 | #include <fdt_support.h> |
Lokesh Vutla | a04cf3b | 2019-09-27 13:32:11 +0530 | [diff] [blame] | 23 | #include <asm/hardware.h> |
| 24 | #include <asm/io.h> |
Keerthy | 7007adc | 2020-02-12 13:55:04 +0530 | [diff] [blame] | 25 | #include <fs_loader.h> |
| 26 | #include <fs.h> |
| 27 | #include <env.h> |
| 28 | #include <elf.h> |
Dave Gerlach | c74227f | 2020-07-15 23:40:04 -0500 | [diff] [blame] | 29 | #include <soc.h> |
Lokesh Vutla | 28cd824 | 2019-03-08 11:47:33 +0530 | [diff] [blame] | 30 | |
| 31 | struct ti_sci_handle *get_ti_sci_handle(void) |
| 32 | { |
| 33 | struct udevice *dev; |
| 34 | int ret; |
| 35 | |
Lokesh Vutla | 00a1513 | 2019-09-27 13:32:15 +0530 | [diff] [blame] | 36 | ret = uclass_get_device_by_driver(UCLASS_FIRMWARE, |
Simon Glass | 65130cd | 2020-12-28 20:34:56 -0700 | [diff] [blame] | 37 | DM_DRIVER_GET(ti_sci), &dev); |
Lokesh Vutla | 28cd824 | 2019-03-08 11:47:33 +0530 | [diff] [blame] | 38 | if (ret) |
| 39 | panic("Failed to get SYSFW (%d)\n", ret); |
| 40 | |
| 41 | return (struct ti_sci_handle *)ti_sci_get_handle_from_sysfw(dev); |
| 42 | } |
Lokesh Vutla | 5d83fd2 | 2018-11-02 19:51:05 +0530 | [diff] [blame] | 43 | |
Lokesh Vutla | 5fafe44 | 2020-03-10 16:50:58 +0530 | [diff] [blame] | 44 | void k3_sysfw_print_ver(void) |
| 45 | { |
| 46 | struct ti_sci_handle *ti_sci = get_ti_sci_handle(); |
| 47 | char fw_desc[sizeof(ti_sci->version.firmware_description) + 1]; |
| 48 | |
| 49 | /* |
| 50 | * Output System Firmware version info. Note that since the |
| 51 | * 'firmware_description' field is not guaranteed to be zero- |
| 52 | * terminated we manually add a \0 terminator if needed. Further |
| 53 | * note that we intentionally no longer rely on the extended |
| 54 | * printf() formatter '%.*s' to not having to require a more |
| 55 | * full-featured printf() implementation. |
| 56 | */ |
| 57 | strncpy(fw_desc, ti_sci->version.firmware_description, |
| 58 | sizeof(ti_sci->version.firmware_description)); |
| 59 | fw_desc[sizeof(fw_desc) - 1] = '\0'; |
| 60 | |
| 61 | printf("SYSFW ABI: %d.%d (firmware rev 0x%04x '%s')\n", |
| 62 | ti_sci->version.abi_major, ti_sci->version.abi_minor, |
| 63 | ti_sci->version.firmware_revision, fw_desc); |
| 64 | } |
| 65 | |
Matthias Schiffer | 0262dcd | 2023-09-27 15:43:14 +0200 | [diff] [blame] | 66 | void mmr_unlock(uintptr_t base, u32 partition) |
Lokesh Vutla | ff7ab09 | 2020-08-05 22:44:17 +0530 | [diff] [blame] | 67 | { |
| 68 | /* Translate the base address */ |
Matthias Schiffer | 0262dcd | 2023-09-27 15:43:14 +0200 | [diff] [blame] | 69 | uintptr_t part_base = base + partition * CTRL_MMR0_PARTITION_SIZE; |
Lokesh Vutla | ff7ab09 | 2020-08-05 22:44:17 +0530 | [diff] [blame] | 70 | |
| 71 | /* Unlock the requested partition if locked using two-step sequence */ |
| 72 | writel(CTRLMMR_LOCK_KICK0_UNLOCK_VAL, part_base + CTRLMMR_LOCK_KICK0); |
| 73 | writel(CTRLMMR_LOCK_KICK1_UNLOCK_VAL, part_base + CTRLMMR_LOCK_KICK1); |
| 74 | } |
| 75 | |
Lokesh Vutla | 8be6bbf | 2020-08-05 22:44:23 +0530 | [diff] [blame] | 76 | bool is_rom_loaded_sysfw(struct rom_extended_boot_data *data) |
| 77 | { |
| 78 | if (strncmp(data->header, K3_ROM_BOOT_HEADER_MAGIC, 7)) |
| 79 | return false; |
| 80 | |
| 81 | return data->num_components > 1; |
| 82 | } |
| 83 | |
Andreas Dannenberg | d13ec8c | 2019-08-15 15:55:28 -0500 | [diff] [blame] | 84 | DECLARE_GLOBAL_DATA_PTR; |
| 85 | |
| 86 | #ifdef CONFIG_K3_EARLY_CONS |
| 87 | int early_console_init(void) |
| 88 | { |
| 89 | struct udevice *dev; |
| 90 | int ret; |
| 91 | |
| 92 | gd->baudrate = CONFIG_BAUDRATE; |
| 93 | |
| 94 | ret = uclass_get_device_by_seq(UCLASS_SERIAL, CONFIG_K3_EARLY_CONS_IDX, |
| 95 | &dev); |
| 96 | if (ret) { |
| 97 | printf("Error getting serial dev for early console! (%d)\n", |
| 98 | ret); |
| 99 | return ret; |
| 100 | } |
| 101 | |
| 102 | gd->cur_serial_dev = dev; |
| 103 | gd->flags |= GD_FLG_SERIAL_READY; |
| 104 | gd->have_console = 1; |
| 105 | |
| 106 | return 0; |
| 107 | } |
| 108 | #endif |
| 109 | |
Andrew Davis | ef880db | 2024-02-01 18:24:45 -0600 | [diff] [blame^] | 110 | #if CONFIG_IS_ENABLED(FIT_IMAGE_POST_PROCESS) && !IS_ENABLED(CONFIG_SYS_K3_SPL_ATF) |
Tero Kristo | 738c590 | 2021-06-11 11:45:19 +0300 | [diff] [blame] | 111 | void board_fit_image_post_process(const void *fit, int node, void **p_image, |
| 112 | size_t *p_size) |
| 113 | { |
Andrew Davis | ef880db | 2024-02-01 18:24:45 -0600 | [diff] [blame^] | 114 | ti_secure_image_check_binary(p_image, p_size); |
| 115 | ti_secure_image_post_process(p_image, p_size); |
Tero Kristo | 738c590 | 2021-06-11 11:45:19 +0300 | [diff] [blame] | 116 | } |
| 117 | #endif |
| 118 | |
Lokesh Vutla | a228532 | 2019-06-13 10:29:42 +0530 | [diff] [blame] | 119 | #ifndef CONFIG_SYSRESET |
Harald Seiler | 6f14d5f | 2020-12-15 16:47:52 +0100 | [diff] [blame] | 120 | void reset_cpu(void) |
Lokesh Vutla | a228532 | 2019-06-13 10:29:42 +0530 | [diff] [blame] | 121 | { |
| 122 | } |
| 123 | #endif |
Lokesh Vutla | a04cf3b | 2019-09-27 13:32:11 +0530 | [diff] [blame] | 124 | |
Andrew Davis | f8c9836 | 2022-07-15 11:34:32 -0500 | [diff] [blame] | 125 | enum k3_device_type get_device_type(void) |
| 126 | { |
| 127 | u32 sys_status = readl(K3_SEC_MGR_SYS_STATUS); |
| 128 | |
| 129 | u32 sys_dev_type = (sys_status & SYS_STATUS_DEV_TYPE_MASK) >> |
| 130 | SYS_STATUS_DEV_TYPE_SHIFT; |
| 131 | |
| 132 | u32 sys_sub_type = (sys_status & SYS_STATUS_SUB_TYPE_MASK) >> |
| 133 | SYS_STATUS_SUB_TYPE_SHIFT; |
| 134 | |
| 135 | switch (sys_dev_type) { |
| 136 | case SYS_STATUS_DEV_TYPE_GP: |
| 137 | return K3_DEVICE_TYPE_GP; |
| 138 | case SYS_STATUS_DEV_TYPE_TEST: |
| 139 | return K3_DEVICE_TYPE_TEST; |
| 140 | case SYS_STATUS_DEV_TYPE_EMU: |
| 141 | return K3_DEVICE_TYPE_EMU; |
| 142 | case SYS_STATUS_DEV_TYPE_HS: |
| 143 | if (sys_sub_type == SYS_STATUS_SUB_TYPE_VAL_FS) |
| 144 | return K3_DEVICE_TYPE_HS_FS; |
| 145 | else |
| 146 | return K3_DEVICE_TYPE_HS_SE; |
| 147 | default: |
| 148 | return K3_DEVICE_TYPE_BAD; |
| 149 | } |
| 150 | } |
| 151 | |
Lokesh Vutla | a04cf3b | 2019-09-27 13:32:11 +0530 | [diff] [blame] | 152 | #if defined(CONFIG_DISPLAY_CPUINFO) |
Andrew Davis | f8c9836 | 2022-07-15 11:34:32 -0500 | [diff] [blame] | 153 | static const char *get_device_type_name(void) |
| 154 | { |
| 155 | enum k3_device_type type = get_device_type(); |
| 156 | |
| 157 | switch (type) { |
| 158 | case K3_DEVICE_TYPE_GP: |
| 159 | return "GP"; |
| 160 | case K3_DEVICE_TYPE_TEST: |
| 161 | return "TEST"; |
| 162 | case K3_DEVICE_TYPE_EMU: |
| 163 | return "EMU"; |
| 164 | case K3_DEVICE_TYPE_HS_FS: |
| 165 | return "HS-FS"; |
| 166 | case K3_DEVICE_TYPE_HS_SE: |
| 167 | return "HS-SE"; |
| 168 | default: |
| 169 | return "BAD"; |
| 170 | } |
| 171 | } |
| 172 | |
Lokesh Vutla | a04cf3b | 2019-09-27 13:32:11 +0530 | [diff] [blame] | 173 | int print_cpuinfo(void) |
| 174 | { |
Dave Gerlach | c74227f | 2020-07-15 23:40:04 -0500 | [diff] [blame] | 175 | struct udevice *soc; |
| 176 | char name[64]; |
| 177 | int ret; |
Dave Gerlach | 3373ee0 | 2020-07-15 23:40:04 -0500 | [diff] [blame] | 178 | |
Tom Rini | 5a9ecb2 | 2020-07-24 08:42:06 -0400 | [diff] [blame] | 179 | printf("SoC: "); |
Dave Gerlach | 3373ee0 | 2020-07-15 23:40:04 -0500 | [diff] [blame] | 180 | |
Dave Gerlach | c74227f | 2020-07-15 23:40:04 -0500 | [diff] [blame] | 181 | ret = soc_get(&soc); |
| 182 | if (ret) { |
| 183 | printf("UNKNOWN\n"); |
| 184 | return 0; |
| 185 | } |
| 186 | |
| 187 | ret = soc_get_family(soc, name, 64); |
| 188 | if (!ret) { |
| 189 | printf("%s ", name); |
| 190 | } |
| 191 | |
| 192 | ret = soc_get_revision(soc, name, 64); |
| 193 | if (!ret) { |
Andrew Davis | f8c9836 | 2022-07-15 11:34:32 -0500 | [diff] [blame] | 194 | printf("%s ", name); |
Dave Gerlach | c74227f | 2020-07-15 23:40:04 -0500 | [diff] [blame] | 195 | } |
Lokesh Vutla | a04cf3b | 2019-09-27 13:32:11 +0530 | [diff] [blame] | 196 | |
Andrew Davis | f8c9836 | 2022-07-15 11:34:32 -0500 | [diff] [blame] | 197 | printf("%s\n", get_device_type_name()); |
| 198 | |
Lokesh Vutla | a04cf3b | 2019-09-27 13:32:11 +0530 | [diff] [blame] | 199 | return 0; |
| 200 | } |
| 201 | #endif |
Lokesh Vutla | 362beda | 2019-10-07 13:52:17 +0530 | [diff] [blame] | 202 | |
| 203 | #ifdef CONFIG_ARM64 |
Simon Glass | df00afa | 2022-09-06 20:26:50 -0600 | [diff] [blame] | 204 | void board_prep_linux(struct bootm_headers *images) |
Lokesh Vutla | 362beda | 2019-10-07 13:52:17 +0530 | [diff] [blame] | 205 | { |
| 206 | debug("Linux kernel Image start = 0x%lx end = 0x%lx\n", |
| 207 | images->os.start, images->os.end); |
| 208 | __asm_flush_dcache_range(images->os.start, |
| 209 | ROUND(images->os.end, |
| 210 | CONFIG_SYS_CACHELINE_SIZE)); |
| 211 | } |
| 212 | #endif |
Lokesh Vutla | 5fbd6fe | 2019-12-31 15:49:55 +0530 | [diff] [blame] | 213 | |
Manorit Chawdhry | 33f75ee | 2023-05-05 15:54:00 +0530 | [diff] [blame] | 214 | static void remove_fwl_regions(struct fwl_data fwl_data, size_t num_regions, |
| 215 | enum k3_firewall_region_type fwl_type) |
Andrew F. Davis | f0bcb66 | 2020-01-10 14:35:21 -0500 | [diff] [blame] | 216 | { |
Andrew F. Davis | f0bcb66 | 2020-01-10 14:35:21 -0500 | [diff] [blame] | 217 | struct ti_sci_fwl_ops *fwl_ops; |
| 218 | struct ti_sci_handle *ti_sci; |
Manorit Chawdhry | 33f75ee | 2023-05-05 15:54:00 +0530 | [diff] [blame] | 219 | struct ti_sci_msg_fwl_region region; |
| 220 | size_t j; |
Andrew F. Davis | f0bcb66 | 2020-01-10 14:35:21 -0500 | [diff] [blame] | 221 | |
| 222 | ti_sci = get_ti_sci_handle(); |
| 223 | fwl_ops = &ti_sci->ops.fwl_ops; |
Manorit Chawdhry | 33f75ee | 2023-05-05 15:54:00 +0530 | [diff] [blame] | 224 | |
| 225 | for (j = 0; j < fwl_data.regions; j++) { |
| 226 | region.fwl_id = fwl_data.fwl_id; |
| 227 | region.region = j; |
| 228 | region.n_permission_regs = 3; |
Andrew F. Davis | f0bcb66 | 2020-01-10 14:35:21 -0500 | [diff] [blame] | 229 | |
Manorit Chawdhry | 33f75ee | 2023-05-05 15:54:00 +0530 | [diff] [blame] | 230 | fwl_ops->get_fwl_region(ti_sci, ®ion); |
Andrew F. Davis | f0bcb66 | 2020-01-10 14:35:21 -0500 | [diff] [blame] | 231 | |
Manorit Chawdhry | 33f75ee | 2023-05-05 15:54:00 +0530 | [diff] [blame] | 232 | /* Don't disable the background regions */ |
| 233 | if (region.control != 0 && |
Manorit Chawdhry | a2cfec4 | 2023-07-14 11:22:27 +0530 | [diff] [blame] | 234 | ((region.control >> K3_FIREWALL_BACKGROUND_BIT) & 1) == fwl_type) { |
Manorit Chawdhry | 33f75ee | 2023-05-05 15:54:00 +0530 | [diff] [blame] | 235 | pr_debug("Attempting to disable firewall %5d (%25s)\n", |
| 236 | region.fwl_id, fwl_data.name); |
| 237 | region.control = 0; |
Andrew F. Davis | f0bcb66 | 2020-01-10 14:35:21 -0500 | [diff] [blame] | 238 | |
Manorit Chawdhry | 33f75ee | 2023-05-05 15:54:00 +0530 | [diff] [blame] | 239 | if (fwl_ops->set_fwl_region(ti_sci, ®ion)) |
| 240 | pr_err("Could not disable firewall %5d (%25s)\n", |
| 241 | region.fwl_id, fwl_data.name); |
Andrew F. Davis | f0bcb66 | 2020-01-10 14:35:21 -0500 | [diff] [blame] | 242 | } |
| 243 | } |
| 244 | } |
Jan Kiszka | 7ce99f7 | 2020-05-18 07:57:22 +0200 | [diff] [blame] | 245 | |
Manorit Chawdhry | 33f75ee | 2023-05-05 15:54:00 +0530 | [diff] [blame] | 246 | void remove_fwl_configs(struct fwl_data *fwl_data, size_t fwl_data_size) |
| 247 | { |
| 248 | size_t i; |
| 249 | |
| 250 | for (i = 0; i < fwl_data_size; i++) { |
| 251 | remove_fwl_regions(fwl_data[i], fwl_data[i].regions, |
| 252 | K3_FIREWALL_REGION_FOREGROUND); |
| 253 | remove_fwl_regions(fwl_data[i], fwl_data[i].regions, |
| 254 | K3_FIREWALL_REGION_BACKGROUND); |
| 255 | } |
| 256 | } |
| 257 | |
Joao Paulo Goncalves | fc3557f | 2023-11-13 16:07:21 -0300 | [diff] [blame] | 258 | void spl_enable_cache(void) |
Jan Kiszka | 7ce99f7 | 2020-05-18 07:57:22 +0200 | [diff] [blame] | 259 | { |
| 260 | #if !(defined(CONFIG_SYS_ICACHE_OFF) && defined(CONFIG_SYS_DCACHE_OFF)) |
Devarsh Thakkar | 3a7a44d | 2023-12-05 21:25:17 +0530 | [diff] [blame] | 261 | gd->ram_top = CFG_SYS_SDRAM_BASE; |
| 262 | int ret = 0; |
Jan Kiszka | 7ce99f7 | 2020-05-18 07:57:22 +0200 | [diff] [blame] | 263 | |
Georgi Vlaev | a5076cd | 2022-06-14 17:45:30 +0300 | [diff] [blame] | 264 | dram_init(); |
Jan Kiszka | 7ce99f7 | 2020-05-18 07:57:22 +0200 | [diff] [blame] | 265 | |
| 266 | /* reserve TLB table */ |
| 267 | gd->arch.tlb_size = PGTABLE_SIZE; |
| 268 | |
Devarsh Thakkar | 3a7a44d | 2023-12-05 21:25:17 +0530 | [diff] [blame] | 269 | gd->ram_top += get_effective_memsize(); |
Jan Kiszka | 7ce99f7 | 2020-05-18 07:57:22 +0200 | [diff] [blame] | 270 | /* keep ram_top in the 32-bit address space */ |
Devarsh Thakkar | 3a7a44d | 2023-12-05 21:25:17 +0530 | [diff] [blame] | 271 | if (gd->ram_top >= 0x100000000) |
| 272 | gd->ram_top = (phys_addr_t)0x100000000; |
| 273 | |
| 274 | gd->relocaddr = gd->ram_top; |
| 275 | |
| 276 | ret = spl_reserve_video_from_ram_top(); |
| 277 | if (ret) |
| 278 | panic("Failed to reserve framebuffer memory (%d)\n", ret); |
Jan Kiszka | 7ce99f7 | 2020-05-18 07:57:22 +0200 | [diff] [blame] | 279 | |
Devarsh Thakkar | 3a7a44d | 2023-12-05 21:25:17 +0530 | [diff] [blame] | 280 | gd->arch.tlb_addr = gd->relocaddr - gd->arch.tlb_size; |
Nikhil M Jain | 3683681 | 2023-07-18 14:27:28 +0530 | [diff] [blame] | 281 | gd->arch.tlb_addr &= ~(0x10000 - 1); |
Jan Kiszka | 7ce99f7 | 2020-05-18 07:57:22 +0200 | [diff] [blame] | 282 | debug("TLB table from %08lx to %08lx\n", gd->arch.tlb_addr, |
| 283 | gd->arch.tlb_addr + gd->arch.tlb_size); |
Nikhil M Jain | 3683681 | 2023-07-18 14:27:28 +0530 | [diff] [blame] | 284 | gd->relocaddr = gd->arch.tlb_addr; |
Jan Kiszka | 7ce99f7 | 2020-05-18 07:57:22 +0200 | [diff] [blame] | 285 | |
Joao Paulo Goncalves | fc3557f | 2023-11-13 16:07:21 -0300 | [diff] [blame] | 286 | enable_caches(); |
Jan Kiszka | 7ce99f7 | 2020-05-18 07:57:22 +0200 | [diff] [blame] | 287 | #endif |
| 288 | } |
| 289 | |
| 290 | #if !(defined(CONFIG_SYS_ICACHE_OFF) && defined(CONFIG_SYS_DCACHE_OFF)) |
| 291 | void spl_board_prepare_for_boot(void) |
| 292 | { |
| 293 | dcache_disable(); |
| 294 | } |
| 295 | |
Patrick Delaunay | 35c949c | 2020-07-07 14:25:15 +0200 | [diff] [blame] | 296 | void spl_board_prepare_for_linux(void) |
Jan Kiszka | 7ce99f7 | 2020-05-18 07:57:22 +0200 | [diff] [blame] | 297 | { |
| 298 | dcache_disable(); |
| 299 | } |
| 300 | #endif |
Vignesh Raghavendra | 030f405 | 2021-12-24 12:55:29 +0530 | [diff] [blame] | 301 | |
| 302 | int misc_init_r(void) |
| 303 | { |
| 304 | if (IS_ENABLED(CONFIG_TI_AM65_CPSW_NUSS)) { |
| 305 | struct udevice *dev; |
| 306 | int ret; |
| 307 | |
| 308 | ret = uclass_get_device_by_driver(UCLASS_MISC, |
| 309 | DM_DRIVER_GET(am65_cpsw_nuss), |
| 310 | &dev); |
| 311 | if (ret) |
| 312 | printf("Failed to probe am65_cpsw_nuss driver\n"); |
| 313 | } |
| 314 | |
Vignesh Raghavendra | ae17d36 | 2023-04-20 21:42:21 +0530 | [diff] [blame] | 315 | /* Default FIT boot on HS-SE devices */ |
| 316 | if (get_device_type() == K3_DEVICE_TYPE_HS_SE) |
Andrew Davis | f1d7205 | 2022-10-07 11:27:46 -0500 | [diff] [blame] | 317 | env_set("boot_fit", "1"); |
| 318 | |
Vignesh Raghavendra | 030f405 | 2021-12-24 12:55:29 +0530 | [diff] [blame] | 319 | return 0; |
| 320 | } |
Andrew Davis | 2dde9a7 | 2023-04-06 11:38:17 -0500 | [diff] [blame] | 321 | |
| 322 | /** |
| 323 | * do_board_detect() - Detect board description |
| 324 | * |
| 325 | * Function to detect board description. This is expected to be |
| 326 | * overridden in the SoC family board file where desired. |
| 327 | */ |
| 328 | void __weak do_board_detect(void) |
| 329 | { |
| 330 | } |