From patchwork Wed Dec 1 21:51:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergio Paracuellos X-Patchwork-Id: 12651143 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 BEC68C433FE for ; Wed, 1 Dec 2021 21:51:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353225AbhLAVzB (ORCPT ); Wed, 1 Dec 2021 16:55:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234414AbhLAVyy (ORCPT ); Wed, 1 Dec 2021 16:54:54 -0500 Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D6CDFC061748; Wed, 1 Dec 2021 13:51:32 -0800 (PST) Received: by mail-wr1-x42f.google.com with SMTP id s13so55400291wrb.3; Wed, 01 Dec 2021 13:51: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=X+bN8SexTbCT5j9k/6OymCyhRoZPMwyN555jgSjh4EQ=; b=R8qT7/eoh5/ttqQmHnRP/EPXLtBfokqyDLguIQVMm0q6ACnWVDzoC/huqVM/nJZpgj YrsHNFQQfS2Nu8ljDHX71/hc6vRxDQUjwczdBYeQxfqkfXlqJWSaK7EHUOUyGtx7SA7N 2hOGKNPbHtSHT3rIFnsB93kJyNwG/hhON7R2XTN8v2Dma1q5pz1A5rAerqLlKOQTJAIJ /a4YkNi7Ni3cMw2/DYgk6JoqOGV5Rqm1g8/NNPdhYI8bHRIsQ1teLJE5zLK9gngNMTn9 iDH86RqSoVtLYJkZE3eHSciLQpOzqQqJEL5aThiw1GJgbuZlaisTZMJ+Zx5ltkyiskSP sEHQ== 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=yqTEiIEtGRIPZcrUbDhjKfy0bLF1z++GsVorJ89lE3cLhoIZSLqV3vekS3Jpx4I/d4 OZdo6tbiF2pmxG4siWjqyTzv/QgSZhFnQWbQoXDlKbikPuNIhwSjnTZwRKuf+dnv7PaD Brr4TBLVxOpUbbBHQVFhS3KVg7b1ikBsJUeRAlIw1ikHfAzx+OSMz67T1QoL7kKIBUA3 8/q66oaBYiqyhLNGv3ieLjdah0MRi9ufCgnlCXOJC2s9XBW9rvA/4Vo5MBSma85Kc2xa UwKqlMU3Rd0eSU9ALCTIyEIbw5miJjNJZ8RSV8eIt+kYSstwNkOwd0zZ/ZVCZJhiidiw BFMA== X-Gm-Message-State: AOAM533Gg8mwLf+6epU4SzwLC7zekQVTwa6XwRGv3wq6cqSspPuYChfN TO7Kog7G7HHMmk94mzqdKuEBOmqUeqI= X-Google-Smtp-Source: ABdhPJypB0rYDFu1QuwPhrefdwnGwmoaVYpE2KIf1zC2NF1YUDLXINMl12I4vsIof4XNYC1h2nzB/Q== X-Received: by 2002:a5d:66c5:: with SMTP id k5mr9740544wrw.621.1638395491213; Wed, 01 Dec 2021 13:51:31 -0800 (PST) Received: from localhost.localdomain (252.red-83-54-181.dynamicip.rima-tde.net. [83.54.181.252]) by smtp.gmail.com with ESMTPSA id c10sm877879wrb.81.2021.12.01.13.51.30 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 01 Dec 2021 13:51:30 -0800 (PST) From: Sergio Paracuellos To: linux-pci@vger.kernel.org Cc: linux-mips@vger.kernel.org, tsbogend@alpha.franken.de, lorenzo.pieralisi@arm.com, bhelgaas@google.com, arnd@arndb.de, linux@roeck-us.net, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/5] PCI: Let pcibios_root_bridge_prepare() access to 'bridge->windows' Date: Wed, 1 Dec 2021 22:51:23 +0100 Message-Id: <20211201215127.23550-2-sergio.paracuellos@gmail.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211201215127.23550-1-sergio.paracuellos@gmail.com> References: <20211201215127.23550-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 Wed Dec 1 21:51: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: 12651145 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 EC2EEC433EF for ; Wed, 1 Dec 2021 21:52:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353230AbhLAVzT (ORCPT ); Wed, 1 Dec 2021 16:55:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353024AbhLAVyz (ORCPT ); Wed, 1 Dec 2021 16:54:55 -0500 Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D2393C06174A; Wed, 1 Dec 2021 13:51:33 -0800 (PST) Received: by mail-wr1-x434.google.com with SMTP id s13so55400351wrb.3; Wed, 01 Dec 2021 13:51: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=2enovZIIcSmPlNGyWYjv9MRu60VM0WFrzLKPmZYvVq8=; b=q4eqM+BgJDURYM7X5MaW9dqT0QDyAV/vAoxKXAzAaATfzQz9oET8W9gdp6NASxDf2A 6USJjwc1aMkRmm9zapaU2JFNtjZJq8iPn0lmq4ogcPEAs1zmSnXhd6SDiIidaylAn16b FzZ0MoHN+/+nft0cKV8xQYXNad8luuXWtCbdzQfgAvL1OTp3DXPr1umXU1GYipoagmQu tpaIUgGDK7Dr/RiNSOBf1yGuow8Y+KsVLWSahaIQ4qaBb/YbfkhGSxumes5kG3p7gqCM jPwzS2YH910JB6ilnTLQKZ/gcTLv7Z6Uc14+N9b1IIyl1/EQZUAkQulKhV7csPsadXZN ri/g== 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=2enovZIIcSmPlNGyWYjv9MRu60VM0WFrzLKPmZYvVq8=; b=bmSl5ArgNWMVS5FWETT96vng0PIMxhRCS08Dx7NHmvJlzHS6QyzCtcEZmqinNVdSJ5 0rI1yFv53GfnO92JuHwQiIZMA7UaEn47WW/fg1ekkUz8qQXbJJsDUqCJmiNTBPLVdYg/ 5YvP68LbZpkBRyMn6odetc0M6mk+XtqIy2DGoa0e5Zh3f6C4u8fhJBov+Tb239NshoUM FhP8Y67Z+DZX/kgVZrS0y6NESQ/MlAgO3rk8UfzMBLDj/THB7bA8I3yl4cI6VMFoqgOu p84dGjA2dZgXrwkKfXPK8TzNti4BKFW2j1A5MIDTt0WkEtJ/h32s62wl4yHpzh5NKGA5 mFAQ== X-Gm-Message-State: AOAM530sBIgnmgTL55SXg8ir9kBu0Idml9fOsQG35Oen98K5yQZmx5TS 94yRrQT+n7Q6JKPNZtNylZKkAB1Ncco= X-Google-Smtp-Source: ABdhPJyAFEjCtAj0/n7TezRMDpEgkhfOKXtlkr27+4yxHkAq/1Ekt04Y14K42Hy3A36RovuMinp/OQ== X-Received: by 2002:a05:6000:1842:: with SMTP id c2mr9577159wri.301.1638395492251; Wed, 01 Dec 2021 13:51:32 -0800 (PST) Received: from localhost.localdomain (252.red-83-54-181.dynamicip.rima-tde.net. [83.54.181.252]) by smtp.gmail.com with ESMTPSA id c10sm877879wrb.81.2021.12.01.13.51.31 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 01 Dec 2021 13:51:31 -0800 (PST) From: Sergio Paracuellos To: linux-pci@vger.kernel.org Cc: linux-mips@vger.kernel.org, tsbogend@alpha.franken.de, lorenzo.pieralisi@arm.com, bhelgaas@google.com, arnd@arndb.de, linux@roeck-us.net, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/5] MIPS: ralink: implement 'pcibios_root_bridge_prepare()' Date: Wed, 1 Dec 2021 22:51:24 +0100 Message-Id: <20211201215127.23550-3-sergio.paracuellos@gmail.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211201215127.23550-1-sergio.paracuellos@gmail.com> References: <20211201215127.23550-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 --- arch/mips/ralink/mt7621.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/arch/mips/ralink/mt7621.c b/arch/mips/ralink/mt7621.c index bd71f5b14238..7649416c1cd7 100644 --- a/arch/mips/ralink/mt7621.c +++ b/arch/mips/ralink/mt7621.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include @@ -22,6 +23,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)) { + /* + * 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); + 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 Wed Dec 1 21:51:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergio Paracuellos X-Patchwork-Id: 12651151 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 3794FC4332F for ; Wed, 1 Dec 2021 21:52:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353307AbhLAVzT (ORCPT ); Wed, 1 Dec 2021 16:55:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35978 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353177AbhLAVy4 (ORCPT ); Wed, 1 Dec 2021 16:54:56 -0500 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CEB54C061574; Wed, 1 Dec 2021 13:51:34 -0800 (PST) Received: by mail-wr1-x433.google.com with SMTP id j3so55361472wrp.1; Wed, 01 Dec 2021 13:51: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=o3XUpWa6+1DXUAt7w4vSplRb3YE72oXrdXq5mYAn8E8=; b=nUNKvTiylaT/oSLbkLZjB1slHcDpnS/DsfQ5raYHmniDr+B6FjCKFTo6CaoEOpKRTf mSS+rWFlglrnwQ3zwLz6kWx+E5mAraBiJ7qnSx8dFFtdd8pgyb4lIksiOT9lbOKjyILD An+xqLSQ/f5Hh+KRdiZW7neYtAO3vsn3uXAwdr2+ubBHSPR4IQd+w1iqL/rHTaZXRL7H p5342XYk6q8yiTEpuEV0o05iEy9UKr4Gcfr6uGQVf0F19BQzO6LfkaJo6htZobMgqTdN wjWeqnZQgsAGfnkDkfmUq2hjpy8CgYaNldprlfZoPx/yyqokb/dNbITW4KxPViuEV4Li txSA== 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=MQ41+hzn1RIouw9ajLIsIcFZ5BGtDa4mwXTsfrajgbw17oD9NEcj8QdSsDPLZ1IK07 Cns9R500SqHWH/NDt/W8SEe1mOwe2H7sPScHOQmNWU2OlplJD497zFFNzvrAB0cr/V4d gxblR/GeEIbdI2uSjbIvrUXpZsLExOtXnuxFEEIStrxi0ME81Y436Vy0v0ejLB+5OFbD MQGJuYOCaDTLI0iRKTREkeTw6LFrqM5UavoFaoiphnWp0B5OVXBNwl+aq57sLPbpetP1 E89GhaS1PtA2Yt2WO4DqsyqUmj63RWdnwn+SHBtLa4SSA9aUlBYRIzARezKqgKaPAbOT JLNA== X-Gm-Message-State: AOAM533GDXatBwvuqTfF5Stc2aV2l4zro8wD6MGeotef+n442OXVGJOk sEPYp8IWx1LBLhdtBNVXj6eI+1FF1xA= X-Google-Smtp-Source: ABdhPJwv8yBgZ93ZrFgFmS1gzRyupMYLkDwjVA2UviZeKjsUT3wScpUl2WBaFuVIt0eCJZErld9Uzg== X-Received: by 2002:adf:d1e2:: with SMTP id g2mr9930385wrd.179.1638395493244; Wed, 01 Dec 2021 13:51:33 -0800 (PST) Received: from localhost.localdomain (252.red-83-54-181.dynamicip.rima-tde.net. [83.54.181.252]) by smtp.gmail.com with ESMTPSA id c10sm877879wrb.81.2021.12.01.13.51.32 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 01 Dec 2021 13:51:32 -0800 (PST) From: Sergio Paracuellos To: linux-pci@vger.kernel.org Cc: linux-mips@vger.kernel.org, tsbogend@alpha.franken.de, lorenzo.pieralisi@arm.com, bhelgaas@google.com, arnd@arndb.de, linux@roeck-us.net, linux-kernel@vger.kernel.org, kernel test robot Subject: [PATCH v2 3/5] PCI: mt7621: Avoid custom MIPS code in driver code Date: Wed, 1 Dec 2021 22:51:25 +0100 Message-Id: <20211201215127.23550-4-sergio.paracuellos@gmail.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211201215127.23550-1-sergio.paracuellos@gmail.com> References: <20211201215127.23550-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 Wed Dec 1 21:51:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sergio Paracuellos X-Patchwork-Id: 12651147 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 E1672C433FE for ; Wed, 1 Dec 2021 21:52:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238492AbhLAVzU (ORCPT ); Wed, 1 Dec 2021 16:55:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35986 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353204AbhLAVzE (ORCPT ); Wed, 1 Dec 2021 16:55:04 -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 D81E7C061748; Wed, 1 Dec 2021 13:51:35 -0800 (PST) Received: by mail-wr1-x42c.google.com with SMTP id o13so55202036wrs.12; Wed, 01 Dec 2021 13:51:35 -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=H3Nu5SJHd7C4bi1b2m7iILOA/7YRSiWGVuzQyhEApkOuLOx8MawpV5zDMKT70cW52q vqPQ5F4Q0HjsRgi/UjSwuy/oyV7SVOVEPqWHyNxZfs2of0KFcmo73bopY6zJgy86ofbA Vv63HCJL80fv/BmtoFjONKubycm74ipJ07532lsofE/4AFWRko3uw0JvAhoW+LleOVwU yuq1MRGKYrfLUGfyuIbybK/4+riEF0SSE/Xv7b/pvkvlCm0UzXFOhpr5+oHNjkunEoPT 2QVyUXTy39Sdhdjwhxeu9fmbp19Ln86X8gmK6HE3k6B1Nu1mlbFY8OMR18Wjkj4BSQpI RDLw== 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=2AFeUJEcgKeXRVCQLSfsMrxMgV8LbpeXLHqcJlmAo9IBxkQwmVQd5HHS7PBbrOzBUx Ft0TIWMvehBfVIVX3gfjmb/p5JvQ7EyWtpWM/tMqfi/WCB0aNKG7NKE++Xk1f6uSq9r9 DNEleOGx8IvCI3DVVVPg6avamv3oFW4u73gUWu/yIJv7cWjwgXOqj9vCV8yXWVxucHpt opJ1G/mPo96cjAJyQrfxwMAOOPO6N0vSuR/8JDZWI9EPZOZGT5OOrmXOnTG1bRPrl6RT DlzVFPZDIYhKckVJzQ5WnnwXo1JwVcdPpcQ2weKFZ2U4IJQdpkTntE6gmzxnDuZv7Ajg FB1A== X-Gm-Message-State: AOAM532sIsOekZd/IPNBbYz1J8ZpmabBw+Dx3Lt/KVbtPAV9WvxtKrt1 672PqPgWqWiU8qsPKbALhqss8Mg8ewk= X-Google-Smtp-Source: ABdhPJz6Vod6cOigId5BjxWLpL2kixofNNnqdA+gjt3UhkJFkDTDAzFeM+TIZTraVSEP1TowL6r1/g== X-Received: by 2002:a5d:6547:: with SMTP id z7mr9405501wrv.597.1638395494249; Wed, 01 Dec 2021 13:51:34 -0800 (PST) Received: from localhost.localdomain (252.red-83-54-181.dynamicip.rima-tde.net. [83.54.181.252]) by smtp.gmail.com with ESMTPSA id c10sm877879wrb.81.2021.12.01.13.51.33 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 01 Dec 2021 13:51:33 -0800 (PST) From: Sergio Paracuellos To: linux-pci@vger.kernel.org Cc: linux-mips@vger.kernel.org, tsbogend@alpha.franken.de, lorenzo.pieralisi@arm.com, bhelgaas@google.com, arnd@arndb.de, linux@roeck-us.net, linux-kernel@vger.kernel.org, =?utf-8?q?Krzysztof_Wilcz?= =?utf-8?q?y=C5=84ski?= , Yanteng Si Subject: [PATCH v2 4/5] PCI: mt7621: Add missing 'MODULE_LICENSE()' definition Date: Wed, 1 Dec 2021 22:51:26 +0100 Message-Id: <20211201215127.23550-5-sergio.paracuellos@gmail.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211201215127.23550-1-sergio.paracuellos@gmail.com> References: <20211201215127.23550-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 Wed Dec 1 21:51:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergio Paracuellos X-Patchwork-Id: 12651149 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 EB03EC433FE for ; Wed, 1 Dec 2021 21:52:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353253AbhLAVzW (ORCPT ); Wed, 1 Dec 2021 16:55:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353206AbhLAVzE (ORCPT ); Wed, 1 Dec 2021 16:55:04 -0500 Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD3FCC061756; Wed, 1 Dec 2021 13:51:36 -0800 (PST) Received: by mail-wm1-x335.google.com with SMTP id o19-20020a1c7513000000b0033a93202467so2170077wmc.2; Wed, 01 Dec 2021 13:51:36 -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=RaIl7xQSoXsxAYdLKywvcuTT4Blwc6PXsDlGAUvpoKY=; b=Vj/NKn43nd8bESAwtHAudpnpTXDWLx0rOLw71QiY2Ci0KdOZ0wO9EqdBz+niamJIKc lOATqAmTW1L+f4zVIbRtC8o0deS/CHm5o4YEeDd23YZrDeugg8gx4QDSlSKjpL4btdV6 zu6rYNDZ0Fuw4ikKwxPrYuCksRUhmi7V+GJFWBIUqfWj86pV20ERuzbGs5QGGqwhzifP QrUeXaiPsknbo5hraf7IWzRIYJxjU+BEF0O3xXJm/gUJgkRNepICYzWf404JAPgVNDG1 qlLtsyJgMAxEXO0e+FtqRAUiG6TBo7njyoBxfv3Pz1IlwKIg6KSaq74RSK0d/vn2zGK9 Lo5w== 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=RaIl7xQSoXsxAYdLKywvcuTT4Blwc6PXsDlGAUvpoKY=; b=sWbYgyl04HccYAMKvA417dNo5oY6mw8JikNZHbzuturitIUEq/MapA1aNVtVK79gQa olZD/0CUf9RQNehELQi+HBVzrJhw5u386TxzpFfl1MORlHV5Fpww3IhqPkpXUCZ3NWba 34aipeOE4kOZ2bTfpj/Xry8lG8DvqDjoAUzm3AKSKapK10ys2MdPcEOYgOMKoLpPQmdj CFyqad02OaOBtTY2rfIf/PHLxrec+091uHJonX7RDWHYvfcxlgzXd5JMzU8YnUYwgZHt KMFDyJQcpTrPJImUo/1x3FaWSIEUWgtL7954c5STmzoOhjrl+yglygKhT9kanLpCmJGs Gb8g== X-Gm-Message-State: AOAM530/HqMiPoMsr8Q9CY+LH8fIiHw5u1xWiJGoEKrCrPkI52AgeXOg bCP8wl3vud0msrVlA5zbGq0ls7vQR9U= X-Google-Smtp-Source: ABdhPJyhgRaVIDmlqKXjN6DihVN0a0iVYb5bKJ6jNsc9qvyWz0kQXtXSqPG2vzDclnEscJiqFM+yoQ== X-Received: by 2002:a05:600c:b43:: with SMTP id k3mr1033589wmr.159.1638395495199; Wed, 01 Dec 2021 13:51:35 -0800 (PST) Received: from localhost.localdomain (252.red-83-54-181.dynamicip.rima-tde.net. [83.54.181.252]) by smtp.gmail.com with ESMTPSA id c10sm877879wrb.81.2021.12.01.13.51.34 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 01 Dec 2021 13:51:34 -0800 (PST) From: Sergio Paracuellos To: linux-pci@vger.kernel.org Cc: linux-mips@vger.kernel.org, tsbogend@alpha.franken.de, lorenzo.pieralisi@arm.com, bhelgaas@google.com, arnd@arndb.de, linux@roeck-us.net, linux-kernel@vger.kernel.org Subject: [PATCH v2 5/5] PCI: mt7621: Kconfig: Allow COMPILE_TEST for all arches Date: Wed, 1 Dec 2021 22:51:27 +0100 Message-Id: <20211201215127.23550-6-sergio.paracuellos@gmail.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211201215127.23550-1-sergio.paracuellos@gmail.com> References: <20211201215127.23550-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'. Hence, remove MIPS conditional statement. Signed-off-by: Sergio Paracuellos --- drivers/pci/controller/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/controller/Kconfig b/drivers/pci/controller/Kconfig index 93b141110537..18d41d2b0392 100644 --- a/drivers/pci/controller/Kconfig +++ b/drivers/pci/controller/Kconfig @@ -333,7 +333,7 @@ config PCIE_APPLE config PCIE_MT7621 tristate "MediaTek MT7621 PCIe Controller" - depends on (RALINK && SOC_MT7621) || (MIPS && COMPILE_TEST) + depends on (RALINK && SOC_MT7621) || COMPILE_TEST select PHY_MT7621_PCI default SOC_MT7621 help