linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linus.walleij@linaro.org (Linus Walleij)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/3] ARM: integrator: pciv3: do not remap IO so early
Date: Wed, 26 Jun 2013 01:06:00 +0200	[thread overview]
Message-ID: <1372201560-26015-1-git-send-email-linus.walleij@linaro.org> (raw)

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 <arnd@arndb.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 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;
 }
-- 
1.8.1.4

             reply	other threads:[~2013-06-25 23:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-25 23:06 Linus Walleij [this message]
2013-06-26  8:14 ` [PATCH 3/3] ARM: integrator: pciv3: do not remap IO so early Russell King - ARM Linux
2013-06-26 15:12   ` Arnd Bergmann
2013-06-26 19:34     ` Linus Walleij
2013-06-26 20:04       ` Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1372201560-26015-1-git-send-email-linus.walleij@linaro.org \
    --to=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).