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.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 7C8D9C2D0A8 for ; Wed, 23 Sep 2020 15:58:34 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 27CB120897 for ; Wed, 23 Sep 2020 15:58:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="2FYqjV+b" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 27CB120897 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=eRDDsGAHy3Z6EV+0+c1LafAdcluc4m9fWP08YC+8q1k=; b=2FYqjV+bYPPv8pox4ik/7jau1 7xMB+ATb20DX7CAkS5yoptsmO9YCQiKnVRKPpH89NJXEMsFTBmJp1CvyuQRKna0DEesOtGVEn81PE xrLbLnnqAjliydT8mjLeLZqLnwgdZ8/z7dQLfgO9lotqZ/JqQchBJHUCjkoVBVPr9eXnobi+odGTK G9l8OfYlsfeN6IPWkjH7jeJ3j/JIb/EXySmAxiak0qwBQlmR3ny034I843wGsAZeAL9K/dkw/MZQy AvZpezXeuTqfDtA66jyjgchoWwXmOIvKbCdm1EWx38PCSwvMT7VDkn0oDNYEYWnBN43TWU9+xTXb4 nAKWtc/AQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kL78m-0007z8-D1; Wed, 23 Sep 2020 15:57:08 +0000 Received: from mail-il1-f194.google.com ([209.85.166.194]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kL78i-0007x7-AT for linux-arm-kernel@lists.infradead.org; Wed, 23 Sep 2020 15:57:05 +0000 Received: by mail-il1-f194.google.com with SMTP id q5so117466ilj.1 for ; Wed, 23 Sep 2020 08:57:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=hprSGRETocdQf78XETYgy258w0hwpUnZV3tfOx1jhyw=; b=ZC2ySutMXhpRzQMvZTYSZOMCLjddeHqK9y6pdXKWrVDrRRj/HIAt9FbsJA+Cu8dihI BnZUDpTrWgTcLhObpM0GnB1f2CTD2eA6PqDJ5fP66Z3e5Lg8ilS3GJxD5hQ8YQSvinfO Yz7+BU2Nr4kDgAIsGdvpsdiNDDUT5qdJUvuzzSdGJz/DXVdlDQ9HDwU7yOb205LEpNe6 vrGUq/jETIQ82WSFDeu9Z3z6yiK+mrHFLuYMOKFqs4NcELr28fjryDqotV6kVoGJ2rI7 pCJhX1fLDObpBXN9igmbSwbsHoFQU8X5t0qSirx4gphHXgPXdC98QgQEZ+2v0YVN/B65 n+tw== X-Gm-Message-State: AOAM531s6DYFxrTqWRpu3pX1sm1ukdMIyLGuaq4kFWAlhs950z+o0fJM C9h1ra2JJG7o3r5j2VRXsg== X-Google-Smtp-Source: ABdhPJwF7cW7wtVVPFcinJZJ2wi7GujCzMGUvUKlTAUpRG7xH9KI47JiB3sor9fbqqkTDEEEDRoQKQ== X-Received: by 2002:a92:d8cb:: with SMTP id l11mr371869ilo.271.1600876622055; Wed, 23 Sep 2020 08:57:02 -0700 (PDT) Received: from xps15 ([64.188.179.253]) by smtp.gmail.com with ESMTPSA id p5sm18530ilg.32.2020.09.23.08.57.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Sep 2020 08:57:01 -0700 (PDT) Received: (nullmailer pid 825904 invoked by uid 1000); Wed, 23 Sep 2020 15:57:00 -0000 Date: Wed, 23 Sep 2020 09:57:00 -0600 From: Rob Herring To: Kunihiko Hayashi Subject: Re: [PATCH 2/3] PCI: dwc: Add common iATU register support Message-ID: <20200923155700.GA820801@bogus> References: <1599814203-14441-1-git-send-email-hayashi.kunihiko@socionext.com> <1599814203-14441-3-git-send-email-hayashi.kunihiko@socionext.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1599814203-14441-3-git-send-email-hayashi.kunihiko@socionext.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200923_115704_397946_D89C10A5 X-CRM114-Status: GOOD ( 20.31 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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. > + if (!pci->atu_base && pdev) > + pci->atu_base = > + devm_platform_ioremap_resource_byname(pdev, "atu"); > + if (IS_ERR_OR_NULL(pci->atu_base)) > pci->atu_base = pci->dbi_base + DEFAULT_DBI_ATU_OFFSET; > } > dev_dbg(pci->dev, "iATU unroll: %s\n", pci->iatu_unroll_enabled ? > -- > 2.7.4 > > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel