Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3814669pxv; Tue, 13 Jul 2021 04:33:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzlIcYGqvY3e1BI809L+KTsoO7LYdwKXlVcbhKEr+cZYg2yLwPe9DzwwOJx+xfQSwPbFhFk X-Received: by 2002:a02:a115:: with SMTP id f21mr3582819jag.3.1626176014367; Tue, 13 Jul 2021 04:33:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626176014; cv=none; d=google.com; s=arc-20160816; b=h/XfuY1j7tmLHQgC1tEhZJWMUfkXsEBHRerhaYNf8JJcYtqcedHDPikexANnammttz eKMSYArjKLweXBN4WAiYrND4hpGT8M0hBkRA0aw51WygsEusUr1wI29ohn+uGwC+gzvo 5+85/IoMcUCSTcbRp4OsEuSeK/YekR8NIA17S2IfmkOsywUX0hfaBIwVSJloouHlxJko o1dSP7LWxWD5xM8zDMJCnRmh14OxN/7PWz3OyR5i27N1wOZOIbHwIQbyTkYaJGGqPo47 f/iqDxhcNqDv4vViBSXnZ+HC038XDx7kWhVVSYWPUzwp9cWKIsQYqbXN3WpGqCB50fAX e60w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:subject:from :references:cc:to:dkim-signature; bh=VxdNMTgC7RTJI/82gSAHHxnwIsTXy+NvVdODaOq4tmU=; b=HIP7pGoITPQs1dfk3BTUIQz5uQsYVw8opqUrLsNTAxplvdFTk9ea6S9TJtXdwX+GxJ b/DJpF2rWptiWKcyqseJJ/Vssr/B5YRjggeD23NFIZqzASToGKJQebAd+Dnsjyx1oyEX cAnz5e9rFLV/MXkDQmg/X1lKT/zgXX23oEFszAonhRNArXjrEq/afzgYE22Ac2CdPF/N hvSD6H8ixsTFnBkrM2va9+XWQbEJ2YdfrnxvYO86YiIMHSjHolWGkv0PCXTq8yUgEkv1 h1wfq0Yi8f55GMqg6HwKk+Z0YdgQjcsGNsSAQE+5Xm97qCE1YngckWjIWVxMMy0X4uDH yukA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=jbrgQaNi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k19si21463837ion.69.2021.07.13.04.33.22; Tue, 13 Jul 2021 04:33:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=jbrgQaNi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235902AbhGMLfW (ORCPT + 99 others); Tue, 13 Jul 2021 07:35:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60240 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235875AbhGMLfV (ORCPT ); Tue, 13 Jul 2021 07:35:21 -0400 Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE252C0613EE; Tue, 13 Jul 2021 04:32:31 -0700 (PDT) Received: by mail-wm1-x332.google.com with SMTP id w13so13399071wmc.3; Tue, 13 Jul 2021 04:32:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:cc:references:from:subject:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=VxdNMTgC7RTJI/82gSAHHxnwIsTXy+NvVdODaOq4tmU=; b=jbrgQaNivHHWkIhys33LFvPyuiYLHxbq70sxVdJgim8ewGwhZtO9FUjdIMTe+omB3s DAxzDDGIqKo0OQ4mC/0OzgOEqLh4pCc3mhTZQ70dyfup1z3oHLB+wvyqZZKTjynnOwUX uNjy5YwuC3Qhe1z6V0DKxCgWr+pJv5vjLLaboqX9Fl1VGs2cX27ipJqIQ0UluoCiMNDm h9sIW5o7je9YRHhbDIcAQoh+Jid5V0oKBpKlgTph0zoL6xzX/+RkXYwPO4s6+XbUXbck alJLAHgki3I65JeyuI0yJ+rbagfm1mc6OZPVt5QCANqVd+IEQxTCzzsFjJdbUnbAjh+G K90w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:cc:references:from:subject:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=VxdNMTgC7RTJI/82gSAHHxnwIsTXy+NvVdODaOq4tmU=; b=b/FW6vu3GX/ddrgwq+B5IH8QTfVkdbTBxTEWNuije76ukAMfckn4amDvviuR7OKiQ6 e9g5EavDsqeKB1vCuyryLJpjQG2MjTdWuALke3ENMRZ8Ev9Jw7H3uQ4k/vw5qWTK6AcX R1ea90A7CxXFFjbA0QPQ0z4O/eaigAnobipDik3wHuu9LF4CdyI5szBC5A9lswHqSrOb tO8+ZTnGORC3UIk8Tize525zWDSg/o9giZXjUkYQ5fRF68JF6Mj5/NMfxBkWaWDilMuk Q9e4emvHN5R6P+fBsLUsW1Xnur8Va5fvxAmQAQHSQXLObeOD1knfzsRLylTAibUjbRB9 wt0w== X-Gm-Message-State: AOAM5321p1t1pTJLzI3hzuCbQ5vTl5wdg6pNJHI9sJ3mac11QJwo+srn rWDpBuhGJC8o8n0p69zNVA87Fyt9DnWyUQ== X-Received: by 2002:a7b:c042:: with SMTP id u2mr4495286wmc.86.1626175950253; Tue, 13 Jul 2021 04:32:30 -0700 (PDT) Received: from ziggy.stardust ([213.195.127.100]) by smtp.gmail.com with ESMTPSA id r16sm2056532wmg.11.2021.07.13.04.32.29 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 13 Jul 2021 04:32:29 -0700 (PDT) To: Chuanjia Liu , lorenzo.pieralisi@arm.com, robh+dt@kernel.org, bhelgaas@google.com Cc: ryder.lee@mediatek.com, jianjun.wang@mediatek.com, yong.wu@mediatek.com, linux-pci@vger.kernel.org, linux-mediatek@lists.infradead.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20210611060902.12418-1-chuanjia.liu@mediatek.com> <20210611060902.12418-3-chuanjia.liu@mediatek.com> From: Matthias Brugger Subject: Re: [PATCH v10 2/4] PCI: mediatek: Add new method to get shared pcie-cfg base address and parse node Message-ID: Date: Tue, 13 Jul 2021 13:32:28 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.2 MIME-Version: 1.0 In-Reply-To: <20210611060902.12418-3-chuanjia.liu@mediatek.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/06/2021 08:09, Chuanjia Liu wrote: > For the new dts format, add a new method to get > shared pcie-cfg base address and parse node. > > Signed-off-by: Chuanjia Liu > Acked-by: Ryder Lee You missed the Reviewed-by: Rob Herring given in v8. Or were there any substantial changes in this patch? > --- > drivers/pci/controller/pcie-mediatek.c | 52 +++++++++++++++++++------- > 1 file changed, 39 insertions(+), 13 deletions(-) > > diff --git a/drivers/pci/controller/pcie-mediatek.c b/drivers/pci/controller/pcie-mediatek.c > index 62a042e75d9a..950f577a2f44 100644 > --- a/drivers/pci/controller/pcie-mediatek.c > +++ b/drivers/pci/controller/pcie-mediatek.c > @@ -14,6 +14,7 @@ > #include > #include > #include > +#include > #include > #include > #include > @@ -23,6 +24,7 @@ > #include > #include > #include > +#include > #include > > #include "../pci.h" > @@ -207,6 +209,7 @@ struct mtk_pcie_port { > * struct mtk_pcie - PCIe host information > * @dev: pointer to PCIe device > * @base: IO mapped register base > + * @cfg: IO mapped register map for PCIe config > * @free_ck: free-run reference clock > * @mem: non-prefetchable memory resource > * @ports: pointer to PCIe port information > @@ -215,6 +218,7 @@ struct mtk_pcie_port { > struct mtk_pcie { > struct device *dev; > void __iomem *base; > + struct regmap *cfg; > struct clk *free_ck; > > struct list_head ports; > @@ -650,7 +654,11 @@ static int mtk_pcie_setup_irq(struct mtk_pcie_port *port, > return err; > } > > - port->irq = platform_get_irq(pdev, port->slot); > + if (of_find_property(dev->of_node, "interrupt-names", NULL)) > + port->irq = platform_get_irq_byname(pdev, "pcie_irq"); > + else > + port->irq = platform_get_irq(pdev, port->slot); > + Do I understand that this is used for backwards compatibility with older DTS? I just wonder why we don't need to mandate interrupt-names = "pcie_irq" in the binding description. Regards, Matthias