Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3130681ybi; Thu, 18 Jul 2019 21:37:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqyziNu1+2NbeUcl0mo5Opoy31MZG8nDJqM95Wbez/0yvqucvgxSvJrx3iOcQo94dfw9XAC8 X-Received: by 2002:a63:6ecf:: with SMTP id j198mr51407830pgc.437.1563511063406; Thu, 18 Jul 2019 21:37:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563511063; cv=none; d=google.com; s=arc-20160816; b=ygXvzpwLuRmAI00BxU3FE/s/K2f0m15x6cctVLbvEWl10bknqI4gJ/wKxV7gE852RK DOjExPeIJ9XUxO+jQaATAi/fgyTP5YgHak20e8uJBcsSYvzTqocfdkACBWpgezU2n+m5 DT3uzSfPwTFjxW2n2o7lA2Xh6PMs+8PYsww40Q/30xvI4PypBCDOjfLRTNQzcb+Y6UAO zUA6GmNCTNvFPBQ2shz4639O1wAy5N/HhMTYS8VKRJT6svcSthRxrSUUSVtDJ9470pYu B/4mkyTjb4Sg+iLZZUy7JCI+n2YXYwZ09Pas1+jq1utyth9un0+TKQvUdki/h298wdJ5 0p0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=1hLMec6ivMX0cmQ/Akj/Wd6rrX87KLniqikClBCLuE8=; b=YYbhYxO3glP0EYY2hhVbnbpNGxPGb/0q3+bkCw5lKm6vj+cFyMMnV/5nBo13m0DJCm Vgl2A6QhHKcdWVc2BkKIUQlLQ0laTB17cuHFr7k7zoQ1mXYZHLS01SzDCdU+8d6IIa4+ 8i8RyCdC0pCiMdkzTL3SvqJSu/8fF9OiOoYEemn9IxoT/vgsmqgjjvt9nLV2HSIQnkB8 c8DjlnSL9Ach7R4jEDVrgoLTRLE559nmkQfBDS6KBgDOy52q6zSXjAkJU+1uthh/j2jA I9yDWKCQ6Q6gfU/f8NuNCYO16RWso+qqWqeKjeHm1tjw1+BgmJuDWXdnjSOOWBArgqVh Vu6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=PbMxivhu; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 4si30368173pgo.198.2019.07.18.21.37.28; Thu, 18 Jul 2019 21:37:43 -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=@kernel.org header.s=default header.b=PbMxivhu; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731258AbfGSEgT (ORCPT + 99 others); Fri, 19 Jul 2019 00:36:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:60482 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729131AbfGSEAi (ORCPT ); Fri, 19 Jul 2019 00:00:38 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 37DD221851; Fri, 19 Jul 2019 04:00:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563508837; bh=iIs0O6PDTaQYyp7kEH6su754Y8rJtU3sCvAPMYLFbs0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PbMxivhuENLRZKkYedzizOEIDzkWbhbBpt6cbjP7oMqYetrzoTnthCFTlgZa3mTat 9umfkd0IVwF6hh426ROMEqryc3E6aNcqSYQJEySuOhwvilNS1ldRS4K0BMDYmRhy4U FuY72aA+t7J5jSDASj/Az/qwhmgpKtkASUSsLLec= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Hou Zhiqiang , Lorenzo Pieralisi , Minghuan Lian , Subrahmanya Lingappa , Sasha Levin , linux-pci@vger.kernel.org Subject: [PATCH AUTOSEL 5.2 117/171] PCI: mobiveil: Fix PCI base address in MEM/IO outbound windows Date: Thu, 18 Jul 2019 23:55:48 -0400 Message-Id: <20190719035643.14300-117-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190719035643.14300-1-sashal@kernel.org> References: <20190719035643.14300-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Hou Zhiqiang [ Upstream commit f99536e9d2f55996038158a6559d4254a7cc1693 ] The outbound memory windows PCI base addresses should be taken from the 'ranges' property of DT node to setup MEM/IO outbound windows decoding correctly instead of being hardcoded to zero. Update the code to retrieve the PCI base address for each range and use it to program the outbound windows address decoders Fixes: 9af6bcb11e12 ("PCI: mobiveil: Add Mobiveil PCIe Host Bridge IP driver") Signed-off-by: Hou Zhiqiang Signed-off-by: Lorenzo Pieralisi Reviewed-by: Minghuan Lian Reviewed-by: Subrahmanya Lingappa Signed-off-by: Sasha Levin --- 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/controller/pcie-mobiveil.c index 77052a0712d0..03d697b63e2a 100644 --- a/drivers/pci/controller/pcie-mobiveil.c +++ b/drivers/pci/controller/pcie-mobiveil.c @@ -552,8 +552,9 @@ static int mobiveil_host_init(struct mobiveil_pcie *pcie) if (type) { /* 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)); } } -- 2.20.1