Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp925947imc; Mon, 11 Mar 2019 02:33:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqw6RliE5QXrgYzg5aD9UP3kFqJltsFr5owe7g2QrziOnYmouhTYzwF+ma/bttJ9qvkfn8h+ X-Received: by 2002:a62:404:: with SMTP id 4mr31688029pfe.131.1552296827508; Mon, 11 Mar 2019 02:33:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552296827; cv=none; d=google.com; s=arc-20160816; b=aNi0SRRaXdxVnh5u/PATlVwo0ENhoJFvItnzkg1J2H82cBlNN3BYggSeTYr0kb3d61 qhXI8/YB8Mp4p9AeZtMApsFCxtGl1DSJMTV2qxo0kQC3I0CNuy2ojH+JDdtgBA5YP038 HEJGdHHdaBXX+lCxERIaJzZGugGJiEY1619YLb+BGzJicsvh4ntzCpHaMARDs77pJUk3 SHuOgCE52epWzN/snB/kYZndsxLgOSkdGyTkUctR8Tx4zau0kbVFGnKEaUn9o9GgB8n8 hxug7jNUhtVESzRO1k9AVGxAk72apQ/wBNau1jFAnkMoe1sIlku0Z+WiGhxUOr9+DyBR 4dCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=uJ1q3GbR4n8QaufXG6OpX4LbKDQTbtgJA7yjeAiVFB4=; b=z+Sv2yVxWKNkPCMMJWqioPoMAa1+NFmLPqDljIK5wi/SwIsyoL4R8JRjI4otm7gJPP gk2RqIKnboTEb/5He/LFFQ12WnJcWozKeLMyj2neeDOBDLgN77HKlHt7ngm/CMRPpIA+ JhvwCekVJnIIO6qdGRKipid0ecDawrJNv/PW5aAOcZ79oMmYQZpeS+C1Eg6fxzNA4+Sx DTaXPpTYFujS4vFR+B6Y7iV1YBrjjY9PLLXqOmEpUfOFgDBmB0r4IuFAEoboFYGawhPd dAKsRE4QR4ERZ+8y+FuKlnDkYfOhqcvrHvX17gncQTxC1Y6G84E7ZNbx8AJXe4Mva6Zx QX3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector1 header.b=hFcXS1l5; 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=pass (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 p10si4896551plk.413.2019.03.11.02.33.31; Mon, 11 Mar 2019 02:33:47 -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; dkim=pass header.i=@nxp.com header.s=selector1 header.b=hFcXS1l5; 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=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727328AbfCKJbZ (ORCPT + 99 others); Mon, 11 Mar 2019 05:31:25 -0400 Received: from mail-eopbgr70073.outbound.protection.outlook.com ([40.107.7.73]:62976 "EHLO EUR04-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727195AbfCKJbV (ORCPT ); Mon, 11 Mar 2019 05:31:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=uJ1q3GbR4n8QaufXG6OpX4LbKDQTbtgJA7yjeAiVFB4=; b=hFcXS1l5UXKZw5VZ1tCH5EWpLe5mrfUqoBnXM9rUi0pQ7iNOl/vuL7r6eOx9fmf+YFf/+eiaSgAOKroTamnmSCEH/Ur+ck9J2ExCoSBEsk9cX83PuT6cKnhnGzV70vwK+kEEOzUSu2NLQszmUv9+vL+yuNBMJX3HKjyd7Gm/+Qs= Received: from AM6PR04MB5781.eurprd04.prod.outlook.com (20.179.3.19) by AM6PR04MB6566.eurprd04.prod.outlook.com (20.179.246.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1686.16; Mon, 11 Mar 2019 09:30:35 +0000 Received: from AM6PR04MB5781.eurprd04.prod.outlook.com ([fe80::30cc:e034:1f7a:2cc7]) by AM6PR04MB5781.eurprd04.prod.outlook.com ([fe80::30cc:e034:1f7a:2cc7%2]) with mapi id 15.20.1686.021; Mon, 11 Mar 2019 09:30:35 +0000 From: "Z.q. Hou" 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" , Leo Li , "lorenzo.pieralisi@arm.com" , "catalin.marinas@arm.com" , "will.deacon@arm.com" CC: Mingkai Hu , "M.h. Lian" , Xiaowei Bao , "Z.q. Hou" Subject: [PATCHv4 05/28] PCI: mobiveil: correct PCI base address in MEM/IO outbound windows Thread-Topic: [PATCHv4 05/28] PCI: mobiveil: correct PCI base address in MEM/IO outbound windows Thread-Index: AQHU1+0UhvVjXnV0a0msw3SU+FqU/Q== Date: Mon, 11 Mar 2019 09:30:35 +0000 Message-ID: <20190311093130.7209-6-Zhiqiang.Hou@nxp.com> References: <20190311093130.7209-1-Zhiqiang.Hou@nxp.com> In-Reply-To: <20190311093130.7209-1-Zhiqiang.Hou@nxp.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: HK0PR03CA0015.apcprd03.prod.outlook.com (2603:1096:203:2e::27) To AM6PR04MB5781.eurprd04.prod.outlook.com (2603:10a6:20b:ad::19) authentication-results: spf=none (sender IP is ) smtp.mailfrom=zhiqiang.hou@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.17.1 x-originating-ip: [119.31.174.73] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 705a598e-b6e5-4c70-947b-08d6a60436bf x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(4618075)(2017052603328)(7153060)(7193020);SRVR:AM6PR04MB6566; x-ms-traffictypediagnostic: AM6PR04MB6566: x-microsoft-exchange-diagnostics: =?iso-8859-1?Q?1;AM6PR04MB6566;23:2t+pDpXVcOPimXRfzj2wvoa6X60OD7wCdl/TDj+?= =?iso-8859-1?Q?33bAqIdUP34woQ1vYQUNLbfZN6/uLAKk5Jom0x0hnw4n/6O4m/B4oufs+F?= =?iso-8859-1?Q?Y3g3JcGeCT6gI+y80dQtO013MbG6egkNOP9xNTedJtlXGn5Dc2JjsNn/BQ?= =?iso-8859-1?Q?wTgJgZcFphTe8TMIxpPy0R8vaAmGffw2P7HTduTTDwv58QnbLdKLCCswiD?= =?iso-8859-1?Q?SpCUR42W1ueCsVXjw1VHeuU4ts/I+nDijLDgZ11H7CV3dpq+f970F46OU9?= =?iso-8859-1?Q?yXWm20LSMbgFb6asUnSkBuQIbiF17IKvkkTOlwKMzeDVRChsnWk3CGt70M?= =?iso-8859-1?Q?IHxvPEjycxTLNEO96/SJgx002rPlKTMLmcJv21TejO4wbRRkGNs1z+dXUE?= =?iso-8859-1?Q?BcOCRog/q1j/VKZ/YTp6Te7Lf1QSE/QNb46HOcOAQUpSViReQzvTxTPV6P?= =?iso-8859-1?Q?qB+b/3oH8JI1dLC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oft-antispam-prvs: x-forefront-prvs: 09730BD177 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(396003)(366004)(39860400002)(346002)(376002)(136003)(199004)(189003)(6436002)(478600001)(25786009)(99286004)(11346002)(2616005)(476003)(76176011)(3846002)(6116002)(81166006)(81156014)(486006)(71190400001)(71200400001)(2906002)(8676002)(2201001)(5660300002)(97736004)(6486002)(446003)(7416002)(2501003)(86362001)(256004)(14454004)(316002)(68736007)(26005)(8936002)(6512007)(53936002)(1076003)(66066001)(386003)(54906003)(50226002)(110136005)(102836004)(6506007)(36756003)(105586002)(4326008)(106356001)(186003)(305945005)(52116002)(7736002)(921003)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:AM6PR04MB6566;H:AM6PR04MB5781.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: GDIM1JN2MSBNmOQKseEJjhA/zN+Zw5I026PRKIRIu4HL8aXu9tGMDtA2BjUyJn48OAfC05aivYxHvQ5nFee1r/HOoY6vhRPx8Y4IhzOtxsULEG/2d7y0P0Ous4wJSRzrHYO3BtdZIP34uheFMyPCiuB9SNs7JNtt1oHn7YrB7llQ/aFdT0qOraBOVb5pHBVZq6uZmR0zxSWjMGYhTrRW/UqJyt7Xyt6ZF5MALRtCqpqg6eih+A7necKYxjIzKZ8E44OJZAMbi8TWNI+uG+9RTmLGDzyn6ndrotPoc7vUmVkwwJRpPeR8cAZRWlsqPmciBML1lIb+RmJe2mpZlh0IYfC7Q+9kWlRiit2dvH7UTVbPzS1n8sy4Nz4HtwCpc3S5UhbbaHXRcgj9AdFkoo97KQdM5AAZF5QVyeK0gKV2BMo= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 705a598e-b6e5-4c70-947b-08d6a60436bf X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Mar 2019 09:30:35.2692 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR04MB6566 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Hou Zhiqiang It should get PCI base address from the DT node property 'ranges' to setup MEM/IO outbound windows instead of always zero. Fixes: 9af6bcb11e12 ("PCI: mobiveil: Add Mobiveil PCIe Host Bridge IP driver") Signed-off-by: Hou Zhiqiang Reviewed-by: Minghuan Lian Reviewed-by: Subrahmanya Lingappa --- V4: - no change drivers/pci/controller/pcie-mobiveil.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/pci/controller/pcie-mobiveil.c b/drivers/pci/controlle= r/pcie-mobiveil.c index a0dd337c6214..8ff873023b5f 100644 --- a/drivers/pci/controller/pcie-mobiveil.c +++ b/drivers/pci/controller/pcie-mobiveil.c @@ -630,8 +630,9 @@ static int mobiveil_host_init(struct mobiveil_pcie *pci= e) =20 /* configure outbound translation window */ program_ob_windows(pcie, pcie->ob_wins_configured, - win->res->start, 0, type, - resource_size(win->res)); + win->res->start, + win->res->start - win->offset, + type, resource_size(win->res)); } =20 /* setup MSI hardware registers */ --=20 2.17.1