From: robherring2@gmail.com (Rob Herring)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 08/15] ARM: footbridge: use fixed PCI i/o mapping
Date: Fri, 13 Jul 2012 21:04:04 -0500 [thread overview]
Message-ID: <1342231451-28861-9-git-send-email-robherring2@gmail.com> (raw)
In-Reply-To: <1342231451-28861-1-git-send-email-robherring2@gmail.com>
From: Rob Herring <rob.herring@calxeda.com>
Move footbridge PCI to fixed i/o mapping. io.h is still needed for the
!MMU case.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Russell King <linux@arm.linux.org.uk>
---
arch/arm/Kconfig | 2 +-
| 8 ++------
| 16 ++++------------
| 3 ++-
| 12 ++----------
5 files changed, 11 insertions(+), 30 deletions(-)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 3dfc555..7215ebf 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -431,7 +431,7 @@ config ARCH_FOOTBRIDGE
select FOOTBRIDGE
select GENERIC_CLOCKEVENTS
select HAVE_IDE
- select NEED_MACH_IO_H
+ select NEED_MACH_IO_H if !MMU
select NEED_MACH_MEMORY_H
help
Support for systems based on the DC21285 companion chip
--git a/arch/arm/mach-footbridge/common.c b/arch/arm/mach-footbridge/common.c
index 3e6aaa6..e8f1fe6 100644
--- a/arch/arm/mach-footbridge/common.c
+++ b/arch/arm/mach-footbridge/common.c
@@ -15,7 +15,7 @@
#include <linux/init.h>
#include <linux/io.h>
#include <linux/spinlock.h>
-
+
#include <asm/pgtable.h>
#include <asm/page.h>
#include <asm/irq.h>
@@ -26,6 +26,7 @@
#include <asm/mach/irq.h>
#include <asm/mach/map.h>
+#include <asm/mach/pci.h>
#include "common.h"
@@ -175,11 +176,6 @@ static struct map_desc ebsa285_host_io_desc[] __initdata = {
.pfn = __phys_to_pfn(DC21285_PCI_IACK),
.length = PCIIACK_SIZE,
.type = MT_DEVICE,
- }, {
- .virtual = PCIO_BASE,
- .pfn = __phys_to_pfn(DC21285_PCI_IO),
- .length = PCIO_SIZE,
- .type = MT_DEVICE,
},
#endif
};
--git a/arch/arm/mach-footbridge/dc21285.c b/arch/arm/mach-footbridge/dc21285.c
index 9d62e33..a7cd2cf 100644
--- a/arch/arm/mach-footbridge/dc21285.c
+++ b/arch/arm/mach-footbridge/dc21285.c
@@ -276,8 +276,8 @@ int __init dc21285_setup(int nr, struct pci_sys_data *sys)
sys->mem_offset = DC21285_PCI_MEM;
- pci_add_resource_offset(&sys->resources,
- &ioport_resource, sys->io_offset);
+ pci_ioremap_io(0, DC21285_PCI_IO);
+
pci_add_resource_offset(&sys->resources, &res[0], sys->mem_offset);
pci_add_resource_offset(&sys->resources, &res[1], sys->mem_offset);
@@ -298,7 +298,7 @@ void __init dc21285_preinit(void)
mem_size = (unsigned int)high_memory - PAGE_OFFSET;
for (mem_mask = 0x00100000; mem_mask < 0x10000000; mem_mask <<= 1)
if (mem_mask >= mem_size)
- break;
+ break;
/*
* These registers need to be set up whether we're the
@@ -350,14 +350,6 @@ void __init dc21285_preinit(void)
"PCI data parity", NULL);
if (cfn_mode) {
- static struct resource csrio;
-
- csrio.flags = IORESOURCE_IO;
- csrio.name = "Footbridge";
-
- 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
@@ -365,7 +357,7 @@ void __init dc21285_preinit(void)
* in the range 0x000a0000 to 0x000c0000. (eg, S3 cards).
*/
*CSR_PCICSRBASE = 0xf4000000;
- *CSR_PCICSRIOBASE = csrio.start;
+ *CSR_PCICSRIOBASE = 0;
*CSR_PCISDRAMBASE = __virt_to_bus(PAGE_OFFSET);
*CSR_PCIROMBASE = 0;
*CSR_PCICMD = PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER |
--git a/arch/arm/mach-footbridge/include/mach/debug-macro.S b/arch/arm/mach-footbridge/include/mach/debug-macro.S
index e5acde2..c169f0c 100644
--- a/arch/arm/mach-footbridge/include/mach/debug-macro.S
+++ b/arch/arm/mach-footbridge/include/mach/debug-macro.S
@@ -17,7 +17,8 @@
/* For NetWinder debugging */
.macro addruart, rp, rv, tmp
mov \rp, #0x000003f8
- orr \rv, \rp, #0xff000000 @ virtual
+ orr \rv, \rp, #0xfe000000 @ virtual
+ orr \rv, \rv, #0x00e00000 @ virtual
orr \rp, \rp, #0x7c000000 @ physical
.endm
--git a/arch/arm/mach-footbridge/include/mach/io.h b/arch/arm/mach-footbridge/include/mach/io.h
index aba531ee..aba4638 100644
--- a/arch/arm/mach-footbridge/include/mach/io.h
+++ b/arch/arm/mach-footbridge/include/mach/io.h
@@ -14,18 +14,10 @@
#ifndef __ASM_ARM_ARCH_IO_H
#define __ASM_ARM_ARCH_IO_H
-#ifdef CONFIG_MMU
-#define MMU_IO(a, b) (a)
-#else
-#define MMU_IO(a, b) (b)
-#endif
-
-#define PCIO_SIZE 0x00100000
-#define PCIO_BASE MMU_IO(0xff000000, 0x7c000000)
-
/*
- * Translation of various region addresses to virtual addresses
+ * Translation of various i/o addresses to host addresses for !CONFIG_MMU
*/
+#define PCIO_BASE 0x7c000000
#define __io(a) ((void __iomem *)(PCIO_BASE + (a)))
#endif
--
1.7.9.5
next prev parent reply other threads:[~2012-07-14 2:04 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-14 2:03 [PATCH v2 00/15] PCI io.h clean-up Rob Herring
2012-07-14 2:03 ` [PATCH v2 01/15] ARM: Add fixed PCI i/o mapping Rob Herring
2012-07-14 12:22 ` Nicolas Pitre
2012-07-16 4:35 ` Rob Herring
2012-07-16 13:32 ` Nicolas Pitre
2012-07-14 2:03 ` [PATCH v2 02/15] ARM: move PCI i/o resource setup into common code Rob Herring
2012-07-14 2:03 ` [PATCH v2 03/15] ARM: versatile: use fixed PCI i/o mapping Rob Herring
2012-07-14 2:04 ` [PATCH v2 04/15] ARM: tegra: " Rob Herring
2012-07-14 2:04 ` [PATCH v2 05/15] ARM: integrator: " Rob Herring
2012-07-14 21:49 ` Linus Walleij
2012-07-17 17:04 ` Will Deacon
2012-07-17 18:02 ` Rob Herring
2012-07-21 14:31 ` Will Deacon
2012-07-21 21:56 ` Arnd Bergmann
2012-07-22 13:09 ` Rob Herring
2012-07-22 15:08 ` Will Deacon
2012-07-22 16:22 ` Rob Herring
2012-07-23 12:19 ` Will Deacon
2012-07-23 14:05 ` Rob Herring
2012-07-23 14:50 ` Linus Walleij
2012-07-14 2:04 ` [PATCH v2 06/15] ARM: integrator: remove trailing whitespace on pci_v3.c Rob Herring
2012-07-14 2:04 ` [PATCH v2 07/15] ARM: shark: use fixed PCI i/o mapping Rob Herring
2012-07-14 2:04 ` Rob Herring [this message]
2012-07-14 2:04 ` [PATCH v2 09/15] ARM: dove: " Rob Herring
2012-07-14 2:04 ` [PATCH v2 10/15] ARM: kirkwood: " Rob Herring
2012-07-16 7:10 ` Andrew Lunn
2012-07-16 14:17 ` Rob Herring
2012-07-16 16:25 ` Arnd Bergmann
2012-07-14 2:04 ` [PATCH v2 11/15] ARM: orion5x: " Rob Herring
2012-07-14 2:04 ` [PATCH v2 12/15] iop13xx: use more regular PCI I/O space handling Rob Herring
2012-07-14 2:04 ` [PATCH v2 13/15] ARM: iop13xx: use fixed PCI i/o mapping Rob Herring
2012-07-14 2:04 ` [PATCH v2 14/15] ARM: mv78xx0: use fixed pci " Rob Herring
2012-07-14 2:04 ` [PATCH v2 15/15] ARM: iop3xx: use fixed PCI " Rob Herring
2012-07-14 7:57 ` [PATCH v2 00/15] PCI io.h clean-up Arnd Bergmann
2012-07-14 12:26 ` Nicolas Pitre
2012-07-14 14:54 ` Rob Herring
2012-07-16 7:52 ` Andrew Lunn
2012-07-16 9:17 ` Arnd Bergmann
2012-07-16 14:03 ` Rob Herring
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=1342231451-28861-9-git-send-email-robherring2@gmail.com \
--to=robherring2@gmail.com \
--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).