From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.4 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7C84CC4727F for ; Mon, 28 Sep 2020 00:55:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 43AEF239EB for ; Mon, 28 Sep 2020 00:55:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726466AbgI1Azy (ORCPT ); Sun, 27 Sep 2020 20:55:54 -0400 Received: from mx.socionext.com ([202.248.49.38]:27379 "EHLO mx.socionext.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726393AbgI1Azy (ORCPT ); Sun, 27 Sep 2020 20:55:54 -0400 Received: from unknown (HELO kinkan-ex.css.socionext.com) ([172.31.9.52]) by mx.socionext.com with ESMTP; 28 Sep 2020 09:55:52 +0900 Received: from mail.mfilter.local (m-filter-1 [10.213.24.61]) by kinkan-ex.css.socionext.com (Postfix) with ESMTP id 7A036180BE1; Mon, 28 Sep 2020 09:55:52 +0900 (JST) Received: from 172.31.9.53 (172.31.9.53) by m-FILTER with ESMTP; Mon, 28 Sep 2020 09:55:52 +0900 Received: from yuzu.css.socionext.com (yuzu [172.31.8.45]) by iyokan.css.socionext.com (Postfix) with ESMTP id 47B9B4035E; Mon, 28 Sep 2020 09:55:52 +0900 (JST) Received: from [10.212.1.203] (unknown [10.212.1.203]) by yuzu.css.socionext.com (Postfix) with ESMTP id 9345C120B9F; Mon, 28 Sep 2020 09:55:51 +0900 (JST) Subject: Re: [PATCH 2/3] PCI: dwc: Add common iATU register support From: Kunihiko Hayashi To: Rob Herring Cc: devicetree@vger.kernel.org, Lorenzo Pieralisi , Jingoo Han , linux-kernel@vger.kernel.org, Murali Karicheri , linux-pci@vger.kernel.org, Bjorn Helgaas , Gustavo Pimentel , linux-arm-kernel@lists.infradead.org References: <1599814203-14441-1-git-send-email-hayashi.kunihiko@socionext.com> <1599814203-14441-3-git-send-email-hayashi.kunihiko@socionext.com> <20200923155700.GA820801@bogus> Message-ID: Date: Mon, 28 Sep 2020 09:55:51 +0900 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On 2020/09/25 18:10, Kunihiko Hayashi wrote: > Hi Rob, > > On 2020/09/24 0:57, Rob Herring wrote: >> On Fri, Sep 11, 2020 at 05:50:02PM +0900, Kunihiko Hayashi wrote: >>> This gets iATU register area from reg property that has reg-names "atu". >>> 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. >>> >>> Cc: Murali Karicheri >>> Cc: Jingoo Han >>> Cc: Gustavo Pimentel >>> Suggested-by: Rob Herring >>> Signed-off-by: Kunihiko Hayashi >>> --- >>>   drivers/pci/controller/dwc/pcie-designware.c | 8 +++++++- >>>   1 file changed, 7 insertions(+), 1 deletion(-) >>> >>> diff --git a/drivers/pci/controller/dwc/pcie-designware.c b/drivers/pci/controller/dwc/pcie-designware.c >>> index 4d105ef..4a360bc 100644 >>> --- a/drivers/pci/controller/dwc/pcie-designware.c >>> +++ b/drivers/pci/controller/dwc/pcie-designware.c >>> @@ -10,6 +10,7 @@ >>>   #include >>>   #include >>> +#include >>>   #include >>>   #include "../../pci.h" >>> @@ -526,11 +527,16 @@ void dw_pcie_setup(struct dw_pcie *pci) >>>       u32 val; >>>       struct device *dev = pci->dev; >>>       struct device_node *np = dev->of_node; >>> +    struct platform_device *pdev; >>>       if (pci->version >= 0x480A || (!pci->version && >>>                          dw_pcie_iatu_unroll_enabled(pci))) { >>>           pci->iatu_unroll_enabled = true; >>> -        if (!pci->atu_base) >>> +        pdev = of_find_device_by_node(np); >> >> Use to_platform_device(dev) instead. Put that at the beginning as I'm >> going to move 'dbi' in here too. > > Okay, I'll rewrite it with to_platform_device(dev). > Should I refer somewhere to rebase to your change? It seems there is no dbi patch yet, so I'm going to send v2 in advance for now. I can rebase it if necessary. Thank you, --- Best Regards Kunihiko Hayashi