diff options
author | Thomas Fitzsimmons <fitzsim@fitzsim.org> | 2019-09-06 07:51:19 -0400 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2019-10-15 08:40:02 -0600 |
commit | 640abba50763b215317468062a5e1b867ae57a76 (patch) | |
tree | f5b9f67ca81130f0a047595a1f786fd763f5c345 /drivers/spi | |
parent | 7f3289bf6dee6e4e6c7d95d3ee16d3ab3d55de55 (diff) | |
download | u-boot-640abba50763b215317468062a5e1b867ae57a76.tar.gz u-boot-640abba50763b215317468062a5e1b867ae57a76.tar.bz2 u-boot-640abba50763b215317468062a5e1b867ae57a76.zip |
dm: spi: Do not assume first SPI bus
When CONFIG_OF_PRIOR_STAGE is enabled, this workaround was needed
before device_bind_common assigned request numbers sequentially in the
absence of aliases.
Signed-off-by: Thomas Fitzsimmons <fitzsim@fitzsim.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/spi-uclass.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/spi-uclass.c b/drivers/spi/spi-uclass.c index 76c4b53c16..a4d1b65682 100644 --- a/drivers/spi/spi-uclass.c +++ b/drivers/spi/spi-uclass.c @@ -299,7 +299,7 @@ int spi_get_bus_and_cs(int busnum, int cs, int speed, int mode, bool created = false; int ret; -#if CONFIG_IS_ENABLED(OF_PLATDATA) || CONFIG_IS_ENABLED(OF_PRIOR_STAGE) +#if CONFIG_IS_ENABLED(OF_PLATDATA) ret = uclass_first_device_err(UCLASS_SPI, &bus); #else ret = uclass_get_device_by_seq(UCLASS_SPI, busnum, &bus); |