From patchwork Wed Aug 15 08:57:04 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hongtao Jia X-Patchwork-Id: 177594 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [IPv6:::1]) by ozlabs.org (Postfix) with ESMTP id 142022C066B for ; Wed, 15 Aug 2012 19:27:55 +1000 (EST) Received: from ch1outboundpool.messaging.microsoft.com (ch1ehsobe004.messaging.microsoft.com [216.32.181.184]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (Client CN "mail.global.frontbridge.com", Issuer "Microsoft Secure Server Authority" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 02D812C01CE for ; Wed, 15 Aug 2012 19:25:41 +1000 (EST) Received: from mail100-ch1-R.bigfish.com (10.43.68.231) by CH1EHSOBE009.bigfish.com (10.43.70.59) with Microsoft SMTP Server id 14.1.225.23; Wed, 15 Aug 2012 09:25:37 +0000 Received: from mail100-ch1 (localhost [127.0.0.1]) by mail100-ch1-R.bigfish.com (Postfix) with ESMTP id 28C254E01CA; Wed, 15 Aug 2012 09:25:34 +0000 (UTC) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI X-SpamScore: 0 X-BigFish: VS0(zzzz1202hzz8275bh8275dhz2dh2a8h668h839he5bhf0ah107ah) Received: from mail100-ch1 (localhost.localdomain [127.0.0.1]) by mail100-ch1 (MessageSwitch) id 1345022720215305_19571; Wed, 15 Aug 2012 09:25:20 +0000 (UTC) Received: from CH1EHSMHS013.bigfish.com (snatpool2.int.messaging.microsoft.com [10.43.68.231]) by mail100-ch1.bigfish.com (Postfix) with ESMTP id 25A5E440238; Wed, 15 Aug 2012 09:25:20 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by CH1EHSMHS013.bigfish.com (10.43.70.13) with Microsoft SMTP Server (TLS) id 14.1.225.23; Wed, 15 Aug 2012 09:25:19 +0000 Received: from az84smr01.freescale.net (10.64.34.197) by 039-SN1MMR1-005.039d.mgd.msft.net (10.84.1.17) with Microsoft SMTP Server (TLS) id 14.2.298.5; Wed, 15 Aug 2012 04:25:18 -0500 Received: from rock.am.freescale.net (rock.ap.freescale.net [10.193.20.106]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id q7F9P8PW029890; Wed, 15 Aug 2012 02:25:15 -0700 From: Jia Hongtao To: , , Subject: [PATCH V7 1/3] powerpc/pci: Make sure ISA IO base is not zero Date: Wed, 15 Aug 2012 16:57:04 +0800 Message-ID: <1345021026-10886-2-git-send-email-B38951@freescale.com> X-Mailer: git-send-email 1.7.5.1 In-Reply-To: <1345021026-10886-1-git-send-email-B38951@freescale.com> References: <1345021026-10886-1-git-send-email-B38951@freescale.com> MIME-Version: 1.0 X-OriginatorOrg: freescale.com Cc: B07421@freescale.com, b38951@freescale.com X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" From: Benjamin Herrenschmidt Some platforms like QEMU treat 0 as an invalid address for ISA IO base. So we make sure that ISA IO base will never be zero. By functionality this is equivalent to assgin the first pci bus detected as a primary bus. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Jia Hongtao --- arch/powerpc/kernel/pci-common.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c index 0f75bd5..2a09aa5 100644 --- a/arch/powerpc/kernel/pci-common.c +++ b/arch/powerpc/kernel/pci-common.c @@ -734,7 +734,7 @@ void __devinit pci_process_bridge_OF_ranges(struct pci_controller *hose, hose->io_base_virt = ioremap(cpu_addr, size); /* Expect trouble if pci_addr is not 0 */ - if (primary) + if (primary || !isa_io_base) isa_io_base = (unsigned long)hose->io_base_virt; #endif /* CONFIG_PPC32 */