From patchwork Mon Nov 15 07:08:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergio Paracuellos X-Patchwork-Id: 12618781 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 44B50C433EF for ; Mon, 15 Nov 2021 07:08:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2BB1C61872 for ; Mon, 15 Nov 2021 07:08:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230292AbhKOHLi (ORCPT ); Mon, 15 Nov 2021 02:11:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39294 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229673AbhKOHLL (ORCPT ); Mon, 15 Nov 2021 02:11:11 -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 35A2CC061766; Sun, 14 Nov 2021 23:08:14 -0800 (PST) Received: by mail-wm1-x334.google.com with SMTP id y84-20020a1c7d57000000b00330cb84834fso14920900wmc.2; Sun, 14 Nov 2021 23:08:14 -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=xDuMlt4ukL93ZP789pRIz0IDAng97x1CmRl/YW4VpFE=; b=LsPI06cvMDNIH8/Xy+mxaWV0gEpxQN0/AVYLBjGM1H9PD4R/UkxpuA9b1bN6d+DADy W5u3NJKlQ9yq5D3El/AkMnY4pxidYro0gTYQVInoS4GAzBcDxiRXbgrFxcHiJIoo1hnR +0c5pKJzJ8PRIyDwEWenRKgrosmaIoDFPLeeDS6/6p+SOddFzH97RMqnZnPBk0gE1ZEz Nysh4uhNCzb3fIOchPG8h26zbDoxx0MrBktNOWXlZC3A9KOs+TiKVolyjEPiygWXi/Em OztXfB/lqqR6WvZiOklXLs+8x1o2y+oGemWVItR37XH+du4/qvUQoPo/PPr4ydajIbkT mTxw== 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=xDuMlt4ukL93ZP789pRIz0IDAng97x1CmRl/YW4VpFE=; b=4yJ/yuM69lloV/tmFsFgdA+HvjhOVcsShmJpSGcrPH9dN5l8OiLt9KLetxLnn5kaNo jFRTWOToLFzy+OtSRPQQ4wpqS61LCHkPPT3wrJ02+NXyzyTxPLJbQGH9MlIq/LFiURKP ZQxDv8RAEvcmIIPr+lsdlIehlZf1sLgE6ajZlB27jAIxLqKLN5Ks3TFg4LHfdfK3FuUp EYsVoDx9SjzaXkrBRXv8PEGJITGDWHoOr/5K8TCWYHgNlJxTaO8e5wfea8BnS1N0QtLw /NXNV6r/4o/fFIC3LsP735jzB8HuKO09JZoV+kIQdPDBG3u0bJOBDQAFmQ0GYIoVAAby mJ1Q== X-Gm-Message-State: AOAM532NqCB46hKaiIyUJZ0nccQGbg7xK1azM1jVoN33ioDMA2wpu1jh SITxEuCRVXbsvXf7RllihzIvNJgu2do= X-Google-Smtp-Source: ABdhPJzdhzCUYOtFpREBoYEc2i6uaHan0JmgRdMe5sgLs6HCWCMRLxxK3I21cBirYN+16ozUjD9XWQ== X-Received: by 2002:a1c:7c19:: with SMTP id x25mr41461932wmc.42.1636960092619; Sun, 14 Nov 2021 23:08:12 -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 d6sm13301079wrx.60.2021.11.14.23.08.11 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 14 Nov 2021 23:08:12 -0800 (PST) From: Sergio Paracuellos To: linux-pci@vger.kernel.org Cc: linux-mips@vger.kernel.org, tsbogend@alpha.franken.de, john@phrozen.org, lorenzo.pieralisi@arm.com, bhelgaas@google.com, arnd@arndb.de, linux-kernel@vger.kernel.org Subject: [PATCH 1/5] PCI: let 'pcibios_root_bridge_prepare()' access to 'bridge->windows' Date: Mon, 15 Nov 2021 08:08:05 +0100 Message-Id: <20211115070809.15529-2-sergio.paracuellos@gmail.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211115070809.15529-1-sergio.paracuellos@gmail.com> References: <20211115070809.15529-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. Signed-off-by: Sergio Paracuellos Acked-by: Arnd Bergmann --- 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 Mon Nov 15 07:08:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergio Paracuellos X-Patchwork-Id: 12618783 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 12BF8C4332F for ; Mon, 15 Nov 2021 07:08:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EA58463223 for ; Mon, 15 Nov 2021 07:08:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230351AbhKOHLk (ORCPT ); Mon, 15 Nov 2021 02:11:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229780AbhKOHLL (ORCPT ); Mon, 15 Nov 2021 02:11:11 -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 6F64AC061767; Sun, 14 Nov 2021 23:08:15 -0800 (PST) Received: by mail-wr1-x42c.google.com with SMTP id u18so28579310wrg.5; Sun, 14 Nov 2021 23:08:15 -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=TP1oegk8MO7vn/JpI1EZbFq0jyItHaBbpcq+KibGdAYo2USrzCi+sPLGrem4PBibOA 9epbY2V5snO3T1z+jhtYqxWiiOKN61k//lirgQvgMqZ3culHra1q7OK7fLsRfNTUUUYB rDL3zWegFiYCDD7sex54QvRUhaYUs0v316LRtgBbno76Jtc4Yw7m0cw6HcyiYW5aDUAk dZRnE+wauHjEiJ1g4ehpYbfheX9+qFPu6rq+uitOJBiy/vbvmwzNRAC+2vrFkbWqLIY1 vGqDFh1ksmuyWjcVW+asiI3bP2Rk3EFcik5YGBTyHEEqBvBJuIy0OCSsVY4fahzyoVMN lq2w== 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=1HS5cC+/l9Cqs2LOx0KHuykRDfoE6y84EfPoAUp0PWqMTIwv5dvFnRiPj6mdUYVnFm JlSk+Op79pj81P2mUki65fG4Qkh1m1Rwu1ep5KxdKM858/lX4XKLMRPLTM8Ez/jn95qT 6yf9JDhpLY9Y1XUGvozaoOwY9tDXRUtkTAZwU7Om++FqOeupo5pB3wq+tT+2Lt8jpeGM nSwA+06xHNMKNT4XiRWawsXZX8jdI3NFXjepAm4K9uwqFga4jMOJxEwA6pTxpP9O5Eb2 N4xdH0r8dNAJ2tHYMF4sCIOsf1b5/qM+BJKLbT0eNi0KsEOb/Eo9nuY4AO6gAlEG/ELy SXPw== X-Gm-Message-State: AOAM532PWYnt/f4tPHY9P4CletVkvOEQ/JtDZnsoODfecj1/z52K5rli I4OiSB27fR9s6CyHxkqFyUx6JnPknlA= X-Google-Smtp-Source: ABdhPJzOpMw/ACQzOto7XTcR6932CmD0Xu4aOf3mtKMnok2YYZZdOhULXNVxmW5h4fAM4rjxo2AXbg== X-Received: by 2002:a05:6000:1862:: with SMTP id d2mr44337344wri.203.1636960093571; Sun, 14 Nov 2021 23:08:13 -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 d6sm13301079wrx.60.2021.11.14.23.08.12 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 14 Nov 2021 23:08:13 -0800 (PST) From: Sergio Paracuellos To: linux-pci@vger.kernel.org Cc: linux-mips@vger.kernel.org, tsbogend@alpha.franken.de, john@phrozen.org, lorenzo.pieralisi@arm.com, bhelgaas@google.com, arnd@arndb.de, linux-kernel@vger.kernel.org Subject: [PATCH 2/5] MIPS: ralink: implement 'pcibios_root_bridge_prepare()' Date: Mon, 15 Nov 2021 08:08:06 +0100 Message-Id: <20211115070809.15529-3-sergio.paracuellos@gmail.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211115070809.15529-1-sergio.paracuellos@gmail.com> References: <20211115070809.15529-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 Mon Nov 15 07:08:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergio Paracuellos X-Patchwork-Id: 12618779 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 28E1DC433F5 for ; Mon, 15 Nov 2021 07:08:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 04D9461872 for ; Mon, 15 Nov 2021 07:08:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230251AbhKOHLe (ORCPT ); Mon, 15 Nov 2021 02:11:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39304 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230039AbhKOHLL (ORCPT ); Mon, 15 Nov 2021 02:11:11 -0500 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 32EB9C0613B9; Sun, 14 Nov 2021 23:08:16 -0800 (PST) Received: by mail-wr1-x429.google.com with SMTP id w29so28518141wra.12; Sun, 14 Nov 2021 23:08:16 -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=GTUc9NbgAeebeURXgv+3miv1kPLP6aJJxQBm6hsHSgU=; b=IHfix6xhbeGCGUZOUsdQGMCA0f7uVp0mcQifrR2nBfAzFOdbFyl1mPPfKh0dTKmuU6 tya5wAqEb+LvXjZn0Th1RlUjwLgF5XGGKaKNgQJfz0x9gK43BrBn8rKC1uek4vbuwuoW qITHbAiYikSSbxO+ZEo0MvimAmCQUxqTRb8y3peSyiaWzxwbzlXs1wCzRe7XRELWIEOY /CCgHdDuBiSuD/mSkGa6RRadZIkhyIaPZ65Eiz2BSmX/xkTC6MP+JU/43RmMJhLwybsQ f2NpJarEXIU0FTzWabe8MU0/LBSJJnxaZ/CV6VvcY/7QYGUW54eVJk73MuMMXfVFAKs9 Boug== 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=GTUc9NbgAeebeURXgv+3miv1kPLP6aJJxQBm6hsHSgU=; b=Mgu4uza9/XG0CuAIrJhq2I3l0h14gxa8tXn2dOgKbKbdufkkw56mKHDEmaXPh0UcL0 dfxZ36KdPhEdmCazMqO0ljhNursWHuVJVJpQwfDrUbks6t0JRE1XIfam2NXxxz+MFdac 1IbbzU01fNSK3U+atS+kUFihqd3vLbJFKlUiDJZ15Vt5sJSE5OriJtLf0MLon5DI0WBn WgHGOi6WQYvzP28AYvRTdwCExJ3o5rdSM9+TJ6KksjOA04ClOBJzev+QjqsldAJgV16k WWN7lY/C7eNuBpQuPwhojPvbuBgV0RXOtnH7GFJ6+dlvSsbyGfrSZyOyNHtG/lhYSjkI cuiQ== X-Gm-Message-State: AOAM530dA3fmu2WcYLjrLwzSi0JdzrAdIjqxomWiPluBEqc6WKEojJgy xccg7KCFUtrVTPuMTqvXkomklELI6BM= X-Google-Smtp-Source: ABdhPJxaLi+MfCejxxF0xNuZE0GE60Ysw0QHQe4Dn4w5v73JPTyVgPGyi/ohrNSVm9ACx/6WBDDdeA== X-Received: by 2002:a5d:47aa:: with SMTP id 10mr45720843wrb.50.1636960094548; Sun, 14 Nov 2021 23:08:14 -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 d6sm13301079wrx.60.2021.11.14.23.08.13 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 14 Nov 2021 23:08:14 -0800 (PST) From: Sergio Paracuellos To: linux-pci@vger.kernel.org Cc: linux-mips@vger.kernel.org, tsbogend@alpha.franken.de, john@phrozen.org, lorenzo.pieralisi@arm.com, bhelgaas@google.com, arnd@arndb.de, linux-kernel@vger.kernel.org, kernel test robot Subject: [PATCH 3/5] PCI: mt7621: avoid custom MIPS code in driver code Date: Mon, 15 Nov 2021 08:08:07 +0100 Message-Id: <20211115070809.15529-4-sergio.paracuellos@gmail.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211115070809.15529-1-sergio.paracuellos@gmail.com> References: <20211115070809.15529-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 changes there is also no need to add any MIPS specific includes to avoid some errors reported by Kernet Tets 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 b60dfb45ef7b..9cf541f5de9c 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 Mon Nov 15 07:08:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sergio Paracuellos X-Patchwork-Id: 12618785 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3B9B8C433FE for ; Mon, 15 Nov 2021 07:08:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2920961C32 for ; Mon, 15 Nov 2021 07:08:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230395AbhKOHLr (ORCPT ); Mon, 15 Nov 2021 02:11:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39314 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230111AbhKOHLN (ORCPT ); Mon, 15 Nov 2021 02:11:13 -0500 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3649DC061200; Sun, 14 Nov 2021 23:08:17 -0800 (PST) Received: by mail-wr1-x42d.google.com with SMTP id a9so2373665wrr.8; Sun, 14 Nov 2021 23:08:17 -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=3ANGiNP5p9JTK/GJaWthHiw2NR1mnyYlmnBjAbXXOWc=; b=ZYh5gng6qA1mldCFf8+WAla4FSnHHhrjLScNwkaIq06tUttGj3t8nmNyOB4HnN/oT6 RucPL/c3+T8giwO79oW2Re3LAqQKCAGjKARwBXE+idRj1Zi0odU8Xi8NyzdGZ8m8KY0h xNHoWDI8W9BOGNhmjOitJhs9Y3vebkte/32idyWiS5hbYQi+pMNVo8JLFstPsWscz4wI tjrl4TtHu0Vu9MeByC5ONu7cC7f4H/b4cIepLcW4ixy4nRLwT5eTcGyqpd7ZvJ/ixVv/ 8KLUd7P7YKsK3likFsuFkxc2KTtnAPb/oplIo2DvjJOoviP8sBcLcLJTWYV9fPwMeVi6 pc2g== 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=3ANGiNP5p9JTK/GJaWthHiw2NR1mnyYlmnBjAbXXOWc=; b=aMMkvqbAMFFX9ugxUdLdSwzW7zsOKtQtMUoNa3x4CvjoHWQ9dETqu9x5mn0jgSuCjR Ll1vDCM5z0HPccwso4mdpikWeXTaoNpGTiLjUsj1+aN6SQ0MLXWmU1pqn/Rl8ZOimEl4 xJ7xf9hBI27K9weky8eR4knZ/JsKAXfTTX8C65j2HUo/bFDdc3RQ7j+4zpybpSiSMOVj PlEo3dDEt7nXHlqHMUm2g4kkRr165dSpa7afHre6rGF5MNM5NvokKCNh9fHLcKTx4uLG 3Y0rkw7yIoDnMD7uSDX3+tzPeQXRyDaII/zpNlEP5OKIW4V8bIRaXwchhFrsbTDKLQJQ tTXQ== X-Gm-Message-State: AOAM5316ygVPzHgUgTIUWa7aAO8YFBZyVAAR3tU3HAqmZ9vMfKYnjD6D dOHh4diSVjMwhkeulqSkve4pePmhXDY= X-Google-Smtp-Source: ABdhPJzuz6FLWMxMp5cLt5GjNJN3Ev8LovJ1RWfT5513h2yOzAnLIk5iWLV0c+vbIz7m/8UfJ8EYhA== X-Received: by 2002:a05:6000:181:: with SMTP id p1mr44792515wrx.292.1636960095584; Sun, 14 Nov 2021 23:08:15 -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 d6sm13301079wrx.60.2021.11.14.23.08.14 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 14 Nov 2021 23:08:15 -0800 (PST) From: Sergio Paracuellos To: linux-pci@vger.kernel.org Cc: linux-mips@vger.kernel.org, tsbogend@alpha.franken.de, john@phrozen.org, lorenzo.pieralisi@arm.com, bhelgaas@google.com, arnd@arndb.de, linux-kernel@vger.kernel.org, Yanteng Si Subject: [PATCH 4/5] PCI: mt7621: Add missing 'MODULE_LICENSE()' definition Date: Mon, 15 Nov 2021 08:08:08 +0100 Message-Id: <20211115070809.15529-5-sergio.paracuellos@gmail.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211115070809.15529-1-sergio.paracuellos@gmail.com> References: <20211115070809.15529-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") Signed-off-by: Yanteng Si Signed-off-by: Sergio Paracuellos Reviewed-by: Krzysztof WilczyƄski --- 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 9cf541f5de9c..a120a61ede07 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 Mon Nov 15 07:08:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergio Paracuellos X-Patchwork-Id: 12618787 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 99F61C433EF for ; Mon, 15 Nov 2021 07:08:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 877C863218 for ; Mon, 15 Nov 2021 07:08:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230462AbhKOHLt (ORCPT ); Mon, 15 Nov 2021 02:11:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39350 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229696AbhKOHLX (ORCPT ); Mon, 15 Nov 2021 02:11:23 -0500 Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 427EAC061202; Sun, 14 Nov 2021 23:08:18 -0800 (PST) Received: by mail-wr1-x430.google.com with SMTP id c4so28505624wrd.9; Sun, 14 Nov 2021 23:08:18 -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=FZWiJqomYd+qZWPuxyxTZWhBZhOmR5lNYj163C1SPLk=; b=aMKsGwB9RBYwnkCb4l4QcYCANUPkP43m02za2ZhNNhxGm2j2vXuuCmNwiAMbN5aqzC l830JCZOiMo4RvTSLnubEFU4FvCICIXgZcQw3ZOKoObV69cUm1PF7CmCwTP8nLb7d/pi d6M2WI6Ooj9+7PkOfBVB2jvt06k8uFjU15lmaWoVgbOaSfw5SjPDkRU+2B2JXPcaHzrF kds0I1Y4bthmyD5WT5Q8d4n3Dfcq4PPUbXIH02IbtZFrXYj4duK/+v5uFkg2D/RqEhAp EsbeD4YmwkLOwA31zD5OuIGLUAwSW8C7EbQk3c1IxUYnVnDz17XXgwWE04eYDvf7N/JJ EdAQ== 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=FZWiJqomYd+qZWPuxyxTZWhBZhOmR5lNYj163C1SPLk=; b=oMhS/4K4z5aUrm7m8q6mEDgx6Wfp9PlXToaiXrl8vA54CKJTE8u30JBxsqCZMUOir4 JGLJ5Obel5pYLSlkXBIVdhv8zDJOjETUGAYnPD8to6cwcN+fu6Iux6BDxTT7BMAskClg TZdHS2reUO5z1GduHRusCmZL0/RtIoucr8reO4EiWLZhRzKYuk9v0X1zz4AxuvulDS/l LTwn9kW6MEObgkicJ7C+QpmCq1yEnbKP3X9GR6Fp+/1/suCAI9ADdVb0TS+edRJpKRhQ Es5DMbVWqEe0yoMnfZfJuMSo3+3ugWzXAKRscv8PcRcmW2XCoUiAi6jUR/hA3yHbWxmy kHkw== X-Gm-Message-State: AOAM5314ADI3IjnzARTL/NaAo6cC9ts/GuIXhFgmVJG3VA99srEI1VZQ kLn1rWa/p8kXG4QG6FNw3O0XLfH2+Cg= X-Google-Smtp-Source: ABdhPJwZ5Op7IVXa3DEKLNfbB3npzfNOsOBoYL6LT/2asdQTyjRCMlpxsvsSSHjwMsO/B58mfxfHxg== X-Received: by 2002:a5d:64ea:: with SMTP id g10mr45441284wri.137.1636960096568; Sun, 14 Nov 2021 23:08:16 -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 d6sm13301079wrx.60.2021.11.14.23.08.15 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 14 Nov 2021 23:08:16 -0800 (PST) From: Sergio Paracuellos To: linux-pci@vger.kernel.org Cc: linux-mips@vger.kernel.org, tsbogend@alpha.franken.de, john@phrozen.org, lorenzo.pieralisi@arm.com, bhelgaas@google.com, arnd@arndb.de, linux-kernel@vger.kernel.org Subject: [PATCH 5/5] PCI: mt7621: Kconfig: completely enable driver for 'COMPILE_TEST' Date: Mon, 15 Nov 2021 08:08:09 +0100 Message-Id: <20211115070809.15529-6-sergio.paracuellos@gmail.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211115070809.15529-1-sergio.paracuellos@gmail.com> References: <20211115070809.15529-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 e917bb3652bb..105ec7dcccc9 100644 --- a/drivers/pci/controller/Kconfig +++ b/drivers/pci/controller/Kconfig @@ -332,7 +332,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