From patchwork Wed Oct 28 20:46:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring (Arm)" X-Patchwork-Id: 11863089 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8BB5A697 for ; Wed, 28 Oct 2020 20:47:19 +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 5011424822 for ; Wed, 28 Oct 2020 20:47:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="bsAY2aYu" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5011424822 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-amlogic-bounces+patchwork-linux-amlogic=patchwork.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:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=RWB3tvCSomRkl/18strnB3Px5YFoEFcN4rkFwPhW1O0=; b=bsAY2aYuEK5Erlj4S1iMm2Fkg hYoyVTXLqvO+1KyBhJscu95N1h9lL+cPckyxdqbFlbLx2RhZG2qfz5MNwSzaMSd9FAz3oUfrxdZoD NOkVvrNl3WwuDepMhw+D29YX07UxErem/iCVsO/szLIkYVbcJF+/gP5p8yuLf6Jcw/4MCCktySI5M 40wRjytlEtZLK92tIkcLC6H73FgUiTpwGQjlXuxwuK3mmPMMj7ckYJ2VwzDndgdoX+QvMQ9n0of+X DPCyRU71B6T343x7X5k6us/BVNAsyLxGSifMmF7JL32Ko0FrevPE9gHI1jwGucm6NCbqgdPOcqyvu ePHrplISw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kXsLV-0000cW-Ff; Wed, 28 Oct 2020 20:47:01 +0000 Received: from mail-ot1-f67.google.com ([209.85.210.67]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kXsLP-0000Zi-AQ for linux-amlogic@lists.infradead.org; Wed, 28 Oct 2020 20:46:56 +0000 Received: by mail-ot1-f67.google.com with SMTP id k3so427602otp.1 for ; Wed, 28 Oct 2020 13:46:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ZQyia8yFxJFo/T6o8CYQ5VyHneaAbbvX2dVIUGSCMQQ=; b=WVByk23QGqCjldqYtgf9+QDRFBWe+h7TEouEBIWLeWFdXGxOQbJ6K3tsObRL76yIi3 CZBWL5Fo1uc2O8FJOSc1TZ6/jtnn1bAhN+09WcNd9S/sEZ/wzO1Bg0y4ak04wDOFgkwS BDPeFFPzUEbJkaysPDYpO6tLw6oqwE2yk6GNhWFh+nlyaFMQtwccV8NCOakb+B+3TuBs bZtrBTJk8pTN6SPurjW49PQwOut0S7x68I0XL5szIdoOTDNGOOFOqJi2MB+3/U5F3bP+ Q28nnLIJWtABAKnFAkI/I6NihXfWmQNuR9MBMO7ex7f1omzn9LoXYm4wWEke2dfTrZd5 Bz9A== X-Gm-Message-State: AOAM5305+d9YfpPsWDCeMkba08gS+/QcgPGP4NxfbDeYInGOfl0r0Wns eQ1TzX/NjLz2rUoTxqqD3w== X-Google-Smtp-Source: ABdhPJw2Fi0abZoXS4t0yH9eCkAEgtoxTCLjdD+B6EjQnzh8DitGWJBXxEHGCCo7AWLp1zCE4fxuXQ== X-Received: by 2002:a9d:685a:: with SMTP id c26mr883050oto.40.1603918014866; Wed, 28 Oct 2020 13:46:54 -0700 (PDT) Received: from xps15.herring.priv (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.googlemail.com with ESMTPSA id t17sm116123oor.3.2020.10.28.13.46.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Oct 2020 13:46:54 -0700 (PDT) From: Rob Herring To: Lorenzo Pieralisi Subject: [PATCH 02/13] PCI: dwc/intel-gw: Move ATU offset out of driver match data Date: Wed, 28 Oct 2020 15:46:35 -0500 Message-Id: <20201028204646.356535-3-robh@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201028204646.356535-1-robh@kernel.org> References: <20201028204646.356535-1-robh@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201028_164655_422695_2AC69875 X-CRM114-Status: GOOD ( 15.58 ) X-Spam-Score: 0.8 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.210.67 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.210.67 listed in wl.mailspike.net] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [robherring2[at]gmail.com] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit [robherring2[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kunihiko Hayashi , Neil Armstrong , linux-pci@vger.kernel.org, Binghui Wang , Bjorn Andersson , linux-tegra@vger.kernel.org, Thierry Reding , linux-arm-kernel@axis.com, Thomas Petazzoni , Jonathan Chocron , Shawn Guo , Jonathan Hunter , Fabio Estevam , Jerome Brunet , Jesper Nilsson , linux-samsung-soc@vger.kernel.org, Minghuan Lian , Kevin Hilman , Pratyush Anand , Krzysztof Kozlowski , Kishon Vijay Abraham I , Kukjin Kim , NXP Linux Team , Xiaowei Song , Richard Zhu , Martin Blumenstingl , linux-arm-msm@vger.kernel.org, Sascha Hauer , Yue Wang , Murali Karicheri , Bjorn Helgaas , linux-amlogic@lists.infradead.org, linux-omap@vger.kernel.org, Mingkai Hu , Roy Zang , Masahiro Yamada , Jingoo Han , Andy Gross , Stanimir Varbanov , Pengutronix Kernel Team , Gustavo Pimentel , linuxppc-dev@lists.ozlabs.org, Lucas Stach Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org The ATU offset should be a register range in DT called 'atu', not driver match data. Any future platforms with a different ATU offset should add it to their DT. This is also in preparation to do DBI resource setup in the core DWC code, so let's move setting atu_base later in intel_pcie_rc_setup(). Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas Signed-off-by: Rob Herring --- drivers/pci/controller/dwc/pcie-intel-gw.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/pci/controller/dwc/pcie-intel-gw.c b/drivers/pci/controller/dwc/pcie-intel-gw.c index 5650cb78acba..77ef88333115 100644 --- a/drivers/pci/controller/dwc/pcie-intel-gw.c +++ b/drivers/pci/controller/dwc/pcie-intel-gw.c @@ -58,7 +58,6 @@ struct intel_pcie_soc { unsigned int pcie_ver; - unsigned int pcie_atu_offset; u32 num_viewport; }; @@ -155,11 +154,15 @@ static void intel_pcie_init_n_fts(struct dw_pcie *pci) static void intel_pcie_rc_setup(struct intel_pcie_port *lpp) { + struct dw_pcie *pci = &lpp->pci; + + pci->atu_base = pci->dbi_base + 0xC0000; + intel_pcie_ltssm_disable(lpp); intel_pcie_link_setup(lpp); - intel_pcie_init_n_fts(&lpp->pci); - dw_pcie_setup_rc(&lpp->pci.pp); - dw_pcie_upconfig_setup(&lpp->pci); + intel_pcie_init_n_fts(pci); + dw_pcie_setup_rc(&pci->pp); + dw_pcie_upconfig_setup(pci); } static int intel_pcie_ep_rst_init(struct intel_pcie_port *lpp) @@ -425,7 +428,6 @@ static const struct dw_pcie_host_ops intel_pcie_dw_ops = { static const struct intel_pcie_soc pcie_data = { .pcie_ver = 0x520A, - .pcie_atu_offset = 0xC0000, .num_viewport = 3, }; @@ -461,7 +463,6 @@ static int intel_pcie_probe(struct platform_device *pdev) pci->ops = &intel_pcie_ops; pci->version = data->pcie_ver; - pci->atu_base = pci->dbi_base + data->pcie_atu_offset; pp->ops = &intel_pcie_dw_ops; ret = dw_pcie_host_init(pp);