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: 18125 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f70.google.com (mail-qa0-f70.google.com [209.85.216.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id DB55A25E4B for ; Tue, 25 Jun 2013 23:06:06 +0000 (UTC) Received: by mail-qa0-f70.google.com with SMTP id cr7sf1958978qab.1 for ; Tue, 25 Jun 2013 16:06:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-beenthere:x-forwarded-to:x-forwarded-for :delivered-to:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=Ombgw9n5/bc26YpZSY3BAVHcW/rsbvMWCpq7PXnp+I0=; b=YWV44w05yJLSAme+5gs59trpFuumWkutuhVu6ZoKX9uWqeSMr1j7m8tqJgPYE002Cs dLbXlif/7tjx27xwNVKlxGWeiOQvNGvdovZBU5AsZeNp2oL6MT5F6bvutDcCy4xNToLz WwGNdyklvK0dxreBcL1xUmQoal5h0OxPHonn26VaS4aKJZwfF/Sq25bNLA9NAAMjpBFh 6xpxsgd653Y73axVXNNCoJgjFIC+TpUIsJHGW5oVUK8efBJyC7MtxObC14rpbNCyw+NU CkL0lk2xTQ3bI5Qae848LPCgYRMVlKpEVewIcEnfu89MHd0OUKhE/dE4lWP+2lhE9u+R 6bTA== X-Received: by 10.236.207.169 with SMTP id n29mr630548yho.50.1372201566481; Tue, 25 Jun 2013 16:06:06 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.116.139 with SMTP id jw11ls192225qeb.21.gmail; Tue, 25 Jun 2013 16:06:06 -0700 (PDT) X-Received: by 10.52.94.211 with SMTP id de19mr594987vdb.59.1372201566373; Tue, 25 Jun 2013 16:06:06 -0700 (PDT) Received: from mail-vb0-x232.google.com (mail-vb0-x232.google.com [2607:f8b0:400c:c02::232]) by mx.google.com with ESMTPS id zw14si6920016veb.64.2013.06.25.16.06.06 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 25 Jun 2013 16:06:06 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c02::232 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c02::232; Received: by mail-vb0-f50.google.com with SMTP id w16so10061510vbb.37 for ; Tue, 25 Jun 2013 16:06:06 -0700 (PDT) X-Received: by 10.220.67.10 with SMTP id p10mr646632vci.85.1372201566296; Tue, 25 Jun 2013 16:06:06 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.58.165.8 with SMTP id yu8csp87465veb; Tue, 25 Jun 2013 16:06:05 -0700 (PDT) X-Received: by 10.152.116.19 with SMTP id js19mr543187lab.72.1372201565290; Tue, 25 Jun 2013 16:06:05 -0700 (PDT) Received: from mail-lb0-x234.google.com (mail-lb0-x234.google.com [2a00:1450:4010:c04::234]) by mx.google.com with ESMTPS id v2si9568503lav.8.2013.06.25.16.06.04 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 25 Jun 2013 16:06:05 -0700 (PDT) Received-SPF: neutral (google.com: 2a00:1450:4010:c04::234 is neither permitted nor denied by best guess record for domain of linus.walleij@linaro.org) client-ip=2a00:1450:4010:c04::234; Received: by mail-lb0-f180.google.com with SMTP id o10so1180581lbi.39 for ; Tue, 25 Jun 2013 16:06:04 -0700 (PDT) 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 Cc: linux-arm-kernel@lists.infradead.org, Linus Walleij 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: ALoCoQmDj91yKaODhdNUlUf1RrKnzIVoO6HxvNdkKanoX3eaS2bCffqHNgSahJl5SLl+oQj1rLMH X-Original-Sender: linus.walleij@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c02::232 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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; }