1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright (C) 2018, Bin Meng <bmeng.cn@gmail.com>
16 #include <virtio_types.h>
19 DECLARE_GLOBAL_DATA_PTR;
21 #if IS_ENABLED(CONFIG_MTD_NOR_FLASH)
22 int is_flash_available(void)
24 if (!ofnode_equal(ofnode_by_compatible(ofnode_null(), "cfi-flash"),
37 int board_late_init(void)
39 /* start usb so that usb keyboard can be used as input device */
40 if (CONFIG_IS_ENABLED(USB_KEYBOARD))
44 * Make sure virtio bus is enumerated so that peripherals
45 * on the virtio bus can be discovered by their drivers
53 u32 spl_boot_device(void)
55 /* RISC-V QEMU only supports RAM as SPL boot device */
56 return BOOT_DEVICE_RAM;
60 #ifdef CONFIG_SPL_LOAD_FIT
61 int board_fit_config_name_match(const char *name)
63 /* boot using first FIT config */
68 void *board_fdt_blob_setup(int *err)
71 /* Stored the DTB address there during our init */
72 return (void *)(ulong)gd->arch.firmware_fdt_addr;