mirror of
				https://github.com/smaeul/u-boot.git
				synced 2025-11-04 05:50:17 +00:00 
			
		
		
		
	U-Boot includes a SPI emulation driver already but it is not explicit, and is hidden in the SPI flash code. Conceptually with sandbox's SPI implementation we have a layer which creates SPI bus transitions and a layer which interprets them, currently only for SPI flash. The latter is actually an emulation, and it should be possible to add more than one emulation - not just SPI flash. Add a SPI emulation uclass so that other emulations can be plugged in to support different types of emulated devices on difference buses/chip selects. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
		
			
				
	
	
		
			16 lines
		
	
	
		
			237 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			237 B
		
	
	
	
		
			C
		
	
	
	
	
	
/*
 | 
						|
 * Copyright (c) 2014 Google, Inc
 | 
						|
 *
 | 
						|
 * SPDX-License-Identifier:	GPL-2.0+
 | 
						|
 */
 | 
						|
 | 
						|
#include <common.h>
 | 
						|
#include <dm.h>
 | 
						|
#include <spi.h>
 | 
						|
#include <spi_flash.h>
 | 
						|
 | 
						|
UCLASS_DRIVER(spi_emul) = {
 | 
						|
	.id		= UCLASS_SPI_EMUL,
 | 
						|
	.name		= "spi_emul",
 | 
						|
};
 |