From patchwork Sun Jan 8 15:57:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Achal Verma X-Patchwork-Id: 40519 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1758815wrt; Sun, 8 Jan 2023 08:03:00 -0800 (PST) X-Google-Smtp-Source: AMrXdXuhKOynlkY6ipgM2CkLGQkeFWvKMlLL5lhEvZwuMv2w5sc8qTwqxZhIsu0lL4aHcDj09mfA X-Received: by 2002:a05:6402:3887:b0:496:4d2f:1b4b with SMTP id fd7-20020a056402388700b004964d2f1b4bmr8295219edb.7.1673193780491; Sun, 08 Jan 2023 08:03:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673193780; cv=none; d=google.com; s=arc-20160816; b=GFCPJ8fa+kbn2MN4bSg5RMALlrXUS4l0KMarDWKHPFNgX1vHXJTqKQ6QnE/4y+FPJI WbZ1TpbCmejHiVtV8MrN8VV1PUgJvZbr/904UNyWTre9TrIcmSKTwchqUHMTXGM5glLx aUVBsui4wjlig5QwB1sJIdAODF5SQ1oKKl5UUMUSLfETQ66PgHP+HS+QEZ5+SBKT9vUT sWhvaai08/u6lW8vjvbrCjhrceUFqNN65gi0ugYUFRdqlWUXg3EyYgtzNRBpVB0R8TDF dFuU9bC2o6RetsTOb/sfe1d+MH7vIXpPB+xHKv6VmM9vGH0NzcTjWOgQbzMiRLrG7itR XRfw== 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 :dkim-signature; bh=xAnPPGpVZlwRxy0iSh6xiiIJfjz/4/RR/G6X8Sfotdc=; b=tjkWFnD1Q2wN8xG2xd2MrNuIHBKj+YcrPvtUygBGys1IIW9S9blDVneU7a3Z96Ynv6 IzAh/YQOGEp3pUd8eyR7/5spfxDh7ahiXkEGOi7sUVIIdqTwjJ2shGVagvDZ64eMECnR BbaG+7OWwq8VD66ziTFFP5t+z35ppST8fe08B4XodWNOLHuSxLIBPZs2/6urJ4kXnHEJ t8+EHD6nVjxDPxbpaZEUFAxFBvlOtLcikPc6TXyYm90pEV0B4no6crROek8+9Mq0m2Os EYG/lu+xndujypjeGYtmgiPqA+n7rM3RRqKrn6UD5DOHfQMQPbCySVAAQx+6ehq6ygBo QCQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=fECJ2QG4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t12-20020a056402524c00b00487d1731603si8654486edd.230.2023.01.08.08.02.36; Sun, 08 Jan 2023 08:03:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=fECJ2QG4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S233375AbjAHP6e (ORCPT + 99 others); Sun, 8 Jan 2023 10:58:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231269AbjAHP6X (ORCPT ); Sun, 8 Jan 2023 10:58:23 -0500 Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D443ABCBA; Sun, 8 Jan 2023 07:58:21 -0800 (PST) Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 308FvwuT077262; Sun, 8 Jan 2023 09:57:58 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1673193478; bh=xAnPPGpVZlwRxy0iSh6xiiIJfjz/4/RR/G6X8Sfotdc=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=fECJ2QG4F96/TMqs+FQNV3XFwuOQOZYYtXLiXeexp27p8yWUPdMVPxz8k41qubgzn 0iAj5Za31tI+yhtB/Zn9XaguSqPe55BSe+C43N92I+7iHDNg+uqBAFShXtbZ7pReMP b8aC/u+R26VogaFP5DBInfSLf78OrGsE/tVSaGc0= Received: from DLEE114.ent.ti.com (dlee114.ent.ti.com [157.170.170.25]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 308FvwBI002555 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Sun, 8 Jan 2023 09:57:58 -0600 Received: from DLEE115.ent.ti.com (157.170.170.26) by DLEE114.ent.ti.com (157.170.170.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Sun, 8 Jan 2023 09:57:57 -0600 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE115.ent.ti.com (157.170.170.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Sun, 8 Jan 2023 09:57:57 -0600 Received: from localhost (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 308FvuSJ027400; Sun, 8 Jan 2023 09:57:57 -0600 From: Achal Verma To: Tom Joseph , Lorenzo Pieralisi , Rob Herring , Krzysztof Wilczy_ski , Bjorn Helgaas , Vignesh Raghavendra CC: , , , , Achal Verma , Milind Parab Subject: [PATCH v2 1/2] PCI: cadence: Add support to build pcie-cadence library as module. Date: Sun, 8 Jan 2023 21:27:54 +0530 Message-ID: <20230108155755.2614147-2-a-verma1@ti.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230108155755.2614147-1-a-verma1@ti.com> References: <20230108155755.2614147-1-a-verma1@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754470841642813241?= X-GMAIL-MSGID: =?utf-8?q?1754470841642813241?= Add support to build pcie-cadence library as module. Signed-off-by: Achal Verma --- drivers/pci/controller/cadence/Kconfig | 6 +++--- drivers/pci/controller/cadence/pcie-cadence-ep.c | 4 ++++ drivers/pci/controller/cadence/pcie-cadence-host.c | 5 +++++ drivers/pci/controller/cadence/pcie-cadence.c | 9 +++++++++ drivers/pci/controller/cadence/pcie-cadence.h | 4 ++-- 5 files changed, 23 insertions(+), 5 deletions(-) diff --git a/drivers/pci/controller/cadence/Kconfig b/drivers/pci/controller/cadence/Kconfig index 5d30564190e1..693c41fe32ce 100644 --- a/drivers/pci/controller/cadence/Kconfig +++ b/drivers/pci/controller/cadence/Kconfig @@ -4,16 +4,16 @@ menu "Cadence PCIe controllers support" depends on PCI config PCIE_CADENCE - bool + tristate config PCIE_CADENCE_HOST - bool + tristate depends on OF select IRQ_DOMAIN select PCIE_CADENCE config PCIE_CADENCE_EP - bool + tristate depends on OF depends on PCI_ENDPOINT select PCIE_CADENCE diff --git a/drivers/pci/controller/cadence/pcie-cadence-ep.c b/drivers/pci/controller/cadence/pcie-cadence-ep.c index b8b655d4047e..598b2b9c5969 100644 --- a/drivers/pci/controller/cadence/pcie-cadence-ep.c +++ b/drivers/pci/controller/cadence/pcie-cadence-ep.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include @@ -741,3 +742,6 @@ int cdns_pcie_ep_setup(struct cdns_pcie_ep *ep) return ret; } +EXPORT_SYMBOL_GPL(cdns_pcie_ep_setup); + +MODULE_LICENSE("GPL v2"); diff --git a/drivers/pci/controller/cadence/pcie-cadence-host.c b/drivers/pci/controller/cadence/pcie-cadence-host.c index 940c7dd701d6..84754c63df34 100644 --- a/drivers/pci/controller/cadence/pcie-cadence-host.c +++ b/drivers/pci/controller/cadence/pcie-cadence-host.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include @@ -70,6 +71,7 @@ void __iomem *cdns_pci_map_bus(struct pci_bus *bus, unsigned int devfn, return rc->cfg_base + (where & 0xfff); } +EXPORT_SYMBOL_GPL(cdns_pci_map_bus); static struct pci_ops cdns_pcie_host_ops = { .map_bus = cdns_pci_map_bus, @@ -542,3 +544,6 @@ int cdns_pcie_host_setup(struct cdns_pcie_rc *rc) return ret; } +EXPORT_SYMBOL_GPL(cdns_pcie_host_setup); + +MODULE_LICENSE("GPL v2"); diff --git a/drivers/pci/controller/cadence/pcie-cadence.c b/drivers/pci/controller/cadence/pcie-cadence.c index 13c4032ca379..8e3a86578284 100644 --- a/drivers/pci/controller/cadence/pcie-cadence.c +++ b/drivers/pci/controller/cadence/pcie-cadence.c @@ -4,6 +4,7 @@ // Author: Cyrille Pitchen #include +#include #include "pcie-cadence.h" @@ -22,6 +23,7 @@ void cdns_pcie_detect_quiet_min_delay_set(struct cdns_pcie *pcie) cdns_pcie_writel(pcie, CDNS_PCIE_LTSSM_CONTROL_CAP, ltssm_control_cap); } +EXPORT_SYMBOL_GPL(cdns_pcie_detect_quiet_min_delay_set); void cdns_pcie_set_outbound_region(struct cdns_pcie *pcie, u8 busnr, u8 fn, u32 r, bool is_io, @@ -99,6 +101,7 @@ void cdns_pcie_set_outbound_region(struct cdns_pcie *pcie, u8 busnr, u8 fn, cdns_pcie_writel(pcie, CDNS_PCIE_AT_OB_REGION_CPU_ADDR0(r), addr0); cdns_pcie_writel(pcie, CDNS_PCIE_AT_OB_REGION_CPU_ADDR1(r), addr1); } +EXPORT_SYMBOL_GPL(cdns_pcie_set_outbound_region); void cdns_pcie_set_outbound_region_for_normal_msg(struct cdns_pcie *pcie, u8 busnr, u8 fn, @@ -133,6 +136,7 @@ void cdns_pcie_set_outbound_region_for_normal_msg(struct cdns_pcie *pcie, cdns_pcie_writel(pcie, CDNS_PCIE_AT_OB_REGION_CPU_ADDR0(r), addr0); cdns_pcie_writel(pcie, CDNS_PCIE_AT_OB_REGION_CPU_ADDR1(r), addr1); } +EXPORT_SYMBOL_GPL(cdns_pcie_set_outbound_region_for_normal_msg); void cdns_pcie_reset_outbound_region(struct cdns_pcie *pcie, u32 r) { @@ -145,6 +149,7 @@ void cdns_pcie_reset_outbound_region(struct cdns_pcie *pcie, u32 r) cdns_pcie_writel(pcie, CDNS_PCIE_AT_OB_REGION_CPU_ADDR0(r), 0); cdns_pcie_writel(pcie, CDNS_PCIE_AT_OB_REGION_CPU_ADDR1(r), 0); } +EXPORT_SYMBOL_GPL(cdns_pcie_reset_outbound_region); void cdns_pcie_disable_phy(struct cdns_pcie *pcie) { @@ -155,6 +160,7 @@ void cdns_pcie_disable_phy(struct cdns_pcie *pcie) phy_exit(pcie->phy[i]); } } +EXPORT_SYMBOL_GPL(cdns_pcie_disable_phy); int cdns_pcie_enable_phy(struct cdns_pcie *pcie) { @@ -242,6 +248,7 @@ int cdns_pcie_init_phy(struct device *dev, struct cdns_pcie *pcie) return ret; } +EXPORT_SYMBOL_GPL(cdns_pcie_init_phy); static int cdns_pcie_suspend_noirq(struct device *dev) { @@ -270,3 +277,5 @@ const struct dev_pm_ops cdns_pcie_pm_ops = { NOIRQ_SYSTEM_SLEEP_PM_OPS(cdns_pcie_suspend_noirq, cdns_pcie_resume_noirq) }; + +MODULE_LICENSE("GPL v2"); diff --git a/drivers/pci/controller/cadence/pcie-cadence.h b/drivers/pci/controller/cadence/pcie-cadence.h index 190786e47df9..65b330c28299 100644 --- a/drivers/pci/controller/cadence/pcie-cadence.h +++ b/drivers/pci/controller/cadence/pcie-cadence.h @@ -514,7 +514,7 @@ static inline bool cdns_pcie_link_up(struct cdns_pcie *pcie) return true; } -#ifdef CONFIG_PCIE_CADENCE_HOST +#if IS_ENABLED(CONFIG_PCIE_CADENCE_HOST) int cdns_pcie_host_setup(struct cdns_pcie_rc *rc); void __iomem *cdns_pci_map_bus(struct pci_bus *bus, unsigned int devfn, int where); @@ -531,7 +531,7 @@ static inline void __iomem *cdns_pci_map_bus(struct pci_bus *bus, unsigned int d } #endif -#ifdef CONFIG_PCIE_CADENCE_EP +#if IS_ENABLED(CONFIG_PCIE_CADENCE_EP) int cdns_pcie_ep_setup(struct cdns_pcie_ep *ep); #else static inline int cdns_pcie_ep_setup(struct cdns_pcie_ep *ep) From patchwork Sun Jan 8 15:57:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Achal Verma X-Patchwork-Id: 40518 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1757919wrt; Sun, 8 Jan 2023 08:01:22 -0800 (PST) X-Google-Smtp-Source: AMrXdXueB3YTRQbdGS/+4m4URPctEm37haIgYGsx4FYIZzydwYsSasWs+dmGRgUZ85ePNRmBCh/o X-Received: by 2002:a17:906:39a:b0:7c1:1444:da41 with SMTP id b26-20020a170906039a00b007c11444da41mr56797454eja.40.1673193682014; Sun, 08 Jan 2023 08:01:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673193682; cv=none; d=google.com; s=arc-20160816; b=Z3PBGiuO509wDI1dyTnyCxSi31cIkUkCgJal8L6MwukT3I8adIlCFHO4wWcnUs5Ybv Ibdtk19/9YPmdssYXZpY1LXGyXHOC8If9yCEW+UuD+jkoY5FpGMyuO+0gwgCf/WD/HAR 6T151G/ZI0JFnHSpNNAGdunIMJfqAH3l1GjiNfeYJZogfUkPiZ6vaRMF9pZ9sTFtnsgI iCLYfdr5uEliwyMalQtuS8vdXRIdOUjzMYl7fWw45SR17JfKSPa2pyxxN6XaExus+VLk Bcc9f0d8dQMLQYzmeR6N4A2um9xw8nzncFTnrygDArcl9OK6VPWJIgfcIc8UcxDAEwp/ 7slg== 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 :dkim-signature; bh=RXQWbFwTRI1d7toE/Mabr2p1LXDd7wglaC5Brhy3z1g=; b=0I0YqhF8I8rfFoKs6fbir2LbVK8teIMqct1yZnQnUJW5FJWhQnDfl9Dw+pQukU/nzj vfL7ivY/M59V12+C8gC8xzHAbk95pL2ZPCRGcR9RRPEAUd/OJdsY9xsj9cPYS0ssTqaO JaZc5xZlzAwKr3xYPi3jKO9SeSFSIZ9AatnUUQi97Z7CTPFr4fl/2c/TlxKjEv8tWqBr Ba2kRAUjaUaqwLu61sXrxYl4H4lQeffGpvh5yBkkjZU/aZkCiyEU4rfqvcBiBxfwiA2o 02WW1v0hLODI37mM8cSxgMv8IrCo/hKd0iqcvd1masZjypbK/BRxrO6yfsshZMwqycpj lzbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="Bka8Ckn/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hp18-20020a1709073e1200b007b2a6aaff06si8111493ejc.50.2023.01.08.08.00.58; Sun, 08 Jan 2023 08:01:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="Bka8Ckn/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S233036AbjAHP63 (ORCPT + 99 others); Sun, 8 Jan 2023 10:58:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55712 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230052AbjAHP6V (ORCPT ); Sun, 8 Jan 2023 10:58:21 -0500 Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E6C67BCB8; Sun, 8 Jan 2023 07:58:20 -0800 (PST) Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 308Fvxd8086520; Sun, 8 Jan 2023 09:57:59 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1673193479; bh=RXQWbFwTRI1d7toE/Mabr2p1LXDd7wglaC5Brhy3z1g=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=Bka8Ckn/MgejWPxM9xHg/PUtPR4BzaCYpGB/wU/H8o9M9BtReaQ6KhE+jhIgABbZG 4arHu6xxkrFEiSGVvQvyRiGuegryfd4Cz0j3L0P/H+/VjEgJsMcSVeraYO8GAxVPJy 3hGrFYQZluWT1xguhCIbpgoXmOlXSW8vhiTotW0U= Received: from DLEE113.ent.ti.com (dlee113.ent.ti.com [157.170.170.24]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 308FvxEc072677 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Sun, 8 Jan 2023 09:57:59 -0600 Received: from DLEE103.ent.ti.com (157.170.170.33) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Sun, 8 Jan 2023 09:57:59 -0600 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE103.ent.ti.com (157.170.170.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Sun, 8 Jan 2023 09:57:59 -0600 Received: from localhost (ileaxei01-snat.itg.ti.com [10.180.69.5]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 308FvwCv097922; Sun, 8 Jan 2023 09:57:58 -0600 From: Achal Verma To: Tom Joseph , Lorenzo Pieralisi , Rob Herring , Krzysztof Wilczy_ski , Bjorn Helgaas , Vignesh Raghavendra CC: , , , , Achal Verma , Milind Parab Subject: [PATCH v2 2/2] PCI: j721e: Add support to build pci-j721e as module. Date: Sun, 8 Jan 2023 21:27:55 +0530 Message-ID: <20230108155755.2614147-3-a-verma1@ti.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230108155755.2614147-1-a-verma1@ti.com> References: <20230108155755.2614147-1-a-verma1@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754470738326637589?= X-GMAIL-MSGID: =?utf-8?q?1754470738326637589?= Add support to build pci-j721e as module. Signed-off-by: Achal Verma --- drivers/pci/controller/cadence/Kconfig | 10 +++++----- drivers/pci/controller/cadence/pci-j721e.c | 6 +++++- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/pci/controller/cadence/Kconfig b/drivers/pci/controller/cadence/Kconfig index 693c41fe32ce..51edf723586c 100644 --- a/drivers/pci/controller/cadence/Kconfig +++ b/drivers/pci/controller/cadence/Kconfig @@ -43,12 +43,13 @@ config PCIE_CADENCE_PLAT_EP different vendors SoCs. config PCI_J721E - bool + tristate + select PCIE_CADENCE_HOST + select PCIE_CADENCE_EP config PCI_J721E_HOST - bool "TI J721E PCIe platform host controller" + tristate "TI J721E PCIe platform host controller" depends on OF - select PCIE_CADENCE_HOST select PCI_J721E help Say Y here if you want to support the TI J721E PCIe platform @@ -56,10 +57,9 @@ config PCI_J721E_HOST core. config PCI_J721E_EP - bool "TI J721E PCIe platform endpoint controller" + tristate "TI J721E PCIe platform endpoint controller" depends on OF depends on PCI_ENDPOINT - select PCIE_CADENCE_EP select PCI_J721E help Say Y here if you want to support the TI J721E PCIe platform diff --git a/drivers/pci/controller/cadence/pci-j721e.c b/drivers/pci/controller/cadence/pci-j721e.c index cc83a8925ce0..c4017fa6ae61 100644 --- a/drivers/pci/controller/cadence/pci-j721e.c +++ b/drivers/pci/controller/cadence/pci-j721e.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -565,4 +566,7 @@ static struct platform_driver j721e_pcie_driver = { .suppress_bind_attrs = true, }, }; -builtin_platform_driver(j721e_pcie_driver); +module_platform_driver(j721e_pcie_driver); + +MODULE_AUTHOR("Kishon Vijay Abraham I "); +MODULE_LICENSE("GPL v2");