Convert CONFIG_SPI to Kconfig
This converts the following to Kconfig: CONFIG_SPI This partly involves updating code that assumes that CONFIG_SPI implies things that are specific to the MPC8xx SPI driver. For now, just update the CONFIG tests. This also involves reworking the default for CONFIG_SYS_DEF_EEPROM_ADDR so that we don't set it when we cannot make a reasonable default, as it does not cause any compile failures. Signed-off-by: Adam Ford <aford173@gmail.com> Signed-off-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
@@ -68,7 +68,7 @@ __weak int eeprom_write_enable(unsigned dev_addr, int state)
|
||||
void eeprom_init(int bus)
|
||||
{
|
||||
/* SPI EEPROM */
|
||||
#if defined(CONFIG_SPI) && !defined(CONFIG_ENV_EEPROM_IS_ON_I2C)
|
||||
#if defined(CONFIG_MPC8XX_SPI) && !defined(CONFIG_ENV_EEPROM_IS_ON_I2C)
|
||||
spi_init_f();
|
||||
#endif
|
||||
|
||||
@@ -131,7 +131,7 @@ static int eeprom_rw_block(unsigned offset, uchar *addr, unsigned alen,
|
||||
int ret = 0;
|
||||
|
||||
/* SPI */
|
||||
#if defined(CONFIG_SPI) && !defined(CONFIG_ENV_EEPROM_IS_ON_I2C)
|
||||
#if defined(CONFIG_MPC8XX_SPI) && !defined(CONFIG_ENV_EEPROM_IS_ON_I2C)
|
||||
if (read)
|
||||
spi_read(addr, alen, buffer, len);
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user