Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp13736102pxu; Mon, 4 Jan 2021 03:04:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJynO6mutFlouV5EklI3ZVqQc9a0qjJIx4iICgG06nnUlZfq21UyxaALr7e586pYShCZm98o X-Received: by 2002:a17:906:a48:: with SMTP id x8mr64901338ejf.444.1609758292161; Mon, 04 Jan 2021 03:04:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609758292; cv=none; d=google.com; s=arc-20160816; b=gHtK9COFyIKLb0V55uxTmhziL820L2Y0MEwXvT2z6i3Au4SDy6SnBMtoVHg0j+DJPy uLI8D301CffEMwPJFSeDwy0UEoFIFBaV4lgj897AAeuTnXB64nQSJq4U3gevQsGuoN5U upPizDoca6mDwqTuJSAdCgNeMOdQCjhqFdVFN38qn5lHuuVDhUjCsQowzC+s6+/B/YPz A5PXhcCFGifa1LLU/KLyEWpOjJRhvRdNNfiuPilDCHsyDP//rOHP5qV5JSB5DofzZee9 xeRqhvd0eteBpx5qttUIEWEl1Bddf3BFKytup0DZHLWc01vtXk10RP1IkFwOuTpB4Uj5 +1mA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=nU0QXzcYjxUXyNhlJEPsHs1vQHfjG7/yfEack7+6TUs=; b=kXp2+RKtfF5+P/BvH775ebg6bhj18dZBrOmYIm7JzUit0dAclRsLmmLOfkcm94sB8v auAZx2s9UWZl87CMmwHrh9/q1IoOw9T1eB2tU/aF52SyDPRkHhpf2K6cAttYCe6QBo9y Z2gjW2qyUM9OpHSE5CJmeL1Mh9nqBsb96CfI/LGi/yde5GxcbKwQldaOtg3N07afBnSH Fv3Eu1oHvqm1jLur4vY8M+Hvja0PonBrp1rp+FfZyr6B4pNaf3dXMn8LcYxkaK3x269u C25WI4euHwfaDkZfRBJXxOssYNDA3zKgk4VodHNxOU+cuJc/e04g5uhjGOKvgzsiAshU CqSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=GCZAMn6W; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dp2si14084611ejc.700.2021.01.04.03.04.29; Mon, 04 Jan 2021 03:04:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=GCZAMn6W; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726661AbhADLCR (ORCPT + 99 others); Mon, 4 Jan 2021 06:02:17 -0500 Received: from fllv0016.ext.ti.com ([198.47.19.142]:37542 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725830AbhADLCQ (ORCPT ); Mon, 4 Jan 2021 06:02:16 -0500 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 104B0lxi067821; Mon, 4 Jan 2021 05:00:47 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1609758047; bh=nU0QXzcYjxUXyNhlJEPsHs1vQHfjG7/yfEack7+6TUs=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=GCZAMn6W6E9WSGxwUMj4InLxgkUAcf1wlFml6z59Ixk4e2MLou/UKaWdIZaIEJzob 8fUgL3JErRFNRl2ktPldoIbSwxAdPGYUtf0jrrTCKIQOmtf9scpNGE6wlKti9DyM0q Qt51T27/JQJwvd4O8CwvhcWQKbri2vfsC6cMocYk= Received: from DFLE115.ent.ti.com (dfle115.ent.ti.com [10.64.6.36]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 104B0lfo081309 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 4 Jan 2021 05:00:47 -0600 Received: from DFLE110.ent.ti.com (10.64.6.31) by DFLE115.ent.ti.com (10.64.6.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Mon, 4 Jan 2021 05:00:47 -0600 Received: from lelv0327.itg.ti.com (10.180.67.183) by DFLE110.ent.ti.com (10.64.6.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3 via Frontend Transport; Mon, 4 Jan 2021 05:00:47 -0600 Received: from [10.250.235.36] (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 104B0hxi030137; Mon, 4 Jan 2021 05:00:44 -0600 Subject: Re: [PATCH 4/4] PCI: j721e: Add support to provide refclk to PCIe connector To: Bjorn Helgaas , Rob Herring , Tom Joseph , Lorenzo Pieralisi CC: , , , , References: <20201224115658.2795-1-kishon@ti.com> <20201224115658.2795-5-kishon@ti.com> From: Kishon Vijay Abraham I Message-ID: Date: Mon, 4 Jan 2021 16:30:42 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20201224115658.2795-5-kishon@ti.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 24/12/20 5:26 pm, Kishon Vijay Abraham I wrote: > Add support to provide refclk to PCIe connector. > > Signed-off-by: Kishon Vijay Abraham I > --- > drivers/pci/controller/cadence/pci-j721e.c | 17 +++++++++++++++++ > 1 file changed, 17 insertions(+) > > diff --git a/drivers/pci/controller/cadence/pci-j721e.c b/drivers/pci/controller/cadence/pci-j721e.c > index dac1ac8a7615..8ec6d9c3e164 100644 > --- a/drivers/pci/controller/cadence/pci-j721e.c > +++ b/drivers/pci/controller/cadence/pci-j721e.c > @@ -6,6 +6,7 @@ > * Author: Kishon Vijay Abraham I > */ > > +#include > #include > #include > #include > @@ -50,6 +51,7 @@ enum link_status { > > struct j721e_pcie { > struct device *dev; > + struct clk *refclk; > u32 mode; > u32 num_lanes; > struct cdns_pcie *cdns_pcie; > @@ -310,6 +312,7 @@ static int j721e_pcie_probe(struct platform_device *pdev) > struct cdns_pcie_ep *ep; > struct gpio_desc *gpiod; > void __iomem *base; > + struct clk *clk; > u32 num_lanes; > u32 mode; > int ret; > @@ -408,6 +411,19 @@ static int j721e_pcie_probe(struct platform_device *pdev) > goto err_get_sync; > } > > + clk = devm_clk_get_optional(dev, "pcie_refclk"); > + if (IS_ERR(clk)) { > + dev_err(dev, "failed to get pcie_refclk\n"); missed initializing "ret" here. Will fix this and re-send new version. Thanks Kishon