All of lore.kernel.org
 help / color / mirror / Atom feed
From: Russell King <rmk+kernel@armlinux.org.uk>
To: linux-arm-kernel@lists.infradead.org
Cc: Arnd Bergmann <arnd@arndb.de>,Rob Herring <rob.herring@calxeda.com>
Subject: [PATCH 3/3] ARM: footbridge: restore allocation of CSR I/O resource
Date: Fri, 26 Mar 2021 12:18:18 +0000	[thread overview]
Message-ID: <E1lPlPu-0007oY-AU@rmk-PC.armlinux.org.uk> (raw)
In-Reply-To: <20210326121735.GQ1463@shell.armlinux.org.uk>

Commit 8ef6e6201b2 ("ARM: footbridge: use fixed PCI i/o mapping") made
two changes: it contains what it says in the summary line, but it also
removes the CSR I/O allocation, which effectively means the DC21285
responds to I/O accesses at address 0..0x7f, which overlap Southbridge
ISA resources on the same PCI bus.

This commit fixes it, but depends on the previous two commits removing
the bus level PCI I/O resource:
  ARM: footbridge: avoid using separate PCI I/O bus resource
  ARM: pci: make bus I/O resources optional

Fixes: 8ef6e6201b2 ("ARM: footbridge: use fixed PCI i/o mapping")
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
---
 arch/arm/mach-footbridge/dc21285.c | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-footbridge/dc21285.c b/arch/arm/mach-footbridge/dc21285.c
index f9713dc561cf..d900651a9c8f 100644
--- a/arch/arm/mach-footbridge/dc21285.c
+++ b/arch/arm/mach-footbridge/dc21285.c
@@ -332,6 +332,19 @@ void __init dc21285_preinit(void)
 			    "PCI data parity", NULL);
 
 	if (cfn_mode) {
+		static struct resource csrio;
+
+		csrio.flags  = IORESOURCE_IO;
+		csrio.name   = "Footbridge";
+
+		/*
+		 * Put the Footbridge IO space in the top 256 bytes of IO
+		 * space, which should otherwise remain unused. This avoids
+		 * any conflict with ISA peripherals.
+		 */
+		allocate_resource(&ioport_resource, &csrio, 128,
+				  0xff00, 0xffff, 128, NULL, NULL);
+
 		/*
 		 * Map our SDRAM at a known address in PCI space, just in case
 		 * the firmware had other ideas.  Using a nonzero base is
@@ -339,7 +352,7 @@ void __init dc21285_preinit(void)
 		 * in the range 0x000a0000 to 0x000c0000. (eg, S3 cards).
 		 */
 		*CSR_PCICSRBASE       = 0xf4000000;
-		*CSR_PCICSRIOBASE     = 0;
+		*CSR_PCICSRIOBASE     = csrio.start;
 		*CSR_PCISDRAMBASE     = __virt_to_bus(PAGE_OFFSET);
 		*CSR_PCIROMBASE       = 0;
 		*CSR_PCICMD = PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER |
-- 
2.20.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2021-03-26 12:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-26 12:17 [PATCH 0/3] Fix Footbridge PCI I/O resources Russell King - ARM Linux admin
2021-03-26 12:18 ` [PATCH 1/3] ARM: pci: make bus I/O resources optional Russell King
2021-03-26 13:33   ` Arnd Bergmann
2021-03-26 13:39     ` Russell King - ARM Linux admin
2021-03-26 14:01       ` Arnd Bergmann
2021-03-26 12:18 ` [PATCH 2/3] ARM: footbridge: avoid using separate PCI I/O bus resource Russell King
2021-03-26 12:18 ` Russell King [this message]
2021-03-26 13:37   ` [PATCH 3/3] ARM: footbridge: restore allocation of CSR I/O resource Arnd Bergmann
2021-03-26 13:40     ` Russell King - ARM Linux admin

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=E1lPlPu-0007oY-AU@rmk-PC.armlinux.org.uk \
    --to=rmk+kernel@armlinux.org.uk \
    --cc=arnd@arndb.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=rob.herring@calxeda.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.