diff options
author | wdenk <wdenk> | 2004-03-14 22:25:36 +0000 |
---|---|---|
committer | wdenk <wdenk> | 2004-03-14 22:25:36 +0000 |
commit | 42dfe7a1844cbad7114038aaf03828acb7a84414 (patch) | |
tree | d33893d34d2a97aa23257703733dbc9d86d48278 /cpu | |
parent | 855a496fe9ba431772f1ff1aef21a5c001288bb0 (diff) |
Code cleanup; make several boards compile & link.
Diffstat (limited to 'cpu')
-rw-r--r-- | cpu/arm920t/serial.c | 34 | ||||
-rw-r--r-- | cpu/arm926ejs/interrupts.c | 2 | ||||
-rw-r--r-- | cpu/i386/serial.c | 10 | ||||
-rw-r--r-- | cpu/mpc5xxx/ide.c | 2 | ||||
-rw-r--r-- | cpu/ppc4xx/405gp_pci.c | 2 | ||||
-rw-r--r-- | cpu/ppc4xx/cpu.c | 10 | ||||
-rw-r--r-- | cpu/ppc4xx/serial.c | 6 | ||||
-rw-r--r-- | cpu/ppc4xx/speed.c | 2 | ||||
-rw-r--r-- | cpu/s3c44b0/start.S | 19 | ||||
-rw-r--r-- | cpu/sa1100/serial.c | 8 |
10 files changed, 47 insertions, 48 deletions
diff --git a/cpu/arm920t/serial.c b/cpu/arm920t/serial.c index 6104e7528e..1749e820a1 100644 --- a/cpu/arm920t/serial.c +++ b/cpu/arm920t/serial.c @@ -1,18 +1,18 @@ -/* - * (C) Copyright 2002 - * Gary Jennejohn, DENX Software Engineering, <gj@denx.de> - * - * 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 + /* + * (C) Copyright 2002 + * Gary Jennejohn, DENX Software Engineering, <gj@denx.de> + * + * 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 * @@ -28,13 +28,13 @@ #ifdef CONFIG_SERIAL1 #define UART_NR S3C24X0_UART0 -#elif CONFIG_SERIAL2 +#elif defined(CONFIG_SERIAL2) # if defined(CONFIG_TRAB) # error "TRAB supports only CONFIG_SERIAL1" # endif #define UART_NR S3C24X0_UART1 -#elif CONFIG_SERIAL3 +#elif defined(CONFIG_SERIAL3) # if defined(CONFIG_TRAB) # #error "TRAB supports only CONFIG_SERIAL1" # endif diff --git a/cpu/arm926ejs/interrupts.c b/cpu/arm926ejs/interrupts.c index 10841fd0a1..3770660282 100644 --- a/cpu/arm926ejs/interrupts.c +++ b/cpu/arm926ejs/interrupts.c @@ -293,7 +293,7 @@ ulong get_timer_masked (void) /* waits specified delay value and resets timestamp */ void udelay_masked (unsigned long usec) { - ulong tmo, tmp; + ulong tmo; if(usec >= 1000){ /* if "big" number, spread normalization to seconds */ tmo = usec / 1000; /* start to normalize for usec to ticks per sec */ diff --git a/cpu/i386/serial.c b/cpu/i386/serial.c index f58b47c70e..db13008ba5 100644 --- a/cpu/i386/serial.c +++ b/cpu/i386/serial.c @@ -51,7 +51,7 @@ #include <asm/io.h> #include <asm/ibmpc.h> -#if CONFIG_SERIAL_SOFTWARE_FIFO +#ifdef CONFIG_SERIAL_SOFTWARE_FIFO #include <malloc.h> #endif @@ -81,7 +81,7 @@ #define asyncLSRRxFifoError1 0x80 -#if CONFIG_SERIAL_SOFTWARE_FIFO +#ifdef CONFIG_SERIAL_SOFTWARE_FIFO /*-----------------------------------------------------------------------------+ | Fifo +-----------------------------------------------------------------------------*/ @@ -193,7 +193,7 @@ int serial_getc(void) { unsigned char status = 0; -#if CONFIG_SERIAL_SOFTWARE_FIFO +#ifdef CONFIG_SERIAL_SOFTWARE_FIFO if (serial_buffer_active) { return serial_buffered_getc(); } @@ -225,7 +225,7 @@ int serial_tstc(void) { unsigned char status; -#if CONFIG_SERIAL_SOFTWARE_FIFO +#ifdef CONFIG_SERIAL_SOFTWARE_FIFO if (serial_buffer_active) { return serial_buffered_tstc(); } @@ -248,7 +248,7 @@ int serial_tstc(void) } -#if CONFIG_SERIAL_SOFTWARE_FIFO +#ifdef CONFIG_SERIAL_SOFTWARE_FIFO void serial_isr(void *arg) { diff --git a/cpu/mpc5xxx/ide.c b/cpu/mpc5xxx/ide.c index 47188691df..1969172bd3 100644 --- a/cpu/mpc5xxx/ide.c +++ b/cpu/mpc5xxx/ide.c @@ -73,7 +73,7 @@ int ide_preinit (void) *(vu_long *) MPC5XXX_ATA_PIO2 = reg; #ifdef CONFIG_IDE_RESET - init_ide_reset (); + init_ide_reset (); #endif /* CONFIG_IDE_RESET */ return (0); diff --git a/cpu/ppc4xx/405gp_pci.c b/cpu/ppc4xx/405gp_pci.c index c9e2e9c628..ff9215f3b2 100644 --- a/cpu/ppc4xx/405gp_pci.c +++ b/cpu/ppc4xx/405gp_pci.c @@ -364,7 +364,7 @@ void pci_405gp_setup_vga(struct pci_controller *hose, pci_dev_t dev, */ static struct pci_config_table pci_405gp_config_table[] = { /*if VendID is 0 it terminates the table search (ie Walnut)*/ -#if CFG_PCI_SUBSYS_VENDORID +#ifdef CFG_PCI_SUBSYS_VENDORID {CFG_PCI_SUBSYS_VENDORID, PCI_ANY_ID, PCI_CLASS_BRIDGE_HOST, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, pci_405gp_setup_bridge}, #endif diff --git a/cpu/ppc4xx/cpu.c b/cpu/ppc4xx/cpu.c index df19605a92..cdb503965b 100644 --- a/cpu/ppc4xx/cpu.c +++ b/cpu/ppc4xx/cpu.c @@ -70,17 +70,17 @@ int checkcpu (void) get_sys_info(&sys_info); -#if CONFIG_405GP +#ifdef CONFIG_405GP puts ("IBM PowerPC 405GP"); if (pvr == PVR_405GPR_RB) { putc('r'); } puts (" Rev. "); #endif -#if CONFIG_405CR +#ifdef CONFIG_405CR puts ("IBM PowerPC 405CR Rev. "); #endif -#if CONFIG_405EP +#ifdef CONFIG_405EP puts ("IBM PowerPC 405EP Rev. "); #endif switch (pvr) { @@ -89,7 +89,7 @@ int checkcpu (void) putc('B'); break; case PVR_405GP_RC: -#if CONFIG_405CR +#ifdef CONFIG_405CR case PVR_405CR_RC: #endif putc('C'); @@ -97,7 +97,7 @@ int checkcpu (void) case PVR_405GP_RD: putc('D'); break; -#if CONFIG_405GP +#ifdef CONFIG_405GP case PVR_405GP_RE: putc('E'); break; diff --git a/cpu/ppc4xx/serial.c b/cpu/ppc4xx/serial.c index 2c77338f21..41402ccba6 100644 --- a/cpu/ppc4xx/serial.c +++ b/cpu/ppc4xx/serial.c @@ -48,7 +48,7 @@ #include <watchdog.h> #include "vecnum.h" -#if CONFIG_SERIAL_SOFTWARE_FIFO +#ifdef CONFIG_SERIAL_SOFTWARE_FIFO #include <malloc.h> #endif @@ -351,7 +351,7 @@ int serial_tstc () /*#define asyncRxBufferport1 ACTING_UART0_BASE+0x00 */ -#if CONFIG_SERIAL_SOFTWARE_FIFO +#ifdef CONFIG_SERIAL_SOFTWARE_FIFO /*-----------------------------------------------------------------------------+ | Fifo +-----------------------------------------------------------------------------*/ @@ -637,7 +637,7 @@ int serial_tstc () } -#if CONFIG_SERIAL_SOFTWARE_FIFO +#ifdef CONFIG_SERIAL_SOFTWARE_FIFO void serial_isr (void *arg) { diff --git a/cpu/ppc4xx/speed.c b/cpu/ppc4xx/speed.c index 7172fe3ea8..f8f88ff45b 100644 --- a/cpu/ppc4xx/speed.c +++ b/cpu/ppc4xx/speed.c @@ -247,7 +247,7 @@ void get_sys_info (sys_info_t * sysInfo) unsigned long temp1; unsigned long lfdiv; unsigned long m; - unsigned long prbdv0; + unsigned long prbdv0; /* Extract configured divisors */ mfsdr( sdr_sdstp0,strp0 ); diff --git a/cpu/s3c44b0/start.S b/cpu/s3c44b0/start.S index ce31ec935d..b4b7c3f62c 100644 --- a/cpu/s3c44b0/start.S +++ b/cpu/s3c44b0/start.S @@ -71,16 +71,15 @@ _armboot_start: .word _start /* - * Note: _armboot_end_data and _armboot_end are defined - * by the (board-dependent) linker script. - * _armboot_end_data is the first usable FLASH address after armboot + * These are defined in the board-specific linker script. */ -.globl _armboot_end_data -_armboot_end_data: - .word armboot_end_data -.globl _armboot_end -_armboot_end: - .word armboot_end +.globl _bss_start +_bss_start: + .word __bss_start + +.globl _bss_end +_bss_end: + .word _end #ifdef CONFIG_USE_IRQ /* IRQ stack memory (calculated at run-time) */ @@ -130,7 +129,7 @@ relocate: /* relocate U-Boot to RAM */ beq stack_setup ldr r2, _armboot_start - ldr r3, _armboot_end + ldr r3, _bss_start sub r2, r3, r2 /* r2 <- size of armboot */ add r2, r0, r2 /* r2 <- source end address */ diff --git a/cpu/sa1100/serial.c b/cpu/sa1100/serial.c index d3b8628245..a598489df7 100644 --- a/cpu/sa1100/serial.c +++ b/cpu/sa1100/serial.c @@ -66,7 +66,7 @@ void serial_setbrg (void) Ser1UTCR1 = 0; Ser1UTCR2 = (u32)reg; Ser1UTCR3 = ( UTCR3_RXE | UTCR3_TXE ); -#elif CONFIG_SERIAL3 +#elif defined(CONFIG_SERIAL3) /* Wait until port is ready ... */ while (Ser3UTSR1 & UTSR1_TBY) { } @@ -107,7 +107,7 @@ void serial_putc (const char c) while ((Ser1UTSR0 & UTSR0_TFS) == 0); Ser1UTDR = c; -#elif CONFIG_SERIAL3 +#elif defined(CONFIG_SERIAL3) /* wait for room in the tx FIFO on SERIAL3 */ while ((Ser3UTSR0 & UTSR0_TFS) == 0); @@ -128,7 +128,7 @@ int serial_tstc (void) { #ifdef CONFIG_SERIAL1 return Ser1UTSR1 & UTSR1_RNE; -#elif CONFIG_SERIAL3 +#elif defined(CONFIG_SERIAL3) return Ser3UTSR1 & UTSR1_RNE; #endif } @@ -144,7 +144,7 @@ int serial_getc (void) while (!(Ser1UTSR1 & UTSR1_RNE)); return (char) Ser1UTDR & 0xff; -#elif CONFIG_SERIAL3 +#elif defined(CONFIG_SERIAL3) while (!(Ser3UTSR1 & UTSR1_RNE)); return (char) Ser3UTDR & 0xff; |