Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp41231pxa; Fri, 21 Aug 2020 00:06:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw5/k5u9KjdhPhtr4/JlKqDXiBeNm6u+iTUxAvQgGoEhhmGrb48wrSopiDR+ATuGHXxXxZQ X-Received: by 2002:a17:907:204e:: with SMTP id pg14mr1634276ejb.324.1597993611285; Fri, 21 Aug 2020 00:06:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597993611; cv=none; d=google.com; s=arc-20160816; b=Uxx70eltPeAAoKC7vGcMmKM3X0HmXjnQ7Vf0tZRFgjURxQCaOjGyCVwb44ksXnxEuC 32k9zWKF223P6iPg3waWoOdSjNNzvkcNaQMJ72Rg1lVKpnda1l1nHPQA4JmL9UoGyHi8 6DUQQjIgyjdKj0NeDa7aW1z7xFy/YOvmkaa+Fe5JGQdn0YLhh6RQrppDcTp6iOG0H09o Y6N1/arj1pR8t/2w4uOwottmqhFRkSt1KnK27s6CQIs/gVQeqPNRqhQI5pKxh9j74Aqy m/ZA22pCpLABRbzI+99+qXeABZ7cH9qSXVgElwv4SUZn29QGfuMssG2cbAWYntHj7vkT i/Yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=iWcKU1aq0rF+rsObyISpcmQvaHCIlb+VZ7Nm053Eg48=; b=d2OevzEysv+RODXz76tTuaGeBDvMABRXgNLT8YzWbO2tIfurEoadIFOf+URJbCW9p1 /X0c7W9GUL6B+IZfj59IAsDs7zjKrcit7ruuG7wCU6kP9ZSCXEk4+naZeEvl6sTRzsLQ MgtRTFxwfxzumtGNWolg0qUykrWpx1z3hf9GkUP9LHmUlgdy8gxM/I1R47M83QT9Caay 4kK/7HkgACc3H6pLQThkoxyGvUlkGm8sio/yWghkvvFdZrIdA0Bp8DcjezsXfR7zAYvB Xd8Of3OBheewRmJRQKcXvnGOy2Q/jTNkHfJeGiGgzk0vqQBtB2LOKHzf6d2msr9JSCMf I7fg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j13si589971ejv.205.2020.08.21.00.06.27; Fri, 21 Aug 2020 00:06:51 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727887AbgHUHFW (ORCPT + 99 others); Fri, 21 Aug 2020 03:05:22 -0400 Received: from mx.socionext.com ([202.248.49.38]:41769 "EHLO mx.socionext.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726548AbgHUHFT (ORCPT ); Fri, 21 Aug 2020 03:05:19 -0400 Received: from unknown (HELO kinkan-ex.css.socionext.com) ([172.31.9.52]) by mx.socionext.com with ESMTP; 21 Aug 2020 16:05:16 +0900 Received: from mail.mfilter.local (m-filter-1 [10.213.24.61]) by kinkan-ex.css.socionext.com (Postfix) with ESMTP id E271C18006E; Fri, 21 Aug 2020 16:05:17 +0900 (JST) Received: from 172.31.9.53 (172.31.9.53) by m-FILTER with ESMTP; Fri, 21 Aug 2020 16:05:17 +0900 Received: from yuzu.css.socionext.com (yuzu [172.31.8.45]) by iyokan.css.socionext.com (Postfix) with ESMTP id BF6A14036B; Fri, 21 Aug 2020 16:05:17 +0900 (JST) Received: from [10.212.1.43] (unknown [10.212.1.43]) by yuzu.css.socionext.com (Postfix) with ESMTP id 2F351120137; Fri, 21 Aug 2020 16:05:17 +0900 (JST) Subject: Re: [PATCH v6 5/6] PCI: uniphier: Add iATU register support To: Rob Herring Cc: Lorenzo Pieralisi , Bjorn Helgaas , Jingoo Han , Gustavo Pimentel , Masahiro Yamada , Marc Zyngier , PCI , devicetree@vger.kernel.org, "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , "linux-kernel@vger.kernel.org" , Masami Hiramatsu , Jassi Brar References: <1596795922-705-1-git-send-email-hayashi.kunihiko@socionext.com> <1596795922-705-6-git-send-email-hayashi.kunihiko@socionext.com> From: Kunihiko Hayashi Message-ID: Date: Fri, 21 Aug 2020 16:05:16 +0900 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020/08/18 1:48, Rob Herring wrote: > On Fri, Aug 7, 2020 at 4:25 AM Kunihiko Hayashi > wrote: >> >> This gets iATU register area from reg property. In Synopsys DWC version >> 4.80 or later, since iATU register area is separated from core register >> area, this area is necessary to get from DT independently. >> >> Signed-off-by: Kunihiko Hayashi >> --- >> drivers/pci/controller/dwc/pcie-uniphier.c | 5 +++++ >> 1 file changed, 5 insertions(+) >> >> diff --git a/drivers/pci/controller/dwc/pcie-uniphier.c b/drivers/pci/controller/dwc/pcie-uniphier.c >> index 55a7166..93ef608 100644 >> --- a/drivers/pci/controller/dwc/pcie-uniphier.c >> +++ b/drivers/pci/controller/dwc/pcie-uniphier.c >> @@ -471,6 +471,11 @@ static int uniphier_pcie_probe(struct platform_device *pdev) >> if (IS_ERR(priv->pci.dbi_base)) >> return PTR_ERR(priv->pci.dbi_base); >> >> + priv->pci.atu_base = >> + devm_platform_ioremap_resource_byname(pdev, "atu"); >> + if (IS_ERR(priv->pci.atu_base)) >> + priv->pci.atu_base = NULL; > > Keystone has the same 'atu' resource setup. Please move its code to > the DW core and use that. There are some platforms that pci.atu_base is set by other way. The 'atu' code shouldn't be conflicted with the following existing code. drivers/pci/controller/dwc/pci-keystone.c: atu_base = devm_platform_ioremap_resource_byname(pdev, "atu"); drivers/pci/controller/dwc/pci-keystone.c: pci->atu_base = atu_base; drivers/pci/controller/dwc/pcie-designware.c: pci->atu_base = pci->dbi_base + DEFAULT_DBI_ATU_OFFSET; drivers/pci/controller/dwc/pcie-intel-gw.c: pci->atu_base = pci->dbi_base + data->pcie_atu_offset; drivers/pci/controller/dwc/pcie-tegra194.c: pci->atu_base = devm_ioremap_resource(dev, atu_dma_res); So I'm not sure where to move the code in the DW core. Is there any idea? Thank you, --- Best Regards Kunihiko Hayashi