From patchwork Mon May 17 15:41:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Ceresoli X-Patchwork-Id: 12262303 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4D594C43460 for ; Mon, 17 May 2021 15:44:17 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 18CC661057 for ; Mon, 17 May 2021 15:44:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 18CC661057 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lucaceresoli.net Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=+DdpNhionRLoaS3hn14WPdR4xk96ve5aiEAznPxEQxA=; b=gyJ7gOk9/1b+5R8+Btcw16axp xSq7LiJREr5HeAExO+7qwQzpy2IenVURVVS/GXp7+qWYnXoXKsUoy6OAjmNgk8nXfnYFBmGYUD08B bplh4zpLK3T8cGU5m1r9eoDvuVgUlGNFymrC4nqmylCsDCIrdYsgDhK3RHtBgy7lOm12Eq96BrA4T sEUqForL+UIB1DQfWS/5eDhhAuphvfVrVDPfABmTWxc1JTbRWxVyt8VJdPISUw+hXdH8IrouSX3QN Qc2yYrE/XBfdWftmSPsxjsypZtDhu6Ud+KTiLgIBimY/udxbXjVEVb1qEUn3yuVshI6Yy28XN+52e /zCRqvpJg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lifNf-00FRao-NK; Mon, 17 May 2021 15:42:08 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lifNG-00FRXw-N8 for linux-arm-kernel@desiato.infradead.org; Mon, 17 May 2021 15:41:42 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=EBcmIPgqdG7QUamwYKlH9r+m5/DsMzTsdDS7Rr0GO+g=; b=ikW5IsHib23wE2FBQqvFUHaMJ2 DLcyduc5wAuOQkion8ugdrVDmcwUEhTMyqPsnF/WxuayscG+p9n7xkerpLRQtZXfwP63iye0Ue+nk +L0Iolbvl222T5UpsVjKp9Uar6dQgJzr4KwxV6X33frQeTUXMsQsj/k3shlsLQPAS8zo6Q1133hm/ s1pdPAZeGfAKXjDm1OSaty5s4Xkn5bzxR5Ggye78qWuxQYpjAyWbzKEEsyI4lZgTrAidtjBXdjDqw vxybTwS4O2rQl/D8nlAoFQ3WBTHjq77Xhf1/B7d1jIqgea00F+QzSwPaTBylMCIQKqxD0i6cEg69N ILA78+7A==; Received: from hostingweb31-40.netsons.net ([89.40.174.40]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lifNC-00Dw5w-S5 for linux-arm-kernel@lists.infradead.org; Mon, 17 May 2021 15:41:41 +0000 Received: from [77.244.183.192] (port=64722 helo=melee.fritz.box) by hostingweb31.netsons.net with esmtpa (Exim 4.94.2) (envelope-from ) id 1lifNA-000Exi-RL; Mon, 17 May 2021 17:41:36 +0200 From: Luca Ceresoli To: linux-pci@vger.kernel.org Cc: Luca Ceresoli , linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Kishon Vijay Abraham I , Lorenzo Pieralisi , Rob Herring , Bjorn Helgaas , Jingoo Han , Gustavo Pimentel Subject: [PATCH 1/5] PCI: dwc: export more symbols to allow modular drivers Date: Mon, 17 May 2021 17:41:18 +0200 Message-Id: <20210517154122.430544-2-luca@lucaceresoli.net> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210517154122.430544-1-luca@lucaceresoli.net> References: <20210517154122.430544-1-luca@lucaceresoli.net> MIME-Version: 1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - hostingweb31.netsons.net X-AntiAbuse: Original Domain - lists.infradead.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lucaceresoli.net X-Get-Message-Sender-Via: hostingweb31.netsons.net: authenticated_id: luca+lucaceresoli.net/only user confirmed/virtual account not confirmed X-Authenticated-Sender: hostingweb31.netsons.net: luca@lucaceresoli.net X-Source: X-Source-Args: X-Source-Dir: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210517_084139_105160_1DC2D2E9 X-CRM114-Status: UNSURE ( 4.98 ) X-CRM114-Notice: Please train this message. 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org These symbols are used by the pci-dra7xx driver. Export them to allow building pci-dra7xx as a module. Signed-off-by: Luca Ceresoli --- drivers/pci/controller/dwc/pcie-designware-ep.c | 1 + drivers/pci/controller/dwc/pcie-designware.c | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/pci/controller/dwc/pcie-designware-ep.c b/drivers/pci/controller/dwc/pcie-designware-ep.c index 8d028a88b375..f2692a138216 100644 --- a/drivers/pci/controller/dwc/pcie-designware-ep.c +++ b/drivers/pci/controller/dwc/pcie-designware-ep.c @@ -83,6 +83,7 @@ void dw_pcie_ep_reset_bar(struct dw_pcie *pci, enum pci_barno bar) for (func_no = 0; func_no < funcs; func_no++) __dw_pcie_ep_reset_bar(pci, func_no, bar, 0); } +EXPORT_SYMBOL_GPL(dw_pcie_ep_reset_bar); static u8 __dw_pcie_ep_find_next_cap(struct dw_pcie_ep *ep, u8 func_no, u8 cap_ptr, u8 cap) diff --git a/drivers/pci/controller/dwc/pcie-designware.c b/drivers/pci/controller/dwc/pcie-designware.c index a945f0c0e73d..850b4533f4ef 100644 --- a/drivers/pci/controller/dwc/pcie-designware.c +++ b/drivers/pci/controller/dwc/pcie-designware.c @@ -538,6 +538,7 @@ int dw_pcie_link_up(struct dw_pcie *pci) return ((val & PCIE_PORT_DEBUG1_LINK_UP) && (!(val & PCIE_PORT_DEBUG1_LINK_IN_TRAINING))); } +EXPORT_SYMBOL_GPL(dw_pcie_link_up); void dw_pcie_upconfig_setup(struct dw_pcie *pci) { From patchwork Mon May 17 15:41:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Ceresoli X-Patchwork-Id: 12262299 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 39CA4C433B4 for ; Mon, 17 May 2021 15:44:08 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 00CC061057 for ; Mon, 17 May 2021 15:44:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 00CC061057 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lucaceresoli.net Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=8Qli8MCnTVzHcFY8g5FVLwRG7jeXPMadCt/Ed1Y/kCo=; b=fTy7TEjrWredT7IrG5rzGViwY m6HA2YGVtVevX/2juVDZPnIrnGpmcYRucbsvrbi+6c9Ea/AX0m8fM5FzhcocQ1aQh0o5pyV3TJKEf U6EVjjTe6GN9MNTbuLrR799J1WxKirj9vCeQl4ZkE9+FLLTJQxdA+X9Gv1imKjGMxsK0/gLrScqYp xOg/gtl1IFMf8jV/agDJhn0s605689qjfXjgyHvHOf3Riz72614d+eHm7RHkorNL9C5RNcP4f9Hxu aWnmfeOOfs6Xg8MGlQ6uj1wHcnWVwUpKPrIxd1VwB7FXpVcDHJa7JukVD1QE9K+jQw0u7A7Rtvtbc 2AFnCUMjQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lifNU-00FRZO-Kn; Mon, 17 May 2021 15:41:57 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lifNF-00FRXl-IL for linux-arm-kernel@desiato.infradead.org; Mon, 17 May 2021 15:41:41 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=xP/eK4TPxBaRYWW8vv5lBnFgkbB3Bajjl7CkDPvTl4k=; b=J4WnIxBIEdPZh0at2PPoJd0yd3 1kFZmUuky9AkfUmHOINUavRE42Oo+dM49Ui87FGQMUFUF+CZo/dIUQEp0/glQ0gWMDKyih8Y+3wU6 EQJRTBMiiVlJm3sT2MsEpiHWmjhyM/dkt/PjfF+HGGRghfmhaVCN422P0HHvrUgWYh6D7IdImSVlh GaiK1duwOhHRFZZQ6FEpI+mz6yFiyO9Pf3ZfoQaeaO7Fcx/E4QS3uwbHInZwSp4u3naMvHQz3ALC4 QVVodWMw44pOcIFsi2R3vvElW4IUmPKoAVTvfaYKvgn9GjQ2W13a2Vcnsi6JDEkb2odHawFE6vYCV Whkmau/w==; Received: from hostingweb31-40.netsons.net ([89.40.174.40]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lifNC-00Dw5x-S4 for linux-arm-kernel@lists.infradead.org; Mon, 17 May 2021 15:41:40 +0000 Received: from [77.244.183.192] (port=64722 helo=melee.fritz.box) by hostingweb31.netsons.net with esmtpa (Exim 4.94.2) (envelope-from ) id 1lifNB-000Exi-8s; Mon, 17 May 2021 17:41:37 +0200 From: Luca Ceresoli To: linux-pci@vger.kernel.org Cc: Luca Ceresoli , linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Kishon Vijay Abraham I , Lorenzo Pieralisi , Rob Herring , Bjorn Helgaas , Jingoo Han , Gustavo Pimentel Subject: [PATCH 2/5] PCI: dwc: pci-dra7xx: make it a kernel module Date: Mon, 17 May 2021 17:41:19 +0200 Message-Id: <20210517154122.430544-3-luca@lucaceresoli.net> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210517154122.430544-1-luca@lucaceresoli.net> References: <20210517154122.430544-1-luca@lucaceresoli.net> MIME-Version: 1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - hostingweb31.netsons.net X-AntiAbuse: Original Domain - lists.infradead.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lucaceresoli.net X-Get-Message-Sender-Via: hostingweb31.netsons.net: authenticated_id: luca+lucaceresoli.net/only user confirmed/virtual account not confirmed X-Authenticated-Sender: hostingweb31.netsons.net: luca@lucaceresoli.net X-Source: X-Source-Args: X-Source-Dir: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210517_084139_088421_88F33984 X-CRM114-Status: UNSURE ( 7.39 ) X-CRM114-Notice: Please train this message. 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This allows to build the driver as a loadable kernel module. Signed-off-by: Luca Ceresoli --- drivers/pci/controller/dwc/pci-dra7xx.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/pci/controller/dwc/pci-dra7xx.c b/drivers/pci/controller/dwc/pci-dra7xx.c index 6457695df00c..fe11b96fe9a5 100644 --- a/drivers/pci/controller/dwc/pci-dra7xx.c +++ b/drivers/pci/controller/dwc/pci-dra7xx.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -949,4 +950,8 @@ static struct platform_driver dra7xx_pcie_driver = { }, .shutdown = dra7xx_pcie_shutdown, }; -builtin_platform_driver(dra7xx_pcie_driver); +module_platform_driver(dra7xx_pcie_driver); + +MODULE_AUTHOR("Kishon Vijay Abraham I "); +MODULE_DESCRIPTION("PCIe controller driver for TI DRA7xx SoCs"); +MODULE_LICENSE("GPL v2"); From patchwork Mon May 17 15:41:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Ceresoli X-Patchwork-Id: 12262301 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 90FD9C433B4 for ; Mon, 17 May 2021 15:44:15 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4D98B61057 for ; Mon, 17 May 2021 15:44:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4D98B61057 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lucaceresoli.net Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=XaDt97MXYPmWouPHqwWWtcpXjl6RyxxQPsK4ENH2FTE=; b=dpew+n74PGGmmO1eNKF0WyAd7 w6JLlp9hnSvxkGHaPp5bpkXe6wfuQVZxKsA0mweDfu8agA9triQI3N2OOHFTN9IxN/0HO3GgC7263 GOOyp5c7RLc7On9BIcU2YoqML+nDhxKYqBg5NMu0s7ehY0NaFpCWGlTJlqg/ps9q1n5od8mDgGBes Votw3ljc9avyolZbscNnspQ5llXSvcjgdxaui6uDrFB29GB31AoUnbwQkLJA5jx68UK7UaPM6R5iv 6MSZeJ62d5Sd4SvAHd+qmxmEr8BnTnQ6PD2IsLBjV1wuI2QjcqtD2Bn5K4Ogy+ZV0ElNZwjbVGSd0 D+lw9mf/g==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lifNq-00FRd6-Uc; Mon, 17 May 2021 15:42:19 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lifNG-00FRXy-P8 for linux-arm-kernel@desiato.infradead.org; Mon, 17 May 2021 15:41:42 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=j1zT4BDePj99UMfDS0osbywzXPpW3n9RuCrTcCxgXgA=; b=bHXaR/pa8yhAPSyjbvy0rslJhn FwFPtjLIzH5xYXKVdKAYyOE7WSlM6Mb9wkQvgj87T87RpCGC/HNwz0FjVGTXPCy66NLoaYesLIfpF 3+CI38NaM7a/7va9GWeK3ATWOhNAwNbOS2EqM7RBy5VPCsMswMvntpZ2BqaXyDUvYYHXx8eLJbyYs J0jm1nwYejz/YqK7NmdTVxWlDP0/xRD54coyUX4FBjFuuZfOjuJW7YxY+snW0qiifDKQgQZg4MT8b ziqXeK/EYPcNVc5Av1cJyqiWg/qMjhRRqGQKUgt2qZGgYw9Hil66uXWlP2+zQRs9Y4KooykFVIBov CbiqGoZA==; Received: from hostingweb31-40.netsons.net ([89.40.174.40]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lifND-00Dw5y-As for linux-arm-kernel@lists.infradead.org; Mon, 17 May 2021 15:41:41 +0000 Received: from [77.244.183.192] (port=64722 helo=melee.fritz.box) by hostingweb31.netsons.net with esmtpa (Exim 4.94.2) (envelope-from ) id 1lifNB-000Exi-NQ; Mon, 17 May 2021 17:41:37 +0200 From: Luca Ceresoli To: linux-pci@vger.kernel.org Cc: Luca Ceresoli , linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Kishon Vijay Abraham I , Lorenzo Pieralisi , Rob Herring , Bjorn Helgaas , Jingoo Han , Gustavo Pimentel Subject: [PATCH 3/5] PCI: dwc: pci-dra7xx: allow to build as a loadable module Date: Mon, 17 May 2021 17:41:20 +0200 Message-Id: <20210517154122.430544-4-luca@lucaceresoli.net> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210517154122.430544-1-luca@lucaceresoli.net> References: <20210517154122.430544-1-luca@lucaceresoli.net> MIME-Version: 1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - hostingweb31.netsons.net X-AntiAbuse: Original Domain - lists.infradead.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lucaceresoli.net X-Get-Message-Sender-Via: hostingweb31.netsons.net: authenticated_id: luca+lucaceresoli.net/only user confirmed/virtual account not confirmed X-Authenticated-Sender: hostingweb31.netsons.net: luca@lucaceresoli.net X-Source: X-Source-Args: X-Source-Dir: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210517_084139_546071_E390C12C X-CRM114-Status: UNSURE ( 5.08 ) X-CRM114-Notice: Please train this message. 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Allow the pci-dra7xx PCIe controller to be build as a loadable module. Signed-off-by: Luca Ceresoli --- drivers/pci/controller/dwc/Kconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/pci/controller/dwc/Kconfig b/drivers/pci/controller/dwc/Kconfig index 423d35872ce4..775ad590966e 100644 --- a/drivers/pci/controller/dwc/Kconfig +++ b/drivers/pci/controller/dwc/Kconfig @@ -17,10 +17,10 @@ config PCIE_DW_EP select PCIE_DW config PCI_DRA7XX - bool + tristate config PCI_DRA7XX_HOST - bool "TI DRA7xx PCIe controller Host Mode" + tristate "TI DRA7xx PCIe controller Host Mode" depends on SOC_DRA7XX || COMPILE_TEST depends on PCI_MSI_IRQ_DOMAIN depends on OF && HAS_IOMEM && TI_PIPE3 @@ -36,7 +36,7 @@ config PCI_DRA7XX_HOST This uses the DesignWare core. config PCI_DRA7XX_EP - bool "TI DRA7xx PCIe controller Endpoint Mode" + tristate "TI DRA7xx PCIe controller Endpoint Mode" depends on SOC_DRA7XX || COMPILE_TEST depends on PCI_ENDPOINT depends on OF && HAS_IOMEM && TI_PIPE3 From patchwork Mon May 17 15:41:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Ceresoli X-Patchwork-Id: 12262305 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BA879C433B4 for ; Mon, 17 May 2021 15:44:31 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7FC5661057 for ; Mon, 17 May 2021 15:44:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7FC5661057 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lucaceresoli.net Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ws7RAX8+TVglM9NlHzRbTR/6/WVWo95AFMs1jluEty8=; b=M78SZ8MoBSqhiSnQQlKnr14XZ MRqOAti8h3d6NWZ5oBN2xuydZzPJ2m6XBbOFZcJvGRHhShskkPw5+OrRLfxpfkcYDaVieRzQbW3n+ TTJbrOC5h9bT7prrdwjkpq0TupBOUXdgcA6LC5fa52MZbh76IYZlUcTp6kpUDNizk7zbGtfniOIWQ yizbtjrCnijtz4Dxr+4XiH38AGVD2/IuVQZk9XFdbShY2d0Etz6eTuwcjhGn/RlsFFn2kAmLhjvi9 WLu4lEIHX/9RI7bjb7me/fqj75GJacIFHlNkyRF4izULmV0SGSKN/htQlqFBzUmnPaTUQfIcYCd56 Xuui7Vitg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lifO4-00FRfl-Ah; Mon, 17 May 2021 15:42:32 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lifNG-00FRXx-Nz for linux-arm-kernel@desiato.infradead.org; Mon, 17 May 2021 15:41:42 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=3bDDPHy34ZFqeBjDukgM4kVrxAomi3drk2sXQxni0pA=; b=L6oJ6qQ7bmO3QQMobIl6sEhvFV I7mzObA2KP7FewB7PJvyQjGtmFMbD/mHsHOXzk8iqXInPjzVV0Ogya160AyTW72J9MxB667PCYHyq R96qqJLXu8FO3eNIwYTS86I99X4l/HBMJwrvJmW/N6I+2kQCER9sCWnteRDimutNXAkoZmxPeCjbc WIfeOn8zwd/SyIJKNiIhGn9jpaQ768Ves5Fdpe31Xh5CY1CKlCyqCWL8wqTFCPcnNYCEFqk5I2jr7 MeB44M6Xr5/BZjEOXv2JMf+rEveR6b37ydTuaBXDu4PKM9Zetr8ahHMdJpYkts0oycu4DEh7Z44cI Ubqxp9Ig==; Received: from hostingweb31-40.netsons.net ([89.40.174.40]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lifND-00Dw60-OL for linux-arm-kernel@lists.infradead.org; Mon, 17 May 2021 15:41:41 +0000 Received: from [77.244.183.192] (port=64722 helo=melee.fritz.box) by hostingweb31.netsons.net with esmtpa (Exim 4.94.2) (envelope-from ) id 1lifNC-000Exi-70; Mon, 17 May 2021 17:41:38 +0200 From: Luca Ceresoli To: linux-pci@vger.kernel.org Cc: Luca Ceresoli , linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Kishon Vijay Abraham I , Lorenzo Pieralisi , Rob Herring , Bjorn Helgaas , Jingoo Han , Gustavo Pimentel Subject: [PATCH 4/5] PCI: dwc: pci-dra7xx: remove unused include Date: Mon, 17 May 2021 17:41:21 +0200 Message-Id: <20210517154122.430544-5-luca@lucaceresoli.net> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210517154122.430544-1-luca@lucaceresoli.net> References: <20210517154122.430544-1-luca@lucaceresoli.net> MIME-Version: 1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - hostingweb31.netsons.net X-AntiAbuse: Original Domain - lists.infradead.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lucaceresoli.net X-Get-Message-Sender-Via: hostingweb31.netsons.net: authenticated_id: luca+lucaceresoli.net/only user confirmed/virtual account not confirmed X-Authenticated-Sender: hostingweb31.netsons.net: luca@lucaceresoli.net X-Source: X-Source-Args: X-Source-Dir: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210517_084139_963038_611FE1CA X-CRM114-Status: UNSURE ( 4.75 ) X-CRM114-Notice: Please train this message. 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Unused since commit e259c2926c01 ("PCI: pci-dra7xx: Prepare for deferred probe with module_platform_driver"). Signed-off-by: Luca Ceresoli --- drivers/pci/controller/dwc/pci-dra7xx.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/pci/controller/dwc/pci-dra7xx.c b/drivers/pci/controller/dwc/pci-dra7xx.c index fe11b96fe9a5..05d06806c300 100644 --- a/drivers/pci/controller/dwc/pci-dra7xx.c +++ b/drivers/pci/controller/dwc/pci-dra7xx.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #include From patchwork Mon May 17 15:41:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Ceresoli X-Patchwork-Id: 12262307 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ABD96C433ED for ; Mon, 17 May 2021 15:44:59 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 752FE61108 for ; Mon, 17 May 2021 15:44:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 752FE61108 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lucaceresoli.net Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Y6t003bENHwj3YO+0CLdPkMMdqG9ttFNNYnZKPDqo5s=; b=FAwamEY6v6e52wJE61Q4wkQzT B2ngDUCMG3ZPv9z4g1aLe94OOdchCfQlnh+rAQPQWPnvul256ED/ljruC4sks9YV3NhhmNCzGXmyL vlfQCZs/vNsP89UJLKBAQevdvKUMlXKmIKfArdU3JgZQqsos6zRRY4oZJU++TwutZZ11EbyXAeXZ+ kCh6pRwC6ATMB3KB1NcnCqCjk4cGWjtHO7RXXOldlkt2fpMZorAZuptrBYFeGzvFafWlYT5w7C8H0 HBNaUMXuNjvD9Bu8OJP0Bo6cjYwkOjrv9uVbRP77W/0jxEU/c3Cmo5H0GEx+lqtHFaZyZIpqap6DG BTB7tF/UA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lifOH-00FRju-LI; Mon, 17 May 2021 15:42:45 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lifNG-00FRY3-Qu for linux-arm-kernel@desiato.infradead.org; Mon, 17 May 2021 15:41:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=V2PPFuDXlh1HcRbxi2nRy0crdhXcgBq5FUOwt1UJAqU=; b=BNo+QUp2RhoHeFqGGvlo/nVIb+ 78meSMjALcDwtUgU4hjazgsyRNpSWr/Vi28NPwCtNZYGwXnDl/Fwp+SYX/K1fYf3Ti6GoAxuq/jWx tK9/jOeAvWhxvLNLwYEJP/6M4jVXiSaAbGvrYf6u085r34hJnqI1ht1Slm0IcWYhcUluFh4rF2l5x DAiSfIsA0o0KLzNfhExOWQbIRSt8uDwrD0gy7vsmRTT478EH3DQlAsar1/vRsICcAaUzpJYEsRt5f 3vn7OF7KGuCF5BYWjYm3TiLwoCAFw1CwkvdoR9tgDj+Qa5Y9R6ZjJJThWxiziNotwyfFRg6mUxkHn 9PtdIOrQ==; Received: from hostingweb31-40.netsons.net ([89.40.174.40]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lifNE-00Dw6Z-6U for linux-arm-kernel@lists.infradead.org; Mon, 17 May 2021 15:41:41 +0000 Received: from [77.244.183.192] (port=64722 helo=melee.fritz.box) by hostingweb31.netsons.net with esmtpa (Exim 4.94.2) (envelope-from ) id 1lifNC-000Exi-Ly; Mon, 17 May 2021 17:41:38 +0200 From: Luca Ceresoli To: linux-pci@vger.kernel.org Cc: Luca Ceresoli , linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Kishon Vijay Abraham I , Lorenzo Pieralisi , Rob Herring , Bjorn Helgaas , Jingoo Han , Gustavo Pimentel Subject: [PATCH 5/5] PCI: dwc: pci-dra7xx: get an optional clock Date: Mon, 17 May 2021 17:41:22 +0200 Message-Id: <20210517154122.430544-6-luca@lucaceresoli.net> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210517154122.430544-1-luca@lucaceresoli.net> References: <20210517154122.430544-1-luca@lucaceresoli.net> MIME-Version: 1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - hostingweb31.netsons.net X-AntiAbuse: Original Domain - lists.infradead.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lucaceresoli.net X-Get-Message-Sender-Via: hostingweb31.netsons.net: authenticated_id: luca+lucaceresoli.net/only user confirmed/virtual account not confirmed X-Authenticated-Sender: hostingweb31.netsons.net: luca@lucaceresoli.net X-Source: X-Source-Args: X-Source-Dir: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210517_084140_433538_8805DB08 X-CRM114-Status: GOOD ( 10.15 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org If the clock is provided externally we need to make sure it is enabled before starting PCI scan. Signed-off-by: Luca Ceresoli --- drivers/pci/controller/dwc/pci-dra7xx.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/pci/controller/dwc/pci-dra7xx.c b/drivers/pci/controller/dwc/pci-dra7xx.c index 05d06806c300..8dd20b394d0c 100644 --- a/drivers/pci/controller/dwc/pci-dra7xx.c +++ b/drivers/pci/controller/dwc/pci-dra7xx.c @@ -7,6 +7,7 @@ * Authors: Kishon Vijay Abraham I */ +#include #include #include #include @@ -90,6 +91,7 @@ struct dra7xx_pcie { int phy_count; /* DT phy-names count */ struct phy **phy; struct irq_domain *irq_domain; + struct clk *clk; enum dw_pcie_device_mode mode; }; @@ -744,6 +746,15 @@ static int dra7xx_pcie_probe(struct platform_device *pdev) if (!link) return -ENOMEM; + dra7xx->clk = devm_clk_get_optional(dev, NULL); + if (IS_ERR(dra7xx->clk)) + return dev_err_probe(dev, PTR_ERR(dra7xx->clk), + "clock request failed"); + + ret = clk_prepare_enable(dra7xx->clk); + if (ret) + return ret; + for (i = 0; i < phy_count; i++) { snprintf(name, sizeof(name), "pcie-phy%d", i); phy[i] = devm_phy_get(dev, name); @@ -931,6 +942,8 @@ static void dra7xx_pcie_shutdown(struct platform_device *pdev) pm_runtime_disable(dev); dra7xx_pcie_disable_phy(dra7xx); + + clk_disable_unprepare(dra7xx->clk); } static const struct dev_pm_ops dra7xx_pcie_pm_ops = {