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.5 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 08E20C4727F for ; Fri, 25 Sep 2020 09:20:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C3CD9206E5 for ; Fri, 25 Sep 2020 09:20:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727762AbgIYJUN (ORCPT ); Fri, 25 Sep 2020 05:20:13 -0400 Received: from mx.socionext.com ([202.248.49.38]:2721 "EHLO mx.socionext.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727044AbgIYJUM (ORCPT ); Fri, 25 Sep 2020 05:20:12 -0400 X-Greylist: delayed 588 seconds by postgrey-1.27 at vger.kernel.org; Fri, 25 Sep 2020 05:20:11 EDT Received: from unknown (HELO iyokan-ex.css.socionext.com) ([172.31.9.54]) by mx.socionext.com with ESMTP; 25 Sep 2020 18:10:23 +0900 Received: from mail.mfilter.local (m-filter-1 [10.213.24.61]) by iyokan-ex.css.socionext.com (Postfix) with ESMTP id 3E3E860060; Fri, 25 Sep 2020 18:10:23 +0900 (JST) Received: from 172.31.9.51 (172.31.9.51) by m-FILTER with ESMTP; Fri, 25 Sep 2020 18:10:23 +0900 Received: from yuzu.css.socionext.com (yuzu [172.31.8.45]) by kinkan.css.socionext.com (Postfix) with ESMTP id B546F1A0508; Fri, 25 Sep 2020 18:10:22 +0900 (JST) Received: from [10.212.5.245] (unknown [10.212.5.245]) by yuzu.css.socionext.com (Postfix) with ESMTP id 25612120447; Fri, 25 Sep 2020 18:10:22 +0900 (JST) Subject: Re: [PATCH 2/3] PCI: dwc: Add common iATU register support To: Rob Herring Cc: Bjorn Helgaas , Lorenzo Pieralisi , Jingoo Han , Gustavo Pimentel , Murali Karicheri , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.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> From: Kunihiko Hayashi Message-ID: Date: Fri, 25 Sep 2020 18:10:21 +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: <20200923155700.GA820801@bogus> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? Thank you, --- Best Regards Kunihiko Hayashi