mirror of
				https://github.com/smaeul/u-boot.git
				synced 2025-11-03 21:48:15 +00:00 
			
		
		
		
	Add a SPL test for the NAND load method. We use some different functions to do the writing from the main test since things like nand_write_skip_bad aren't available in SPL. We disable BBT scanning, since scan_bbt is only populated when not in SPL. We use nand_spl_loaders.c as it seems to be common to at least a few boards already. However, we do not use nand_spl_simple.c because it would require us to implement cmd_ctrl. The various nand load functions are adapted from omap_gpmc. However, they have been modified for simplicity/correctness. Signed-off-by: Sean Anderson <seanga2@gmail.com>
		
			
				
	
	
		
			35 lines
		
	
	
		
			779 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			35 lines
		
	
	
		
			779 B
		
	
	
	
		
			C
		
	
	
	
	
	
/* SPDX-License-Identifier: GPL-2.0+ */
 | 
						|
/*
 | 
						|
 * Copyright (c) 2016 Google, Inc
 | 
						|
 */
 | 
						|
 | 
						|
#ifndef __asm_spl_h
 | 
						|
#define __asm_spl_h
 | 
						|
 | 
						|
enum {
 | 
						|
	BOOT_DEVICE_MMC1,
 | 
						|
	BOOT_DEVICE_MMC2,
 | 
						|
	BOOT_DEVICE_MMC2_2,
 | 
						|
	BOOT_DEVICE_BOARD,
 | 
						|
	BOOT_DEVICE_VBE,
 | 
						|
	BOOT_DEVICE_CPGMAC,
 | 
						|
	BOOT_DEVICE_NOR,
 | 
						|
	BOOT_DEVICE_SPI,
 | 
						|
	BOOT_DEVICE_NAND,
 | 
						|
};
 | 
						|
 | 
						|
/**
 | 
						|
 * sandbox_find_next_phase() - Find the next phase of U-Boot
 | 
						|
 *
 | 
						|
 * This function is intended to be called from within sandbox SPL. It uses
 | 
						|
 * a few rules to find the filename of the next U-Boot phase. See also
 | 
						|
 * os_find_u_boot().
 | 
						|
 *
 | 
						|
 * @fname:	place to put full path to U-Boot
 | 
						|
 * @maxlen:	maximum size of @fname
 | 
						|
 * @use_img:	select the 'u-boot.img' file instead of the 'u-boot' ELF file
 | 
						|
 */
 | 
						|
int sandbox_find_next_phase(char *fname, int maxlen, bool use_img);
 | 
						|
 | 
						|
#endif
 |