mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 10:39:08 +00:00
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:
parent
ec37f05ec0
commit
f1b1f77060
621 changed files with 602 additions and 100 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue