From patchwork Tue Dec 7 10:49:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergio Paracuellos X-Patchwork-Id: 12661571 X-Patchwork-Delegate: lorenzo.pieralisi@arm.com 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 66861C433EF for ; Tue, 7 Dec 2021 10:49:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235336AbhLGKxB (ORCPT ); Tue, 7 Dec 2021 05:53:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49476 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235334AbhLGKxA (ORCPT ); Tue, 7 Dec 2021 05:53:00 -0500 Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6024DC061746; Tue, 7 Dec 2021 02:49:30 -0800 (PST) Received: by mail-wr1-x431.google.com with SMTP id t9so28554077wrx.7; Tue, 07 Dec 2021 02:49:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=X+bN8SexTbCT5j9k/6OymCyhRoZPMwyN555jgSjh4EQ=; b=P1lAEmSty9+oVN7ngYjQ4zFH+Wx/uOVSwAHA63Hqcy888EZH8enMV/Tmlvz8hET7OV 0DJqXbZB2VVbEieInVsSFnETOol0DedILeRicm7yzom7m+HH2zqmlf892OTXLnJ3c7WA 8nDGPgGcATwR/PQtOB5myEi/zMTL2oCElqPk4CV8OpGj5FJ9UqI7PXsmHQHsFYsXCU8T 53jno+TEowDJCj+HDQo6DIAmObGQ95cAeIs04Az5mKCtoksEfwPiaMuRj2jOGlck9fpM GMydobjL15YMFP/UU0x6YIQMsVksyGQHztt4bX7l8EOEJSHTqFpXp6uGuuXaymDve+bh UxFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=X+bN8SexTbCT5j9k/6OymCyhRoZPMwyN555jgSjh4EQ=; b=YDJwPklf+lZHVbUfNS29C7tNT6rRhn7fnlKaLDL5RnClxRmjUrSdpzauzbQ35cc/Co MxWKHb71iWVPlmA0VSNKJYDIhD6k78a7oo2OlolvU+MBQkW7p/mH+3eW6Q4woPsX+jMs fpq/xcescg/2F0BpdCjHqfxoBANLfdJ4SgKz5gJg0H9G+X5tqHx0nhP2F0+uF9nv3A1e tnQNdwkqF7xLysVDyoDdOzZ8/DVWzHtKLaXv3hozlFcU0szHM2KDVCvZqTJSXLVGodG0 I27HJfOgzKRwZOQtoqMNxUyoIZZrzPqx89CKrz9y9F1l2lcjOAVBQjRH/6yz+PpFY2AL QZIg== X-Gm-Message-State: AOAM531LXRHvwoqRupPeIol817DEVYzaiYS5BQsp06ZSaQzSztgQfQGl WrLyWSIC1I+B1Ea4y05oyAUUul02nWw= X-Google-Smtp-Source: ABdhPJzaqN6ETNDykpM2QqXb22kDi1lRS7wiK0GqelsIplLzN1LcAIybRtvPj4y24KxfKcJKsWWSMQ== X-Received: by 2002:a5d:6101:: with SMTP id v1mr51625072wrt.598.1638874168667; Tue, 07 Dec 2021 02:49:28 -0800 (PST) Received: from localhost.localdomain (27.red-83-54-181.dynamicip.rima-tde.net. [83.54.181.27]) by smtp.gmail.com with ESMTPSA id z6sm13958561wrm.93.2021.12.07.02.49.27 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Dec 2021 02:49:27 -0800 (PST) From: Sergio Paracuellos To: linux-pci@vger.kernel.org Cc: tsbogend@alpha.franken.de, lorenzo.pieralisi@arm.com, bhelgaas@google.com, linux@roeck-us.net, linux-kernel@vger.kernel.org, Arnd Bergmann Subject: [PATCH v3 1/5] PCI: Let pcibios_root_bridge_prepare() access to 'bridge->windows' Date: Tue, 7 Dec 2021 11:49:20 +0100 Message-Id: <20211207104924.21327-2-sergio.paracuellos@gmail.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211207104924.21327-1-sergio.paracuellos@gmail.com> References: <20211207104924.21327-1-sergio.paracuellos@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org When function pci_register_host_bridge() is called, 'bridge->windows' are already available. However this windows are being moved temporarily from there. To let pcibios_root_bridge_prepare() to have access to this windows move this windows movement after call this function. This is interesting for MIPS ralink mt7621 platform to be able to properly set I/O coherence units with this information and avoid custom MIPS code in generic PCIe controller drivers. Acked-by: Arnd Bergmann Signed-off-by: Sergio Paracuellos --- drivers/pci/probe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 087d3658f75c..372a70efccc6 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -898,8 +898,6 @@ static int pci_register_host_bridge(struct pci_host_bridge *bridge) bridge->bus = bus; - /* Temporarily move resources off the list */ - list_splice_init(&bridge->windows, &resources); bus->sysdata = bridge->sysdata; bus->ops = bridge->ops; bus->number = bus->busn_res.start = bridge->busnr; @@ -925,6 +923,8 @@ static int pci_register_host_bridge(struct pci_host_bridge *bridge) if (err) goto free; + /* Temporarily move resources off the list */ + list_splice_init(&bridge->windows, &resources); err = device_add(&bridge->dev); if (err) { put_device(&bridge->dev); From patchwork Tue Dec 7 10:49:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergio Paracuellos X-Patchwork-Id: 12661573 X-Patchwork-Delegate: lorenzo.pieralisi@arm.com 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CDD2FC433EF for ; Tue, 7 Dec 2021 10:49:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235371AbhLGKxF (ORCPT ); Tue, 7 Dec 2021 05:53:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49480 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235346AbhLGKxB (ORCPT ); Tue, 7 Dec 2021 05:53:01 -0500 Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5FEE1C061574; Tue, 7 Dec 2021 02:49:31 -0800 (PST) Received: by mail-wm1-x330.google.com with SMTP id p18so10343803wmq.5; Tue, 07 Dec 2021 02:49:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9HHpkggX4sweXF0ORzrKAzn3bt5PBvzw8h2UszZWGl4=; b=Or58Wr7n84p+HIB8kbXNTRbyxglVkEgA/vpWoW1YRQDr4S/DKUBGbEEG19WvdfnAMT QF1OQWcEsLcoLUvWZN0uceMtBH7oru0jx4+noabB7uneiDyOFTTxn9ewXfJe4XwDMGWe ueXO+VLoJxTge5jSfqXlbfwP6+KIKJero89rz9VNk/RlTfTMX+2GGLJ3sdmTr4HwD5aI c9YBeFbtcIoYNvIUbAh7je7DlYpnVd1MZ3v4AWcuQEHVUgqGLmB2ORaXZA6v1OdQgHTD eQTJaj+cjnr+6StsYIgTDYvHOFLYUHOAsjwEJsXl9u+ip1+en9G6xd4DSyFKL6NDKOTc UbJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9HHpkggX4sweXF0ORzrKAzn3bt5PBvzw8h2UszZWGl4=; b=OmttnETKezaywKGT7Yre++lA4qhau+MsjGx+przLuVjD13g9yvvAAeYmXAUO0466SG Jtf249o2K0+aFjOvjKNsYB/kdikvrZuvzCgU4CB4fFwrE61mKM/JcpRGTCyEmoBJ9OmM fyyRqkqzGUDtnEzI0pIL82hFunSRSB+zpELUsIqszbm81GdMh7bdZL+gKB9gbOZYExvv lGql1TaZm0ueoLUyuZIebXA4ToX7MOaTjTtfp8ctcTdPNF2v3RFT2S1/cUnkEWuNC4vy rEF5vrj2QnrpzGG1CWyGyynbMVrB+x4789wALs1DgIUth41ynjHJV8x2lXGfthpn14YT oyHg== X-Gm-Message-State: AOAM530Xyt7TKj0bYM/j5LU3yl1r0u+bkC2bTkKoCJXgnkk5SZyp1Mgx /T30Wj1oAvCXRHtwBAlWWgobuS4bDrc= X-Google-Smtp-Source: ABdhPJyeixASncsMltAFlqH22qqWmTSjHp0LOsnKQT52oyviJ/yEcDSnqMohIvyZNrYk1aTXKlAPMA== X-Received: by 2002:a05:600c:22ce:: with SMTP id 14mr5692028wmg.152.1638874169718; Tue, 07 Dec 2021 02:49:29 -0800 (PST) Received: from localhost.localdomain (27.red-83-54-181.dynamicip.rima-tde.net. [83.54.181.27]) by smtp.gmail.com with ESMTPSA id z6sm13958561wrm.93.2021.12.07.02.49.28 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Dec 2021 02:49:29 -0800 (PST) From: Sergio Paracuellos To: linux-pci@vger.kernel.org Cc: tsbogend@alpha.franken.de, lorenzo.pieralisi@arm.com, bhelgaas@google.com, linux@roeck-us.net, linux-kernel@vger.kernel.org Subject: [PATCH v3 2/5] MIPS: ralink: implement 'pcibios_root_bridge_prepare()' Date: Tue, 7 Dec 2021 11:49:21 +0100 Message-Id: <20211207104924.21327-3-sergio.paracuellos@gmail.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211207104924.21327-1-sergio.paracuellos@gmail.com> References: <20211207104924.21327-1-sergio.paracuellos@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org PCI core code call 'pcibios_root_bridge_prepare()' function inside function 'pci_register_host_bridge()'. This point is very good way to properly enter into this MIPS ralink specific code to properly setup I/O coherency units with PCI memory addresses. Signed-off-by: Sergio Paracuellos Reviewed-by: Guenter Roeck Acked-by: Thomas Bogendoerfer --- arch/mips/ralink/mt7621.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/arch/mips/ralink/mt7621.c b/arch/mips/ralink/mt7621.c index bd71f5b14238..d6efffd4dd20 100644 --- a/arch/mips/ralink/mt7621.c +++ b/arch/mips/ralink/mt7621.c @@ -10,6 +10,8 @@ #include #include #include +#include +#include #include #include @@ -22,6 +24,35 @@ static void *detect_magic __initdata = detect_memory_region; +int pcibios_root_bridge_prepare(struct pci_host_bridge *bridge) +{ + struct resource_entry *entry; + resource_size_t mask; + + entry = resource_list_first_type(&bridge->windows, IORESOURCE_MEM); + if (!entry) { + pr_err("Cannot get memory resource\n"); + return -EINVAL; + } + + if (mips_cps_numiocu(0)) { + /* + * Hardware doesn't accept mask values with 1s after + * 0s (e.g. 0xffef), so warn if that's happen + */ + mask = ~(entry->res->end - entry->res->start) & CM_GCR_REGn_MASK_ADDRMASK; + WARN_ON(mask && BIT(ffz(~mask)) - 1 != ~mask); + + write_gcr_reg1_base(entry->res->start); + write_gcr_reg1_mask(mask | CM_GCR_REGn_MASK_CMTGT_IOCU0); + pr_info("PCI coherence region base: 0x%08llx, mask/settings: 0x%08llx\n", + (unsigned long long)read_gcr_reg1_base(), + (unsigned long long)read_gcr_reg1_mask()); + } + + return 0; +} + phys_addr_t mips_cpc_default_phys_base(void) { panic("Cannot detect cpc address"); From patchwork Tue Dec 7 10:49:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergio Paracuellos X-Patchwork-Id: 12661575 X-Patchwork-Delegate: lorenzo.pieralisi@arm.com 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8296CC433EF for ; Tue, 7 Dec 2021 10:49:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235368AbhLGKxG (ORCPT ); Tue, 7 Dec 2021 05:53:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49490 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235359AbhLGKxC (ORCPT ); Tue, 7 Dec 2021 05:53:02 -0500 Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7872AC061748; Tue, 7 Dec 2021 02:49:32 -0800 (PST) Received: by mail-wm1-x334.google.com with SMTP id i12so10365426wmq.4; Tue, 07 Dec 2021 02:49:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=o3XUpWa6+1DXUAt7w4vSplRb3YE72oXrdXq5mYAn8E8=; b=C+yu8zCfUE6lse16oPxZBsWO4Oc1HcCQyegPwFGnsxch4nayyCuXvsHqRpwddeKBqc A9jpVIqj5yM19yHxzniLitpkfsTmpN81uTzEhpOTNTFfRJVwg2TwdtsbqKvZrNZs5tTF 7bYYKlkuUNLWaLuRXq/3XwxmV4OPFss1il1Qfr1q1ma+sfn8E21JZ2A+HkD/zh6eQxnk eNZrwaH7Dtl+sEQLEJ4J6CriHSL9uxaN0Eq8Ej9Z5GVoOA1qCI25yDeiOCQLdkMddi5y F/gCzr83H+pxE6BkExo1Vn7FHb1Tu0XqZgfZMbiAP0G2eWQlYWFNsnDkGRhCVJEPvnPj 9eVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=o3XUpWa6+1DXUAt7w4vSplRb3YE72oXrdXq5mYAn8E8=; b=MEXbUEyP2N1XlYF39DnTNpr8r2NZ00Me5ZIkp87Kl6uJ7cvZ++a4oLLGb701EME/Mv 9oGTG3r4qJL0+CKsWrPufMpmrQfj5TNstF3KKkXz1P7/xNtaR3Xy6MaW0dzu4jRfgwti qJrJDbcfyOVvRkI8TGSqyzQ8WQzQNUg5vKwKlAUZdlzuch1oDhqGK0t2NlmyRPlthglf Zcow/zj19xSDllYkXHu5+bLFB434imAWvzH7aE3+5hZBmUQqKz0NeUx4jkDlZOFL0nJU ri84qp6OJSRvLKQtPtFMlqMHVtYlGG2Bn752jCVjYEwuJ2DaqIqc7wqieh/R707yYoVt HoGw== X-Gm-Message-State: AOAM532uCFf2bJP+AW6na4gtN4xc9yuU134A7eDr/1+BxccxBYXCTStF sdMABlQTz8eZ9AucMM8Iyx+kKNG3ykw= X-Google-Smtp-Source: ABdhPJylkXGNpR6jFsgRln7FS6oBDEGYmeLoZvlJzPRtb/YgJwo01PMfTZ7LadjK1JCidrT2nUzOcA== X-Received: by 2002:a05:600c:294c:: with SMTP id n12mr5906139wmd.71.1638874170879; Tue, 07 Dec 2021 02:49:30 -0800 (PST) Received: from localhost.localdomain (27.red-83-54-181.dynamicip.rima-tde.net. [83.54.181.27]) by smtp.gmail.com with ESMTPSA id z6sm13958561wrm.93.2021.12.07.02.49.29 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Dec 2021 02:49:30 -0800 (PST) From: Sergio Paracuellos To: linux-pci@vger.kernel.org Cc: tsbogend@alpha.franken.de, lorenzo.pieralisi@arm.com, bhelgaas@google.com, linux@roeck-us.net, linux-kernel@vger.kernel.org, kernel test robot Subject: [PATCH v3 3/5] PCI: mt7621: Avoid custom MIPS code in driver code Date: Tue, 7 Dec 2021 11:49:22 +0100 Message-Id: <20211207104924.21327-4-sergio.paracuellos@gmail.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211207104924.21327-1-sergio.paracuellos@gmail.com> References: <20211207104924.21327-1-sergio.paracuellos@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org Driver code is setting up MIPS specific I/O coherency units addresses config. This MIPS specific thing has been moved to be done when PCI code call the 'pcibios_root_bridge_prepare()' function which has been implemented for MIPS ralink mt7621 platform. Hence, remove MIPS specific code from driver code. After this change there is also no need to add any MIPS specific includes to avoid some errors reported by Kernet Test Robot with W=1 builds. Reported-by: kernel test robot Signed-off-by: Sergio Paracuellos --- drivers/pci/controller/pcie-mt7621.c | 37 ---------------------------- 1 file changed, 37 deletions(-) diff --git a/drivers/pci/controller/pcie-mt7621.c b/drivers/pci/controller/pcie-mt7621.c index 4138c0e83513..42cce31df943 100644 --- a/drivers/pci/controller/pcie-mt7621.c +++ b/drivers/pci/controller/pcie-mt7621.c @@ -208,37 +208,6 @@ static inline void mt7621_control_deassert(struct mt7621_pcie_port *port) reset_control_assert(port->pcie_rst); } -static int setup_cm_memory_region(struct pci_host_bridge *host) -{ - struct mt7621_pcie *pcie = pci_host_bridge_priv(host); - struct device *dev = pcie->dev; - struct resource_entry *entry; - resource_size_t mask; - - entry = resource_list_first_type(&host->windows, IORESOURCE_MEM); - if (!entry) { - dev_err(dev, "cannot get memory resource\n"); - return -EINVAL; - } - - if (mips_cps_numiocu(0)) { - /* - * FIXME: hardware doesn't accept mask values with 1s after - * 0s (e.g. 0xffef), so it would be great to warn if that's - * about to happen - */ - mask = ~(entry->res->end - entry->res->start); - - write_gcr_reg1_base(entry->res->start); - write_gcr_reg1_mask(mask | CM_GCR_REGn_MASK_CMTGT_IOCU0); - dev_info(dev, "PCI coherence region base: 0x%08llx, mask/settings: 0x%08llx\n", - (unsigned long long)read_gcr_reg1_base(), - (unsigned long long)read_gcr_reg1_mask()); - } - - return 0; -} - static int mt7621_pcie_parse_port(struct mt7621_pcie *pcie, struct device_node *node, int slot) @@ -557,12 +526,6 @@ static int mt7621_pci_probe(struct platform_device *pdev) goto remove_resets; } - err = setup_cm_memory_region(bridge); - if (err) { - dev_err(dev, "error setting up iocu mem regions\n"); - goto remove_resets; - } - return mt7621_pcie_register_host(bridge); remove_resets: From patchwork Tue Dec 7 10:49:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sergio Paracuellos X-Patchwork-Id: 12661577 X-Patchwork-Delegate: lorenzo.pieralisi@arm.com 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1D4BFC433FE for ; Tue, 7 Dec 2021 10:49:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235397AbhLGKxH (ORCPT ); Tue, 7 Dec 2021 05:53:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49494 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235320AbhLGKxE (ORCPT ); Tue, 7 Dec 2021 05:53:04 -0500 Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C3B47C061354; Tue, 7 Dec 2021 02:49:33 -0800 (PST) Received: by mail-wm1-x333.google.com with SMTP id p18so10343883wmq.5; Tue, 07 Dec 2021 02:49:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=MpmprtYs1zzkd2ypJgJU4YoRdsGFG26a01JTF8ywYGA=; b=XS341Y19MKcD014RAlf7vhzLHteYLhaMx+y1FgPtC6BGzQqCrCN65hGlts1CPfpzp0 pkQF42lJWO7vYT4QleV/6LDLYV2aczQoms494d5Ok+LnC3Tl6OIzh3x6hAm8kLB2hTwG wAT4m6WBTESLxYEP9Xu2Rys94dX1d/SCv79oU2UmMDvv0QQcehrR7j7fGWGz6tiOobBA LxbAy4LwD/dIHCLtgyk3jsw3vRbinCxTJHFTUfLwp7sHJ+bMkI3at2GqVrnc/R9/Ol4g sWTrur0RJbwGzNHUotFzi/QrnGzaAIOr56UYJJHEEtx3g1wP3ArtsXPpB4TY1GwtDOJZ WhSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=MpmprtYs1zzkd2ypJgJU4YoRdsGFG26a01JTF8ywYGA=; b=f1nEisDtdoorSOHBOPpzHOIhXMv/zY/AbEk3pCzbhf0VJps2M3ZhTKxST1tYGwJxOZ PlfKg5RfR+75rGnAPqyilEi+kyg0lU20PN1DgaNhYl1FKntqc6zWI0U5Rm9OZedPnz7g yUVGiiQvo4dgPjOxmagPmQCGcSVMxAPKkFZJECnUZYClm30Um1ZMvzZhgjWzqG3DpdFC 8plDI9sWZLCFp06lZCGhVEHQAl4avUCL5zIw6DVCUjIBNLSb8skGfhoFiLfD+nhOqP1T C8VNn39cVt/gSIQjSIoqHx+xRx6FcNlCkEfXLHXuZOXdxCTOI4gAFDlG97DEXj+z3cYZ DuMQ== X-Gm-Message-State: AOAM5305R119ZURv2hWeQs4pazsnBKNpP6zd4kS6cPTA46TLIQcjp+lH Iuv3pk7uygqDBxltbfsO03n2cCGyEx4= X-Google-Smtp-Source: ABdhPJwChH48i3YCiJ/49kL/1E+g2zAMHxM5A9k1oQo3pkmhAQDXo/9DUwCGe5DCe2TtT0ckUZvLLw== X-Received: by 2002:a05:600c:3541:: with SMTP id i1mr6279770wmq.124.1638874172126; Tue, 07 Dec 2021 02:49:32 -0800 (PST) Received: from localhost.localdomain (27.red-83-54-181.dynamicip.rima-tde.net. [83.54.181.27]) by smtp.gmail.com with ESMTPSA id z6sm13958561wrm.93.2021.12.07.02.49.30 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Dec 2021 02:49:31 -0800 (PST) From: Sergio Paracuellos To: linux-pci@vger.kernel.org Cc: tsbogend@alpha.franken.de, lorenzo.pieralisi@arm.com, bhelgaas@google.com, linux@roeck-us.net, linux-kernel@vger.kernel.org, =?utf-8?q?Krzysztof_Wilcz?= =?utf-8?q?y=C5=84ski?= , Yanteng Si Subject: [PATCH v3 4/5] PCI: mt7621: Add missing 'MODULE_LICENSE()' definition Date: Tue, 7 Dec 2021 11:49:23 +0100 Message-Id: <20211207104924.21327-5-sergio.paracuellos@gmail.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211207104924.21327-1-sergio.paracuellos@gmail.com> References: <20211207104924.21327-1-sergio.paracuellos@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org MT7621 PCIe host controller driver can be built as a module but there is no 'MODULE_LICENSE()' specified in code, causing a build error due to missing license information. ERROR: modpost: missing MODULE_LICENSE() in drivers/pci/controller/pcie-mt7621.o Fix this by adding 'MODULE_LICENSE()' to the driver. Fixes: 2bdd5238e756 ("PCI: mt7621: Add MediaTek MT7621 PCIe host controller driver") Reviewed-by: Krzysztof WilczyƄski Signed-off-by: Yanteng Si Signed-off-by: Sergio Paracuellos --- drivers/pci/controller/pcie-mt7621.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/pci/controller/pcie-mt7621.c b/drivers/pci/controller/pcie-mt7621.c index 42cce31df943..9da7452f565e 100644 --- a/drivers/pci/controller/pcie-mt7621.c +++ b/drivers/pci/controller/pcie-mt7621.c @@ -561,3 +561,5 @@ static struct platform_driver mt7621_pci_driver = { }, }; builtin_platform_driver(mt7621_pci_driver); + +MODULE_LICENSE("GPL v2"); From patchwork Tue Dec 7 10:49:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergio Paracuellos X-Patchwork-Id: 12661579 X-Patchwork-Delegate: lorenzo.pieralisi@arm.com 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0C276C4332F for ; Tue, 7 Dec 2021 10:49:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235407AbhLGKxI (ORCPT ); Tue, 7 Dec 2021 05:53:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49500 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235358AbhLGKxF (ORCPT ); Tue, 7 Dec 2021 05:53:05 -0500 Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B45E4C061574; Tue, 7 Dec 2021 02:49:34 -0800 (PST) Received: by mail-wr1-x42c.google.com with SMTP id q3so28560754wru.5; Tue, 07 Dec 2021 02:49:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=bxDrZ4uyh13errzvNoCy9OiKsed+5JgH8uT1va6lMpw=; b=jrfdMszTENiKdydeNNtc3jt3uzNAcgxaAfu0yUSmybiAA/dg7p6KGtwix4ND2PkOIu 8DvXw/w3EhCAakYJbkJEslEMydgACdasmjTmFimCrtisahHY10vuuy0V8aeqvsra/XPW QdPdRAcH5iXio2u/T05aGqdcrpridL9FT8KL5nlZTRH6k0gou5Tll463MBY6ZLyifTwv rpmtI/QIsHaZ/5TWmsxh/U+4EQR2p3iCIy478vja1ujS3rIqILYmXb13xr9CPF3u8pMF YLxkf7CtoX37rgP2oM1ETTFizfHL0ATi4W/YdW4IhO6MaVvtGiLS5NFFPeujRZPmIOmQ HlKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bxDrZ4uyh13errzvNoCy9OiKsed+5JgH8uT1va6lMpw=; b=UWisXrS4yCrinLjM7flUawxLDuFm60bf+hcBazVGvGDJk9mGzHCPdEe/nxnjcuRNfc xfycZtodjbCEbMW/dEZUypW/ER5WWQxNjaGfgsyWKwFox2RZ9KgTOcrebRVwsWhrVwzS E3H66Yo5FDdzQI4ocJCfLRJJs77e7uuiu650xogUTHYn6+JwOpesRpXijAdwFSK0SWVC s0rxTfItEJ6pmeUTe12+EJhSfNbLN8sRcJQnPCDKJnWlWZxbT5s1V+BNOFE+rhMhdOxd rqPdgG8TEeMG67CDnJ41llefHsvNZjOC2HTWCg72PVuP1hzbpd95Rf8DllDPBKTE+D4F iCUw== X-Gm-Message-State: AOAM533sZE4HUJNXX9tcmPE8z0CQQOv2Gb/Cozfy0bsBgC81Ntbac2gB n969aDmSUx6+GtmRZMmHmx8pK7aEtyc= X-Google-Smtp-Source: ABdhPJx+B1da5gS87V2uCFI1fq4c1MB+nmISFqQ4b9rQliUMAJ+FA/x1drbSa4J3XFwkPxiIGU9G0g== X-Received: by 2002:a5d:548b:: with SMTP id h11mr50393984wrv.11.1638874173112; Tue, 07 Dec 2021 02:49:33 -0800 (PST) Received: from localhost.localdomain (27.red-83-54-181.dynamicip.rima-tde.net. [83.54.181.27]) by smtp.gmail.com with ESMTPSA id z6sm13958561wrm.93.2021.12.07.02.49.32 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Dec 2021 02:49:32 -0800 (PST) From: Sergio Paracuellos To: linux-pci@vger.kernel.org Cc: tsbogend@alpha.franken.de, lorenzo.pieralisi@arm.com, bhelgaas@google.com, linux@roeck-us.net, linux-kernel@vger.kernel.org Subject: [PATCH v3 5/5] PCI: mt7621: Allow COMPILE_TEST for all arches Date: Tue, 7 Dec 2021 11:49:24 +0100 Message-Id: <20211207104924.21327-6-sergio.paracuellos@gmail.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211207104924.21327-1-sergio.paracuellos@gmail.com> References: <20211207104924.21327-1-sergio.paracuellos@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org Since all MIPS specific code has been moved from the controller driver side there is no more stoppers to enable the driver to be completely enable for 'COMPILE_TEST'. So mark as tristate and remove MIPS conditional statement. Signed-off-by: Sergio Paracuellos --- drivers/pci/controller/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pci/controller/Kconfig b/drivers/pci/controller/Kconfig index 7fc5135ffbbf..2d5a86f9089c 100644 --- a/drivers/pci/controller/Kconfig +++ b/drivers/pci/controller/Kconfig @@ -332,8 +332,8 @@ config PCIE_APPLE If unsure, say Y if you have an Apple Silicon system. config PCIE_MT7621 - bool "MediaTek MT7621 PCIe Controller" - depends on SOC_MT7621 || (MIPS && COMPILE_TEST) + tristate "MediaTek MT7621 PCIe Controller" + depends on SOC_MT7621 || COMPILE_TEST select PHY_MT7621_PCI default SOC_MT7621 help