Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3175585ybi; Fri, 5 Jul 2019 03:11:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqwZsNeSfkbDIBd6tyKIwPY7HqcbWaVygzo4MqT3wcirBN7WvTN/TRF8ezJDpX7GG+X1YUbI X-Received: by 2002:a65:4304:: with SMTP id j4mr4543524pgq.419.1562321472474; Fri, 05 Jul 2019 03:11:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562321472; cv=none; d=google.com; s=arc-20160816; b=kMI8753+ZosmUy4/8XE3C1MGWWBCoWLAj3NXpGXAbWd2l2p4z9JxMkeio5pLuQH+vl g5ePn2N+he/mr62ZWa08zTHhjgiCqpzF/UCczv5fAJPLPSDcpca95cY+Q5gj0eVaAlLE oowWXRk/yIpirOPxyn/Z+ESMs160GxdZHuNTViUP2sIn9lPevwZcLF0ayGZEyo645LNV 5CsanOGVVfdoGd1QU/qt3c6HgRD8y6eXYr4Ptlydtqc5vj4bSKLkfKwKq2V+ZBEDVtNk 7HsfxUF3UOBYjHw5Sh4zdKTB3FAMLVPdUYEAfh2BN5s0qX1mZkEipblWqraf/cgMCH7a nfkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=fHVmckQHyhRYFLRMbjJ5ih8DjT3zouYd+/RXKQi/fdU=; b=g6HtUagYkSkOjUUezzyAw3r9utMPpUogv/9YWP1A+kPu/FBsKMEwAgJCI4QDpokU2y ncNOWpq52y1ii+h4JZgr0c4IuMoDh31mwSd8ucZGNh8UkcwhCj62nOmdiGWGM+XmNaUn YMPOSX/OWSMmDWzcv+ytEqMGcCK/cxcryYbSn67jGwMFT/fHUdGlsrR2NK7RpErMPrw9 iEpswnMciM9I//qLh/RliHND1wF+UvFf4JNZFdEE8wQ308GvW754qZMRbSoiczvcGdec F6F3JThwpsWVkjM4/TrCYD6BhqojL71rHvn/v/u5bPO8fhFQC0Fzny3XaVJ4AaaCsGpl MVZA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a8si8191255ple.243.2019.07.05.03.10.57; Fri, 05 Jul 2019 03:11:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728623AbfGEKI6 (ORCPT + 99 others); Fri, 5 Jul 2019 06:08:58 -0400 Received: from inva020.nxp.com ([92.121.34.13]:60850 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728071AbfGEKHR (ORCPT ); Fri, 5 Jul 2019 06:07:17 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 97E951A0EB3; Fri, 5 Jul 2019 12:07:15 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 0A3FD1A0779; Fri, 5 Jul 2019 12:07:07 +0200 (CEST) Received: from titan.ap.freescale.net (TITAN.ap.freescale.net [10.192.208.233]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 9F9D04030F; Fri, 5 Jul 2019 18:06:53 +0800 (SGT) From: Hou Zhiqiang To: linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, bhelgaas@google.com, robh+dt@kernel.org, mark.rutland@arm.com, l.subrahmanya@mobiveil.co.in, shawnguo@kernel.org, leoyang.li@nxp.com, lorenzo.pieralisi@arm.com, catalin.marinas@arm.com, will.deacon@arm.com Cc: Mingkai.Hu@nxp.com, Minghuan.Lian@nxp.com, Xiaowei.Bao@nxp.com, Hou Zhiqiang Subject: [PATCHv6 06/28] PCI: mobiveil: Use the 1st inbound window for MEM inbound transactions Date: Fri, 5 Jul 2019 17:56:34 +0800 Message-Id: <20190705095656.19191-7-Zhiqiang.Hou@nxp.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20190705095656.19191-1-Zhiqiang.Hou@nxp.com> References: <20190705095656.19191-1-Zhiqiang.Hou@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The inbound and outbound windows have completely separate control registers sets in the host controller MMIO space. Windows control register are accessed through an MMIO base address and an offset that depends on the window index. Since inbound and outbound windows control registers are completely separate there is no real need to use different window indexes in the inbound/outbound windows initialization routines to prevent clashing. To fix this inconsistency, change the MEM inbound window index to 0, mirroring the outbound window set-up. Signed-off-by: Hou Zhiqiang [lorenzo.pieralisi@arm.com: update commit log] Signed-off-by: Lorenzo Pieralisi Reviewed-by: Minghuan Lian Reviewed-by: Subrahmanya Lingappa --- V6: - Rebased the patch, no functional change. drivers/pci/controller/pcie-mobiveil.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/pci/controller/pcie-mobiveil.c b/drivers/pci/controller/pcie-mobiveil.c index 0f41c23..8272183 100644 --- a/drivers/pci/controller/pcie-mobiveil.c +++ b/drivers/pci/controller/pcie-mobiveil.c @@ -608,7 +608,7 @@ static int mobiveil_host_init(struct mobiveil_pcie *pcie) CFG_WINDOW_TYPE, resource_size(pcie->ob_io_res)); /* memory inbound translation window */ - program_ib_windows(pcie, WIN_NUM_1, 0, MEM_WINDOW_TYPE, IB_WIN_SIZE); + program_ib_windows(pcie, WIN_NUM_0, 0, MEM_WINDOW_TYPE, IB_WIN_SIZE); /* Get the I/O and memory ranges from DT */ resource_list_for_each_entry(win, &pcie->resources) { -- 1.7.1