diff options
Diffstat (limited to 'cpu/arm1136')
-rw-r--r-- | cpu/arm1136/config.mk | 10 | ||||
-rw-r--r-- | cpu/arm1136/cpu.c | 2 | ||||
-rw-r--r-- | cpu/arm1136/interrupts.c | 13 | ||||
-rw-r--r-- | cpu/arm1136/start.S | 11 |
4 files changed, 30 insertions, 6 deletions
diff --git a/cpu/arm1136/config.mk b/cpu/arm1136/config.mk index ca9dc25..e39e774 100644 --- a/cpu/arm1136/config.mk +++ b/cpu/arm1136/config.mk @@ -21,6 +21,14 @@ # MA 02111-1307 USA # PLATFORM_RELFLAGS += -fno-strict-aliasing -fno-common -ffixed-r8 \ + -msoft-float # Make ARMv5 to allow more compilers to work, even though its v6. -PLATFORM_CPPFLAGS += -mapcs-32 -march=armv5 +PLATFORM_CPPFLAGS += -march=armv5 +# ========================================================================= +# +# Supply options according to compiler version +# +# ========================================================================= +PLATFORM_CPPFLAGS +=$(call cc-option,-mapcs-32,-mabi=apcs-gnu) +PLATFORM_RELFLAGS +=$(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) diff --git a/cpu/arm1136/cpu.c b/cpu/arm1136/cpu.c index 7fa5ddc..85a4849 100644 --- a/cpu/arm1136/cpu.c +++ b/cpu/arm1136/cpu.c @@ -33,7 +33,9 @@ #include <common.h> #include <command.h> +#if !defined(CONFIG_INTEGRATOR) && ! defined(CONFIG_ARCH_CINTEGRATOR) #include <asm/arch/omap2420.h> +#endif /* read co-processor 15, register #1 (control register) */ static unsigned long read_p15_c1 (void) diff --git a/cpu/arm1136/interrupts.c b/cpu/arm1136/interrupts.c index 23236dc..1dc36d0 100644 --- a/cpu/arm1136/interrupts.c +++ b/cpu/arm1136/interrupts.c @@ -32,7 +32,11 @@ #include <common.h> #include <asm/arch/bits.h> -#include <asm/arch/omap2420.h> + +#if !defined(CONFIG_INTEGRATOR) && ! defined(CONFIG_ARCH_CINTEGRATOR) +# include <asm/arch/omap2420.h> +#endif + #include <asm/proc-armv/ptrace.h> #define TIMER_LOAD_VAL 0 @@ -172,6 +176,10 @@ void do_irq (struct pt_regs *pt_regs) bad_mode (); } +#if defined(CONFIG_INTEGRATOR) && defined(CONFIG_ARCH_CINTEGRATOR) +/* Use the IntegratorCP function from board/integratorcp.c */ +#else + static ulong timestamp; static ulong lastinc; @@ -189,7 +197,6 @@ int interrupt_init (void) return(0); } - /* * timer without interrupts */ @@ -281,7 +288,6 @@ unsigned long long get_ticks(void) { return get_timer(0); } - /* * This function is derived from PowerPC code (timebase clock frequency). * On ARM it returns the number of timer ticks per second. @@ -292,3 +298,4 @@ ulong get_tbclk (void) tbclk = CFG_HZ; return tbclk; } +#endif /* !Integrator/CP */ diff --git a/cpu/arm1136/start.S b/cpu/arm1136/start.S index c3bf6e3..17c7a83 100644 --- a/cpu/arm1136/start.S +++ b/cpu/arm1136/start.S @@ -30,8 +30,9 @@ #include <config.h> #include <version.h> +#if !defined(CONFIG_INTEGRATOR) && ! defined(CONFIG_ARCH_CINTEGRATOR) #include <asm/arch/omap2420.h> - +#endif .globl _start _start: b reset ldr pc, _undefined_instruction @@ -210,7 +211,7 @@ cpu_init_crit: * basic memory. Go here to bump up clock rate and handle wake up conditions. */ mov ip, lr /* persevere link reg across call */ - bl platformsetup /* go setup pll,mux,memory */ + bl lowlevel_init /* go setup pll,mux,memory */ mov lr, ip /* restore link */ mov pc, lr /* back to my caller */ /* @@ -397,6 +398,10 @@ arm1136_cache_flush: mcr p15, 0, r1, c7, c5, 0 @ invalidate I cache mov pc, lr @ back to caller +#if defined(CONFIG_INTEGRATOR) && defined(CONFIG_ARCH_CINTEGRATOR) +/* Use the IntegratorCP function from board/integratorcp/platform.S */ +#else + .align 5 .globl reset_cpu reset_cpu: @@ -408,3 +413,5 @@ _loop_forever: b _loop_forever rstctl: .word PM_RSTCTRL_WKUP + +#endif |