From: Jean-Christophe PLAGNIOL-VILLARD Date: Mon, 22 Jun 2009 22:12:01 +0000 (+0200) Subject: S3C24x0: extract interrupts from timer X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=8d460a573e2a2ac4834636903865a0428ad0e629;p=u-boot.git S3C24x0: extract interrupts from timer Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD --- diff --git a/cpu/arm920t/interrupts.c b/cpu/arm920t/interrupts.c index 539eb5c451..561083ec73 100644 --- a/cpu/arm920t/interrupts.c +++ b/cpu/arm920t/interrupts.c @@ -32,16 +32,12 @@ #include #include +#if defined (CONFIG_ARCH_INTEGRATOR) void do_irq (struct pt_regs *pt_regs) { -#if defined (ARM920_IRQ_CALLBACK) - ARM920_IRQ_CALLBACK(); -#elif defined (CONFIG_ARCH_INTEGRATOR) /* ASSUMED to be a timer interrupt */ /* Just clear it - count handled in */ /* integratorap.c */ *(volatile ulong *)(CONFIG_SYS_TIMERBASE + 0x0C) = 0; -#else -#error do_irq() not defined for this cpu type -#endif } +#endif diff --git a/cpu/arm920t/s3c24x0/Makefile b/cpu/arm920t/s3c24x0/Makefile index 5d2be2c1b2..7e8d6ed5f2 100644 --- a/cpu/arm920t/s3c24x0/Makefile +++ b/cpu/arm920t/s3c24x0/Makefile @@ -25,13 +25,15 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(SOC).a -COBJS += speed.o -COBJS += timer.o -COBJS += usb.o -COBJS += usb_ohci.o +COBJS-$(CONFIG_USE_IRQ) += interrupts.o +COBJS-y += speed.o +COBJS-y += timer.o +COBJS-y += usb.o +COBJS-y += usb_ohci.o -SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) + +SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c) +OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS-y)) all: $(obj).depend $(LIB) diff --git a/cpu/arm920t/s3c24x0/interrupts.c b/cpu/arm920t/s3c24x0/interrupts.c new file mode 100644 index 0000000000..11ec95e126 --- /dev/null +++ b/cpu/arm920t/s3c24x0/interrupts.c @@ -0,0 +1,46 @@ +/* + * (C) Copyright 2002 + * Sysgo Real-Time Solutions, GmbH + * Marius Groeger + * + * (C) Copyright 2002 + * Sysgo Real-Time Solutions, GmbH + * Alex Zuepke + * + * (C) Copyright 2002 + * Gary Jennejohn, DENX Software Engineering, + * + * 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 + +#if defined(CONFIG_S3C2400) +#include +#elif defined(CONFIG_S3C2410) +#include +#endif +#include + +void do_irq (struct pt_regs *pt_regs) +{ + S3C24X0_INTERRUPT * irq = S3C24X0_GetBase_INTERRUPT(); + u_int32_t intpnd = irq->INTPND; + +} diff --git a/cpu/arm920t/s3c24x0/timer.c b/cpu/arm920t/s3c24x0/timer.c index f0a09cddff..c8c7cdb520 100644 --- a/cpu/arm920t/s3c24x0/timer.c +++ b/cpu/arm920t/s3c24x0/timer.c @@ -215,13 +215,4 @@ void reset_cpu (ulong ignored) /*NOTREACHED*/ } -#ifdef CONFIG_USE_IRQ -void s3c2410_irq(void) -{ - S3C24X0_INTERRUPT * irq = S3C24X0_GetBase_INTERRUPT(); - u_int32_t intpnd = irq->INTPND; - -} -#endif /* USE_IRQ */ - #endif /* defined(CONFIG_S3C2400) || defined (CONFIG_S3C2410) || defined (CONFIG_TRAB) */ diff --git a/include/common.h b/include/common.h index ff4f821dd2..6284b8aff8 100644 --- a/include/common.h +++ b/include/common.h @@ -493,8 +493,6 @@ ulong get_PCI_freq (void); #endif #if defined(CONFIG_S3C2400) || defined(CONFIG_S3C2410) || \ defined(CONFIG_LH7A40X) || defined(CONFIG_S3C6400) -void s3c2410_irq(void); -#define ARM920_IRQ_CALLBACK s3c2410_irq ulong get_FCLK (void); ulong get_HCLK (void); ulong get_PCLK (void);