mirror of
				https://github.com/smaeul/u-boot.git
				synced 2025-10-31 03:58:17 +00:00 
			
		
		
		
	As part of bringing the master branch back in to next, we need to allow for all of these changes to exist here. Reported-by: Jonas Karlman <jonas@kwiboo.se> Signed-off-by: Tom Rini <trini@konsulko.com>
		
			
				
	
	
		
			27 lines
		
	
	
		
			536 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			536 B
		
	
	
	
		
			C
		
	
	
	
	
	
| // SPDX-License-Identifier: GPL-2.0+
 | |
| /*
 | |
|  * Copyright (C) 2023
 | |
|  * Ventana Micro Systems Inc.
 | |
|  *
 | |
|  */
 | |
| 
 | |
| #include <spl.h>
 | |
| #include <nvme.h>
 | |
| 
 | |
| static int spl_nvme_load_image(struct spl_image_info *spl_image,
 | |
| 			       struct spl_boot_device *bootdev)
 | |
| {
 | |
| 	int ret;
 | |
| 
 | |
| 	ret = nvme_scan_namespace();
 | |
| 	if (ret < 0)
 | |
| 		return ret;
 | |
| 
 | |
| 	ret = spl_blk_load_image(spl_image, bootdev, UCLASS_NVME,
 | |
| 				 CONFIG_SPL_NVME_BOOT_DEVICE,
 | |
| 				 CONFIG_SYS_NVME_BOOT_PARTITION);
 | |
| 	return ret;
 | |
| }
 | |
| 
 | |
| SPL_LOAD_IMAGE_METHOD("NVME", 0, BOOT_DEVICE_NVME, spl_nvme_load_image);
 |