From patchwork Fri Sep 6 11:51:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Fitzsimmons X-Patchwork-Id: 1158961 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=fitzsim.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=fitzsim-org.20150623.gappssmtp.com header.i=@fitzsim-org.20150623.gappssmtp.com header.b="vrvo2cyx"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46Pwsk3rqrz9s7T for ; Fri, 6 Sep 2019 21:52:42 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 105DCC21C2F; Fri, 6 Sep 2019 11:52:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 44012C21E0D; Fri, 6 Sep 2019 11:52:23 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 2BF02C21C2F; Fri, 6 Sep 2019 11:52:14 +0000 (UTC) Received: from mail-io1-f67.google.com (mail-io1-f67.google.com [209.85.166.67]) by lists.denx.de (Postfix) with ESMTPS id 1DD62C21E1B for ; Fri, 6 Sep 2019 11:52:14 +0000 (UTC) Received: by mail-io1-f67.google.com with SMTP id s21so12104874ioa.1 for ; Fri, 06 Sep 2019 04:52:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fitzsim-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=CjbAM/ok2ooJrZdEMHFy5FgU29U5XFf9wuJDl+5ly3o=; b=vrvo2cyx6TWJe4Er/1+7uav1zE+JKaxx4kDH60YPgAx8RS4I6KXeyx7KcLC2GxMbcM gjjBDXgoA80GmbarWhE9EX6OiymbLBUkrvjdOAHCW+h5ViW8QasYc152aXoFHYPwHbH9 d2IgQJLgNamP1P34Vy/qNUjRPVZzx5/U/2QKB1P7NdyqXomwGF21m1tjIpjBnaLF1hts PZYlMy3TYqh67jlX/FfgVSaQw0Ei1K3CY8kZJxqOr9y+VEEhtHBntrCiU5U6tF3Psp9s KKUxVOKD7YBqh0kqaiYOQ/pbiuwT7tmuXsO64c1U4MxuKhU7K7047Mhik4EACNoa3Pyz Jy9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=CjbAM/ok2ooJrZdEMHFy5FgU29U5XFf9wuJDl+5ly3o=; b=srjGlldxJbKcMZL1wI4DsRnaCKGIGON4D6A4+CVBRIQzi8AM5818ik8UMwwnTdxW5a j50yZEsDheZ/K2kGXtOFyLxN23HTeTh+V06yahaCiP1XqZi77OsZ72FZJ3N1rAwgtfU+ czTP/iXnyizkstrUdlFnsUD0TPa11IVjiJvTfkNa7k/zQcmvxp+RrNuMLPYXvb1riypU LjE6qgfdGHkAehCFDyixPyXN4GUxugbNc3V3DmEcQHlZkWBz3xfkK5rN6uN+3kvSiB0p zReoVfAPTdQ6iexE1wDxrLeJPimsgbN96o3/EO3G475/O375LrwNQGDhsMbUlODkxrwv /78g== X-Gm-Message-State: APjAAAWsR0hETUQ7Ygcdv2FM5KvxPe+6JJYh+5ixwwZlW/6Ehp1wZ05p 2lPbcJ9wmRP1dO66KCp/UaaHnfBP00r07FTY X-Google-Smtp-Source: APXvYqw9JX9RD5kom91CTgtwXNo2xIYVplDDugRvvXdR/z1VXSNDKNFzn3AP9an/1ahcz0Fwvs6zlA== X-Received: by 2002:a6b:b4c7:: with SMTP id d190mr4918376iof.209.1567770732899; Fri, 06 Sep 2019 04:52:12 -0700 (PDT) Received: from localhost.localdomain (69-165-165-189.dsl.teksavvy.com. [69.165.165.189]) by smtp.gmail.com with ESMTPSA id a7sm3893816iok.41.2019.09.06.04.52.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2019 04:52:12 -0700 (PDT) From: Thomas Fitzsimmons To: u-boot@lists.denx.de Date: Fri, 6 Sep 2019 07:51:19 -0400 Message-Id: <10f5931fa5cfd0304d631578ed26f9ff6000c8d8.1567769914.git.fitzsim@fitzsim.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: References: MIME-Version: 1.0 Cc: Stefan Roese , Tom Rini Subject: [U-Boot] [PATCH 2/2] dm: spi: Do not assume first SPI bus X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" 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 Cc: Bin Meng Cc: Simon Glass Reviewed-by: Simon Glass Reviewed-by: Simon Glass --- drivers/spi/spi-uclass.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);