summaryrefslogtreecommitdiff
path: root/include/common.h
diff options
context:
space:
mode:
authorAdam Ford <aford173@gmail.com>2018-04-15 13:51:26 -0400
committerTom Rini <trini@konsulko.com>2018-04-27 14:54:11 -0400
commitf1b1f77060beadbfe9f42a3be00019bd025afbd6 (patch)
treec3c189037cd6ccdb3e3ece5c60e08d86215627f5 /include/common.h
parentec37f05ec0a999e0bd79f87354716df6f9bc074d (diff)
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>
Diffstat (limited to 'include/common.h')
-rw-r--r--include/common.h12
1 files changed, 2 insertions, 10 deletions
diff --git a/include/common.h b/include/common.h
index 30875052709..795206aa0bd 100644
--- a/include/common.h
+++ b/include/common.h
@@ -279,19 +279,11 @@ int eeprom_write (unsigned dev_addr, unsigned offset, uchar *buffer, unsigned c
#define eeprom_write(dev_addr, offset, buffer, cnt) ((void)-ENOSYS)
#endif
-/*
- * Set this up regardless of board
- * type, to prevent errors.
- */
-#if defined(CONFIG_SPI) || !defined(CONFIG_SYS_I2C_EEPROM_ADDR)
-# define CONFIG_SYS_DEF_EEPROM_ADDR 0
-#else
-#if !defined(CONFIG_ENV_EEPROM_IS_ON_I2C)
+#if !defined(CONFIG_ENV_EEPROM_IS_ON_I2C) && defined(CONFIG_SYS_I2C_EEPROM_ADDR)
# define CONFIG_SYS_DEF_EEPROM_ADDR CONFIG_SYS_I2C_EEPROM_ADDR
#endif
-#endif /* CONFIG_SPI || !defined(CONFIG_SYS_I2C_EEPROM_ADDR) */
-#if defined(CONFIG_SPI)
+#if defined(CONFIG_MPC8XX_SPI)
extern void spi_init_f (void);
extern void spi_init_r (void);
extern ssize_t spi_read (uchar *, int, uchar *, int);