Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1070106pxm; Wed, 23 Feb 2022 17:19:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJy3RtCiowwfHBg8Fer6WlNtyvcAmDLlx3XthNSjCSsIUO4Th5uQdqH4WTulzVzdIIc6CAy6 X-Received: by 2002:a17:902:ec91:b0:14f:d4d7:ddab with SMTP id x17-20020a170902ec9100b0014fd4d7ddabmr196191plg.69.1645665589883; Wed, 23 Feb 2022 17:19:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645665589; cv=none; d=google.com; s=arc-20160816; b=nCzcCAxemlvGgnB6IQ28X/CV1ldoMnhCPOHCVUDQGv9cYqvhvZdSZ4XF5LU6wPxjAm Ja0vqtmQ9lYY76+KiKx2ejrvY0T3nsqLN0vWD8mv3Xcsthl9i+VRSReg7T0Rq9KowQX4 E+scoAN/I6SnkWPmhp8cd+wy3u1rKBKiezvw8FGc3ysG7R8zPcTMyYdMAbtVkCR4S4tA CKVOhZ2AcQ3/39wKChiJ7lO2LM+i+v10OeL2ILv6pHOGAR9ZSyvOP6RKy+yHdE9Zm+BG E9icO27ayNjmQGrKiTTwCZBcL4Z+RRzkLt5ft+ouUDWvkh0Yqe0RWbf24S2HJyog8dMm BmhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :message-id:subject:cc:to:from:date:dkim-signature; bh=ynCCpqhzmZX95swEGv/PnuIQME1/VRm/eJV/h4Znf7o=; b=iAPurYHTEhaHOYDTF/qBKZhEJjVrv96IUfIwr9INJrjfXtQGTGhdG0hy7124he2OPN lHe6UTA6KinKf6Xna/D/olgzkx75CHUNiW7rhAF4bzFPkNtnusjU2MNplWJW6sfSCTEx 7EQTxb9OByCAgxBze5UpIXAhtPVkmFRQLW/yi373DxFfAfA9XVNok5Voqlc/wV6nuMGq sJ/qHMmVO5WgEl9qn2mqLp1koEFtHanTd2lYDGQzNiF9Y16j0UvRR4zv9Y57qBabMHRc wyn9liATbO44lhof2+sRqo+Qil2cwn7xbQZC4zrPz7ndqHNQaIqSVy+knn2n18/LI2+q 80XA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="k600/Lqr"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id bf19si1191281pgb.569.2022.02.23.17.19.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Feb 2022 17:19:49 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="k600/Lqr"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C0EFD187E21; Wed, 23 Feb 2022 17:04:07 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241737AbiBWUwC (ORCPT + 99 others); Wed, 23 Feb 2022 15:52:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50300 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237436AbiBWUwB (ORCPT ); Wed, 23 Feb 2022 15:52:01 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5EBB71175; Wed, 23 Feb 2022 12:51:32 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E14F36184A; Wed, 23 Feb 2022 20:51:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 06108C340E7; Wed, 23 Feb 2022 20:51:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1645649491; bh=fuBbEnwtDxq+kiQXx8gxSj7IRCfE9GArt5C1WdOxPbI=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=k600/LqrVOgUpVAQTlIMr5ar7Gb1FMGwtEL7yplP6HRlmTtueupWshev9F4nYEhUA YLLAMQLykHFJP60Ur1b2gxqkYtsCgRtS6cx9zhxQUfLlpHwgRzvm6ScAqmySiAl0aK uWDHI/ivvvl3hcjJHz57Ly/2Q+uCI0mKtMLdNeWdqbtGNQEQlRV2zX8LCh5P2gJDC1 Zfo3EK1E0MV15ni2U5x53DKNoc+dnDyQuYcYIUgNSJmu24f+R8YVDcdMzOSXSDUX31 VLXXTI9bp7sXld5FfnvXLS4XTTPl6+3xYH6FvQMEza2diqj4RD9UxhiRO4bQgbxf8U ivug1SmqHD64Q== Date: Wed, 23 Feb 2022 14:51:29 -0600 From: Bjorn Helgaas To: Ben Dooks Cc: paul.walmsley@sifive.com, greentime.hu@sifive.com, lorenzo.pieralisi@arm.com, robh@kernel.org, kw@linux.com, bhelgaas@google.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Subject: Re: [PATCHv4 1/2] PCI: fu740: fix finding GPIOs Message-ID: <20220223205129.GA148800@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220221210347.1335004-1-ben.dooks@codethink.co.uk> X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 On Mon, Feb 21, 2022 at 09:03:46PM +0000, Ben Dooks wrote: > The calls to devm_gpiod_get_optional() have the -gpios at the end of > the name but the GPIO core code is already adding the suffix during > the lookup. This means the PCIe driver is not finding the necessary > reset or power lines to allow initialisation of the PCIe. > > This bug has not been noticed as if U-Boot has setup the GPIO lines > for the hardware when it does the PCIe initialisation (either by > booting from PCIe or user command to access PCIe) then the PCIe > will work in Linux. The U-Boot as supplied by SiFive does not by > default initialise any PCIe component. Lorenzo, if you apply this, would you mind s/fix/Fix/ in the subject? Or maybe even update to "Drop redundant '-gpios' from DT GPIO lookup"? > 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 >