1 // SPDX-License-Identifier: GPL-2.0+ 2 /* 3 * Copyright (C) 2023 4 * Ventana Micro Systems Inc. 5 * 6 */ 7 8 #include <spl.h> 9 #include <nvme.h> 10 spl_nvme_load_image(struct spl_image_info * spl_image,struct spl_boot_device * bootdev)11static int spl_nvme_load_image(struct spl_image_info *spl_image, 12 struct spl_boot_device *bootdev) 13 { 14 int ret; 15 16 ret = nvme_scan_namespace(); 17 if (ret < 0) 18 return ret; 19 20 ret = spl_blk_load_image(spl_image, bootdev, UCLASS_NVME, 21 CONFIG_SPL_NVME_BOOT_DEVICE, 22 CONFIG_SYS_NVME_BOOT_PARTITION); 23 return ret; 24 } 25 26 SPL_LOAD_IMAGE_METHOD("NVME", 0, BOOT_DEVICE_NVME, spl_nvme_load_image); 27