diff options
Diffstat (limited to 'cpu/arm720t')
-rw-r--r-- | cpu/arm720t/config.mk | 11 | ||||
-rw-r--r-- | cpu/arm720t/cpu.c | 11 | ||||
-rw-r--r-- | cpu/arm720t/interrupts.c | 16 | ||||
-rw-r--r-- | cpu/arm720t/serial.c | 2 | ||||
-rw-r--r-- | cpu/arm720t/serial_netarm.c | 14 | ||||
-rw-r--r-- | cpu/arm720t/start.S | 15 |
6 files changed, 57 insertions, 12 deletions
diff --git a/cpu/arm720t/config.mk b/cpu/arm720t/config.mk index 2d79709..641b91c 100644 --- a/cpu/arm720t/config.mk +++ b/cpu/arm720t/config.mk @@ -23,6 +23,13 @@ # PLATFORM_RELFLAGS += -fno-strict-aliasing -fno-common -ffixed-r8 \ - -mshort-load-bytes -msoft-float + -msoft-float -PLATFORM_CPPFLAGS += -mapcs-32 -march=armv4 -mtune=arm7tdmi +PLATFORM_CPPFLAGS += -march=armv4 -mtune=arm7tdmi +# ========================================================================= +# +# 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/arm720t/cpu.c b/cpu/arm720t/cpu.c index 5421aff..a5b6de7 100644 --- a/cpu/arm720t/cpu.c +++ b/cpu/arm720t/cpu.c @@ -57,7 +57,7 @@ int cleanup_before_linux (void) * and we set the CPU-speed to 73 MHz - see start.S for details */ -#if defined(CONFIG_IMPA7) || defined(CONFIG_EP7312) +#if defined(CONFIG_IMPA7) || defined(CONFIG_EP7312) || defined(CONFIG_ARMADILLO) unsigned long i; disable_interrupts (); @@ -76,6 +76,8 @@ int cleanup_before_linux (void) #elif defined(CONFIG_NETARM) || defined(CONFIG_S3C4510B) disable_interrupts (); /* Nothing more needed */ +#elif defined(CONFIG_INTEGRATOR) && defined(CONFIG_ARCH_INTEGRATOR) + /* No cleanup before linux for IntegratorAP/CM720T as yet */ #else #error No cleanup_before_linux() defined for this CPU type #endif @@ -95,7 +97,7 @@ int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) * */ -#if defined(CONFIG_IMPA7) || defined(CONFIG_EP7312) || defined(CONFIG_NETARM) +#if defined(CONFIG_IMPA7) || defined(CONFIG_EP7312) || defined(CONFIG_NETARM) || defined(CONFIG_ARMADILLO) /* read co-processor 15, register #1 (control register) */ static unsigned long read_p15_c1(void) { @@ -245,6 +247,11 @@ int dcache_status (void) return icache_status(); } +#elif defined(CONFIG_INTEGRATOR) && defined(CONFIG_ARCH_INTEGRATOR) + /* No specific cache setup for IntegratorAP/CM720T as yet */ + void icache_enable (void) + { + } #else #error No icache/dcache enable/disable functions defined for this CPU type #endif diff --git a/cpu/arm720t/interrupts.c b/cpu/arm720t/interrupts.c index ab28e60..da62502 100644 --- a/cpu/arm720t/interrupts.c +++ b/cpu/arm720t/interrupts.c @@ -180,7 +180,7 @@ void do_fiq (struct pt_regs *pt_regs) void do_irq (struct pt_regs *pt_regs) { -#if defined(CONFIG_IMPA7) || defined(CONFIG_EP7312) || defined(CONFIG_NETARM) +#if defined(CONFIG_IMPA7) || defined(CONFIG_EP7312) || defined(CONFIG_NETARM) || defined(CONFIG_ARMADILLO) printf ("interrupt request\n"); show_regs (pt_regs); bad_mode (); @@ -193,6 +193,8 @@ void do_irq (struct pt_regs *pt_regs) /* 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 */ #else #error do_irq() not defined for this CPU type #endif @@ -216,6 +218,10 @@ 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; @@ -233,7 +239,7 @@ int interrupt_init (void) /* set timer 2 counter */ lastdec = TIMER_LOAD_VAL; -#elif defined(CONFIG_IMPA7) || defined(CONFIG_EP7312) +#elif defined(CONFIG_IMPA7) || defined(CONFIG_EP7312) || defined(CONFIG_ARMADILLO) /* disable all interrupts */ IO_INTMR1 = 0; @@ -296,12 +302,14 @@ int interrupt_init (void) return (0); } +#endif /* ! IntegratorAP */ + /* * timer without interrupts */ -#if defined(CONFIG_IMPA7) || defined(CONFIG_EP7312) || defined(CONFIG_NETARM) +#if defined(CONFIG_IMPA7) || defined(CONFIG_EP7312) || defined(CONFIG_NETARM) || defined(CONFIG_ARMADILLO) void reset_timer (void) { @@ -398,6 +406,8 @@ void udelay (unsigned long usec) } +#elif defined(CONFIG_INTEGRATOR) && defined(CONFIG_ARCH_INTEGRATOR) + /* No timer routines for IntegratorAP/CM720T as yet */ #else #error Timer routines not defined for this CPU type #endif diff --git a/cpu/arm720t/serial.c b/cpu/arm720t/serial.c index a5da4b7..0f99979 100644 --- a/cpu/arm720t/serial.c +++ b/cpu/arm720t/serial.c @@ -30,7 +30,7 @@ #include <common.h> -#if defined(CONFIG_IMPA7) || defined(CONFIG_EP7312) +#if defined(CONFIG_IMPA7) || defined(CONFIG_EP7312) || defined(CONFIG_ARMADILLO) #include <clps7111.h> diff --git a/cpu/arm720t/serial_netarm.c b/cpu/arm720t/serial_netarm.c index 5b41949..5ad98f0 100644 --- a/cpu/arm720t/serial_netarm.c +++ b/cpu/arm720t/serial_netarm.c @@ -35,7 +35,11 @@ #include <asm/hardware.h> #define PORTA (*(volatile unsigned int *)(NETARM_GEN_MODULE_BASE + NETARM_GEN_PORTA)) +#if !defined(CONFIG_NETARM_NS7520) #define PORTB (*(volatile unsigned int *)(NETARM_GEN_MODULE_BASE + NETARM_GEN_PORTB)) +#else +#define PORTC (*(volatile unsigned int *)(NETARM_GEN_MODULE_BASE + NETARM_GEN_PORTC)) +#endif /* wait until transmitter is ready for another character */ #define TXWAITRDY(registers) \ @@ -48,8 +52,13 @@ } +#ifndef CONFIG_UART1_CONSOLE volatile netarm_serial_channel_t *serial_reg_ch1 = get_serial_channel(0); volatile netarm_serial_channel_t *serial_reg_ch2 = get_serial_channel(1); +#else +volatile netarm_serial_channel_t *serial_reg_ch1 = get_serial_channel(1); +volatile netarm_serial_channel_t *serial_reg_ch2 = get_serial_channel(0); +#endif extern void _netarm_led_FAIL1(void); @@ -62,8 +71,13 @@ void serial_setbrg (void) DECLARE_GLOBAL_DATA_PTR; /* set 0 ... make sure pins are configured for serial */ +#if !defined(CONFIG_NETARM_NS7520) PORTA = PORTB = NETARM_GEN_PORT_MODE (0xef) | NETARM_GEN_PORT_DIR (0xe0); +#else + PORTA = NETARM_GEN_PORT_MODE (0xef) | NETARM_GEN_PORT_DIR (0xe0); + PORTC = NETARM_GEN_PORT_CSF (0xef) | NETARM_GEN_PORT_MODE (0xef) | NETARM_GEN_PORT_DIR (0xe0); +#endif /* first turn em off */ serial_reg_ch1->ctrl_a = serial_reg_ch2->ctrl_a = 0; diff --git a/cpu/arm720t/start.S b/cpu/arm720t/start.S index 3695465..e66d109 100644 --- a/cpu/arm720t/start.S +++ b/cpu/arm720t/start.S @@ -188,7 +188,7 @@ _start_armboot: .word start_armboot ************************************************************************* */ -#if defined(CONFIG_IMPA7) || defined(CONFIG_EP7312) +#if defined(CONFIG_IMPA7) || defined(CONFIG_EP7312) || defined(CONFIG_ARMADILLO) /* Interupt-Controller base addresses */ INTMR1: .word 0x80000280 @ 32 bit size @@ -209,7 +209,7 @@ SYSCON3: .word 0x80002200 #endif cpu_init_crit: -#if defined(CONFIG_IMPA7) || defined(CONFIG_EP7312) +#if defined(CONFIG_IMPA7) || defined(CONFIG_EP7312) || defined(CONFIG_ARMADILLO) /* * mask all IRQs by clearing all bits in the INTMRs @@ -272,12 +272,15 @@ cpu_init_crit: str r1, [r0, #+NETARM_GEN_SYSTEM_CONTROL] +#ifndef CONFIG_NETARM_PLL_BYPASS ldr r1, =( NETARM_GEN_PLL_CTL_PLLCNT(NETARM_PLL_COUNT_VAL) | \ NETARM_GEN_PLL_CTL_POLTST_DEF | \ NETARM_GEN_PLL_CTL_INDIV(1) | \ NETARM_GEN_PLL_CTL_ICP_DEF | \ NETARM_GEN_PLL_CTL_OUTDIV(2) ) str r1, [r0, #+NETARM_GEN_PLL_CONTROL] +#endif + /* * mask all IRQs by clearing all bits in the INTMRs */ @@ -301,6 +304,8 @@ cpu_init_crit: ldr r1, =0x83ffffa0 /* cache-disabled */ str r1, [r0] +#elif defined(CONFIG_INTEGRATOR) && defined(CONFIG_ARCH_INTEGRATOR) + /* No specific initialisation for IntegratorAP/CM720T as yet */ #else #error No cpu_init_crit() defined for current CPU type #endif @@ -316,12 +321,12 @@ cpu_init_crit: str r1, [r0] #endif + mov ip, lr /* * before relocating, we have to setup RAM timing * because memory timing is board-dependent, you will * find a lowlevel_init.S in your board directory. */ - mov ip, lr bl lowlevel_init mov lr, ip @@ -495,7 +500,7 @@ fiq: #endif -#if defined(CONFIG_IMPA7) || defined(CONFIG_EP7312) +#if defined(CONFIG_IMPA7) || defined(CONFIG_EP7312) || defined(CONFIG_ARMADILLO) .align 5 .globl reset_cpu reset_cpu: @@ -530,6 +535,8 @@ reset_cpu: #elif defined(CONFIG_S3C4510B) /* Nothing done here as reseting the CPU is board specific, depending * on external peripherals such as watchdog timers, etc. */ +#elif defined(CONFIG_INTEGRATOR) && defined(CONFIG_ARCH_INTEGRATOR) + /* No specific reset actions for IntegratorAP/CM720T as yet */ #else #error No reset_cpu() defined for current CPU type #endif |