Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3174911ybi; Fri, 5 Jul 2019 03:10:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqy7AvcfYee1tscoUnxLTlnVpVoWmpIbc0Dx7cSkW05JhMJcEnCh4P++4D6vY5p5c8KFanbS X-Received: by 2002:a17:90a:8c06:: with SMTP id a6mr4481038pjo.45.1562321434214; Fri, 05 Jul 2019 03:10:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562321434; cv=none; d=google.com; s=arc-20160816; b=XuOHWgCwVAztHAuqbliSThVXvlsQkbYh3ESUJG+eqCpJmvwkLMuVSlO7AJB86uz38P 5GU+vUWzZf0km3I6tIEeJqiVp+C0yx6TLNoQ8GzP69rJd5MNNKmN/rJKrS514F26fJqc HrbTtm8qQ9snMMnHzIbsY4+RZbebhOcLqj55Ml5lpKtpz4mqkZgBQvEwUfjhXOAZWOfn sUYAknD3BANXEXPFoR+ms3BxE4RzRb2DRpNnIj+Njhm1tlmOFE0CKY4X/4Yt7iIWM6h4 qqdCW+yq+d7ioHDE+j4RYUjnN+5kt73GJJ/jVd8lUR3cjLNZymLlcpizydcELAtTJGgz 8KdA== 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=faqZKqHVPp0Tk/1DLv2CPdWQrsNpQBBUjWduUEJq1qE=; b=0j+9KWi2kEhNk5WUGH95SyZdRW9BUtDbCExQuoimntUX+zPdYG3vKBEqAO+iP0mWFI zKnpM2nrN3fdiqvCL7BxTDXhefIhNcraki66LQCqZgwJ/Q+jL3Ck/ddl7sw2l14hXRLA t7LNtkgqXEgVu3zHGgx4d9fb3uWFFAhH47VnkStgd9vUb8iDx4YTFgMY/AfnXphztkgm vcfFN+r+GvylWJ6v1sqrwNbZvdkteQSJqyUdfAwEMhboZ0QPfP/K7v1uZTE2B0o2zdiK 8j1TBlhHr8p2moO4HRY3i1X+rtCSWXYFEx1jmyaRUo2Rr5pfZbHhQn1OyMWc8h3ugH0Y rC6g== 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 t19si7712434pjr.68.2019.07.05.03.10.19; Fri, 05 Jul 2019 03:10:34 -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 S1728555AbfGEKIR (ORCPT + 99 others); Fri, 5 Jul 2019 06:08:17 -0400 Received: from inva021.nxp.com ([92.121.34.21]:48476 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728369AbfGEKHl (ORCPT ); Fri, 5 Jul 2019 06:07:41 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id C1108200E78; Fri, 5 Jul 2019 12:07:39 +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 41FE5200E86; Fri, 5 Jul 2019 12:07:31 +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 3D63B40305; Fri, 5 Jul 2019 18:07:21 +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 23/28] PCI: mobiveil: Add upper 32-bit CPU base address setup in outbound window Date: Fri, 5 Jul 2019 17:56:51 +0800 Message-Id: <20190705095656.19191-24-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 CPU base address in outbound window, it will result in outbound 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 | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/drivers/pci/controller/pcie-mobiveil.c b/drivers/pci/controller/pcie-mobiveil.c index 4f50fe6..9382fed 100644 --- a/drivers/pci/controller/pcie-mobiveil.c +++ b/drivers/pci/controller/pcie-mobiveil.c @@ -70,6 +70,7 @@ #define PAB_EXT_AXI_AMAP_SIZE(win) PAB_EXT_REG_ADDR(0xbaf0, win) +#define PAB_EXT_AXI_AMAP_AXI_WIN(win) PAB_EXT_REG_ADDR(0x80a0, win) #define PAB_AXI_AMAP_AXI_WIN(win) PAB_REG_ADDR(0x0ba4, win) #define AXI_WINDOW_ALIGN_MASK 3 @@ -518,8 +519,10 @@ static void program_ob_windows(struct mobiveil_pcie *pcie, int win_num, * program AXI window base with appropriate value in * PAB_AXI_AMAP_AXI_WIN0 register */ - csr_writel(pcie, cpu_addr & (~AXI_WINDOW_ALIGN_MASK), + csr_writel(pcie, lower_32_bits(cpu_addr) & (~AXI_WINDOW_ALIGN_MASK), PAB_AXI_AMAP_AXI_WIN(win_num)); + csr_writel(pcie, upper_32_bits(cpu_addr), + PAB_EXT_AXI_AMAP_AXI_WIN(win_num)); csr_writel(pcie, lower_32_bits(pci_addr), PAB_AXI_AMAP_PEX_WIN_L(win_num)); -- 1.7.1