[U-Boot,2/2] dm: spi: Do not assume first SPI bus
diff mbox series

Message ID 10f5931fa5cfd0304d631578ed26f9ff6000c8d8.1567769914.git.fitzsim@fitzsim.org
State Accepted
Commit 640abba50763b215317468062a5e1b867ae57a76
Delegated to: Simon Glass
Headers show
Series
  • dm: CONFIG_OF_PRIOR_STAGE request number fixes
Related show

Commit Message

Thomas Fitzsimmons Sept. 6, 2019, 11:51 a.m. UTC
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>
---
 drivers/spi/spi-uclass.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Simon Glass Sept. 27, 2019, 1:49 a.m. UTC | #1
On Fri, 6 Sep 2019 at 04:52, Thomas Fitzsimmons <fitzsim@fitzsim.org> wrote:
>
> 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>
> ---
>  drivers/spi/spi-uclass.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Simon Glass <sjg@chromium.org>
Simon Glass Sept. 27, 2019, 11:28 p.m. UTC | #2
On Fri, 6 Sep 2019 at 04:52, Thomas Fitzsimmons <fitzsim@fitzsim.org> wrote:
>
> 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>
> ---
>  drivers/spi/spi-uclass.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Simon Glass <sjg@chromium.org>

Applied to u-boot-dm/next, thanks!

Patch
diff mbox series

diff --git a/drivers/spi/spi-uclass.c b/drivers/spi/spi-uclass.c
index 88cb2a1262..5e1f2232e5 100644
--- a/drivers/spi/spi-uclass.c
+++ b/drivers/spi/spi-uclass.c
@@ -275,7 +275,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);