Michal Simek | 2e53eb2 | 2022-09-19 14:21:02 +0200 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0 |
| 2 | /* |
| 3 | * Copyright (C) 2021 - 2022, Xilinx, Inc. |
| 4 | * Copyright (C) 2022, Advanced Micro Devices, Inc. |
| 5 | * |
| 6 | * Michal Simek <michal.simek@amd.com> |
| 7 | */ |
| 8 | |
Michal Simek | 2e53eb2 | 2022-09-19 14:21:02 +0200 | [diff] [blame] | 9 | #include <cpu_func.h> |
| 10 | #include <fdtdec.h> |
| 11 | #include <init.h> |
Ashok Reddy Soma | a7a5a1b | 2023-05-16 08:47:53 -0600 | [diff] [blame] | 12 | #include <env_internal.h> |
Michal Simek | 2e53eb2 | 2022-09-19 14:21:02 +0200 | [diff] [blame] | 13 | #include <log.h> |
| 14 | #include <malloc.h> |
| 15 | #include <time.h> |
| 16 | #include <asm/cache.h> |
| 17 | #include <asm/global_data.h> |
| 18 | #include <asm/io.h> |
| 19 | #include <asm/arch/hardware.h> |
| 20 | #include <asm/arch/sys_proto.h> |
| 21 | #include <dm/device.h> |
| 22 | #include <dm/uclass.h> |
| 23 | #include "../common/board.h" |
| 24 | |
| 25 | #include <linux/bitfield.h> |
| 26 | #include <debug_uart.h> |
| 27 | #include <generated/dt.h> |
| 28 | |
| 29 | DECLARE_GLOBAL_DATA_PTR; |
| 30 | |
| 31 | int board_init(void) |
| 32 | { |
| 33 | printf("EL Level:\tEL%d\n", current_el()); |
| 34 | |
| 35 | return 0; |
| 36 | } |
| 37 | |
| 38 | static u32 platform_id, platform_version; |
| 39 | |
| 40 | char *soc_name_decode(void) |
| 41 | { |
| 42 | char *name, *platform_name; |
| 43 | |
| 44 | switch (platform_id) { |
| 45 | case VERSAL_NET_SPP: |
| 46 | platform_name = "ipp"; |
| 47 | break; |
| 48 | case VERSAL_NET_EMU: |
| 49 | platform_name = "emu"; |
| 50 | break; |
| 51 | case VERSAL_NET_QEMU: |
| 52 | platform_name = "qemu"; |
| 53 | break; |
| 54 | default: |
| 55 | return NULL; |
| 56 | } |
| 57 | |
| 58 | /* |
| 59 | * --rev. are 6 chars |
| 60 | * max platform name is qemu which is 4 chars |
| 61 | * platform version number are 1+1 |
| 62 | * Plus 1 char for \n |
| 63 | */ |
| 64 | name = calloc(1, strlen(CONFIG_SYS_BOARD) + 13); |
| 65 | if (!name) |
| 66 | return NULL; |
| 67 | |
| 68 | sprintf(name, "%s-%s-rev%d.%d", CONFIG_SYS_BOARD, |
| 69 | platform_name, platform_version / 10, |
| 70 | platform_version % 10); |
| 71 | |
| 72 | return name; |
| 73 | } |
| 74 | |
| 75 | bool soc_detection(void) |
| 76 | { |
Michal Simek | ba73d6e | 2023-05-17 10:21:32 +0200 | [diff] [blame] | 77 | u32 version, ps_version; |
Michal Simek | 2e53eb2 | 2022-09-19 14:21:02 +0200 | [diff] [blame] | 78 | |
| 79 | version = readl(PMC_TAP_VERSION); |
| 80 | platform_id = FIELD_GET(PLATFORM_MASK, version); |
Michal Simek | ba73d6e | 2023-05-17 10:21:32 +0200 | [diff] [blame] | 81 | ps_version = FIELD_GET(PS_VERSION_MASK, version); |
Michal Simek | 2e53eb2 | 2022-09-19 14:21:02 +0200 | [diff] [blame] | 82 | |
| 83 | debug("idcode %x, version %x, usercode %x\n", |
| 84 | readl(PMC_TAP_IDCODE), version, |
| 85 | readl(PMC_TAP_USERCODE)); |
| 86 | |
Michal Simek | ba73d6e | 2023-05-17 10:21:32 +0200 | [diff] [blame] | 87 | debug("pmc_ver %lx, ps version %x, rtl version %lx\n", |
Michal Simek | 2e53eb2 | 2022-09-19 14:21:02 +0200 | [diff] [blame] | 88 | FIELD_GET(PMC_VERSION_MASK, version), |
Michal Simek | ba73d6e | 2023-05-17 10:21:32 +0200 | [diff] [blame] | 89 | ps_version, |
Michal Simek | 2e53eb2 | 2022-09-19 14:21:02 +0200 | [diff] [blame] | 90 | FIELD_GET(RTL_VERSION_MASK, version)); |
| 91 | |
| 92 | platform_version = FIELD_GET(PLATFORM_VERSION_MASK, version); |
| 93 | |
| 94 | if (platform_id == VERSAL_NET_SPP || |
| 95 | platform_id == VERSAL_NET_EMU) { |
Michal Simek | ba73d6e | 2023-05-17 10:21:32 +0200 | [diff] [blame] | 96 | if (ps_version == PS_VERSION_PRODUCTION) { |
| 97 | /* |
| 98 | * ES1 version ends at 1.9 version where there was +9 |
| 99 | * used because of IPP/SPP conversion. Production |
| 100 | * version have platform_version started from 0 again |
| 101 | * that's why adding +20 to continue with the same line. |
| 102 | * It means the last ES1 version ends at 1.9 version and |
| 103 | * new PRODUCTION line starts at 2.0. |
| 104 | */ |
| 105 | platform_version += 20; |
| 106 | } else { |
| 107 | /* |
| 108 | * 9 is diff for |
| 109 | * 0 means 0.9 version |
| 110 | * 1 means 1.0 version |
| 111 | * 2 means 1.1 version |
| 112 | * etc, |
| 113 | */ |
| 114 | platform_version += 9; |
| 115 | } |
Michal Simek | 2e53eb2 | 2022-09-19 14:21:02 +0200 | [diff] [blame] | 116 | } |
| 117 | |
| 118 | debug("Platform id: %d version: %d.%d\n", platform_id, |
| 119 | platform_version / 10, platform_version % 10); |
| 120 | |
| 121 | return true; |
| 122 | } |
| 123 | |
| 124 | int board_early_init_f(void) |
| 125 | { |
| 126 | if (IS_ENABLED(CONFIG_DEBUG_UART)) { |
| 127 | /* Uart debug for sure */ |
| 128 | debug_uart_init(); |
| 129 | puts("Debug uart enabled\n"); /* or printch() */ |
| 130 | } |
| 131 | |
| 132 | return 0; |
| 133 | } |
| 134 | |
| 135 | int board_early_init_r(void) |
| 136 | { |
Ashok Reddy Soma | 8162732 | 2023-01-10 08:44:07 +0100 | [diff] [blame] | 137 | u32 val; |
| 138 | |
| 139 | if (current_el() != 3) |
| 140 | return 0; |
| 141 | |
| 142 | debug("iou_switch ctrl div0 %x\n", |
| 143 | readl(&crlapb_base->iou_switch_ctrl)); |
| 144 | |
| 145 | writel(IOU_SWITCH_CTRL_CLKACT_BIT | |
| 146 | (CONFIG_IOU_SWITCH_DIVISOR0 << IOU_SWITCH_CTRL_DIVISOR0_SHIFT), |
| 147 | &crlapb_base->iou_switch_ctrl); |
| 148 | |
| 149 | /* Global timer init - Program time stamp reference clk */ |
| 150 | val = readl(&crlapb_base->timestamp_ref_ctrl); |
| 151 | val |= CRL_APB_TIMESTAMP_REF_CTRL_CLKACT_BIT; |
| 152 | writel(val, &crlapb_base->timestamp_ref_ctrl); |
| 153 | |
| 154 | debug("ref ctrl 0x%x\n", |
| 155 | readl(&crlapb_base->timestamp_ref_ctrl)); |
| 156 | |
| 157 | /* Clear reset of timestamp reg */ |
| 158 | writel(0, &crlapb_base->rst_timestamp); |
| 159 | |
| 160 | /* |
| 161 | * Program freq register in System counter and |
| 162 | * enable system counter. |
| 163 | */ |
| 164 | writel(CONFIG_COUNTER_FREQUENCY, |
| 165 | &iou_scntr_secure->base_frequency_id_register); |
| 166 | |
| 167 | debug("counter val 0x%x\n", |
| 168 | readl(&iou_scntr_secure->base_frequency_id_register)); |
| 169 | |
| 170 | writel(IOU_SCNTRS_CONTROL_EN, |
| 171 | &iou_scntr_secure->counter_control_register); |
| 172 | |
| 173 | debug("scntrs control 0x%x\n", |
| 174 | readl(&iou_scntr_secure->counter_control_register)); |
| 175 | debug("timer 0x%llx\n", get_ticks()); |
| 176 | debug("timer 0x%llx\n", get_ticks()); |
| 177 | |
Michal Simek | 2e53eb2 | 2022-09-19 14:21:02 +0200 | [diff] [blame] | 178 | return 0; |
| 179 | } |
| 180 | |
Ashok Reddy Soma | a7a5a1b | 2023-05-16 08:47:53 -0600 | [diff] [blame] | 181 | static u8 versal_net_get_bootmode(void) |
| 182 | { |
| 183 | u8 bootmode; |
| 184 | u32 reg = 0; |
| 185 | |
| 186 | reg = readl(&crp_base->boot_mode_usr); |
| 187 | |
| 188 | if (reg >> BOOT_MODE_ALT_SHIFT) |
| 189 | reg >>= BOOT_MODE_ALT_SHIFT; |
| 190 | |
| 191 | bootmode = reg & BOOT_MODES_MASK; |
| 192 | |
| 193 | return bootmode; |
| 194 | } |
| 195 | |
Venkatesh Yadav Abbarapu | 76244b3 | 2024-06-14 18:18:11 +0530 | [diff] [blame] | 196 | int spi_get_env_dev(void) |
| 197 | { |
| 198 | struct udevice *dev; |
| 199 | const char *mode = NULL; |
| 200 | int bootseq = -1; |
| 201 | |
| 202 | switch (versal_net_get_bootmode()) { |
| 203 | case QSPI_MODE_24BIT: |
| 204 | puts("QSPI_MODE_24\n"); |
| 205 | if (uclass_get_device_by_name(UCLASS_SPI, |
| 206 | "spi@f1030000", &dev)) { |
| 207 | debug("QSPI driver for QSPI device is not present\n"); |
| 208 | break; |
| 209 | } |
| 210 | mode = "xspi"; |
| 211 | bootseq = dev_seq(dev); |
| 212 | break; |
| 213 | case QSPI_MODE_32BIT: |
| 214 | puts("QSPI_MODE_32\n"); |
| 215 | if (uclass_get_device_by_name(UCLASS_SPI, |
| 216 | "spi@f1030000", &dev)) { |
| 217 | debug("QSPI driver for QSPI device is not present\n"); |
| 218 | break; |
| 219 | } |
| 220 | mode = "xspi"; |
| 221 | bootseq = dev_seq(dev); |
| 222 | break; |
| 223 | case OSPI_MODE: |
| 224 | puts("OSPI_MODE\n"); |
| 225 | if (uclass_get_device_by_name(UCLASS_SPI, |
| 226 | "spi@f1010000", &dev)) { |
| 227 | debug("OSPI driver for OSPI device is not present\n"); |
| 228 | break; |
| 229 | } |
| 230 | mode = "xspi"; |
| 231 | bootseq = dev_seq(dev); |
| 232 | break; |
| 233 | default: |
| 234 | break; |
| 235 | } |
| 236 | |
| 237 | debug("bootseq %d\n", bootseq); |
| 238 | return bootseq; |
| 239 | } |
| 240 | |
Michal Simek | b163476 | 2023-09-05 13:30:07 +0200 | [diff] [blame] | 241 | static int boot_targets_setup(void) |
Michal Simek | 2e53eb2 | 2022-09-19 14:21:02 +0200 | [diff] [blame] | 242 | { |
Ashok Reddy Soma | a7a5a1b | 2023-05-16 08:47:53 -0600 | [diff] [blame] | 243 | u8 bootmode; |
| 244 | struct udevice *dev; |
| 245 | int bootseq = -1; |
| 246 | int bootseq_len = 0; |
| 247 | int env_targets_len = 0; |
Venkatesh Yadav Abbarapu | 2c81c1d | 2023-09-04 08:50:33 +0530 | [diff] [blame] | 248 | const char *mode = NULL; |
Ashok Reddy Soma | a7a5a1b | 2023-05-16 08:47:53 -0600 | [diff] [blame] | 249 | char *new_targets; |
| 250 | char *env_targets; |
| 251 | |
Ashok Reddy Soma | a7a5a1b | 2023-05-16 08:47:53 -0600 | [diff] [blame] | 252 | bootmode = versal_net_get_bootmode(); |
| 253 | |
| 254 | puts("Bootmode: "); |
| 255 | switch (bootmode) { |
| 256 | case USB_MODE: |
| 257 | puts("USB_MODE\n"); |
| 258 | mode = "usb_dfu0 usb_dfu1"; |
| 259 | break; |
| 260 | case JTAG_MODE: |
| 261 | puts("JTAG_MODE\n"); |
| 262 | mode = "jtag pxe dhcp"; |
| 263 | break; |
| 264 | case QSPI_MODE_24BIT: |
| 265 | puts("QSPI_MODE_24\n"); |
Ashok Reddy Soma | 4c16d32 | 2023-06-14 03:30:58 -0600 | [diff] [blame] | 266 | if (uclass_get_device_by_name(UCLASS_SPI, |
| 267 | "spi@f1030000", &dev)) { |
Venkatesh Yadav Abbarapu | 2c81c1d | 2023-09-04 08:50:33 +0530 | [diff] [blame] | 268 | debug("QSPI driver for QSPI device is not present\n"); |
| 269 | break; |
Ashok Reddy Soma | 4c16d32 | 2023-06-14 03:30:58 -0600 | [diff] [blame] | 270 | } |
| 271 | mode = "xspi"; |
| 272 | bootseq = dev_seq(dev); |
Ashok Reddy Soma | a7a5a1b | 2023-05-16 08:47:53 -0600 | [diff] [blame] | 273 | break; |
| 274 | case QSPI_MODE_32BIT: |
| 275 | puts("QSPI_MODE_32\n"); |
Ashok Reddy Soma | 4c16d32 | 2023-06-14 03:30:58 -0600 | [diff] [blame] | 276 | if (uclass_get_device_by_name(UCLASS_SPI, |
| 277 | "spi@f1030000", &dev)) { |
Venkatesh Yadav Abbarapu | 2c81c1d | 2023-09-04 08:50:33 +0530 | [diff] [blame] | 278 | debug("QSPI driver for QSPI device is not present\n"); |
| 279 | break; |
Ashok Reddy Soma | 4c16d32 | 2023-06-14 03:30:58 -0600 | [diff] [blame] | 280 | } |
| 281 | mode = "xspi"; |
| 282 | bootseq = dev_seq(dev); |
Ashok Reddy Soma | a7a5a1b | 2023-05-16 08:47:53 -0600 | [diff] [blame] | 283 | break; |
| 284 | case OSPI_MODE: |
| 285 | puts("OSPI_MODE\n"); |
Ashok Reddy Soma | 4c16d32 | 2023-06-14 03:30:58 -0600 | [diff] [blame] | 286 | if (uclass_get_device_by_name(UCLASS_SPI, |
| 287 | "spi@f1010000", &dev)) { |
Venkatesh Yadav Abbarapu | 2c81c1d | 2023-09-04 08:50:33 +0530 | [diff] [blame] | 288 | debug("OSPI driver for OSPI device is not present\n"); |
| 289 | break; |
Ashok Reddy Soma | 4c16d32 | 2023-06-14 03:30:58 -0600 | [diff] [blame] | 290 | } |
| 291 | mode = "xspi"; |
| 292 | bootseq = dev_seq(dev); |
Ashok Reddy Soma | a7a5a1b | 2023-05-16 08:47:53 -0600 | [diff] [blame] | 293 | break; |
| 294 | case EMMC_MODE: |
| 295 | puts("EMMC_MODE\n"); |
| 296 | mode = "mmc"; |
| 297 | bootseq = dev_seq(dev); |
| 298 | break; |
Polak, Leszek | cddfc13 | 2023-10-08 14:34:42 +0000 | [diff] [blame] | 299 | case SELECTMAP_MODE: |
| 300 | puts("SELECTMAP_MODE\n"); |
| 301 | break; |
Ashok Reddy Soma | a7a5a1b | 2023-05-16 08:47:53 -0600 | [diff] [blame] | 302 | case SD_MODE: |
| 303 | puts("SD_MODE\n"); |
| 304 | if (uclass_get_device_by_name(UCLASS_MMC, |
| 305 | "mmc@f1040000", &dev)) { |
Venkatesh Yadav Abbarapu | 2c81c1d | 2023-09-04 08:50:33 +0530 | [diff] [blame] | 306 | debug("SD0 driver for SD0 device is not present\n"); |
| 307 | break; |
Ashok Reddy Soma | a7a5a1b | 2023-05-16 08:47:53 -0600 | [diff] [blame] | 308 | } |
| 309 | debug("mmc0 device found at %p, seq %d\n", dev, dev_seq(dev)); |
| 310 | |
| 311 | mode = "mmc"; |
| 312 | bootseq = dev_seq(dev); |
| 313 | break; |
| 314 | case SD1_LSHFT_MODE: |
| 315 | puts("LVL_SHFT_"); |
| 316 | fallthrough; |
| 317 | case SD_MODE1: |
| 318 | puts("SD_MODE1\n"); |
| 319 | if (uclass_get_device_by_name(UCLASS_MMC, |
| 320 | "mmc@f1050000", &dev)) { |
Venkatesh Yadav Abbarapu | 2c81c1d | 2023-09-04 08:50:33 +0530 | [diff] [blame] | 321 | debug("SD1 driver for SD1 device is not present\n"); |
| 322 | break; |
Ashok Reddy Soma | a7a5a1b | 2023-05-16 08:47:53 -0600 | [diff] [blame] | 323 | } |
| 324 | debug("mmc1 device found at %p, seq %d\n", dev, dev_seq(dev)); |
| 325 | |
| 326 | mode = "mmc"; |
| 327 | bootseq = dev_seq(dev); |
| 328 | break; |
| 329 | default: |
Ashok Reddy Soma | a7a5a1b | 2023-05-16 08:47:53 -0600 | [diff] [blame] | 330 | printf("Invalid Boot Mode:0x%x\n", bootmode); |
| 331 | break; |
| 332 | } |
| 333 | |
Venkatesh Yadav Abbarapu | 2c81c1d | 2023-09-04 08:50:33 +0530 | [diff] [blame] | 334 | if (mode) { |
| 335 | if (bootseq >= 0) { |
| 336 | bootseq_len = snprintf(NULL, 0, "%i", bootseq); |
| 337 | debug("Bootseq len: %x\n", bootseq_len); |
| 338 | } |
Ashok Reddy Soma | a7a5a1b | 2023-05-16 08:47:53 -0600 | [diff] [blame] | 339 | |
Venkatesh Yadav Abbarapu | 2c81c1d | 2023-09-04 08:50:33 +0530 | [diff] [blame] | 340 | /* |
| 341 | * One terminating char + one byte for space between mode |
| 342 | * and default boot_targets |
| 343 | */ |
| 344 | env_targets = env_get("boot_targets"); |
| 345 | if (env_targets) |
| 346 | env_targets_len = strlen(env_targets); |
Ashok Reddy Soma | a7a5a1b | 2023-05-16 08:47:53 -0600 | [diff] [blame] | 347 | |
Venkatesh Yadav Abbarapu | 2c81c1d | 2023-09-04 08:50:33 +0530 | [diff] [blame] | 348 | new_targets = calloc(1, strlen(mode) + env_targets_len + 2 + |
| 349 | bootseq_len); |
| 350 | if (!new_targets) |
| 351 | return -ENOMEM; |
Ashok Reddy Soma | a7a5a1b | 2023-05-16 08:47:53 -0600 | [diff] [blame] | 352 | |
Venkatesh Yadav Abbarapu | 2c81c1d | 2023-09-04 08:50:33 +0530 | [diff] [blame] | 353 | if (bootseq >= 0) |
| 354 | sprintf(new_targets, "%s%x %s", mode, bootseq, |
| 355 | env_targets ? env_targets : ""); |
| 356 | else |
| 357 | sprintf(new_targets, "%s %s", mode, |
| 358 | env_targets ? env_targets : ""); |
Ashok Reddy Soma | a7a5a1b | 2023-05-16 08:47:53 -0600 | [diff] [blame] | 359 | |
Venkatesh Yadav Abbarapu | 2c81c1d | 2023-09-04 08:50:33 +0530 | [diff] [blame] | 360 | env_set("boot_targets", new_targets); |
| 361 | } |
Michal Simek | b163476 | 2023-09-05 13:30:07 +0200 | [diff] [blame] | 362 | |
| 363 | return 0; |
| 364 | } |
| 365 | |
| 366 | int board_late_init(void) |
| 367 | { |
| 368 | int ret; |
| 369 | |
| 370 | if (!(gd->flags & GD_FLG_ENV_DEFAULT)) { |
| 371 | debug("Saved variables - Skipping\n"); |
| 372 | return 0; |
| 373 | } |
| 374 | |
| 375 | if (!IS_ENABLED(CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG)) |
| 376 | return 0; |
| 377 | |
| 378 | if (IS_ENABLED(CONFIG_DISTRO_DEFAULTS)) { |
| 379 | ret = boot_targets_setup(); |
| 380 | if (ret) |
| 381 | return ret; |
| 382 | } |
| 383 | |
Michal Simek | 2e53eb2 | 2022-09-19 14:21:02 +0200 | [diff] [blame] | 384 | return board_late_init_xilinx(); |
| 385 | } |
| 386 | |
| 387 | int dram_init_banksize(void) |
| 388 | { |
| 389 | int ret; |
| 390 | |
| 391 | ret = fdtdec_setup_memory_banksize(); |
| 392 | if (ret) |
| 393 | return ret; |
| 394 | |
| 395 | mem_map_fill(); |
| 396 | |
| 397 | return 0; |
| 398 | } |
| 399 | |
| 400 | int dram_init(void) |
| 401 | { |
| 402 | int ret; |
| 403 | |
Simon Glass | ea0ada3 | 2023-02-05 15:40:57 -0700 | [diff] [blame] | 404 | if (IS_ENABLED(CONFIG_SYS_MEM_RSVD_FOR_MMU)) |
Michal Simek | 2e53eb2 | 2022-09-19 14:21:02 +0200 | [diff] [blame] | 405 | ret = fdtdec_setup_mem_size_base(); |
| 406 | else |
| 407 | ret = fdtdec_setup_mem_size_base_lowest(); |
| 408 | |
| 409 | if (ret) |
| 410 | return -EINVAL; |
| 411 | |
| 412 | return 0; |
| 413 | } |
| 414 | |
| 415 | void reset_cpu(void) |
| 416 | { |
| 417 | } |
Venkatesh Yadav Abbarapu | fc4884b | 2024-03-12 17:04:21 +0530 | [diff] [blame] | 418 | |
Michal Simek | f3a541f | 2024-03-22 12:43:17 +0100 | [diff] [blame] | 419 | #if defined(CONFIG_ENV_IS_NOWHERE) |
Venkatesh Yadav Abbarapu | fc4884b | 2024-03-12 17:04:21 +0530 | [diff] [blame] | 420 | enum env_location env_get_location(enum env_operation op, int prio) |
| 421 | { |
| 422 | u8 bootmode = versal_net_get_bootmode(); |
| 423 | |
| 424 | if (prio) |
| 425 | return ENVL_UNKNOWN; |
| 426 | |
| 427 | switch (bootmode) { |
| 428 | case EMMC_MODE: |
| 429 | case SD_MODE: |
| 430 | case SD1_LSHFT_MODE: |
| 431 | case SD_MODE1: |
| 432 | if (IS_ENABLED(CONFIG_ENV_IS_IN_FAT)) |
| 433 | return ENVL_FAT; |
| 434 | if (IS_ENABLED(CONFIG_ENV_IS_IN_EXT4)) |
| 435 | return ENVL_EXT4; |
| 436 | return ENVL_NOWHERE; |
| 437 | case OSPI_MODE: |
| 438 | case QSPI_MODE_24BIT: |
| 439 | case QSPI_MODE_32BIT: |
| 440 | if (IS_ENABLED(CONFIG_ENV_IS_IN_SPI_FLASH)) |
| 441 | return ENVL_SPI_FLASH; |
| 442 | return ENVL_NOWHERE; |
| 443 | case JTAG_MODE: |
| 444 | case SELECTMAP_MODE: |
| 445 | default: |
| 446 | return ENVL_NOWHERE; |
| 447 | } |
| 448 | } |
Michal Simek | f3a541f | 2024-03-22 12:43:17 +0100 | [diff] [blame] | 449 | #endif |