Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp5942458pxb; Mon, 14 Feb 2022 11:16:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJyW0P+ThDHGyOvTJvbjA+Zs/T8x8CMo3D3DTWNSk7H+Fh69sNDS/puuIMyNDbGsoyCHBfji X-Received: by 2002:a17:902:f54d:: with SMTP id h13mr467131plf.5.1644866173108; Mon, 14 Feb 2022 11:16:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644866173; cv=none; d=google.com; s=arc-20160816; b=YMMkkGGjX7JbzKJKapNrG0VhfNbxDOkZnhYj+P1K8AQFk9epNtVTDwb44fQdvcSF1B UX3joFEOiRgbIpVgS/fiQeIRGochR/syhRMst/Ecw/VAZm7UkicKydZyXTpjRKbz8SoC 5oHsNfsai8lgNq0WI1uE/zF9ubx4hQYAtL50FxKdFH1x4q/Ii8le6crJEss6uSlEKtjw hQjhmOLnhgrl61s32r22NDijSdqcq7Rkvj82ipRXxEFyOoEEBYY6fgO7ZnSMQbI4BCpL XGEsMJsqNIJL/oSA61G7ItbqzLad7+at4N2vPwLrO49E0pakGQd0oPyoPu+RH7MmN56b EqbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=yg03UMQaSNIQ85BoQjWBgCggZDbQO1phATVO+/cWhJk=; b=Z7z0K2ApjqYg+QxZ5uzT7TZS3PkHVMtvdK/tnSynj+3KuV+TYLf5L1/tb/8CT9owB8 w472+/w2V+wPpTU0q3FY0omqhrd/gSUYehIP//QPNzUpELFZuQIE76gr11LNIgC6R2JJ zTm4SwRSYv3MgduJzGp1Hr5IbnvX+W8e5OAlrGfZ46wbifN6HfrsITzqgZVi5RgRh9o6 2SDwLFdVO2iEp6Fkd+OyyiH0ACJda/4uY/Q91IdRJsDBUF7fYyyWWpbtu2GmzFF6tUiP g0YQ5XsFgtK8eTQFaQZtsVEx6ac6QcP0VEvPgcqt1x68mZkZy3xc6p7sH/5bIWDvvYvq Zh1w== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=codethink.co.uk Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id v22si505335pgb.125.2022.02.14.11.16.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Feb 2022 11:16:13 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=codethink.co.uk Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 57E4328E02; Mon, 14 Feb 2022 11:08:24 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242261AbiBNIpI (ORCPT + 99 others); Mon, 14 Feb 2022 03:45:08 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:45070 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231406AbiBNIpG (ORCPT ); Mon, 14 Feb 2022 03:45:06 -0500 Received: from imap3.hz.codethink.co.uk (imap3.hz.codethink.co.uk [176.9.8.87]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B9EC4DF55 for ; Mon, 14 Feb 2022 00:44:59 -0800 (PST) Received: from [167.98.27.226] (helo=rainbowdash) by imap3.hz.codethink.co.uk with esmtpsa (Exim 4.92 #3 (Debian)) id 1nJWcG-0007ZZ-Cs; Mon, 14 Feb 2022 08:21:48 +0000 Received: from ben by rainbowdash with local (Exim 4.95) (envelope-from ) id 1nJWcG-004vz3-2K; Mon, 14 Feb 2022 08:21:48 +0000 From: Ben Dooks To: linux-kernel@vger.kernel.org, bhelgaas@google.comv, linux-pci@vger.kernel.org Cc: paul.walmsley@sifive.com, greentime.hu@sifive.com, david.abdurachmanov@gmail.com, Ben Dooks Subject: [PATCH 1/2] PCI: fu740: fix finding GPIOs Date: Mon, 14 Feb 2022 08:21:43 +0000 Message-Id: <20220214082144.1176084-2-ben.dooks@codethink.co.uk> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220214082144.1176084-1-ben.dooks@codethink.co.uk> References: <20220214082144.1176084-1-ben.dooks@codethink.co.uk> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The calls to devm_gpiod_get_optional() have the -gpios at the end of the name. This means the pcie driver is not finding the necessary reset or power GPOOs to allow the PCIe devices on the SiFive Unmatched boards. This has not been a noted bug as the PCIe probe from u-boot has been required to get the PCIe working due to other issues with the system setup. It could have been broken since the driver inclusion, and not been noticed as it is not necessary for the driver to funciton. Signed-off-by: Ben Dooks --- drivers/pci/controller/dwc/pcie-fu740.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pci/controller/dwc/pcie-fu740.c b/drivers/pci/controller/dwc/pcie-fu740.c index 00cde9a248b5..842b7202b96e 100644 --- a/drivers/pci/controller/dwc/pcie-fu740.c +++ b/drivers/pci/controller/dwc/pcie-fu740.c @@ -259,11 +259,11 @@ static int fu740_pcie_probe(struct platform_device *pdev) return PTR_ERR(afp->mgmt_base); /* Fetch GPIOs */ - afp->reset = devm_gpiod_get_optional(dev, "reset-gpios", GPIOD_OUT_LOW); + afp->reset = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_LOW); if (IS_ERR(afp->reset)) return dev_err_probe(dev, PTR_ERR(afp->reset), "unable to get reset-gpios\n"); - afp->pwren = devm_gpiod_get_optional(dev, "pwren-gpios", GPIOD_OUT_LOW); + afp->pwren = devm_gpiod_get_optional(dev, "pwren", GPIOD_OUT_LOW); if (IS_ERR(afp->pwren)) return dev_err_probe(dev, PTR_ERR(afp->pwren), "unable to get pwren-gpios\n"); -- 2.34.1