From patchwork Fri Oct 18 20:28:29 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kjetil Oftedal X-Patchwork-Id: 284745 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id B22AA2C0099 for ; Sat, 19 Oct 2013 08:12:21 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752814Ab3JRVMU (ORCPT ); Fri, 18 Oct 2013 17:12:20 -0400 Received: from nmsh1.e.nsc.no ([193.213.121.72]:52373 "EHLO nmsh1.e.nsc.no" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752543Ab3JRVMT (ORCPT ); Fri, 18 Oct 2013 17:12:19 -0400 X-Greylist: delayed 2627 seconds by postgrey-1.27 at vger.kernel.org; Fri, 18 Oct 2013 17:12:19 EDT Received: from 86.227.189.109.customer.cdi.no (86.227.189.109.customer.cdi.no [109.189.227.86]) by nmsh1.nsc.no (8.14.4/8.14.4) with ESMTP id r9IKSTqt023164 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Fri, 18 Oct 2013 22:28:31 +0200 (MEST) Date: Fri, 18 Oct 2013 22:28:29 +0200 (CEST) From: Kjetil Oftedal X-X-Sender: kjetil@oizys.tordivel.org To: sparclinux@vger.kernel.org Subject: [PATCH] sparc: PCI: Fix incorrect address calculation of PCI Bridge windows on Simba-bridges Message-ID: MIME-Version: 1.0 Sender: sparclinux-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: sparclinux@vger.kernel.org The SIMBA APB Bridges lacks the 'ranges' of-property describing the PCI I/O and memory areas located beneath the bridge. Faking this information has been performed by reading range registers in the APB bridge, and calculating the corresponding areas. In commit 01f94c4a6ced476ce69b895426fc29bfc48c69bd ("Fix sabre pci controllers with new probing scheme.") a bug was introduced into this calculation, causing the PCI memory areas to be calculated incorrectly: The shift size was set to be identical for I/O and MEM ranges, which is incorrect. This patch set the shift size of the MEM range back to the value used before 01f94c4a6ced476ce69b895426fc29bfc48c69bd. Signed-off-by: Kjetil Oftedal --- arch/sparc/kernel/pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe sparclinux" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/sparc/kernel/pci.c b/arch/sparc/kernel/pci.c index bc4d3f5..cb02145 100644 --- a/arch/sparc/kernel/pci.c +++ b/arch/sparc/kernel/pci.c @@ -398,8 +398,8 @@ static void apb_fake_ranges(struct pci_dev *dev, apb_calc_first_last(map, &first, &last); res = bus->resource[1]; res->flags = IORESOURCE_MEM; - region.start = (first << 21); - region.end = (last << 21) + ((1 << 21) - 1); + region.start = (first << 29); + region.end = (last << 29) + ((1 << 29) - 1); pcibios_bus_to_resource(dev, res, ®ion); }