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>
This commit is contained in:
parent
7f3289bf6d
commit
640abba507
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user