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 7381da0..6104f9e 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 6c40903..7a2b9c3 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 ff21314..91d552c 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 b6ef6bb..e4a8adb 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 62828b1..e48f341 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 1f70a36..0a32673 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 d3195f9..e0f91d3 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 ca6bf4f..b91cc4f 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 b137f76..488bd0c 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 42c62f6..5cfc39d 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 a05e439..06a826a 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 be92f70..3cf0824 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 3a1be57..8edb44e 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 ed1a6f7..39285a0 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 238d408..76f1ffa 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 8bb950b..1f2b815 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)
 {