From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0D6CDC4345F for ; Tue, 16 Apr 2024 16:02:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ovXZPmTCwrU1UZU4TLbUJKKEdrZGBPKY29XokRD4q+0=; b=4D1hooWkxYWNEQ 7zBnOEvQLSwH45qsh0gqjZPegViSQPmXY1PTRTpmn9J/E3j1ZEClEI0Oak1XECbPAJoPom8c86w2a 4YKiCNfwIWo8QU7XtsR8t5l0vWM+SitlsCsbzxMm9JkdxgrJPOxblG/EY196UgTdUwpK02UyZN3Yw aIBLw+5pT60nRpVVWtUmAjaUSzHSiDBkSZTmiByrMk60plZZPUz+pSu7B07sLYKXAmCf4R76EZR4d SJpSUjVAF8rgAY087XGpV6VbL4D7h4ec7g+l6PTqqkEPvIcPG7GaNyqJ8VIg+YBwpkIwJU7lK4lyf j52V3iyLTOqSlUms6bdw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rwlFq-0000000CuOX-3ryT; Tue, 16 Apr 2024 16:01:54 +0000 Received: from relay6-d.mail.gandi.net ([217.70.183.198]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rwlFk-0000000CuM6-18Yg for linux-arm-kernel@lists.infradead.org; Tue, 16 Apr 2024 16:01:53 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id 4A265C0008; Tue, 16 Apr 2024 16:01:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1713283303; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=y7lcnqaRazFwJFVK5/WHOD289rB7ddonTK7K7dl1R7o=; b=hxAl+vKX+Mf28jmCLqp3EiKVxs99qWvy6NWTthAfL/1rQYtCSESgYzQEgIcs9JNjpuyKag cgtHErhGAkaYL237+kfmsg1uL1hzBndwQT6uMSnnFHEAXzLfXg0Rjqh4Afm+iKRTPKDZPq if3ChBmix4sTpHn2V5XYpZa0lCIGhLOgnwjCyKWlpu2E4PBgu50gjLbDYD3/5/W0Su88cO rzfckWPAUlM+xsXn6dBgX34WOOFUm3dd4PnZ7+780r/AZu4gbz/Rf/hz1zDQZHQxpQOFf5 CXQ1lFvZNiUf3xCdT7bRFM7WkpkM3Fgb2RSq88sn8cnTOfMbv+he40GgOokbkQ== Message-ID: Date: Tue, 16 Apr 2024 18:01:38 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v5 05/11] PCI: cadence: Extract link setup sequence from cdns_pcie_host_setup() To: Dan Carpenter Cc: Linus Walleij , Bartosz Golaszewski , Tony Lindgren , Aaro Koskinen , Janusz Krzysztofik , Vignesh R , Andi Shyti , Peter Rosin , Lorenzo Pieralisi , =?UTF-8?Q?Krzysztof_Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas , Siddharth Vadapalli , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, linux-i2c@vger.kernel.org, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, gregory.clement@bootlin.com, theo.lebrun@bootlin.com, thomas.petazzoni@bootlin.com, u-kumar1@ti.com References: <20240102-j7200-pcie-s2r-v5-0-4b8c46711ded@bootlin.com> <20240102-j7200-pcie-s2r-v5-5-4b8c46711ded@bootlin.com> <111df2a5-7e05-480c-a5a5-57cf8d83c0d0@moroto.mountain> Content-Language: en-US From: Thomas Richard In-Reply-To: <111df2a5-7e05-480c-a5a5-57cf8d83c0d0@moroto.mountain> X-GND-Sasl: thomas.richard@bootlin.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240416_090148_481657_604EFDE7 X-CRM114-Status: GOOD ( 14.34 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 4/16/24 16:16, Dan Carpenter wrote: > On Tue, Apr 16, 2024 at 03:29:54PM +0200, Thomas Richard wrote: >> diff --git a/drivers/pci/controller/cadence/pcie-cadence-host.c b/drivers/pci/controller/cadence/pcie-cadence-host.c >> index 5b14f7ee3c79..93d9922730af 100644 >> --- a/drivers/pci/controller/cadence/pcie-cadence-host.c >> +++ b/drivers/pci/controller/cadence/pcie-cadence-host.c >> @@ -497,6 +497,30 @@ static int cdns_pcie_host_init(struct device *dev, >> return cdns_pcie_host_init_address_translation(rc); >> } >> >> +int cdns_pcie_host_link_setup(struct cdns_pcie_rc *rc) >> +{ >> + struct cdns_pcie *pcie = &rc->pcie; >> + struct device *dev = rc->pcie.dev; >> + int ret; >> + >> + if (rc->quirk_detect_quiet_flag) >> + cdns_pcie_detect_quiet_min_delay_set(&rc->pcie); >> + >> + cdns_pcie_host_enable_ptm_response(pcie); >> + >> + ret = cdns_pcie_start_link(pcie); >> + if (ret) { >> + dev_err(dev, "Failed to start link\n"); >> + return ret; >> + } >> + >> + ret = cdns_pcie_host_start_link(rc); >> + if (ret) >> + dev_dbg(dev, "PCIe link never came up\n"); > > If we're going to ignore this error the message should be a dev_err() > at least. Hello Dan, In fact we already ignore this error [1] I only moved the hardware configuration part of cdns_pcie_host_setup() into a new function cdns_pcie_host_link_setup(). But I can use this patch to switch to dev_err() if needed. [1] https://elixir.bootlin.com/linux/v6.9-rc4/source/drivers/pci/controller/cadence/pcie-cadence-host.c#L549 Regards, Thomas _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel