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

ixp/interrupts: Move conditional compilation to Makefile

parent 8fc3bb4b
No related branches found
No related tags found
No related merge requests found
...@@ -27,9 +27,10 @@ LIB = $(obj)lib$(CPU).a ...@@ -27,9 +27,10 @@ LIB = $(obj)lib$(CPU).a
START = start.o START = start.o
COBJS-y += cpu.o COBJS-y += cpu.o
COBJS-y += interrupts.o
ifndef CONFIG_USE_IRQ ifndef CONFIG_USE_IRQ
COBJS-y += timer.o COBJS-y += timer.o
else
COBJS-y += interrupts.o
endif endif
SRCS := $(START:.o=.S) $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c) SRCS := $(START:.o=.S) $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
......
...@@ -31,8 +31,6 @@ ...@@ -31,8 +31,6 @@
#include <common.h> #include <common.h>
#include <asm/arch/ixp425.h> #include <asm/arch/ixp425.h>
#ifdef CONFIG_USE_IRQ
#include <asm/proc-armv/ptrace.h> #include <asm/proc-armv/ptrace.h>
/* /*
...@@ -85,20 +83,15 @@ void reset_timer (void) ...@@ -85,20 +83,15 @@ void reset_timer (void)
timestamp = 0; timestamp = 0;
} }
#endif /* #ifdef CONFIG_USE_IRQ */
#ifdef CONFIG_USE_IRQ
void do_irq (struct pt_regs *pt_regs) void do_irq (struct pt_regs *pt_regs)
{ {
int irq = next_irq(); int irq = next_irq();
IRQ_HANDLER[irq].m_func(IRQ_HANDLER[irq].m_data); IRQ_HANDLER[irq].m_func(IRQ_HANDLER[irq].m_data);
} }
#endif
int interrupt_init (void) int interrupt_init (void)
{ {
#ifdef CONFIG_USE_IRQ
int i; int i;
/* install default interrupt handlers */ /* install default interrupt handlers */
...@@ -119,7 +112,6 @@ int interrupt_init (void) ...@@ -119,7 +112,6 @@ int interrupt_init (void)
/* enable timer irq */ /* enable timer irq */
*IXP425_ICMR = (1 << IXP425_TIMER_2_IRQ); *IXP425_ICMR = (1 << IXP425_TIMER_2_IRQ);
#endif
return (0); return (0);
} }
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