diff options
author | Haavard Skinnemoen <haavard.skinnemoen@atmel.com> | 2008-12-17 16:53:07 +0100 |
---|---|---|
committer | Haavard Skinnemoen <haavard.skinnemoen@atmel.com> | 2008-12-17 16:53:07 +0100 |
commit | cb5473205206c7f14cbb1e747f28ec75b48826e2 (patch) | |
tree | 8f4808d60917100b18a10b05230f7638a0a9bbcc /cpu/nios2 | |
parent | baf449fc5ff96f071bb0e3789fd3265f6d4fd9a0 (diff) | |
parent | 92c78a3bbcb2ce508b4bf1c4a1e0940406a024bb (diff) | |
download | u-boot-imx-cb5473205206c7f14cbb1e747f28ec75b48826e2.zip u-boot-imx-cb5473205206c7f14cbb1e747f28ec75b48826e2.tar.gz u-boot-imx-cb5473205206c7f14cbb1e747f28ec75b48826e2.tar.bz2 |
Merge branch 'fixes' into cleanups
Conflicts:
board/atmel/atngw100/atngw100.c
board/atmel/atstk1000/atstk1000.c
cpu/at32ap/at32ap700x/gpio.c
include/asm-avr32/arch-at32ap700x/clk.h
include/configs/atngw100.h
include/configs/atstk1002.h
include/configs/atstk1003.h
include/configs/atstk1004.h
include/configs/atstk1006.h
include/configs/favr-32-ezkit.h
include/configs/hammerhead.h
include/configs/mimc200.h
Diffstat (limited to 'cpu/nios2')
-rw-r--r-- | cpu/nios2/cpu.c | 8 | ||||
-rw-r--r-- | cpu/nios2/epcs.c | 4 | ||||
-rw-r--r-- | cpu/nios2/interrupts.c | 22 | ||||
-rw-r--r-- | cpu/nios2/serial.c | 8 | ||||
-rw-r--r-- | cpu/nios2/start.S | 27 | ||||
-rw-r--r-- | cpu/nios2/sysid.c | 6 |
6 files changed, 38 insertions, 37 deletions
diff --git a/cpu/nios2/cpu.c b/cpu/nios2/cpu.c index f4217a8..6379534 100644 --- a/cpu/nios2/cpu.c +++ b/cpu/nios2/cpu.c @@ -25,14 +25,14 @@ #include <nios2.h> #include <nios2-io.h> -#if defined (CFG_NIOS_SYSID_BASE) +#if defined (CONFIG_SYS_NIOS_SYSID_BASE) extern void display_sysid (void); -#endif /* CFG_NIOS_SYSID_BASE */ +#endif /* CONFIG_SYS_NIOS_SYSID_BASE */ int checkcpu (void) { printf ("CPU : Nios-II\n"); -#if !defined(CFG_NIOS_SYSID_BASE) +#if !defined(CONFIG_SYS_NIOS_SYSID_BASE) printf ("SYSID : <unknown>\n"); #else display_sysid (); @@ -43,7 +43,7 @@ int checkcpu (void) int do_reset (void) { - void (*rst)(void) = (void(*)(void))CFG_RESET_ADDR; + void (*rst)(void) = (void(*)(void))CONFIG_SYS_RESET_ADDR; disable_interrupts (); rst(); return(0); diff --git a/cpu/nios2/epcs.c b/cpu/nios2/epcs.c index 414c38c..968b50f 100644 --- a/cpu/nios2/epcs.c +++ b/cpu/nios2/epcs.c @@ -23,7 +23,7 @@ #include <common.h> -#if defined(CFG_NIOS_EPCSBASE) +#if defined(CONFIG_SYS_NIOS_EPCSBASE) #include <command.h> #include <asm/io.h> #include <nios2-io.h> @@ -72,7 +72,7 @@ */ #define EPCS_TIMEOUT 100 /* 100 msec timeout */ -static nios_spi_t *epcs = (nios_spi_t *)CFG_NIOS_EPCSBASE; +static nios_spi_t *epcs = (nios_spi_t *)CONFIG_SYS_NIOS_EPCSBASE; /*********************************************************************** * Device access diff --git a/cpu/nios2/interrupts.c b/cpu/nios2/interrupts.c index ec5db31b..1c3566e 100644 --- a/cpu/nios2/interrupts.c +++ b/cpu/nios2/interrupts.c @@ -37,8 +37,8 @@ #include <status_led.h> #endif -#if defined(CFG_NIOS_TMRBASE) && !defined(CFG_NIOS_TMRIRQ) -#error CFG_NIOS_TMRIRQ not defined (see documentation) +#if defined(CONFIG_SYS_NIOS_TMRBASE) && !defined(CONFIG_SYS_NIOS_TMRIRQ) +#error CONFIG_SYS_NIOS_TMRIRQ not defined (see documentation) #endif /****************************************************************************/ @@ -74,7 +74,7 @@ void set_timer (ulong t) /* The board must handle this interrupt if a timer is not * provided. */ -#if defined(CFG_NIOS_TMRBASE) +#if defined(CONFIG_SYS_NIOS_TMRBASE) void tmr_isr (void *arg) { nios_timer_t *tmr = (nios_timer_t *)arg; @@ -82,7 +82,7 @@ void tmr_isr (void *arg) * status register. */ writel (&tmr->status, 0); - timestamp += CFG_NIOS_TMRMS; + timestamp += CONFIG_SYS_NIOS_TMRMS; #ifdef CONFIG_STATUS_LED status_led_tick(timestamp); #endif @@ -90,22 +90,22 @@ void tmr_isr (void *arg) static void tmr_init (void) { - nios_timer_t *tmr =(nios_timer_t *)CFG_NIOS_TMRBASE; + nios_timer_t *tmr =(nios_timer_t *)CONFIG_SYS_NIOS_TMRBASE; writel (&tmr->status, 0); writel (&tmr->control, 0); writel (&tmr->control, NIOS_TIMER_STOP); -#if defined(CFG_NIOS_TMRCNT) - writel (&tmr->periodl, CFG_NIOS_TMRCNT & 0xffff); - writel (&tmr->periodh, (CFG_NIOS_TMRCNT >> 16) & 0xffff); +#if defined(CONFIG_SYS_NIOS_TMRCNT) + writel (&tmr->periodl, CONFIG_SYS_NIOS_TMRCNT & 0xffff); + writel (&tmr->periodh, (CONFIG_SYS_NIOS_TMRCNT >> 16) & 0xffff); #endif writel (&tmr->control, NIOS_TIMER_ITO | NIOS_TIMER_CONT | NIOS_TIMER_START ); - irq_install_handler (CFG_NIOS_TMRIRQ, tmr_isr, (void *)tmr); + irq_install_handler (CONFIG_SYS_NIOS_TMRIRQ, tmr_isr, (void *)tmr); } -#endif /* CFG_NIOS_TMRBASE */ +#endif /* CONFIG_SYS_NIOS_TMRBASE */ /*************************************************************************/ int disable_interrupts (void) @@ -195,7 +195,7 @@ int interrupt_init (void) vecs[i].count = 0; } -#if defined(CFG_NIOS_TMRBASE) +#if defined(CONFIG_SYS_NIOS_TMRBASE) tmr_init (); #endif diff --git a/cpu/nios2/serial.c b/cpu/nios2/serial.c index 0bd3821..8bbb803 100644 --- a/cpu/nios2/serial.c +++ b/cpu/nios2/serial.c @@ -34,7 +34,7 @@ DECLARE_GLOBAL_DATA_PTR; *-----------------------------------------------------------------*/ #if defined(CONFIG_CONSOLE_JTAG) -static nios_jtag_t *jtag = (nios_jtag_t *)CFG_NIOS_CONSOLE; +static nios_jtag_t *jtag = (nios_jtag_t *)CONFIG_SYS_NIOS_CONSOLE; void serial_setbrg( void ){ return; } int serial_init( void ) { return(0);} @@ -79,9 +79,9 @@ int serial_getc (void) *-----------------------------------------------------------------*/ #else -static nios_uart_t *uart = (nios_uart_t *) CFG_NIOS_CONSOLE; +static nios_uart_t *uart = (nios_uart_t *) CONFIG_SYS_NIOS_CONSOLE; -#if defined(CFG_NIOS_FIXEDBAUD) +#if defined(CONFIG_SYS_NIOS_FIXEDBAUD) /* Everything's already setup for fixed-baud PTF * assignment @@ -106,7 +106,7 @@ int serial_init (void) return (0); } -#endif /* CFG_NIOS_FIXEDBAUD */ +#endif /* CONFIG_SYS_NIOS_FIXEDBAUD */ /*----------------------------------------------------------------------- diff --git a/cpu/nios2/start.S b/cpu/nios2/start.S index 6c6f294..31cd5b0 100644 --- a/cpu/nios2/start.S +++ b/cpu/nios2/start.S @@ -23,6 +23,7 @@ #include <config.h> +#include <timestamp.h> #include <version.h> /************************************************************************* @@ -39,9 +40,9 @@ _start: * just be invalidating the cache a second time. If cache * is not implemented initi behaves as nop. */ - ori r4, r0, %lo(CFG_ICACHELINE_SIZE) - movhi r5, %hi(CFG_ICACHE_SIZE) - ori r5, r5, %lo(CFG_ICACHE_SIZE) + ori r4, r0, %lo(CONFIG_SYS_ICACHELINE_SIZE) + movhi r5, %hi(CONFIG_SYS_ICACHE_SIZE) + ori r5, r5, %lo(CONFIG_SYS_ICACHE_SIZE) mov r6, r0 0: initi r6 add r6, r6, r4 @@ -67,10 +68,10 @@ _except_end: /* DCACHE INIT -- if dcache not implemented, initd behaves as * nop. */ - movhi r4, %hi(CFG_DCACHELINE_SIZE) - ori r4, r4, %lo(CFG_DCACHELINE_SIZE) - movhi r5, %hi(CFG_DCACHE_SIZE) - ori r5, r5, %lo(CFG_DCACHE_SIZE) + movhi r4, %hi(CONFIG_SYS_DCACHELINE_SIZE) + ori r4, r4, %lo(CONFIG_SYS_DCACHELINE_SIZE) + movhi r5, %hi(CONFIG_SYS_DCACHE_SIZE) + ori r5, r5, %lo(CONFIG_SYS_DCACHE_SIZE) mov r6, r0 1: initd 0(r6) add r6, r6, r4 @@ -136,8 +137,8 @@ _reloc: ori r4, r4, %lo(_except_start) movhi r5, %hi(_except_end) ori r5, r5, %lo(_except_end) - movhi r6, %hi(CFG_EXCEPTION_ADDR) - ori r6, r6, %lo(CFG_EXCEPTION_ADDR) + movhi r6, %hi(CONFIG_SYS_EXCEPTION_ADDR) + ori r6, r6, %lo(CONFIG_SYS_EXCEPTION_ADDR) beq r4, r6, 7f /* Skip if at proper addr */ 6: ldwio r7, 0(r4) @@ -150,8 +151,8 @@ _reloc: /* STACK INIT -- zero top two words for call back chain. */ - movhi sp, %hi(CFG_INIT_SP) - ori sp, sp, %lo(CFG_INIT_SP) + movhi sp, %hi(CONFIG_SYS_INIT_SP) + ori sp, sp, %lo(CONFIG_SYS_INIT_SP) addi sp, sp, -8 stw r0, 0(sp) stw r0, 4(sp) @@ -195,7 +196,7 @@ _reloc: dly_clks: -#if (CFG_ICACHE_SIZE > 0) +#if (CONFIG_SYS_ICACHE_SIZE > 0) subi r4, r4, 3 /* 3 clocks/loop */ #else subi r4, r4, 12 /* 12 clocks/loop */ @@ -212,5 +213,5 @@ dly_clks: version_string: .ascii U_BOOT_VERSION - .ascii " (", __DATE__, " - ", __TIME__, ")" + .ascii " (", U_BOOT_DATE, " - ", U_BOOT_TIME, ")" .ascii CONFIG_IDENT_STRING, "\0" diff --git a/cpu/nios2/sysid.c b/cpu/nios2/sysid.c index 697ed03..afd5d83 100644 --- a/cpu/nios2/sysid.c +++ b/cpu/nios2/sysid.c @@ -23,7 +23,7 @@ #include <common.h> -#if defined (CFG_NIOS_SYSID_BASE) +#if defined (CONFIG_SYS_NIOS_SYSID_BASE) #include <command.h> #include <asm/io.h> @@ -32,7 +32,7 @@ void display_sysid (void) { - struct nios_sysid_t *sysid = (struct nios_sysid_t *)CFG_NIOS_SYSID_BASE; + struct nios_sysid_t *sysid = (struct nios_sysid_t *)CONFIG_SYS_NIOS_SYSID_BASE; struct tm t; char asc[32]; time_t stamp; @@ -55,4 +55,4 @@ U_BOOT_CMD( "sysid - display Nios-II system id\n\n", "\n - display Nios-II system id\n" ); -#endif /* CFG_NIOS_SYSID_BASE */ +#endif /* CONFIG_SYS_NIOS_SYSID_BASE */ |