Merge branch 'master' of git://git.denx.de/u-boot-spi
authorTom Rini <trini@konsulko.com>
Wed, 5 Dec 2018 20:06:24 +0000 (15:06 -0500)
committerTom Rini <trini@konsulko.com>
Wed, 5 Dec 2018 20:06:24 +0000 (15:06 -0500)
- Various MTD fixes from Boris
- Zap various unused / legacy paths.
- pxa3xx NAND update from Miquel

Signed-off-by: Tom Rini <trini@konsulko.com>
1  2 
cmd/eeprom.c
common/board_f.c
common/board_r.c
drivers/mtd/spi/sf_probe.c
include/common.h
scripts/config_whitelist.txt

diff --cc cmd/eeprom.c
index e88cb131a16d0bf08017ea1d3a36df724f696541,9136630ada4a27494b8539e4a77ad111dfd50a0b..6c29b33ba34c9fe1e52603d60765aed0612a5379
@@@ -129,31 -124,6 +124,23 @@@ static int eeprom_rw_block(unsigned off
  {
        int ret = 0;
  
-       /* SPI */
- #if defined(CONFIG_MPC8XX_SPI) && !defined(CONFIG_ENV_EEPROM_IS_ON_I2C)
-       if (read)
-               spi_read(addr, alen, buffer, len);
-       else
-               spi_write(addr, alen, buffer, len);
- #else /* I2C */
 +#if defined(CONFIG_DM_I2C) && defined(CONFIG_SYS_I2C_EEPROM_BUS)
 +      struct udevice *dev;
 +
 +      ret = i2c_get_chip_for_busnum(CONFIG_SYS_I2C_EEPROM_BUS, addr[0],
 +                                    alen - 1, &dev);
 +      if (ret) {
 +              printf("%s: Cannot find udev for a bus %d\n", __func__,
 +                     CONFIG_SYS_I2C_EEPROM_BUS);
 +              return CMD_RET_FAILURE;
 +      }
 +
 +      if (read)
 +              ret = dm_i2c_read(dev, offset, buffer, len);
 +      else
 +              ret = dm_i2c_write(dev, offset, buffer, len);
 +
 +#else /* Non DM I2C support - will be removed */
  #if defined(CONFIG_SYS_I2C_EEPROM_BUS)
        i2c_set_bus_num(CONFIG_SYS_I2C_EEPROM_BUS);
  #endif
                ret = i2c_read(addr[0], offset, alen - 1, buffer, len);
        else
                ret = i2c_write(addr[0], offset, alen - 1, buffer, len);
- #endif
 -
 +#endif /* CONFIG_DM_I2C && CONFIG_SYS_I2C_EEPROM_BUS */
        if (ret)
 -              ret = 1;
 +              ret = CMD_RET_FAILURE;
  
        return ret;
  }
index 835b7247c58d634bf7655ca87d96e85acd788ae4,a3e80ca9512f79667ea416515b03cd374c6706c2..149a7229e8fa982d53ce003c67ddb2db7d45e2e1
  #include <os.h>
  #include <post.h>
  #include <relocate.h>
- #include <spi.h>
 +#ifdef CONFIG_SPL
 +#include <spl.h>
 +#endif
  #include <status_led.h>
  #include <sysreset.h>
  #include <timer.h>
Simple merge
Simple merge
Simple merge
Simple merge