]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ARM: shark: use fixed PCI i/o mapping
authorRob Herring <rob.herring@calxeda.com>
Tue, 28 Feb 2012 19:15:43 +0000 (13:15 -0600)
committerRob Herring <rob.herring@calxeda.com>
Thu, 26 Jul 2012 14:09:58 +0000 (09:09 -0500)
Convert shark to use the fixed i/o mapping and remove io.h.

This shrinks the mapping from 256MB to 1MB, but nothing is using that much
space AFAICT.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Russell King <linux@arm.linux.org.uk>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
arch/arm/Kconfig
arch/arm/mach-shark/core.c
arch/arm/mach-shark/include/mach/debug-macro.S
arch/arm/mach-shark/include/mach/entry-macro.S
arch/arm/mach-shark/include/mach/io.h [deleted file]
arch/arm/mach-shark/pci.c

index 5d376283b7a49089f05398d789a2f32437f5249c..3dfc555219b5f091302f42cebaca7aca286a432d 100644 (file)
@@ -869,7 +869,6 @@ config ARCH_SHARK
        select PCI
        select ARCH_USES_GETTIMEOFFSET
        select NEED_MACH_MEMORY_H
-       select NEED_MACH_IO_H
        help
          Support for the StrongARM based Digital DNARD machine, also known
          as "Shark" (<http://www.shark-linux.de/shark.html>).
index 2704bcd869cdc1d61843bc85c3a4bd2e5f36d5fc..d35b94ef73b7266f980f99de9cb972e746954951 100644 (file)
@@ -21,9 +21,6 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/time.h>
 
-#define IO_BASE                 0xe0000000
-#define IO_SIZE                 0x08000000
-#define IO_START                0x40000000
 #define ROMCARD_SIZE            0x08000000
 #define ROMCARD_START           0x10000000
 
@@ -104,20 +101,6 @@ arch_initcall(shark_init);
 
 extern void shark_init_irq(void);
 
-static struct map_desc shark_io_desc[] __initdata = {
-       {
-               .virtual        = IO_BASE,
-               .pfn            = __phys_to_pfn(IO_START),
-               .length         = IO_SIZE,
-               .type           = MT_DEVICE
-       }
-};
-
-static void __init shark_map_io(void)
-{
-       iotable_init(shark_io_desc, ARRAY_SIZE(shark_io_desc));
-}
-
 #define IRQ_TIMER 0
 #define HZ_TIME ((1193180 + HZ/2) / HZ)
 
@@ -158,7 +141,6 @@ static void shark_init_early(void)
 MACHINE_START(SHARK, "Shark")
        /* Maintainer: Alexander Schulz */
        .atag_offset    = 0x3000,
-       .map_io         = shark_map_io,
        .init_early     = shark_init_early,
        .init_irq       = shark_init_irq,
        .timer          = &shark_timer,
index 20eb2bf2a42bfae2110acdec021bd23f965a0812..d129119a3f69189a6c636b04be0330ec4bbd8d72 100644 (file)
 */
 
                .macro  addruart, rp, rv, tmp
-               mov     \rp, #0xe0000000
-               orr     \rp, \rp, #0x000003f8
-               mov     \rv, \rp
+               mov     \rp, #0x3f8
+               orr     \rv, \rp, #0xfe000000
+               orr     \rv, \rv, #0x00e00000
+               orr     \rp, \rp, #0x40000000
                .endm
 
                .macro  senduart,rd,rx
index 5901b09fc96a356b1aa8d07a96c8efa3bfc9f6a6..c9e49f04953206050e629adb7ad9690b928aade1 100644 (file)
@@ -8,7 +8,8 @@
  * warranty of any kind, whether express or implied.
  */
                .macro  get_irqnr_preamble, base, tmp
-               mov     \base, #0xe0000000
+               mov     \base, #0xfe000000
+               orr     \base, \base, #0x00e00000
                .endm
 
                .macro  get_irqnr_and_base, irqnr, irqstat, base, tmp
diff --git a/arch/arm/mach-shark/include/mach/io.h b/arch/arm/mach-shark/include/mach/io.h
deleted file mode 100644 (file)
index 1a45fc0..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * arch/arm/mach-shark/include/mach/io.h
- *
- * by Alexander Schulz
- *
- * derived from:
- * arch/arm/mach-ebsa110/include/mach/io.h
- * Copyright (C) 1997,1998 Russell King
- */
-
-#ifndef __ASM_ARM_ARCH_IO_H
-#define __ASM_ARM_ARCH_IO_H
-
-#define IO_SPACE_LIMIT 0xffffffff
-
-#define __io(a)                 ((void __iomem *)(0xe0000000 + (a)))
-
-#endif
index 9089407d53266327c740707b673b01217b4c536c..b8b4ab323a3ed9a0c6b8ad16c16acc9b1266044d 100644 (file)
@@ -8,12 +8,15 @@
 #include <linux/kernel.h>
 #include <linux/pci.h>
 #include <linux/init.h>
+#include <linux/io.h>
 #include <video/vga.h>
 
 #include <asm/irq.h>
 #include <asm/mach/pci.h>
 #include <asm/mach-types.h>
 
+#define IO_START       0x40000000
+
 static int __init shark_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
        if (dev->bus->number == 0)
@@ -44,6 +47,8 @@ static int __init shark_pci_init(void)
        pcibios_min_mem = 0x50000000;
        vga_base = 0xe8000000;
 
+       pci_ioremap_io(0, IO_START);
+
        pci_common_init(&shark_pci);
 
        return 0;