]> git.sur5r.net Git - u-boot/commitdiff
arm: unify interrupt init
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Sat, 9 May 2009 11:21:18 +0000 (13:21 +0200)
committerWolfgang Denk <wd@denx.de>
Fri, 12 Jun 2009 18:39:52 +0000 (20:39 +0200)
all arm init the IRQ stack the same way
so unify it in lib_arm/interrupts.c and then call arch specific interrupt init

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
16 files changed:
cpu/arm1136/cpu.c
cpu/arm720t/cpu.c
cpu/arm720t/interrupts.c
cpu/arm920t/cpu.c
cpu/arm925t/cpu.c
cpu/arm926ejs/cpu.c
cpu/arm946es/cpu.c
cpu/arm_cortexa8/cpu.c
cpu/arm_intcm/cpu.c
cpu/ixp/cpu.c
cpu/ixp/interrupts.c
cpu/lh7a40x/cpu.c
cpu/pxa/cpu.c
cpu/sa1100/cpu.c
include/asm-arm/u-boot-arm.h
lib_arm/interrupts.c

index 7381da092c6c61ed7c1a00870076d3f4004c96a5..6104f9e38f4d6b1d58bfa36eab99200bbd217224 100644 (file)
 #include <command.h>
 #include <asm/system.h>
 
-#ifdef CONFIG_USE_IRQ
-DECLARE_GLOBAL_DATA_PTR;
-#endif
-
 static void cache_flush(void);
 
 int cpu_init (void)
 {
-       /*
-        * setup up stacks if necessary
-        */
-#ifdef CONFIG_USE_IRQ
-       IRQ_STACK_START = _armboot_start - CONFIG_SYS_MALLOC_LEN - CONFIG_SYS_GBL_DATA_SIZE - 4;
-       FIQ_STACK_START = IRQ_STACK_START - CONFIG_STACKSIZE_IRQ;
-#endif
        return 0;
 }
 
index 6c40903b7db75140c8aae6f3aeb478a9422f794a..7a2b9c37bc54b62a328e2a2e0bccd6add16fe5c3 100644 (file)
@@ -42,13 +42,6 @@ static void cache_flush(void);
 
 int cpu_init (void)
 {
-       /*
-        * setup up stacks if necessary
-        */
-#ifdef CONFIG_USE_IRQ
-       IRQ_STACK_START = _armboot_start - CONFIG_SYS_MALLOC_LEN - CONFIG_SYS_GBL_DATA_SIZE - 4;
-       FIQ_STACK_START = IRQ_STACK_START - CONFIG_STACKSIZE_IRQ;
-#endif
        return 0;
 }
 
index ff21314d8e2426b08617a89127fd11b8ed4c3751..91d552cd28a755d43c016c0c777c09e7878062ed 100644 (file)
@@ -111,7 +111,7 @@ static ulong timestamp;
 static ulong lastdec;
 
 #if defined(CONFIG_USE_IRQ) && defined(CONFIG_S3C4510B)
-int interrupt_init (void)
+int arch_interrupt_init (void)
 {
        int i;
 
index b6ef6bb8f5df0ae2cc3ad37b6d86fe9166551749..e4a8adb2d712c5c69b0a43376630a0adfb8b51a5 100644 (file)
 #include <command.h>
 #include <asm/system.h>
 
-#ifdef CONFIG_USE_IRQ
-DECLARE_GLOBAL_DATA_PTR;
-#endif
-
 static void cache_flush(void);
 
 int cpu_init (void)
 {
-       /*
-        * setup up stacks if necessary
-        */
-#ifdef CONFIG_USE_IRQ
-       IRQ_STACK_START = _armboot_start - CONFIG_SYS_MALLOC_LEN - CONFIG_SYS_GBL_DATA_SIZE - 4;
-       FIQ_STACK_START = IRQ_STACK_START - CONFIG_STACKSIZE_IRQ;
-#endif
        return 0;
 }
 
index 62828b174e206edf164017116043e34f12abcf93..e48f34151e440c25fc3e2a9ee631948cb7974c85 100644 (file)
 #include <arm925t.h>
 #include <asm/system.h>
 
-#ifdef CONFIG_USE_IRQ
-DECLARE_GLOBAL_DATA_PTR;
-#endif
-
 static void cache_flush(void);
 
 int cpu_init (void)
 {
-       /*
-        * setup up stacks if necessary
-        */
-#ifdef CONFIG_USE_IRQ
-       IRQ_STACK_START = _armboot_start - CONFIG_SYS_MALLOC_LEN - CONFIG_SYS_GBL_DATA_SIZE - 4;
-       FIQ_STACK_START = IRQ_STACK_START - CONFIG_STACKSIZE_IRQ;
-#endif
        return 0;
 }
 
index 1f70a3603a80cfeb41690f878b7eabd4baa4a2ef..0a3267385cf81adcc1d5ebe9ad15f20b69237c4f 100644 (file)
 #include <command.h>
 #include <asm/system.h>
 
-#ifdef CONFIG_USE_IRQ
-DECLARE_GLOBAL_DATA_PTR;
-#endif
-
 static void cache_flush(void);
 
 int cpu_init (void)
 {
-       /*
-        * setup up stacks if necessary
-        */
-#ifdef CONFIG_USE_IRQ
-       IRQ_STACK_START = _armboot_start - CONFIG_SYS_MALLOC_LEN - CONFIG_SYS_GBL_DATA_SIZE - 4;
-       FIQ_STACK_START = IRQ_STACK_START - CONFIG_STACKSIZE_IRQ;
-#endif
        return 0;
 }
 
index d3195f9a22f25fa82187a7b197db7eabdcd8da58..e0f91d36c68c6313882ac1579a0509b1240efd40 100644 (file)
 #include <command.h>
 #include <asm/system.h>
 
-#ifdef CONFIG_USE_IRQ
-DECLARE_GLOBAL_DATA_PTR;
-#endif
-
 static void cache_flush(void);
 
 int cpu_init (void)
 {
-       /*
-        * setup up stacks if necessary
-        */
-#ifdef CONFIG_USE_IRQ
-       IRQ_STACK_START = _armboot_start - CONFIG_SYS_MALLOC_LEN - CONFIG_SYS_GBL_DATA_SIZE - 4;
-       FIQ_STACK_START = IRQ_STACK_START - CONFIG_STACKSIZE_IRQ;
-#endif
        return 0;
 }
 
index ca6bf4f23427ded1a70ee6657df96252e2acefd0..b91cc4f3b3e4ee4d27f477242986b694f61409e9 100644 (file)
 #include <asm/arch/sys_proto.h>
 #include <asm/system.h>
 
-#ifdef CONFIG_USE_IRQ
-DECLARE_GLOBAL_DATA_PTR;
-#endif
-
 #ifndef CONFIG_L2_OFF
 void l2cache_disable(void);
 #endif
@@ -48,14 +44,6 @@ static void cache_flush(void);
 
 int cpu_init(void)
 {
-       /*
-        * setup up stacks if necessary
-        */
-#ifdef CONFIG_USE_IRQ
-       IRQ_STACK_START =
-           _armboot_start - CONFIG_SYS_MALLOC_LEN - CONFIG_SYS_GBL_DATA_SIZE - 4;
-       FIQ_STACK_START = IRQ_STACK_START - CONFIG_STACKSIZE_IRQ;
-#endif
        return 0;
 }
 
index b137f7664922e30c353c4b32bbde601f0a7de84b..488bd0c5a2d05a49fb7346d7e7daf1e8db504adb 100644 (file)
 #include <common.h>
 #include <command.h>
 
-#ifdef CONFIG_USE_IRQ
-DECLARE_GLOBAL_DATA_PTR;
-#endif
-
 int cpu_init (void)
 {
-       /*
-        * setup up stacks if necessary
-        */
-#ifdef CONFIG_USE_IRQ
-       IRQ_STACK_START = _armboot_start - CONFIG_SYS_MALLOC_LEN - CONFIG_SYS_GBL_DATA_SIZE - 4;
-       FIQ_STACK_START = IRQ_STACK_START - CONFIG_STACKSIZE_IRQ;
-#endif
        return 0;
 }
 
index 42c62f6e39774f6182e214994a1ae4fee43e1b76..5cfc39dafadb64d05d11dbe35b838050ab318533 100644 (file)
 
 ulong loops_per_jiffy;
 
-#ifdef CONFIG_USE_IRQ
-DECLARE_GLOBAL_DATA_PTR;
-#endif
-
 static void cache_flush(void);
 
 #if defined(CONFIG_DISPLAY_CPUINFO)
@@ -81,14 +77,6 @@ int print_cpuinfo (void)
 
 int cpu_init (void)
 {
-       /*
-        * setup up stacks if necessary
-        */
-#ifdef CONFIG_USE_IRQ
-       IRQ_STACK_START = _armboot_start - CONFIG_SYS_MALLOC_LEN - CONFIG_SYS_GBL_DATA_SIZE - 4;
-       FIQ_STACK_START = IRQ_STACK_START - CONFIG_STACKSIZE_IRQ;
-#endif
-
        return 0;
 }
 
index a05e439fdb5de4b8a4837c6db0a2b2afde9277f3..06a826af63e1b8f91cd8bc119240e475c45f1244 100644 (file)
@@ -67,7 +67,7 @@ void irq_install_handler (int irq, interrupt_handler_t handle_irq, void *data)
        IRQ_HANDLER[irq].m_func = handle_irq;
 }
 
-int interrupt_init (void)
+int arch_interrupt_init (void)
 {
        int i;
 
index be92f708b909fb012dd3c27f10dc9c1e3b729cc4..3cf0824c458aaae3b964f8004dba5533c6ee6bda 100644 (file)
 #include <command.h>
 #include <asm/system.h>
 
-#ifdef CONFIG_USE_IRQ
-DECLARE_GLOBAL_DATA_PTR;
-#endif
-
 static void cache_flush(void);
 
 int cpu_init (void)
 {
-       /*
-        * setup up stacks if necessary
-        */
-#ifdef CONFIG_USE_IRQ
-       IRQ_STACK_START = _armboot_start - CONFIG_SYS_MALLOC_LEN - CONFIG_SYS_GBL_DATA_SIZE - 4;
-       FIQ_STACK_START = IRQ_STACK_START - CONFIG_STACKSIZE_IRQ;
-#endif
        return 0;
 }
 
index 3a1be57f44a7a351db33e91d455b45d1ea96e9e2..8edb44eb45d7fb11e12146ee929b618f87f715c2 100644 (file)
 #include <asm/arch/pxa-regs.h>
 #include <asm/system.h>
 
-#ifdef CONFIG_USE_IRQ
-DECLARE_GLOBAL_DATA_PTR;
-#endif
-
 static void cache_flush(void);
 
 int cpu_init (void)
 {
-       /*
-        * setup up stacks if necessary
-        */
-#ifdef CONFIG_USE_IRQ
-       IRQ_STACK_START = _armboot_start - CONFIG_SYS_MALLOC_LEN - CONFIG_SYS_GBL_DATA_SIZE - 4;
-       FIQ_STACK_START = IRQ_STACK_START - CONFIG_STACKSIZE_IRQ;
-#endif
        return 0;
 }
 
index ed1a6f7cd30d4e4ff7b4f3cd5b09c93d54ae338a..39285a0ccaa91c35b1805f26936be281b3a8eb2b 100644 (file)
@@ -42,13 +42,6 @@ static void cache_flush(void);
 
 int cpu_init (void)
 {
-       /*
-        * setup up stacks if necessary
-        */
-#ifdef CONFIG_USE_IRQ
-       IRQ_STACK_START = _armboot_start - CONFIG_SYS_MALLOC_LEN - CONFIG_SYS_GBL_DATA_SIZE - 4;
-       FIQ_STACK_START = IRQ_STACK_START - CONFIG_STACKSIZE_IRQ;
-#endif
        return 0;
 }
 
index 238d4085419e91f5840ad8d270401737056d34a9..76f1ffa5a2c2cd43ecf7765f093b6d988527452a 100644 (file)
@@ -58,6 +58,7 @@ void  setup_revision_tag (struct tag **params);
 int    setenv          (char *, char *);
 
 /* cpu/.../interrupt.c */
+int    arch_interrupt_init     (void);
 void   reset_timer_masked      (void);
 ulong  get_timer_masked        (void);
 void   udelay_masked           (unsigned long usec);
index 8bb950b12bca9939cfa9f7370e426794c0d66bba..1f2b815611cfd4cc9b74c7c61722c492deff0868 100644 (file)
 #include <asm/proc-armv/ptrace.h>
 
 #ifdef CONFIG_USE_IRQ
+DECLARE_GLOBAL_DATA_PTR;
+
+int interrupt_init (void)
+{
+       /*
+        * setup up stacks if necessary
+        */
+       IRQ_STACK_START = _armboot_start - CONFIG_SYS_MALLOC_LEN - CONFIG_SYS_GBL_DATA_SIZE - 4;
+       FIQ_STACK_START = IRQ_STACK_START - CONFIG_STACKSIZE_IRQ;
+
+       return arch_interrupt_init();
+}
+
 /* enable IRQ interrupts */
 void enable_interrupts (void)
 {