From patchwork Tue Jun 25 23:06:00 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 2781431 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id DAF27C0AB1 for ; Tue, 25 Jun 2013 23:08:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C98DF20271 for ; Tue, 25 Jun 2013 23:08:03 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 96C8B202CA for ; Tue, 25 Jun 2013 23:07:59 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UrcKE-0005ca-R1; Tue, 25 Jun 2013 23:07:03 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UrcJv-0007Iz-A2; Tue, 25 Jun 2013 23:06:43 +0000 Received: from mail-lb0-x230.google.com ([2a00:1450:4010:c04::230]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UrcJf-0007Gb-2I for linux-arm-kernel@lists.infradead.org; Tue, 25 Jun 2013 23:06:28 +0000 Received: by mail-lb0-f176.google.com with SMTP id z5so1152540lbh.7 for ; Tue, 25 Jun 2013 16:06:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:x-gm-message-state; bh=Ombgw9n5/bc26YpZSY3BAVHcW/rsbvMWCpq7PXnp+I0=; b=HFxb8/4K/4PJ1ph/YO75M1OPGwPfQbWgNBMkO2NV2E2OjJ3f6ovKOUYdSRX+fbOlp4 6heshNfGdNYT1mhDa541GwiG5bs9RPc5Fre3sSgXrlXf8ytPJOXIJA4MLkCkSvy9UOt2 rjAT3mDFGCXVuV3syeyUuS5uMNR/WcG6Cc8RnEpSWgVR8ObEOBioo3LA3nCoKSTtkGuv /ORb1wpm+Hk17rhpJfD7CAl20nzWj/NFcuQDAFVMLJKqcg1JrEBi9+GbK+ij12RxYNQB KDfyMbCkRSZ1DV1H6fYMIvJIiLDcfgD1B5kVZe/rXZL/rxE5ksnMp0TVBkJZQIqYene7 vnUQ== X-Received: by 10.152.87.234 with SMTP id bb10mr572422lab.55.1372201564665; Tue, 25 Jun 2013 16:06:04 -0700 (PDT) Received: from localhost.localdomain (c83-249-208-144.bredband.comhem.se. [83.249.208.144]) by mx.google.com with ESMTPSA id y5sm9722229lae.2.2013.06.25.16.06.03 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 25 Jun 2013 16:06:03 -0700 (PDT) From: Linus Walleij To: arm@kernel.org Subject: [PATCH 3/3] ARM: integrator: pciv3: do not remap IO so early Date: Wed, 26 Jun 2013 01:06:00 +0200 Message-Id: <1372201560-26015-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 1.8.1.4 X-Gm-Message-State: ALoCoQltEmg5kACerG86o6teZcVZ7Al4hEjMvt6wD+rJZjYs0dBlj/DSoAyoqMV09Wq+vUlAcmws X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130625_190627_290307_B1DB0D67 X-CRM114-Status: GOOD ( 11.10 ) X-Spam-Score: -1.9 (-) Cc: Linus Walleij , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Instead of remapping the IO memory very early with pci_map_io_early(), use pci_ioremap_io() when setting up resources as most PCI bridges do. Also request this resource properly. Reported-by: Arnd Bergmann Signed-off-by: Linus Walleij --- arch/arm/mach-integrator/pci_v3.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-integrator/pci_v3.c b/arch/arm/mach-integrator/pci_v3.c index bef1005..029d670 100644 --- a/arch/arm/mach-integrator/pci_v3.c +++ b/arch/arm/mach-integrator/pci_v3.c @@ -538,6 +538,13 @@ static int __init pci_v3_setup_resources(struct pci_sys_data *sys) "memory region\n"); return -EBUSY; } + if (request_resource(&iomem_resource, &io_mem)) { + release_resource(&io_mem); + printk(KERN_ERR "PCI: unable to allocate I/O " + "memory region\n"); + return -EBUSY; + } + pci_ioremap_io(0, io_mem.start); /* * the mem resource for this bus @@ -1039,6 +1046,5 @@ int __init pci_v3_early_init(void) { iotable_init(pci_v3_io_desc, ARRAY_SIZE(pci_v3_io_desc)); vga_base = (unsigned long)PCI_MEMORY_VADDR; - pci_map_io_early(__phys_to_pfn(PHYS_PCI_IO_BASE)); return 0; }