mirror of
				https://source.denx.de/u-boot/u-boot.git
				synced 2025-11-04 02:11:25 +01:00 
			
		
		
		
	First, we convert CONFIG_SYS_I2C_LEGACY to Kconfig. Next, as you cannot have SYS_I2C_LEGACY and DM_I2C at the same time, introduce CONFIG_SPL_SYS_I2C_LEGACY so that we can enable the legacy option only in SPL. Finally, for some PowerPC cases we also need CONFIG_TPL_SYS_I2C_LEGACY support. Convert all of the existing users to one or more symbols. Signed-off-by: Tom Rini <trini@konsulko.com>
		
			
				
	
	
		
			33 lines
		
	
	
		
			741 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			33 lines
		
	
	
		
			741 B
		
	
	
	
		
			C
		
	
	
	
	
	
/* SPDX-License-Identifier: GPL-2.0+ */
 | 
						|
/*
 | 
						|
 * (C) Copyright 2011 CompuLab, Ltd. <www.compulab.co.il>
 | 
						|
 *
 | 
						|
 * Authors: Nikita Kiryanov <nikita@compulab.co.il>
 | 
						|
 *	    Igor Grinberg <grinberg@compulab.co.il>
 | 
						|
 */
 | 
						|
 | 
						|
#ifndef _EEPROM_
 | 
						|
#define _EEPROM_
 | 
						|
#include <errno.h>
 | 
						|
 | 
						|
#if CONFIG_IS_ENABLED(SYS_I2C_LEGACY)
 | 
						|
int cl_eeprom_read_mac_addr(uchar *buf, uint eeprom_bus);
 | 
						|
u32 cl_eeprom_get_board_rev(uint eeprom_bus);
 | 
						|
int cl_eeprom_get_product_name(uchar *buf, uint eeprom_bus);
 | 
						|
#else
 | 
						|
static inline int cl_eeprom_read_mac_addr(uchar *buf, uint eeprom_bus)
 | 
						|
{
 | 
						|
	return 1;
 | 
						|
}
 | 
						|
static inline u32 cl_eeprom_get_board_rev(uint eeprom_bus)
 | 
						|
{
 | 
						|
	return 0;
 | 
						|
}
 | 
						|
static inline int cl_eeprom_get_product_name(uchar *buf, uint eeprom_bus)
 | 
						|
{
 | 
						|
	return -ENOSYS;
 | 
						|
}
 | 
						|
#endif
 | 
						|
 | 
						|
#endif
 |