]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
sh: Get the mach-cayman IRQ support building.
authorPaul Mundt <lethal@linux-sh.org>
Wed, 21 Nov 2007 14:16:33 +0000 (23:16 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Mon, 28 Jan 2008 04:18:54 +0000 (13:18 +0900)
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/sh/kernel/cpu/irq/Makefile
arch/sh/kernel/cpu/irq/intc-sh5.c [moved from arch/sh64/kernel/irq_intc.c with 93% similarity]
arch/sh/kernel/cpu/sh5/Makefile
arch/sh/kernel/cpu/sh5/setup-sh5-101.c [deleted file]
arch/sh/mach-cayman/Makefile
arch/sh/mach-cayman/iomap.c [deleted file]
arch/sh/mach-cayman/irq.c
arch/sh/mach-cayman/setup.c
include/asm-sh/cpu-sh5/irq.h
include/asm-sh/platform.h [deleted file]

index 81d37e948b861e9e5aea8bb6196e0d48264ed267..cc1836e47a5dbe62fcd047e883c58f7af661992f 100644 (file)
@@ -4,5 +4,6 @@
 obj-y  += intc.o
 
 obj-$(CONFIG_SUPERH32)                 += imask.o
+obj-$(CONFIG_CPU_SH5)                  += intc-sh5.o
 obj-$(CONFIG_CPU_HAS_IPR_IRQ)          += ipr.o
 obj-$(CONFIG_CPU_HAS_MASKREG_IRQ)      += maskreg.o
similarity index 93%
rename from arch/sh64/kernel/irq_intc.c
rename to arch/sh/kernel/cpu/irq/intc-sh5.c
index 3b63a93198f24fd8919a88d974818c96c645de74..49b845a31fff5c631dd34f1f44936c78f56c31a9 100644 (file)
  * controller.
  *
  */
-
 #include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/irq.h>
+#include <linux/io.h>
 #include <linux/kernel.h>
-#include <linux/stddef.h>
-#include <linux/bitops.h>       /* this includes also <asm/registers.h */
-                                /* which is required to remap register */
-                                /* names used into __asm__ blocks...   */
-
-#include <asm/hardware.h>
-#include <asm/platform.h>
+#include <linux/bitops.h>
+#include <asm/cpu/irq.h>
 #include <asm/page.h>
-#include <asm/io.h>
-#include <asm/irq.h>
 
 /*
  * Maybe the generic Peripheral block could move to a more
@@ -192,7 +185,7 @@ int intc_irq_describe(char* p, int irq)
 }
 #endif
 
-void __init init_IRQ(void)
+void __init plat_irq_setup(void)
 {
         unsigned long long __dummy0, __dummy1=~0x00000000100000f0;
        unsigned long reg;
@@ -251,14 +244,6 @@ void __init init_IRQ(void)
                }
        }
 
-#ifdef CONFIG_SH_CAYMAN
-       {
-               extern void init_cayman_irq(void);
-
-               init_cayman_irq();
-       }
-#endif
-
        /*
         * And now let interrupts come in.
         * sti() is not enough, we need to
index 0ef257b72e5db14243ae5a3d9f56cb5991870f53..8646363e9dedd2f3090781c6108c500a45791bf8 100644 (file)
@@ -5,7 +5,3 @@ obj-y := entry.o probe.o switchto.o
 
 obj-$(CONFIG_SH_FPU)           += fpu.o
 obj-$(CONFIG_KALLSYMS)         += unwind.o
-
-# CPU subtype setup
-obj-$(CONFIG_CPU_SUBTYPE_SH5_101)      += setup-sh5-101.o
-obj-$(CONFIG_CPU_SUBTYPE_SH5_103)      += setup-sh5-101.o
diff --git a/arch/sh/kernel/cpu/sh5/setup-sh5-101.c b/arch/sh/kernel/cpu/sh5/setup-sh5-101.c
deleted file mode 100644 (file)
index 3680012..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-/*
- * SH5-101 Setup
- *
- *  Copyright (C) 2007  Paul Mundt
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- */
-#include <linux/init.h>
-
-void __init plat_irq_setup(void)
-{
-       /* do nothing - all IRL interrupts are handled by the board code */
-}
index 67a2258bf8c474266affb0cf67109b85a241db72..489a8f8673681e94e5d63654627e9bf8d4dbfc3f 100644 (file)
@@ -1,11 +1,5 @@
 #
 # Makefile for the Hitachi Cayman specific parts of the kernel
 #
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (ie not a .c file).
-#
-
-obj-y := setup.o irq.o iomap.o
+obj-y := setup.o irq.o
 obj-$(CONFIG_HEARTBEAT)        += led.o
-
diff --git a/arch/sh/mach-cayman/iomap.c b/arch/sh/mach-cayman/iomap.c
deleted file mode 100644 (file)
index a5c645f..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * arch/sh64/mach-cayman/iomap.c
- *
- * Cayman iomap interface
- *
- * Copyright (C) 2004  Paul Mundt
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- */
-#include <asm/io.h>
-#include <asm/cayman.h>
-
-void __iomem *ioport_map(unsigned long port, unsigned int len)
-{
-       if (port < 0x400)
-               return (void __iomem *)((port << 2) | smsc_superio_virt);
-
-       return (void __iomem *)port;
-}
-
index aaad36d37d1f600bfd573814111e216894a762dc..30ec7bebfaf1831c0d68fcf62f70361e50aa585a 100644 (file)
@@ -1,24 +1,26 @@
 /*
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * arch/sh64/kernel/irq_cayman.c
- *
- * SH-5 Cayman Interrupt Support
+ * arch/sh/mach-cayman/irq.c - SH-5 Cayman Interrupt Support
  *
  * This file handles the board specific parts of the Cayman interrupt system
  *
  * Copyright (C) 2002 Stuart Menefy
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
  */
-
-#include <asm/irq.h>
-#include <asm/page.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <linux/irq.h>
 #include <linux/interrupt.h>
 #include <linux/signal.h>
-#include <asm/cayman.h>
+#include <asm/cpu/irq.h>
+#include <asm/page.h>
+
+/* Setup for the SMSC FDC37C935 / LAN91C100FD */
+#define SMSC_IRQ         IRQ_IRL1
+
+/* Setup for PCI Bus 2, which transmits interrupts via the EPLD */
+#define PCI2_IRQ         IRQ_IRL3
 
 unsigned long epld_virt;
 
index 726c520d7eb98173f439a62e0d832e96577379ba..8c9fa472d8f5f0b559850c124f016cf428d44677 100644 (file)
@@ -1,28 +1,19 @@
 /*
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * arch/sh64/mach-cayman/setup.c
+ * arch/sh/mach-cayman/setup.c
  *
  * SH5 Cayman support
  *
- * This file handles the architecture-dependent parts of initialization
+ * Copyright (C) 2002  David J. Mckay & Benedict Gaster
+ * Copyright (C) 2003 - 2007  Paul Mundt
  *
- * Copyright David J. Mckay.
- * Needs major work!
- *
- * benedict.gaster@superh.com:  3rd May 2002
- *    Added support for ramdisk, removing statically linked romfs at the same time.
- *
- * lethal@linux-sh.org:          15th May 2003
- *    Use the generic procfs cpuinfo interface, just return a valid board name.
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
  */
 #include <linux/init.h>
+#include <linux/io.h>
 #include <linux/kernel.h>
-#include <asm/platform.h>
-#include <asm/irq.h>
-#include <asm/io.h>
+#include <asm/cpu/irq.h>
 
 /*
  * Platform Dependent Interrupt Priorities.
 
 unsigned long smsc_superio_virt;
 
-/*
- * Platform dependent structures: maps and parms block.
- */
-struct resource io_resources[] = {
-       /* To be updated with external devices */
-};
-
-struct resource kram_resources[] = {
-       /* These must be last in the array */
-       { .name = "Kernel code", .start = 0, .end = 0 },
-       /* These must be last in the array */
-       { .name = "Kernel data", .start = 0, .end = 0 }
-};
-
-struct resource xram_resources[] = {
-       /* To be updated with external devices */
-};
-
-struct resource rom_resources[] = {
-       /* To be updated with external devices */
-};
-
-struct sh64_platform platform_parms = {
-       .readonly_rootfs =      1,
-       .initial_root_dev =     0x0100,
-       .loader_type =          1,
-       .io_res_p =             io_resources,
-       .io_res_count =         ARRAY_SIZE(io_resources),
-       .kram_res_p =           kram_resources,
-       .kram_res_count =       ARRAY_SIZE(kram_resources),
-       .xram_res_p =           xram_resources,
-       .xram_res_count =       ARRAY_SIZE(xram_resources),
-       .rom_res_p =            rom_resources,
-       .rom_res_count =        ARRAY_SIZE(rom_resources),
-};
-
 int platform_int_priority[NR_INTC_IRQS] = {
        IR0, IR1, IR2, IR3, PCA, PCB, PCC, PCD, /* IRQ  0- 7 */
        RES, RES, RES, RES, SER, ERR, PW3, PW2, /* IRQ  8-15 */
@@ -210,30 +165,23 @@ static int __init smsc_superio_setup(void)
 
        return 0;
 }
-
-/* This is grotty, but, because kernel is always referenced on the link line
- * before any devices, this is safe.
- */
 __initcall(smsc_superio_setup);
 
-void __init platform_setup(void)
-{
-       /* Cayman platform leaves the decision to head.S, for now */
-       platform_parms.fpu_flags = fpu_in_use;
-}
-
-void __init platform_monitor(void)
+static void __iomem *cayman_ioport_map(unsigned long port, unsigned int len)
 {
-       /* Nothing yet .. */
-}
+       if (port < 0x400) {
+               extern unsigned long smsc_superio_virt;
+               return (void __iomem *)((port << 2) | smsc_superio_virt);
+       }
 
-void __init platform_reserve(void)
-{
-       /* Nothing yet .. */
+       return (void __iomem *)port;
 }
 
-const char *get_system_type(void)
-{
-       return "Hitachi Cayman";
-}
+extern void init_cayman_irq(void);
 
+static struct sh_machine_vector mv_cayman __initmv = {
+       .mv_name                = "Hitachi Cayman",
+       .mv_nr_irqs             = 64,
+       .mv_ioport_map          = cayman_ioport_map,
+       .mv_init_irq            = init_cayman_irq,
+};
index 5c9e6a873aebd2cce585c0ec98f2413a27e52666..f539baec8529704c35d3a3ce49217db9e3373807 100644 (file)
@@ -92,9 +92,6 @@
 #define NR_EXT_IRQS    0
 #endif
 
-#define NR_IRQS                (NR_INTC_IRQS+NR_EXT_IRQS)
-
-
 /* Default IRQs, fixed */
 #define TIMER_IRQ      IRQ_TUNI0
 #define RTC_IRQ                IRQ_CUI
 
 extern int intc_evt_to_irq[(0xE20/0x20)+1];
 int intc_irq_describe(char* p, int irq);
-
-#define irq_canonicalize(irq)  (irq)
-
-#ifdef CONFIG_SH_CAYMAN
-int cayman_irq_demux(int evt);
-int cayman_irq_describe(char* p, int irq);
-#define irq_demux(x) cayman_irq_demux(x)
-#define irq_describe(p, x) cayman_irq_describe(p, x)
-#else
-#define irq_demux(x) (intc_evt_to_irq[x])
-#define irq_describe(p, x) intc_irq_describe(p, x)
-#endif
-
-/*
- * Function for "on chip support modules".
- */
-
-/*
- * SH-5 supports Priority based interrupts only.
- * Interrupt priorities are defined at platform level.
- */
-#define set_ipr_data(a, b, c, d)
-#define make_ipr_irq(a)
-#define make_imask_irq(a)
+extern int platform_int_priority[NR_INTC_IRQS];
 
 #endif /* __ASM_SH64_IRQ_H */
diff --git a/include/asm-sh/platform.h b/include/asm-sh/platform.h
deleted file mode 100644 (file)
index bd0d9c4..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-#ifndef __ASM_SH64_PLATFORM_H
-#define __ASM_SH64_PLATFORM_H
-
-/*
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * include/asm-sh64/platform.h
- *
- * Copyright (C) 2000, 2001  Paolo Alberelli
- *
- * benedict.gaster@superh.com:  3rd May 2002
- *    Added support for ramdisk, removing statically linked romfs at the same time.
- */
-
-#include <linux/ioport.h>
-#include <asm/irq.h>
-
-
-/*
- * Platform definition structure.
- */
-struct sh64_platform {
-       unsigned int readonly_rootfs;
-       unsigned int ramdisk_flags;
-       unsigned int initial_root_dev;
-       unsigned int loader_type;
-       unsigned int initrd_start;
-       unsigned int initrd_size;
-       unsigned int fpu_flags;
-       unsigned int io_res_count;
-       unsigned int kram_res_count;
-       unsigned int xram_res_count;
-       unsigned int rom_res_count;
-       struct resource *io_res_p;
-       struct resource *kram_res_p;
-       struct resource *xram_res_p;
-       struct resource *rom_res_p;
-};
-
-extern struct sh64_platform platform_parms;
-
-extern unsigned long long memory_start, memory_end;
-
-extern unsigned long long fpu_in_use;
-
-extern int platform_int_priority[NR_INTC_IRQS];
-
-#define FPU_FLAGS              (platform_parms.fpu_flags)
-#define STANDARD_IO_RESOURCES  (platform_parms.io_res_count)
-#define STANDARD_KRAM_RESOURCES        (platform_parms.kram_res_count)
-#define STANDARD_XRAM_RESOURCES        (platform_parms.xram_res_count)
-#define STANDARD_ROM_RESOURCES (platform_parms.rom_res_count)
-
-/*
- * Kernel Memory description, Respectively:
- * code = last but one memory descriptor
- * data = last memory descriptor
- */
-#define code_resource (platform_parms.kram_res_p[STANDARD_KRAM_RESOURCES - 2])
-#define data_resource (platform_parms.kram_res_p[STANDARD_KRAM_RESOURCES - 1])
-
-#endif /* __ASM_SH64_PLATFORM_H */