Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3174812ybi; Fri, 5 Jul 2019 03:10:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqwah+4XqrD9ZTxHgOER+0Kjd5+DoUiKhq9hnTIuAG//bBXT0PmxN9+659VqMlI3Z7XMGcrv X-Received: by 2002:a63:5a4d:: with SMTP id k13mr4361300pgm.174.1562321427947; Fri, 05 Jul 2019 03:10:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562321427; cv=none; d=google.com; s=arc-20160816; b=uHQPcQKP1SptK6tabfwxQ88ZAdy/5ezQVI4Y/PMUUyvs4Mq5nkF2YpAkEwCkhDHKGC FOlSGFV6pm468cPWhJiyjfsdWY1wYtj1QRKoGZowOb6INj4/QN5nE9EydzUxakGJQ/I6 kZKFkUZXSLG48BGS/UuklSWtGAyAaFitgQ7+n+lI1Hcr6mZdy+dGt1MG+uG7M9qPEhLm 4Rua3tmcU2mvgPJ+0qEog/csLadLDiIopPxuZzhJF0IsAu1qF7LAYsfsQlDFAM6RvBix i9ovmWpGueUxaF3MGhJwJ3gWbe5eXy+xb3sZ+MTzbwYcE68BdPAmYZRSTvnoQY83NvQY PbEA== 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=Oziflfcty1mKBENUKu7/r0VapR6jAQAb3mlY52sqX2Q=; b=fwdIWJIO+7HfBCxUs7vG6Y0yUcpt0AhMN448PewNSfAWN4PlXtgi56rDwo54kQC1pW ZU1iLunGmvHgi13YFyAcHJtB3CXFXTp/ki+U9eKuVSBGZ4Gi+x6QIQwho001Ml7Ydkn4 UUptyznTaYFZCEvp3cPYKhm3E8tqA4olTwxTBpDlFckwqBvMHyNP6/vKEzOfnMizn5Le lenTX16BxDO/WL8b8oLSuCN10vYumbRUVMtuXyF71dnkKejfjPw1V7ErdMWlH4xHwxnZ yb7zxOuLOWhz1IljFxRgCY/fJCcx39Bsb5N90TVisP9EDC4nOrhhN+xMolFKgVGTT/kj aHQA== 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 w7si8211632pgr.399.2019.07.05.03.10.12; Fri, 05 Jul 2019 03:10:27 -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 S1728542AbfGEKIL (ORCPT + 99 others); Fri, 5 Jul 2019 06:08:11 -0400 Received: from inva021.nxp.com ([92.121.34.21]:48518 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728389AbfGEKHn (ORCPT ); Fri, 5 Jul 2019 06:07:43 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 5DD3F2006F9; Fri, 5 Jul 2019 12:07:41 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id D4176200706; Fri, 5 Jul 2019 12:07:32 +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 CE81D402C0; Fri, 5 Jul 2019 18:07:22 +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 24/28] PCI: mobiveil: Add upper 32-bit PCI base address setup in inbound window Date: Fri, 5 Jul 2019 17:56:52 +0800 Message-Id: <20190705095656.19191-25-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 current code only setup the lower 32-bit PCI base address in inbound window, it can result in inbound transactions drop on 64-bit platforms. Fixes: 9af6bcb11e12 ("PCI: mobiveil: Add Mobiveil PCIe Host Bridge IP driver") Signed-off-by: Hou Zhiqiang Reviewed-by: Minghuan Lian Reviewed-by: Subrahmanya Lingappa --- V6: - Splited from #9 of v5 patches, no functional change. drivers/pci/controller/pcie-mobiveil.c | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/pci/controller/pcie-mobiveil.c b/drivers/pci/controller/pcie-mobiveil.c index 9382fed..75494f0 100644 --- a/drivers/pci/controller/pcie-mobiveil.c +++ b/drivers/pci/controller/pcie-mobiveil.c @@ -457,7 +457,7 @@ static int mobiveil_pcie_parse_dt(struct mobiveil_pcie *pcie) } static void program_ib_windows(struct mobiveil_pcie *pcie, int win_num, - int pci_addr, u32 type, u64 size) + u64 pci_addr, u32 type, u64 size) { u32 value; u64 size64 = ~(size - 1); @@ -483,8 +483,11 @@ static void program_ib_windows(struct mobiveil_pcie *pcie, int win_num, csr_writel(pcie, pci_addr, PAB_PEX_AMAP_AXI_WIN(win_num)); - csr_writel(pcie, pci_addr, PAB_PEX_AMAP_PEX_WIN_L(win_num)); - csr_writel(pcie, 0, PAB_PEX_AMAP_PEX_WIN_H(win_num)); + csr_writel(pcie, lower_32_bits(pci_addr), + PAB_PEX_AMAP_PEX_WIN_L(win_num)); + csr_writel(pcie, upper_32_bits(pci_addr), + PAB_PEX_AMAP_PEX_WIN_H(win_num)); + pcie->ib_wins_configured++; } -- 1.7.1