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

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Sat May 9 15:35:16 CEST 2009


Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
---
applied to arm/testing

Best Regards,
J.
 cpu/arm720t/lpc2292/Makefile     |   11 +++++++--
 cpu/arm720t/lpc2292/interrupts.c |   41 ++++++++++++++++++++++++++++++++++++++
 cpu/arm720t/timer.c              |   12 -----------
 3 files changed, 49 insertions(+), 15 deletions(-)
 create mode 100644 cpu/arm720t/lpc2292/interrupts.c

diff --git a/cpu/arm720t/lpc2292/Makefile b/cpu/arm720t/lpc2292/Makefile
index 240f1e3..326d9d0 100644
--- a/cpu/arm720t/lpc2292/Makefile
+++ b/cpu/arm720t/lpc2292/Makefile
@@ -25,11 +25,16 @@ 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)
+OBJS	:= $(addprefix $(obj),$(COBJS-y))
 
 all:	$(obj).depend $(LIB)
 
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 at sysgo.de>
+ *
+ * (C) Copyright 2002
+ * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
+ * Alex Zuepke <azu at 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
-- 
1.6.2.4



More information about the U-Boot mailing list