diff mbox

[U-Boot,4/4] lpc2292: move interrupts code to soc

Message ID 1241129278-20661-4-git-send-email-plagnioj@jcrosoft.com
State Rejected
Delegated to: Albert ARIBAUD
Headers show

Commit Message

Jean-Christophe PLAGNIOL-VILLARD April 30, 2009, 10:07 p.m. UTC
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 cpu/arm720t/lpc2292/Makefile     |   15 +++++++++----
 cpu/arm720t/lpc2292/interrupts.c |   41 ++++++++++++++++++++++++++++++++++++++
 cpu/arm720t/timer.c              |   12 -----------
 3 files changed, 51 insertions(+), 17 deletions(-)
 create mode 100644 cpu/arm720t/lpc2292/interrupts.c
diff mbox

Patch

diff --git a/cpu/arm720t/lpc2292/Makefile b/cpu/arm720t/lpc2292/Makefile
index 240f1e3..296f53f 100644
--- a/cpu/arm720t/lpc2292/Makefile
+++ b/cpu/arm720t/lpc2292/Makefile
@@ -25,16 +25,21 @@  include $(TOPDIR)/config.mk
 
 LIB	= $(obj)lib$(SOC).a
 
-COBJS	= flash.o mmc.o mmc_hw.o spi.o
 SOBJS	= $(obj)iap_entry.o
 
-SRCS	:= $(COBJS:.o=.c)
-OBJS	:= $(addprefix $(obj),$(COBJS))
+COBJS-y	+= flash.o
+COBJS-$(CONFIG_USE_IRQ)	+= interrupts.o
+COBJS-y	+= mmc.o
+COBJS-y	+= mmc_hw.o spi.o
+COBJS-y	+= spi.o
+
+SRCS	:= $(COBJS-y:.o=.c)
+COBJS	:= $(addprefix $(obj),$(COBJS-y))
 
 all:	$(obj).depend $(LIB)
 
-$(LIB):	$(OBJS) $(SOBJS)
-	$(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
+$(LIB):	$(COBJS) $(SOBJS)
+	$(AR) $(ARFLAGS) $@ $(COBJS) $(SOBJS)
 
 # this MUST be compiled as thumb code!
 $(SOBJS):
diff --git a/cpu/arm720t/lpc2292/interrupts.c b/cpu/arm720t/lpc2292/interrupts.c
new file mode 100644
index 0000000..4183f77
--- /dev/null
+++ b/cpu/arm720t/lpc2292/interrupts.c
@@ -0,0 +1,41 @@ 
+/*
+ * (C) Copyright 2002
+ * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
+ * Marius Groeger <mgroeger@sysgo.de>
+ *
+ * (C) Copyright 2002
+ * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
+ * Alex Zuepke <azu@sysgo.de>
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include <common.h>
+#include <clps7111.h>
+#include <asm/proc-armv/ptrace.h>
+#include <asm/hardware.h>
+
+void do_irq (struct pt_regs *pt_regs)
+{
+	void (*pfnct)(void);
+
+	pfnct = (void (*)(void))VICVectAddr;
+
+	(*pfnct)();
+}
diff --git a/cpu/arm720t/timer.c b/cpu/arm720t/timer.c
index 98588af..5352c79 100644
--- a/cpu/arm720t/timer.c
+++ b/cpu/arm720t/timer.c
@@ -28,7 +28,6 @@ 
 
 #include <common.h>
 #include <clps7111.h>
-#include <asm/proc-armv/ptrace.h>
 #include <asm/hardware.h>
 
 #ifndef CONFIG_NETARM
@@ -50,17 +49,6 @@ 
 #define READ_TIMER (TM2STAT & NETARM_GEN_TSTAT_CTC_MASK)
 #endif
 
-#if defined(CONFIG_USE_IRQ) && defined(CONFIG_LPC2292)
-void do_irq (struct pt_regs *pt_regs)
-{
-    void (*pfnct)(void);
-
-    pfnct = (void (*)(void))VICVectAddr;
-
-    (*pfnct)();
-}
-#endif
-
 #if defined(CONFIG_INTEGRATOR) && defined(CONFIG_ARCH_INTEGRATOR)
 	/* Use IntegratorAP routines in board/integratorap.c */
 #else