Skip to content
Snippets Groups Projects
Commit c358d9c3 authored by Jean-Christophe PLAGNIOL-VILLARD's avatar Jean-Christophe PLAGNIOL-VILLARD Committed by Wolfgang Denk
Browse files

arm: unify interrupt init


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: default avatarJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
parent 10a451cd
No related branches found
No related tags found
No related merge requests found
...@@ -35,21 +35,10 @@ ...@@ -35,21 +35,10 @@
#include <command.h> #include <command.h>
#include <asm/system.h> #include <asm/system.h>
#ifdef CONFIG_USE_IRQ
DECLARE_GLOBAL_DATA_PTR;
#endif
static void cache_flush(void); static void cache_flush(void);
int cpu_init (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; return 0;
} }
......
...@@ -42,13 +42,6 @@ static void cache_flush(void); ...@@ -42,13 +42,6 @@ static void cache_flush(void);
int cpu_init (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; return 0;
} }
......
...@@ -111,7 +111,7 @@ static ulong timestamp; ...@@ -111,7 +111,7 @@ static ulong timestamp;
static ulong lastdec; static ulong lastdec;
#if defined(CONFIG_USE_IRQ) && defined(CONFIG_S3C4510B) #if defined(CONFIG_USE_IRQ) && defined(CONFIG_S3C4510B)
int interrupt_init (void) int arch_interrupt_init (void)
{ {
int i; int i;
......
...@@ -33,21 +33,10 @@ ...@@ -33,21 +33,10 @@
#include <command.h> #include <command.h>
#include <asm/system.h> #include <asm/system.h>
#ifdef CONFIG_USE_IRQ
DECLARE_GLOBAL_DATA_PTR;
#endif
static void cache_flush(void); static void cache_flush(void);
int cpu_init (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; return 0;
} }
......
...@@ -34,21 +34,10 @@ ...@@ -34,21 +34,10 @@
#include <arm925t.h> #include <arm925t.h>
#include <asm/system.h> #include <asm/system.h>
#ifdef CONFIG_USE_IRQ
DECLARE_GLOBAL_DATA_PTR;
#endif
static void cache_flush(void); static void cache_flush(void);
int cpu_init (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; return 0;
} }
......
...@@ -33,21 +33,10 @@ ...@@ -33,21 +33,10 @@
#include <command.h> #include <command.h>
#include <asm/system.h> #include <asm/system.h>
#ifdef CONFIG_USE_IRQ
DECLARE_GLOBAL_DATA_PTR;
#endif
static void cache_flush(void); static void cache_flush(void);
int cpu_init (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; return 0;
} }
......
...@@ -33,21 +33,10 @@ ...@@ -33,21 +33,10 @@
#include <command.h> #include <command.h>
#include <asm/system.h> #include <asm/system.h>
#ifdef CONFIG_USE_IRQ
DECLARE_GLOBAL_DATA_PTR;
#endif
static void cache_flush(void); static void cache_flush(void);
int cpu_init (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; return 0;
} }
......
...@@ -36,10 +36,6 @@ ...@@ -36,10 +36,6 @@
#include <asm/arch/sys_proto.h> #include <asm/arch/sys_proto.h>
#include <asm/system.h> #include <asm/system.h>
#ifdef CONFIG_USE_IRQ
DECLARE_GLOBAL_DATA_PTR;
#endif
#ifndef CONFIG_L2_OFF #ifndef CONFIG_L2_OFF
void l2cache_disable(void); void l2cache_disable(void);
#endif #endif
...@@ -48,14 +44,6 @@ static void cache_flush(void); ...@@ -48,14 +44,6 @@ static void cache_flush(void);
int cpu_init(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; return 0;
} }
......
...@@ -33,19 +33,8 @@ ...@@ -33,19 +33,8 @@
#include <common.h> #include <common.h>
#include <command.h> #include <command.h>
#ifdef CONFIG_USE_IRQ
DECLARE_GLOBAL_DATA_PTR;
#endif
int cpu_init (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; return 0;
} }
......
...@@ -38,10 +38,6 @@ ...@@ -38,10 +38,6 @@
ulong loops_per_jiffy; ulong loops_per_jiffy;
#ifdef CONFIG_USE_IRQ
DECLARE_GLOBAL_DATA_PTR;
#endif
static void cache_flush(void); static void cache_flush(void);
#if defined(CONFIG_DISPLAY_CPUINFO) #if defined(CONFIG_DISPLAY_CPUINFO)
...@@ -81,14 +77,6 @@ int print_cpuinfo (void) ...@@ -81,14 +77,6 @@ int print_cpuinfo (void)
int cpu_init (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; return 0;
} }
......
...@@ -67,7 +67,7 @@ void irq_install_handler (int irq, interrupt_handler_t handle_irq, void *data) ...@@ -67,7 +67,7 @@ void irq_install_handler (int irq, interrupt_handler_t handle_irq, void *data)
IRQ_HANDLER[irq].m_func = handle_irq; IRQ_HANDLER[irq].m_func = handle_irq;
} }
int interrupt_init (void) int arch_interrupt_init (void)
{ {
int i; int i;
......
...@@ -33,21 +33,10 @@ ...@@ -33,21 +33,10 @@
#include <command.h> #include <command.h>
#include <asm/system.h> #include <asm/system.h>
#ifdef CONFIG_USE_IRQ
DECLARE_GLOBAL_DATA_PTR;
#endif
static void cache_flush(void); static void cache_flush(void);
int cpu_init (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; return 0;
} }
......
...@@ -35,21 +35,10 @@ ...@@ -35,21 +35,10 @@
#include <asm/arch/pxa-regs.h> #include <asm/arch/pxa-regs.h>
#include <asm/system.h> #include <asm/system.h>
#ifdef CONFIG_USE_IRQ
DECLARE_GLOBAL_DATA_PTR;
#endif
static void cache_flush(void); static void cache_flush(void);
int cpu_init (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; return 0;
} }
......
...@@ -42,13 +42,6 @@ static void cache_flush(void); ...@@ -42,13 +42,6 @@ static void cache_flush(void);
int cpu_init (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; return 0;
} }
......
...@@ -58,6 +58,7 @@ void setup_revision_tag (struct tag **params); ...@@ -58,6 +58,7 @@ void setup_revision_tag (struct tag **params);
int setenv (char *, char *); int setenv (char *, char *);
/* cpu/.../interrupt.c */ /* cpu/.../interrupt.c */
int arch_interrupt_init (void);
void reset_timer_masked (void); void reset_timer_masked (void);
ulong get_timer_masked (void); ulong get_timer_masked (void);
void udelay_masked (unsigned long usec); void udelay_masked (unsigned long usec);
......
...@@ -39,6 +39,19 @@ ...@@ -39,6 +39,19 @@
#include <asm/proc-armv/ptrace.h> #include <asm/proc-armv/ptrace.h>
#ifdef CONFIG_USE_IRQ #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 */ /* enable IRQ interrupts */
void enable_interrupts (void) void enable_interrupts (void)
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment