* [U-Boot] [PATCH 1/6] arm: unify interrupt init
@ 2009-05-09 13:35 Jean-Christophe PLAGNIOL-VILLARD
2009-05-09 13:35 ` [U-Boot] [PATCH 2/6] arm: remove cpu_init Jean-Christophe PLAGNIOL-VILLARD
2009-05-10 7:42 ` [U-Boot] [PATCH 1/6] arm: unify interrupt init Dirk Behme
0 siblings, 2 replies; 15+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2009-05-09 13:35 UTC (permalink / raw)
To: u-boot
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: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
applied to arm/testing
Best Regards,
J.
cpu/arm1136/cpu.c | 11 -----------
cpu/arm720t/cpu.c | 7 -------
cpu/arm720t/interrupts.c | 2 +-
cpu/arm920t/cpu.c | 11 -----------
cpu/arm925t/cpu.c | 11 -----------
cpu/arm926ejs/cpu.c | 11 -----------
cpu/arm946es/cpu.c | 11 -----------
cpu/arm_cortexa8/cpu.c | 12 ------------
cpu/arm_intcm/cpu.c | 11 -----------
cpu/ixp/cpu.c | 12 ------------
cpu/ixp/interrupts.c | 2 +-
cpu/lh7a40x/cpu.c | 11 -----------
cpu/pxa/cpu.c | 11 -----------
cpu/sa1100/cpu.c | 7 -------
include/asm-arm/u-boot-arm.h | 1 +
lib_arm/interrupts.c | 13 +++++++++++++
16 files changed, 16 insertions(+), 128 deletions(-)
diff --git a/cpu/arm1136/cpu.c b/cpu/arm1136/cpu.c
index e03a765..f467b7a 100644
--- a/cpu/arm1136/cpu.c
+++ b/cpu/arm1136/cpu.c
@@ -35,21 +35,10 @@
#include <command.h>
#include <asm/system.h>
-#ifdef CONFIG_USE_IRQ
-DECLARE_GLOBAL_DATA_PTR;
-#endif
-
static void cache_flush(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;
}
diff --git a/cpu/arm720t/cpu.c b/cpu/arm720t/cpu.c
index 6c40903..7a2b9c3 100644
--- a/cpu/arm720t/cpu.c
+++ b/cpu/arm720t/cpu.c
@@ -42,13 +42,6 @@ static void cache_flush(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;
}
diff --git a/cpu/arm720t/interrupts.c b/cpu/arm720t/interrupts.c
index ff21314..91d552c 100644
--- a/cpu/arm720t/interrupts.c
+++ b/cpu/arm720t/interrupts.c
@@ -111,7 +111,7 @@ static ulong timestamp;
static ulong lastdec;
#if defined(CONFIG_USE_IRQ) && defined(CONFIG_S3C4510B)
-int interrupt_init (void)
+int arch_interrupt_init (void)
{
int i;
diff --git a/cpu/arm920t/cpu.c b/cpu/arm920t/cpu.c
index 8542f0a..9d5d025 100644
--- a/cpu/arm920t/cpu.c
+++ b/cpu/arm920t/cpu.c
@@ -33,21 +33,10 @@
#include <command.h>
#include <asm/system.h>
-#ifdef CONFIG_USE_IRQ
-DECLARE_GLOBAL_DATA_PTR;
-#endif
-
static void cache_flush(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;
}
diff --git a/cpu/arm925t/cpu.c b/cpu/arm925t/cpu.c
index a9778dc..354ba5c 100644
--- a/cpu/arm925t/cpu.c
+++ b/cpu/arm925t/cpu.c
@@ -34,21 +34,10 @@
#include <arm925t.h>
#include <asm/system.h>
-#ifdef CONFIG_USE_IRQ
-DECLARE_GLOBAL_DATA_PTR;
-#endif
-
static void cache_flush(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;
}
diff --git a/cpu/arm926ejs/cpu.c b/cpu/arm926ejs/cpu.c
index e483de6..978bfcd 100644
--- a/cpu/arm926ejs/cpu.c
+++ b/cpu/arm926ejs/cpu.c
@@ -33,21 +33,10 @@
#include <command.h>
#include <asm/system.h>
-#ifdef CONFIG_USE_IRQ
-DECLARE_GLOBAL_DATA_PTR;
-#endif
-
static void cache_flush(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;
}
diff --git a/cpu/arm946es/cpu.c b/cpu/arm946es/cpu.c
index 04e49d6..3939322 100644
--- a/cpu/arm946es/cpu.c
+++ b/cpu/arm946es/cpu.c
@@ -33,21 +33,10 @@
#include <command.h>
#include <asm/system.h>
-#ifdef CONFIG_USE_IRQ
-DECLARE_GLOBAL_DATA_PTR;
-#endif
-
static void cache_flush(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;
}
diff --git a/cpu/arm_cortexa8/cpu.c b/cpu/arm_cortexa8/cpu.c
index 3e1780b..e911206 100644
--- a/cpu/arm_cortexa8/cpu.c
+++ b/cpu/arm_cortexa8/cpu.c
@@ -36,10 +36,6 @@
#include <asm/arch/sys_proto.h>
#include <asm/system.h>
-#ifdef CONFIG_USE_IRQ
-DECLARE_GLOBAL_DATA_PTR;
-#endif
-
#ifndef CONFIG_L2_OFF
void l2cache_disable(void);
#endif
@@ -48,14 +44,6 @@ static void cache_flush(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;
}
diff --git a/cpu/arm_intcm/cpu.c b/cpu/arm_intcm/cpu.c
index 1636ffb..9ce17f2 100644
--- a/cpu/arm_intcm/cpu.c
+++ b/cpu/arm_intcm/cpu.c
@@ -33,19 +33,8 @@
#include <common.h>
#include <command.h>
-#ifdef CONFIG_USE_IRQ
-DECLARE_GLOBAL_DATA_PTR;
-#endif
-
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;
}
diff --git a/cpu/ixp/cpu.c b/cpu/ixp/cpu.c
index 42c62f6..5cfc39d 100644
--- a/cpu/ixp/cpu.c
+++ b/cpu/ixp/cpu.c
@@ -38,10 +38,6 @@
ulong loops_per_jiffy;
-#ifdef CONFIG_USE_IRQ
-DECLARE_GLOBAL_DATA_PTR;
-#endif
-
static void cache_flush(void);
#if defined(CONFIG_DISPLAY_CPUINFO)
@@ -81,14 +77,6 @@ int print_cpuinfo (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;
}
diff --git a/cpu/ixp/interrupts.c b/cpu/ixp/interrupts.c
index a05e439..06a826a 100644
--- a/cpu/ixp/interrupts.c
+++ b/cpu/ixp/interrupts.c
@@ -67,7 +67,7 @@ void irq_install_handler (int irq, interrupt_handler_t handle_irq, void *data)
IRQ_HANDLER[irq].m_func = handle_irq;
}
-int interrupt_init (void)
+int arch_interrupt_init (void)
{
int i;
diff --git a/cpu/lh7a40x/cpu.c b/cpu/lh7a40x/cpu.c
index 77e6394..f47ca03 100644
--- a/cpu/lh7a40x/cpu.c
+++ b/cpu/lh7a40x/cpu.c
@@ -33,21 +33,10 @@
#include <command.h>
#include <asm/system.h>
-#ifdef CONFIG_USE_IRQ
-DECLARE_GLOBAL_DATA_PTR;
-#endif
-
static void cache_flush(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;
}
diff --git a/cpu/pxa/cpu.c b/cpu/pxa/cpu.c
index 3a1be57..8edb44e 100644
--- a/cpu/pxa/cpu.c
+++ b/cpu/pxa/cpu.c
@@ -35,21 +35,10 @@
#include <asm/arch/pxa-regs.h>
#include <asm/system.h>
-#ifdef CONFIG_USE_IRQ
-DECLARE_GLOBAL_DATA_PTR;
-#endif
-
static void cache_flush(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;
}
diff --git a/cpu/sa1100/cpu.c b/cpu/sa1100/cpu.c
index ed1a6f7..39285a0 100644
--- a/cpu/sa1100/cpu.c
+++ b/cpu/sa1100/cpu.c
@@ -42,13 +42,6 @@ static void cache_flush(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;
}
diff --git a/include/asm-arm/u-boot-arm.h b/include/asm-arm/u-boot-arm.h
index 238d408..76f1ffa 100644
--- a/include/asm-arm/u-boot-arm.h
+++ b/include/asm-arm/u-boot-arm.h
@@ -58,6 +58,7 @@ void setup_revision_tag (struct tag **params);
int setenv (char *, char *);
/* cpu/.../interrupt.c */
+int arch_interrupt_init (void);
void reset_timer_masked (void);
ulong get_timer_masked (void);
void udelay_masked (unsigned long usec);
diff --git a/lib_arm/interrupts.c b/lib_arm/interrupts.c
index 4dafbfa..d26b724 100644
--- a/lib_arm/interrupts.c
+++ b/lib_arm/interrupts.c
@@ -39,6 +39,19 @@
#include <asm/proc-armv/ptrace.h>
#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 */
void enable_interrupts (void)
{
--
1.6.2.4
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH 2/6] arm: remove cpu_init
2009-05-09 13:35 [U-Boot] [PATCH 1/6] arm: unify interrupt init Jean-Christophe PLAGNIOL-VILLARD
@ 2009-05-09 13:35 ` Jean-Christophe PLAGNIOL-VILLARD
2009-05-09 13:35 ` [U-Boot] [PATCH 3/6] s3c4510b: move interrupts code to soc Jean-Christophe PLAGNIOL-VILLARD
2009-05-10 7:42 ` [U-Boot] [PATCH 2/6] arm: remove cpu_init Dirk Behme
2009-05-10 7:42 ` [U-Boot] [PATCH 1/6] arm: unify interrupt init Dirk Behme
1 sibling, 2 replies; 15+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2009-05-09 13:35 UTC (permalink / raw)
To: u-boot
move s3c44b0 to arch_cpu_init and as noone use cpu_init remove it
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
applied to arm/testing
Best Regards,
J.
cpu/arm1136/cpu.c | 5 -----
cpu/arm1176/cpu.c | 5 -----
cpu/arm720t/cpu.c | 5 -----
cpu/arm920t/cpu.c | 5 -----
cpu/arm925t/cpu.c | 5 -----
cpu/arm926ejs/cpu.c | 5 -----
cpu/arm946es/cpu.c | 5 -----
cpu/arm_cortexa8/cpu.c | 5 -----
cpu/arm_intcm/cpu.c | 5 -----
cpu/ixp/cpu.c | 5 -----
cpu/lh7a40x/cpu.c | 5 -----
cpu/pxa/cpu.c | 5 -----
cpu/s3c44b0/cpu.c | 2 +-
cpu/sa1100/cpu.c | 5 -----
include/configs/B2.h | 1 +
lib_arm/board.c | 1 -
16 files changed, 2 insertions(+), 67 deletions(-)
diff --git a/cpu/arm1136/cpu.c b/cpu/arm1136/cpu.c
index f467b7a..c2110c9 100644
--- a/cpu/arm1136/cpu.c
+++ b/cpu/arm1136/cpu.c
@@ -37,11 +37,6 @@
static void cache_flush(void);
-int cpu_init (void)
-{
- return 0;
-}
-
int cleanup_before_linux (void)
{
/*
diff --git a/cpu/arm1176/cpu.c b/cpu/arm1176/cpu.c
index bfa4378..bd1e4dd 100644
--- a/cpu/arm1176/cpu.c
+++ b/cpu/arm1176/cpu.c
@@ -38,11 +38,6 @@
static void cache_flush (void);
-int cpu_init (void)
-{
- return 0;
-}
-
int cleanup_before_linux (void)
{
/*
diff --git a/cpu/arm720t/cpu.c b/cpu/arm720t/cpu.c
index 7a2b9c3..88c71bf 100644
--- a/cpu/arm720t/cpu.c
+++ b/cpu/arm720t/cpu.c
@@ -40,11 +40,6 @@
static void cache_flush(void);
#endif
-int cpu_init (void)
-{
- return 0;
-}
-
int cleanup_before_linux (void)
{
/*
diff --git a/cpu/arm920t/cpu.c b/cpu/arm920t/cpu.c
index 9d5d025..0c7d73f 100644
--- a/cpu/arm920t/cpu.c
+++ b/cpu/arm920t/cpu.c
@@ -35,11 +35,6 @@
static void cache_flush(void);
-int cpu_init (void)
-{
- return 0;
-}
-
int cleanup_before_linux (void)
{
/*
diff --git a/cpu/arm925t/cpu.c b/cpu/arm925t/cpu.c
index 354ba5c..893eec0 100644
--- a/cpu/arm925t/cpu.c
+++ b/cpu/arm925t/cpu.c
@@ -36,11 +36,6 @@
static void cache_flush(void);
-int cpu_init (void)
-{
- return 0;
-}
-
int cleanup_before_linux (void)
{
/*
diff --git a/cpu/arm926ejs/cpu.c b/cpu/arm926ejs/cpu.c
index 978bfcd..82f4242 100644
--- a/cpu/arm926ejs/cpu.c
+++ b/cpu/arm926ejs/cpu.c
@@ -35,11 +35,6 @@
static void cache_flush(void);
-int cpu_init (void)
-{
- return 0;
-}
-
int cleanup_before_linux (void)
{
/*
diff --git a/cpu/arm946es/cpu.c b/cpu/arm946es/cpu.c
index 3939322..8816071 100644
--- a/cpu/arm946es/cpu.c
+++ b/cpu/arm946es/cpu.c
@@ -35,11 +35,6 @@
static void cache_flush(void);
-int cpu_init (void)
-{
- return 0;
-}
-
int cleanup_before_linux (void)
{
/*
diff --git a/cpu/arm_cortexa8/cpu.c b/cpu/arm_cortexa8/cpu.c
index e911206..9c2d5da 100644
--- a/cpu/arm_cortexa8/cpu.c
+++ b/cpu/arm_cortexa8/cpu.c
@@ -42,11 +42,6 @@ void l2cache_disable(void);
static void cache_flush(void);
-int cpu_init(void)
-{
- return 0;
-}
-
int cleanup_before_linux(void)
{
unsigned int i;
diff --git a/cpu/arm_intcm/cpu.c b/cpu/arm_intcm/cpu.c
index 9ce17f2..1310604 100644
--- a/cpu/arm_intcm/cpu.c
+++ b/cpu/arm_intcm/cpu.c
@@ -33,11 +33,6 @@
#include <common.h>
#include <command.h>
-int cpu_init (void)
-{
- return 0;
-}
-
int cleanup_before_linux (void)
{
/*
diff --git a/cpu/ixp/cpu.c b/cpu/ixp/cpu.c
index 5cfc39d..ce275e5 100644
--- a/cpu/ixp/cpu.c
+++ b/cpu/ixp/cpu.c
@@ -75,11 +75,6 @@ int print_cpuinfo (void)
}
#endif /* CONFIG_DISPLAY_CPUINFO */
-int cpu_init (void)
-{
- return 0;
-}
-
int cleanup_before_linux (void)
{
/*
diff --git a/cpu/lh7a40x/cpu.c b/cpu/lh7a40x/cpu.c
index f47ca03..9808ab8 100644
--- a/cpu/lh7a40x/cpu.c
+++ b/cpu/lh7a40x/cpu.c
@@ -35,11 +35,6 @@
static void cache_flush(void);
-int cpu_init (void)
-{
- return 0;
-}
-
int cleanup_before_linux (void)
{
/*
diff --git a/cpu/pxa/cpu.c b/cpu/pxa/cpu.c
index 8edb44e..800d120 100644
--- a/cpu/pxa/cpu.c
+++ b/cpu/pxa/cpu.c
@@ -37,11 +37,6 @@
static void cache_flush(void);
-int cpu_init (void)
-{
- return 0;
-}
-
int cleanup_before_linux (void)
{
/*
diff --git a/cpu/s3c44b0/cpu.c b/cpu/s3c44b0/cpu.c
index 7ef4a1f..bca38f8 100644
--- a/cpu/s3c44b0/cpu.c
+++ b/cpu/s3c44b0/cpu.c
@@ -32,7 +32,7 @@
#include <command.h>
#include <asm/hardware.h>
-int cpu_init (void)
+int arch_cpu_init (void)
{
icache_enable();
diff --git a/cpu/sa1100/cpu.c b/cpu/sa1100/cpu.c
index 39285a0..58e90dc 100644
--- a/cpu/sa1100/cpu.c
+++ b/cpu/sa1100/cpu.c
@@ -40,11 +40,6 @@ DECLARE_GLOBAL_DATA_PTR;
static void cache_flush(void);
-int cpu_init (void)
-{
- return 0;
-}
-
int cleanup_before_linux (void)
{
/*
diff --git a/include/configs/B2.h b/include/configs/B2.h
index 35fad5c..e5439f3 100644
--- a/include/configs/B2.h
+++ b/include/configs/B2.h
@@ -39,6 +39,7 @@
#define CONFIG_ARM_THUMB 1 /* this is an ARM7TDMI */
#undef CONFIG_ARM7_REVD /* disable ARM720 REV.D Workarounds */
#define CONFIG_SYS_NO_CP15_CACHE
+#define CONFIG_ARCH_CPU_INIT
#define CONFIG_S3C44B0_CLOCK_SPEED 75 /* we have a 75Mhz S3C44B0*/
diff --git a/lib_arm/board.c b/lib_arm/board.c
index 344120f..452b177 100644
--- a/lib_arm/board.c
+++ b/lib_arm/board.c
@@ -265,7 +265,6 @@ typedef int (init_fnc_t) (void);
int print_cpuinfo (void);
init_fnc_t *init_sequence[] = {
- cpu_init, /* basic cpu dependent setup */
#if defined(CONFIG_ARCH_CPU_INIT)
arch_cpu_init, /* basic arch cpu dependent setup */
#endif
--
1.6.2.4
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH 3/6] s3c4510b: move interrupts code to soc
2009-05-09 13:35 ` [U-Boot] [PATCH 2/6] arm: remove cpu_init Jean-Christophe PLAGNIOL-VILLARD
@ 2009-05-09 13:35 ` Jean-Christophe PLAGNIOL-VILLARD
2009-05-09 13:35 ` [U-Boot] [PATCH 4/6] lpc2292: " Jean-Christophe PLAGNIOL-VILLARD
2009-05-09 18:26 ` [U-Boot] [PATCH 3/6] s3c4510b: move interrupts code to soc Wolfgang Denk
2009-05-10 7:42 ` [U-Boot] [PATCH 2/6] arm: remove cpu_init Dirk Behme
1 sibling, 2 replies; 15+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2009-05-09 13:35 UTC (permalink / raw)
To: u-boot
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
applied to arm/testing
Best Regards,
J.
cpu/arm720t/Makefile | 4 +-
cpu/arm720t/s3c4510b/Makefile | 1 +
cpu/arm720t/s3c4510b/interrupts.c | 85 +++++++++++++++++++++++++++++++++
cpu/arm720t/{interrupts.c => timer.c} | 74 ++++-------------------------
4 files changed, 98 insertions(+), 66 deletions(-)
create mode 100644 cpu/arm720t/s3c4510b/interrupts.c
rename cpu/arm720t/{interrupts.c => timer.c} (78%)
diff --git a/cpu/arm720t/Makefile b/cpu/arm720t/Makefile
index d5ac7d3..3e9b45a 100644
--- a/cpu/arm720t/Makefile
+++ b/cpu/arm720t/Makefile
@@ -26,7 +26,9 @@ include $(TOPDIR)/config.mk
LIB = $(obj)lib$(CPU).a
START = start.o
-COBJS = interrupts.o cpu.o
+
+COBJS += cpu.o
+COBJS += timer.o
SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c)
OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS))
diff --git a/cpu/arm720t/s3c4510b/Makefile b/cpu/arm720t/s3c4510b/Makefile
index c099036..91e27fd 100644
--- a/cpu/arm720t/s3c4510b/Makefile
+++ b/cpu/arm720t/s3c4510b/Makefile
@@ -26,6 +26,7 @@ include $(TOPDIR)/config.mk
LIB = $(obj)lib$(SOC).a
COBJS-y += cache.o
+COBJS-y += interrupts.o
SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS-y))
diff --git a/cpu/arm720t/s3c4510b/interrupts.c b/cpu/arm720t/s3c4510b/interrupts.c
new file mode 100644
index 0000000..f543569
--- /dev/null
+++ b/cpu/arm720t/s3c4510b/interrupts.c
@@ -0,0 +1,85 @@
+/*
+ * (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>
+
+# ifndef CONFIG_USE_IRQ
+# error CONFIG_USE_IRQ _must_ be defined when using CONFIG_S3C4510B
+# endif
+
+static struct _irq_handler IRQ_HANDLER[N_IRQS];
+
+void do_irq (struct pt_regs *pt_regs)
+{
+ unsigned int pending;
+
+ while ( (pending = GET_REG( REG_INTOFFSET)) != 0x54) { /* sentinal value for no pending interrutps */
+ IRQ_HANDLER[pending>>2].m_func( IRQ_HANDLER[pending>>2].m_data);
+
+ /* clear pending interrupt */
+ PUT_REG( REG_INTPEND, (1<<(pending>>2)));
+ }
+}
+
+static void default_isr( void *data) {
+ printf ("default_isr(): called for IRQ %d\n", (int)data);
+}
+
+void irq_install_handler (int irq, interrupt_handler_t handle_irq, void *data)
+{
+ if (irq >= N_IRQS || !handle_irq)
+ return;
+
+ IRQ_HANDLER[irq].m_data = data;
+ IRQ_HANDLER[irq].m_func = handle_irq;
+}
+
+int arch_interrupt_init (void)
+{
+ int i;
+
+ /* install default interrupt handlers */
+ for (i = 0; i < N_IRQS; i++)
+ irq_install_handler(i, default_isr, (void *)i);
+
+ /* configure interrupts for IRQ mode */
+ PUT_REG( REG_INTMODE, 0x0);
+ /* clear any pending interrupts */
+ PUT_REG( REG_INTPEND, 0x1FFFFF);
+
+ /*
+ * Enable global interrupt
+ * Enable timer0 interrupt
+ */
+ CLR_REG( REG_INTMASK, ((1<<INT_GLOBAL) | (1<<INT_TIMER0)));
+
+ return 0;
+}
diff --git a/cpu/arm720t/interrupts.c b/cpu/arm720t/timer.c
similarity index 78%
rename from cpu/arm720t/interrupts.c
rename to cpu/arm720t/timer.c
index 91d552c..98588af 100644
--- a/cpu/arm720t/interrupts.c
+++ b/cpu/arm720t/timer.c
@@ -50,47 +50,22 @@
#define READ_TIMER (TM2STAT & NETARM_GEN_TSTAT_CTC_MASK)
#endif
-#ifdef CONFIG_S3C4510B
-/* require interrupts for the S3C4510B */
-# ifndef CONFIG_USE_IRQ
-# error CONFIG_USE_IRQ _must_ be defined when using CONFIG_S3C4510B
-# else
-static struct _irq_handler IRQ_HANDLER[N_IRQS];
-# endif
-#endif /* CONFIG_S3C4510B */
-
-#ifdef CONFIG_USE_IRQ
+#if defined(CONFIG_USE_IRQ) && defined(CONFIG_LPC2292)
void do_irq (struct pt_regs *pt_regs)
{
-#if defined(CONFIG_S3C4510B)
- unsigned int pending;
-
- while ( (pending = GET_REG( REG_INTOFFSET)) != 0x54) { /* sentinal value for no pending interrutps */
- IRQ_HANDLER[pending>>2].m_func( IRQ_HANDLER[pending>>2].m_data);
-
- /* clear pending interrupt */
- PUT_REG( REG_INTPEND, (1<<(pending>>2)));
- }
-#elif defined(CONFIG_INTEGRATOR) && defined(CONFIG_ARCH_INTEGRATOR)
- /* No do_irq() for IntegratorAP/CM720T as yet */
-#elif defined(CONFIG_LPC2292)
-
void (*pfnct)(void);
pfnct = (void (*)(void))VICVectAddr;
(*pfnct)();
-#else
-#error do_irq() not defined for this CPU type
-#endif
}
#endif
-#ifdef CONFIG_S3C4510B
-static void default_isr( void *data) {
- printf ("default_isr(): called for IRQ %d\n", (int)data);
-}
+#if defined(CONFIG_INTEGRATOR) && defined(CONFIG_ARCH_INTEGRATOR)
+ /* Use IntegratorAP routines in board/integratorap.c */
+#else
+#if defined(CONFIG_S3C4510B)
static void timer_isr( void *data) {
unsigned int *pTime = (unsigned int *)data;
@@ -103,39 +78,9 @@ static void timer_isr( void *data) {
}
#endif
-#if defined(CONFIG_INTEGRATOR) && defined(CONFIG_ARCH_INTEGRATOR)
- /* Use IntegratorAP routines in board/integratorap.c */
-#else
-
static ulong timestamp;
static ulong lastdec;
-#if defined(CONFIG_USE_IRQ) && defined(CONFIG_S3C4510B)
-int arch_interrupt_init (void)
-{
- int i;
-
- /* install default interrupt handlers */
- for ( i = 0; i < N_IRQS; i++) {
- IRQ_HANDLER[i].m_data = (void *)i;
- IRQ_HANDLER[i].m_func = default_isr;
- }
-
- /* configure interrupts for IRQ mode */
- PUT_REG( REG_INTMODE, 0x0);
- /* clear any pending interrupts */
- PUT_REG( REG_INTPEND, 0x1FFFFF);
-
- lastdec = 0;
-
- /* install interrupt handler for timer */
- IRQ_HANDLER[INT_TIMER0].m_data = (void *)×tamp;
- IRQ_HANDLER[INT_TIMER0].m_func = timer_isr;
-
- return 0;
-}
-#endif
-
int timer_init (void)
{
#if defined(CONFIG_NETARM)
@@ -176,11 +121,10 @@ int timer_init (void)
*/
PUT_REG( REG_TDATA0, (CONFIG_SYS_SYS_CLK_FREQ / CONFIG_SYS_HZ));
- /*
- * Enable global interrupt
- * Enable timer0 interrupt
- */
- CLR_REG( REG_INTMASK, ((1<<INT_GLOBAL) | (1<<INT_TIMER0)));
+ /* install interrupt data handler for timer */
+ irq_install_handler(INT_TIMER0, timer_isr, (void *)×tamp);
+
+ lastdec = 0;
/* Start timer */
SET_REG( REG_TMOD, TM0_RUN);
--
1.6.2.4
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH 4/6] lpc2292: move interrupts code to soc
2009-05-09 13:35 ` [U-Boot] [PATCH 3/6] s3c4510b: move interrupts code to soc Jean-Christophe PLAGNIOL-VILLARD
@ 2009-05-09 13:35 ` Jean-Christophe PLAGNIOL-VILLARD
2009-05-09 13:35 ` [U-Boot] [PATCH 5/6] arm920t/interrupts: Move conditional compilation to Makefile Jean-Christophe PLAGNIOL-VILLARD
2009-05-09 18:26 ` [U-Boot] [PATCH 3/6] s3c4510b: move interrupts code to soc Wolfgang Denk
1 sibling, 1 reply; 15+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2009-05-09 13:35 UTC (permalink / raw)
To: u-boot
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@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@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
--
1.6.2.4
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH 5/6] arm920t/interrupts: Move conditional compilation to Makefile
2009-05-09 13:35 ` [U-Boot] [PATCH 4/6] lpc2292: " Jean-Christophe PLAGNIOL-VILLARD
@ 2009-05-09 13:35 ` Jean-Christophe PLAGNIOL-VILLARD
2009-05-09 13:35 ` [U-Boot] [PATCH 6/6] S3C24x0: extract interrupts from timer Jean-Christophe PLAGNIOL-VILLARD
0 siblings, 1 reply; 15+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2009-05-09 13:35 UTC (permalink / raw)
To: u-boot
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
applied to arm/testing
Best Regards,
J.
cpu/arm920t/Makefile | 8 +++++---
cpu/arm920t/interrupts.c | 4 +---
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/cpu/arm920t/Makefile b/cpu/arm920t/Makefile
index e02bc6a..cbb13b2 100644
--- a/cpu/arm920t/Makefile
+++ b/cpu/arm920t/Makefile
@@ -26,10 +26,12 @@ include $(TOPDIR)/config.mk
LIB = $(obj)lib$(CPU).a
START = start.o
-COBJS = cpu.o interrupts.o
-SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS))
+COBJS-y += cpu.o
+COBJS-$(CONFIG_USE_IRQ) += interrupts.o
+
+SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
+OBJS := $(addprefix $(obj),$(COBJS-y) $(SOBJS))
START := $(addprefix $(obj),$(START))
all: $(obj).depend $(START) $(LIB)
diff --git a/cpu/arm920t/interrupts.c b/cpu/arm920t/interrupts.c
index 8d5289e..a589b80 100644
--- a/cpu/arm920t/interrupts.c
+++ b/cpu/arm920t/interrupts.c
@@ -30,9 +30,8 @@
*/
#include <common.h>
-
-#ifdef CONFIG_USE_IRQ
#include <asm/proc-armv/ptrace.h>
+
void do_irq (struct pt_regs *pt_regs)
{
#if defined (ARM920_IRQ_CALLBACK)
@@ -46,4 +45,3 @@ void do_irq (struct pt_regs *pt_regs)
#error do_irq() not defined for this cpu type
#endif
}
-#endif
--
1.6.2.4
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH 6/6] S3C24x0: extract interrupts from timer
2009-05-09 13:35 ` [U-Boot] [PATCH 5/6] arm920t/interrupts: Move conditional compilation to Makefile Jean-Christophe PLAGNIOL-VILLARD
@ 2009-05-09 13:35 ` Jean-Christophe PLAGNIOL-VILLARD
0 siblings, 0 replies; 15+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2009-05-09 13:35 UTC (permalink / raw)
To: u-boot
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
applied to arm/testing
Best Regards,
J.
cpu/arm920t/interrupts.c | 8 ++------
cpu/arm920t/s3c24x0/Makefile | 14 ++++++++------
cpu/arm920t/{ => s3c24x0}/interrupts.c | 19 +++++++++----------
cpu/arm920t/s3c24x0/timer.c | 9 ---------
include/common.h | 2 --
5 files changed, 19 insertions(+), 33 deletions(-)
copy cpu/arm920t/{ => s3c24x0}/interrupts.c (78%)
diff --git a/cpu/arm920t/interrupts.c b/cpu/arm920t/interrupts.c
index a589b80..73e8ae8 100644
--- a/cpu/arm920t/interrupts.c
+++ b/cpu/arm920t/interrupts.c
@@ -32,16 +32,12 @@
#include <common.h>
#include <asm/proc-armv/ptrace.h>
+#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 5d2be2c..7e8d6ed 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/interrupts.c b/cpu/arm920t/s3c24x0/interrupts.c
similarity index 78%
copy from cpu/arm920t/interrupts.c
copy to cpu/arm920t/s3c24x0/interrupts.c
index a589b80..11ec95e 100644
--- a/cpu/arm920t/interrupts.c
+++ b/cpu/arm920t/s3c24x0/interrupts.c
@@ -30,18 +30,17 @@
*/
#include <common.h>
+
+#if defined(CONFIG_S3C2400)
+#include <s3c2400.h>
+#elif defined(CONFIG_S3C2410)
+#include <s3c2410.h>
+#endif
#include <asm/proc-armv/ptrace.h>
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
+ 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 8205355..8aebb19 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 30fff7d..21a504a 100644
--- a/include/common.h
+++ b/include/common.h
@@ -491,8 +491,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);
--
1.6.2.4
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH 3/6] s3c4510b: move interrupts code to soc
2009-05-09 13:35 ` [U-Boot] [PATCH 3/6] s3c4510b: move interrupts code to soc Jean-Christophe PLAGNIOL-VILLARD
2009-05-09 13:35 ` [U-Boot] [PATCH 4/6] lpc2292: " Jean-Christophe PLAGNIOL-VILLARD
@ 2009-05-09 18:26 ` Wolfgang Denk
2009-05-10 14:40 ` Jean-Christophe PLAGNIOL-VILLARD
1 sibling, 1 reply; 15+ messages in thread
From: Wolfgang Denk @ 2009-05-09 18:26 UTC (permalink / raw)
To: u-boot
Dear Jean-Christophe PLAGNIOL-VILLARD,
In message <1241876118-27469-3-git-send-email-plagnioj@jcrosoft.com> you wrote:
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> ---
> applied to arm/testing
How much of this patch has actually been tested yet?
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"It ain't so much the things we don't know that get us in trouble.
It's the things we know that ain't so." - Artemus Ward aka Charles
Farrar Brown
^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH 1/6] arm: unify interrupt init
2009-05-09 13:35 [U-Boot] [PATCH 1/6] arm: unify interrupt init Jean-Christophe PLAGNIOL-VILLARD
2009-05-09 13:35 ` [U-Boot] [PATCH 2/6] arm: remove cpu_init Jean-Christophe PLAGNIOL-VILLARD
@ 2009-05-10 7:42 ` Dirk Behme
2009-05-10 14:42 ` Jean-Christophe PLAGNIOL-VILLARD
1 sibling, 1 reply; 15+ messages in thread
From: Dirk Behme @ 2009-05-10 7:42 UTC (permalink / raw)
To: u-boot
Jean-Christophe PLAGNIOL-VILLARD wrote:
> 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: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cortex-A8 (OMAP3) part
Acked-by: Dirk Behme <dirk.behme@googlemail.com>
> ---
> applied to arm/testing
>
> Best Regards,
> J.
> cpu/arm1136/cpu.c | 11 -----------
> cpu/arm720t/cpu.c | 7 -------
> cpu/arm720t/interrupts.c | 2 +-
> cpu/arm920t/cpu.c | 11 -----------
> cpu/arm925t/cpu.c | 11 -----------
> cpu/arm926ejs/cpu.c | 11 -----------
> cpu/arm946es/cpu.c | 11 -----------
> cpu/arm_cortexa8/cpu.c | 12 ------------
> cpu/arm_intcm/cpu.c | 11 -----------
> cpu/ixp/cpu.c | 12 ------------
> cpu/ixp/interrupts.c | 2 +-
> cpu/lh7a40x/cpu.c | 11 -----------
> cpu/pxa/cpu.c | 11 -----------
> cpu/sa1100/cpu.c | 7 -------
> include/asm-arm/u-boot-arm.h | 1 +
> lib_arm/interrupts.c | 13 +++++++++++++
> 16 files changed, 16 insertions(+), 128 deletions(-)
^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH 2/6] arm: remove cpu_init
2009-05-09 13:35 ` [U-Boot] [PATCH 2/6] arm: remove cpu_init Jean-Christophe PLAGNIOL-VILLARD
2009-05-09 13:35 ` [U-Boot] [PATCH 3/6] s3c4510b: move interrupts code to soc Jean-Christophe PLAGNIOL-VILLARD
@ 2009-05-10 7:42 ` Dirk Behme
2009-05-10 14:44 ` Jean-Christophe PLAGNIOL-VILLARD
1 sibling, 1 reply; 15+ messages in thread
From: Dirk Behme @ 2009-05-10 7:42 UTC (permalink / raw)
To: u-boot
Jean-Christophe PLAGNIOL-VILLARD wrote:
> move s3c44b0 to arch_cpu_init and as noone use cpu_init remove it
>
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cortex-A8 (OMAP3) part
Acked-by: Dirk Behme <dirk.behme@googlemail.com>
Just a minor _question_ for an other board below:
> diff --git a/cpu/s3c44b0/cpu.c b/cpu/s3c44b0/cpu.c
> index 7ef4a1f..bca38f8 100644
> --- a/cpu/s3c44b0/cpu.c
> +++ b/cpu/s3c44b0/cpu.c
> @@ -32,7 +32,7 @@
> #include <command.h>
> #include <asm/hardware.h>
>
> -int cpu_init (void)
> +int arch_cpu_init (void)
> {
> icache_enable();
>
Would encapsulating this new arch_cpu_init() with an additional
CONFIG_ARCH_CPU_INIT, e.g.
#if defined(CONFIG_ARCH_CPU_INIT)
int arch_cpu_init (void)
{
(like below) help to avoid issues if cpu/s3c44b0/cpu.c would be
compiled without CONFIG_ARCH_CPU_INIT enabled?
> diff --git a/include/configs/B2.h b/include/configs/B2.h
> index 35fad5c..e5439f3 100644
> --- a/include/configs/B2.h
> +++ b/include/configs/B2.h
> @@ -39,6 +39,7 @@
> #define CONFIG_ARM_THUMB 1 /* this is an ARM7TDMI */
> #undef CONFIG_ARM7_REVD /* disable ARM720 REV.D Workarounds */
> #define CONFIG_SYS_NO_CP15_CACHE
> +#define CONFIG_ARCH_CPU_INIT
>
> #define CONFIG_S3C44B0_CLOCK_SPEED 75 /* we have a 75Mhz S3C44B0*/
>
> diff --git a/lib_arm/board.c b/lib_arm/board.c
> index 344120f..452b177 100644
> --- a/lib_arm/board.c
> +++ b/lib_arm/board.c
> @@ -265,7 +265,6 @@ typedef int (init_fnc_t) (void);
> int print_cpuinfo (void);
>
> init_fnc_t *init_sequence[] = {
> - cpu_init, /* basic cpu dependent setup */
> #if defined(CONFIG_ARCH_CPU_INIT)
> arch_cpu_init, /* basic arch cpu dependent setup */
> #endif
^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH 3/6] s3c4510b: move interrupts code to soc
2009-05-09 18:26 ` [U-Boot] [PATCH 3/6] s3c4510b: move interrupts code to soc Wolfgang Denk
@ 2009-05-10 14:40 ` Jean-Christophe PLAGNIOL-VILLARD
2009-05-10 19:39 ` Wolfgang Denk
0 siblings, 1 reply; 15+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2009-05-10 14:40 UTC (permalink / raw)
To: u-boot
On 20:26 Sat 09 May , Wolfgang Denk wrote:
> Dear Jean-Christophe PLAGNIOL-VILLARD,
>
> In message <1241876118-27469-3-git-send-email-plagnioj@jcrosoft.com> you wrote:
> > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> > ---
> > applied to arm/testing
>
> How much of this patch has actually been tested yet?
only compiled actually
Best Regards,
J.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH 1/6] arm: unify interrupt init
2009-05-10 7:42 ` [U-Boot] [PATCH 1/6] arm: unify interrupt init Dirk Behme
@ 2009-05-10 14:42 ` Jean-Christophe PLAGNIOL-VILLARD
0 siblings, 0 replies; 15+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2009-05-10 14:42 UTC (permalink / raw)
To: u-boot
On 09:42 Sun 10 May , Dirk Behme wrote:
> Jean-Christophe PLAGNIOL-VILLARD wrote:
>> 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: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
>
> Cortex-A8 (OMAP3) part
As OMAP3 does not support IRQ actually
this patch will have normally no impact
in the omap3 way it's just remove dead code
Best Regards,
J.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH 2/6] arm: remove cpu_init
2009-05-10 7:42 ` [U-Boot] [PATCH 2/6] arm: remove cpu_init Dirk Behme
@ 2009-05-10 14:44 ` Jean-Christophe PLAGNIOL-VILLARD
0 siblings, 0 replies; 15+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2009-05-10 14:44 UTC (permalink / raw)
To: u-boot
On 09:42 Sun 10 May , Dirk Behme wrote:
> Jean-Christophe PLAGNIOL-VILLARD wrote:
>> move s3c44b0 to arch_cpu_init and as noone use cpu_init remove it
>>
>> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
>
> Cortex-A8 (OMAP3) part
>
> Acked-by: Dirk Behme <dirk.behme@googlemail.com>
>
> Just a minor _question_ for an other board below:
>
>> diff --git a/cpu/s3c44b0/cpu.c b/cpu/s3c44b0/cpu.c
>> index 7ef4a1f..bca38f8 100644
>> --- a/cpu/s3c44b0/cpu.c
>> +++ b/cpu/s3c44b0/cpu.c
>> @@ -32,7 +32,7 @@
>> #include <command.h>
>> #include <asm/hardware.h>
>> -int cpu_init (void)
>> +int arch_cpu_init (void)
>> {
>> icache_enable();
>>
>
> Would encapsulating this new arch_cpu_init() with an additional
> CONFIG_ARCH_CPU_INIT, e.g.
no as this code is supposed to be always enable
>
> #if defined(CONFIG_ARCH_CPU_INIT)
> int arch_cpu_init (void)
> {
>
> (like below) help to avoid issues if cpu/s3c44b0/cpu.c would be compiled
> without CONFIG_ARCH_CPU_INIT enabled?
why?
this is where the s3c44 enable the icache
Best Regards,
J.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH 3/6] s3c4510b: move interrupts code to soc
2009-05-10 14:40 ` Jean-Christophe PLAGNIOL-VILLARD
@ 2009-05-10 19:39 ` Wolfgang Denk
2009-05-10 20:49 ` Jean-Christophe PLAGNIOL-VILLARD
0 siblings, 1 reply; 15+ messages in thread
From: Wolfgang Denk @ 2009-05-10 19:39 UTC (permalink / raw)
To: u-boot
Dear Jean-Christophe PLAGNIOL-VILLARD,
In message <20090510144001.GB21079@game.jcrosoft.org> you wrote:
> On 20:26 Sat 09 May , Wolfgang Denk wrote:
> > Dear Jean-Christophe PLAGNIOL-VILLARD,
> >
> > In message <1241876118-27469-3-git-send-email-plagnioj@jcrosoft.com> you wrote:
> > > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> > > ---
> > > applied to arm/testing
> >
> > How much of this patch has actually been tested yet?
> only compiled actually
Then we definitely need the ACK from a board maintainer who can test
this on actual hardware.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Heavier than air flying machines are impossible.
-- Lord Kelvin, President, Royal Society, c. 1895
^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH 3/6] s3c4510b: move interrupts code to soc
2009-05-10 19:39 ` Wolfgang Denk
@ 2009-05-10 20:49 ` Jean-Christophe PLAGNIOL-VILLARD
2009-05-12 1:18 ` Jean-Christophe PLAGNIOL-VILLARD
0 siblings, 1 reply; 15+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2009-05-10 20:49 UTC (permalink / raw)
To: u-boot
On 21:39 Sun 10 May , Wolfgang Denk wrote:
> Dear Jean-Christophe PLAGNIOL-VILLARD,
>
> In message <20090510144001.GB21079@game.jcrosoft.org> you wrote:
> > On 20:26 Sat 09 May , Wolfgang Denk wrote:
> > > Dear Jean-Christophe PLAGNIOL-VILLARD,
> > >
> > > In message <1241876118-27469-3-git-send-email-plagnioj@jcrosoft.com> you wrote:
> > > > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> > > > ---
> > > > applied to arm/testing
> > >
> > > How much of this patch has actually been tested yet?
> > only compiled actually
>
> Then we definitely need the ACK from a board maintainer who can test
> this on actual hardware.
Hi Curt
Could you try the current testing branch of u-boot-arm
git://git.denx.de/u-boot-arm.git testing
I've done a cleanup of the s3c4510b interrupt code
Best Regards,
J.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH 3/6] s3c4510b: move interrupts code to soc
2009-05-10 20:49 ` Jean-Christophe PLAGNIOL-VILLARD
@ 2009-05-12 1:18 ` Jean-Christophe PLAGNIOL-VILLARD
0 siblings, 0 replies; 15+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2009-05-12 1:18 UTC (permalink / raw)
To: u-boot
On 22:49 Sun 10 May , Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 21:39 Sun 10 May , Wolfgang Denk wrote:
> > Dear Jean-Christophe PLAGNIOL-VILLARD,
> >
> > In message <20090510144001.GB21079@game.jcrosoft.org> you wrote:
> > > On 20:26 Sat 09 May , Wolfgang Denk wrote:
> > > > Dear Jean-Christophe PLAGNIOL-VILLARD,
> > > >
> > > > In message <1241876118-27469-3-git-send-email-plagnioj@jcrosoft.com> you wrote:
> > > > > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> > > > > ---
> > > > > applied to arm/testing
> > > >
> > > > How much of this patch has actually been tested yet?
> > > only compiled actually
> >
> > Then we definitely need the ACK from a board maintainer who can test
> > this on actual hardware.
> Hi Curt
> Could you try the current testing branch of u-boot-arm
> git://git.denx.de/u-boot-arm.git testing
I've receive a failure notice
is someone have a evb4510?
Best Regards,
J.
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2009-05-12 1:18 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-09 13:35 [U-Boot] [PATCH 1/6] arm: unify interrupt init Jean-Christophe PLAGNIOL-VILLARD
2009-05-09 13:35 ` [U-Boot] [PATCH 2/6] arm: remove cpu_init Jean-Christophe PLAGNIOL-VILLARD
2009-05-09 13:35 ` [U-Boot] [PATCH 3/6] s3c4510b: move interrupts code to soc Jean-Christophe PLAGNIOL-VILLARD
2009-05-09 13:35 ` [U-Boot] [PATCH 4/6] lpc2292: " Jean-Christophe PLAGNIOL-VILLARD
2009-05-09 13:35 ` [U-Boot] [PATCH 5/6] arm920t/interrupts: Move conditional compilation to Makefile Jean-Christophe PLAGNIOL-VILLARD
2009-05-09 13:35 ` [U-Boot] [PATCH 6/6] S3C24x0: extract interrupts from timer Jean-Christophe PLAGNIOL-VILLARD
2009-05-09 18:26 ` [U-Boot] [PATCH 3/6] s3c4510b: move interrupts code to soc Wolfgang Denk
2009-05-10 14:40 ` Jean-Christophe PLAGNIOL-VILLARD
2009-05-10 19:39 ` Wolfgang Denk
2009-05-10 20:49 ` Jean-Christophe PLAGNIOL-VILLARD
2009-05-12 1:18 ` Jean-Christophe PLAGNIOL-VILLARD
2009-05-10 7:42 ` [U-Boot] [PATCH 2/6] arm: remove cpu_init Dirk Behme
2009-05-10 14:44 ` Jean-Christophe PLAGNIOL-VILLARD
2009-05-10 7:42 ` [U-Boot] [PATCH 1/6] arm: unify interrupt init Dirk Behme
2009-05-10 14:42 ` Jean-Christophe PLAGNIOL-VILLARD
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox