summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/m68k
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2004-04-21 10:43:04 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2004-04-21 10:43:04 +0000
commit6128a4aa5e791ed4e0a655bfd346a52d92da7883 (patch)
treeaf53ca3f67ce405b6fbc6c98399c8e0c87e01a9e /c/src/lib/libbsp/m68k
parent2004-04-20 Ralf Corsepius <ralf_corsepius@rtems.org> (diff)
downloadrtems-6128a4aa5e791ed4e0a655bfd346a52d92da7883.tar.bz2
Remove stray white spaces.
Diffstat (limited to 'c/src/lib/libbsp/m68k')
-rw-r--r--c/src/lib/libbsp/m68k/dmv152/clock/ckinit.c22
-rw-r--r--c/src/lib/libbsp/m68k/dmv152/console/console.c16
-rw-r--r--c/src/lib/libbsp/m68k/dmv152/include/bsp.h4
-rw-r--r--c/src/lib/libbsp/m68k/dmv152/startup/bspclean.c2
-rw-r--r--c/src/lib/libbsp/m68k/dmv152/startup/bspstart.c6
-rw-r--r--c/src/lib/libbsp/m68k/gen68302/clock/ckinit.c20
-rw-r--r--c/src/lib/libbsp/m68k/gen68302/console/console.c10
-rw-r--r--c/src/lib/libbsp/m68k/gen68302/include/bsp.h2
-rw-r--r--c/src/lib/libbsp/m68k/gen68302/network/network.c62
-rw-r--r--c/src/lib/libbsp/m68k/gen68302/startup/bspstart.c4
-rw-r--r--c/src/lib/libbsp/m68k/gen68302/timer/timer.c2
-rw-r--r--c/src/lib/libbsp/m68k/gen68340/clock/ckinit.c28
-rw-r--r--c/src/lib/libbsp/m68k/gen68340/console/Modif_cpu_asm.S6
-rw-r--r--c/src/lib/libbsp/m68k/gen68340/console/console.c46
-rw-r--r--c/src/lib/libbsp/m68k/gen68340/console/m340uart.c50
-rw-r--r--c/src/lib/libbsp/m68k/gen68340/include/bsp.h4
-rw-r--r--c/src/lib/libbsp/m68k/gen68340/include/m340timer.h4
-rw-r--r--c/src/lib/libbsp/m68k/gen68340/include/m340uart.h4
-rw-r--r--c/src/lib/libbsp/m68k/gen68340/include/m68340.h4
-rw-r--r--c/src/lib/libbsp/m68k/gen68340/start/start.S6
-rw-r--r--c/src/lib/libbsp/m68k/gen68340/start/startfor340only.S6
-rw-r--r--c/src/lib/libbsp/m68k/gen68340/startup/bspstart.c2
-rw-r--r--c/src/lib/libbsp/m68k/gen68340/startup/dumpanic.c4
-rw-r--r--c/src/lib/libbsp/m68k/gen68340/startup/init68340.c4
-rw-r--r--c/src/lib/libbsp/m68k/gen68340/timer/timer.c22
-rw-r--r--c/src/lib/libbsp/m68k/gen68360/clock/clock.c4
-rw-r--r--c/src/lib/libbsp/m68k/gen68360/console/console.c14
-rw-r--r--c/src/lib/libbsp/m68k/gen68360/include/bsp.h4
-rw-r--r--c/src/lib/libbsp/m68k/gen68360/network/network.c22
-rw-r--r--c/src/lib/libbsp/m68k/gen68360/startup/alloc360.c2
-rw-r--r--c/src/lib/libbsp/m68k/gen68360/startup/bspstart.c6
-rw-r--r--c/src/lib/libbsp/m68k/gen68360/startup/init68360.c36
-rw-r--r--c/src/lib/libbsp/m68k/gen68360/timer/timer.c2
-rw-r--r--c/src/lib/libbsp/m68k/idp/clock/ckinit.c26
-rw-r--r--c/src/lib/libbsp/m68k/idp/console/console.c34
-rw-r--r--c/src/lib/libbsp/m68k/idp/console/duart.c98
-rw-r--r--c/src/lib/libbsp/m68k/idp/console/leds.c4
-rw-r--r--c/src/lib/libbsp/m68k/idp/include/bsp.h12
-rw-r--r--c/src/lib/libbsp/m68k/idp/startup/bspstart.c20
-rw-r--r--c/src/lib/libbsp/m68k/idp/timer/timer.c8
-rw-r--r--c/src/lib/libbsp/m68k/mcf5206elite/console/console.c16
-rw-r--r--c/src/lib/libbsp/m68k/mcf5206elite/i2c/i2c.c14
-rw-r--r--c/src/lib/libbsp/m68k/mcf5206elite/i2c/i2cdrv.c24
-rw-r--r--c/src/lib/libbsp/m68k/mcf5206elite/include/bsp.h8
-rw-r--r--c/src/lib/libbsp/m68k/mcf5206elite/include/i2c.h8
-rw-r--r--c/src/lib/libbsp/m68k/mcf5206elite/include/i2cdrv.h2
-rw-r--r--c/src/lib/libbsp/m68k/mcf5206elite/nvram/nvram.c4
-rw-r--r--c/src/lib/libbsp/m68k/mcf5206elite/start/start.S10
-rw-r--r--c/src/lib/libbsp/m68k/mcf5206elite/startup/bspclean.c4
-rw-r--r--c/src/lib/libbsp/m68k/mcf5206elite/startup/bspstart.c8
-rw-r--r--c/src/lib/libbsp/m68k/mcf5206elite/startup/init5206e.c50
-rw-r--r--c/src/lib/libbsp/m68k/mcf5206elite/tod/ds1307.c30
-rw-r--r--c/src/lib/libbsp/m68k/mcf5206elite/tod/todcfg.c6
-rw-r--r--c/src/lib/libbsp/m68k/mrm332/clock/ckinit.c24
-rw-r--r--c/src/lib/libbsp/m68k/mrm332/console/console.c12
-rw-r--r--c/src/lib/libbsp/m68k/mrm332/console/sci.c19
-rw-r--r--c/src/lib/libbsp/m68k/mrm332/include/bsp.h8
-rw-r--r--c/src/lib/libbsp/m68k/mrm332/include/mrm332.h2
-rw-r--r--c/src/lib/libbsp/m68k/mrm332/spurious/spinit.c42
-rw-r--r--c/src/lib/libbsp/m68k/mrm332/start/start.S6
-rw-r--r--c/src/lib/libbsp/m68k/mrm332/startup/bspclean.c2
-rw-r--r--c/src/lib/libbsp/m68k/mrm332/startup/bspstart.c6
-rw-r--r--c/src/lib/libbsp/m68k/mrm332/startup/except_vect_332_ROM.S16
-rw-r--r--c/src/lib/libbsp/m68k/mrm332/startup/start_c.c8
-rw-r--r--c/src/lib/libbsp/m68k/mrm332/timer/timer.c2
-rw-r--r--c/src/lib/libbsp/m68k/mvme136/clock/ckinit.c18
-rw-r--r--c/src/lib/libbsp/m68k/mvme136/console/console.c8
-rw-r--r--c/src/lib/libbsp/m68k/mvme136/include/bsp.h2
-rw-r--r--c/src/lib/libbsp/m68k/mvme136/startup/bspstart.c2
-rw-r--r--c/src/lib/libbsp/m68k/mvme147/clock/ckinit.c26
-rw-r--r--c/src/lib/libbsp/m68k/mvme147/console/console.c14
-rw-r--r--c/src/lib/libbsp/m68k/mvme147/include/bsp.h8
-rw-r--r--c/src/lib/libbsp/m68k/mvme147/startup/bspstart.c4
-rw-r--r--c/src/lib/libbsp/m68k/mvme147/timer/timer.c4
-rw-r--r--c/src/lib/libbsp/m68k/mvme147/timer/timerisr.S2
-rw-r--r--c/src/lib/libbsp/m68k/mvme147s/include/bsp.h8
-rw-r--r--c/src/lib/libbsp/m68k/mvme147s/shmsupp/getcfg.c10
-rw-r--r--c/src/lib/libbsp/m68k/mvme147s/startup/bspstart.c16
-rw-r--r--c/src/lib/libbsp/m68k/mvme162/clock/ckinit.c24
-rw-r--r--c/src/lib/libbsp/m68k/mvme162/console/console.c32
-rw-r--r--c/src/lib/libbsp/m68k/mvme162/include/bsp.h42
-rw-r--r--c/src/lib/libbsp/m68k/mvme162/include/page_table.h21
-rw-r--r--c/src/lib/libbsp/m68k/mvme162/startup/bspstart.c4
-rw-r--r--c/src/lib/libbsp/m68k/mvme162/startup/page_table.c22
-rw-r--r--c/src/lib/libbsp/m68k/mvme162/timer/timer.c4
-rw-r--r--c/src/lib/libbsp/m68k/mvme162/tod/tod.c4
-rw-r--r--c/src/lib/libbsp/m68k/mvme162/tools/sload.c54
-rw-r--r--c/src/lib/libbsp/m68k/mvme167/clock/ckinit.c26
-rw-r--r--c/src/lib/libbsp/m68k/mvme167/console/console-recording.h48
-rw-r--r--c/src/lib/libbsp/m68k/mvme167/console/console.c82
-rw-r--r--c/src/lib/libbsp/m68k/mvme167/fatal/bspfatal.c34
-rw-r--r--c/src/lib/libbsp/m68k/mvme167/include/bsp.h12
-rw-r--r--c/src/lib/libbsp/m68k/mvme167/include/fatal.h2
-rw-r--r--c/src/lib/libbsp/m68k/mvme167/include/page_table.h18
-rw-r--r--c/src/lib/libbsp/m68k/mvme167/network/network.c302
-rw-r--r--c/src/lib/libbsp/m68k/mvme167/network/uti596.h30
-rw-r--r--c/src/lib/libbsp/m68k/mvme167/startup/bspclean.c4
-rw-r--r--c/src/lib/libbsp/m68k/mvme167/startup/bspstart.c18
-rw-r--r--c/src/lib/libbsp/m68k/mvme167/startup/page_table.c20
-rw-r--r--c/src/lib/libbsp/m68k/mvme167/timer/timer.c6
-rw-r--r--c/src/lib/libbsp/m68k/ods68302/clock/ckinit.c20
-rw-r--r--c/src/lib/libbsp/m68k/ods68302/console/console.c14
-rw-r--r--c/src/lib/libbsp/m68k/ods68302/include/bare.h32
-rw-r--r--c/src/lib/libbsp/m68k/ods68302/include/bsp.h2
-rw-r--r--c/src/lib/libbsp/m68k/ods68302/include/crc.h2
-rw-r--r--c/src/lib/libbsp/m68k/ods68302/include/debugport.h8
-rw-r--r--c/src/lib/libbsp/m68k/ods68302/include/m68302scc.h8
-rw-r--r--c/src/lib/libbsp/m68k/ods68302/start/debugreset.S32
-rw-r--r--c/src/lib/libbsp/m68k/ods68302/start/reset.S186
-rw-r--r--c/src/lib/libbsp/m68k/ods68302/startup/bspstart.c6
-rw-r--r--c/src/lib/libbsp/m68k/ods68302/startup/cpuboot.c22
-rw-r--r--c/src/lib/libbsp/m68k/ods68302/startup/debugport.c18
-rw-r--r--c/src/lib/libbsp/m68k/ods68302/startup/gdb-hooks.c10
-rw-r--r--c/src/lib/libbsp/m68k/ods68302/startup/m68302scc.c30
-rw-r--r--c/src/lib/libbsp/m68k/ods68302/startup/m68k-stub.c282
-rw-r--r--c/src/lib/libbsp/m68k/ods68302/startup/memcheck.c2
-rw-r--r--c/src/lib/libbsp/m68k/ods68302/startup/trace.c18
-rw-r--r--c/src/lib/libbsp/m68k/ods68302/timer/timer.c2
-rw-r--r--c/src/lib/libbsp/m68k/shared/bspspuriousinit.c4
-rw-r--r--c/src/lib/libbsp/m68k/shared/gdbstub/gdb_if.h8
-rw-r--r--c/src/lib/libbsp/m68k/shared/gdbstub/m68k-stub.c292
-rw-r--r--c/src/lib/libbsp/m68k/shared/m68000spurious.c4
-rw-r--r--c/src/lib/libbsp/m68k/shared/m68kpretaskinghook.c2
-rw-r--r--c/src/lib/libbsp/m68k/shared/mvme/mvme16x_hw.h8
-rw-r--r--c/src/lib/libbsp/m68k/shared/setvec.c4
-rw-r--r--c/src/lib/libbsp/m68k/sim68000/clock/clockdrv.c8
-rw-r--r--c/src/lib/libbsp/m68k/sim68000/include/bsp.h6
-rw-r--r--c/src/lib/libbsp/m68k/sim68000/start/start.S90
-rw-r--r--c/src/lib/libbsp/m68k/sim68000/startup/bspstart.c4
129 files changed, 1512 insertions, 1506 deletions
diff --git a/c/src/lib/libbsp/m68k/dmv152/clock/ckinit.c b/c/src/lib/libbsp/m68k/dmv152/clock/ckinit.c
index 62f83c519d..a4487d2ffa 100644
--- a/c/src/lib/libbsp/m68k/dmv152/clock/ckinit.c
+++ b/c/src/lib/libbsp/m68k/dmv152/clock/ckinit.c
@@ -18,7 +18,7 @@
*/
#include <stdlib.h>
-
+
#include <bsp.h>
#include <rtems/libio.h>
@@ -30,11 +30,11 @@ rtems_isr_entry Old_ticker;
void Clock_exit( void );
#define CLOCK_VECTOR TIMER_VECTOR
-
+
/*
* These are set by clock driver during its init
*/
-
+
rtems_device_major_number rtems_clock_major = ~0;
rtems_device_minor_number rtems_clock_minor;
@@ -110,17 +110,17 @@ rtems_device_driver Clock_initialize(
)
{
Install_clock( Clock_isr );
-
+
/*
* make major/minor avail to others such as shared memory driver
*/
-
+
rtems_clock_major = major;
rtems_clock_minor = minor;
-
+
return RTEMS_SUCCESSFUL;
}
-
+
rtems_device_driver Clock_control(
rtems_device_major_number major,
rtems_device_minor_number minor,
@@ -129,15 +129,15 @@ rtems_device_driver Clock_control(
{
uint32_t isrlevel;
rtems_libio_ioctl_args_t *args = pargp;
-
+
if (args == 0)
goto done;
-
+
/*
* This is hokey, but until we get a defined interface
* to do this, it will just be this simple...
*/
-
+
if (args->command == rtems_build_name('I', 'S', 'R', ' '))
{
Clock_isr(CLOCK_VECTOR);
@@ -148,7 +148,7 @@ rtems_device_driver Clock_control(
(void) set_vector( args->buffer, CLOCK_VECTOR, 1 );
rtems_interrupt_enable( isrlevel );
}
-
+
done:
return RTEMS_SUCCESSFUL;
}
diff --git a/c/src/lib/libbsp/m68k/dmv152/console/console.c b/c/src/lib/libbsp/m68k/dmv152/console/console.c
index 6dd73f2a5f..78ceca83c1 100644
--- a/c/src/lib/libbsp/m68k/dmv152/console/console.c
+++ b/c/src/lib/libbsp/m68k/dmv152/console/console.c
@@ -53,7 +53,7 @@ void console_outbyte_polled(
}
/*
- * console_inbyte_nonblocking
+ * console_inbyte_nonblocking
*
* This routine polls for a character.
*/
@@ -103,7 +103,7 @@ void DEBUG_puts(
char *s;
/* should disable interrupts here */
- for ( s = string ; *s ; s++ )
+ for ( s = string ; *s ; s++ )
console_outbyte_polled( 0, *s );
console_outbyte_polled( 0, '\r' );
@@ -132,7 +132,7 @@ int console_write_support (int minor, const char *buf, int len)
* Console Device Driver Entry Points
*
*/
-
+
rtems_device_driver console_initialize(
rtems_device_major_number major,
rtems_device_minor_number minor,
@@ -171,7 +171,7 @@ rtems_device_driver console_initialize(
/*
* Initialize Hardware
*/
-
+
return RTEMS_SUCCESSFUL;
}
@@ -201,7 +201,7 @@ rtems_device_driver console_open(
return RTEMS_SUCCESSFUL;
}
-
+
rtems_device_driver console_close(
rtems_device_major_number major,
rtems_device_minor_number minor,
@@ -210,7 +210,7 @@ rtems_device_driver console_close(
{
return rtems_termios_close (arg);
}
-
+
rtems_device_driver console_read(
rtems_device_major_number major,
rtems_device_minor_number minor,
@@ -219,7 +219,7 @@ rtems_device_driver console_read(
{
return rtems_termios_read (arg);
}
-
+
rtems_device_driver console_write(
rtems_device_major_number major,
rtems_device_minor_number minor,
@@ -228,7 +228,7 @@ rtems_device_driver console_write(
{
return rtems_termios_write (arg);
}
-
+
rtems_device_driver console_control(
rtems_device_major_number major,
rtems_device_minor_number minor,
diff --git a/c/src/lib/libbsp/m68k/dmv152/include/bsp.h b/c/src/lib/libbsp/m68k/dmv152/include/bsp.h
index 249106d9ce..439b20a5db 100644
--- a/c/src/lib/libbsp/m68k/dmv152/include/bsp.h
+++ b/c/src/lib/libbsp/m68k/dmv152/include/bsp.h
@@ -46,7 +46,7 @@ extern "C" {
#define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2
/* #define CONFIGURE_INTERRUPT_STACK_MEMORY (TBD * 1024) */
-
+
/*
* Define the time limits for RTEMS Test Suite test durations.
* Long test and short test duration limits are provided. These
@@ -165,7 +165,7 @@ extern m68k_isr_entry M68Kvec[]; /* vector table address */
/*
* NOTE: Use the standard Console driver entry
*/
-
+
/*
* NOTE: Use the standard Clock driver entry
*/
diff --git a/c/src/lib/libbsp/m68k/dmv152/startup/bspclean.c b/c/src/lib/libbsp/m68k/dmv152/startup/bspclean.c
index da9c7585e1..2d947236ed 100644
--- a/c/src/lib/libbsp/m68k/dmv152/startup/bspclean.c
+++ b/c/src/lib/libbsp/m68k/dmv152/startup/bspclean.c
@@ -16,5 +16,5 @@
void bsp_cleanup( void )
{
- VME_interrupt_Disable( 0xff );
+ VME_interrupt_Disable( 0xff );
}
diff --git a/c/src/lib/libbsp/m68k/dmv152/startup/bspstart.c b/c/src/lib/libbsp/m68k/dmv152/startup/bspstart.c
index 42396f865d..203b6359d0 100644
--- a/c/src/lib/libbsp/m68k/dmv152/startup/bspstart.c
+++ b/c/src/lib/libbsp/m68k/dmv152/startup/bspstart.c
@@ -19,7 +19,7 @@
#include <bsp.h>
#include <rtems/libio.h>
#include <rtems/libcsupport.h>
-
+
/*
* The original table from the application and our copy of it with
* some changes.
@@ -35,11 +35,11 @@ char *rtems_progname;
/*
* Use the shared implementations of the following routines
*/
-
+
void bsp_postdriver_hook(void);
void bsp_libc_init( void *, uint32_t, int );
void bsp_pretasking_hook(void); /* m68k version */
-
+
/*
* bsp_start
*
diff --git a/c/src/lib/libbsp/m68k/gen68302/clock/ckinit.c b/c/src/lib/libbsp/m68k/gen68302/clock/ckinit.c
index df7df55bc6..f4ddb6fe14 100644
--- a/c/src/lib/libbsp/m68k/gen68302/clock/ckinit.c
+++ b/c/src/lib/libbsp/m68k/gen68302/clock/ckinit.c
@@ -50,11 +50,11 @@ volatile uint32_t Clock_driver_ticks;
uint32_t Clock_isrs;
void Clock_exit( void );
-
+
/*
* These are set by clock driver during its init
*/
-
+
rtems_device_major_number rtems_clock_major = ~0;
rtems_device_minor_number rtems_clock_minor;
@@ -111,17 +111,17 @@ rtems_device_driver Clock_initialize(
)
{
Install_clock( Clock_isr );
-
+
/*
* make major/minor avail to others such as shared memory driver
*/
-
+
rtems_clock_major = major;
rtems_clock_minor = minor;
-
+
return RTEMS_SUCCESSFUL;
}
-
+
rtems_device_driver Clock_control(
rtems_device_major_number major,
rtems_device_minor_number minor,
@@ -130,15 +130,15 @@ rtems_device_driver Clock_control(
{
uint32_t isrlevel;
rtems_libio_ioctl_args_t *args = pargp;
-
+
if (args == 0)
goto done;
-
+
/*
* This is hokey, but until we get a defined interface
* to do this, it will just be this simple...
*/
-
+
if (args->command == rtems_build_name('I', 'S', 'R', ' '))
{
Clock_isr( CLOCK_VECTOR);
@@ -149,7 +149,7 @@ rtems_device_driver Clock_control(
(void) set_vector( args->buffer, CLOCK_VECTOR, 1 );
rtems_interrupt_enable( isrlevel );
}
-
+
done:
return RTEMS_SUCCESSFUL;
}
diff --git a/c/src/lib/libbsp/m68k/gen68302/console/console.c b/c/src/lib/libbsp/m68k/gen68302/console/console.c
index 43afc35428..84363fb735 100644
--- a/c/src/lib/libbsp/m68k/gen68302/console/console.c
+++ b/c/src/lib/libbsp/m68k/gen68302/console/console.c
@@ -83,10 +83,10 @@ rtems_device_driver console_initialize(
major,
(rtems_device_minor_number) 0
);
-
+
if (status != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred(status);
-
+
return RTEMS_SUCCESSFUL;
}
@@ -211,7 +211,7 @@ rtems_device_driver console_open(
{
return RTEMS_SUCCESSFUL;
}
-
+
/*
* Close entry point
*/
@@ -239,7 +239,7 @@ rtems_device_driver console_read(
char *buffer;
int maximum;
int count = 0;
-
+
rw_args = (rtems_libio_rw_args_t *) arg;
buffer = rw_args->buffer;
@@ -258,7 +258,7 @@ rtems_device_driver console_read(
}
/*
- * write bytes to the serial port. Stdout and stderr are the same.
+ * write bytes to the serial port. Stdout and stderr are the same.
*/
rtems_device_driver console_write(
diff --git a/c/src/lib/libbsp/m68k/gen68302/include/bsp.h b/c/src/lib/libbsp/m68k/gen68302/include/bsp.h
index 958471e9ef..28b663a532 100644
--- a/c/src/lib/libbsp/m68k/gen68302/include/bsp.h
+++ b/c/src/lib/libbsp/m68k/gen68302/include/bsp.h
@@ -100,7 +100,7 @@ extern "C" {
/*
* NOTE: Use the standard Console driver entry
*/
-
+
/*
* NOTE: Use the standard Clock driver entry
*/
diff --git a/c/src/lib/libbsp/m68k/gen68302/network/network.c b/c/src/lib/libbsp/m68k/gen68302/network/network.c
index 7252f2f15d..b1d47be756 100644
--- a/c/src/lib/libbsp/m68k/gen68302/network/network.c
+++ b/c/src/lib/libbsp/m68k/gen68302/network/network.c
@@ -158,15 +158,15 @@ m302Enet_initialize_hardware (struct scc_softc *sc)
#define DSQE 0x0010
#define FDE 0x0020
-
+
/*
* standard loopback
*/
- M68302imp_port_data (1) &= ~(LBK);
+ M68302imp_port_data (1) &= ~(LBK);
M68302imp_port_data (1) |= (FDE);
-
+
M68en302imp_ecntrl=0x0001;
/*
* Set dma configuration status register EDMA
@@ -175,15 +175,15 @@ m302Enet_initialize_hardware (struct scc_softc *sc)
(sc->txBdCount == 32) ? EDMA_BDSIZE_32T_96R :
(sc->txBdCount == 64) ? EDMA_BDSIZE_64T_64R :
EDMA_BDSIZE_8T_120R;
-
+
M68en302imp_edma = EDMA_BLIM_8ACCESS | EDMA_WMRK_16FIFO | EDMA_BIT_TSRLY | (ushort)i;
-
+
/*
* Set maximum receive buffer length
*/
M68en302imp_emrblr = RBUF_SIZE; /* 1520 */
-
+
/*
* Set interrupt vector
*/
@@ -191,23 +191,23 @@ m302Enet_initialize_hardware (struct scc_softc *sc)
M68en302imp_intr_mask=0x0;
-
+
/*
* Set ethernet Configuration
*/
M68en302imp_ecnfig=0x0000;
-
+
/*
* Set ETHER_TEST
*/
M68en302imp_ether_test=0x0000;
-
+
/*
* Set AR control Register
* Ignore/accept broadcast packets as specified
*/
M68en302imp_ar_cntrl = ((sc->acceptBroadcast) ? 0 : AR_CNTRL_BIT_NO_BROADCAST) ;
-
+
/*
* Allocate mbuf pointers
*/
@@ -220,7 +220,7 @@ m302Enet_initialize_hardware (struct scc_softc *sc)
* Set our physical address
*/
hwaddr = sc->arpcom.ac_enaddr;
-
+
cam=(ushort *)(M68en302imp_cet);
for (i=0;i<64;i++){
cam[(4*i)]=0x00ff;
@@ -232,7 +232,7 @@ m302Enet_initialize_hardware (struct scc_softc *sc)
cam[5] = (hwaddr[2] << 8) | hwaddr[3];
cam[6] = (hwaddr[4] << 8) | hwaddr[5];
-
+
/*
* Set receiver and transmitter buffer descriptor bases
*/
@@ -240,13 +240,13 @@ m302Enet_initialize_hardware (struct scc_softc *sc)
for (i=0;i<128;i++){
-
+
M68302_scc_bd_stat_ctrl (a_bd + i) = 0;
M68302_scc_bd_data_lgth (a_bd + i) = 0;
M68302_scc_bd_p_buffer (a_bd + i) = NULL;
}
-
+
sc->txBdBase = M68302imp_a_eth_bd ( 0 ); /* point to first BD */
sc->rxBdBase = M68302imp_a_eth_bd ( sc->txBdCount); /* point to first RX BD atfer all TX*/
@@ -266,7 +266,7 @@ m302Enet_initialize_hardware (struct scc_softc *sc)
/*
* Set up interrupts
*/
-
+
status = rtems_interrupt_catch (m302Enet_interrupt_handler,
M302_ETHER_IVECTOR,
&old_handler);
@@ -403,7 +403,7 @@ scc_rxDaemon (void *arg)
sc->rxMbuf[rxBdIndex] = m;
rxBd->p_buffer = mtod (m, void *);
-
+
if (++rxBdIndex == sc->rxBdCount) {
rxBd->stat_ctrl = BUF_STAT_EMPTY | BUF_STAT_INTERRUPT | BUF_STAT_WRAP;
break;
@@ -443,7 +443,7 @@ scc_rxDaemon (void *arg)
*/
rtems_interrupt_disable (level);
M68en302imp_intr_mask |= INTR_MASK_BIT_RFIEN;
-
+
rtems_interrupt_enable (level);
rtems_bsdnet_event_receive (INTERRUPT_EVENT,
RTEMS_WAIT|RTEMS_EVENT_ANY,
@@ -452,7 +452,7 @@ scc_rxDaemon (void *arg)
}
}
-
+
/*
* Check that packet is valid
*/
@@ -478,7 +478,7 @@ scc_rxDaemon (void *arg)
sizeof(struct ether_header);
eh = mtod (m, struct ether_header *);
m->m_data += sizeof(struct ether_header);
-
+
ether_input (ifp, eh, m);
/*
@@ -535,7 +535,7 @@ sendpacket (struct ifnet *ifp, struct mbuf *m)
struct mbuf *l = NULL;
uint16_t status;
int nAdded;
-
+
/*
* Free up buffer descriptors
*/
@@ -611,14 +611,14 @@ sendpacket (struct ifnet *ifp, struct mbuf *m)
MFREE (m, n);
m = n;
}
-
+
/*
* Redo the send with the new mbuf cluster
*/
m = nm;
nAdded = 0;
status = 0;
-
+
continue;
}
@@ -677,7 +677,7 @@ sendpacket (struct ifnet *ifp, struct mbuf *m)
txBd = sc->txBdBase + sc->txBdHead;
txBd->p_buffer = mtod (m, void *);
txBd->data_lgth = m->m_len;
-
+
sc->txMbuf[sc->txBdHead] = m;
status = nAdded ? BUF_STAT_READY : 0;
if (++sc->txBdHead == sc->txBdCount) {
@@ -688,7 +688,7 @@ sendpacket (struct ifnet *ifp, struct mbuf *m)
l = m;
m = m->m_next;
nAdded++;
-
+
}
else {
/*
@@ -699,7 +699,7 @@ sendpacket (struct ifnet *ifp, struct mbuf *m)
m = n;
if (l != NULL)
l->m_next = m;
-
+
}
}
if (nAdded) {
@@ -709,7 +709,7 @@ sendpacket (struct ifnet *ifp, struct mbuf *m)
txBd->stat_ctrl = status | BUF_STAT_LAST | BUF_STAT_TX_CRC | BUF_STAT_INTERRUPT;
firstTxBd->stat_ctrl |= BUF_STAT_READY;
sc->txBdActiveCount += nAdded;
-
+
}
}
@@ -782,7 +782,7 @@ scc_init (void *arg)
sc->rxDaemonTid = rtems_bsdnet_newproc ("SCrx", 4096, scc_rxDaemon, sc);
}
-
+
/*
* Set flags appropriately
*/
@@ -800,7 +800,7 @@ scc_init (void *arg)
* Enable receiver and transmitter
*/
M68en302imp_ecntrl = ECNTRL_BIT_RESET | ECNTRL_BIT_ETHER_EN;
-
+
}
/*
@@ -891,7 +891,7 @@ scc_ioctl (struct ifnet *ifp, int command, caddr_t data)
case SIO_RTEMS_SHOW_STATS:
scc_stats (sc);
break;
-
+
/*
* FIXME: All sorts of multicast commands need to be added here!
*/
@@ -922,7 +922,7 @@ rtems_ether1_driver_attach (struct rtems_bsdnet_ifconfig *config)
*/
if ((unitNumber = rtems_bsdnet_parse_driver_name (config, &unitName)) < 0)
return 0;
-
+
/*
* Is driver free?
*/
@@ -943,7 +943,7 @@ rtems_ether1_driver_attach (struct rtems_bsdnet_ifconfig *config)
if (config->hardware_address) {
memcpy (sc->arpcom.ac_enaddr, config->hardware_address, ETHER_ADDR_LEN);
}
-
+
if (config->mtu)
mtu = config->mtu;
else
diff --git a/c/src/lib/libbsp/m68k/gen68302/startup/bspstart.c b/c/src/lib/libbsp/m68k/gen68302/startup/bspstart.c
index 63678e4b25..fd7f7503b2 100644
--- a/c/src/lib/libbsp/m68k/gen68302/startup/bspstart.c
+++ b/c/src/lib/libbsp/m68k/gen68302/startup/bspstart.c
@@ -19,7 +19,7 @@
#include <bsp.h>
#include <rtems/libio.h>
#include <rtems/libcsupport.h>
-
+
/*
* The original table from the application and our copy of it with
* some changes.
@@ -35,7 +35,7 @@ char *rtems_progname;
/*
* Use the shared implementations of the following routines
*/
-
+
void bsp_postdriver_hook(void);
void bsp_libc_init( void *, uint32_t, int );
void bsp_pretasking_hook(void); /* m68k version */
diff --git a/c/src/lib/libbsp/m68k/gen68302/timer/timer.c b/c/src/lib/libbsp/m68k/gen68302/timer/timer.c
index 6e53830bdf..b3927487c7 100644
--- a/c/src/lib/libbsp/m68k/gen68302/timer/timer.c
+++ b/c/src/lib/libbsp/m68k/gen68302/timer/timer.c
@@ -6,7 +6,7 @@
*
* Output parameters: NONE
*
- * NOTE: It is important that the timer start/stop overhead be
+ * NOTE: It is important that the timer start/stop overhead be
* determined when porting or modifying this code.
*
* COPYRIGHT (c) 1989-1999.
diff --git a/c/src/lib/libbsp/m68k/gen68340/clock/ckinit.c b/c/src/lib/libbsp/m68k/gen68340/clock/ckinit.c
index 6634fc270a..3078046cf5 100644
--- a/c/src/lib/libbsp/m68k/gen68340/clock/ckinit.c
+++ b/c/src/lib/libbsp/m68k/gen68340/clock/ckinit.c
@@ -1,4 +1,4 @@
-/*
+/*
* This routine initializes the MC68340/349 Periodic Interval Timer
*
* Based on the `gen68360' board support package, and covered by the
@@ -9,7 +9,7 @@
* 4, rue du Clos Courtel
* 35512 CESSON-SEVIGNE
* FRANCE
- *
+ *
* e-mail: g_montel@yahoo.com
*
* $Id$
@@ -54,7 +54,7 @@ rtems_device_minor_number rtems_clock_minor;
/******************************************************
Name: Clock_isr
- Input parameters: irq vector
+ Input parameters: irq vector
Output parameters: none
Description: update # of clock ticks
*****************************************************/
@@ -79,7 +79,7 @@ Clock_exit (void)
{
/*
* Turn off periodic interval timer
- */
+ */
SIMPITR = 0;
}
@@ -99,23 +99,23 @@ Install_clock (rtems_isr_entry clock_isr)
Clock_driver_ticks = 0;
set_vector (clock_isr, CLOCK_VECTOR, 1);
-
+
/* sets the Periodic Interrupt Control Register PICR */
/* voir a quoi correspond exactement le Clock Vector */
- SIMPICR = ( CLOCK_IRQ_LEVEL << 8 ) | ( CLOCK_VECTOR );
-
+ SIMPICR = ( CLOCK_IRQ_LEVEL << 8 ) | ( CLOCK_VECTOR );
+
/* sets the PITR count value */
/* this assumes a 32.765 kHz crystal */
-
+
usecs_per_tick = BSP_Configuration.microseconds_per_tick;
/* find out whether prescaler should be enabled or not */
if ( usecs_per_tick <= 31128 ) {
pitr_tmp = ( usecs_per_tick * 8192 ) / 1000000 ;
} else {
pitr_tmp = ( usecs_per_tick / 1000000 ) * 16;
- /* enable it */
- pitr_tmp |= 0x100;
+ /* enable it */
+ pitr_tmp |= 0x100;
}
SIMPITR = (unsigned char) pitr_tmp;
@@ -126,7 +126,7 @@ Install_clock (rtems_isr_entry clock_isr)
/******************************************************
Name: Clock_initialize
Input parameters: major & minor numbers
- Output parameters: -
+ Output parameters: -
Description: main entry for clock initialization
calls the bsp dependant routine
*****************************************************/
@@ -138,16 +138,16 @@ Clock_initialize(
)
{
Install_clock (Clock_isr);
-
+
/*
* make major/minor avail to others such as shared memory driver
*/
rtems_clock_major = major;
rtems_clock_minor = minor;
-
+
return RTEMS_SUCCESSFUL;
}
-
+
/******************************************************
Name: Clock_control
Input parameters: major & minor number
diff --git a/c/src/lib/libbsp/m68k/gen68340/console/Modif_cpu_asm.S b/c/src/lib/libbsp/m68k/gen68340/console/Modif_cpu_asm.S
index 38ba6f2646..3895962722 100644
--- a/c/src/lib/libbsp/m68k/gen68340/console/Modif_cpu_asm.S
+++ b/c/src/lib/libbsp/m68k/gen68340/console/Modif_cpu_asm.S
@@ -49,7 +49,7 @@
* permitted by the new interrupt level mask, and (2) when
* the original context regains the cpu.
*/
-
+
#if ( M68K_HAS_VBR == 1)
.set SR_OFFSET, 0 | Status register offset
.set PC_OFFSET, 2 | Program Counter offset
@@ -59,7 +59,7 @@
.set PC_OFFSET, 4 | Program Counter offset
.set FVO_OFFSET, 0 | Format/vector offset placed in the stack
#endif /* M68K_HAS_VBR */
-
+
.set SAVED, 16 | space for saved registers
.align 4
@@ -68,7 +68,7 @@
SYM (_Debug_ISR_Handler_Console):
|
- tst.w 0x14000000 | ALLUME CS5
+ tst.w 0x14000000 | ALLUME CS5
|
addql #1,SYM (_Thread_Dispatch_disable_level) | disable multitasking
diff --git a/c/src/lib/libbsp/m68k/gen68340/console/console.c b/c/src/lib/libbsp/m68k/gen68340/console/console.c
index 6035fcb8a5..bfde76f00b 100644
--- a/c/src/lib/libbsp/m68k/gen68340/console/console.c
+++ b/c/src/lib/libbsp/m68k/gen68340/console/console.c
@@ -7,7 +7,7 @@
* 4, rue du Clos Courtel
* 35512 CESSON-SEVIGNE
* FRANCE
- *
+ *
* e-mail: g_montel@yahoo.com
*
* COPYRIGHT (c) 1989-1999.
@@ -102,7 +102,7 @@ InterruptHandler (rtems_vector_number v)
else {
/* this is necessary, otherwise it blocks when FIFO is full */
ch = DURBA;
- rtems_termios_enqueue_raw_characters(ttypA,&ch,1);
+ rtems_termios_enqueue_raw_characters(ttypA,&ch,1);
}
} while (DUSRA & m340_Rx_RDY);
Restart_Fifo_Full_A_Timer(); /* only if necessary (pointer to a fake function if
@@ -142,9 +142,9 @@ InterruptHandler (rtems_vector_number v)
/* push them in a trash */
ch = DURBB;
}
- else {
+ else {
ch = DURBB;
- rtems_termios_enqueue_raw_characters(ttypB,&ch,1);
+ rtems_termios_enqueue_raw_characters(ttypB,&ch,1);
}
} while (DUSRB & m340_Rx_RDY);
@@ -189,16 +189,16 @@ InterruptWrite (int minor, const char *buf, int len)
Input parameters: channel, character to emit
Output parameters: -
Description: wait for the UART to be ready to emit
- a character and send it
+ a character and send it
*****************************************************/
void dbug_out_char( int minor, int ch )
{
if (minor==UART_CHANNEL_A) {
- while (!(DUSRA & m340_Tx_RDY)) continue;
+ while (!(DUSRA & m340_Tx_RDY)) continue;
DUTBA=ch;
}
else if (minor==UART_CHANNEL_B) {
- while (!(DUSRB & m340_Tx_RDY)) continue;
+ while (!(DUSRB & m340_Tx_RDY)) continue;
DUTBB=ch;
}
}
@@ -262,7 +262,7 @@ dbugInitialise ()
DUCRB = m340_Reset_Transmitter;
/*
- * Enable serial module for normal operation, ignore FREEZE, select the crystal clock,
+ * Enable serial module for normal operation, ignore FREEZE, select the crystal clock,
* supervisor/user serial registers unrestricted
* interrupt arbitration at priority CONSOLE_INTERRUPT_ARBITRATION
* WARNING : 8 bits access only on this UART!
@@ -322,17 +322,17 @@ dbugInitialise ()
*/
unset_DUIER(m340_RxRDYA&m340_TxRDYA);
}
-
+
/*
* Change set of baud speeds
* disable input control
*/
/* no good uart configuration ? */
if (uart_config.nb<1) rtems_fatal_error_occurred (-1);
-
- if (uart_config.baud_speed_table[UART_CHANNEL_A].set==1)
+
+ if (uart_config.baud_speed_table[UART_CHANNEL_A].set==1)
DUACR = m340_BRG_Set1;
- else
+ else
DUACR = m340_BRG_Set2;
/*
@@ -347,13 +347,13 @@ dbugInitialise ()
/*
* Serial Channel Baud Speed
*/
- DUCSRA = (uart_config.baud_speed_table[UART_CHANNEL_A].rcs << 4)
+ DUCSRA = (uart_config.baud_speed_table[UART_CHANNEL_A].rcs << 4)
| (uart_config.baud_speed_table[UART_CHANNEL_A].tcs);
/*
* Serial Channel Configuration
*/
- DUMR1A = m340_uart_config[UART_CHANNEL_A].parity_mode
+ DUMR1A = m340_uart_config[UART_CHANNEL_A].parity_mode
| m340_uart_config[UART_CHANNEL_A].bits_per_char
| m340_RxRTS;
@@ -376,7 +376,7 @@ dbugInitialise ()
if (CHANNEL_ENABLED_B) {
/* we mustn't set the console vector twice! */
- if ((USE_INTERRUPTS_B && !(CHANNEL_ENABLED_A))
+ if ((USE_INTERRUPTS_B && !(CHANNEL_ENABLED_A))
|| (USE_INTERRUPTS_B && CHANNEL_ENABLED_A && !USE_INTERRUPTS_A)) {
rtems_isr_entry old_handler;
rtems_status_code sc;
@@ -408,7 +408,7 @@ dbugInitialise ()
*/
unset_DUIER(m340_RxRDYB&m340_TxRDYB);
}
-
+
/*
* Change set of baud speeds
* disable input control
@@ -416,7 +416,7 @@ dbugInitialise ()
/* no good uart configuration ? */
if (uart_config.nb<2) rtems_fatal_error_occurred (-1);
-
+
/* don't set DUACR twice! */
if (!CHANNEL_ENABLED_A) {
if (uart_config.baud_speed_table[UART_CHANNEL_B].set==1)
@@ -437,13 +437,13 @@ dbugInitialise ()
/*
* Serial Channel Baud Speed
*/
- DUCSRB = (uart_config.baud_speed_table[UART_CHANNEL_B].rcs << 4)
+ DUCSRB = (uart_config.baud_speed_table[UART_CHANNEL_B].rcs << 4)
| (uart_config.baud_speed_table[UART_CHANNEL_B].tcs);
/*
* Serial Channel Configuration
*/
- DUMR1B = m340_uart_config[UART_CHANNEL_B].parity_mode
+ DUMR1B = m340_uart_config[UART_CHANNEL_B].parity_mode
| m340_uart_config[UART_CHANNEL_B].bits_per_char
| m340_RxRTS;
@@ -479,7 +479,7 @@ SetAttributes (int minor, const struct termios *t)
/* output speed */
if (t->c_cflag & CBAUDEX)
osp = (t->c_cflag & CBAUD) + CBAUD + 1;
- else
+ else
osp = t->c_cflag & CBAUD;
/* input speed */
@@ -633,7 +633,7 @@ rtems_device_driver console_open(
return sc;
}
-
+
/******************************************************
Name: console_close
Input parameters: channel #, termios args
@@ -692,9 +692,9 @@ rtems_device_driver console_control(
)
{
rtems_libio_ioctl_args_t *args = arg;
-
+
if (args->command == RTEMS_IO_SET_ATTRIBUTES)
SetAttributes (minor, (struct termios *)args->buffer);
-
+
return rtems_termios_ioctl (arg);
}
diff --git a/c/src/lib/libbsp/m68k/gen68340/console/m340uart.c b/c/src/lib/libbsp/m68k/gen68340/console/m340uart.c
index 94160b011c..75b3d97e77 100644
--- a/c/src/lib/libbsp/m68k/gen68340/console/m340uart.c
+++ b/c/src/lib/libbsp/m68k/gen68340/console/m340uart.c
@@ -7,8 +7,8 @@
* 4, rue du Clos Courtel
* 35512 CESSON-SEVIGNE
* FRANCE
- *
- * e-mail: g_montel@yahoo.com
+ *
+ * e-mail: g_montel@yahoo.com
*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
@@ -69,9 +69,9 @@ uart_channel_config m340_uart_config[UART_NUMBER_OF_CHANNELS];
Output parameters: -
Description: Init the m340_uart_config
THIS SHOULD NOT BE HERE!
- Its aim was to let the user configure
+ Its aim was to let the user configure
UARTs for each application.
- As we can't pass args to the console
+ As we can't pass args to the console
driver initialisation routine at the
moment, this was not done.
ATTENTION: TERMIOS init presupposes that the channel
@@ -109,18 +109,18 @@ void Init_UART_Table(void)
/******************************************************
Name: Find_Right_m340_UART_Channel_Config
- Input parameters: Send/Receive baud rates for a
+ Input parameters: Send/Receive baud rates for a
given channel
Output parameters: UART compatible configs for this
channel
- Description: returns which uart configurations fit
- Receiver Baud Rate and Transmitter Baud
+ Description: returns which uart configurations fit
+ Receiver Baud Rate and Transmitter Baud
Rate for a given channel
- For instance, according to the
+ For instance, according to the
m340_Baud_Rates_Table:
- Output Speed = 50, Input Speed = 75
is not a correct config, because
- 50 bauds implies set 1 and 75 bauds
+ 50 bauds implies set 1 and 75 bauds
implies set 2
- Output Speed = 9600, Input Speed = 9600
two correct configs for this:
@@ -142,7 +142,7 @@ Find_Right_m340_UART_Channel_Config(float ReceiverBaudRate, float TransmitterBau
int i,j;
/* Receiver and Transmitter baud rates must be compatible, ie in the same set */
-
+
/* search for configurations for ReceiverBaudRate - there can't be more than two (only two sets) */
for (i=0;i<16;i++)
for (j=0;j<2;j++)
@@ -151,7 +151,7 @@ Find_Right_m340_UART_Channel_Config(float ReceiverBaudRate, float TransmitterBau
Receiver[Receiver_nb_of_config].set=j;
Receiver_nb_of_config++;
}
-
+
/* search for configurations for TransmitterBaudRate - there can't be more than two (only two sets) */
for (i=0;i<16;i++)
for (j=0;j<2;j++)
@@ -161,15 +161,15 @@ Find_Right_m340_UART_Channel_Config(float ReceiverBaudRate, float TransmitterBau
Transmitter_nb_of_config++;
}
- /* now check if there's a compatible config */
+ /* now check if there's a compatible config */
return_value.nb=0;
-
+
for (i=0; i<Receiver_nb_of_config; i++)
for (j=0;j<Transmitter_nb_of_config;j++)
if (Receiver[i].set == Transmitter[j].set) {
return_value.baud_speed_table[return_value.nb].set = Receiver[i].set + 1; /* we want set 1 or set 2, not 0 or 1 */
return_value.baud_speed_table[return_value.nb].rcs = Receiver[i].cs;
- return_value.baud_speed_table[return_value.nb].tcs = Transmitter[j].cs;
+ return_value.baud_speed_table[return_value.nb].tcs = Transmitter[j].cs;
return_value.nb++;
}
@@ -178,17 +178,17 @@ Find_Right_m340_UART_Channel_Config(float ReceiverBaudRate, float TransmitterBau
/******************************************************
Name: Find_Right_m340_UART_Config
- Input parameters: Send/Receive baud rates for both
+ Input parameters: Send/Receive baud rates for both
channels
- Output parameters: UART compatible configs for
+ Output parameters: UART compatible configs for
BOTH channels
- Description: returns which uart configurations fit
- Receiver Baud Rate and Transmitter Baud
+ Description: returns which uart configurations fit
+ Receiver Baud Rate and Transmitter Baud
Rate for both channels
- For instance, if we want 9600/38400 on
- channel A and 9600/19200 on channel B,
- this is not a good m340 uart config
- (channel A needs set 1 and channel B
+ For instance, if we want 9600/38400 on
+ channel A and 9600/19200 on channel B,
+ this is not a good m340 uart config
+ (channel A needs set 1 and channel B
needs set 2)
*****************************************************/
t_baud_speed_table
@@ -245,7 +245,7 @@ Find_Right_m340_UART_Config(float ChannelA_ReceiverBaudRate, float ChannelA_Tran
we need to know real speed in order
to use the functions above
*****************************************************/
-float termios_baud_rates_equivalence ( int speed )
+float termios_baud_rates_equivalence ( int speed )
{
switch (speed) {
default: return 0; break;
@@ -304,7 +304,7 @@ int dbugRead (int minor)
int dbugWrite (int minor, const char *buf, int len)
{
static char txBuf;
-
+
while (len--) {
txBuf = *buf++;
dbug_out_char( minor, (int)txBuf );
@@ -318,7 +318,7 @@ static void fmt_str( int minor, const char* );
/******************************************************
Name: RAW_GETC
Input parameters: channel, buffer and its length
- Output parameters:
+ Output parameters:
Description: a light blocking "getc"
*****************************************************/
char RAW_GETC(int minor)
diff --git a/c/src/lib/libbsp/m68k/gen68340/include/bsp.h b/c/src/lib/libbsp/m68k/gen68340/include/bsp.h
index 1cd088c509..74153a1e49 100644
--- a/c/src/lib/libbsp/m68k/gen68340/include/bsp.h
+++ b/c/src/lib/libbsp/m68k/gen68340/include/bsp.h
@@ -39,7 +39,7 @@ extern "C" {
/* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */
#define CONFIGURE_INTERRUPT_STACK_MEMORY (4 * 1024)
-
+
/*
* Define the time limits for RTEMS Test Suite test durations.
* Long test and short test duration limits are provided. These
@@ -93,7 +93,7 @@ extern "C" {
/*
* NOTE: Use the standard Console driver entry
*/
-
+
/*
* NOTE: Use the standard Clock driver entry
*/
diff --git a/c/src/lib/libbsp/m68k/gen68340/include/m340timer.h b/c/src/lib/libbsp/m68k/gen68340/include/m340timer.h
index 948bc36b6b..4b0050b5d4 100644
--- a/c/src/lib/libbsp/m68k/gen68340/include/m340timer.h
+++ b/c/src/lib/libbsp/m68k/gen68340/include/m340timer.h
@@ -8,8 +8,8 @@
* 4, rue du Clos Courtel
* 35512 CESSON-SEVIGNE
* FRANCE
- *
- * e-mail: g_montel@yahoo.com
+ *
+ * e-mail: g_montel@yahoo.com
*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
diff --git a/c/src/lib/libbsp/m68k/gen68340/include/m340uart.h b/c/src/lib/libbsp/m68k/gen68340/include/m340uart.h
index e9cb6598c7..6bf4a32d14 100644
--- a/c/src/lib/libbsp/m68k/gen68340/include/m340uart.h
+++ b/c/src/lib/libbsp/m68k/gen68340/include/m340uart.h
@@ -8,8 +8,8 @@
* 4, rue du Clos Courtel
* 35512 CESSON-SEVIGNE
* FRANCE
- *
- * e-mail: g_montel@yahoo.com
+ *
+ * e-mail: g_montel@yahoo.com
*
*
* COPYRIGHT (c) 1989-1999.
diff --git a/c/src/lib/libbsp/m68k/gen68340/include/m68340.h b/c/src/lib/libbsp/m68k/gen68340/include/m68340.h
index b8e5422d0a..fefb223fc1 100644
--- a/c/src/lib/libbsp/m68k/gen68340/include/m68340.h
+++ b/c/src/lib/libbsp/m68k/gen68340/include/m68340.h
@@ -4,7 +4,7 @@
* Developed by : Motorola *
* High Performance Embedded Systems Division *
* Austin, TX *
- * Rectified by : Geoffroy Montel
+ * Rectified by : Geoffroy Montel
* g_montel@yahoo.com *
* *
**********************************************************************/
@@ -14,7 +14,7 @@ typedef volatile unsigned short * portw; /* 16-bit port */
typedef volatile unsigned int * portl; /* 32-bit port */
#define MBASE 0xEFFFF000 /* Module Base Address */
- /* not EFFFF000 due to a 68349
+ /* not EFFFF000 due to a 68349
hardware incompatibility */
#define MBAR (*(portb) 0x0003FF00) /* Module Base Addr Reg */
diff --git a/c/src/lib/libbsp/m68k/gen68340/start/start.S b/c/src/lib/libbsp/m68k/gen68340/start/start.S
index cad8293c0c..1f2976f96e 100644
--- a/c/src/lib/libbsp/m68k/gen68340/start/start.S
+++ b/c/src/lib/libbsp/m68k/gen68340/start/start.S
@@ -19,7 +19,7 @@
* 4, rue du Clos Courtel
* 35512 CESSON-SEVIGNE
* FRANCE
- *
+ *
* e-mail: g_montel@yahoo.com
*
* $Id$
@@ -537,7 +537,7 @@ _table_csepld:
#if 1
dc.w (((_EPLD_CS_BASE&0x0F)+0x80) << 8) | 0x80 | 16 bits, 0ws
dc.w 0x9090 | 16 bits, ext /dsack
-
+
#else
dc.b (_EPLD_CS_BASE&0x0F)+0x80 | 16 bits, 0ws
dc.b 0x80 | 16 bits, 0 ws
@@ -560,7 +560,7 @@ _begin_68349_init:
/*-------------------------------------------------*/
/* 68349 chip select initialization
-
+
at this stage, the width of /CS0 may be incorrect
it will be corrected later
*/
diff --git a/c/src/lib/libbsp/m68k/gen68340/start/startfor340only.S b/c/src/lib/libbsp/m68k/gen68340/start/startfor340only.S
index 937313a218..1367314057 100644
--- a/c/src/lib/libbsp/m68k/gen68340/start/startfor340only.S
+++ b/c/src/lib/libbsp/m68k/gen68340/start/startfor340only.S
@@ -19,7 +19,7 @@
* 4, rue du Clos Courtel
* 35512 CESSON-SEVIGNE
* FRANCE
- *
+ *
* e-mail: g_montel@yahoo.com
*
* $Id$
@@ -408,7 +408,7 @@ sync_wait:
/* -- chip select initialization -- */
lea.l SIM_MASKH0(a0),a2
lea.l _table_cs(%pc),a1
-
+
moveq.l #0x07,d1
_b_cs:
@@ -427,7 +427,7 @@ _fill_loop:
clr.l (a0)+
subq.l #1,d1
bne _fill_loop
-
+
_dont_fill:
jmp SYM(_Init68340) | Start C code (which never returns)
diff --git a/c/src/lib/libbsp/m68k/gen68340/startup/bspstart.c b/c/src/lib/libbsp/m68k/gen68340/startup/bspstart.c
index d7c95a4097..536e774631 100644
--- a/c/src/lib/libbsp/m68k/gen68340/startup/bspstart.c
+++ b/c/src/lib/libbsp/m68k/gen68340/startup/bspstart.c
@@ -24,7 +24,7 @@
#include <bsp.h>
#include <rtems/libio.h>
#include <rtems/libcsupport.h>
-
+
/*
* The original table from the application and our copy of it with
* some changes.
diff --git a/c/src/lib/libbsp/m68k/gen68340/startup/dumpanic.c b/c/src/lib/libbsp/m68k/gen68340/startup/dumpanic.c
index 7a84dff20e..9310ca9f87 100644
--- a/c/src/lib/libbsp/m68k/gen68340/startup/dumpanic.c
+++ b/c/src/lib/libbsp/m68k/gen68340/startup/dumpanic.c
@@ -7,7 +7,7 @@
* 4, rue du Clos Courtel
* 35512 CESSON-SEVIGNE
* FRANCE
- *
+ *
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
@@ -104,7 +104,7 @@ extern char RAW_GETC(int minor);
/******************************************************
Name: _dbug_dump
- Input parameters: sr, pc, stack pointer,
+ Input parameters: sr, pc, stack pointer,
size to display
Output parameters: -
Description: display the supervisor stack
diff --git a/c/src/lib/libbsp/m68k/gen68340/startup/init68340.c b/c/src/lib/libbsp/m68k/gen68340/startup/init68340.c
index 96caf9e585..d7e7831e4d 100644
--- a/c/src/lib/libbsp/m68k/gen68340/startup/init68340.c
+++ b/c/src/lib/libbsp/m68k/gen68340/startup/init68340.c
@@ -6,9 +6,9 @@
* 4, rue du Clos Courtel
* 35512 CESSON-SEVIGNE
* FRANCE
- *
+ *
* e-mail: g_montel@yahoo.com
- *
+ *
* $Id$
*/
diff --git a/c/src/lib/libbsp/m68k/gen68340/timer/timer.c b/c/src/lib/libbsp/m68k/gen68340/timer/timer.c
index b4298e150d..84060ae68c 100644
--- a/c/src/lib/libbsp/m68k/gen68340/timer/timer.c
+++ b/c/src/lib/libbsp/m68k/gen68340/timer/timer.c
@@ -13,7 +13,7 @@
* 4, rue du Clos Courtel
* 35512 CESSON-SEVIGNE
* FRANCE
- *
+ *
* e-mail: g_montel@yahoo.com
*
* $Id$
@@ -25,7 +25,7 @@
*
* Output parameters: NONE
*
- * NOTE: It is important that the timer start/stop overhead be
+ * NOTE: It is important that the timer start/stop overhead be
* determined when porting or modifying this code.
*
* COPYRIGHT (c) 1989-1999.
@@ -66,7 +66,7 @@ int preload = 0;
Input parameters: -
Output parameters: -
Description: when a character is received, sets
- the TIMER to raise an interrupt at
+ the TIMER to raise an interrupt at
TIMEOUT.
It's necessary to prevent from not
getting n-1 characters (with n the
@@ -128,7 +128,7 @@ void Fifo_Full_Timer_initialize (void)
* USE TIMER 1 for UART FIFO FULL mode
*/
- if ( Fifo_Full_on_A || Fifo_Full_on_B )
+ if ( Fifo_Full_on_A || Fifo_Full_on_B )
{
/* Disable the timer */
TCR1 &= ~m340_SWR;
@@ -145,8 +145,8 @@ void Fifo_Full_Timer_initialize (void)
/* compute prescaler */
if ( Fifo_Full_on_A && Fifo_Full_on_B)
- max_baud_rate = max(m340_uart_config[UART_CHANNEL_A].rx_baudrate, m340_uart_config[UART_CHANNEL_B].rx_baudrate);
- else if ( Fifo_Full_on_A )
+ max_baud_rate = max(m340_uart_config[UART_CHANNEL_A].rx_baudrate, m340_uart_config[UART_CHANNEL_B].rx_baudrate);
+ else if ( Fifo_Full_on_A )
max_baud_rate = m340_uart_config[UART_CHANNEL_A].rx_baudrate;
else max_baud_rate = m340_uart_config[UART_CHANNEL_B].rx_baudrate;
@@ -154,7 +154,7 @@ void Fifo_Full_Timer_initialize (void)
nb_of_clock_ticks = (10/max_baud_rate)*(CLOCK_SPEED*1000000)*1.2;
if (nb_of_clock_ticks < 0xFFFF) {
preload = nb_of_clock_ticks;
- prescaler_output_tap = -1;
+ prescaler_output_tap = -1;
} else if (nb_of_clock_ticks/2 < 0xFFFF) {
preload = nb_of_clock_ticks/2;
prescaler_output_tap = m340_Divide_by_2;
@@ -179,7 +179,7 @@ void Fifo_Full_Timer_initialize (void)
} else if (nb_of_clock_ticks/256 < 0xFFFF) {
preload = nb_of_clock_ticks/256;
prescaler_output_tap = m340_Divide_by_256;
- }
+ }
/* Input Capture/Output Compare (ICOC) */
TCR1 = m340_SWR | m340_TO_Enabled | m340_ICOC;
@@ -250,7 +250,7 @@ void Timer_initialize (void)
}
/******************************************************
- Name: Read_timer
+ Name: Read_timer
Input parameters: -
Output parameters: -
Description: Return timer value in microsecond units
@@ -263,10 +263,10 @@ Read_timer (void)
}
/******************************************************
- Name: Empty_function
+ Name: Empty_function
Input parameters: -
Output parameters: -
- Description: Empty function call used in loops to
+ Description: Empty function call used in loops to
measure basic cost of looping
in Timing Test Suite.
*****************************************************/
diff --git a/c/src/lib/libbsp/m68k/gen68360/clock/clock.c b/c/src/lib/libbsp/m68k/gen68360/clock/clock.c
index 7ac1d8f728..8959821991 100644
--- a/c/src/lib/libbsp/m68k/gen68360/clock/clock.c
+++ b/c/src/lib/libbsp/m68k/gen68360/clock/clock.c
@@ -1,4 +1,4 @@
-/*
+/*
* This routine initializes the MC68360 Periodic Interval Timer
*
* The PIT has rather poor resolution, but it is easy to set up
@@ -77,7 +77,7 @@ static unsigned long nsec;
* To reduce the jitter in the calls to RTEMS the
* hardware interrupt interval is never greater than
* the maximum non-prescaled value from the PIT.
- *
+ *
* For a 25 MHz external clock the basic clock rate is
* 40 nsec * 128 * 4 = 20.48 usec/tick
*/
diff --git a/c/src/lib/libbsp/m68k/gen68360/console/console.c b/c/src/lib/libbsp/m68k/gen68360/console/console.c
index c20bbfbb17..1cf6aef777 100644
--- a/c/src/lib/libbsp/m68k/gen68360/console/console.c
+++ b/c/src/lib/libbsp/m68k/gen68360/console/console.c
@@ -168,7 +168,7 @@ smc1Initialize (int major, int minor, void *arg)
* Put SMC1 in NMSI mode, connect SMC1 to BRG1
*/
m360.simode |= M360_SI_SMC1_BRG1;
-
+
/*
* Set up SMC1 parameter RAM common to all protocols
*/
@@ -180,7 +180,7 @@ smc1Initialize (int major, int minor, void *arg)
m360.smc1p.mrblr = RXBUFSIZE;
else
m360.smc1p.mrblr = 1;
-
+
/*
* Set up SMC1 parameter RAM UART-specific parameters
*/
@@ -188,19 +188,19 @@ smc1Initialize (int major, int minor, void *arg)
m360.smc1p.un.uart.brklen = 0;
m360.smc1p.un.uart.brkec = 0;
m360.smc1p.un.uart.brkcr = 0;
-
+
/*
* Set up the Receive Buffer Descriptor
*/
smcRxBd->status = M360_BD_EMPTY | M360_BD_WRAP | M360_BD_INTERRUPT;
smcRxBd->length = 0;
smcRxBd->buffer = rxBuf;
-
+
/*
* Setup the Transmit Buffer Descriptor
*/
smcTxBd->status = M360_BD_WRAP;
-
+
/*
* Set up SMC1 general and protocol-specific mode registers
*/
@@ -357,7 +357,7 @@ rtems_device_driver console_open(
}
return sc;
}
-
+
/*
* Close the device
*/
@@ -402,6 +402,6 @@ rtems_device_driver console_control(
rtems_device_minor_number minor,
void * arg
)
-{
+{
return rtems_termios_ioctl (arg);
}
diff --git a/c/src/lib/libbsp/m68k/gen68360/include/bsp.h b/c/src/lib/libbsp/m68k/gen68360/include/bsp.h
index 5860548b37..cc5ce7357c 100644
--- a/c/src/lib/libbsp/m68k/gen68360/include/bsp.h
+++ b/c/src/lib/libbsp/m68k/gen68360/include/bsp.h
@@ -45,7 +45,7 @@ extern "C" {
/* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */
#define CONFIGURE_INTERRUPT_STACK_MEMORY (4 * 1024)
-
+
/*
* Network driver configuration
*/
@@ -107,7 +107,7 @@ extern int rtems_scc1_driver_attach (struct rtems_bsdnet_ifconfig *config, int a
/*
* NOTE: Use the standard Console driver entry
*/
-
+
/*
* NOTE: Use the standard Clock driver entry
*/
diff --git a/c/src/lib/libbsp/m68k/gen68360/network/network.c b/c/src/lib/libbsp/m68k/gen68360/network/network.c
index 698dd756b5..5c3f67d0f7 100644
--- a/c/src/lib/libbsp/m68k/gen68360/network/network.c
+++ b/c/src/lib/libbsp/m68k/gen68360/network/network.c
@@ -150,7 +150,7 @@ m360Enet_initialize_hardware (struct scc_softc *sc)
m360.papar |= 0x303;
m360.padir &= ~0x303;
m360.paodr &= ~0x303;
-
+
/*
* Configure port C CTS1* and CD1* pins
*/
@@ -247,7 +247,7 @@ m360Enet_initialize_hardware (struct scc_softc *sc)
* Aggressive retry
*/
m360.scc1p.un.ethernet.p_per = 0;
-
+
/*
* Clear individual address hash table
*/
@@ -377,10 +377,10 @@ m360Enet_retire_tx_bd (struct scc_softc *sc)
status = (sc->txBdBase + j)->status;
if (status & M360_BD_READY)
break;
- (sc->txBdBase + j)->status = M360_BD_READY |
- (status & (M360_BD_PAD |
- M360_BD_WRAP |
- M360_BD_INTERRUPT |
+ (sc->txBdBase + j)->status = M360_BD_READY |
+ (status & (M360_BD_PAD |
+ M360_BD_WRAP |
+ M360_BD_INTERRUPT |
M360_BD_LAST |
M360_BD_TX_CRC));
if (status & M360_BD_LAST)
@@ -393,7 +393,7 @@ m360Enet_retire_tx_bd (struct scc_softc *sc)
* Move transmitter back to the first
* buffer descriptor in the frame.
*/
- m360.scc1p._tbptr = m360.scc1p.tbase +
+ m360.scc1p._tbptr = m360.scc1p.tbase +
sc->txBdTail * sizeof (m360BufferDescriptor_t);
/*
@@ -658,7 +658,7 @@ sendpacket (struct ifnet *ifp, struct mbuf *m)
MFREE (m, n);
m = n;
}
-
+
/*
* Redo the send with the new mbuf cluster
*/
@@ -927,7 +927,7 @@ scc_ioctl (struct ifnet *ifp, int command, caddr_t data)
case SIO_RTEMS_SHOW_STATS:
scc_stats (sc);
break;
-
+
/*
* FIXME: All sorts of multicast commands need to be added here!
*/
@@ -957,13 +957,13 @@ rtems_scc1_driver_attach (struct rtems_bsdnet_ifconfig *config, int attaching)
printf ("SCC1 driver can not be detached.\n");
return 0;
}
-
+
/*
* Parse driver name
*/
if ((unitNumber = rtems_bsdnet_parse_driver_name (config, &unitName)) < 0)
return 0;
-
+
/*
* Is driver free?
*/
diff --git a/c/src/lib/libbsp/m68k/gen68360/startup/alloc360.c b/c/src/lib/libbsp/m68k/gen68360/startup/alloc360.c
index b305d0cd65..b9a206b851 100644
--- a/c/src/lib/libbsp/m68k/gen68360/startup/alloc360.c
+++ b/c/src/lib/libbsp/m68k/gen68360/startup/alloc360.c
@@ -91,6 +91,6 @@ M360AllocateRiscTimers (int count)
* descriptors are allocated with appropriate alignment.
*/
return M360AllocateBufferDescriptors (((count * 4) +
- sizeof(m360BufferDescriptor_t) - 1) /
+ sizeof(m360BufferDescriptor_t) - 1) /
sizeof(m360BufferDescriptor_t));
}
diff --git a/c/src/lib/libbsp/m68k/gen68360/startup/bspstart.c b/c/src/lib/libbsp/m68k/gen68360/startup/bspstart.c
index 125cd2e81b..daa16fec28 100644
--- a/c/src/lib/libbsp/m68k/gen68360/startup/bspstart.c
+++ b/c/src/lib/libbsp/m68k/gen68360/startup/bspstart.c
@@ -19,7 +19,7 @@
#include <bsp.h>
#include <rtems/libio.h>
#include <rtems/libcsupport.h>
-
+
/*
* The original table from the application and our copy of it with
* some changes.
@@ -37,7 +37,7 @@ unsigned long _M68K_RamSize;
/*
* Use the shared implementations of the following routines
*/
-
+
void bsp_postdriver_hook(void);
void bsp_libc_init( void *, uint32_t, int );
void bsp_pretasking_hook(void); /* m68k version */
@@ -51,7 +51,7 @@ void bsp_pretasking_hook(void); /* m68k version */
void bsp_start( void )
{
extern void *_WorkspaceBase;
-
+
/*
* _M68k_Ramsize is the amount of RAM on this board and
* is set by many m68k BSPs at this point. With this
diff --git a/c/src/lib/libbsp/m68k/gen68360/startup/init68360.c b/c/src/lib/libbsp/m68k/gen68360/startup/init68360.c
index 086c7b73f4..14aae8e20e 100644
--- a/c/src/lib/libbsp/m68k/gen68360/startup/init68360.c
+++ b/c/src/lib/libbsp/m68k/gen68360/startup/init68360.c
@@ -112,7 +112,7 @@ void _Init68360 (void)
* 70 nsec DRAM
* 180 nsec ROM (3 wait states)
*/
- m360.gmr = M360_GMR_RCNT(23) | M360_GMR_RFEN |
+ m360.gmr = M360_GMR_RCNT(23) | M360_GMR_RFEN |
M360_GMR_RCYC(0) | M360_GMR_PGS(1) |
M360_GMR_DPS_32BIT | M360_GMR_NCS |
M360_GMR_TSS40;
@@ -152,7 +152,7 @@ void _Init68360 (void)
for (i = 0; i < 256; ++i)
M68Kvec[i] = vbr[i];
m68k_set_vbr (M68Kvec);
-
+
/*
* Step 14: More system initialization
* SDCR (Serial DMA configuration register)
@@ -259,8 +259,8 @@ void _Init68360 (void)
/*
* Step 11: Remap Chip Select 0 (CS0*), set up GMR
*/
- m360.gmr = M360_GMR_RCNT(12) | M360_GMR_RFEN |
- M360_GMR_RCYC(0) | M360_GMR_PGS(1) |
+ m360.gmr = M360_GMR_RCNT(12) | M360_GMR_RFEN |
+ M360_GMR_RCYC(0) | M360_GMR_PGS(1) |
M360_GMR_DPS_32BIT | M360_GMR_DWQ |
M360_GMR_GAMX;
m360.memc[0].br = (unsigned long)&_RomBase | M360_MEMC_BR_WP |
@@ -305,7 +305,7 @@ void _Init68360 (void)
for (i = 0; i < 256; ++i)
M68Kvec[i] = vbr[i];
m68k_set_vbr (M68Kvec);
-
+
/*
* Step 14: More system initialization
* SDCR (Serial DMA configuration register)
@@ -365,7 +365,7 @@ void _Init68360 (void)
* Enable bus monitor for external cycles
* 1024 clocks for external timeout
*/
- m360.sypcr = 0xEC;
+ m360.sypcr = 0xEC;
/*
* Step 9: Clear parameter RAM and reset communication processor module
@@ -374,8 +374,8 @@ void _Init68360 (void)
*((long *)((char *)&m360 + 0xC00 + i)) = 0;
*((long *)((char *)&m360 + 0xD00 + i)) = 0;
*((long *)((char *)&m360 + 0xE00 + i)) = 0;
- *((long *)((char *)&m360 + 0xF00 + i)) = 0;
- }
+ *((long *)((char *)&m360 + 0xF00 + i)) = 0;
+ }
M360ExecuteRISC (M360_CR_RST);
/*
@@ -397,16 +397,16 @@ void _Init68360 (void)
/*
* Step 11: Set up GMR
- *
+ *
*/
m360.gmr = 0x0;
/*
* Step 11a: Remap 512Kx8 flash memory on CS0*
- * 2 wait states
- * Make it read-only for now
+ * 2 wait states
+ * Make it read-only for now
*/
- m360.memc[0].br = (unsigned long)&_RomBase | M360_MEMC_BR_WP |
+ m360.memc[0].br = (unsigned long)&_RomBase | M360_MEMC_BR_WP |
M360_MEMC_BR_V;
m360.memc[0].or = M360_MEMC_OR_WAITS(2) | M360_MEMC_OR_512KB |
M360_MEMC_OR_8BIT;
@@ -419,10 +419,10 @@ void _Init68360 (void)
ramSize = 4 * 1024 * 1024;
m360.memc[1].br = (unsigned long)&_RamBase | M360_MEMC_BR_V;
m360.memc[1].or = M360_MEMC_OR_WAITS(0) | M360_MEMC_OR_2MB |
- M360_MEMC_OR_32BIT;
+ M360_MEMC_OR_32BIT;
m360.memc[2].br = ((unsigned long)&_RamBase + 0x200000) | M360_MEMC_BR_V;
m360.memc[2].or = M360_MEMC_OR_WAITS(0) | M360_MEMC_OR_2MB |
- M360_MEMC_OR_32BIT;
+ M360_MEMC_OR_32BIT;
/*
* Step 13: Copy the exception vector table to system RAM
*/
@@ -544,9 +544,9 @@ void _Init68360 (void)
* startup code may be running in a bootstrap PROM or in
* a program downloaded by the bootstrap PROM.
*/
- m360.gmr = (m360.gmr & 0x001C0000) | M360_GMR_RCNT(23) |
- M360_GMR_RFEN | M360_GMR_RCYC(0) |
- M360_GMR_DPS_32BIT | M360_GMR_NCS |
+ m360.gmr = (m360.gmr & 0x001C0000) | M360_GMR_RCNT(23) |
+ M360_GMR_RFEN | M360_GMR_RCYC(0) |
+ M360_GMR_DPS_32BIT | M360_GMR_NCS |
M360_GMR_GAMX;
m360.memc[0].br = (unsigned long)&_RomBase | M360_MEMC_BR_WP |
M360_MEMC_BR_V;
@@ -617,7 +617,7 @@ void _Init68360 (void)
for (i = 0; i < 256; ++i)
M68Kvec[i] = vbr[i];
m68k_set_vbr (M68Kvec);
-
+
/*
* Step 14: More system initialization
* SDCR (Serial DMA configuration register)
diff --git a/c/src/lib/libbsp/m68k/gen68360/timer/timer.c b/c/src/lib/libbsp/m68k/gen68360/timer/timer.c
index b1c6ceb402..ab81cb8c9b 100644
--- a/c/src/lib/libbsp/m68k/gen68360/timer/timer.c
+++ b/c/src/lib/libbsp/m68k/gen68360/timer/timer.c
@@ -23,7 +23,7 @@
*
* Output parameters: NONE
*
- * NOTE: It is important that the timer start/stop overhead be
+ * NOTE: It is important that the timer start/stop overhead be
* determined when porting or modifying this code.
*
* COPYRIGHT (c) 1989-1999.
diff --git a/c/src/lib/libbsp/m68k/idp/clock/ckinit.c b/c/src/lib/libbsp/m68k/idp/clock/ckinit.c
index 46f00d7063..6838af3c9b 100644
--- a/c/src/lib/libbsp/m68k/idp/clock/ckinit.c
+++ b/c/src/lib/libbsp/m68k/idp/clock/ckinit.c
@@ -40,14 +40,14 @@ void Disable_clock();
#define CLOCK_VECTOR 0x4D
void Clock_exit( void );
-
+
/*
* These are set by clock driver during its init
*/
-
+
rtems_device_major_number rtems_clock_major = ~0;
rtems_device_minor_number rtems_clock_minor;
-
+
/*
* ISR Handler
@@ -77,10 +77,10 @@ rtems_isr Clock_isr(
have a heart attack -- if you use newlib1.6 or greater and get
libgcc.a for gcc with software floating point support, this is not
a problem */
- Clock_isrs =
+ Clock_isrs =
(int)(BSP_Configuration.microseconds_per_tick / 1000);
}
- else
+ else
Clock_isrs -= 1;
}
@@ -148,17 +148,17 @@ rtems_device_driver Clock_initialize(
)
{
Install_clock( Clock_isr );
-
+
/*
* make major/minor avail to others such as shared memory driver
*/
-
+
rtems_clock_major = major;
rtems_clock_minor = minor;
-
+
return RTEMS_SUCCESSFUL;
}
-
+
rtems_device_driver Clock_control(
rtems_device_major_number major,
rtems_device_minor_number minor,
@@ -167,15 +167,15 @@ rtems_device_driver Clock_control(
{
uint32_t isrlevel;
rtems_libio_ioctl_args_t *args = pargp;
-
+
if (args == 0)
goto done;
-
+
/*
* This is hokey, but until we get a defined interface
* to do this, it will just be this simple...
*/
-
+
if (args->command == rtems_build_name('I', 'S', 'R', ' '))
{
Clock_isr(CLOCK_VECTOR);
@@ -186,7 +186,7 @@ rtems_device_driver Clock_control(
(void) set_vector( args->buffer, CLOCK_VECTOR, 1 );
rtems_interrupt_enable( isrlevel );
}
-
+
done:
return RTEMS_SUCCESSFUL;
}
diff --git a/c/src/lib/libbsp/m68k/idp/console/console.c b/c/src/lib/libbsp/m68k/idp/console/console.c
index bb020d7f9a..6aa96bf5a7 100644
--- a/c/src/lib/libbsp/m68k/idp/console/console.c
+++ b/c/src/lib/libbsp/m68k/idp/console/console.c
@@ -1,4 +1,4 @@
-/*
+/*
* This file contains the Motorola IDP console IO package.
*
* Written by Doug McBride, Colorado Space Grant College
@@ -49,28 +49,28 @@ rtems_device_driver console_initialize(
major,
(rtems_device_minor_number) 0
);
-
+
if (status != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred(status);
-
+
status = rtems_io_register_name(
"/dev/tty00",
major,
(rtems_device_minor_number) 0
);
-
+
if (status != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred(status);
-
+
status = rtems_io_register_name(
"/dev/tty01",
major,
(rtems_device_minor_number) 1
);
-
+
if (status != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred(status);
-
+
return RTEMS_SUCCESSFUL;
}
@@ -86,7 +86,7 @@ rtems_device_driver console_initialize(
* Return values:
*/
-rtems_boolean is_character_ready(
+rtems_boolean is_character_ready(
char *ch,
int port
)
@@ -110,7 +110,7 @@ rtems_boolean is_character_ready(
* Return values:
*/
-rtems_boolean quick_char_check(
+rtems_boolean quick_char_check(
int port
)
{
@@ -132,17 +132,17 @@ rtems_boolean quick_char_check(
* character read from UART
*/
-char inbyte(
+char inbyte(
int port
)
{
unsigned char tmp_char;
-
+
/* If you come into this routine without checking is_character_ready() first
and you want nonblocking code, then it's your own fault */
while ( !is_character_ready( &tmp_char, port ) );
-
+
return tmp_char;
}
@@ -153,12 +153,12 @@ char inbyte(
* XON/XOFF flow control.
*
* Input parameters:
- * ch - character to be transmitted
+ * ch - character to be transmitted
*
* Output parameters: NONE
*/
-void outbyte(
+void outbyte(
char ch,
int port
)
@@ -186,7 +186,7 @@ rtems_device_driver console_open(
{
return RTEMS_SUCCESSFUL;
}
-
+
/*
* Close entry point
*/
@@ -214,7 +214,7 @@ rtems_device_driver console_read(
char *buffer;
int maximum;
int count = 0;
-
+
rw_args = (rtems_libio_rw_args_t *) arg;
buffer = rw_args->buffer;
@@ -236,7 +236,7 @@ rtems_device_driver console_read(
}
/*
- * write bytes to the serial port. Stdout and stderr are the same.
+ * write bytes to the serial port. Stdout and stderr are the same.
*/
rtems_device_driver console_write(
diff --git a/c/src/lib/libbsp/m68k/idp/console/duart.c b/c/src/lib/libbsp/m68k/idp/console/duart.c
index c944d57ed6..194b4ecc09 100644
--- a/c/src/lib/libbsp/m68k/idp/console/duart.c
+++ b/c/src/lib/libbsp/m68k/idp/console/duart.c
@@ -55,13 +55,13 @@ volatile void init_pit()
MC68681_WRITE(DUART_ADDR, MC68681_COMMAND_REG_B, MC68681_MODE_REG_DISABLE_TX);
MC68681_WRITE(DUART_ADDR, MC68681_COMMAND_REG_B, MC68681_MODE_REG_DISABLE_RX);
- /*
+ /*
* install ISR for ports A and B
*/
set_vector(C_Receive_ISR, (VECT+H3VECT), 1);
- /*
- * initialize pit
+ /*
+ * initialize pit
*
* set mode to 0 -- disable all ports
* set up pirq and piack
@@ -70,24 +70,24 @@ volatile void init_pit()
* setup pivr
* turn on all ports
*/
- MC68230_WRITE(PGCR, 0x00);
- MC68230_WRITE(PSRR, 0x18);
+ MC68230_WRITE(PGCR, 0x00);
+ MC68230_WRITE(PSRR, 0x18);
MC68230_WRITE(PBDDR, 0x00);
- MC68230_WRITE(PBCR, 0x82);
- MC68230_WRITE(PIVR, VECT);
- MC68230_WRITE(PGCR, 0x20);
+ MC68230_WRITE(PBCR, 0x82);
+ MC68230_WRITE(PIVR, VECT);
+ MC68230_WRITE(PGCR, 0x20);
/*
* For some reason, the reset of receiver/transmitter only works for
- * the first time around -- it garbles the output otherwise
- * (e.g., sp21)
+ * the first time around -- it garbles the output otherwise
+ * (e.g., sp21)
*/
if (!Pit_initialized)
{
- /*
+ /*
* initialize the duart registers on port b
* WARNING:OPTIMIZER MAY ONLY EXECUTE THIRD STATEMENT IF NOT VOLATILE
- *
+ *
* reset tx, channel b
* reset rx, channel b
* reset mr pointer, ch
@@ -96,10 +96,10 @@ volatile void init_pit()
MC68681_WRITE(DUART_ADDR, MC68681_COMMAND_REG_B, MC68681_MODE_REG_RESET_RX);
MC68681_WRITE(DUART_ADDR, MC68681_COMMAND_REG_B, MC68681_MODE_REG_RESET_MR_PTR);
- /*
+ /*
* initialize the duart registers on port a
* WARNING:OPTIMIZER MAY ONLY EXECUTE THIRD STATEMENT IF NOT VOLATILE
- *
+ *
* reset tx, channel a
* reset rx, channel a
* reset mr pointer, ch
@@ -112,8 +112,8 @@ volatile void init_pit()
}
/*
- * Init the general registers of the duart
- *
+ * Init the general registers of the duart
+ *
* init ivr
* init imr
* init acr
@@ -122,32 +122,32 @@ volatile void init_pit()
* init opcr
* init cts
*/
- MC68681_WRITE(DUART_ADDR, MC68681_INTERRUPT_VECTOR_REG,
+ MC68681_WRITE(DUART_ADDR, MC68681_INTERRUPT_VECTOR_REG,
MC68681_INTERRUPT_VECTOR_INIT);
- MC68681_WRITE(DUART_ADDR, MC68681_INTERRUPT_MASK_REG,
- MC68681_IR_RX_READY_A | MC68681_IR_RX_READY_B);
+ MC68681_WRITE(DUART_ADDR, MC68681_INTERRUPT_MASK_REG,
+ MC68681_IR_RX_READY_A | MC68681_IR_RX_READY_B);
MC68681_WRITE(DUART_ADDR, MC68681_AUX_CTRL_REG, MC68681_CLEAR);
MC68681_WRITE(DUART_ADDR, MC68681_COUNTER_TIMER_UPPER_REG, 0x00);
MC68681_WRITE(DUART_ADDR, MC68681_COUNTER_TIMER_LOWER_REG, 0x02);
- MC68681_WRITE(DUART_ADDR, MC68681_OUTPUT_PORT_CONFIG_REG, MC68681_CLEAR);
- MC68681_WRITE(DUART_ADDR, MC68681_OUTPUT_PORT_SET_REG, 0x01);
+ MC68681_WRITE(DUART_ADDR, MC68681_OUTPUT_PORT_CONFIG_REG, MC68681_CLEAR);
+ MC68681_WRITE(DUART_ADDR, MC68681_OUTPUT_PORT_SET_REG, 0x01);
- /*
+ /*
* init the actual serial port for port a
- *
- * Set Baud Rate to 9600
+ *
+ * Set Baud Rate to 9600
* Set Stop bit length of 1
* enable Transmit and receive
*/
MC68681_WRITE(DUART_ADDR, MC68681_CLOCK_SELECT_REG_A, MC68681_BAUD_RATE_MASK_9600);
- MC68681_WRITE(DUART_ADDR, MC68681_MODE_REG_1A,
+ MC68681_WRITE(DUART_ADDR, MC68681_MODE_REG_1A,
(MC68681_8BIT_CHARS | MC68681_NO_PARITY));
MC68681_WRITE(DUART_ADDR, MC68681_MODE_REG_2A,MC68681_STOP_BIT_LENGTH_1);
- MC68681_WRITE(DUART_ADDR, MC68681_COMMAND_REG_A,
+ MC68681_WRITE(DUART_ADDR, MC68681_COMMAND_REG_A,
(MC68681_MODE_REG_ENABLE_TX | MC68681_MODE_REG_ENABLE_RX));
- /*
- * init the actual serial port for port b
+ /*
+ * init the actual serial port for port b
* init csrb -- 9600 baud
*/
MC68681_WRITE(DUART_ADDR, MC68681_CLOCK_SELECT_REG_B, MC68681_BAUD_RATE_MASK_9600);
@@ -157,20 +157,20 @@ volatile void init_pit()
#ifdef EIGHT_BITS_NO_PARITY
/*
* Set 8 Bit characters with no parity
- */
- MC68681_WRITE(DUART_ADDR, MC68681_MODE_REG_1B,
+ */
+ MC68681_WRITE(DUART_ADDR, MC68681_MODE_REG_1B,
(MC68681_NO_PARITY | MC68681_8BIT_CHARS) );
-#else
+#else
/*
- * Set 7 Bit Characters with parity
+ * Set 7 Bit Characters with parity
*/
- MC68681_WRITE(DUART_ADDR, MC68681_MODE_REG_1B,
+ MC68681_WRITE(DUART_ADDR, MC68681_MODE_REG_1B,
(MC68681_WITH_PARITY | MC68681_7BIT_CHARS) );
#endif
/*
- * Set Stop Bit length to 1
+ * Set Stop Bit length to 1
* Disable Recieve and transmit on B
*/
MC68681_WRITE(DUART_ADDR, MC68681_MODE_REG_2B,MC68681_STOP_BIT_LENGTH_1);
@@ -191,8 +191,8 @@ rtems_isr C_Receive_ISR(rtems_vector_number vector)
_addr = (unsigned char *) (PIT_ADDR + PITSR);
*_addr = 0x04;
- /*
- * check port A first for input
+ /*
+ * check port A first for input
* extract rcvrdy on port B
* set ptr to recieve buffer and read character into ring buffer
*/
@@ -203,11 +203,11 @@ rtems_isr C_Receive_ISR(rtems_vector_number vector)
Ring_buffer_Add_character( &Console_Buffer[ 0 ], *_addr );
}
- /*
+ /*
* If not on port A, let's check port B
* extract rcvrdy on port B
* set ptr to recieve buffer and read character into ring buffer
- */
+ */
else
{
_addr = (unsigned char *) (DUART_ADDR + MC68681_STATUS_REG_B);
@@ -217,9 +217,9 @@ rtems_isr C_Receive_ISR(rtems_vector_number vector)
Ring_buffer_Add_character( &Console_Buffer[ 1 ], *_addr );
}
- /*
- * if not ready on port A or port B, must be an error
- * if error, get out so that fifo is undisturbed
+ /*
+ * if not ready on port A or port B, must be an error
+ * if error, get out so that fifo is undisturbed
*/
}
}
@@ -232,16 +232,16 @@ void transmit_char(char ch)
{
volatile unsigned char *_addr;
- /*
- * Get SRA (extract txrdy)
+ /*
+ * Get SRA (extract txrdy)
*/
_addr = (unsigned char *) (DUART_ADDR + MC68681_STATUS_REG_A);
while (!(*_addr & MC68681_TX_READY))
{
}
- /*
- * transmit character over port A
+ /*
+ * transmit character over port A
*/
MC68681_WRITE(DUART_ADDR, MC68681_TRANSMIT_BUFFER_A, ch);
}
@@ -255,16 +255,16 @@ void transmit_char_portb(char ch)
{
volatile unsigned char *_addr;
- /*
- * Get SRB (extract txrdy)
+ /*
+ * Get SRB (extract txrdy)
*/
_addr = (unsigned char *) (DUART_ADDR + MC68681_STATUS_REG_B);
while (!(*_addr & MC68681_TX_READY))
{
}
- /*
- * transmit character over port B
+ /*
+ * transmit character over port B
*/
MC68681_WRITE(DUART_ADDR, MC68681_TRANSMIT_BUFFER_B, ch);
}
diff --git a/c/src/lib/libbsp/m68k/idp/console/leds.c b/c/src/lib/libbsp/m68k/idp/console/leds.c
index b7b7722008..7f2926f290 100644
--- a/c/src/lib/libbsp/m68k/idp/console/leds.c
+++ b/c/src/lib/libbsp/m68k/idp/console/leds.c
@@ -16,12 +16,12 @@ void clear_leds();
* the led display.
* Setting the bit to 0 turns it on, 1 turns it off.
* the LED's are controlled by setting the right bit mask in the base
- * address.
+ * address.
* The bits are:
* [d.p | g | f | e | d | c | b | a ] is the byte.
*
* The locations are:
- *
+ *
* a
* -----
* f | | b
diff --git a/c/src/lib/libbsp/m68k/idp/include/bsp.h b/c/src/lib/libbsp/m68k/idp/include/bsp.h
index de04626c57..80a9abea0a 100644
--- a/c/src/lib/libbsp/m68k/idp/include/bsp.h
+++ b/c/src/lib/libbsp/m68k/idp/include/bsp.h
@@ -1,5 +1,5 @@
/* bsp.h
- *
+ *
* This include file contains all Motorola 680x0 IDP board IO definitions.
*
* $Id$
@@ -38,18 +38,18 @@
#define MAX_SHORT_TEST_DURATION 3 /* 3 seconds */
/*
- * Define the interrupt mechanism for Time Test 27
+ * Define the interrupt mechanism for Time Test 27
*
* NOTE: tm27 apparently not supported.
*/
#define MUST_WAIT_FOR_INTERRUPT 0
-#define Install_tm27_vector( handler )
+#define Install_tm27_vector( handler )
-#define Cause_tm27_intr()
+#define Cause_tm27_intr()
-#define Clear_tm27_intr()
+#define Clear_tm27_intr()
#define Lower_tm27_intr()
@@ -73,7 +73,7 @@
/*
* NOTE: Use the standard Console driver entry
*/
-
+
/*
* NOTE: Use the standard Clock driver entry
*/
diff --git a/c/src/lib/libbsp/m68k/idp/startup/bspstart.c b/c/src/lib/libbsp/m68k/idp/startup/bspstart.c
index ba8a3406e0..0675e666ca 100644
--- a/c/src/lib/libbsp/m68k/idp/startup/bspstart.c
+++ b/c/src/lib/libbsp/m68k/idp/startup/bspstart.c
@@ -3,7 +3,7 @@
* board, and monitor specific initialization and configuration.
* The generic CPU dependent initialization has been performed
* before this routine is invoked.
- *
+ *
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
@@ -19,7 +19,7 @@
#include <bsp.h>
#include <rtems/libio.h>
#include <rtems/libcsupport.h>
-
+
unsigned char *duart_base;
extern struct duart_regs duart_info;
@@ -31,18 +31,18 @@ void led_putnum();
* The original table from the application and our copy of it with
* some changes.
*/
-
+
extern rtems_configuration_table Configuration;
rtems_configuration_table BSP_Configuration;
rtems_cpu_table Cpu_table;
-
+
char *rtems_progname;
/*
* Use the shared implementations of the following routines
*/
-
+
void bsp_postdriver_hook(void);
void bsp_libc_init( void *, uint32_t, int );
void bsp_pretasking_hook(void); /* m68k version */
@@ -65,7 +65,7 @@ void bsp_start( void )
duart_base = (unsigned char *)DUART_ADDR;
- /*
+ /*
* Set the VBR here to the monitor's default.
*/
@@ -73,7 +73,7 @@ void bsp_start( void )
/* This is where you set vector base register = 0 */
m68k_set_vbr( monitors_vector_table );
- /* The vector interrupt table for the 680x0 is in appendix B-2
+ /* The vector interrupt table for the 680x0 is in appendix B-2
of the M68000 Family Programmer's reference table */
for ( index=2 ; index<=255 ; index++ )
M68Kvec[ index ] = monitors_vector_table[ 32 ];
@@ -83,7 +83,7 @@ void bsp_start( void )
M68Kvec[ 4 ] = monitors_vector_table[ 4 ]; /* breakpoints vector */
M68Kvec[ 9 ] = monitors_vector_table[ 9 ]; /* trace vector */
- /*
+ /*
* Set the VBR here if you do not want to use the monitor's vector table.
*/
@@ -95,14 +95,14 @@ void bsp_start( void )
/*
* we only use a hook to get the C library initialized.
*/
-
+
Cpu_table.pretasking_hook = bsp_pretasking_hook; /* init libc, etc. */
Cpu_table.postdriver_hook = bsp_postdriver_hook;
Cpu_table.interrupt_vector_table = (m68k_isr_entry *) &M68Kvec;
Cpu_table.interrupt_stack_size = CONFIGURE_INTERRUPT_STACK_MEMORY;
BSP_Configuration.work_space_start = (void *) &_WorkspaceBase;
-
+
/* led_putnum('e'); * for debugging purposes only */
/* Clock_exit is done as an atexit() function */
diff --git a/c/src/lib/libbsp/m68k/idp/timer/timer.c b/c/src/lib/libbsp/m68k/idp/timer/timer.c
index 3866a81a96..28f15ddbd2 100644
--- a/c/src/lib/libbsp/m68k/idp/timer/timer.c
+++ b/c/src/lib/libbsp/m68k/idp/timer/timer.c
@@ -10,7 +10,7 @@
* for some compilers. The multiple writes to the MC68230
* may be optimized away.
*
- * It is important that the timer start/stop overhead be
+ * It is important that the timer start/stop overhead be
* determined when porting or modifying this code.
*
* Code Modified for the MC68230 by Doug McBride, Colorado Space Grant College
@@ -40,7 +40,7 @@ rtems_isr timerisr();
void Timer_initialize()
{
(void) set_vector( timerisr, TIMER_VECTOR, 0 ); /* install ISR */
-
+
Ttimer_val = 0; /* clear timer ISR count */
/* some PI/T initialization stuff here */
@@ -65,7 +65,7 @@ void Timer_initialize()
#define AVG_OVERHEAD 9 /* may not be right -- do this later */
#define LEAST_VALID 10 /* Don't trust a value lower than this */
-int Read_timer()
+int Read_timer()
{
uint8_t data;
uint8_t msb, osb, lsb;
@@ -99,7 +99,7 @@ int Read_timer()
if ( total < LEAST_VALID )
return 0; /* below timer resolution */
-
+
/* Clocked at 6.5 Mhz */
/* Avoid floating point problems, be lazy, and return the total minus
the average overhead */
diff --git a/c/src/lib/libbsp/m68k/mcf5206elite/console/console.c b/c/src/lib/libbsp/m68k/mcf5206elite/console/console.c
index 06980a4530..c3cb1ae5bf 100644
--- a/c/src/lib/libbsp/m68k/mcf5206elite/console/console.c
+++ b/c/src/lib/libbsp/m68k/mcf5206elite/console/console.c
@@ -154,7 +154,7 @@ console_first_open(int major, int minor, void *arg)
rtems_libio_open_close_args_t *args = arg;
rtems_status_code sc;
uint8_t intvec;
-
+
switch (minor)
{
case 0: intvec = BSP_INTVEC_UART1; break;
@@ -251,7 +251,7 @@ console_initialize(rtems_device_major_number major,
sc = mcfuart_reset(&uart[1]);
return sc;
}
-
+
return RTEMS_SUCCESSFUL;
}
@@ -267,8 +267,8 @@ console_initialize(rtems_device_major_number major,
* RETURNS:
* RTEMS error code
*/
-rtems_device_driver
-console_open(rtems_device_major_number major,
+rtems_device_driver
+console_open(rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg)
{
@@ -297,10 +297,10 @@ console_open(rtems_device_major_number major,
{
case CONSOLE_MODE_RAW:
return RTEMS_SUCCESSFUL;
-
+
case CONSOLE_MODE_INT:
return rtems_termios_open(major, minor, arg, &intr_callbacks);
-
+
case CONSOLE_MODE_POLL:
return rtems_termios_open(major, minor, arg, &poll_callbacks);
@@ -321,7 +321,7 @@ console_open(rtems_device_major_number major,
* RETURNS:
* RTEMS error code
*/
-rtems_device_driver
+rtems_device_driver
console_close(rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg)
@@ -431,7 +431,7 @@ rtems_device_driver
console_control(rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg)
-{
+{
if (console_mode != CONSOLE_MODE_RAW)
{
return rtems_termios_ioctl (arg);
diff --git a/c/src/lib/libbsp/m68k/mcf5206elite/i2c/i2c.c b/c/src/lib/libbsp/m68k/mcf5206elite/i2c/i2c.c
index dd57ad8ff8..32c8809584 100644
--- a/c/src/lib/libbsp/m68k/mcf5206elite/i2c/i2c.c
+++ b/c/src/lib/libbsp/m68k/mcf5206elite/i2c/i2c.c
@@ -65,7 +65,7 @@ i2c_transfer_wait_sema(i2c_bus_number bus, i2c_message *msg, int nmsg)
sc = rtems_semaphore_create(
rtems_build_name('I', '2', 'C', 'S'),
0,
- RTEMS_COUNTING_SEMAPHORE | RTEMS_NO_INHERIT_PRIORITY |
+ RTEMS_COUNTING_SEMAPHORE | RTEMS_NO_INHERIT_PRIORITY |
RTEMS_NO_PRIORITY_CEILING | RTEMS_LOCAL,
0,
&sema
@@ -101,7 +101,7 @@ i2c_transfer_wait_poll(i2c_bus_number bus, i2c_message *msg, int nmsg)
volatile rtems_boolean poll_done_flag;
rtems_status_code sc;
poll_done_flag = 0;
- sc = i2c_transfer(bus, nmsg, msg, i2c_transfer_poll_done_func,
+ sc = i2c_transfer(bus, nmsg, msg, i2c_transfer_poll_done_func,
(uint32_t)&poll_done_flag);
if (sc != RTEMS_SUCCESSFUL)
return sc;
@@ -123,7 +123,7 @@ i2c_transfer_wait_poll(i2c_bus_number bus, i2c_message *msg, int nmsg)
* nmsg - number of messages in transfer
*
* RETURNS:
- * I2C_SUCCESSFUL, if tranfer finished successfully,
+ * I2C_SUCCESSFUL, if tranfer finished successfully,
* I2C_RESOURCE_NOT_AVAILABLE, if semaphore operations has failed,
* value of status field of first error-finished message in transfer,
* if something wrong.
@@ -141,10 +141,10 @@ i2c_transfer_wait(i2c_bus_number bus, i2c_message *msg, int nmsg)
{
sc = i2c_transfer_wait_poll(bus, msg, nmsg);
}
-
+
if (sc != RTEMS_SUCCESSFUL)
return I2C_RESOURCE_NOT_AVAILABLE;
-
+
for (i = 0; i < nmsg; i++)
{
if (msg[i].status != I2C_SUCCESSFUL)
@@ -264,7 +264,7 @@ i2c_wrrd(i2c_bus_number bus, i2c_address addr, void *bufw, int sizew,
msg[0].status = 0;
msg[0].len = sizew;
msg[0].buf = bufw;
-
+
msg[1].addr = addr;
msg[1].flags = 0;
if (addr > 0xff)
@@ -303,7 +303,7 @@ i2c_wbrd(i2c_bus_number bus, i2c_address addr, uint8_t cmd,
msg[0].status = 0;
msg[0].len = sizeof(bufw);
msg[0].buf = &bufw;
-
+
msg[1].addr = addr;
msg[1].flags = I2C_MSG_ERRSKIP;
if (addr > 0xff)
diff --git a/c/src/lib/libbsp/m68k/mcf5206elite/i2c/i2cdrv.c b/c/src/lib/libbsp/m68k/mcf5206elite/i2c/i2cdrv.c
index cf23767577..8850ab8aaa 100644
--- a/c/src/lib/libbsp/m68k/mcf5206elite/i2c/i2cdrv.c
+++ b/c/src/lib/libbsp/m68k/mcf5206elite/i2c/i2cdrv.c
@@ -32,7 +32,7 @@
#define I2C_SELECT_BUS(bus)
#endif
-/*
+/*
* Few I2C transfers may be posted simultaneously, but MBUS driver is able
* to process it one-by-one. To serialize transfers, function i2c_transfer
* put transfer information to the queue and initiate new transfers if MBUS
@@ -40,7 +40,7 @@
* when current active transfer is finished.
*/
-/*
+/*
* i2c_qel - I2C transfers queue element; contain information about
* delayed transfer
*/
@@ -113,7 +113,7 @@ i2cdrv_unload(void)
mbus_busy = 1;
rtems_interrupt_enable(level);
qel = tqueue + tqueue_tail;
-
+
I2C_SELECT_BUS(qel->bus);
if (i2cdrv_bus_clock_div[qel->bus] != i2cdrv_bus_clock_div_current)
{
@@ -160,17 +160,17 @@ i2c_transfer(i2c_bus_number bus, int nmsg, i2c_message *msg,
{
i2c_qel qel;
rtems_interrupt_level level;
-
+
if (bus >= I2C_NUMBER_OF_BUSES)
{
return RTEMS_INVALID_NUMBER;
}
-
+
if (msg == NULL)
{
return RTEMS_INVALID_ADDRESS;
}
-
+
qel.bus = bus;
qel.msg = msg;
qel.nmsg = nmsg;
@@ -204,11 +204,11 @@ i2cdrv_initialize(rtems_device_major_number major,
tqueue_tail = tqueue_head = 0;
tqueue_size = 32;
tqueue = calloc(tqueue_size, sizeof(i2c_qel));
-
+
sc = mcfmbus_initialize(&mbus, MBAR);
if (sc != RTEMS_SUCCESSFUL)
return sc;
-
+
for (i = 0; i < I2C_NUMBER_OF_BUSES; i++)
{
sc = i2c_select_clock_rate(i, 4096);
@@ -221,7 +221,7 @@ i2cdrv_initialize(rtems_device_major_number major,
/* i2c_select_clock_rate --
* select I2C bus clock rate for specified bus. Some bus controller do not
- * allow to select arbitrary clock rate; in this case nearest possible
+ * allow to select arbitrary clock rate; in this case nearest possible
* slower clock rate is selected.
*
* PARAMETERS:
@@ -229,7 +229,7 @@ i2cdrv_initialize(rtems_device_major_number major,
* bps - data transfer rate for this bytes in bits per second
*
* RETURNS:
- * RTEMS_SUCCESSFUL, if operation performed successfully,
+ * RTEMS_SUCCESSFUL, if operation performed successfully,
* RTEMS_INVALID_NUMBER, if wrong bus number is specified,
* RTEMS_UNSATISFIED, if bus do not support data transfer rate selection
* or specified data transfer rate could not be used.
@@ -240,10 +240,10 @@ i2c_select_clock_rate(i2c_bus_number bus, int bps)
int div;
if (bus >= I2C_NUMBER_OF_BUSES)
return RTEMS_INVALID_NUMBER;
-
+
if (bps == 0)
return RTEMS_UNSATISFIED;
-
+
div = BSP_SYSTEM_FREQUENCY / bps;
i2cdrv_bus_clock_div[bus] = div;
return RTEMS_SUCCESSFUL;
diff --git a/c/src/lib/libbsp/m68k/mcf5206elite/include/bsp.h b/c/src/lib/libbsp/m68k/mcf5206elite/include/bsp.h
index 7a677f2108..1d0d753a75 100644
--- a/c/src/lib/libbsp/m68k/mcf5206elite/include/bsp.h
+++ b/c/src/lib/libbsp/m68k/mcf5206elite/include/bsp.h
@@ -21,20 +21,20 @@
#ifndef KB
#define KB (1024)
#endif
-#ifndef MB
+#ifndef MB
#define MB (KB*KB)
#endif
/*** Board resources allocation ***/
-/*
+/*
* To achieve some compatibility with dBUG monitor, we use the same
* memory resources allocation as it is used in dBUG.
*
* If this definitions will be changed, change the linker script also.
*/
-
+
/* Memory mapping */
/* CS0: Boot Flash */
#define BSP_MEM_ADDR_FLASH (0xFFE00000)
@@ -214,7 +214,7 @@ extern char _SYS_CLOCK_FREQUENCY; /* Don't use this variable directly!!! */
/*
* NOTE: Use the standard Console driver entry
*/
-
+
/*
* NOTE: Use the standard Clock driver entry
*/
diff --git a/c/src/lib/libbsp/m68k/mcf5206elite/include/i2c.h b/c/src/lib/libbsp/m68k/mcf5206elite/include/i2c.h
index 844f88b362..1ff270a973 100644
--- a/c/src/lib/libbsp/m68k/mcf5206elite/include/i2c.h
+++ b/c/src/lib/libbsp/m68k/mcf5206elite/include/i2c.h
@@ -90,7 +90,7 @@ i2c_initialize(rtems_device_major_number major,
/* i2c_select_clock_rate --
* select I2C bus clock rate for specified bus. Some bus controller do not
- * allow to select arbitrary clock rate; in this case nearest possible
+ * allow to select arbitrary clock rate; in this case nearest possible
* slower clock rate is selected.
*
* PARAMETERS:
@@ -98,7 +98,7 @@ i2c_initialize(rtems_device_major_number major,
* bps - data transfer rate for this bytes in bits per second
*
* RETURNS:
- * RTEMS_SUCCESSFUL, if operation performed successfully,
+ * RTEMS_SUCCESSFUL, if operation performed successfully,
* RTEMS_INVALID_NUMBER, if wrong bus number is specified,
* RTEMS_UNSATISFIED, if bus do not support data transfer rate selection
* or specified data transfer rate could not be used.
@@ -123,7 +123,7 @@ i2c_select_clock_rate(i2c_bus_number bus, int bps);
* code if something failed.
*/
rtems_status_code
-i2c_transfer(i2c_bus_number bus, int nmsg, i2c_message *msg,
+i2c_transfer(i2c_bus_number bus, int nmsg, i2c_message *msg,
i2c_transfer_done done, uint32_t done_arg);
/* i2c_transfer_wait --
@@ -137,7 +137,7 @@ i2c_transfer(i2c_bus_number bus, int nmsg, i2c_message *msg,
* nmsg - number of messages in transfer
*
* RETURNS:
- * I2C_SUCCESSFUL, if tranfer finished successfully,
+ * I2C_SUCCESSFUL, if tranfer finished successfully,
* I2C_RESOURCE_NOT_AVAILABLE, if semaphore operations has failed,
* value of status field of first error-finished message in transfer,
* if something wrong.
diff --git a/c/src/lib/libbsp/m68k/mcf5206elite/include/i2cdrv.h b/c/src/lib/libbsp/m68k/mcf5206elite/include/i2cdrv.h
index 12ce30a0cd..10c25bf36d 100644
--- a/c/src/lib/libbsp/m68k/mcf5206elite/include/i2cdrv.h
+++ b/c/src/lib/libbsp/m68k/mcf5206elite/include/i2cdrv.h
@@ -33,5 +33,5 @@ i2cdrv_initialize(rtems_device_major_number major,
#ifdef __cplusplus
}
#endif
-
+
#endif /* __I2CDRV_H__ */
diff --git a/c/src/lib/libbsp/m68k/mcf5206elite/nvram/nvram.c b/c/src/lib/libbsp/m68k/mcf5206elite/nvram/nvram.c
index cbf8579f8a..09edc4c361 100644
--- a/c/src/lib/libbsp/m68k/mcf5206elite/nvram/nvram.c
+++ b/c/src/lib/libbsp/m68k/mcf5206elite/nvram/nvram.c
@@ -1,4 +1,4 @@
-/*
+/*
* DS1307-based Non-Volatile memory device driver
*
* DS1307 chip is a I2C Real-Time Clock. It contains 56 bytes of
@@ -142,7 +142,7 @@ nvram_driver_write(rtems_device_major_number major,
i2c_bus_number bus = DS1307_I2C_BUS_NUMBER;
i2c_address addr = DS1307_I2C_ADDRESS;
i2c_message_status status;
-
+
if (args->offset >= DS1307_NVRAM_SIZE)
{
count = 0;
diff --git a/c/src/lib/libbsp/m68k/mcf5206elite/start/start.S b/c/src/lib/libbsp/m68k/mcf5206elite/start/start.S
index 6e7cdd4e41..58bdaeb34f 100644
--- a/c/src/lib/libbsp/m68k/mcf5206elite/start/start.S
+++ b/c/src/lib/libbsp/m68k/mcf5206elite/start/start.S
@@ -314,17 +314,17 @@ SYM(start):
move.l #(INITIAL_STACK),sp | Set up stack again (may be we are
| going here from monitor or with
| BDM interface assistance)
-
+
/*
* Remainder of the startup code is handled by C code
*/
jmp SYM(Init5206e) | Start C code (which never returns)
-
+
/***************************************************************************
Function : CopyDataClearBSSAndStart
- Description : Copy DATA segment, clear BSS segment, initialize heap,
- initialise real stack, start C program. Assume that DATA and BSS sizes
+ Description : Copy DATA segment, clear BSS segment, initialize heap,
+ initialise real stack, start C program. Assume that DATA and BSS sizes
are multiples of 4.
***************************************************************************/
PUBLIC (CopyDataClearBSSAndStart)
@@ -396,7 +396,7 @@ _avec2_int:
_avec3_int:
nop
- jmp _unexp_int
+ jmp _unexp_int
_avec4_int:
nop
diff --git a/c/src/lib/libbsp/m68k/mcf5206elite/startup/bspclean.c b/c/src/lib/libbsp/m68k/mcf5206elite/startup/bspclean.c
index 23e2c26c25..4fb551e228 100644
--- a/c/src/lib/libbsp/m68k/mcf5206elite/startup/bspclean.c
+++ b/c/src/lib/libbsp/m68k/mcf5206elite/startup/bspclean.c
@@ -11,9 +11,9 @@
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
- *
+ *
* http://www.rtems.com/license/LICENSE.
- *
+ *
* $Id$
*/
diff --git a/c/src/lib/libbsp/m68k/mcf5206elite/startup/bspstart.c b/c/src/lib/libbsp/m68k/mcf5206elite/startup/bspstart.c
index b6c78521a7..0d9149b2aa 100644
--- a/c/src/lib/libbsp/m68k/mcf5206elite/startup/bspstart.c
+++ b/c/src/lib/libbsp/m68k/mcf5206elite/startup/bspstart.c
@@ -21,15 +21,15 @@
* found in the file LICENSE in this distribution or at
*
* http://www.rtems.com/license/LICENSE.
- *
+ *
* $Id$
*/
#include <bsp.h>
#include <rtems/libio.h>
-
+
#include <rtems/libcsupport.h>
-
+
#include <string.h>
/*
@@ -49,7 +49,7 @@ char *rtems_progname;
/*
* Use the shared implementations of the following routines
*/
-
+
void bsp_postdriver_hook(void);
void bsp_libc_init( void *, uint32_t, int );
void bsp_pretasking_hook(void); /* m68k version */
diff --git a/c/src/lib/libbsp/m68k/mcf5206elite/startup/init5206e.c b/c/src/lib/libbsp/m68k/mcf5206elite/startup/init5206e.c
index 8bf94caaad..64be2e5354 100644
--- a/c/src/lib/libbsp/m68k/mcf5206elite/startup/init5206e.c
+++ b/c/src/lib/libbsp/m68k/mcf5206elite/startup/init5206e.c
@@ -24,7 +24,7 @@
* found in the file LICENSE in this distribution or at
*
* http://www.rtems.com/license/LICENSE.
- *
+ *
* $Id$
*/
@@ -82,19 +82,19 @@ void
Init5206e(void)
{
extern void CopyDataClearBSSAndStart(unsigned long ramsize);
-
+
/* Set Module Base Address register */
m68k_set_mbar((MBAR & MCF5206E_MBAR_BA) | MCF5206E_MBAR_V);
-
+
/* Set System Protection Control Register (SYPCR):
* Bus Monitor Enable, Bus Monitor Timing = 1024 clocks,
* Software watchdog disabled
*/
*MCF5206E_SYPCR(MBAR) = MCF5206E_SYPCR_BME |
MCF5206E_SYPCR_BMT_1024;
-
+
/* Set Pin Assignment Register (PAR):
- * Output Timer 0 (not DREQ) on *TOUT[0] / *DREQ[1]
+ * Output Timer 0 (not DREQ) on *TOUT[0] / *DREQ[1]
* Input Timer 0 (not DREQ) on *TIN[0] / *DREQ[0]
* IRQ, not IPL
* UART2 RTS signal (not \RSTO)
@@ -108,7 +108,7 @@ Init5206e(void)
MCF5206E_PAR_PAR5_PST |
MCF5206E_PAR_PAR4_DDATA |
MCF5206E_PAR_WE0_WE1_WE2_WE3;
-
+
/* Set SIM Configuration Register (SIMR):
* Disable software watchdog timer and bus timeout monitor when
* internal freeze signal is asserted.
@@ -117,45 +117,45 @@ Init5206e(void)
/* Set Interrupt Mask Register: Disable all interrupts */
*MCF5206E_IMR(MBAR) = 0xFFFF;
-
+
/* Assign Interrupt Control Registers as it is defined in bsp.h */
- *MCF5206E_ICR(MBAR,MCF5206E_INTR_EXT_IPL1) =
+ *MCF5206E_ICR(MBAR,MCF5206E_INTR_EXT_IPL1) =
(BSP_INTLVL_AVEC1 << MCF5206E_ICR_IL_S) |
(BSP_INTPRIO_AVEC1 << MCF5206E_ICR_IP_S) |
MCF5206E_ICR_AVEC;
- *MCF5206E_ICR(MBAR,MCF5206E_INTR_EXT_IPL2) =
+ *MCF5206E_ICR(MBAR,MCF5206E_INTR_EXT_IPL2) =
(BSP_INTLVL_AVEC2 << MCF5206E_ICR_IL_S) |
(BSP_INTPRIO_AVEC2 << MCF5206E_ICR_IP_S) |
MCF5206E_ICR_AVEC;
- *MCF5206E_ICR(MBAR,MCF5206E_INTR_EXT_IPL3) =
+ *MCF5206E_ICR(MBAR,MCF5206E_INTR_EXT_IPL3) =
(BSP_INTLVL_AVEC3 << MCF5206E_ICR_IL_S) |
(BSP_INTPRIO_AVEC3 << MCF5206E_ICR_IP_S) |
MCF5206E_ICR_AVEC;
- *MCF5206E_ICR(MBAR,MCF5206E_INTR_EXT_IPL4) =
+ *MCF5206E_ICR(MBAR,MCF5206E_INTR_EXT_IPL4) =
(BSP_INTLVL_AVEC4 << MCF5206E_ICR_IL_S) |
(BSP_INTPRIO_AVEC4 << MCF5206E_ICR_IP_S) |
MCF5206E_ICR_AVEC;
- *MCF5206E_ICR(MBAR,MCF5206E_INTR_EXT_IPL5) =
+ *MCF5206E_ICR(MBAR,MCF5206E_INTR_EXT_IPL5) =
(BSP_INTLVL_AVEC5 << MCF5206E_ICR_IL_S) |
(BSP_INTPRIO_AVEC5 << MCF5206E_ICR_IP_S) |
MCF5206E_ICR_AVEC;
- *MCF5206E_ICR(MBAR,MCF5206E_INTR_EXT_IPL6) =
+ *MCF5206E_ICR(MBAR,MCF5206E_INTR_EXT_IPL6) =
(BSP_INTLVL_AVEC6 << MCF5206E_ICR_IL_S) |
(BSP_INTPRIO_AVEC6 << MCF5206E_ICR_IP_S) |
MCF5206E_ICR_AVEC;
- *MCF5206E_ICR(MBAR,MCF5206E_INTR_EXT_IPL7) =
+ *MCF5206E_ICR(MBAR,MCF5206E_INTR_EXT_IPL7) =
(BSP_INTLVL_AVEC7 << MCF5206E_ICR_IL_S) |
(BSP_INTPRIO_AVEC7 << MCF5206E_ICR_IP_S) |
MCF5206E_ICR_AVEC;
- *MCF5206E_ICR(MBAR,MCF5206E_INTR_TIMER_1) =
+ *MCF5206E_ICR(MBAR,MCF5206E_INTR_TIMER_1) =
(BSP_INTLVL_TIMER1 << MCF5206E_ICR_IL_S) |
(BSP_INTPRIO_TIMER1 << MCF5206E_ICR_IP_S) |
MCF5206E_ICR_AVEC;
- *MCF5206E_ICR(MBAR,MCF5206E_INTR_TIMER_2) =
+ *MCF5206E_ICR(MBAR,MCF5206E_INTR_TIMER_2) =
(BSP_INTLVL_TIMER2 << MCF5206E_ICR_IL_S) |
(BSP_INTPRIO_TIMER2 << MCF5206E_ICR_IP_S) |
MCF5206E_ICR_AVEC;
- *MCF5206E_ICR(MBAR,MCF5206E_INTR_MBUS) =
+ *MCF5206E_ICR(MBAR,MCF5206E_INTR_MBUS) =
(BSP_INTLVL_MBUS << MCF5206E_ICR_IL_S) |
(BSP_INTPRIO_MBUS << MCF5206E_ICR_IP_S) |
MCF5206E_ICR_AVEC;
@@ -178,7 +178,7 @@ Init5206e(void)
*MCF5206E_SWIVR(MBAR) = 0x0F; /* Uninitialized interrupt */
*MCF5206E_SWSR(MBAR) = MCF5206E_SWSR_KEY1;
*MCF5206E_SWSR(MBAR) = MCF5206E_SWSR_KEY2;
-
+
/* Configuring Chip Selects */
/* CS2: SRAM memory */
*MCF5206E_CSAR(MBAR,2) = BSP_MEM_ADDR_ESRAM >> 16;
@@ -189,7 +189,7 @@ Init5206e(void)
MCF5206E_CSCR_EMAA |
MCF5206E_CSCR_WR |
MCF5206E_CSCR_RD;
-
+
/* CS3: GPIO on eLITE board */
*MCF5206E_CSAR(MBAR,3) = BSP_MEM_ADDR_GPIO >> 16;
*MCF5206E_CSMR(MBAR,3) = BSP_MEM_MASK_GPIO;
@@ -199,7 +199,7 @@ Init5206e(void)
MCF5206E_CSCR_EMAA |
MCF5206E_CSCR_WR |
MCF5206E_CSCR_RD;
-
+
{
extern void INTERRUPT_VECTOR();
uint32_t *inttab = (uint32_t*)&INTERRUPT_VECTOR;
@@ -211,9 +211,9 @@ Init5206e(void)
}
}
m68k_set_vbr(BSP_MEM_ADDR_ESRAM);
-
+
/* CS0: Flash EEPROM */
- *MCF5206E_CSAR(MBAR,0) = BSP_MEM_ADDR_FLASH >> 16;
+ *MCF5206E_CSAR(MBAR,0) = BSP_MEM_ADDR_FLASH >> 16;
*MCF5206E_CSCR(MBAR,0) = MCF5206E_CSCR_WS3 |
MCF5206E_CSCR_AA |
MCF5206E_CSCR_PS_16 |
@@ -221,7 +221,7 @@ Init5206e(void)
MCF5206E_CSCR_WR |
MCF5206E_CSCR_RD;
*MCF5206E_CSMR(MBAR,0) = BSP_MEM_MASK_FLASH;
-
+
/*
* Invalidate the cache and disable it
*/
@@ -244,8 +244,8 @@ Init5206e(void)
| MCF5206E_ACR_SM_ANY
);
- mcf5206e_enable_cache();
-
+ mcf5206e_enable_cache();
+
/*
* Copy data, clear BSS, switch stacks and call boot_card()
*/
diff --git a/c/src/lib/libbsp/m68k/mcf5206elite/tod/ds1307.c b/c/src/lib/libbsp/m68k/mcf5206elite/tod/ds1307.c
index 559b7bdb5d..a2c62ebcc1 100644
--- a/c/src/lib/libbsp/m68k/mcf5206elite/tod/ds1307.c
+++ b/c/src/lib/libbsp/m68k/mcf5206elite/tod/ds1307.c
@@ -53,17 +53,17 @@ ds1307_initialize(int minor)
uint8_t sec;
i2c_bus_number bus;
i2c_address addr;
-
+
bus = RTC_Table[minor].ulCtrlPort1;
addr = RTC_Table[minor].ulDataPort;
-
+
/* Read SECONDS register */
try = 0;
do {
status = i2c_wbrd(bus, addr, 0, &sec, sizeof(sec));
try++;
} while ((status != I2C_SUCCESSFUL) && (try < 15));
-
+
/* If clock is halted, reset and start the clock */
if ((sec & DS1307_SECOND_HALT) != 0)
{
@@ -98,13 +98,13 @@ ds1307_get_time(int minor, rtems_time_of_day *time)
uint32_t v1, v2;
i2c_message_status status;
int try;
-
+
if (time == NULL)
return -1;
-
+
bus = RTC_Table[minor].ulCtrlPort1;
addr = RTC_Table[minor].ulDataPort;
-
+
memset(time, 0, sizeof(rtems_time_of_day));
try = 0;
do {
@@ -116,20 +116,20 @@ ds1307_get_time(int minor, rtems_time_of_day *time)
{
return -1;
}
-
+
v1 = info[DS1307_YEAR];
v2 = From_BCD(v1);
if (v2 < 88)
time->year = 2000 + v2;
else
time->year = 1900 + v2;
-
+
v1 = info[DS1307_MONTH] & ~0xE0;
time->month = From_BCD(v1);
-
+
v1 = info[DS1307_DAY] & ~0xC0;
time->day = From_BCD(v1);
-
+
v1 = info[DS1307_HOUR];
if (v1 & DS1307_HOUR_12)
{
@@ -151,11 +151,11 @@ ds1307_get_time(int minor, rtems_time_of_day *time)
v1 = info[DS1307_MINUTE] & ~0x80;
time->minute = From_BCD(v1);
-
+
v1 = info[DS1307_SECOND];
v2 = v1 & ~0x80;
time->second = From_BCD(v2);
-
+
return 0;
}
@@ -178,7 +178,7 @@ ds1307_set_time(int minor, rtems_time_of_day *time)
uint8_t info[8];
i2c_message_status status;
int try;
-
+
if (time == NULL)
return -1;
@@ -187,7 +187,7 @@ ds1307_set_time(int minor, rtems_time_of_day *time)
if (time->year >= 2088)
rtems_fatal_error_occurred(RTEMS_INVALID_NUMBER);
-
+
info[0] = DS1307_SECOND;
info[1 + DS1307_YEAR] = To_BCD(time->year % 100);
info[1 + DS1307_MONTH] = To_BCD(time->month);
@@ -196,7 +196,7 @@ ds1307_set_time(int minor, rtems_time_of_day *time)
info[1 + DS1307_MINUTE] = To_BCD(time->minute);
info[1 + DS1307_SECOND] = To_BCD(time->second);
info[1 + DS1307_DAY_OF_WEEK] = 1; /* Do not set day of week */
-
+
try = 0;
do {
status = i2c_write(bus, addr, info, 8);
diff --git a/c/src/lib/libbsp/m68k/mcf5206elite/tod/todcfg.c b/c/src/lib/libbsp/m68k/mcf5206elite/tod/todcfg.c
index 117f95488f..35d00c1792 100644
--- a/c/src/lib/libbsp/m68k/mcf5206elite/tod/todcfg.c
+++ b/c/src/lib/libbsp/m68k/mcf5206elite/tod/todcfg.c
@@ -63,12 +63,12 @@ mcf5206elite_ds1307_probe(int minor)
rtc_tbl *rtc;
i2c_bus_number bus;
i2c_address addr;
-
+
if (minor >= NUM_RTCS)
return FALSE;
-
+
rtc = RTC_Table + minor;
-
+
bus = rtc->ulCtrlPort1;
addr = rtc->ulDataPort;
do {
diff --git a/c/src/lib/libbsp/m68k/mrm332/clock/ckinit.c b/c/src/lib/libbsp/m68k/mrm332/clock/ckinit.c
index 367e3dc86f..6b43a81917 100644
--- a/c/src/lib/libbsp/m68k/mrm332/clock/ckinit.c
+++ b/c/src/lib/libbsp/m68k/mrm332/clock/ckinit.c
@@ -30,14 +30,14 @@ volatile uint32_t Clock_driver_ticks;
rtems_isr_entry Old_ticker;
void Clock_exit( void );
-
+
/*
* These are set by clock driver during its init
*/
-
+
rtems_device_major_number rtems_clock_major = ~0;
rtems_device_minor_number rtems_clock_minor;
-
+
rtems_isr Clock_isr(rtems_vector_number vector)
{
Clock_driver_ticks += 1;
@@ -63,7 +63,7 @@ void Install_clock(
*PITR = (unsigned short int)( SAM(0x09,0,PITM) );/* load counter */
*PICR = (unsigned short int) /* enable interrupt */
( SAM(ISRL_PIT,8,PIRQL) | SAM(CLOCK_VECTOR,0,PIV) );
-
+
atexit( Clock_exit );
}
@@ -84,17 +84,17 @@ rtems_device_driver Clock_initialize(
)
{
Install_clock( Clock_isr );
-
+
/*
* make major/minor avail to others such as shared memory driver
*/
-
+
rtems_clock_major = major;
rtems_clock_minor = minor;
-
+
return RTEMS_SUCCESSFUL;
}
-
+
rtems_device_driver Clock_control(
rtems_device_major_number major,
rtems_device_minor_number minor,
@@ -103,15 +103,15 @@ rtems_device_driver Clock_control(
{
uint32_t isrlevel;
rtems_libio_ioctl_args_t *args = pargp;
-
+
if (args == 0)
goto done;
-
+
/*
* This is hokey, but until we get a defined interface
* to do this, it will just be this simple...
*/
-
+
if (args->command == rtems_build_name('I', 'S', 'R', ' '))
{
Clock_isr(CLOCK_VECTOR);
@@ -122,7 +122,7 @@ rtems_device_driver Clock_control(
(void) set_vector( args->buffer, CLOCK_VECTOR, 1 );
rtems_interrupt_enable( isrlevel );
}
-
+
done:
return RTEMS_SUCCESSFUL;
}
diff --git a/c/src/lib/libbsp/m68k/mrm332/console/console.c b/c/src/lib/libbsp/m68k/mrm332/console/console.c
index 33bfb1fa8e..757b196dc6 100644
--- a/c/src/lib/libbsp/m68k/mrm332/console/console.c
+++ b/c/src/lib/libbsp/m68k/mrm332/console/console.c
@@ -49,11 +49,11 @@ rtems_device_driver console_open(
/* SCI internal uart */
- status = rtems_termios_open( major, minor, arg, SciGetTermiosHandlers( TRUE ) );
+ status = rtems_termios_open( major, minor, arg, SciGetTermiosHandlers( TRUE ) );
return status;
}
-
+
/*PAGE
*
* console_close
@@ -69,7 +69,7 @@ rtems_device_driver console_close(
{
return rtems_termios_close (arg);
}
-
+
/*PAGE
*
* console_read
@@ -85,7 +85,7 @@ rtems_device_driver console_read(
{
return rtems_termios_read (arg);
}
-
+
/*PAGE
*
* console_write
@@ -101,7 +101,7 @@ rtems_device_driver console_write(
{
return rtems_termios_write (arg);
}
-
+
/*PAGE
*
* console_control
@@ -167,7 +167,7 @@ rtems_device_driver console_initialize(
if ( link( "/dev/sci", "/dev/console") < 0 )
{
rtems_fatal_error_occurred( RTEMS_IO_ERROR );
- }
+ }
#endif
/*
diff --git a/c/src/lib/libbsp/m68k/mrm332/console/sci.c b/c/src/lib/libbsp/m68k/mrm332/console/sci.c
index 7e92a5a293..97c4a5c1b5 100644
--- a/c/src/lib/libbsp/m68k/mrm332/console/sci.c
+++ b/c/src/lib/libbsp/m68k/mrm332/console/sci.c
@@ -36,6 +36,9 @@
* $Id$
*
* $Log$
+* Revision 1.6 2004/04/15 13:26:13 ralf
+* Remove stray white spaces.
+*
* Revision 1.5 2004/03/31 04:37:05 ralf
* 2004-03-31 Ralf Corsepius <ralf_corsepius@rtems.org>
*
@@ -486,7 +489,7 @@ static int8_t SciRcvBufGetChar()
{
rtems_interrupt_level level;
uint8_t ch;
-
+
if ( SciRcvBufCount == 0 )
{
rtems_fatal_error_occurred(0xDEAD); // check the count first!
@@ -521,7 +524,7 @@ static int8_t SciRcvBufGetChar()
static void SciRcvBufPutChar( uint8_t ch )
{
rtems_interrupt_level level;
-
+
if ( SciRcvBufCount == SCI_RCV_BUF_SIZE ) // is there room?
{
return; // no, throw it away
@@ -556,7 +559,7 @@ static void SciRcvBufPutChar( uint8_t ch )
static void SciRcvBufFlush( void )
{
rtems_interrupt_level level;
-
+
rtems_interrupt_disable( level ); // disable interrupts
memset( SciRcvBuffer, 0, sizeof(SciRcvBuffer) );
@@ -740,7 +743,7 @@ int32_t SciSetAttributes(
uint16_t sci_databits = 0;
if ( minor != SCI_MINOR ) // check the minor dev num
- {
+ {
return -1; // return error
}
@@ -754,7 +757,7 @@ int32_t SciSetAttributes(
// baud_requested = B9600; // default to 9600 baud
baud_requested = B19200; // default to 19200 baud
}
-
+
sci_rate = termios_baud_to_number( baud_requested );
// parity error detection
@@ -1123,7 +1126,7 @@ rtems_device_driver SciRead (
rtems_libio_rw_args_t *rw_args; // ptr to argument struct
uint8_t *buffer;
uint16_t length;
-
+
rw_args = (rtems_libio_rw_args_t *) arg; // arguments to read()
@@ -1184,7 +1187,7 @@ rtems_device_driver SciWrite (
rtems_libio_rw_args_t *rw_args; // ptr to argument struct
uint8_t *buffer;
uint16_t length;
-
+
rw_args = (rtems_libio_rw_args_t *) arg;
if (minor != SCI_MINOR)
@@ -1234,7 +1237,7 @@ rtems_device_driver SciControl (
uint16_t command; // the cmd to execute
uint16_t unused; // maybe later
uint16_t *ptr; // ptr to user data
-
+
//printk("%s major=%d minor=%d\r\n", __FUNCTION__,major,minor);
// do some sanity checking
diff --git a/c/src/lib/libbsp/m68k/mrm332/include/bsp.h b/c/src/lib/libbsp/m68k/mrm332/include/bsp.h
index 79be6d6e71..1aa26d9310 100644
--- a/c/src/lib/libbsp/m68k/mrm332/include/bsp.h
+++ b/c/src/lib/libbsp/m68k/mrm332/include/bsp.h
@@ -57,7 +57,7 @@ extern "C" {
/* XXX - JRS - I want to compile the tmtests */
-#define MUST_WAIT_FOR_INTERRUPT 1
+#define MUST_WAIT_FOR_INTERRUPT 1
#define Install_tm27_vector( handler )
@@ -65,7 +65,7 @@ extern "C" {
#define Clear_tm27_intr()
-#define Lower_tm27_intr()
+#define Lower_tm27_intr()
/*
* Simple spin delay in microsecond units for device drivers.
@@ -130,11 +130,11 @@ extern int stack_start;
/*
* Device Driver Table Entries
*/
-
+
/*
* NOTE: Use the standard Console driver entry
*/
-
+
/*
* NOTE: Use the standard Clock driver entry
*/
diff --git a/c/src/lib/libbsp/m68k/mrm332/include/mrm332.h b/c/src/lib/libbsp/m68k/mrm332/include/mrm332.h
index d6e97f1cec..8e385f8079 100644
--- a/c/src/lib/libbsp/m68k/mrm332/include/mrm332.h
+++ b/c/src/lib/libbsp/m68k/mrm332/include/mrm332.h
@@ -64,7 +64,7 @@
/*
* This prototype really should have the noreturn attribute but
- * that causes a warning. Not sure how to fix that.
+ * that causes a warning. Not sure how to fix that.
*/
/* static void reboot(void) __attribute__ ((noreturn)); */
static void reboot(void);
diff --git a/c/src/lib/libbsp/m68k/mrm332/spurious/spinit.c b/c/src/lib/libbsp/m68k/mrm332/spurious/spinit.c
index 4e5e0e542a..52796ca03a 100644
--- a/c/src/lib/libbsp/m68k/mrm332/spurious/spinit.c
+++ b/c/src/lib/libbsp/m68k/mrm332/spurious/spinit.c
@@ -36,27 +36,27 @@ rtems_isr Spurious_Isr(
//int sp = 0;
#if 0
const char * const VectDescrip[] = {
- _Spurious_Error_[0], _Spurious_Error_[0], _Spurious_Error_[1],
- _Spurious_Error_[2], _Spurious_Error_[3], _Spurious_Error_[4],
- _Spurious_Error_[5], _Spurious_Error_[6], _Spurious_Error_[7],
- _Spurious_Error_[8], _Spurious_Error_[9], _Spurious_Error_[10],
- _Spurious_Error_[11], _Spurious_Error_[12], _Spurious_Error_[13],
- _Spurious_Error_[13], _Spurious_Error_[14], _Spurious_Error_[14],
- _Spurious_Error_[14], _Spurious_Error_[14], _Spurious_Error_[14],
- _Spurious_Error_[14], _Spurious_Error_[14], _Spurious_Error_[14],
- _Spurious_Error_[15], _Spurious_Error_[16], _Spurious_Error_[17],
- _Spurious_Error_[18], _Spurious_Error_[19], _Spurious_Error_[20],
- _Spurious_Error_[21], _Spurious_Error_[22], _Spurious_Error_[23],
- _Spurious_Error_[24], _Spurious_Error_[23], _Spurious_Error_[23],
- _Spurious_Error_[23], _Spurious_Error_[23], _Spurious_Error_[23],
- _Spurious_Error_[23], _Spurious_Error_[23], _Spurious_Error_[23],
- _Spurious_Error_[23], _Spurious_Error_[23], _Spurious_Error_[23],
- _Spurious_Error_[23], _Spurious_Error_[23], _Spurious_Error_[25],
- _Spurious_Error_[26], _Spurious_Error_[26], _Spurious_Error_[26],
- _Spurious_Error_[26], _Spurious_Error_[26], _Spurious_Error_[26],
- _Spurious_Error_[26], _Spurious_Error_[26], _Spurious_Error_[26],
- _Spurious_Error_[26], _Spurious_Error_[26], _Spurious_Error_[27],
- _Spurious_Error_[27], _Spurious_Error_[27], _Spurious_Error_[27],
+ _Spurious_Error_[0], _Spurious_Error_[0], _Spurious_Error_[1],
+ _Spurious_Error_[2], _Spurious_Error_[3], _Spurious_Error_[4],
+ _Spurious_Error_[5], _Spurious_Error_[6], _Spurious_Error_[7],
+ _Spurious_Error_[8], _Spurious_Error_[9], _Spurious_Error_[10],
+ _Spurious_Error_[11], _Spurious_Error_[12], _Spurious_Error_[13],
+ _Spurious_Error_[13], _Spurious_Error_[14], _Spurious_Error_[14],
+ _Spurious_Error_[14], _Spurious_Error_[14], _Spurious_Error_[14],
+ _Spurious_Error_[14], _Spurious_Error_[14], _Spurious_Error_[14],
+ _Spurious_Error_[15], _Spurious_Error_[16], _Spurious_Error_[17],
+ _Spurious_Error_[18], _Spurious_Error_[19], _Spurious_Error_[20],
+ _Spurious_Error_[21], _Spurious_Error_[22], _Spurious_Error_[23],
+ _Spurious_Error_[24], _Spurious_Error_[23], _Spurious_Error_[23],
+ _Spurious_Error_[23], _Spurious_Error_[23], _Spurious_Error_[23],
+ _Spurious_Error_[23], _Spurious_Error_[23], _Spurious_Error_[23],
+ _Spurious_Error_[23], _Spurious_Error_[23], _Spurious_Error_[23],
+ _Spurious_Error_[23], _Spurious_Error_[23], _Spurious_Error_[25],
+ _Spurious_Error_[26], _Spurious_Error_[26], _Spurious_Error_[26],
+ _Spurious_Error_[26], _Spurious_Error_[26], _Spurious_Error_[26],
+ _Spurious_Error_[26], _Spurious_Error_[26], _Spurious_Error_[26],
+ _Spurious_Error_[26], _Spurious_Error_[26], _Spurious_Error_[27],
+ _Spurious_Error_[27], _Spurious_Error_[27], _Spurious_Error_[27],
_Spurious_Error_[27], _Spurious_Error_[28]};
#endif
diff --git a/c/src/lib/libbsp/m68k/mrm332/start/start.S b/c/src/lib/libbsp/m68k/mrm332/start/start.S
index 359b2e5f7c..fec7bbee81 100644
--- a/c/src/lib/libbsp/m68k/mrm332/start/start.S
+++ b/c/src/lib/libbsp/m68k/mrm332/start/start.S
@@ -88,7 +88,7 @@ END_CODE
/* see section 9 of the SIM Reference Manual */
*DDRE = (unsigned char) 0xff;
*DDRF = (unsigned char) 0xfd;
-
+
/* Port E and F Pin Assignment Register */
/* see section 9 of the SIM Reference Manual */
*PEPAR = (unsigned char) 0;
@@ -109,7 +109,7 @@ END_CODE
/* ROM has data at end of text; copy it. */
while (dst < _edata)
*dst++ = *src++;
-
+
/* Zero bss */
for (dst = _clear_start; dst< end; dst++)
{
@@ -130,7 +130,7 @@ END_CODE
M68Kvec[ 31 ] = monitors_vector_table[ 31 ]; /* level 7 interrupt */
M68Kvec[ 47 ] = monitors_vector_table[ 47 ]; /* system call vector */
M68Kvec[ 66 ] = monitors_vector_table[ 66 ]; /* user defined */
-
+
m68k_set_vbr(&M68Kvec);
}
diff --git a/c/src/lib/libbsp/m68k/mrm332/startup/bspclean.c b/c/src/lib/libbsp/m68k/mrm332/startup/bspclean.c
index 3379492b72..472ce4ba14 100644
--- a/c/src/lib/libbsp/m68k/mrm332/startup/bspclean.c
+++ b/c/src/lib/libbsp/m68k/mrm332/startup/bspclean.c
@@ -1,7 +1,7 @@
/* bsp_cleanup()
*
* This routine cleans up in the sense that it places the board
- * in a safe state and flushes the I/O buffers before exiting.
+ * in a safe state and flushes the I/O buffers before exiting.
*
* INPUT: NONE
*
diff --git a/c/src/lib/libbsp/m68k/mrm332/startup/bspstart.c b/c/src/lib/libbsp/m68k/mrm332/startup/bspstart.c
index 4c5c577f80..f40fa2153d 100644
--- a/c/src/lib/libbsp/m68k/mrm332/startup/bspstart.c
+++ b/c/src/lib/libbsp/m68k/mrm332/startup/bspstart.c
@@ -16,9 +16,9 @@
#include <bsp.h>
#include <rtems/libio.h>
-
+
#include <string.h>
-
+
/*
* The original table from the application and our copy of it with
* some changes.
@@ -34,7 +34,7 @@ char *rtems_progname;
/*
* Use the shared implementations of the following routines
*/
-
+
void bsp_postdriver_hook(void);
void bsp_libc_init( void *, uint32_t, int );
void bsp_pretasking_hook(void); /* m68k version */
diff --git a/c/src/lib/libbsp/m68k/mrm332/startup/except_vect_332_ROM.S b/c/src/lib/libbsp/m68k/mrm332/startup/except_vect_332_ROM.S
index cb8ce4cf5c..edc0b633f4 100644
--- a/c/src/lib/libbsp/m68k/mrm332/startup/except_vect_332_ROM.S
+++ b/c/src/lib/libbsp/m68k/mrm332/startup/except_vect_332_ROM.S
@@ -2,18 +2,18 @@
* $Id$
*/
-/* Exception Vector definitions follow */
+/* Exception Vector definitions follow */
/* !!! Warning !!! This table is not tested, and
the user must make sure it is complete. */
- /* If we use TRAP #15 for reboot, note that group 0 and 1 exceptions
+ /* If we use TRAP #15 for reboot, note that group 0 and 1 exceptions
will have priority. */
/* This is the "magic word" that CPU32bug uses to indicate that
there is a bootable image here. */
.long 0xBEEFBEEF
-
+
/* Vector 0: RESET: Initial SSP */
.long _RamEnd
/* Vector 1: RESET: Initial PC */
@@ -21,7 +21,7 @@
/* default action for undefined vectors is to re-boot */
- /* Note group 0 and 1 exception (like trace) have priority
+ /* Note group 0 and 1 exception (like trace) have priority
over other exceptions (like trap #15) that may call this. */
/* Vectors 2-255 */
@@ -287,8 +287,8 @@ _reboot:
movea.l (0x4).w,%a0 /* jmp to location of reset vector */
jmp (%a0)
-reboot:
- trap #15 /* use trap exception to enter supervisor
- state. Trace mode ( and other group 0
- and 1 exceptions) *could* screw this up if
+reboot:
+ trap #15 /* use trap exception to enter supervisor
+ state. Trace mode ( and other group 0
+ and 1 exceptions) *could* screw this up if
not vectored to reboot or did not return. */
diff --git a/c/src/lib/libbsp/m68k/mrm332/startup/start_c.c b/c/src/lib/libbsp/m68k/mrm332/startup/start_c.c
index acab7b4696..4cb7ab2c65 100644
--- a/c/src/lib/libbsp/m68k/mrm332/startup/start_c.c
+++ b/c/src/lib/libbsp/m68k/mrm332/startup/start_c.c
@@ -62,7 +62,7 @@ void start_c() {
/* see section 9 of the SIM Reference Manual */
*DDRE = (unsigned char) 0xff;
*DDRF = (unsigned char) 0xfd;
-
+
/* Port E and F Pin Assignment Register */
/* see section 9 of the SIM Reference Manual */
*PEPAR = (unsigned char) 0;
@@ -83,7 +83,7 @@ void start_c() {
/* ROM has data at end of text; copy it. */
while (dst < _edata)
*dst++ = *src++;
-
+
/* Zero bss */
for (dst = _clear_start; dst< end; dst++)
{
@@ -104,14 +104,14 @@ void start_c() {
M68Kvec[ 31 ] = monitors_vector_table[ 31 ]; /* level 7 interrupt */
M68Kvec[ 47 ] = monitors_vector_table[ 47 ]; /* system call vector */
M68Kvec[ 66 ] = monitors_vector_table[ 66 ]; /* user defined */
-
+
m68k_set_vbr(&M68Kvec);
}
/*
* Initalize the board.
*/
-
+
/* Spurious should be called in the predriver hook */
/* Spurious_Initialize(); */
//console_init();
diff --git a/c/src/lib/libbsp/m68k/mrm332/timer/timer.c b/c/src/lib/libbsp/m68k/mrm332/timer/timer.c
index d497e4580d..8100914286 100644
--- a/c/src/lib/libbsp/m68k/mrm332/timer/timer.c
+++ b/c/src/lib/libbsp/m68k/mrm332/timer/timer.c
@@ -6,7 +6,7 @@
*
* Output parameters: NONE
*
- * NOTE: It is important that the timer start/stop overhead be
+ * NOTE: It is important that the timer start/stop overhead be
* determined when porting or modifying this code.
*
* COPYRIGHT (c) 1989-1999.
diff --git a/c/src/lib/libbsp/m68k/mvme136/clock/ckinit.c b/c/src/lib/libbsp/m68k/mvme136/clock/ckinit.c
index 33091ab4d5..2695054222 100644
--- a/c/src/lib/libbsp/m68k/mvme136/clock/ckinit.c
+++ b/c/src/lib/libbsp/m68k/mvme136/clock/ckinit.c
@@ -35,7 +35,7 @@
#define TIMER 0xfffb0000
#define RELOAD 0x24 /* clr IP & IUS,allow countdown */
-
+
#define CLOCK_VECTOR 66
uint32_t Clock_isrs; /* ISRs until next tick */
@@ -49,14 +49,14 @@ void Clock_exit( void );
/*
* These are set by clock driver during its init
*/
-
+
rtems_device_major_number rtems_clock_major = ~0;
rtems_device_minor_number rtems_clock_minor;
-
+
/*
* ISR Handler
*/
-
+
rtems_isr Clock_isr(
rtems_vector_number vector
)
@@ -130,7 +130,7 @@ rtems_device_driver Clock_initialize(
rtems_clock_major = major;
rtems_clock_minor = minor;
-
+
return RTEMS_SUCCESSFUL;
}
@@ -142,15 +142,15 @@ rtems_device_driver Clock_control(
{
uint32_t isrlevel;
rtems_libio_ioctl_args_t *args = pargp;
-
+
if (args == 0)
goto done;
-
+
/*
* This is hokey, but until we get a defined interface
* to do this, it will just be this simple...
*/
-
+
if (args->command == rtems_build_name('I', 'S', 'R', ' '))
{
Clock_isr(CLOCK_VECTOR);
@@ -161,7 +161,7 @@ rtems_device_driver Clock_control(
(void) set_vector( args->buffer, CLOCK_VECTOR, 1 );
rtems_interrupt_enable( isrlevel );
}
-
+
done:
return RTEMS_SUCCESSFUL;
}
diff --git a/c/src/lib/libbsp/m68k/mvme136/console/console.c b/c/src/lib/libbsp/m68k/mvme136/console/console.c
index a015a539cb..53e074fe4f 100644
--- a/c/src/lib/libbsp/m68k/mvme136/console/console.c
+++ b/c/src/lib/libbsp/m68k/mvme136/console/console.c
@@ -46,7 +46,7 @@ rtems_device_driver console_initialize(
if (status != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred(status);
-
+
return RTEMS_SUCCESSFUL;
}
@@ -131,7 +131,7 @@ rtems_device_driver console_open(
{
return RTEMS_SUCCESSFUL;
}
-
+
/*
* Close entry point
*/
@@ -159,7 +159,7 @@ rtems_device_driver console_read(
char *buffer;
int maximum;
int count = 0;
-
+
rw_args = (rtems_libio_rw_args_t *) arg;
buffer = rw_args->buffer;
@@ -178,7 +178,7 @@ rtems_device_driver console_read(
}
/*
- * write bytes to the serial port. Stdout and stderr are the same.
+ * write bytes to the serial port. Stdout and stderr are the same.
*/
rtems_device_driver console_write(
diff --git a/c/src/lib/libbsp/m68k/mvme136/include/bsp.h b/c/src/lib/libbsp/m68k/mvme136/include/bsp.h
index 966476fc73..eafdfa2579 100644
--- a/c/src/lib/libbsp/m68k/mvme136/include/bsp.h
+++ b/c/src/lib/libbsp/m68k/mvme136/include/bsp.h
@@ -143,7 +143,7 @@ extern m68k_isr_entry M68Kvec[]; /* vector table address */
/*
* NOTE: Use the standard Console driver entry
*/
-
+
/*
* NOTE: Use the standard Clock driver entry
*/
diff --git a/c/src/lib/libbsp/m68k/mvme136/startup/bspstart.c b/c/src/lib/libbsp/m68k/mvme136/startup/bspstart.c
index c3cbc310dd..59e72c60db 100644
--- a/c/src/lib/libbsp/m68k/mvme136/startup/bspstart.c
+++ b/c/src/lib/libbsp/m68k/mvme136/startup/bspstart.c
@@ -36,7 +36,7 @@ char *rtems_progname;
/*
* Use the shared implementations of the following routines
*/
-
+
void bsp_postdriver_hook(void);
void bsp_libc_init( void *, uint32_t, int );
void bsp_pretasking_hook(void); /* m68k version */
diff --git a/c/src/lib/libbsp/m68k/mvme147/clock/ckinit.c b/c/src/lib/libbsp/m68k/mvme147/clock/ckinit.c
index 0c36a9a172..9898fabb70 100644
--- a/c/src/lib/libbsp/m68k/mvme147/clock/ckinit.c
+++ b/c/src/lib/libbsp/m68k/mvme147/clock/ckinit.c
@@ -35,14 +35,14 @@ volatile uint32_t Clock_driver_ticks; /* ticks since initialization */
rtems_isr_entry Old_ticker;
void Clock_exit( void );
-
+
/*
* These are set by clock driver during its init
*/
-
+
rtems_device_major_number rtems_clock_major = ~0;
rtems_device_minor_number rtems_clock_minor;
-
+
/*
* ISR Handler
@@ -57,7 +57,7 @@ rtems_isr Clock_isr(rtems_vector_number vector)
rtems_clock_tick();
Clock_isrs = BSP_Configuration.microseconds_per_tick / 1000;
}
- else
+ else
Clock_isrs -= 1;
}
@@ -75,7 +75,7 @@ void Install_clock(rtems_isr_entry clock_isr )
pcc->timer2_control = 0x07; /* clear T2 overflow counter, enable counter */
pcc->timer2_int_control = CLOCK_INT_LEVEL|0x08;
/* Enable Timer 2 and set its int. level */
-
+
atexit( Clock_exit );
}
@@ -91,17 +91,17 @@ rtems_device_driver Clock_initialize(
)
{
Install_clock( Clock_isr );
-
+
/*
* make major/minor avail to others such as shared memory driver
*/
-
+
rtems_clock_major = major;
rtems_clock_minor = minor;
-
+
return RTEMS_SUCCESSFUL;
}
-
+
rtems_device_driver Clock_control(
rtems_device_major_number major,
rtems_device_minor_number minor,
@@ -110,15 +110,15 @@ rtems_device_driver Clock_control(
{
uint32_t isrlevel;
rtems_libio_ioctl_args_t *args = pargp;
-
+
if (args == 0)
goto done;
-
+
/*
* This is hokey, but until we get a defined interface
* to do this, it will just be this simple...
*/
-
+
if (args->command == rtems_build_name('I', 'S', 'R', ' '))
{
Clock_isr(TIMER_2_VECTOR);
@@ -129,7 +129,7 @@ rtems_device_driver Clock_control(
(void) set_vector( args->buffer, TIMER_2_VECTOR, 1 );
rtems_interrupt_enable( isrlevel );
}
-
+
done:
return RTEMS_SUCCESSFUL;
}
diff --git a/c/src/lib/libbsp/m68k/mvme147/console/console.c b/c/src/lib/libbsp/m68k/mvme147/console/console.c
index d065aa62af..130ecf6473 100644
--- a/c/src/lib/libbsp/m68k/mvme147/console/console.c
+++ b/c/src/lib/libbsp/m68k/mvme147/console/console.c
@@ -34,7 +34,7 @@
*
* Return values:
*/
-
+
rtems_device_driver console_initialize(
rtems_device_major_number major,
rtems_device_minor_number minor,
@@ -42,16 +42,16 @@ rtems_device_driver console_initialize(
)
{
rtems_status_code status;
-
+
status = rtems_io_register_name(
"/dev/console",
major,
(rtems_device_minor_number) 0
);
-
+
if (status != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred(status);
-
+
return RTEMS_SUCCESSFUL;
}
@@ -164,7 +164,7 @@ rtems_device_driver console_open(
{
return RTEMS_SUCCESSFUL;
}
-
+
/*
* Close entry point
*/
@@ -192,7 +192,7 @@ rtems_device_driver console_read(
char *buffer;
int maximum;
int count = 0;
-
+
rw_args = (rtems_libio_rw_args_t *) arg;
buffer = rw_args->buffer;
@@ -211,7 +211,7 @@ rtems_device_driver console_read(
}
/*
- * write bytes to the serial port. Stdout and stderr are the same.
+ * write bytes to the serial port. Stdout and stderr are the same.
*/
rtems_device_driver console_write(
diff --git a/c/src/lib/libbsp/m68k/mvme147/include/bsp.h b/c/src/lib/libbsp/m68k/mvme147/include/bsp.h
index e3f2d4ce24..57d6f6915a 100644
--- a/c/src/lib/libbsp/m68k/mvme147/include/bsp.h
+++ b/c/src/lib/libbsp/m68k/mvme147/include/bsp.h
@@ -44,7 +44,7 @@ extern "C" {
#define RAM_START 0x00005000
#define RAM_END 0x00400000
- /* MVME 147 Peripheral controller chip
+ /* MVME 147 Peripheral controller chip
see MVME147/D1, 3.4 */
struct pcc_map {
@@ -99,9 +99,9 @@ struct pcc_map {
#define PCC_BASE_VECTOR 0x40 /* First user int */
#define SCC_VECTOR PCC_BASE_VECTOR+3
#define TIMER_1_VECTOR PCC_BASE_VECTOR+8
-#define TIMER_2_VECTOR PCC_BASE_VECTOR+9
+#define TIMER_2_VECTOR PCC_BASE_VECTOR+9
#define SOFT_1_VECTOR PCC_BASE_VECTOR+10
-#define SOFT_2_VECTOR PCC_BASE_VECTOR+11
+#define SOFT_2_VECTOR PCC_BASE_VECTOR+11
#define USE_CHANNEL_A 1 /* 1 = use channel A for console */
#define USE_CHANNEL_B 0 /* 1 = use channel B for console */
@@ -169,7 +169,7 @@ extern m68k_isr_entry M68Kvec[]; /* vector table address */
/*
* NOTE: Use the standard Console driver entry
*/
-
+
/*
* NOTE: Use the standard Clock driver entry
*/
diff --git a/c/src/lib/libbsp/m68k/mvme147/startup/bspstart.c b/c/src/lib/libbsp/m68k/mvme147/startup/bspstart.c
index 88e3a4040d..ea84a67fdb 100644
--- a/c/src/lib/libbsp/m68k/mvme147/startup/bspstart.c
+++ b/c/src/lib/libbsp/m68k/mvme147/startup/bspstart.c
@@ -39,7 +39,7 @@ char *rtems_progname;
/*
* Use the shared implementations of the following routines
*/
-
+
void bsp_postdriver_hook(void);
void bsp_libc_init( void *, uint32_t, int );
void bsp_pretasking_hook(void); /* m68k version */
@@ -75,7 +75,7 @@ void bsp_start( void )
pcc->int_base_vector = PCC_BASE_VECTOR; /* Set the PCC int vectors base */
- (*(uint8_t*)0xfffe2001) = 0x08;
+ (*(uint8_t*)0xfffe2001) = 0x08;
/* make VME access round-robin */
rtems_cache_enable_instruction();
diff --git a/c/src/lib/libbsp/m68k/mvme147/timer/timer.c b/c/src/lib/libbsp/m68k/mvme147/timer/timer.c
index b533b5a8ba..857c391c78 100644
--- a/c/src/lib/libbsp/m68k/mvme147/timer/timer.c
+++ b/c/src/lib/libbsp/m68k/mvme147/timer/timer.c
@@ -46,9 +46,9 @@ void Timer_initialize()
/* write countdown preload value */
pcc->timer1_control = 0x00; /* load preload value */
pcc->timer1_control = 0x07; /* clear T1 overflow counter, enable counter */
- pcc->timer1_int_control = TIMER_INT_LEVEL|0x08;
+ pcc->timer1_int_control = TIMER_INT_LEVEL|0x08;
/* Enable Timer 1 and set its int. level */
-
+
}
#define AVG_OVERHEAD 0 /* No need to start/stop the timer to read
diff --git a/c/src/lib/libbsp/m68k/mvme147/timer/timerisr.S b/c/src/lib/libbsp/m68k/mvme147/timer/timerisr.S
index 3e3c1b4394..2f93c005cc 100644
--- a/c/src/lib/libbsp/m68k/mvme147/timer/timerisr.S
+++ b/c/src/lib/libbsp/m68k/mvme147/timer/timerisr.S
@@ -22,7 +22,7 @@ SYM (timerisr):
orb #0x80, T1_CONTROL_REGISTER | clear T1 int status bit
addql #1, SYM (Ttimer_val) | increment timer value
end_timerisr:
- rte
+ rte
END_CODE
END
diff --git a/c/src/lib/libbsp/m68k/mvme147s/include/bsp.h b/c/src/lib/libbsp/m68k/mvme147s/include/bsp.h
index 6a07fa945f..ebe109d34d 100644
--- a/c/src/lib/libbsp/m68k/mvme147s/include/bsp.h
+++ b/c/src/lib/libbsp/m68k/mvme147s/include/bsp.h
@@ -46,7 +46,7 @@ extern "C" {
#define DRAM_END 0x00400000
/* We leave 128k for the shared memory */
- /* MVME 147 Peripheral controller chip
+ /* MVME 147 Peripheral controller chip
see MVME147/D1, 3.4 */
struct pcc_map {
@@ -160,9 +160,9 @@ struct vme_gcsr_map {
#define PCC_BASE_VECTOR 0x40 /* First user int */
#define SCC_VECTOR PCC_BASE_VECTOR+3
#define TIMER_1_VECTOR PCC_BASE_VECTOR+8
-#define TIMER_2_VECTOR PCC_BASE_VECTOR+9
+#define TIMER_2_VECTOR PCC_BASE_VECTOR+9
#define SOFT_1_VECTOR PCC_BASE_VECTOR+10
-#define SOFT_2_VECTOR PCC_BASE_VECTOR+11
+#define SOFT_2_VECTOR PCC_BASE_VECTOR+11
#define VME_BASE_VECTOR 0x50
#define VME_SIGLP_VECTOR VME_BASE_VECTOR+1
@@ -233,7 +233,7 @@ extern m68k_isr_entry M68Kvec[]; /* vector table address */
/*
* NOTE: Use the standard Console driver entry
*/
-
+
/*
* NOTE: Use the standard Clock driver entry
*/
diff --git a/c/src/lib/libbsp/m68k/mvme147s/shmsupp/getcfg.c b/c/src/lib/libbsp/m68k/mvme147s/shmsupp/getcfg.c
index e14f771c66..6b287edb47 100644
--- a/c/src/lib/libbsp/m68k/mvme147s/shmsupp/getcfg.c
+++ b/c/src/lib/libbsp/m68k/mvme147s/shmsupp/getcfg.c
@@ -51,18 +51,18 @@ void Shm_Get_configuration(
shm_config_table **shmcfg
)
{
- /* A shared mem space has bee left between RAM_END and DRAM_END
+ /* A shared mem space has bee left between RAM_END and DRAM_END
on the first node*/
if (localnode == 1)
- BSP_shm_cfgtbl.base = (vol_u32 *) RAM_END;
+ BSP_shm_cfgtbl.base = (vol_u32 *) RAM_END;
else
BSP_shm_cfgtbl.base = (vol_u32 *) (DRAM_END + RAM_END);
- BSP_shm_cfgtbl.length = DRAM_END - RAM_END;
+ BSP_shm_cfgtbl.length = DRAM_END - RAM_END;
BSP_shm_cfgtbl.format = SHM_BIG;
-
+
BSP_shm_cfgtbl.cause_intr = Shm_Cause_interrupt;
-
+
#ifdef NEUTRAL_BIG
BSP_shm_cfgtbl.convert = NULL_CONVERT;
#else
diff --git a/c/src/lib/libbsp/m68k/mvme147s/startup/bspstart.c b/c/src/lib/libbsp/m68k/mvme147s/startup/bspstart.c
index bc8eb8729c..6e5ba65fe7 100644
--- a/c/src/lib/libbsp/m68k/mvme147s/startup/bspstart.c
+++ b/c/src/lib/libbsp/m68k/mvme147s/startup/bspstart.c
@@ -39,7 +39,7 @@ char *rtems_progname;
/*
* Use the shared implementations of the following routines
*/
-
+
void bsp_postdriver_hook(void);
void bsp_libc_init( void *, uint32_t, int );
void bsp_pretasking_hook(void); /* m68k version */
@@ -74,9 +74,9 @@ void bsp_start( void )
m68k_set_vbr( &M68Kvec );
- pcc->int_base_vector = PCC_BASE_VECTOR & 0xF0;
+ pcc->int_base_vector = PCC_BASE_VECTOR & 0xF0;
/* Set the PCC int vectors base */
-
+
/* VME shared memory configuration */
/* Only the first node shares its top 128k DRAM */
@@ -86,16 +86,16 @@ void bsp_start( void )
/* Enable SIGLP interruption (see shm support) */
pcc->general_purpose_control &= 0x10;
/* Enable VME master interruptions */
-
+
if (vme_lcsr->system_controller & 0x01) {
/* the board is system controller */
- vme_lcsr->system_controller = 0x08;
+ vme_lcsr->system_controller = 0x08;
/* Make VME access round-robin */
}
-
- node_number =
- (uint8_t)
+
+ node_number =
+ (uint8_t)
(Configuration.User_multiprocessing_table->node - 1) & 0xF;
/* Get and store node ID, first node_number = 0 */
vme_gcsr->board_identification = node_number;
diff --git a/c/src/lib/libbsp/m68k/mvme162/clock/ckinit.c b/c/src/lib/libbsp/m68k/mvme162/clock/ckinit.c
index 8a775ff3f7..9f8ddabb0d 100644
--- a/c/src/lib/libbsp/m68k/mvme162/clock/ckinit.c
+++ b/c/src/lib/libbsp/m68k/mvme162/clock/ckinit.c
@@ -37,15 +37,15 @@ volatile uint32_t Clock_driver_ticks; /* ticks since initialization */
rtems_isr_entry Old_ticker;
void Clock_exit( void );
-
+
#define CLOCK_VECTOR (VBR0 * 0x10 + 0x9)
/*
* These are set by clock driver during its init
*/
-
+
rtems_device_major_number rtems_clock_major = ~0;
rtems_device_minor_number rtems_clock_minor;
-
+
/*
* ISR Handler
@@ -61,7 +61,7 @@ rtems_isr Clock_isr(rtems_vector_number vector)
rtems_clock_tick();
Clock_isrs = BSP_Configuration.microseconds_per_tick / 1000;
}
- else
+ else
Clock_isrs -= 1;
}
@@ -97,17 +97,17 @@ rtems_device_driver Clock_initialize(
)
{
Install_clock( Clock_isr );
-
+
/*
* make major/minor avail to others such as shared memory driver
*/
-
+
rtems_clock_major = major;
rtems_clock_minor = minor;
-
+
return RTEMS_SUCCESSFUL;
}
-
+
rtems_device_driver Clock_control(
rtems_device_major_number major,
rtems_device_minor_number minor,
@@ -116,15 +116,15 @@ rtems_device_driver Clock_control(
{
uint32_t isrlevel;
rtems_libio_ioctl_args_t *args = pargp;
-
+
if (args == 0)
goto done;
-
+
/*
* This is hokey, but until we get a defined interface
* to do this, it will just be this simple...
*/
-
+
if (args->command == rtems_build_name('I', 'S', 'R', ' '))
{
Clock_isr(CLOCK_VECTOR);
@@ -135,7 +135,7 @@ rtems_device_driver Clock_control(
(void) set_vector( args->buffer, CLOCK_VECTOR, 1 );
rtems_interrupt_enable( isrlevel );
}
-
+
done:
return RTEMS_SUCCESSFUL;
}
diff --git a/c/src/lib/libbsp/m68k/mvme162/console/console.c b/c/src/lib/libbsp/m68k/mvme162/console/console.c
index 6ee69d8c64..71c3d2f71e 100644
--- a/c/src/lib/libbsp/m68k/mvme162/console/console.c
+++ b/c/src/lib/libbsp/m68k/mvme162/console/console.c
@@ -41,9 +41,9 @@ rtems_isr C_Receive_ISR(rtems_vector_number vector)
if (ipend == 0x04) port = 0; /* channel B intr pending */
else if (ipend == 0x20) port = 1; /* channel A intr pending */
else return;
-
+
Ring_buffer_Add_character(&Console_Buffer[port], ZREADD(port));
-
+
if (ZREAD(port, 1) & 0x70) { /* check error stat */
ZWRITE0(port, 0x30); /* reset error */
}
@@ -57,7 +57,7 @@ rtems_device_driver console_initialize(
{
int i;
rtems_status_code status;
-
+
/*
* Initialise receiver interrupts on both ports
*/
@@ -69,7 +69,7 @@ rtems_device_driver console_initialize(
ZWRITE(i, 1, 0x10); /* int on all Rx chars or special condition */
ZWRITE(i, 9, 8); /* master interrupt enable */
}
-
+
set_vector(C_Receive_ISR, SCC_VECTOR, 1); /* install ISR for ports A and B */
mcchip->vector_base = 0;
@@ -81,28 +81,28 @@ rtems_device_driver console_initialize(
major,
(rtems_device_minor_number) 1
);
-
+
if (status != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred(status);
-
+
status = rtems_io_register_name(
"/dev/tty00",
major,
(rtems_device_minor_number) 0
);
-
+
if (status != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred(status);
-
+
status = rtems_io_register_name(
"/dev/tty01",
major,
(rtems_device_minor_number) 1
);
-
+
if (status != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred(status);
-
+
return RTEMS_SUCCESSFUL;
}
@@ -116,7 +116,7 @@ rtems_boolean char_ready(int port, char *ch)
return FALSE;
Ring_buffer_Remove_character( &Console_Buffer[port], *ch );
-
+
return TRUE;
}
@@ -127,12 +127,12 @@ rtems_boolean char_ready(int port, char *ch)
char inbyte(int port)
{
unsigned char tmp_char;
-
+
while ( !char_ready(port, &tmp_char) );
return tmp_char;
}
-/*
+/*
* This routine transmits a character out the SCC. It no longer supports
* XON/XOFF flow control.
*/
@@ -157,7 +157,7 @@ rtems_device_driver console_open(
{
return RTEMS_SUCCESSFUL;
}
-
+
/*
* Close entry point
*/
@@ -185,7 +185,7 @@ rtems_device_driver console_read(
char *buffer;
int maximum;
int count = 0;
-
+
rw_args = (rtems_libio_rw_args_t *) arg;
buffer = rw_args->buffer;
@@ -207,7 +207,7 @@ rtems_device_driver console_read(
}
/*
- * write bytes to the serial port. Stdout and stderr are the same.
+ * write bytes to the serial port. Stdout and stderr are the same.
*/
rtems_device_driver console_write(
diff --git a/c/src/lib/libbsp/m68k/mvme162/include/bsp.h b/c/src/lib/libbsp/m68k/mvme162/include/bsp.h
index 8ebe643950..1b9f06454c 100644
--- a/c/src/lib/libbsp/m68k/mvme162/include/bsp.h
+++ b/c/src/lib/libbsp/m68k/mvme162/include/bsp.h
@@ -53,30 +53,30 @@ typedef volatile struct {
unsigned char chipREV;
unsigned char gen_control;
unsigned char vector_base;
-
+
unsigned long timer_cmp_1;
unsigned long timer_cnt_1;
unsigned long timer_cmp_2;
unsigned long timer_cnt_2;
-
+
unsigned char LSB_prescaler_count;
unsigned char prescaler_clock_adjust;
unsigned char time_ctl_2;
unsigned char time_ctl_1;
-
+
unsigned char time_int_ctl_4;
unsigned char time_int_ctl_3;
unsigned char time_int_ctl_2;
unsigned char time_int_ctl_1;
-
+
unsigned char dram_err_int_ctl;
unsigned char SCC_int_ctl;
unsigned char time_ctl_4;
unsigned char time_ctl_3;
-
+
unsigned short DRAM_space_base;
unsigned short SRAM_space_base;
-
+
unsigned char DRAM_size;
unsigned char DRAM_SRAM_opt;
unsigned char SRAM_size;
@@ -96,43 +96,43 @@ typedef volatile struct {
unsigned long timer_cnt_3;
unsigned long timer_cmp_4;
unsigned long timer_cnt_4;
-
+
unsigned char bus_clk;
unsigned char PROM_acc_time_ctl;
unsigned char FLASH_acc_time_ctl;
unsigned char ABORT_int_ctl;
-
+
unsigned char RESET_ctl;
unsigned char watchdog_timer_ctl;
unsigned char acc_watchdog_time_base_sel;
unsigned char reserved2;
-
+
unsigned char DRAM_ctl;
unsigned char reserved4;
unsigned char MPU_status;
unsigned char reserved3;
-
+
unsigned long prescaler_count;
-
+
} mcchip_regs;
-
+
#define mcchip ((mcchip_regs * const) 0xFFF42000)
/*----------------------------------------------------------------*/
-/*
- * SCC Z8523(0) defines and macros
- * -------------------------------
+/*
+ * SCC Z8523(0) defines and macros
+ * -------------------------------
* Prototypes for the low-level serial io are also included here,
* because such stuff is bsp-specific (yet). The function bodies
* are in console.c
*
* NOTE from Eric Vaitl <evaitl@viasat.com>:
*
- * I dropped RTEMS into a 162FX today (the MVME162-513). The 162FX has a
- * bug in the MC2 chip (revision 1) such that the SCC data register is
- * not accessible, it has to be accessed indirectly through the SCC
- * control register.
+ * I dropped RTEMS into a 162FX today (the MVME162-513). The 162FX has a
+ * bug in the MC2 chip (revision 1) such that the SCC data register is
+ * not accessible, it has to be accessed indirectly through the SCC
+ * control register.
*/
enum {portB, portA};
@@ -177,7 +177,7 @@ typedef volatile struct {
#define MAX_SHORT_TEST_DURATION 3 /* 3 seconds */
/*
- * Define the interrupt mechanism for Time Test 27
+ * Define the interrupt mechanism for Time Test 27
*
* NOTE: We use software interrupt 0
*/
@@ -210,7 +210,7 @@ typedef volatile struct {
/*
* NOTE: Use the standard Console driver entry
*/
-
+
/*
* NOTE: Use the standard Clock driver entry
*/
diff --git a/c/src/lib/libbsp/m68k/mvme162/include/page_table.h b/c/src/lib/libbsp/m68k/mvme162/include/page_table.h
index a5685245f2..f434291de3 100644
--- a/c/src/lib/libbsp/m68k/mvme162/include/page_table.h
+++ b/c/src/lib/libbsp/m68k/mvme162/include/page_table.h
@@ -1,10 +1,13 @@
/*
* $Id$
*
- * This file was submitted by Eric Vaitl <vaitl@viasat.com> and
+ * This file was submitted by Eric Vaitl <vaitl@viasat.com> and
* supports page table initialization.
*
* $Log$
+ * Revision 1.2 1995/12/19 20:10:12 joel
+ * changes remerged after disk crash -- history lost
+ *
* Revision 1.1 1995/12/19 19:22:36 joel
* file lost in crash and re-added
*
@@ -28,16 +31,16 @@ extern void page_table_teardown(void);
extern void page_table_init(void);
extern int page_table_map(void *addr, unsigned long size, int cache_type);
-enum {
- CACHE_WRITE_THROUGH,
- CACHE_COPYBACK,
+enum {
+ CACHE_WRITE_THROUGH,
+ CACHE_COPYBACK,
CACHE_NONE_SERIALIZED,
- CACHE_NONE
+ CACHE_NONE
};
-enum {
- PTM_SUCCESS,
- PTM_BAD_ADDR,
- PTM_BAD_SIZE,
+enum {
+ PTM_SUCCESS,
+ PTM_BAD_ADDR,
+ PTM_BAD_SIZE,
PTM_BAD_CACHE,
PTM_NO_TABLE_SPACE
};
diff --git a/c/src/lib/libbsp/m68k/mvme162/startup/bspstart.c b/c/src/lib/libbsp/m68k/mvme162/startup/bspstart.c
index cc581d62cf..ec26fdf77e 100644
--- a/c/src/lib/libbsp/m68k/mvme162/startup/bspstart.c
+++ b/c/src/lib/libbsp/m68k/mvme162/startup/bspstart.c
@@ -27,7 +27,7 @@
#include <rtems/libio.h>
#include <rtems/libcsupport.h>
#include <page_table.h>
-
+
/*
* The original table from the application and our copy of it with
* some changes.
@@ -43,7 +43,7 @@ char *rtems_progname;
/*
* Use the shared implementations of the following routines
*/
-
+
void bsp_postdriver_hook(void);
void bsp_libc_init( void *, uint32_t, int );
void bsp_pretasking_hook(void); /* m68k version */
diff --git a/c/src/lib/libbsp/m68k/mvme162/startup/page_table.c b/c/src/lib/libbsp/m68k/mvme162/startup/page_table.c
index 35fd0dd6b2..2629aa053c 100644
--- a/c/src/lib/libbsp/m68k/mvme162/startup/page_table.c
+++ b/c/src/lib/libbsp/m68k/mvme162/startup/page_table.c
@@ -1,4 +1,4 @@
-/*
+/*
* $Id$
*
* This file was submitted by Eric Vaitl <vaitl@viasat.com>.
@@ -85,15 +85,15 @@ static unsigned long *table_alloc(int size){
illegal.
*/
void page_table_init(){
-
+
/* put everything in a known state */
page_table_teardown();
root_table=table_alloc(ROOT_TABLE_SIZE);
- /* First set up TTR.
+ /* First set up TTR.
base address = 0x80000000
- address mask = 0x7f
+ address mask = 0x7f
Ignore FC2 for match.
Noncachable.
Not write protected.*/
@@ -117,7 +117,7 @@ void page_table_init(){
asm volatile ("movec %0,%%cacr"
:: "d" (0x80008000));
}
-
+
void page_table_teardown(){
next_avail=(unsigned long *)BASE_TABLE_ADDR;
/* Turn off paging. Turn off the cache. Flush the cache. Tear down
@@ -156,7 +156,7 @@ int page_table_map(void *addr, unsigned long size, int cache_type){
root_index &= 0x7f;
if(root_table[root_index]){
- pointer_table =
+ pointer_table =
(unsigned long *) (root_table[root_index] & 0xfffffe00);
}else{
if(!(pointer_table=table_alloc(POINTER_TABLE_SIZE))){
@@ -164,21 +164,21 @@ int page_table_map(void *addr, unsigned long size, int cache_type){
}
root_table[root_index]=((unsigned long)pointer_table) + 0x03;
}
-
+
pointer_index=(unsigned long)addr;
pointer_index >>=18;
pointer_index &= 0x7f;
-
+
if(pointer_table[pointer_index]){
- page_table =
- (unsigned long *) (pointer_table[pointer_index] &
+ page_table =
+ (unsigned long *) (pointer_table[pointer_index] &
0xffffff00);
}else{
if(!(page_table=table_alloc(PAGE_TABLE_SIZE))){
return PTM_NO_TABLE_SPACE;
}
pointer_table[pointer_index]=
- ((unsigned long)page_table) + 0x03;
+ ((unsigned long)page_table) + 0x03;
}
page_index=(unsigned long)addr;
diff --git a/c/src/lib/libbsp/m68k/mvme162/timer/timer.c b/c/src/lib/libbsp/m68k/mvme162/timer/timer.c
index 0b08bd63a3..9072e3ce54 100644
--- a/c/src/lib/libbsp/m68k/mvme162/timer/timer.c
+++ b/c/src/lib/libbsp/m68k/mvme162/timer/timer.c
@@ -45,7 +45,7 @@ rtems_isr timerisr();
void Timer_initialize()
{
(void) set_vector( timerisr, VBR0 * 0x10 + 0x8, 0 );
-
+
Ttimer_val = 0; /* clear timer ISR count */
lcsr->vector_base |= MASK_INT; /* unmask VMEchip2 interrupts */
lcsr->intr_clear |= 0x01000000; /* clear pending interrupt */
@@ -63,7 +63,7 @@ void Timer_initialize()
/* (3 countdowns) to start/stop the timer. */
#define LEAST_VALID 10U /* Don't trust a value lower than this */
-int Read_timer()
+int Read_timer()
{
uint32_t total;
diff --git a/c/src/lib/libbsp/m68k/mvme162/tod/tod.c b/c/src/lib/libbsp/m68k/mvme162/tod/tod.c
index 7eaeac487c..4fe802ffd4 100644
--- a/c/src/lib/libbsp/m68k/mvme162/tod/tod.c
+++ b/c/src/lib/libbsp/m68k/mvme162/tod/tod.c
@@ -4,7 +4,7 @@
* Author:
* COPYRIGHT (C) 1997
* by Katsutoshi Shibuya - BU Denken Co.,Ltd. - Sapporo - JAPAN
- * ALL RIGHTS RESERVED
+ * ALL RIGHTS RESERVED
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
@@ -15,7 +15,7 @@
* RTEMS above.
*
* $Id$
- */
+ */
#include <rtems.h>
#include <tod.h>
diff --git a/c/src/lib/libbsp/m68k/mvme162/tools/sload.c b/c/src/lib/libbsp/m68k/mvme162/tools/sload.c
index 1fe0ecd421..4cb1e659de 100644
--- a/c/src/lib/libbsp/m68k/mvme162/tools/sload.c
+++ b/c/src/lib/libbsp/m68k/mvme162/tools/sload.c
@@ -54,7 +54,7 @@ int MVMEControl(u_long entry, int reset, int go);
unsigned int ahdtoi(unsigned char digit)
/* converts a hexadecimal char to an integer
- *
+ *
* entry : digit = character to convert
* : 0..15 = result
* : -1 = char is not a digit
@@ -77,7 +77,7 @@ unsigned int ahdtoi(unsigned char digit)
int issrec(char *str)
/* attempts to identify the type of Srecord string passed
- *
+ *
* entry : str = pointer to null terminated string
* returns : 0,1,2,3,5,7,8,9 for S0..S9 except S6 & S4
* : -1 = invalid header or header not found
@@ -106,7 +106,7 @@ int issrec(char *str)
int validrec(char *str)
/* Tests for a valid srecord. tests checksum & for nondigit characters
* doesn't rely on any other srecord routines.
- *
+ *
* entry : str = pointer to null terminated string
* returns : -1 = srecord contains invalid characters
* : -2 = srecord checksum is invalid
@@ -141,7 +141,7 @@ int validrec(char *str)
void hdr2str(char *sstr, char *pstr)
/* converts header record (S0) string into a plain string
- *
+ *
* entry : sstr = pointer to S0 string record
* exit : pstr = pointer to string long enough to hold string
* (caller must allocate enough space for string)
@@ -157,7 +157,7 @@ void hdr2str(char *sstr, char *pstr)
unsigned long getaddr(char *str)
/* returns the address of the srecord in str. assumes record is valid.
- *
+ *
* entry : str = pointer to srecord string
* exit : address of data, word or long.
*/
@@ -165,23 +165,23 @@ unsigned long getaddr(char *str)
unsigned long addr=0;
switch (issrec(str)) {
- case 0 :
- case 1 :
- case 5 :
+ case 0 :
+ case 1 :
+ case 5 :
case 9 : addr = ahdtoi(str[4])*0x1000 + ahdtoi(str[5])*0x100
+ ahdtoi(str[6])*0x10 + ahdtoi(str[7]);
return(addr);
- case 2 :
+ case 2 :
case 8 : addr = ahdtoi(str[4])*0x100000 + ahdtoi(str[5])*0x10000
+ ahdtoi(str[6])*0x1000 + ahdtoi(str[7])*0x100
+ ahdtoi(str[8])*0x10 + ahdtoi(str[9]);
return(addr);
- case 3 :
+ case 3 :
case 7 : addr = ahdtoi(str[4])*0x10000000 + ahdtoi(str[5])*0x1000000
+ ahdtoi(str[6])*0x100000 + ahdtoi(str[7])*0x10000
+ ahdtoi(str[8])*0x1000 + ahdtoi(str[9])*0x100
+ ahdtoi(str[10])*0x10 + ahdtoi(str[11]);
- return(addr);
+ return(addr);
default : return(-1);
}
}
@@ -189,7 +189,7 @@ unsigned long getaddr(char *str)
unsigned int datasize(char *str)
/*
* returns the number of data bytes in the srecord. assumes record is valid.
- *
+ *
* entry : str = pointer to srecord string
* exit : number of bytes of data in the data field.
*/
@@ -227,8 +227,8 @@ void usage (void)
int MVMEControl(u_long entry, int reset, int go)
/* Controls MVME-162 from other VME master:
* if entry != 0, loads it as start address
- * if go != 0, starts program execution from entry
- * if reset != 0, resets mvme162's local bus
+ * if go != 0, starts program execution from entry
+ * if reset != 0, resets mvme162's local bus
* Depends upon #define'ed GROUP_BASE_ADDRESS and BOARD_BASE_ADDRESS
* which in turn are set by the 162-BUG's ENV command.
*/
@@ -239,7 +239,7 @@ int MVMEControl(u_long entry, int reset, int go)
struct gcsr *gcsr_map;
pagesize = sysconf(_SC_PAGESIZE); /* mmap likes to be page-aligned */
-
+
if ((vme = open(vmedev, O_RDWR)) == -1) {
perror("open");
fprintf(stderr, "Cannot open vme as %s to access GCSR\n", vmedev);
@@ -258,7 +258,7 @@ int MVMEControl(u_long entry, int reset, int go)
/*
* use GCSR to start execution in MVME162
- * adjust pointer to compensate for page alignement
+ * adjust pointer to compensate for page alignement
*/
gcsr_map = (struct gcsr *)((u_long)gcsr_map + (u_long)gcsr_vme % pagesize);
@@ -283,10 +283,10 @@ main(int argc, char *argv[])
int i, j, k, result, size, line=0, lastrec=0;
long addr, tsize=0, naddr=0, blksize=0, blknum=1;
FILE *in;
- char infile[256] = "";
+ char infile[256] = "";
char vmedev[32] = "/dev/vme32d32"; /* Assume "/dev/vme32d32" */
int vme, verbose = 0, go = 0, reset = 0, havefile = 0;
-
+
/* Parse the command line */
--argc;
@@ -325,11 +325,11 @@ main(int argc, char *argv[])
}
exit(0);
}
-
+
if ((in = fopen(infile, "r")) == NULL) {
perror("open");
fprintf(stderr, "Cannot open input file %s\n", infile);
- exit(1);
+ exit(1);
}
if ((vme = open(vmedev, O_RDWR)) == -1) {
@@ -340,12 +340,12 @@ main(int argc, char *argv[])
line++;
if (validrec(inpstr) == 0) {
switch (issrec(inpstr)) {
- case 0 :
+ case 0 :
hdr2str(inpstr, hdrstr);
if (verbose) printf("HEADER string = `%s'\n", hdrstr);
lastrec=HEADER;
break;
- case 1 :
+ case 1 :
addr = getaddr(inpstr);
size = datasize(inpstr);
if (blksize == 0) {
@@ -381,7 +381,7 @@ main(int argc, char *argv[])
}
}
break;
- case 2 :
+ case 2 :
addr = getaddr(inpstr);
size = datasize(inpstr);
if (blksize == 0) {
@@ -417,7 +417,7 @@ main(int argc, char *argv[])
}
}
break;
- case 3 :
+ case 3 :
addr = getaddr(inpstr);
size = datasize(inpstr);
if (blksize == 0) {
@@ -453,7 +453,7 @@ main(int argc, char *argv[])
}
}
break;
- case 7 :
+ case 7 :
if (lastrec==DATA19){if (verbose) printf("\t$%04lX\t%lu",naddr-1,blksize);}
if (lastrec==DATA28){if (verbose) printf("\t$%06lX\t%lu",naddr-1,blksize);}
if (lastrec==DATA37){if (verbose) printf("\t$%08lX\t%lu",naddr-1,blksize);}
@@ -463,7 +463,7 @@ main(int argc, char *argv[])
printf("\nExecution address = $%08lX\n", addr);
lastrec=TERMINATOR;
break;
- case 8 :
+ case 8 :
if (lastrec==DATA19){if (verbose) printf("\t$%04lX\t%lu",naddr-1,blksize);}
if (lastrec==DATA28){if (verbose) printf("\t$%06lX\t%lu",naddr-1,blksize);}
if (lastrec==DATA37){if (verbose) printf("\t$%08lX\t%lu",naddr-1,blksize);}
@@ -473,7 +473,7 @@ main(int argc, char *argv[])
printf("\nExecution address = $%06lX\n", addr);
lastrec=TERMINATOR;
break;
- case 9 :
+ case 9 :
if (lastrec==DATA19){if (verbose) printf("\t$%04lX\t%lu",naddr-1,blksize);}
if (lastrec==DATA28){if (verbose) printf("\t$%06lX\t%lu",naddr-1,blksize);}
if (lastrec==DATA37){if (verbose) printf("\t$%08lX\t%lu",naddr-1,blksize);}
diff --git a/c/src/lib/libbsp/m68k/mvme167/clock/ckinit.c b/c/src/lib/libbsp/m68k/mvme167/clock/ckinit.c
index f152900e0a..b2576028d8 100644
--- a/c/src/lib/libbsp/m68k/mvme167/clock/ckinit.c
+++ b/c/src/lib/libbsp/m68k/mvme167/clock/ckinit.c
@@ -25,7 +25,7 @@
*
* $Id$
*/
-
+
#include <stdlib.h>
#include <bsp.h>
#include <rtems/libio.h>
@@ -59,7 +59,7 @@ rtems_device_minor_number rtems_clock_minor;
volatile uint32_t Clock_driver_ticks;
-/*
+/*
* Clock_isrs is the number of clock ISRs until the next invocation of the
* RTEMS clock tick routine. This clock tick device driver gets an interrupt
* once a millisecond and counts down until the length of time between the
@@ -104,16 +104,16 @@ rtems_isr VMEchip2_T2_isr(
char overflow; /* Content of overflow counter */
long i;
long ct; /* Number of T2 ticks per RTEMS ticks */
-
+
ct = BSP_Configuration.microseconds_per_tick / 1000;
-
+
/*
* May have missed interrupts, so should look at the overflow counter.
*/
lcsr->intr_clear |= 0x02000000; /* Clear the interrupt */
overflow = (lcsr->board_ctl >> 12) & 0xF;
lcsr->board_ctl |= 0x400; /* Reset overflow counter */
-
+
/* Attempt to protect against one more period */
if ( overflow == 0 )
overflow = 16;
@@ -128,7 +128,7 @@ rtems_isr VMEchip2_T2_isr(
/* Reset the counter */
Clock_isrs = (uint32_t)-i;
}
- else
+ else
Clock_isrs -= overflow;
}
@@ -138,7 +138,7 @@ rtems_isr VMEchip2_T2_isr(
*
* Initialize the VMEchip2 Tick Timer #2.
*
- * THE VMECHIP2 PRESCALER REGISTER IS ASSUMED TO BE SET!
+ * THE VMECHIP2 PRESCALER REGISTER IS ASSUMED TO BE SET!
* The prescaler is used by all VMEchip2 timers, including the VMEbus grant
* timeout counter, the DMAC time off timer, the DMAC timer on timer, and the
* VMEbus global timeout timer. The prescaler value is normally set by the
@@ -211,7 +211,7 @@ void clock_exit( void )
*
* Return values:
* rtems_device_driver status code
- */
+ */
rtems_device_driver Clock_initialize(
rtems_device_major_number major,
rtems_device_minor_number minor,
@@ -219,13 +219,13 @@ rtems_device_driver Clock_initialize(
)
{
VMEchip2_T2_initialize();
-
+
/*
* Make major/minor avail to others such as shared memory driver
*/
rtems_clock_major = major;
rtems_clock_minor = minor;
-
+
return RTEMS_SUCCESSFUL;
}
@@ -251,10 +251,10 @@ rtems_device_driver Clock_control(
{
uint32_t isrlevel;
rtems_libio_ioctl_args_t *args = pargp;
-
+
if ( args == 0 )
goto done;
-
+
/*
* This is hokey, but until we get a defined interface
* to do this, it will just be this simple...
@@ -269,7 +269,7 @@ rtems_device_driver Clock_control(
set_vector( args->buffer, CLOCK_VECTOR, 1 );
rtems_interrupt_enable( isrlevel );
}
-
+
done:
return RTEMS_SUCCESSFUL;
}
diff --git a/c/src/lib/libbsp/m68k/mvme167/console/console-recording.h b/c/src/lib/libbsp/m68k/mvme167/console/console-recording.h
index 81ea4461a9..9aa0d597b8 100644
--- a/c/src/lib/libbsp/m68k/mvme167/console/console-recording.h
+++ b/c/src/lib/libbsp/m68k/mvme167/console/console-recording.h
@@ -5,7 +5,7 @@
* found in the file LICENSE in this distribution or at
* http://www.rtems.com/license/LICENSE.
*/
-
+
/* CD2401 CONSOLE DRIVER DEBUG INFO RECORDING */
#ifdef CD2401_RECORD_DEBUG_INFO
@@ -243,8 +243,8 @@ int cd2401_get_record_size(
/* Not the best way to do this */
return size + 4;
}
-
-
+
+
void cd2401_record_write_info(
int len,
const char * buf,
@@ -252,9 +252,9 @@ void cd2401_record_write_info(
)
{
int max_length;
-
+
max_length = (len < CD2401_DEBUG_CHAR_BUFSIZE ) ? len : CD2401_DEBUG_CHAR_BUFSIZE;
-
+
memset( &(cd2401_debug_buffer[cd2401_debug_index]), '\0', sizeof( struct cd2401_debug_info ) );
cd2401_debug_buffer[cd2401_debug_index].discriminant = CD2401_WRITE_INFO;
cd2401_debug_buffer[cd2401_debug_index].record_size =
@@ -262,7 +262,7 @@ void cd2401_record_write_info(
cd2401_debug_buffer[cd2401_debug_index].u.write_info.length = len;
memcpy ( &(cd2401_debug_buffer[cd2401_debug_index].u.write_info.buffer), buf, max_length );
cd2401_debug_buffer[cd2401_debug_index].u.write_info.dmabuf = dmabuf;
-
+
cd2401_debug_index = (cd2401_debug_index + 1 ) % CD2401_DEBUG_BUFFER_SIZE;
}
@@ -274,7 +274,7 @@ void cd2401_record_tx_isr_info(
unsigned char final_ier,
uint8_t txEmpty
)
-{
+{
memset( &(cd2401_debug_buffer[cd2401_debug_index]), '\0', sizeof( struct cd2401_debug_info ) );
cd2401_debug_buffer[cd2401_debug_index].discriminant = CD2401_TX_ISR_INFO;
cd2401_debug_buffer[cd2401_debug_index].record_size =
@@ -284,7 +284,7 @@ void cd2401_record_tx_isr_info(
cd2401_debug_buffer[cd2401_debug_index].u.tx_isr_info.initial_ier = initial_ier;
cd2401_debug_buffer[cd2401_debug_index].u.tx_isr_info.final_ier = final_ier;
cd2401_debug_buffer[cd2401_debug_index].u.tx_isr_info.txEmpty = txEmpty;
-
+
cd2401_debug_index = (cd2401_debug_index + 1 ) % CD2401_DEBUG_BUFFER_SIZE;
}
@@ -308,7 +308,7 @@ void cd2401_record_tx_isr_spurious_info(
cd2401_debug_buffer[cd2401_debug_index].u.tx_isr_spurious_info.final_ier = final_ier;
cd2401_debug_buffer[cd2401_debug_index].u.tx_isr_spurious_info.spurdev = spur_dev;
cd2401_debug_buffer[cd2401_debug_index].u.tx_isr_spurious_info.spurcount = spur_cnt;
-
+
cd2401_debug_index = (cd2401_debug_index + 1 ) % CD2401_DEBUG_BUFFER_SIZE;
}
@@ -332,7 +332,7 @@ void cd2401_record_tx_isr_buserr_info(
cd2401_debug_buffer[cd2401_debug_index].u.tx_isr_buserr_info.buserr = buserr;
cd2401_debug_buffer[cd2401_debug_index].u.tx_isr_buserr_info.type = buserr_type;
cd2401_debug_buffer[cd2401_debug_index].u.tx_isr_buserr_info.addr = buserr_addr;
-
+
cd2401_debug_index = (cd2401_debug_index + 1 ) % CD2401_DEBUG_BUFFER_SIZE;
}
@@ -344,16 +344,16 @@ void cd2401_record_rx_isr_info(
)
{
int max_length;
-
+
max_length = (total < CD2401_DEBUG_CHAR_BUFSIZE ) ? total : CD2401_DEBUG_CHAR_BUFSIZE;
-
+
memset( &(cd2401_debug_buffer[cd2401_debug_index]), '\0', sizeof( struct cd2401_debug_info ) );
cd2401_debug_buffer[cd2401_debug_index].discriminant = CD2401_RX_ISR_INFO;
cd2401_debug_buffer[cd2401_debug_index].record_size =
cd2401_get_record_size( sizeof( struct cd2401_rx_isr_info ) );
cd2401_debug_buffer[cd2401_debug_index].u.rx_isr_info.length = max_length;
memcpy ( &(cd2401_debug_buffer[cd2401_debug_index].u.rx_isr_info.buffer), buffer, max_length );
-
+
cd2401_debug_index = (cd2401_debug_index + 1 ) % CD2401_DEBUG_BUFFER_SIZE;
}
@@ -373,7 +373,7 @@ void cd2401_record_rx_isr_spurious_info(
cd2401_debug_buffer[cd2401_debug_index].u.rx_isr_spurious_info.status = status;
cd2401_debug_buffer[cd2401_debug_index].u.rx_isr_spurious_info.spurdev = spur_dev;
cd2401_debug_buffer[cd2401_debug_index].u.rx_isr_spurious_info.spurcount = spur_cnt;
-
+
cd2401_debug_index = (cd2401_debug_index + 1 ) % CD2401_DEBUG_BUFFER_SIZE;
}
@@ -391,7 +391,7 @@ void cd2401_record_re_isr_spurious_info(
cd2401_debug_buffer[cd2401_debug_index].u.re_isr_spurious_info.channel = ch;
cd2401_debug_buffer[cd2401_debug_index].u.re_isr_spurious_info.spurdev = spur_dev;
cd2401_debug_buffer[cd2401_debug_index].u.re_isr_spurious_info.spurcount = spur_cnt;
-
+
cd2401_debug_index = (cd2401_debug_index + 1 ) % CD2401_DEBUG_BUFFER_SIZE;
}
@@ -409,7 +409,7 @@ void cd2401_record_modem_isr_spurious_info(
cd2401_debug_buffer[cd2401_debug_index].u.modem_isr_spurious_info.channel = ch;
cd2401_debug_buffer[cd2401_debug_index].u.modem_isr_spurious_info.spurdev = spur_dev;
cd2401_debug_buffer[cd2401_debug_index].u.modem_isr_spurious_info.spurcount = spur_cnt;
-
+
cd2401_debug_index = (cd2401_debug_index + 1 ) % CD2401_DEBUG_BUFFER_SIZE;
}
@@ -425,7 +425,7 @@ void cd2401_record_first_open_info(
cd2401_get_record_size( sizeof( struct cd2401_first_open_info ) );
cd2401_debug_buffer[cd2401_debug_index].u.first_open_info.channel = ch;
cd2401_debug_buffer[cd2401_debug_index].u.first_open_info.init_count = init_count;
-
+
cd2401_debug_index = (cd2401_debug_index + 1 ) % CD2401_DEBUG_BUFFER_SIZE;
}
@@ -441,7 +441,7 @@ void cd2401_record_last_close_info(
cd2401_get_record_size( sizeof( struct cd2401_last_close_info ) );
cd2401_debug_buffer[cd2401_debug_index].u.last_close_info.channel = ch;
cd2401_debug_buffer[cd2401_debug_index].u.last_close_info.init_count = init_count;
-
+
cd2401_debug_index = (cd2401_debug_index + 1 ) % CD2401_DEBUG_BUFFER_SIZE;
}
@@ -455,7 +455,7 @@ void cd2401_record_start_remote_tx_info(
cd2401_debug_buffer[cd2401_debug_index].record_size =
cd2401_get_record_size( sizeof( struct cd2401_start_remote_tx_info ) );
cd2401_debug_buffer[cd2401_debug_index].u.start_remote_tx_info.channel = ch;
-
+
cd2401_debug_index = (cd2401_debug_index + 1 ) % CD2401_DEBUG_BUFFER_SIZE;
}
@@ -469,12 +469,12 @@ void cd2401_record_stop_remote_tx_info(
cd2401_debug_buffer[cd2401_debug_index].record_size =
cd2401_get_record_size( sizeof( struct cd2401_stop_remote_tx_info ) );
cd2401_debug_buffer[cd2401_debug_index].u.stop_remote_tx_info.channel = ch;
-
+
cd2401_debug_index = (cd2401_debug_index + 1 ) % CD2401_DEBUG_BUFFER_SIZE;
}
-void cd2401_record_set_attributes_info(
+void cd2401_record_set_attributes_info(
int minor,
uint8_t need_reinit,
uint8_t csize,
@@ -526,7 +526,7 @@ void cd2401_record_set_attributes_info(
cd2401_debug_buffer[cd2401_debug_index].u.set_attribute_info.rx_period = rx_period;
cd2401_debug_buffer[cd2401_debug_index].u.set_attribute_info.out_baud = out_baud;
cd2401_debug_buffer[cd2401_debug_index].u.set_attribute_info.in_baud = in_baud;
-
+
cd2401_debug_index = (cd2401_debug_index + 1 ) % CD2401_DEBUG_BUFFER_SIZE;
}
@@ -544,7 +544,7 @@ void cd2401_record_drain_output_info(
cd2401_debug_buffer[cd2401_debug_index].u.drain_output_info.txEmpty = txEmpty;
cd2401_debug_buffer[cd2401_debug_index].u.drain_output_info.own_buf_A = own_buf_A;
cd2401_debug_buffer[cd2401_debug_index].u.drain_output_info.own_buf_B = own_buf_B;
-
+
cd2401_debug_index = (cd2401_debug_index + 1 ) % CD2401_DEBUG_BUFFER_SIZE;
}
@@ -564,7 +564,7 @@ void cd2401_record_delay_info(
cd2401_debug_buffer[cd2401_debug_index].u.delay_info.end = end;
cd2401_debug_buffer[cd2401_debug_index].u.delay_info.current = current;
cd2401_debug_buffer[cd2401_debug_index].u.delay_info.loop_count = loop_count;
-
+
cd2401_debug_index = (cd2401_debug_index + 1 ) % CD2401_DEBUG_BUFFER_SIZE;
}
diff --git a/c/src/lib/libbsp/m68k/mvme167/console/console.c b/c/src/lib/libbsp/m68k/mvme167/console/console.c
index a68737c342..3d760e14a8 100644
--- a/c/src/lib/libbsp/m68k/mvme167/console/console.c
+++ b/c/src/lib/libbsp/m68k/mvme167/console/console.c
@@ -224,16 +224,16 @@ rtems_isr_entry Prev_modem_isr; /* Previous modem/timer isr */
{
unsigned long i = 20000; /* In case clock is off */
rtems_interval ticks_per_second, start_ticks, end_ticks, current_ticks;
-
+
rtems_clock_get( RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticks_per_second );
rtems_clock_get( RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &start_ticks );
end_ticks = start_ticks + delay;
-
+
do {
rtems_clock_get(RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &current_ticks);
} while ( --i && (current_ticks <= end_ticks) );
-
- CD2401_RECORD_DELAY_INFO(( start_ticks, end_ticks, current_ticks, i ));
+
+ CD2401_RECORD_DELAY_INFO(( start_ticks, end_ticks, current_ticks, i ));
}
@@ -744,7 +744,7 @@ int cd2401_firstOpen(
}
CD2401_RECORD_FIRST_OPEN_INFO(( minor, Init_count ));
-
+
rtems_interrupt_enable (level);
/* Return something */
@@ -771,7 +771,7 @@ int cd2401_lastClose(
rtems_interrupt_level level;
rtems_interrupt_disable (level);
-
+
/* Mark that the channel is no longer is use */
CD2401_Channel_Info[minor].tty = NULL;
@@ -787,7 +787,7 @@ int cd2401_lastClose(
}
CD2401_RECORD_LAST_CLOSE_INFO(( minor, Init_count ));
-
+
rtems_interrupt_enable (level);
/* return something */
@@ -1004,14 +1004,14 @@ int cd2401_setAttributes(
cd2401->car = minor; /* Select channel */
read_enabled = cd2401->csr & 0x80 ? TRUE : FALSE;
-
+
if ( (t->c_cflag & CREAD ? TRUE : FALSE ) != read_enabled ) {
/* Read enable status is changing */
need_reinitialization = TRUE;
}
-
- if ( need_reinitialization ) {
- /*
+
+ if ( need_reinitialization ) {
+ /*
* Could not find a way to test whether the CD2401 was done transmitting.
* The TxEmpty interrupt does not seem to indicate that the FIFO is empty
* in DMA mode. So, just wait a while for output to drain. May not be
@@ -1019,7 +1019,7 @@ int cd2401_setAttributes(
* 9600 bsp)...
*/
cd2401_udelay( 2000L );
-
+
/* Clear channel */
cd2401_chan_cmd (minor, 0x40, 1);
@@ -1033,11 +1033,11 @@ int cd2401_setAttributes(
cd2401->cor6 = igncr | icrnl | inlcr | ignbrk | brkint | parmrk | inpck;
cd2401->cor7 = istrip; /* No LNext; ignore XON/XOFF if frame error; no tx translations */
/* Special char 1: XON character */
- cd2401->u1.async.schr1 = t->c_cc[VSTART];
+ cd2401->u1.async.schr1 = t->c_cc[VSTART];
/* special char 2: XOFF character */
cd2401->u1.async.schr2 = t->c_cc[VSTOP];
-
- /*
+
+ /*
* Special chars 3 and 4, char range, LNext, RFAR[1..4] and CRC
* are unused, left as is.
*/
@@ -1047,10 +1047,10 @@ int cd2401_setAttributes(
cd2401->rcor = (unsigned char)(rx_period >> 8); /* no DPLL */
cd2401->tbpr = (unsigned char)tx_period;
cd2401->tcor = (tx_period >> 3) & 0xE0; /* no x1 ext clk, no loopback */
-
+
/* Timeout for 4 chars at 9600, 8 bits per char, 1 stop bit */
cd2401->u2.w.rtpr = 0x04; /* NEED TO LOOK AT THIS LINE! */
-
+
if ( t->c_cflag & CREAD ) {
/* Re-initialize channel, enable rx and tx */
cd2401_chan_cmd (minor, 0x2A, 1);
@@ -1060,8 +1060,8 @@ int cd2401_setAttributes(
/* Re-initialize channel, enable tx, disable rx */
cd2401_chan_cmd (minor, 0x29, 1);
}
- }
-
+ }
+
CD2401_RECORD_SET_ATTRIBUTES_INFO(( minor, need_reinitialization, csize,
cstopb, parodd, parenb, ignpar, inpck,
hw_flow_ctl, sw_flow_ctl, extra_flow_ctl,
@@ -1070,11 +1070,11 @@ int cd2401_setAttributes(
out_baud, in_baud ));
rtems_interrupt_enable (level);
-
- /*
+
+ /*
* Looks like the CD2401 needs time to settle after initialization. Give it
* 10 ms. I don't really believe it, but if output resumes to quickly after
- * this call, the first few characters are not right.
+ * this call, the first few characters are not right.
*/
if ( need_reinitialization )
cd2401_udelay( 10000L );
@@ -1117,7 +1117,7 @@ int cd2401_startRemoteTx(
cd2401->stcr = 0x01; /* Send SCHR1 ahead of chars in FIFO */
CD2401_RECORD_START_REMOTE_TX_INFO(( minor ));
-
+
rtems_interrupt_enable (level);
/* Return something */
@@ -1256,11 +1256,11 @@ int cd2401_drainOutput(
CD2401_RECORD_DRAIN_OUTPUT_INFO(( CD2401_Channel_Info[minor].txEmpty,
CD2401_Channel_Info[minor].own_buf_A,
CD2401_Channel_Info[minor].own_buf_B ));
-
- while( ! (CD2401_Channel_Info[minor].txEmpty &&
+
+ while( ! (CD2401_Channel_Info[minor].txEmpty &&
CD2401_Channel_Info[minor].own_buf_A &&
CD2401_Channel_Info[minor].own_buf_B) );
-
+
/* Return something */
return RTEMS_SUCCESSFUL;
}
@@ -1291,13 +1291,13 @@ int _167Bug_pollRead(
unsigned char c;
rtems_interrupt_level previous_level;
- /*
+ /*
* Redirection of .INSTAT does not work: 167-Bug crashes.
* Switch the input stream to the specified port.
* Make sure this is atomic code.
*/
rtems_interrupt_disable( previous_level );
-
+
asm volatile( "movew %1, -(%%sp)\n\t"/* Channel */
"trap #15\n\t" /* Trap to 167Bug */
".short 0x61\n\t" /* Code for .REDIR_I */
@@ -1320,7 +1320,7 @@ int _167Bug_pollRead(
: "=d" (c) : );
rtems_interrupt_enable( previous_level );
-
+
return (int)c;
}
@@ -1409,7 +1409,7 @@ rtems_status_code do_poll_read(
* Output characters through 167Bug. Returns only once every character has
* been sent.
*
- * CR is transmitted AFTER a LF on output.
+ * CR is transmitted AFTER a LF on output.
*
* Input parameters:
* major - ignored. Should be the major number for this driver.
@@ -1453,8 +1453,8 @@ void _BSP_output_char(char c)
{
rtems_device_minor_number printk_minor;
char cr ='\r';
-
- /*
+
+ /*
* Can't rely on console_initialize having been called before this function
* is used.
*/
@@ -1463,13 +1463,13 @@ void _BSP_output_char(char c)
printk_minor = (nvram->console_printk_port & 0x30) >> 4;
else
printk_minor = PRINTK_MINOR;
-
+
_167Bug_pollWrite(printk_minor, &c, 1);
if ( c == '\n' )
_167Bug_pollWrite(printk_minor, &cr, 1);
}
-
+
/*
***************
* BOILERPLATE *
@@ -1496,7 +1496,7 @@ rtems_device_driver console_initialize(
if ( NVRAM_CONFIGURE ) {
/* J1-4 is on, use NVRAM info for configuration */
console_minor = nvram->console_printk_port & 0x03;
-
+
if ( nvram->console_mode & 0x01 )
/* termios */
rtems_termios_initialize ();
@@ -1559,7 +1559,7 @@ rtems_device_driver console_open(
NULL, /* startRemoteTx */
0 /* outputUsesInterrupts */
};
-
+
static const rtems_termios_callbacks intrCallbacks = {
cd2401_firstOpen, /* firstOpen */
cd2401_lastClose, /* lastClose */
@@ -1572,7 +1572,7 @@ rtems_device_driver console_open(
};
if ( NVRAM_CONFIGURE )
- /* J1-4 is on, use NVRAM info for configuration */
+ /* J1-4 is on, use NVRAM info for configuration */
if ( nvram->console_mode & 0x01 )
/* termios */
if ( nvram->console_mode & 0x02 )
@@ -1612,7 +1612,7 @@ rtems_device_driver console_close(
)
{
if ( NVRAM_CONFIGURE ) {
- /* J1-4 is on, use NVRAM info for configuration */
+ /* J1-4 is on, use NVRAM info for configuration */
if ( nvram->console_mode & 0x01 )
/* termios */
return rtems_termios_close (arg);
@@ -1642,7 +1642,7 @@ rtems_device_driver console_read(
)
{
if ( NVRAM_CONFIGURE ) {
- /* J1-4 is on, use NVRAM info for configuration */
+ /* J1-4 is on, use NVRAM info for configuration */
if ( nvram->console_mode & 0x01 )
/* termios */
return rtems_termios_read (arg);
@@ -1672,7 +1672,7 @@ rtems_device_driver console_write(
)
{
if ( NVRAM_CONFIGURE ) {
- /* J1-4 is on, use NVRAM info for configuration */
+ /* J1-4 is on, use NVRAM info for configuration */
if ( nvram->console_mode & 0x01 )
/* termios */
return rtems_termios_write (arg);
@@ -1702,7 +1702,7 @@ rtems_device_driver console_control(
)
{
if ( NVRAM_CONFIGURE ) {
- /* J1-4 is on, use NVRAM info for configuration */
+ /* J1-4 is on, use NVRAM info for configuration */
if ( nvram->console_mode & 0x01 )
/* termios */
return rtems_termios_ioctl (arg);
diff --git a/c/src/lib/libbsp/m68k/mvme167/fatal/bspfatal.c b/c/src/lib/libbsp/m68k/mvme167/fatal/bspfatal.c
index afdd124382..b93a08fee1 100644
--- a/c/src/lib/libbsp/m68k/mvme167/fatal/bspfatal.c
+++ b/c/src/lib/libbsp/m68k/mvme167/fatal/bspfatal.c
@@ -36,7 +36,7 @@ static int mystrcat(
)
{
int i;
-
+
for ( i = 0; ( *destination++ = *source++) != '\0'; i++ );
return i;
}
@@ -45,7 +45,7 @@ static int mystrcat(
/*
* bsp_fatal_error_occurred
*
- * Called when rtems_fatal_error_occurred() is called. Returns control to
+ * Called when rtems_fatal_error_occurred() is called. Returns control to
* 167Bug. The _Internal_error_Occurred() function has already saved the
* parameters in Internal_errors_What_happened. If the function returns,
* RTEMS will halt the CPU.
@@ -72,33 +72,33 @@ User_extensions_routine bsp_fatal_error_occurred(
char index; /* First byte is number of chars in strbuf */
char strbuf[254]; /* In case count is bumped up by one by 167Bug */
} my_p_str;
-
+
my_p_str.index = 0;
my_p_str.index += mystrcat(
my_p_str.strbuf + my_p_str.index,
"\r\nRTEMS Fatal Error Occurred:\r\n the_source = " );
-
+
switch ( the_source ) {
case INTERNAL_ERROR_CORE:
- my_p_str.index += mystrcat(
+ my_p_str.index += mystrcat(
my_p_str.strbuf + my_p_str.index,
"INTERNAL_ERROR_CORE\r\n is_internal = " );
break;
-
+
case INTERNAL_ERROR_RTEMS_API:
- my_p_str.index += mystrcat(
+ my_p_str.index += mystrcat(
my_p_str.strbuf + my_p_str.index,
"INTERNAL_ERROR_RTEMS_API\r\n is_internal = " );
break;
-
+
case INTERNAL_ERROR_POSIX_API:
- my_p_str.index += mystrcat(
+ my_p_str.index += mystrcat(
my_p_str.strbuf + my_p_str.index,
"INTERNAL_ERROR_POSIX_API\r\n is_internal = " );
break;
-
+
default:
- my_p_str.index += mystrcat(
+ my_p_str.index += mystrcat(
my_p_str.strbuf + my_p_str.index,
"UNKNOWN\r\n is_internal = " );
break;
@@ -106,22 +106,22 @@ User_extensions_routine bsp_fatal_error_occurred(
if ( is_internal )
my_p_str.index += mystrcat(
- my_p_str.strbuf + my_p_str.index,
+ my_p_str.strbuf + my_p_str.index,
"TRUE\r\n the_error = 0x|10,8|\r\n" );
else
- my_p_str.index += mystrcat(
- my_p_str.strbuf + my_p_str.index,
+ my_p_str.index += mystrcat(
+ my_p_str.strbuf + my_p_str.index,
"FALSE\r\n the_error = 0x|10,8|\r\n" );
-
+
lcsr->intr_ena = 0; /* disable interrupts */
m68k_set_vbr(0xFFE00000); /* restore 167Bug vectors */
-
+
asm volatile( "movel %0, -(%%a7)\n\t"
"pea (%%a7)\n\t"
"pea (%1)\n\t"
"trap #15\n\t" /* trap to 167Bug (.WRITDLN) */
".short 0x25\n\t"
"trap #15\n\t"
- ".short 0x63"
+ ".short 0x63"
:: "d" (the_error), "a" (&my_p_str) );
}
diff --git a/c/src/lib/libbsp/m68k/mvme167/include/bsp.h b/c/src/lib/libbsp/m68k/mvme167/include/bsp.h
index bc93a8e58b..a1aa2727c7 100644
--- a/c/src/lib/libbsp/m68k/mvme167/include/bsp.h
+++ b/c/src/lib/libbsp/m68k/mvme167/include/bsp.h
@@ -43,7 +43,7 @@ extern "C" {
#define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 4
#define CONFIGURE_INTERRUPT_STACK_MEMORY (4 * 1024)
-
+
#include <mvme16x_hw.h>
/* GCSR is in mvme16x_hw.h */
@@ -153,7 +153,7 @@ typedef volatile struct memc040_regs_ {
* nearly identical to the ones of the MEMC040, and the memc040_X structures
* can be used to read those first eight registers.
*/
-
+
/*
* Representation of the Cirrus Logic CL-CD2401 Multi-Protocol Controller
@@ -189,7 +189,7 @@ typedef volatile struct cd2401_regs_ {
unsigned char rfar2; /* 0xFFF4501E - Receive Frame Address 2 */
unsigned char rfar1; /* 0xFFF4501F - Receive Frame Address 1 */
} sync;
- } u1;
+ } u1;
unsigned char reserved4[2];
unsigned char scrh; /* 0xFFF45022 - Special Character Range High */
unsigned char scrl; /* 0xFFF45023 - Special Character Range Low */
@@ -263,7 +263,7 @@ typedef volatile struct cd2401_regs_ {
unsigned char risrh; /* 0xFFF45088 - Receive Interrupt Status High */
unsigned char risrl; /* 0xFFF45089 - Receive Interrupt Status Low */
} b;
- } u5;
+ } u5;
unsigned char tisr; /* 0xFFF4508A - Transmit Interrupt Status */
unsigned char misr; /* 0xFFF4508B - Modem/Timer Interrupt Status */
unsigned char reserved13[2];
@@ -334,7 +334,7 @@ m68k_isr_entry set_vector(
/*
* NOTE: Use the standard Console driver entry
*/
-
+
/*
* NOTE: Use the standard Clock driver entry
*/
@@ -365,7 +365,7 @@ extern m68k_isr_entry M68Kvec[]; /* vector table address */
#define MAX_SHORT_TEST_DURATION 3 /* 3 seconds */
/*
- * Define the interrupt mechanism for Time Test 27
+ * Define the interrupt mechanism for Time Test 27
*
* NOTE: We use software interrupt 0
*/
diff --git a/c/src/lib/libbsp/m68k/mvme167/include/fatal.h b/c/src/lib/libbsp/m68k/mvme167/include/fatal.h
index ae5e0cf50f..ee04905486 100644
--- a/c/src/lib/libbsp/m68k/mvme167/include/fatal.h
+++ b/c/src/lib/libbsp/m68k/mvme167/include/fatal.h
@@ -8,7 +8,7 @@
*
* $Id$
*/
-
+
#include <rtems/score/interr.h>
#include <rtems/score/userext.h>
diff --git a/c/src/lib/libbsp/m68k/mvme167/include/page_table.h b/c/src/lib/libbsp/m68k/mvme167/include/page_table.h
index e831f21350..eb463ab146 100644
--- a/c/src/lib/libbsp/m68k/mvme167/include/page_table.h
+++ b/c/src/lib/libbsp/m68k/mvme167/include/page_table.h
@@ -1,6 +1,6 @@
/* page_table.h
*
- * This file was submitted by Eric Vaitl <vaitl@viasat.com> and
+ * This file was submitted by Eric Vaitl <vaitl@viasat.com> and
* supports page table initialization.
*
* For now, we only use the transparent translation registers. Page tables
@@ -27,17 +27,17 @@
void page_table_teardown( void );
void page_table_init( rtems_configuration_table *config_table );
-enum {
- CACHE_WRITE_THROUGH,
- CACHE_COPYBACK,
+enum {
+ CACHE_WRITE_THROUGH,
+ CACHE_COPYBACK,
CACHE_NONE_SERIALIZED,
- CACHE_NONE
+ CACHE_NONE
};
-enum {
- PTM_SUCCESS,
- PTM_BAD_ADDR,
- PTM_BAD_SIZE,
+enum {
+ PTM_SUCCESS,
+ PTM_BAD_ADDR,
+ PTM_BAD_SIZE,
PTM_BAD_CACHE,
PTM_NO_TABLE_SPACE
};
diff --git a/c/src/lib/libbsp/m68k/mvme167/network/network.c b/c/src/lib/libbsp/m68k/mvme167/network/network.c
index 73ec6fc1d3..8ab46e8ee9 100644
--- a/c/src/lib/libbsp/m68k/mvme167/network/network.c
+++ b/c/src/lib/libbsp/m68k/mvme167/network/network.c
@@ -5,12 +5,12 @@
#define KERNEL
-/*
+/*
* Selectively define to debug the network driver. If you define any of these
* you must run with polled console I/O.
*/
-
-/*
+
+/*
#define DBG_ADD_CMD
#define DBG_WAIT
#define DBG_SEND
@@ -261,10 +261,10 @@ static i596_scp * uti596_scp_alloc(
#endif
return sc->pScp;
}
-
+
/* allocate enough memory for the Scp block to be aligned on 16 byte boundary */
malloc_16byte_aligned( (void *)&(sc->base_scp), (void *)&(sc->pScp), sizeof( i596_scp ) );
-
+
#ifdef DBG_MEM
printk(("uti596_scp_alloc: Scp base address is %p\n", sc->base_scp))
printk(("uti596_scp_alloc: Scp aligned address is : %p\n",sc->pScp))
@@ -276,9 +276,9 @@ static i596_scp * uti596_scp_alloc(
/*
* uti596_writePortFunction
- *
+ *
* Write the command into the PORT.
- *
+ *
* Input parameters:
* addr - 16-byte aligned address to write into the PORT.
* cmd - 4-bit cmd to write into the PORT
@@ -286,7 +286,7 @@ static i596_scp * uti596_scp_alloc(
* Output parameters: NONE
*
* Return value: NONE
- *
+ *
* The Motorola manual swapped the high and low registers.
*/
RTEMS_INLINE_ROUTINE void uti596_writePortFunction(
@@ -301,9 +301,9 @@ RTEMS_INLINE_ROUTINE void uti596_writePortFunction(
/*
* uti596_portReset
- *
+ *
* Issue a port Reset to the uti596
- *
+ *
* Input parameters: NONE
*
* Output parameters: NONE
@@ -338,14 +338,14 @@ static unsigned long uti596_portSelfTest(
)
{
rtems_interval ticks_per_second, start_ticks, end_ticks;
-
+
stp->results = 0xFFFFFFFF;
uti596_writePortFunction( stp, UTI596_SELFTEST_PORT_FUNCTION );
rtems_clock_get(RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticks_per_second);
rtems_clock_get(RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &start_ticks);
- end_ticks = start_ticks + ticks_per_second;
-
+ end_ticks = start_ticks + ticks_per_second;
+
do {
if( stp->results != 0xFFFFFFFF )
break;
@@ -370,7 +370,7 @@ static unsigned long uti596_portSelfTest(
}
#endif
-
+
/* currently unused by RTEMS */
#if 0
/*
@@ -393,14 +393,14 @@ static int uti596_portDump(
)
{
rtems_interval ticks_per_second, start_ticks, end_ticks;
-
+
dp->dump_status = 0;
uti596_writePortFunction( dp, UTI596_DUMP_PORT_FUNCTION );
rtems_clock_get(RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticks_per_second);
rtems_clock_get(RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &start_ticks);
- end_ticks = start_ticks + ticks_per_second;
-
+ end_ticks = start_ticks + ticks_per_second;
+
do {
if( dp->dump_status != 0xA006 )
break;
@@ -428,7 +428,7 @@ static int uti596_portDump(
* uti596_wait
*
* Wait for a certain condition.
- *
+ *
* Input parameters:
* sc - pointer to the uti596_softc struct
* wait_type - UTI596_NO_WAIT
@@ -454,7 +454,7 @@ static int uti596_wait(
end_ticks = start_ticks + ticks_per_second;
switch( waitType ) {
-
+
case UTI596_NO_WAIT:
return 0;
@@ -465,9 +465,9 @@ static int uti596_wait(
break;
else
rtems_clock_get(RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &start_ticks);
-
+
} while (start_ticks <= end_ticks);
-
+
if( (sc->scb.command != 0) || (start_ticks > end_ticks) ) {
printf("i82596 timed out with status %x, cmd %x.\n",
sc->scb.status, sc->scb.command);
@@ -475,7 +475,7 @@ static int uti596_wait(
}
else
return 0;
-
+
case UTI596_WAIT_FOR_INITIALIZATION:
do {
if( !sc->iscp.busy )
@@ -504,7 +504,7 @@ static int uti596_wait(
else
rtems_clock_get(RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &start_ticks);
} while (start_ticks <= end_ticks);
-
+
if (start_ticks > end_ticks ) {
#ifdef DBG_WAIT
printk(("uti596_initMem: timed out - STAT_C not obtained\n" ))
@@ -520,14 +520,14 @@ static int uti596_wait(
}
return -1;
}
-
-
+
+
/*
* uti596_issueCA
*
* Issue a Channel Attention command. Possibly wait for the
* command to start or complete.
- *
+ *
* Input parameters:
* sc - pointer to the uti596_softc
* wait_type - UTI596_NO_WAIT
@@ -546,21 +546,21 @@ static int uti596_issueCA(
{
/* Issue Channel Attention */
i82596->chan_attn = 0x00000000;
-
+
return (uti596_wait ( sc, waitType ));
}
/*
* uti596_addCmd
- *
+ *
* Add a uti596_cmd onto the end of the CBL command chain,
* or to the start if the chain is empty.
- *
+ *
* Input parameters:
* pCmd - a pointer to the command to be added.
*
- * Output parameters: NONE
+ * Output parameters: NONE
*
* Return value: NONE
*/
@@ -580,7 +580,7 @@ static void uti596_addCmd(
pCmd->next = I596_NULL;
_ISR_Disable(level);
-
+
if (uti596_softc.pCmdHead == I596_NULL) {
uti596_softc.pCmdHead = uti596_softc.pCmdTail = uti596_softc.scb.pCmd = pCmd;
uti596_softc.scb.cmd_pointer = word_swap ((unsigned long)pCmd);
@@ -588,7 +588,7 @@ static void uti596_addCmd(
uti596_wait ( &uti596_softc, UTI596_WAIT_FOR_CU_ACCEPT );
uti596_softc.scb.command = CUC_START;
uti596_issueCA ( &uti596_softc, UTI596_NO_WAIT );
-
+
_ISR_Enable(level);
}
else {
@@ -607,10 +607,10 @@ static void uti596_addCmd(
/*
* uti596_addPolledCmd
- *
+ *
* Add a single uti596_cmd to the end of the command block list
* for processing, send a CU_START and wait for its acceptance
- *
+ *
* Input parameters:
* sc - a pointer to the uti596_softc struct
*
@@ -653,11 +653,11 @@ void uti596_addPolledCmd(
#if 0
/*
* uti596_CU_dump
- *
+ *
* Dump the LANC 82596 registers
* The outcome is the same as the portDump() but executed
* via the CU instead of via a PORT access.
- *
+ *
* Input parameters:
* drp - a pointer to a i596_dump_result structure.
*
@@ -681,10 +681,10 @@ static void uti596_CU_dump ( i596_dump_result * drp)
/*
* uti596_dump_scb
- *
+ *
* Dump the system control block
* This function expands to nothing when using interrupt driven I/O
- *
+ *
* Input parameters: NONE
*
* Output parameters: NONE
@@ -735,7 +735,7 @@ static int uti596_setScpAndScb(
sc->pCmdHead = sc->scb.pCmd = I596_NULL; /* all 1's */
uti596_writePortFunction( sc->pScp, UTI596_SCP_PORT_FUNCTION );
-
+
/* Issue CA: pass the scb address to the 596 */
return ( uti596_issueCA ( sc, UTI596_WAIT_FOR_INITIALIZATION ) );
}
@@ -743,9 +743,9 @@ static int uti596_setScpAndScb(
/*
* uti596_diagnose
- *
+ *
* Send a diagnose command to the CU
- *
+ *
* Input parameters: NONE
*
* Output parameters: NONE
@@ -771,10 +771,10 @@ static int uti596_diagnose( void )
/*
* uti596_configure
- *
+ *
* Send the CU a configure command with the desired
* configuration structure
- *
+ *
* Input parameters:
* sc - a pointer to the uti596_softc struct
*
@@ -783,7 +783,7 @@ static int uti596_diagnose( void )
* Return value:
* 0 if successful, -1 otherwise
*/
-static int uti596_configure (
+static int uti596_configure (
uti596_softc_ * sc
)
{
@@ -799,10 +799,10 @@ static int uti596_configure (
/*
* uti596_IAsetup
- *
+ *
* Send the CU an Individual Address setup command with
* the ethernet hardware address
- *
+ *
* Input parameters:
* sc - a pointer to the uti596_softc struct
*
@@ -816,7 +816,7 @@ static int uti596_IAsetup (
)
{
int i;
-
+
sc->set_add.cmd.command = CmdSASetup;
for ( i=0; i<6; i++) {
sc->set_add.data[i]=sc->arpcom.ac_enaddr[i];
@@ -832,10 +832,10 @@ static int uti596_IAsetup (
/*
* uti596_initTBD
- *
+ *
* Initialize transmit buffer descriptors
* dynamically allocate mem for the number of tbd's required
- *
+ *
* Input parameters:
* sc - a pointer to the uti596_softc struct
*
@@ -880,10 +880,10 @@ static int uti596_initTBD ( uti596_softc_ * sc )
/*
* uti596_initRFA
- *
+ *
* Initialize the Receive Frame Area
* dynamically allocate mem for the number of rfd's required
- *
+ *
* Input parameters:
* sc - a pointer to the uti596_softc struct
*
@@ -919,7 +919,7 @@ static int uti596_initRFA( int num )
pRfd = (i596_rfd *) calloc (1, sizeof (struct i596_rfd) );
if ( pRfd != NULL ) {
uti596_softc.countRFD++; /* update count */
- uti596_softc.pEndRFA->next =
+ uti596_softc.pEndRFA->next =
(i596_rfd *) word_swap ((unsigned long) pRfd); /* write the link */
uti596_softc.pEndRFA = pRfd; /* move the end */
}
@@ -964,10 +964,10 @@ static int uti596_initRFA( int num )
/*
* uti596_initMem
- *
+ *
* Initialize the 82596 memory structures for Tx and Rx
* dynamically allocate mem for the number of tbd's required
- *
+ *
* Input parameters:
* sc - a pointer to the uti596_softc struct
*
@@ -994,7 +994,7 @@ void uti596_initMem(
if ( i < sc->rxBdCount ) {
printk(("init_rfd: only able to allocate %d receive frame descriptors\n", i))
}
-
+
/*
* Write the SCB with a pointer to the receive frame area
* and keep a pointer for our use.
@@ -1033,7 +1033,7 @@ void uti596_initMem(
* uti596_initialize
*
* Reset the 82596 and initialize it with a new SCP.
- *
+ *
* Input parameters:
* sc - pointer to the uti596_softc
*
@@ -1055,7 +1055,7 @@ void uti596_initialize(
* internal triggering, linear mode
*/
sc->pScp->sysbus = 0x54;
-
+
/* provide the iscp to the scp, keep a pointer for our use */
sc->pScp->iscp_pointer = word_swap((unsigned long)&sc->iscp);
sc->pScp->iscp = &sc->iscp;
@@ -1070,7 +1070,7 @@ void uti596_initialize(
/* Set up the 82596 */
uti596_setScpAndScb( sc );
-
+
/* clear the scb command word */
sc->scb.command = 0;
}
@@ -1081,7 +1081,7 @@ void uti596_initialize(
*
* Reset the 82596 and initialize it with a new SCP. Enable bus snooping.
* Install the interrupt handlers.
- *
+ *
* Input parameters:
* sc - pointer to the uti596_softc
*
@@ -1101,7 +1101,7 @@ void uti596_initialize_hardware(
pccchip2->LANC_berr_ctl = 0x40;
uti596_initialize( sc );
-
+
/*
* Configure interrupt control in PCCchip2
*/
@@ -1111,10 +1111,10 @@ void uti596_initialize_hardware(
* will supply dirty data and leave dirty data
* on read access and sink any data on write
*/
- /*
+ /*
* Install the interrupt handler
* calls rtems_interrupt_catch
- */
+ */
dummy = (rtems_isr_entry) set_vector( uti596_DynamicInterruptHandler, 0x57, 1 );
/* Initialize the 82596 memory */
@@ -1130,7 +1130,7 @@ void uti596_initialize_hardware(
* uti596_reset_hardware
*
* Reset the 82596 and initialize it with an SCP.
- *
+ *
* Input parameters:
* sc - pointer to the uti596_softc
*
@@ -1155,7 +1155,7 @@ void uti596_reset_hardware(
printk(("uti596_reset_hardware\n"))
#endif
uti596_initialize( sc );
-
+
/*
* Wake the transmitter if needed.
*/
@@ -1178,13 +1178,13 @@ void uti596_reset_hardware(
/*
* uti596_clearListStatus
- *
+ *
* Clear the stat fields for all RFDs
- *
+ *
* Input parameters:
* pRfd - a pointer to the head of the RFA
*
- * Output parameters: NONE
+ * Output parameters: NONE
*
* Return value: NONE
*/
@@ -1201,12 +1201,12 @@ void uti596_clearListStatus(
/*
* uti596_reset
- *
+ *
* Reset the 82596 and reconfigure
- *
+ *
* Input parameters: NONE
*
- * Output parameters: NONE
+ * Output parameters: NONE
*
* Return value: NONE
*/
@@ -1223,7 +1223,7 @@ void uti596_reset( void )
*/
sc->resetDone = 0;
uti596_wait ( sc, UTI596_WAIT_FOR_CU_ACCEPT );
- uti596_reset_hardware ( &uti596_softc );
+ uti596_reset_hardware ( &uti596_softc );
#ifdef DBG_RESET
uti596_diagnose();
@@ -1257,7 +1257,7 @@ void uti596_reset( void )
}
/* Re-address the head of the RFA in the SCB */
- sc->scb.pRfd = sc->pBeginRFA;
+ sc->scb.pRfd = sc->pBeginRFA;
sc->scb.rfd_pointer = word_swap((unsigned long)sc->pBeginRFA);
/* Clear the status of all RFDs */
@@ -1270,7 +1270,7 @@ void uti596_reset( void )
sc->started = 1; /* assume that the start is accepted */
sc->resetDone = 1;
uti596_issueCA ( sc, UTI596_WAIT_FOR_CU_ACCEPT );
-
+
UTI_596_ASSERT(sc->pCmdHead == I596_NULL, "Reset: CMD not cleared\n")
#ifdef DBG_RESET
@@ -1281,13 +1281,13 @@ void uti596_reset( void )
/*
* uti596_dequeue
- *
+ *
* Remove an RFD from the received fram queue
- *
+ *
* Input parameters:
* ppQ - a pointer to a i596_rfd pointer
*
- * Output parameters: NONE
+ * Output parameters: NONE
*
* Return value:
* pRfd - a pointer to the dequeued RFD
@@ -1298,7 +1298,7 @@ i596_rfd * uti596_dequeue(
{
ISR_Level level;
i596_rfd * pRfd;
-
+
_ISR_Disable(level);
/* invalid address, or empty queue or emptied queue */
@@ -1306,12 +1306,12 @@ i596_rfd * uti596_dequeue(
_ISR_Enable(level);
return I596_NULL;
}
-
- /*
+
+ /*
* Point to the dequeued buffer, then
* adjust the queue pointer and detach the buffer
*/
- pRfd = *ppQ;
+ pRfd = *ppQ;
*ppQ = (i596_rfd *) word_swap ((unsigned long) pRfd->next);
pRfd->next = I596_NULL; /* unlink the rfd being returned */
@@ -1322,18 +1322,18 @@ i596_rfd * uti596_dequeue(
/*
* uti596_append
- *
+ *
* Remove an RFD buffer from the RFA and tack it on to
* the received frame queue for processing.
- *
+ *
* Input parameters:
* ppQ - a pointer to the queue pointer
* pRfd - a pointer to the buffer to be returned
*
- * Output parameters: NONE
+ * Output parameters: NONE
*
* Return value: NONE
- */
+ */
void uti596_append(
i596_rfd ** ppQ,
@@ -1370,14 +1370,14 @@ void uti596_append(
/*
* uti596_supplyFD
- *
+ *
* Return a buffer (RFD) to the receive frame area (RFA).
* Call with interrupts disabled.
- *
+ *
* Input parameters:
* pRfd - a pointer to the buffer to be returned
*
- * Output parameters: NONE
+ * Output parameters: NONE
*
* Return value: NONE
*/
@@ -1388,7 +1388,7 @@ void uti596_supplyFD (
i596_rfd *pLastRfd;
UTI_596_ASSERT(pRfd != I596_NULL, "Supplying NULL RFD!\n")
-
+
pRfd -> cmd = CMD_EOL;
pRfd -> pRbd = I596_NULL;
pRfd -> next = I596_NULL;
@@ -1408,7 +1408,7 @@ void uti596_supplyFD (
uti596_softc.countRFD = 1;
return;
}
-
+
/*
* Check if the last RFD is used/read by the 596.
*/
@@ -1416,7 +1416,7 @@ void uti596_supplyFD (
/* C = complete, B = busy (prefetched) */
if ( pLastRfd != I596_NULL && ! (pLastRfd -> stat & ( STAT_C | STAT_B ) )) {
-
+
/*
* Not yet too late to add it
*/
@@ -1454,13 +1454,13 @@ void uti596_supplyFD (
}
else {
-
+
uti596_softc.pEndRFA = pRfd; /* the RFA has been extended */
-
+
if ( ( uti596_softc.scb.status & SCB_STAT_RNR ||
uti596_softc.scb.status & RU_NO_RESOURCES ) &&
uti596_softc.countRFD > 1 ) {
-
+
/* Ensure that beginRFA is not EOL */
uti596_softc.pBeginRFA -> cmd &= ~CMD_EOL;
@@ -1476,10 +1476,10 @@ void uti596_supplyFD (
UTI_596_ASSERT(uti596_softc.pBeginRFA != I596_NULL, "rx start w/ NULL begin! \n")
uti596_softc.scb.pRfd = uti596_softc.pBeginRFA;
uti596_softc.scb.rfd_pointer = word_swap ((unsigned long) uti596_softc.pBeginRFA);
-
+
/* Don't ack RNR! The receiver should be stopped in this case */
uti596_softc.scb.command = RX_START | SCB_STAT_RNR;
-
+
UTI_596_ASSERT( !(uti596_softc.scb.status & SCB_STAT_FR),"FRAME RECEIVED INT COMING!\n")
/* send CA signal */
@@ -1506,15 +1506,15 @@ void uti596_supplyFD (
/*
* send_packet
- *
+ *
* Send a raw ethernet packet, add a
* transmit command to the CBL
- *
+ *
* Input parameters:
* ifp - a pointer to the ifnet structure
* m - a pointer to the mbuf being sent
*
- * Output parameters: NONE
+ * Output parameters: NONE
*
* Return value: NONE
*/
@@ -1701,12 +1701,12 @@ int uti596_attach(
else
ifp->if_mtu = ETHERMTU;
- /*
+ /*
* Check whether parameters should be obtained from NVRAM. If
* yes, and if an IP address, netmask, or ethernet address are
* provided in NVRAM, cheat, and stuff them into the ifconfig
* structure, OVERRIDING and existing or NULL values.
- *
+ *
* Warning: If values are provided in NVRAM, the ifconfig entries
* must be NULL because buffer memory allocated to hold the
* structure values is unrecoverable and would be lost here.
@@ -1718,7 +1718,7 @@ int uti596_attach(
#if defined(mvme167)
if ( !(j1 & 0x10) ) {
/* Jumper J1-4 is on, configure from NVRAM */
-
+
if ( (addr = nvram->ipaddr) ) {
/* We have a non-zero entry, copy the value */
if ( (pAddr = malloc ( INET_ADDR_MAX_BUF_SIZE, 0, M_NOWAIT )) )
@@ -1726,7 +1726,7 @@ int uti596_attach(
else
rtems_panic("Can't allocate ip_address buffer!\n");
}
-
+
if ( (addr = nvram->netmask) ) {
/* We have a non-zero entry, copy the value */
if ( (pAddr = malloc ( INET_ADDR_MAX_BUF_SIZE, 0, M_NOWAIT )) )
@@ -1739,7 +1739,7 @@ int uti596_attach(
* the arpcom struct. The following if construct serves only to give the
* NVRAM parameter the highest priority if J1-4 indicates we are configuring
* from NVRAM.
- *
+ *
* If the ethernet address is specified in NVRAM, go ahead and copy it.
* (ETHER_ADDR_LEN = 6 bytes).
*/
@@ -1827,11 +1827,11 @@ static void uti596_start(
)
{
uti596_softc_ *sc = ifp->if_softc;
-
+
#ifdef DBG_START
printk(("uti596_start: begins\n"))
#endif
-
+
rtems_event_send (sc->txDaemonTid, START_TRANSMIT_EVENT);
ifp->if_flags |= IFF_OACTIVE;
}
@@ -1890,14 +1890,14 @@ void uti596_init(
#endif
sc->scb.command = RX_START;
uti596_issueCA ( sc, UTI596_WAIT_FOR_CU_ACCEPT );
-
+
/*
* Tell the world that we're running.
*/
ifp->if_flags |= IFF_RUNNING;
#ifdef DBG_INIT
printk(("uti596_init: completed.\n"))
- #endif
+ #endif
}
/***********************************************************************
@@ -1940,9 +1940,9 @@ void uti596_init(
* Function: void uti596_txDaemon
*
* Description: Transmit task
- *
+ *
* Algorithm: Get mbufs to be transmitted, stuff into RFDs, send
- *
+ *
***********************************************************************/
void uti596_txDaemon(
@@ -2181,16 +2181,16 @@ void uti596_resetDaemon(
if ( scbStatus ) {
/* acknowledge interrupts */
-
+
/* Write to the ICLR bit in the PCCchip2 control registers to clear
* the INT status bit. Clearing INT here *before* sending the CA signal
* to the 82596 should ensure that interrupts won't be lost.
*/
pccchip2->LANC_int_ctl |=0x08;
pccchip2->LANC_berr_ctl |=0x08;
-
+
/* printk(("***INFO: ACK %x\n", scbStatus))*/
-
+
/* Send the CA signal to acknowledge interrupt */
uti596_softc.scb.command = scbStatus;
uti596_issueCA ( &uti596_softc, UTI596_NO_WAIT );
@@ -2242,7 +2242,7 @@ void uti596_resetDaemon(
}
else {
printk(("*****WARNING: RNR condition with NULL BeginRFA\n"))
- }
+ }
}
/*
@@ -2251,7 +2251,7 @@ void uti596_resetDaemon(
*/
if ( scbStatus & SCB_STAT_FR ) {
uti596_softc.rxInterrupts++;
-
+
#ifdef DBG_ISR
printk(("uti596_DynamicInterruptHandler: Frame received\n"))
#endif
@@ -2353,7 +2353,7 @@ void uti596_resetDaemon(
* ( Perhaps AddCmd is bad? )
*/
UTI_596_ASSERT(uti596_softc.pCmdHead == I596_NULL, "****ERROR: command serialization failed\n")
-
+
/* What if the command did not complete OK? */
switch ( pIsrCmd->command & 0x7) {
case CmdConfigure:
@@ -2448,9 +2448,9 @@ void uti596_resetDaemon(
printk(("****WARNING: more commands in list, but no start to NIC\n"))
}
} /* end if pIsrCmd != NULL && pIsrCmd->stat & STAT_C */
-
+
else {
- if ( pIsrCmd != I596_NULL ) {
+ if ( pIsrCmd != I596_NULL ) {
/* The command MAY be NULL from a RESET */
/* Reset the ethernet card, and wake the transmitter (if necessary) */
printk(("****INFO: Request board reset ( tx )\n"))
@@ -2475,7 +2475,7 @@ void uti596_resetDaemon(
} /* end if command complete */
- /*
+ /*
* If the receiver has stopped,
* check if this is a No Resources scenario,
* Try to add more RFD's ( no RBDs are used )
@@ -2606,8 +2606,8 @@ void uti596_resetDaemon(
printk(("uti596_DynamicInterruptHandler: X\n"))
#endif
count_rx=0;
-
-
+
+
/* Do this last, to ensure that the reset is called at the right time. */
if ( uti596_softc.nic_reset ) {
uti596_softc.nic_reset = 0;
@@ -2625,9 +2625,9 @@ void uti596_resetDaemon(
* Description:
* driver ioctl function
* handles SIOCGIFADDR, SIOCSIFADDR, SIOCSIFFLAGS
- *
+ *
***********************************************************************/
-
+
static int uti596_ioctl(
struct ifnet *ifp,
int command,
@@ -2684,7 +2684,7 @@ static int uti596_ioctl(
error = EINVAL;
break;
}
-
+
return error;
}
@@ -2756,24 +2756,24 @@ static void dumpQ( void )
i596_rfd *pRfd;
printk(("savedQ:\n"))
-
+
for( pRfd = uti596_softc.pSavedRfdQueue;
pRfd != I596_NULL;
pRfd = pRfd -> next) {
printk(("pRfd: %p, stat: 0x%x cmd: 0x%x\n",pRfd,pRfd -> stat,pRfd -> cmd))
}
-
+
printk(("Inbound:\n"))
-
+
for( pRfd = uti596_softc.pInboundFrameQueue;
pRfd != I596_NULL;
pRfd = pRfd -> next) {
printk(("pRfd: %p, stat: 0x%x cmd: 0x%x\n",pRfd,pRfd -> stat,pRfd -> cmd))
}
-
+
printk(("Last Unk: %p\n", uti596_softc.pLastUnkRFD ))
printk(("RFA:\n"))
-
+
for( pRfd = uti596_softc.pBeginRFA;
pRfd != I596_NULL;
pRfd = pRfd -> next) {
@@ -2784,7 +2784,7 @@ static void dumpQ( void )
/*
* show_buffers
- *
+ *
* Print out the RFA and frame queues
*/
static void show_buffers (void)
@@ -2797,7 +2797,7 @@ static void show_buffers (void)
uti596_softc.countRFD))
printk(("\nRFA: \n"))
-
+
for ( pRfd = uti596_softc.pBeginRFA;
pRfd != I596_NULL;
pRfd = pRfd->next) {
@@ -2805,7 +2805,7 @@ static void show_buffers (void)
pRfd, pRfd->stat, pRfd->cmd))
}
printk(("\nInbound: \n"))
-
+
for ( pRfd = uti596_softc.pInboundFrameQueue;
pRfd != I596_NULL;
pRfd = pRfd->next) {
@@ -2814,14 +2814,14 @@ static void show_buffers (void)
}
printk(("\nSaved: \n"))
-
+
for ( pRfd = uti596_softc.pSavedRfdQueue;
pRfd != I596_NULL;
pRfd = pRfd->next) {
printk(("Frame @ %p, status: %2.2x, cmd: %2.2x\n",
pRfd, pRfd->stat, pRfd->cmd))
}
-
+
printk(("\nUnknown: %p\n",uti596_softc.pLastUnkRFD))
}
@@ -2850,7 +2850,7 @@ static void show_queues(void)
printk(("End saved Q 0x%p\n", uti596_softc.pEndSavedQueue))
printk(("\nRFA:\n"))
-
+
for ( pRfd = uti596_softc.pBeginRFA;
pRfd != I596_NULL &&
pRfd != NULL;
@@ -2887,11 +2887,11 @@ static void print_eth(
for (i = 6; i < 12; i++) {
printk ((" %2.2X", add[i]))
}
-
+
printk (("\n"))
printk (("frame type %2.2X%2.2X\n", add[12], add[13]))
- if ( add[12] == 0x08 && add[13] == 0x06 ) {
+ if ( add[12] == 0x08 && add[13] == 0x06 ) {
/* an ARP */
printk (("Hardware type : %2.2X%2.2X\n", add[14],add[15]))
printk (("Protocol type : %2.2X%2.2X\n", add[16],add[17]))
@@ -2905,13 +2905,13 @@ static void print_eth(
}
printk (("%x\n", add[27]))
printk (("Sender IP addr: "))
-
+
for ( i=0; i< 3 ; i++) {
printk (("%u.", add[28 + i]))
}
printk (("%u\n", add[31]))
printk (("Target Enet addr: "))
-
+
for ( i=0; i< 5 ; i++) {
printk (( "%x:", add[32 + i]))
}
@@ -2936,13 +2936,13 @@ static void print_eth(
add[22],add[23],add[24],add[25]))
printk (("IP packet type: %2.2X code %2.2X\n", add[34],add[35]))
printk (("Source IP address: "))
-
+
for ( i=0; i< 3 ; i++) {
printk (("%u.", add[26 + i]))
}
printk (("%u\n", add[29]))
printk (("Destination IP address: "))
-
+
for ( i=0; i< 3 ; i++) {
printk (("%u.", add[30 + i]))
}
@@ -3010,15 +3010,15 @@ static void print_pkt(
}
printk (("%x\n", add[27]))
printk (("Sender IP addr: "))
-
+
for ( i=0; i< 3 ; i++) {
printk (("%u.", add[28 + i]))
}
printk (("%u\n", add[31]))
printk (("Target Enet addr: "))
-
+
for ( i=0; i< 5 ; i++) {
- printk (( "%x:", add[32 + i]))
+ printk (( "%x:", add[32 + i]))
}
printk (("%x\n", add[37]))
printk (("Target IP addr: "))
@@ -3040,20 +3040,20 @@ static void print_pkt(
add[22],add[23],add[24],add[25]))
printk (("IP packet type: %2.2X code %2.2X\n", add[34],add[35]))
printk (("Source IP address: "))
-
+
for ( i=0; i< 3 ; i++) {
printk(( "%u.", add[26 + i]))
}
printk(("%u\n", add[29]))
printk(("Destination IP address: "))
-
+
for ( i=0; i< 3 ; i++) {
printk(( "%u.", add[30 + i]))
}
printk(("%u\n", add[33]))
printk(("********************IP Packet Data*******************\n"))
length -=20;
-
+
for ( i=0; i < length ; i++) {
printk(("0x%2.2x ", add[34+i]))
}
@@ -3081,7 +3081,7 @@ static void print_echo(
printk (("print_echo: begins"))
- if ( add[12] == 0x08 && add[13] == 0x00 ) {
+ if ( add[12] == 0x08 && add[13] == 0x00 ) {
/* an IP packet */
printk (("Packet Location %p\n", add))
printk (("Dest "))
@@ -3097,7 +3097,7 @@ static void print_echo(
}
printk (("\n"))
printk (("frame type %2.2X%2.2X\n", add[12], add[13]))
-
+
printk (("*********************IP HEADER******************\n"))
printk (("IP version/IPhdr length: %2.2X TOS: %2.2X\n", add[14] , add[15]))
printk (("IP total length: %2.2X %2.2X, decimal %d\n", add[16], add[17], length = (add[16]<<8 | add[17] )))
@@ -3107,20 +3107,20 @@ static void print_echo(
add[22],add[23],add[24],add[25]))
printk (("IP packet type: %2.2X code %2.2X\n", add[34],add[35]))
printk (("Source IP address: "))
-
+
for ( i=0; i< 3 ; i++) {
printk (("%u.", add[26 + i]))
}
printk (("%u\n", add[29]))
printk (("Destination IP address: "))
-
+
for ( i=0; i< 3 ; i++) {
printk (("%u.", add[30 + i]))
}
printk (("%u\n", add[33]))
printk(("********************IP Packet Data*******************\n"))
length -=20;
-
+
for ( i=0; i < length ; i++) {
printk(("0x%2.2x ", add[34+i]))
}
diff --git a/c/src/lib/libbsp/m68k/mvme167/network/uti596.h b/c/src/lib/libbsp/m68k/mvme167/network/uti596.h
index 38b22af0c5..bc97ac2455 100644
--- a/c/src/lib/libbsp/m68k/mvme167/network/uti596.h
+++ b/c/src/lib/libbsp/m68k/mvme167/network/uti596.h
@@ -105,13 +105,13 @@ struct enet_statistics{
struct i596_tbd; /* necessary forward declaration */
enum commands {
- CmdNOp = 0,
- CmdSASetup = 1,
- CmdConfigure = 2,
+ CmdNOp = 0,
+ CmdSASetup = 1,
+ CmdConfigure = 2,
CmdMulticastList = 3,
- CmdTx = 4,
- CmdTDR = 5,
- CmdDump = 6,
+ CmdTx = 4,
+ CmdTDR = 5,
+ CmdDump = 6,
CmdDiagnose = 7
};
@@ -127,7 +127,7 @@ typedef volatile struct i596_dump_result {
unsigned short tx_crc_byte01;
unsigned short tx_crc_byte23;
unsigned short rx_crc_byte01;
- unsigned short rx_crc_byte23;
+ unsigned short rx_crc_byte23;
unsigned short rx_temp_mem01;
unsigned short rx_temp_mem23;
unsigned short rx_temp_mem45;
@@ -201,10 +201,10 @@ typedef volatile struct i596_selftest {
unsigned long results;
} i596_selftest;
-/*
+/*
* Action commands
* (big endian, linear mode)
- */
+ */
typedef volatile struct i596_cmd {
unsigned short status;
unsigned short command;
@@ -251,7 +251,7 @@ typedef volatile struct i596_tbd {
unsigned short size;
unsigned short pad;
volatile struct i596_tbd *next;
- char *data;
+ char *data;
} i596_tbd;
/*
@@ -262,7 +262,7 @@ typedef volatile struct i596_rbd {
unsigned short count;
unsigned short offset;
volatile struct i596_rbd *next;
- char *data;
+ char *data;
unsigned short size;
unsigned short pad;
} i596_rbd;
@@ -274,10 +274,10 @@ typedef volatile struct i596_rfd {
unsigned short stat;
unsigned short cmd;
volatile struct i596_rfd *next;
- i596_rbd *pRbd;
+ i596_rbd *pRbd;
unsigned short count;
unsigned short size;
- char data [1532];
+ char data [1532];
} i596_rfd;
/*
@@ -300,7 +300,7 @@ typedef volatile struct i596_scb {
i596_rfd *pRfd;
} i596_scb;
-/*
+/*
* Intermediate System Configuration Pointer
*/
typedef volatile struct i596_iscp {
@@ -333,7 +333,7 @@ typedef volatile struct uti596_softc {
i596_set_add set_add;
i596_configure set_conf;
i596_tdr tdr;
- i596_nop nop;
+ i596_nop nop;
i596_tx *pTxCmd;
i596_tbd *pTbd;
diff --git a/c/src/lib/libbsp/m68k/mvme167/startup/bspclean.c b/c/src/lib/libbsp/m68k/mvme167/startup/bspclean.c
index 3446711e32..b4084e6558 100644
--- a/c/src/lib/libbsp/m68k/mvme167/startup/bspclean.c
+++ b/c/src/lib/libbsp/m68k/mvme167/startup/bspclean.c
@@ -45,7 +45,7 @@ static void bsp_return_to_monitor_trap( void )
m68k_set_vbr(0xFFE00000); /* restore 167Bug vectors */
asm volatile( "trap #15\n\t" /* trap to 167Bug */
".short 0x63" ); /* return to 167Bug (.RETURN) */
-
+
/* restart program */
start_addr = start;
asm volatile( "jmp %0@" : "=a" (start_addr) : "0" (start_addr) );
@@ -61,7 +61,7 @@ static void bsp_return_to_monitor_trap( void )
* function that makes a 167Bug .RETURN syscall in the trap 13 entry in the
* exception vector, and then issues a trap 13 call. It is also possible that
* the code was copied from some other OS that does run tasks in user mode.
- * In any case, it appears to be a bit of paranoia, and could lead to
+ * In any case, it appears to be a bit of paranoia, and could lead to
* problems if 167Bug is invoked before we get to switch the VBR back to
* 167Bug because trap 13 is documented as being reserved for the internal
* use of the debugger.
diff --git a/c/src/lib/libbsp/m68k/mvme167/startup/bspstart.c b/c/src/lib/libbsp/m68k/mvme167/startup/bspstart.c
index ab716e2dad..f4c640063d 100644
--- a/c/src/lib/libbsp/m68k/mvme167/startup/bspstart.c
+++ b/c/src/lib/libbsp/m68k/mvme167/startup/bspstart.c
@@ -17,7 +17,7 @@
*
* $Id$
*/
-
+
#include <string.h>
@@ -78,7 +78,7 @@ void bsp_pretasking_hook(void); /* m68k version */
void bsp_start( void )
{
void M68KFPSPInstallExceptionHandlers (void);
-
+
extern m68k_isr_entry M68Kvec[];
extern void *_WorkspaceBase;
extern void *_RamSize;
@@ -88,7 +88,7 @@ void bsp_start( void )
int index;
_M68k_Ramsize = (unsigned long)&_RamSize; /* RAM size set in linker script */
-
+
/*
* 167Bug Vectors are at 0xFFE00000
*/
@@ -96,7 +96,7 @@ void bsp_start( void )
m68k_set_vbr( rom_monitor_vector_table );
- /*
+ /*
* Copy 167Bug Bus Error handler into our exception vector. All 167Bug
* exception vectors are the same and point to the generalized exception
* handler. The bus error handler is the one that Motorola says to copy
@@ -108,7 +108,7 @@ void bsp_start( void )
/* Any exceptions during initialization should be trapped by 167Bug */
m68k_set_vbr( &M68Kvec );
-
+
/* Install the 68040 FPSP here */
M68KFPSPInstallExceptionHandlers();
@@ -120,7 +120,7 @@ void bsp_start( void )
/* Set the Interrupt Base Vectors */
lcsr->vector_base = (VBR0 << 28) | (VBR1 << 24);
- /*
+ /*
* Initialize address translation
* May need to pass the multiprocessor configuration table.
*/
@@ -132,8 +132,8 @@ void bsp_start( void )
Cpu_table.interrupt_vector_table = (m68k_isr_entry *) &M68Kvec;
/* Must match value in start.s */
Cpu_table.interrupt_stack_size = CONFIGURE_INTERRUPT_STACK_MEMORY;
-
- /*
+
+ /*
* If the application has not overriden the default User_extension_table,
* supply one with our own fatal error handler that returns control to
* 167Bug.
@@ -142,7 +142,7 @@ void bsp_start( void )
user_extension_table.fatal = bsp_fatal_error_occurred;
BSP_Configuration.User_extension_table = &user_extension_table;
}
-
+
/*
* Need to "allocate" the memory for the RTEMS Workspace and
* tell the RTEMS configuration where it is. This memory is
diff --git a/c/src/lib/libbsp/m68k/mvme167/startup/page_table.c b/c/src/lib/libbsp/m68k/mvme167/startup/page_table.c
index 34f6683aa7..985144224d 100644
--- a/c/src/lib/libbsp/m68k/mvme167/startup/page_table.c
+++ b/c/src/lib/libbsp/m68k/mvme167/startup/page_table.c
@@ -17,7 +17,7 @@
* is mapped to physical address 0x12345678. With this mapping, the MMU is
* only used to control the caching modes for the various regions of memory.
* Mapping the virtual addresses to their corresponding physical address makes
- * it unnecessary to map addresses under software control during the
+ * it unnecessary to map addresses under software control during the
* initialization of RTEMS, before address translation is turned on.
*
* With the above approach, address translation may be set up either with the
@@ -50,13 +50,13 @@
/*
* page_table_init
- *
+ *
* Map the virtual range 0x00000000--0x7FFFFFFF to the physical range
* 0x00000000--0x7FFFFFFF. Rely on the hardware to raise exceptions when
* addressing non-existent memory. Use only the transparent translation
* registers (for now).
*
- * On all processors, the local virtual address range 0xFF000000--0xFFFFFFFF
+ * On all processors, the local virtual address range 0xFF000000--0xFFFFFFFF
* is mapped to the physical address range 0xFF000000--0xFFFFFFFF as
* caching disabled, serialized access.
*
@@ -74,7 +74,7 @@ void page_table_init(
unsigned char j1; /* State of J1 jumpers */
register unsigned long dtt0; /* Content of dtt0 */
register unsigned long cacr; /* Content of cacr */
-
+
/*
* Logical base addr = 0x00 map starting at 0x00000000
* Logical address mask = 0x7F map up to 0x7FFFFFFF
@@ -85,9 +85,9 @@ void page_table_init(
* W = 0b0 read/write access allowed
*/
dtt0 = 0x007FC020;
-
+
cacr = 0x00000000; /* Data and instruction cache off */
-
+
/* Read the J1 header */
j1 = (unsigned char)(lcsr->vector_base & 0xFF);
@@ -105,15 +105,15 @@ void page_table_init(
}
else {
/* Configure according to other jumper settings */
-
+
if ( !(j1 & 0x80) )
/* Jumper J1-7 if on, enable data caching */
cacr |= 0x80000000;
-
+
if ( !(j1 & 0x40) )
/* Jumper J1-6 if on, enable instruction caching */
cacr |= 0x00008000;
-
+
if ( j1 & 0x20 )
/* Jumper J1-5 is off, enable writethrough caching */
dtt0 &= 0xFFFFFF9F;
@@ -131,7 +131,7 @@ void page_table_init(
:: "d" (0), "d" (dtt0), "d" (0xFF00C040), "d" (cacr));
}
-
+
/*
* page_table_teardown
*
diff --git a/c/src/lib/libbsp/m68k/mvme167/timer/timer.c b/c/src/lib/libbsp/m68k/mvme167/timer/timer.c
index 0b718c085f..2d78f91685 100644
--- a/c/src/lib/libbsp/m68k/mvme167/timer/timer.c
+++ b/c/src/lib/libbsp/m68k/mvme167/timer/timer.c
@@ -63,7 +63,7 @@ rtems_isr timerisr();
* It is important that the timer start/stop overhead be
* determined when porting or modifying this code.
*
- * THE VMECHIP2 PRESCALER REGISTER IS ASSUMED TO BE SET!
+ * THE VMECHIP2 PRESCALER REGISTER IS ASSUMED TO BE SET!
* The prescaler is used by all VMEchip2 timers, including the VMEbus grant
* timeout counter, the DMAC time off timer, the DMAC timer on timer, and the
* VMEbus global timeout timer. The prescaler value is normally set by the
@@ -73,7 +73,7 @@ rtems_isr timerisr();
void Timer_initialize()
{
(void) set_vector( timerisr, TIMER_VECTOR, 0 );
-
+
Ttimer_val = 0; /* clear timer ISR count */
lcsr->intr_ena &= 0xFEFFFFFF; /* disable tick timer 1 interrupt */
lcsr->intr_clear |= 0x01000000; /* clear tick timer 1 interrupt */
@@ -106,7 +106,7 @@ void Timer_initialize()
* LEAST_VALID is the lowest number this routine should trust. Numbers
* below this are "noise" and zero is returned.
*/
-int Read_timer()
+int Read_timer()
{
uint32_t total;
diff --git a/c/src/lib/libbsp/m68k/ods68302/clock/ckinit.c b/c/src/lib/libbsp/m68k/ods68302/clock/ckinit.c
index 95c9024d81..eff3b5580f 100644
--- a/c/src/lib/libbsp/m68k/ods68302/clock/ckinit.c
+++ b/c/src/lib/libbsp/m68k/ods68302/clock/ckinit.c
@@ -50,11 +50,11 @@ volatile uint32_t Clock_driver_ticks;
uint32_t Clock_isrs;
void Clock_exit( void );
-
+
/*
* These are set by clock driver during its init
*/
-
+
rtems_device_major_number rtems_clock_major = ~0;
rtems_device_minor_number rtems_clock_minor;
@@ -112,17 +112,17 @@ rtems_device_driver Clock_initialize(
)
{
Install_clock( Clock_isr );
-
+
/*
* make major/minor avail to others such as shared memory driver
*/
-
+
rtems_clock_major = major;
rtems_clock_minor = minor;
-
+
return RTEMS_SUCCESSFUL;
}
-
+
rtems_device_driver Clock_control(
rtems_device_major_number major,
rtems_device_minor_number minor,
@@ -131,15 +131,15 @@ rtems_device_driver Clock_control(
{
uint32_t isrlevel;
rtems_libio_ioctl_args_t *args = pargp;
-
+
if (args == 0)
goto done;
-
+
/*
* This is hokey, but until we get a defined interface
* to do this, it will just be this simple...
*/
-
+
if (args->command == rtems_build_name('I', 'S', 'R', ' '))
{
Clock_isr( CLOCK_VECTOR);
@@ -150,7 +150,7 @@ rtems_device_driver Clock_control(
(void) set_vector( args->buffer, CLOCK_VECTOR, 1 );
rtems_interrupt_enable( isrlevel );
}
-
+
done:
return RTEMS_SUCCESSFUL;
}
diff --git a/c/src/lib/libbsp/m68k/ods68302/console/console.c b/c/src/lib/libbsp/m68k/ods68302/console/console.c
index 292d9396f8..f471b44a71 100644
--- a/c/src/lib/libbsp/m68k/ods68302/console/console.c
+++ b/c/src/lib/libbsp/m68k/ods68302/console/console.c
@@ -43,10 +43,10 @@ rtems_device_driver console_initialize(
major,
(rtems_device_minor_number) 0
);
-
+
if (status != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred(status);
-
+
return RTEMS_SUCCESSFUL;
}
@@ -91,9 +91,9 @@ rtems_boolean is_character_ready(
char inbyte( void )
{
char ch;
-
+
while (!is_character_ready(&ch));
-
+
return ch;
}
@@ -128,7 +128,7 @@ rtems_device_driver console_open(
{
return RTEMS_SUCCESSFUL;
}
-
+
/*
* Close entry point
*/
@@ -156,7 +156,7 @@ rtems_device_driver console_read(
char *buffer;
int maximum;
int count = 0;
-
+
rw_args = (rtems_libio_rw_args_t *) arg;
buffer = rw_args->buffer;
@@ -175,7 +175,7 @@ rtems_device_driver console_read(
}
/*
- * write bytes to the serial port. Stdout and stderr are the same.
+ * write bytes to the serial port. Stdout and stderr are the same.
*/
rtems_device_driver console_write(
diff --git a/c/src/lib/libbsp/m68k/ods68302/include/bare.h b/c/src/lib/libbsp/m68k/ods68302/include/bare.h
index 3942ce9732..81352f4f3d 100644
--- a/c/src/lib/libbsp/m68k/ods68302/include/bare.h
+++ b/c/src/lib/libbsp/m68k/ods68302/include/bare.h
@@ -13,7 +13,7 @@
Chip selects are programmed as required. Three are controlled in the
boot code. They are RAM, ROM, and peripherals. You can optionally
configure the other two chip selects.
-
+
SYSTEM_CLOCK - You must defined this. It is used for setting the
baud rate.
@@ -30,7 +30,7 @@
CSEL_1, CSEL_2 - If defined the other macros needed to define the
chip select must be defined. If not defined they are not programmed
and registers are left in the reset state.
-
+
Card Specific Devices - The MVF card uses a chip select to address a
range of peripherials (CSEL_2). These include front panel leds, and
4 digit diagnostic display device. Put what ever you need.
@@ -45,7 +45,7 @@
This file allows a range of common parameters which vary from one
variant of card to another to placed in a central file.
-
+
*/
/*****************************************************************************/
@@ -53,7 +53,7 @@
#define _BARE_H_
#if __cplusplus
-extern "C"
+extern "C"
{
#endif
@@ -84,8 +84,8 @@ extern "C"
#define CSEL_2_SIZE (0x00040000)
#define CSEL_2_WAIT_STATES (OR_DTACK_EXT)
-/*
- * Need to define a watchdog period
+/*
+ * Need to define a watchdog period
*/
#define WATCHDOG_TIMEOUT_PERIOD (3000 * 2)
@@ -182,42 +182,42 @@ extern "C"
#define PIA_BASE (PERIPHERIALS_BASE + 0x0001C000)
#define LED_1 0x0002
-#define LED_1_GREEN 0xFFFD
+#define LED_1_GREEN 0xFFFD
#define LED_1_RED 0xFFFF
-#define LED_1_OFF 0xFFFC
+#define LED_1_OFF 0xFFFC
#define LED_2 0x0001
-#define LED_2_GREEN 0xFFFE
+#define LED_2_GREEN 0xFFFE
#define LED_2_RED 0xFFFF
#define LED_2_OFF 0xFFFC
#define LED_3 0x0000
-#define LED_3_GREEN 0xFFFC
+#define LED_3_GREEN 0xFFFC
#define LED_3_RED 0xFFFC
#define LED_3_OFF 0xFFFC
#define LED_4 0x0000
-#define LED_4_GREEN 0xFFFC
+#define LED_4_GREEN 0xFFFC
#define LED_4_RED 0xFFFC
#define LED_4_OFF 0xFFFC
#define LED_5 0x0000
-#define LED_5_GREEN 0xFFFC
+#define LED_5_GREEN 0xFFFC
#define LED_5_RED 0xFFFC
#define LED_5_OFF 0xFFFC
#define LED_6 0x0000
-#define LED_6_GREEN 0xFFFC
+#define LED_6_GREEN 0xFFFC
#define LED_6_RED 0xFFFC
#define LED_6_OFF 0xFFFC
#define LED_7 0x0000
-#define LED_7_GREEN 0xFFFC
+#define LED_7_GREEN 0xFFFC
#define LED_7_RED 0xFFFC
#define LED_7_OFF 0xFFFC
#define LED_8 0x0000
-#define LED_8_GREEN 0xFFFC
+#define LED_8_GREEN 0xFFFC
#define LED_8_RED 0xFFFC
#define LED_8_OFF 0xFFFC
@@ -239,7 +239,7 @@ extern "C"
#else
#define GDB_RUN_MONITOR() (1 == 0)
#endif
-
+
#if __cplusplus
}
#endif
diff --git a/c/src/lib/libbsp/m68k/ods68302/include/bsp.h b/c/src/lib/libbsp/m68k/ods68302/include/bsp.h
index 8d9cfbafde..5e36be8064 100644
--- a/c/src/lib/libbsp/m68k/ods68302/include/bsp.h
+++ b/c/src/lib/libbsp/m68k/ods68302/include/bsp.h
@@ -110,7 +110,7 @@ extern "C" {
/*
* NOTE: Use the standard Console driver entry
*/
-
+
/*
* NOTE: Use the standard Clock driver entry
*/
diff --git a/c/src/lib/libbsp/m68k/ods68302/include/crc.h b/c/src/lib/libbsp/m68k/ods68302/include/crc.h
index c245c39a15..1c5be55e32 100644
--- a/c/src/lib/libbsp/m68k/ods68302/include/crc.h
+++ b/c/src/lib/libbsp/m68k/ods68302/include/crc.h
@@ -14,7 +14,7 @@
F U N C T I O N S
*/
#if __cplusplus
-extern "C"
+extern "C"
{
#endif
diff --git a/c/src/lib/libbsp/m68k/ods68302/include/debugport.h b/c/src/lib/libbsp/m68k/ods68302/include/debugport.h
index a54756e514..0ce0f66b94 100644
--- a/c/src/lib/libbsp/m68k/ods68302/include/debugport.h
+++ b/c/src/lib/libbsp/m68k/ods68302/include/debugport.h
@@ -11,23 +11,23 @@
#define _DEBUGPORT_H_
#if __cplusplus
-extern "C"
+extern "C"
{
#endif
/* normall automatic, only need when re-initialising */
void debug_port_initialise(void);
-
+
unsigned char debug_port_status(const unsigned char status);
unsigned char debug_port_in(void);
- void debug_port_out(const unsigned char character);
+ void debug_port_out(const unsigned char character);
void debug_port_write(const char *buffer);
void debug_port_write_buffer(const char *buffer, unsigned int size);
void debug_port_write_hex_uint(const unsigned int value);
void debug_port_write_hex_ulong(const unsigned long value);
-
+
/*
* special banner message for CPU specific boot code,
* initialises the debug port
diff --git a/c/src/lib/libbsp/m68k/ods68302/include/m68302scc.h b/c/src/lib/libbsp/m68k/ods68302/include/m68302scc.h
index d6eb37ccda..4b8b72a328 100644
--- a/c/src/lib/libbsp/m68k/ods68302/include/m68302scc.h
+++ b/c/src/lib/libbsp/m68k/ods68302/include/m68302scc.h
@@ -1,7 +1,7 @@
/*****************************************************************************/
/*
$Id$
-
+
M68302 Scc Polled Uart Support
*/
@@ -11,7 +11,7 @@
#define _M68302SCC_H_
#if __cplusplus
-extern "C"
+extern "C"
{
#endif
@@ -21,11 +21,11 @@ extern "C"
#define SCC_38400 (3)
#define SCC_57600 (4)
#define SCC_115700 (5)
-
+
void scc_initialise(int channel, int baud_rate, int lf_translate);
unsigned char scc_status(int channel, const unsigned char status);
unsigned char scc_in(int channel);
-void scc_out(int channel, const unsigned char character);
+void scc_out(int channel, const unsigned char character);
#if __cplusplus
}
diff --git a/c/src/lib/libbsp/m68k/ods68302/start/debugreset.S b/c/src/lib/libbsp/m68k/ods68302/start/debugreset.S
index 60e7277245..915621b8b5 100644
--- a/c/src/lib/libbsp/m68k/ods68302/start/debugreset.S
+++ b/c/src/lib/libbsp/m68k/ods68302/start/debugreset.S
@@ -1,21 +1,21 @@
-/*
+/*
* $Id$
*
* Re-written the gen68302 start-up code.
- *
+ *
* Uses gas syntax only, removed the OAR asm.h.
- *
+ *
* Supplies a complete vector table in ROM.
- *
+ *
* Manages all vectors with seperate handlers to trap unhandled
* execptions.
- *
- * Uses the target specific header file to get the runtime
+ *
+ * Uses the target specific header file to get the runtime
* configuration
- *
+ *
* COPYRIGHT (c) 1996
* Objective Design Systems Pty Ltd (ODS)
- *
+ *
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
* On-Line Applications Research Corporation (OAR).
*
@@ -31,7 +31,7 @@
|
| Entered from a hardware reset.
|
-
+
.global start | Default entry point for GNU
start:
@@ -45,9 +45,9 @@ zerobss:
moveal #_clear_end,%a0 | find end of .bss
moveal #_clear_start,%a1 | find beginning of .bss
moveq #0,%d0
-
+
zerobss_loop:
-
+
movel %d0,%a1@+ | to zero out uninitialized
cmpal %a0,%a1
jlt zerobss_loop | loop until end reached
@@ -60,14 +60,14 @@ zerobss_loop:
jsr boot_phase_3
-|
+|
| Initialised data
|
.sect .data
-
+
.global start_frame
-
+
start_frame:
.space 4,0
@@ -76,10 +76,10 @@ start_frame:
|
.sect .bss
-
+
.global environ
.align 2
-
+
environ:
.long 0
diff --git a/c/src/lib/libbsp/m68k/ods68302/start/reset.S b/c/src/lib/libbsp/m68k/ods68302/start/reset.S
index b07588e9b2..c6f80950f1 100644
--- a/c/src/lib/libbsp/m68k/ods68302/start/reset.S
+++ b/c/src/lib/libbsp/m68k/ods68302/start/reset.S
@@ -1,21 +1,21 @@
-/*
+/*
* $Id$
*
* Re-written the gen68302 start-up code.
- *
+ *
* Uses gas syntax only, removed the OAR asm.h.
- *
+ *
* Supplies a complete vector table in ROM.
- *
+ *
* Manages all vectors with seperate handlers to trap unhandled
* execptions.
- *
- * Uses the target specific header file to get the runtime
+ *
+ * Uses the target specific header file to get the runtime
* configuration
- *
+ *
* COPYRIGHT (c) 1996
* Objective Design Systems Pty Ltd (ODS)
- *
+ *
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
* On-Line Applications Research Corporation (OAR).
*
@@ -36,16 +36,16 @@
.sect .resettext
.global M68Kvec | Vector Table
-
+
M68Kvec: | standard location for vectors
-
+
|
| Make relative, can have the code positioned any where
|
V___ISSP: .long MC68302_BASE + MC68302_SYS_RAM_SIZE
V____IPC: .long start - V___ISSP
-
+
|
| Create the rest of the vector table to point to the unhandled expection
| handler
@@ -64,7 +64,7 @@ MAKE_EXCEPTION_VECTOR(6)
MAKE_EXCEPTION_VECTOR(7)
MAKE_EXCEPTION_VECTOR(8)
MAKE_EXCEPTION_VECTOR(9)
-
+
MAKE_EXCEPTION_VECTOR(10)
MAKE_EXCEPTION_VECTOR(11)
MAKE_EXCEPTION_VECTOR(12)
@@ -86,7 +86,7 @@ MAKE_EXCEPTION_VECTOR(26)
MAKE_EXCEPTION_VECTOR(27)
MAKE_EXCEPTION_VECTOR(28)
MAKE_EXCEPTION_VECTOR(29)
-
+
MAKE_EXCEPTION_VECTOR(30)
MAKE_EXCEPTION_VECTOR(31)
MAKE_EXCEPTION_VECTOR(32)
@@ -97,7 +97,7 @@ MAKE_EXCEPTION_VECTOR(36)
MAKE_EXCEPTION_VECTOR(37)
MAKE_EXCEPTION_VECTOR(38)
MAKE_EXCEPTION_VECTOR(39)
-
+
MAKE_EXCEPTION_VECTOR(40)
MAKE_EXCEPTION_VECTOR(41)
MAKE_EXCEPTION_VECTOR(42)
@@ -108,7 +108,7 @@ MAKE_EXCEPTION_VECTOR(46)
MAKE_EXCEPTION_VECTOR(47)
MAKE_EXCEPTION_VECTOR(48)
MAKE_EXCEPTION_VECTOR(49)
-
+
MAKE_EXCEPTION_VECTOR(50)
MAKE_EXCEPTION_VECTOR(51)
MAKE_EXCEPTION_VECTOR(52)
@@ -119,7 +119,7 @@ MAKE_EXCEPTION_VECTOR(56)
MAKE_EXCEPTION_VECTOR(57)
MAKE_EXCEPTION_VECTOR(58)
MAKE_EXCEPTION_VECTOR(59)
-
+
MAKE_EXCEPTION_VECTOR(60)
MAKE_EXCEPTION_VECTOR(61)
MAKE_EXCEPTION_VECTOR(62)
@@ -130,7 +130,7 @@ MAKE_EXCEPTION_VECTOR(66)
MAKE_EXCEPTION_VECTOR(67)
MAKE_EXCEPTION_VECTOR(68)
MAKE_EXCEPTION_VECTOR(69)
-
+
MAKE_EXCEPTION_VECTOR(70)
MAKE_EXCEPTION_VECTOR(71)
MAKE_EXCEPTION_VECTOR(72)
@@ -141,7 +141,7 @@ MAKE_EXCEPTION_VECTOR(76)
MAKE_EXCEPTION_VECTOR(77)
MAKE_EXCEPTION_VECTOR(78)
MAKE_EXCEPTION_VECTOR(79)
-
+
MAKE_EXCEPTION_VECTOR(80)
MAKE_EXCEPTION_VECTOR(81)
MAKE_EXCEPTION_VECTOR(82)
@@ -152,7 +152,7 @@ MAKE_EXCEPTION_VECTOR(86)
MAKE_EXCEPTION_VECTOR(87)
MAKE_EXCEPTION_VECTOR(88)
MAKE_EXCEPTION_VECTOR(89)
-
+
MAKE_EXCEPTION_VECTOR(90)
MAKE_EXCEPTION_VECTOR(91)
MAKE_EXCEPTION_VECTOR(92)
@@ -163,7 +163,7 @@ MAKE_EXCEPTION_VECTOR(96)
MAKE_EXCEPTION_VECTOR(97)
MAKE_EXCEPTION_VECTOR(98)
MAKE_EXCEPTION_VECTOR(99)
-
+
MAKE_EXCEPTION_VECTOR(100)
MAKE_EXCEPTION_VECTOR(101)
MAKE_EXCEPTION_VECTOR(102)
@@ -174,7 +174,7 @@ MAKE_EXCEPTION_VECTOR(106)
MAKE_EXCEPTION_VECTOR(107)
MAKE_EXCEPTION_VECTOR(108)
MAKE_EXCEPTION_VECTOR(109)
-
+
MAKE_EXCEPTION_VECTOR(110)
MAKE_EXCEPTION_VECTOR(111)
MAKE_EXCEPTION_VECTOR(112)
@@ -196,7 +196,7 @@ MAKE_EXCEPTION_VECTOR(126)
MAKE_EXCEPTION_VECTOR(127)
MAKE_EXCEPTION_VECTOR(128)
MAKE_EXCEPTION_VECTOR(129)
-
+
MAKE_EXCEPTION_VECTOR(130)
MAKE_EXCEPTION_VECTOR(131)
MAKE_EXCEPTION_VECTOR(132)
@@ -207,7 +207,7 @@ MAKE_EXCEPTION_VECTOR(136)
MAKE_EXCEPTION_VECTOR(137)
MAKE_EXCEPTION_VECTOR(138)
MAKE_EXCEPTION_VECTOR(139)
-
+
MAKE_EXCEPTION_VECTOR(140)
MAKE_EXCEPTION_VECTOR(141)
MAKE_EXCEPTION_VECTOR(142)
@@ -218,7 +218,7 @@ MAKE_EXCEPTION_VECTOR(146)
MAKE_EXCEPTION_VECTOR(147)
MAKE_EXCEPTION_VECTOR(148)
MAKE_EXCEPTION_VECTOR(149)
-
+
MAKE_EXCEPTION_VECTOR(150)
MAKE_EXCEPTION_VECTOR(151)
MAKE_EXCEPTION_VECTOR(152)
@@ -229,7 +229,7 @@ MAKE_EXCEPTION_VECTOR(156)
MAKE_EXCEPTION_VECTOR(157)
MAKE_EXCEPTION_VECTOR(158)
MAKE_EXCEPTION_VECTOR(159)
-
+
MAKE_EXCEPTION_VECTOR(160)
MAKE_EXCEPTION_VECTOR(161)
MAKE_EXCEPTION_VECTOR(162)
@@ -240,7 +240,7 @@ MAKE_EXCEPTION_VECTOR(166)
MAKE_EXCEPTION_VECTOR(167)
MAKE_EXCEPTION_VECTOR(168)
MAKE_EXCEPTION_VECTOR(169)
-
+
MAKE_EXCEPTION_VECTOR(170)
MAKE_EXCEPTION_VECTOR(171)
MAKE_EXCEPTION_VECTOR(172)
@@ -251,7 +251,7 @@ MAKE_EXCEPTION_VECTOR(176)
MAKE_EXCEPTION_VECTOR(177)
MAKE_EXCEPTION_VECTOR(178)
MAKE_EXCEPTION_VECTOR(179)
-
+
MAKE_EXCEPTION_VECTOR(180)
MAKE_EXCEPTION_VECTOR(181)
MAKE_EXCEPTION_VECTOR(182)
@@ -262,7 +262,7 @@ MAKE_EXCEPTION_VECTOR(186)
MAKE_EXCEPTION_VECTOR(187)
MAKE_EXCEPTION_VECTOR(188)
MAKE_EXCEPTION_VECTOR(189)
-
+
MAKE_EXCEPTION_VECTOR(190)
MAKE_EXCEPTION_VECTOR(191)
MAKE_EXCEPTION_VECTOR(192)
@@ -273,7 +273,7 @@ MAKE_EXCEPTION_VECTOR(196)
MAKE_EXCEPTION_VECTOR(197)
MAKE_EXCEPTION_VECTOR(198)
MAKE_EXCEPTION_VECTOR(199)
-
+
MAKE_EXCEPTION_VECTOR(200)
MAKE_EXCEPTION_VECTOR(201)
MAKE_EXCEPTION_VECTOR(202)
@@ -284,7 +284,7 @@ MAKE_EXCEPTION_VECTOR(206)
MAKE_EXCEPTION_VECTOR(207)
MAKE_EXCEPTION_VECTOR(208)
MAKE_EXCEPTION_VECTOR(209)
-
+
MAKE_EXCEPTION_VECTOR(210)
MAKE_EXCEPTION_VECTOR(211)
MAKE_EXCEPTION_VECTOR(212)
@@ -295,7 +295,7 @@ MAKE_EXCEPTION_VECTOR(216)
MAKE_EXCEPTION_VECTOR(217)
MAKE_EXCEPTION_VECTOR(218)
MAKE_EXCEPTION_VECTOR(219)
-
+
MAKE_EXCEPTION_VECTOR(220)
MAKE_EXCEPTION_VECTOR(221)
MAKE_EXCEPTION_VECTOR(222)
@@ -306,7 +306,7 @@ MAKE_EXCEPTION_VECTOR(226)
MAKE_EXCEPTION_VECTOR(227)
MAKE_EXCEPTION_VECTOR(228)
MAKE_EXCEPTION_VECTOR(229)
-
+
MAKE_EXCEPTION_VECTOR(230)
MAKE_EXCEPTION_VECTOR(231)
MAKE_EXCEPTION_VECTOR(232)
@@ -317,7 +317,7 @@ MAKE_EXCEPTION_VECTOR(236)
MAKE_EXCEPTION_VECTOR(237)
MAKE_EXCEPTION_VECTOR(238)
MAKE_EXCEPTION_VECTOR(239)
-
+
MAKE_EXCEPTION_VECTOR(240)
MAKE_EXCEPTION_VECTOR(241)
MAKE_EXCEPTION_VECTOR(242)
@@ -328,20 +328,20 @@ MAKE_EXCEPTION_VECTOR(246)
MAKE_EXCEPTION_VECTOR(247)
MAKE_EXCEPTION_VECTOR(248)
MAKE_EXCEPTION_VECTOR(249)
-
+
MAKE_EXCEPTION_VECTOR(250)
MAKE_EXCEPTION_VECTOR(251)
MAKE_EXCEPTION_VECTOR(252)
MAKE_EXCEPTION_VECTOR(253)
MAKE_EXCEPTION_VECTOR(254)
-MAKE_EXCEPTION_VECTOR(255)
+MAKE_EXCEPTION_VECTOR(255)
|
| Start
|
| Entered from a hardware reset.
|
-
+
.global start | Default entry point for GNU
start:
@@ -368,27 +368,27 @@ start:
| watch for sign extended maths with the linker on (boot_phase_1-V___ISSP)
| manage the address with code, limited address of 2K at reset for CS0
|
-
+
move.l #boot_phase_1,%d0
and.l #0x1FFF,%d0
move.l %d0,%a0
jsr %a0@(0) | programs all basic 302 registers
-
+
|
| Map to the 68302 registers
|
-
+
move.l #MC68302_BASE,%a5
-
+
|
| Make a vector table in RAM
|
-
+
move.l #RAM_BASE,%a0 | a0 -> rom vector table
moveal #ROM_BASE,%a1 | d1 -> start of tmp SRAM
-
+
move.l #255,%d0
-
+
copy_vec_table:
move.l (%a0)+,%d1
@@ -397,7 +397,7 @@ copy_vec_table:
subq.l #1,%d0
bne copy_vec_table
-#if defined(SYSTEM_TABLE_ANCHOR_OFFSET)
+#if defined(SYSTEM_TABLE_ANCHOR_OFFSET)
|
| Clear the system table
|
@@ -405,11 +405,11 @@ copy_vec_table:
move.l #SYSTEM_TABLE_ANCHOR_OFFSET,%a0
move.l #0,(%a0)
#endif
-
+
|
| Copy the chip select swap code to DPRAM and run it
|
-
+
move.l #boot_phase_2,%d0
and.l #(ROM_SIZE - 1),%d0
move.l %d0,%a0 | a0 -> remap code
@@ -418,7 +418,7 @@ copy_vec_table:
move.l #boot_phase_3,%d0
and.l #(ROM_SIZE - 1),%d0
sub.l %a0,%d0
-
+
copy_remap:
move.b (%a0)+,(%a1)+ | copy
dbra %d0,copy_remap
@@ -432,9 +432,9 @@ copy_remap:
|
| Map to the 68302 registers
|
-
+
move.l #MC68302_BASE,%a5
-
+
|
| Copy initialized data area from ROM to RAM
|
@@ -443,13 +443,13 @@ copy_data:
moveal #_etext,%a0 | find the end of .text
moveal #_copy_start,%a1 | find the beginning of .data
moveal #_edata,%a2 | find the end of .data
-
+
copy_data_loop:
-
+
movel %a0@+,%a1@+ | copy the data
cmpal %a2,%a1
jlt copy_data_loop | loop until edata reached
-
+
|
| zero out uninitialized data area
|
@@ -458,16 +458,16 @@ zerobss:
moveal #_clear_end,%a0 | find end of .bss
moveal #_clear_start,%a1 | find beginning of .bss
moveq #0,%d0
-
+
zerobss_loop:
-
+
movel %d0,%a1@+ | to zero out uninitialized
cmpal %a0,%a1
jlt zerobss_loop | loop until _end reached
movel #stack_end,%d0
andl #0xfffffffc,%d0 | align it on 16 byte boundary
-
+
movw #0x3700,%sr | SUPV MODE,INTERRUPTS OFF!!!
movel %d0,%a7 | set master stack pointer
movel %d0,%a6 | set base pointer
@@ -478,17 +478,17 @@ zerobss_loop:
| Create an unhandled exception jump table. The table has an entry for
| each vector in the vector table. The entry pushes the vector number onto
| the stack and then calls a common exception handler using PIC.
-|
+|
| The macros are to create the labels and format vectors.
|
-
+
#define FORMAT_ID(n) (n << 2)
#define EXPAND(x) x
#define EXCEPTION_HANDLER(h, n) EH__##n: move.w EXPAND(h) FORMAT_ID(n),-(%sp) ; \
bra common_exception_handler
unhandled_exception:
-
+
EXCEPTION_HANDLER(#, 0)
EXCEPTION_HANDLER(#, 1)
EXCEPTION_HANDLER(#, 2)
@@ -499,7 +499,7 @@ EXCEPTION_HANDLER(#, 6)
EXCEPTION_HANDLER(#, 7)
EXCEPTION_HANDLER(#, 8)
EXCEPTION_HANDLER(#, 9)
-
+
EXCEPTION_HANDLER(#, 10)
EXCEPTION_HANDLER(#, 11)
EXCEPTION_HANDLER(#, 12)
@@ -521,7 +521,7 @@ EXCEPTION_HANDLER(#, 26)
EXCEPTION_HANDLER(#, 27)
EXCEPTION_HANDLER(#, 28)
EXCEPTION_HANDLER(#, 29)
-
+
EXCEPTION_HANDLER(#, 30)
EXCEPTION_HANDLER(#, 31)
EXCEPTION_HANDLER(#, 32)
@@ -532,7 +532,7 @@ EXCEPTION_HANDLER(#, 36)
EXCEPTION_HANDLER(#, 37)
EXCEPTION_HANDLER(#, 38)
EXCEPTION_HANDLER(#, 39)
-
+
EXCEPTION_HANDLER(#, 40)
EXCEPTION_HANDLER(#, 41)
EXCEPTION_HANDLER(#, 42)
@@ -543,7 +543,7 @@ EXCEPTION_HANDLER(#, 46)
EXCEPTION_HANDLER(#, 47)
EXCEPTION_HANDLER(#, 48)
EXCEPTION_HANDLER(#, 49)
-
+
EXCEPTION_HANDLER(#, 50)
EXCEPTION_HANDLER(#, 51)
EXCEPTION_HANDLER(#, 52)
@@ -554,7 +554,7 @@ EXCEPTION_HANDLER(#, 56)
EXCEPTION_HANDLER(#, 57)
EXCEPTION_HANDLER(#, 58)
EXCEPTION_HANDLER(#, 59)
-
+
EXCEPTION_HANDLER(#, 60)
EXCEPTION_HANDLER(#, 61)
EXCEPTION_HANDLER(#, 62)
@@ -565,7 +565,7 @@ EXCEPTION_HANDLER(#, 66)
EXCEPTION_HANDLER(#, 67)
EXCEPTION_HANDLER(#, 68)
EXCEPTION_HANDLER(#, 69)
-
+
EXCEPTION_HANDLER(#, 70)
EXCEPTION_HANDLER(#, 71)
EXCEPTION_HANDLER(#, 72)
@@ -576,7 +576,7 @@ EXCEPTION_HANDLER(#, 76)
EXCEPTION_HANDLER(#, 77)
EXCEPTION_HANDLER(#, 78)
EXCEPTION_HANDLER(#, 79)
-
+
EXCEPTION_HANDLER(#, 80)
EXCEPTION_HANDLER(#, 81)
EXCEPTION_HANDLER(#, 82)
@@ -587,7 +587,7 @@ EXCEPTION_HANDLER(#, 86)
EXCEPTION_HANDLER(#, 87)
EXCEPTION_HANDLER(#, 88)
EXCEPTION_HANDLER(#, 89)
-
+
EXCEPTION_HANDLER(#, 90)
EXCEPTION_HANDLER(#, 91)
EXCEPTION_HANDLER(#, 92)
@@ -598,7 +598,7 @@ EXCEPTION_HANDLER(#, 96)
EXCEPTION_HANDLER(#, 97)
EXCEPTION_HANDLER(#, 98)
EXCEPTION_HANDLER(#, 99)
-
+
EXCEPTION_HANDLER(#, 100)
EXCEPTION_HANDLER(#, 101)
EXCEPTION_HANDLER(#, 102)
@@ -609,7 +609,7 @@ EXCEPTION_HANDLER(#, 106)
EXCEPTION_HANDLER(#, 107)
EXCEPTION_HANDLER(#, 108)
EXCEPTION_HANDLER(#, 109)
-
+
EXCEPTION_HANDLER(#, 110)
EXCEPTION_HANDLER(#, 111)
EXCEPTION_HANDLER(#, 112)
@@ -631,7 +631,7 @@ EXCEPTION_HANDLER(#, 126)
EXCEPTION_HANDLER(#, 127)
EXCEPTION_HANDLER(#, 128)
EXCEPTION_HANDLER(#, 129)
-
+
EXCEPTION_HANDLER(#, 130)
EXCEPTION_HANDLER(#, 131)
EXCEPTION_HANDLER(#, 132)
@@ -642,7 +642,7 @@ EXCEPTION_HANDLER(#, 136)
EXCEPTION_HANDLER(#, 137)
EXCEPTION_HANDLER(#, 138)
EXCEPTION_HANDLER(#, 139)
-
+
EXCEPTION_HANDLER(#, 140)
EXCEPTION_HANDLER(#, 141)
EXCEPTION_HANDLER(#, 142)
@@ -653,7 +653,7 @@ EXCEPTION_HANDLER(#, 146)
EXCEPTION_HANDLER(#, 147)
EXCEPTION_HANDLER(#, 148)
EXCEPTION_HANDLER(#, 149)
-
+
EXCEPTION_HANDLER(#, 150)
EXCEPTION_HANDLER(#, 151)
EXCEPTION_HANDLER(#, 152)
@@ -664,7 +664,7 @@ EXCEPTION_HANDLER(#, 156)
EXCEPTION_HANDLER(#, 157)
EXCEPTION_HANDLER(#, 158)
EXCEPTION_HANDLER(#, 159)
-
+
EXCEPTION_HANDLER(#, 160)
EXCEPTION_HANDLER(#, 161)
EXCEPTION_HANDLER(#, 162)
@@ -675,7 +675,7 @@ EXCEPTION_HANDLER(#, 166)
EXCEPTION_HANDLER(#, 167)
EXCEPTION_HANDLER(#, 168)
EXCEPTION_HANDLER(#, 169)
-
+
EXCEPTION_HANDLER(#, 170)
EXCEPTION_HANDLER(#, 171)
EXCEPTION_HANDLER(#, 172)
@@ -686,7 +686,7 @@ EXCEPTION_HANDLER(#, 176)
EXCEPTION_HANDLER(#, 177)
EXCEPTION_HANDLER(#, 178)
EXCEPTION_HANDLER(#, 179)
-
+
EXCEPTION_HANDLER(#, 180)
EXCEPTION_HANDLER(#, 181)
EXCEPTION_HANDLER(#, 182)
@@ -697,7 +697,7 @@ EXCEPTION_HANDLER(#, 186)
EXCEPTION_HANDLER(#, 187)
EXCEPTION_HANDLER(#, 188)
EXCEPTION_HANDLER(#, 189)
-
+
EXCEPTION_HANDLER(#, 190)
EXCEPTION_HANDLER(#, 191)
EXCEPTION_HANDLER(#, 192)
@@ -708,7 +708,7 @@ EXCEPTION_HANDLER(#, 196)
EXCEPTION_HANDLER(#, 197)
EXCEPTION_HANDLER(#, 198)
EXCEPTION_HANDLER(#, 199)
-
+
EXCEPTION_HANDLER(#, 200)
EXCEPTION_HANDLER(#, 201)
EXCEPTION_HANDLER(#, 202)
@@ -719,7 +719,7 @@ EXCEPTION_HANDLER(#, 206)
EXCEPTION_HANDLER(#, 207)
EXCEPTION_HANDLER(#, 208)
EXCEPTION_HANDLER(#, 209)
-
+
EXCEPTION_HANDLER(#, 210)
EXCEPTION_HANDLER(#, 211)
EXCEPTION_HANDLER(#, 212)
@@ -730,7 +730,7 @@ EXCEPTION_HANDLER(#, 216)
EXCEPTION_HANDLER(#, 217)
EXCEPTION_HANDLER(#, 218)
EXCEPTION_HANDLER(#, 219)
-
+
EXCEPTION_HANDLER(#, 220)
EXCEPTION_HANDLER(#, 221)
EXCEPTION_HANDLER(#, 222)
@@ -741,7 +741,7 @@ EXCEPTION_HANDLER(#, 226)
EXCEPTION_HANDLER(#, 227)
EXCEPTION_HANDLER(#, 228)
EXCEPTION_HANDLER(#, 229)
-
+
EXCEPTION_HANDLER(#, 230)
EXCEPTION_HANDLER(#, 231)
EXCEPTION_HANDLER(#, 232)
@@ -752,7 +752,7 @@ EXCEPTION_HANDLER(#, 236)
EXCEPTION_HANDLER(#, 237)
EXCEPTION_HANDLER(#, 238)
EXCEPTION_HANDLER(#, 239)
-
+
EXCEPTION_HANDLER(#, 240)
EXCEPTION_HANDLER(#, 241)
EXCEPTION_HANDLER(#, 242)
@@ -763,15 +763,15 @@ EXCEPTION_HANDLER(#, 246)
EXCEPTION_HANDLER(#, 247)
EXCEPTION_HANDLER(#, 248)
EXCEPTION_HANDLER(#, 249)
-
+
EXCEPTION_HANDLER(#, 250)
EXCEPTION_HANDLER(#, 251)
EXCEPTION_HANDLER(#, 252)
EXCEPTION_HANDLER(#, 253)
EXCEPTION_HANDLER(#, 254)
-EXCEPTION_HANDLER(#, 255)
+EXCEPTION_HANDLER(#, 255)
-common_exception_handler:
+common_exception_handler:
|
| Need to put the format/vector above the PC and status register
@@ -792,14 +792,14 @@ common_exception_handler:
beq ceh_10
bra ceh_20
-ceh_10:
+ceh_10:
move.w %d0,12(%sp) | need to move the format/id
move.l (%sp)+,%d0 | recover d0
addq #8,%sp | trash the stack
move.l %d0,-(%sp) | free a register, again
move.w 4(%sp),%d0 | get the format/vector id
-
+
ceh_20:
move.w 6(%sp),4(%sp)
@@ -829,7 +829,7 @@ ceh_20:
move.l %d0,%a0 | need an address register for jumping
jsr %a0@(0)
-ceh_30:
+ceh_30:
jmp ceh_30
|
@@ -840,17 +840,17 @@ ceh_30:
.global vector_table
-vector_table:
+vector_table:
.space (256 * 4),0
-|
+|
| Initialised data
|
.sect .data
-
+
.global start_frame
-
+
start_frame:
.space 4,0
@@ -860,10 +860,10 @@ start_frame:
|
.sect .bss
-
+
.global environ
.align 2
-
+
environ:
.long 0
@@ -873,7 +873,7 @@ environ:
.global stack_size
.set stack_size,0x1000
.global stack_start
-
+
stack_start:
stack_base:
.space 0x2000, 0
diff --git a/c/src/lib/libbsp/m68k/ods68302/startup/bspstart.c b/c/src/lib/libbsp/m68k/ods68302/startup/bspstart.c
index eb5bde8e54..09c38108d0 100644
--- a/c/src/lib/libbsp/m68k/ods68302/startup/bspstart.c
+++ b/c/src/lib/libbsp/m68k/ods68302/startup/bspstart.c
@@ -19,7 +19,7 @@
#include <bsp.h>
#include <rtems/libio.h>
#include <rtems/libcsupport.h>
-
+
/*
* The original table from the application and our copy of it with
* some changes.
@@ -36,7 +36,7 @@ char *rtems_progname;
/*
* Use the shared implementations of the following routines
*/
-
+
void bsp_postdriver_hook(void);
void bsp_libc_init( void *, uint32_t, int );
void bsp_pretasking_hook(void); /* m68k version */
@@ -54,7 +54,7 @@ void bsp_start( void )
extern unsigned long _M68k_Ramsize;
_M68k_Ramsize = (unsigned long)&_RamSize; /* RAM size set in linker script */
-
+
#if 0
Cpu_table.interrupt_vector_table = (mc68000_isr *) 0/*&M68Kvec*/;
#endif
diff --git a/c/src/lib/libbsp/m68k/ods68302/startup/cpuboot.c b/c/src/lib/libbsp/m68k/ods68302/startup/cpuboot.c
index 29fdcf9de9..25fd3ddc75 100644
--- a/c/src/lib/libbsp/m68k/ods68302/startup/cpuboot.c
+++ b/c/src/lib/libbsp/m68k/ods68302/startup/cpuboot.c
@@ -26,9 +26,9 @@
This code executes with a valid C environment. That is the data
section has been intialised and the bss section set to 0. This phase
performs any special card initialisation and then calls boot card.
-
+
$Id$
-
+
*/
/*****************************************************************************/
@@ -62,12 +62,12 @@ void boot_phase_1()
WRITE_OR(CSEL_1, CSEL_1_SIZE, CSEL_1_WAIT_STATES, OR_MASK_RW, OR_MASK_FC);
WRITE_BR(CSEL_1, CSEL_1_BASE, BR_READ_WRITE, BR_FC_NULL, BR_ENABLED);
#endif
-
+
#if defined(CSEL_2)
WRITE_OR(CSEL_2, CSEL_2_SIZE, CSEL_2_WAIT_STATES, OR_MASK_RW, OR_MASK_FC);
WRITE_BR(CSEL_2, CSEL_2_BASE, BR_READ_WRITE, BR_FC_NULL, BR_ENABLED);
#endif
-
+
m302.reg.ipr = m302.reg.imr = m302.reg.isr = 0;
m302.reg.gimr = 0x0080;
@@ -86,7 +86,7 @@ void boot_phase_1()
#if defined(LED_CONTROL)
LED_CONTROL(LED_1_RED, LED_2_OFF, LED_3_OFF, LED_4_OFF,
LED_5_OFF, LED_6_OFF, LED_7_OFF, LED_8_OFF);
-#endif
+#endif
}
/*
@@ -96,15 +96,15 @@ void boot_phase_1()
void boot_phase_2(void)
{
uint32_t stack;
-
+
#if defined(LED_CONTROL)
LED_CONTROL(LED_1_RED, LED_2_RED, LED_3_OFF, LED_4_OFF,
LED_5_OFF, LED_6_OFF, LED_7_OFF, LED_8_OFF);
#endif
-
+
WRITE_BR(CSEL_ROM, _ROM_BASE, BR_READ_ONLY, BR_FC_NULL, BR_ENABLED);
WRITE_BR(CSEL_RAM, _RAM_BASE, BR_READ_WRITE, BR_FC_NULL, BR_ENABLED);
-
+
#if defined(LED_CONTROL)
LED_CONTROL(LED_1_GREEN, LED_2_RED, LED_3_OFF, LED_4_OFF,
LED_5_OFF, LED_6_OFF, LED_7_OFF, LED_8_OFF);
@@ -130,11 +130,11 @@ void boot_phase_3(void)
set_debug_traps();
breakpoint();
}
-
+
debug_port_banner();
-
+
/* FIXME : add RAM and ROM checks */
-
+
/* boot the bsp, what ever this means */
boot_card();
diff --git a/c/src/lib/libbsp/m68k/ods68302/startup/debugport.c b/c/src/lib/libbsp/m68k/ods68302/startup/debugport.c
index be9da857b5..7ef16eb9a8 100644
--- a/c/src/lib/libbsp/m68k/ods68302/startup/debugport.c
+++ b/c/src/lib/libbsp/m68k/ods68302/startup/debugport.c
@@ -3,7 +3,7 @@
High Level Debug Port Functions
$Id$
-
+
*/
/*****************************************************************************/
@@ -28,10 +28,10 @@ unsigned char debug_port_status(const unsigned char status)
{
if (!initialised)
{
- initialised = 1;
+ initialised = 1;
debug_port_initialise();
}
-
+
return scc_status(CONSOLE_PORT, status);
}
@@ -39,10 +39,10 @@ unsigned char debug_port_in(void)
{
if (!initialised)
{
- initialised = 1;
+ initialised = 1;
debug_port_initialise();
}
-
+
return scc_in(CONSOLE_PORT);
}
@@ -50,10 +50,10 @@ void debug_port_out(const unsigned char character)
{
if (!initialised)
{
- initialised = 1;
+ initialised = 1;
debug_port_initialise();
}
-
+
scc_out(CONSOLE_PORT, character);
}
@@ -137,7 +137,7 @@ void debug_port_printf(const char *format, ...)
written = vsprintf(buffer, format, args);
/* try an trap format buffer overflows */
- if ((buffer[BUFFER_SIZE - 2] != '\xAA') ||
+ if ((buffer[BUFFER_SIZE - 2] != '\xAA') ||
(buffer[BUFFER_SIZE - 1] != '\x55'))
{
debug_port_write("debug port buffer overflow, halting...");
@@ -155,7 +155,7 @@ void debug_port_printf(const char *format, ...)
void debug_port_banner(void)
{
#define CARD_LABEL "ods68302-" #VARIANT
-
+
debug_port_write("\n\n\r");
debug_port_write(_Copyright_Notice);
debug_port_write("\n\r " CARD_ID "\n\r");
diff --git a/c/src/lib/libbsp/m68k/ods68302/startup/gdb-hooks.c b/c/src/lib/libbsp/m68k/ods68302/startup/gdb-hooks.c
index 3c3cb72582..957535389a 100644
--- a/c/src/lib/libbsp/m68k/ods68302/startup/gdb-hooks.c
+++ b/c/src/lib/libbsp/m68k/ods68302/startup/gdb-hooks.c
@@ -1,7 +1,7 @@
/*****************************************************************************/
/*
$Id$
-
+
Hooks for GDB
*/
@@ -21,7 +21,7 @@ void putDebugChar(char ch)
scc_initialise(DEBUG_PORT, DEBUG_BAUD, 0);
initialised = 1;
}
-
+
scc_out(DEBUG_PORT, ch);
}
@@ -34,8 +34,8 @@ char getDebugChar(void)
}
while (!scc_status(DEBUG_PORT, 0));
-
- return scc_in(DEBUG_PORT);
+
+ return scc_in(DEBUG_PORT);
}
/*
@@ -65,7 +65,7 @@ static GDB_HANDLER_ENTRY gdb_jump_table[256];
void exceptionHandler(unsigned int vector, void *handler)
{
uint32_t *interrupt_table = 0;
-
+
gdb_jump_table[vector].move_a7 = M68K_MOVE_A7;
gdb_jump_table[vector].format_id = vector;
gdb_jump_table[vector].jmp = M68K_JMP;
diff --git a/c/src/lib/libbsp/m68k/ods68302/startup/m68302scc.c b/c/src/lib/libbsp/m68k/ods68302/startup/m68302scc.c
index 542ad8d9ad..4b7c7d9440 100644
--- a/c/src/lib/libbsp/m68k/ods68302/startup/m68302scc.c
+++ b/c/src/lib/libbsp/m68k/ods68302/startup/m68302scc.c
@@ -1,7 +1,7 @@
/*****************************************************************************/
/*
$Id$
-
+
M68302 SCC Polled Driver
*/
@@ -27,29 +27,29 @@ static const uint16_t baud_clocks[] =
(SYSTEM_CLOCK / ( 57600 * 16)),
(SYSTEM_CLOCK / (115700 * 16))
};
-
+
void scc_initialise(int channel, int baud, int translate)
{
uint16_t scon;
-
+
if (channel < M68302_SCC_COUNT)
{
scc[channel] = &m302.scc1 + channel;
scc_reg[channel] = &m302.reg.scc[channel];
scc_translate[channel] = translate;
-
+
scon = (baud_clocks[baud] & 0xF800) == 0 ? 0 : 1;
scon |= (((baud_clocks[baud] / (1 + scon * 3)) - 1) << 1) & 0x0FFE;
-
+
scc_reg[channel]->scon = scon;
scc_reg[channel]->scm = 0x0171;
- scc[channel]->bd.tx[0].status = 0x2000;
+ scc[channel]->bd.tx[0].status = 0x2000;
scc[channel]->bd.tx[0].length = 0;
scc[channel]->bd.tx[0].buffer =
(uint8_t*) &(scc[channel]->bd.tx[1].buffer);
- scc[channel]->bd.rx[0].status = 0x2000;
+ scc[channel]->bd.rx[0].status = 0x2000;
scc[channel]->bd.rx[0].length = 0;
scc[channel]->bd.rx[0].buffer =
(uint8_t*) &(scc[channel]->bd.rx[1].buffer);
@@ -73,7 +73,7 @@ void scc_initialise(int channel, int baud, int translate)
scc_reg[channel]->sccm = 0x15;
scc_reg[channel]->scm = 0x17d;
- }
+ }
}
unsigned char scc_status(int channel, unsigned char status)
@@ -84,7 +84,7 @@ unsigned char scc_status(int channel, unsigned char status)
if ((channel < M68302_SCC_COUNT) && scc[channel])
{
- rx_status = scc[channel]->bd.rx[0].status;
+ rx_status = scc[channel]->bd.rx[0].status;
if ((rx_status & 0x8000) == 0)
{
@@ -98,7 +98,7 @@ unsigned char scc_status(int channel, unsigned char status)
}
}
}
-
+
return 0;
}
@@ -115,11 +115,11 @@ unsigned char scc_in(int channel)
c = *(scc[channel]->bd.rx[0].buffer);
scc[channel]->bd.rx[0].status = 0xa000;
-
+
return c;
}
}
-
+
return 0;
}
@@ -139,11 +139,11 @@ void scc_out(int channel, unsigned char character)
scc[channel]->bd.tx[0].status = 0xa000;
if (scc_translate[channel])
- {
+ {
if (character == '\n')
- {
+ {
scc_out(channel, '\r');
}
}
- }
+ }
}
diff --git a/c/src/lib/libbsp/m68k/ods68302/startup/m68k-stub.c b/c/src/lib/libbsp/m68k/ods68302/startup/m68k-stub.c
index cf9b4c2e39..95e404677f 100644
--- a/c/src/lib/libbsp/m68k/ods68302/startup/m68k-stub.c
+++ b/c/src/lib/libbsp/m68k/ods68302/startup/m68k-stub.c
@@ -1,9 +1,9 @@
/****************************************************************************
- THIS SOFTWARE IS NOT COPYRIGHTED
-
+ THIS SOFTWARE IS NOT COPYRIGHTED
+
HP offers the following for use in the public domain. HP makes no
- warranty with regard to the software or it's performance and the
+ warranty with regard to the software or it's performance and the
user accepts the software "AS IS" with all faults.
HP DISCLAIMS ANY WARRANTIES, EXPRESS OR IMPLIED, WITH REGARD
@@ -13,22 +13,22 @@
****************************************************************************/
/****************************************************************************
- * Header: remcom.c,v 1.34 91/03/09 12:29:49 glenne Exp $
+ * Header: remcom.c,v 1.34 91/03/09 12:29:49 glenne Exp $
*
- * Module name: remcom.c $
+ * Module name: remcom.c $
* Revision: 1.34 $
* Date: 91/03/09 12:29:49 $
* Contributor: Lake Stevens Instrument Division$
- *
+ *
* Description: low level support for gdb debugger. $
*
* Considerations: only works on target hardware $
*
* Written by: Glenn Engel $
- * ModuleState: Experimental $
+ * ModuleState: Experimental $
*
* NOTES: See Below $
- *
+ *
* To enable debugger support, two things need to happen. One, a
* call to set_debug_traps() is necessary in order to allow any breakpoints
* or error conditions to be properly intercepted and reported to gdb.
@@ -39,15 +39,15 @@
* there either should be a standard breakpoint instruction, or the protocol
* should be extended to provide some means to communicate which breakpoint
* instruction is in use (or have the stub insert the breakpoint).
- *
+ *
* Some explanation is probably necessary to explain how exceptions are
* handled. When an exception is encountered the 68000 pushes the current
* program counter and status register onto the supervisor stack and then
* transfers execution to a location specified in it's vector table.
* The handlers for the exception vectors are hardwired to jmp to an address
- * given by the relation: (exception - 256) * 6. These are decending
+ * given by the relation: (exception - 256) * 6. These are decending
* addresses starting from -6, -12, -18, ... By allowing 6 bytes for
- * each entry, a jsr, jmp, bsr, ... can be used to enter the exception
+ * each entry, a jsr, jmp, bsr, ... can be used to enter the exception
* handler. Using a jsr to handle an exception has an added benefit of
* allowing a single handler to service several exceptions and use the
* return address as the key differentiation. The vector number can be
@@ -59,50 +59,50 @@
* For 68020 machines, the ability to have a return address around just
* so the vector can be determined is not necessary because the '020 pushes an
* extra word onto the stack containing the vector offset
- *
+ *
* Because gdb will sometimes write to the stack area to execute function
* calls, this program cannot rely on using the supervisor stack so it
- * uses it's own stack area reserved in the int array remcomStack.
- *
+ * uses it's own stack area reserved in the int array remcomStack.
+ *
*************
*
* The following gdb commands are supported:
- *
+ *
* command function Return value
- *
+ *
* g return the value of the CPU registers hex data or ENN
* G set the value of the CPU registers OK or ENN
- *
+ *
* mAA..AA,LLLL Read LLLL bytes at address AA..AA hex data or ENN
* MAA..AA,LLLL: Write LLLL bytes at address AA.AA OK or ENN
- *
+ *
* c Resume at current address SNN ( signal NN)
* cAA..AA Continue at address AA..AA SNN
- *
+ *
* s Step one instruction SNN
* sAA..AA Step one instruction from AA..AA SNN
- *
+ *
* k kill
*
* ? What was the last sigval ? SNN (signal NN)
- *
- * All commands and responses are sent with a packet which includes a
- * checksum. A packet consists of
- *
+ *
+ * All commands and responses are sent with a packet which includes a
+ * checksum. A packet consists of
+ *
* $<packet info>#<checksum>.
- *
+ *
* where
* <packet info> :: <characters representing the command or response>
* <checksum> :: < two hex digits computed as modulo 256 sum of <packetinfo>>
- *
+ *
* When a packet is received, it is first acknowledged with either '+' or '-'.
* '+' indicates a successful transfer. '-' indicates a failed transfer.
- *
+ *
* Example:
- *
+ *
* Host: Reply:
* $m0,10#2a +$00010203040506070809101112131415#42
- *
+ *
* $Id$
*
****************************************************************************/
@@ -116,7 +116,7 @@
/************************************************************************
*
- * external low-level support routines
+ * external low-level support routines
*/
typedef void (*ExceptionHook)(int); /* pointer to function with int parm */
typedef void (*Function)(void); /* pointer to a function */
@@ -153,15 +153,15 @@ void breakpoint(void);
static char initialized; /* boolean flag. != 0 means we've been initialized */
int remote_debug;
-/* debug > 0 prints ill-formed commands in valid packets & checksum errors */
+/* debug > 0 prints ill-formed commands in valid packets & checksum errors */
static const char hexchars[]="0123456789abcdef";
/* there are 180 bytes of registers on a 68020 w/68881 */
/* many of the fpa registers are 12 byte (96 bit) registers */
#define NUMREGBYTES 180
-enum regnames {D0,D1,D2,D3,D4,D5,D6,D7,
- A0,A1,A2,A3,A4,A5,A6,A7,
+enum regnames {D0,D1,D2,D3,D4,D5,D6,D7,
+ A0,A1,A2,A3,A4,A5,A6,A7,
PS,PC,
FP0,FP1,FP2,FP3,FP4,FP5,FP6,FP7,
FPCONTROL,FPSTATUS,FPIADDR
@@ -205,7 +205,7 @@ static int* stackPtr = &remcomStack[STACKSIZE/sizeof(int) - 1];
/*
* In many cases, the system will want to continue exception processing
- * when a continue command is given.
+ * when a continue command is given.
* oldExceptionHook is a function to invoke in this case.
*/
@@ -351,11 +351,11 @@ extern void _catchException(void);
* stack on entry: stack on exit:
* N bytes of junk exception # MSWord
* Exception Format Word exception # MSWord
- * Program counter LSWord
- * Program counter MSWord
- * Status Register
- *
- *
+ * Program counter LSWord
+ * Program counter MSWord
+ * Status Register
+ *
+ *
*/
asm(" \n\
.text\n\
@@ -371,7 +371,7 @@ asm("\n\
moveml %d0-%d7/%a0-%a6,registers /* save registers */\n\
movel lastFrame,%a0 /* last frame pointer */\n\
");
-SAVE_FP_REGS();
+SAVE_FP_REGS();
asm("\n\
lea registers,%a5 /* get address of registers */\n\
movew %sp@,%d1 /* get status register */\n\
@@ -445,14 +445,14 @@ a7saveDone:\n\
/* This function is called when an exception occurs. It translates the
* return address found on the stack into an exception vector # which
* is then handled by either handle_exception or a system handler.
- * _catchException provides a front end for both.
+ * _catchException provides a front end for both.
*
* stack on entry: stack on exit:
- * Program counter MSWord exception # MSWord
+ * Program counter MSWord exception # MSWord
* Program counter LSWord exception # MSWord
- * Status Register
- * Return Address MSWord
- * Return Address LSWord
+ * Status Register
+ * Return Address MSWord
+ * Return Address LSWord
*/
asm("\n\
.text\n\
@@ -466,7 +466,7 @@ asm("\n\
movel lastFrame,%a0 /* last frame pointer */\n\
");
-SAVE_FP_REGS();
+SAVE_FP_REGS();
asm("\n\
moveq.l #0,%d2\n\
movew %sp@+,%d2\n\
@@ -566,7 +566,7 @@ void _returnFromException(Frame *frame)
frame->pc = registers[(int) PC];
if (registers[(int) PS] & 0x2000)
- {
+ {
/* return to supervisor mode... */
return_to_super();
}
@@ -592,15 +592,15 @@ void getpacket(char *buffer)
int i;
int count;
char ch;
-
+
do {
/* wait around for the start character, ignore all other characters */
- while ((ch = (getDebugChar() & 0x7f)) != '$');
+ while ((ch = (getDebugChar() & 0x7f)) != '$');
checksum = 0;
xmitcsum = -1;
-
+
count = 0;
-
+
/* now, read until a # or end of buffer is found */
while (count < BUFMAX) {
ch = getDebugChar() & 0x7f;
@@ -618,8 +618,8 @@ void getpacket(char *buffer)
debug_port_printf ("bad checksum. My count = 0x%x, sent=0x%x. buf=%s\n",
checksum,xmitcsum,buffer);
}
-
- if (checksum != xmitcsum) putDebugChar('-'); /* failed checksum */
+
+ if (checksum != xmitcsum) putDebugChar('-'); /* failed checksum */
else {
putDebugChar('+'); /* successful transfer */
/* if a sequence char is present, reply the sequence ID */
@@ -629,13 +629,13 @@ void getpacket(char *buffer)
/* remove sequence chars from buffer */
count = strlen(buffer);
for (i=3; i <= count; i++) buffer[i-3] = buffer[i];
- }
- }
- }
- } while (checksum != xmitcsum);
+ }
+ }
+ }
+ } while (checksum != xmitcsum);
}
-/* send the packet in buffer. The host get's one chance to read it.
+/* send the packet in buffer. The host get's one chance to read it.
This routine does not wait for a positive acknowledge. */
@@ -645,25 +645,25 @@ putpacket(char *buffer)
unsigned char checksum;
int count;
char ch;
-
+
/* $<packet info>#<checksum>. */
do {
putDebugChar('$');
checksum = 0;
count = 0;
-
+
while ((ch=buffer[count])) {
if (! putDebugChar(ch)) return;
checksum += ch;
count += 1;
}
-
+
putDebugChar('#');
putDebugChar(hexchars[checksum >> 4]);
putDebugChar(hexchars[checksum % 16]);
} while (1 == 0); /* (getDebugChar() != '+'); */
-
+
}
char remcomInBuffer[BUFMAX];
@@ -676,16 +676,16 @@ char *mem2hex(char *mem, char *buf, int count)
{
int i;
unsigned char ch;
-
+
if (remote_debug)
- debug_port_printf("mem=0x%x, count=0x%x\n", mem, count);
-
+ debug_port_printf("mem=0x%x, count=0x%x\n", mem, count);
+
for (i=0;i<count;i++) {
ch = *mem++;
*buf++ = hexchars[ch >> 4];
*buf++ = hexchars[ch % 16];
}
- *buf = 0;
+ *buf = 0;
return(buf);
}
@@ -695,10 +695,10 @@ char *hex2mem(char *buf, char *mem, int count)
{
int i;
unsigned char ch;
-
+
if (remote_debug)
- debug_port_printf("mem=0x%x, count=0x%x\n", mem, count);
-
+ debug_port_printf("mem=0x%x, count=0x%x\n", mem, count);
+
for (i=0;i<count;i++) {
ch = hex(*buf++) << 4;
ch = ch + hex(*buf++);
@@ -715,7 +715,7 @@ void handle_buserror()
longjmp(remcomEnv,1);
}
-/* this function takes the 68000 exception number and attempts to
+/* this function takes the 68000 exception number and attempts to
translate this number into a unix compatible signal value */
int computeSignal(int exceptionVector)
{
@@ -752,7 +752,7 @@ int computeSignal(int exceptionVector)
case 52: sigval = 8; break; /* operand error */
case 53: sigval = 8; break; /* overflow */
case 54: sigval = 8; break; /* NAN */
- default:
+ default:
sigval = 7; /* "software generated"*/
}
return (sigval);
@@ -766,7 +766,7 @@ int hexToInt(char **ptr, int *intValue)
{
int numChars = 0;
int hexValue;
-
+
*intValue = 0;
while (**ptr)
@@ -779,7 +779,7 @@ int hexToInt(char **ptr, int *intValue)
}
else
break;
-
+
(*ptr)++;
}
@@ -796,11 +796,11 @@ void handle_exception(int exceptionVector)
char * ptr;
int newPC;
Frame *frame;
-
+
if (remote_debug)
- printf("vector=%d, sr=0x%x, pc=0x%x\n",
+ printf("vector=%d, sr=0x%x, pc=0x%x\n",
exceptionVector,
- registers[ PS ],
+ registers[ PS ],
registers[ PC ]);
/* reply to host that an exception has occurred */
@@ -810,9 +810,9 @@ void handle_exception(int exceptionVector)
remcomOutBuffer[2] = hexchars[sigval % 16];
remcomOutBuffer[3] = 0;
- putpacket(remcomOutBuffer);
+ putpacket(remcomOutBuffer);
- while (1==1) {
+ while (1==1) {
error = 0;
remcomOutBuffer[0] = 0;
getpacket(remcomInBuffer);
@@ -821,19 +821,19 @@ void handle_exception(int exceptionVector)
remcomOutBuffer[1] = hexchars[sigval >> 4];
remcomOutBuffer[2] = hexchars[sigval % 16];
remcomOutBuffer[3] = 0;
- break;
+ break;
case 'd' :
remote_debug = !(remote_debug); /* toggle debug flag */
debug_port_printf("debug mode ");
if (remote_debug)
- {
+ {
debug_port_printf("on\n");
}
else
- {
+ {
debug_port_printf("off\n");
- }
- break;
+ }
+ break;
case 'g' : /* return the value of the CPU registers */
mem2hex((char*) registers, remcomOutBuffer, NUMREGBYTES);
break;
@@ -841,18 +841,18 @@ void handle_exception(int exceptionVector)
hex2mem(&remcomInBuffer[1], (char*) registers, NUMREGBYTES);
strcpy(remcomOutBuffer,"OK");
break;
-
+
/* mAA..AA,LLLL Read LLLL bytes at address AA..AA */
- case 'm' :
+ case 'm' :
if (setjmp(remcomEnv) == 0)
{
- exceptionHandler(2,handle_buserror);
+ exceptionHandler(2,handle_buserror);
/* TRY TO READ %x,%x. IF SUCCEED, SET PTR = 0 */
ptr = &remcomInBuffer[1];
if (hexToInt(&ptr,&addr))
if (*(ptr++) == ',')
- if (hexToInt(&ptr,&length))
+ if (hexToInt(&ptr,&length))
{
ptr = 0;
mem2hex((char*) addr, remcomOutBuffer, length);
@@ -863,24 +863,24 @@ void handle_exception(int exceptionVector)
strcpy(remcomOutBuffer,"E01");
if (remote_debug)
printf("malformed read memory command: %s",remcomInBuffer);
- }
- }
+ }
+ }
else {
- exceptionHandler(2,_catchException);
+ exceptionHandler(2,_catchException);
strcpy(remcomOutBuffer,"E03");
if (remote_debug)
printf("bus error");
- }
-
+ }
+
/* restore handler for bus error */
- exceptionHandler(2,_catchException);
+ exceptionHandler(2,_catchException);
break;
-
+
/* MAA..AA,LLLL: Write LLLL bytes at address AA.AA return OK */
- case 'M' :
+ case 'M' :
if (setjmp(remcomEnv) == 0) {
- exceptionHandler(2,handle_buserror);
-
+ exceptionHandler(2,handle_buserror);
+
/* TRY TO READ '%x,%x:'. IF SUCCEED, SET PTR = 0 */
ptr = &remcomInBuffer[1];
if (hexToInt(&ptr,&addr))
@@ -897,43 +897,43 @@ void handle_exception(int exceptionVector)
strcpy(remcomOutBuffer,"E02");
if (remote_debug)
printf("malformed write memory command: %s",remcomInBuffer);
- }
- }
+ }
+ }
else {
- exceptionHandler(2,_catchException);
+ exceptionHandler(2,_catchException);
strcpy(remcomOutBuffer,"E03");
if (remote_debug)
printf("bus error");
- }
+ }
/* restore handler for bus error */
- exceptionHandler(2,_catchException);
+ exceptionHandler(2,_catchException);
break;
-
+
/* cAA..AA Continue at address AA..AA(optional) */
/* sAA..AA Step one instruction from AA..AA(optional) */
- case 'c' :
- case 's' :
+ case 'c' :
+ case 's' :
/* try to read optional parameter, pc unchanged if no parm */
ptr = &remcomInBuffer[1];
if (hexToInt(&ptr,&addr))
registers[ PC ] = addr;
-
+
newPC = registers[ PC];
-
+
/* clear the trace bit */
registers[ PS ] &= 0x7fff;
-
+
/* set the trace bit if we're stepping */
if (remcomInBuffer[0] == 's') registers[ PS ] |= 0x8000;
-
+
/*
* look for newPC in the linked list of exception frames.
* if it is found, use the old frame it. otherwise,
* fake up a dummy frame in returnFromException().
*/
if (remote_debug) debug_port_printf("new pc = 0x%x\n",newPC);
-
+
frame = lastFrame;
while (frame)
{
@@ -951,24 +951,24 @@ void handle_exception(int exceptionVector)
(frame->exceptionPC == newPC)) break;
if (frame == frame->previous)
{
- frame = 0; /* no match found */
- break;
+ frame = 0; /* no match found */
+ break;
}
frame = frame->previous;
}
-
+
/*
* If we found a match for the PC AND we are not returning
* as a result of a breakpoint (33),
* trace exception (9), nmi (31), jmp to
* the old exception handler as if this code never ran.
*/
- if (frame)
+ if (frame)
{
- if ((frame->exceptionVector != 9) &&
- (frame->exceptionVector != 31) &&
+ if ((frame->exceptionVector != 9) &&
+ (frame->exceptionVector != 31) &&
(frame->exceptionVector != 33))
- {
+ {
/*
* invoke the previous handler.
*/
@@ -986,13 +986,13 @@ void handle_exception(int exceptionVector)
_returnFromException( frame ); /* this is a jump */
}
}
- }
+ }
/* if we couldn't find a frame, create one */
if (frame == 0)
{
frame = lastFrame -1 ;
-
+
/* by using a bunch of print commands with breakpoints,
it's possible for the frame stack to creep down. If it creeps
too far, give up and reset it to the top. Normal use should
@@ -1001,28 +1001,28 @@ void handle_exception(int exceptionVector)
if ((unsigned int) (frame-2) < (unsigned int) &gdbFrameStack)
{
initializeRemcomErrorFrame();
- frame = lastFrame;
+ frame = lastFrame;
}
frame->previous = lastFrame;
lastFrame = frame;
- frame = 0; /* null so _return... will properly initialize it */
- }
-
+ frame = 0; /* null so _return... will properly initialize it */
+ }
+
_returnFromException( frame ); /* this is a jump */
break;
-
+
/* kill the program */
case 'k' :
/* reset the board */
WATCHDOG_TRIGGER();
while (1 == 1);
break;
-
- } /* switch */
-
+
+ } /* switch */
+
/* reply to the request */
- putpacket(remcomOutBuffer);
+ putpacket(remcomOutBuffer);
}
}
@@ -1033,13 +1033,13 @@ void initializeRemcomErrorFrame()
lastFrame->previous = lastFrame;
}
-/* this function is used to set up exception handlers for tracing and
+/* this function is used to set up exception handlers for tracing and
breakpoints */
void set_debug_traps()
{
extern void _debug_level7(void);
extern void remcomHandler(void);
-
+
int exception;
initializeRemcomErrorFrame();
@@ -1047,39 +1047,39 @@ void set_debug_traps()
registers[ PC ] = 0x400;
registers[ PS ] = 0x2700;
-
+
for (exception = 2; exception <= 30; exception++)
- exceptionHandler(exception,_catchException);
+ exceptionHandler(exception,_catchException);
/* level 7 interrupt */
- exceptionHandler(31,_debug_level7);
-
+ exceptionHandler(31,_debug_level7);
+
for (exception = 32; exception <= 47; exception++)
- exceptionHandler(exception,_catchException);
+ exceptionHandler(exception,_catchException);
/* exclude the unassigned, reserved vector locations */
-
+
for (exception = 64; exception <= 255; exception++)
- exceptionHandler(exception,_catchException);
+ exceptionHandler(exception,_catchException);
if (oldExceptionHook != (ExceptionHook) remcomHandler)
{
oldExceptionHook = exceptionHook;
exceptionHook = (ExceptionHook) remcomHandler;
}
-
+
initialized = 1;
-#if defined(UPDATE_DISPLAY)
+#if defined(UPDATE_DISPLAY)
UPDATE_DISPLAY("gdb ");
-#endif
+#endif
}
/* This function will generate a breakpoint exception. It is used at the
beginning of a program to sync up with a debugger and can be used
otherwise as a quick means to stop program execution and "break" into
the debugger. */
-
+
void breakpoint()
{
if (initialized) BREAKPOINT();
diff --git a/c/src/lib/libbsp/m68k/ods68302/startup/memcheck.c b/c/src/lib/libbsp/m68k/ods68302/startup/memcheck.c
index 4341a88e37..140a62e1e5 100644
--- a/c/src/lib/libbsp/m68k/ods68302/startup/memcheck.c
+++ b/c/src/lib/libbsp/m68k/ods68302/startup/memcheck.c
@@ -8,7 +8,7 @@
The boot test is a minimal, non-desctructive.
The partial memory test performs a scetion at a time, and gets
called in a repeated fashion to completely check the memory,
-
+
*/
/*****************************************************************************/
diff --git a/c/src/lib/libbsp/m68k/ods68302/startup/trace.c b/c/src/lib/libbsp/m68k/ods68302/startup/trace.c
index a712c0bb52..7d0945bc9a 100644
--- a/c/src/lib/libbsp/m68k/ods68302/startup/trace.c
+++ b/c/src/lib/libbsp/m68k/ods68302/startup/trace.c
@@ -1,7 +1,7 @@
/*****************************************************************************/
/*
$Id$
-
+
Trace Exception dumps a back trace to the debug serial port
*/
@@ -135,13 +135,13 @@ void trace_exception(unsigned long d0,
}
else
{
- debug_port_out(' ');
+ debug_port_out(' ');
}
-
+
ch = (*(((char*) &index) + index) >> 4) & 0x0F;
-
+
if (ch < 10)
- {
+ {
ch += '0';
}
else
@@ -152,9 +152,9 @@ void trace_exception(unsigned long d0,
debug_port_out((char) ch);
ch = *(((char*) &index) + index) & 0x0F;
-
+
if (ch < 10)
- {
+ {
ch += '0';
}
else
@@ -167,9 +167,9 @@ void trace_exception(unsigned long d0,
debug_port_write("\nhalting cpu...");
#if defined(UPDATE_DISPLAY)
- UPDATE_DISPLAY("HALT");
+ UPDATE_DISPLAY("HALT");
#endif
-
+
WATCHDOG_TRIGGER();
while (1 == 1);
}
diff --git a/c/src/lib/libbsp/m68k/ods68302/timer/timer.c b/c/src/lib/libbsp/m68k/ods68302/timer/timer.c
index 6e53830bdf..b3927487c7 100644
--- a/c/src/lib/libbsp/m68k/ods68302/timer/timer.c
+++ b/c/src/lib/libbsp/m68k/ods68302/timer/timer.c
@@ -6,7 +6,7 @@
*
* Output parameters: NONE
*
- * NOTE: It is important that the timer start/stop overhead be
+ * NOTE: It is important that the timer start/stop overhead be
* determined when porting or modifying this code.
*
* COPYRIGHT (c) 1989-1999.
diff --git a/c/src/lib/libbsp/m68k/shared/bspspuriousinit.c b/c/src/lib/libbsp/m68k/shared/bspspuriousinit.c
index db17841227..86ae13a3f1 100644
--- a/c/src/lib/libbsp/m68k/shared/bspspuriousinit.c
+++ b/c/src/lib/libbsp/m68k/shared/bspspuriousinit.c
@@ -1,7 +1,7 @@
/*
* CXX Spurious Trap Handler Install Routine
*
- * This is just enough of a trap handler to let us know what
+ * This is just enough of a trap handler to let us know what
* the likely source of the trap was.
*
* COPYRIGHT (c) 1989-1999.
@@ -20,7 +20,7 @@
/*
* bsp_spurious_initialize
*
- * Install the spurious handler for most vectors.
+ * Install the spurious handler for most vectors.
*/
rtems_isr bsp_spurious_handler(
diff --git a/c/src/lib/libbsp/m68k/shared/gdbstub/gdb_if.h b/c/src/lib/libbsp/m68k/shared/gdbstub/gdb_if.h
index 6d7b94effb..5dbb72185c 100644
--- a/c/src/lib/libbsp/m68k/shared/gdbstub/gdb_if.h
+++ b/c/src/lib/libbsp/m68k/shared/gdbstub/gdb_if.h
@@ -55,7 +55,7 @@ int rtems_gdb_stub_get_current_thread(void);
int rtems_gdb_stub_get_next_thread(int);
int rtems_gdb_stub_get_offsets(
unsigned char **text_addr,
- unsigned char **data_addr,
+ unsigned char **data_addr,
unsigned char **bss_addr
);
int rtems_gdb_stub_get_thread_regs(
@@ -66,7 +66,7 @@ int rtems_gdb_stub_set_thread_regs(
int thread,
unsigned int *registers
);
-void rtems_gdb_process_query(
+void rtems_gdb_process_query(
char *inbuffer,
char *outbuffer,
int do_threads,
@@ -77,8 +77,8 @@ void rtems_gdb_process_query(
/* there are 180 bytes of registers on a 68020 w/68881 */
/* many of the fpa registers are 12 byte (96 bit) registers */
#define NUMREGBYTES 180
-enum regnames {D0,D1,D2,D3,D4,D5,D6,D7,
- A0,A1,A2,A3,A4,A5,A6,A7,
+enum regnames {D0,D1,D2,D3,D4,D5,D6,D7,
+ A0,A1,A2,A3,A4,A5,A6,A7,
PS,PC,
FP0,FP1,FP2,FP3,FP4,FP5,FP6,FP7,
FPCONTROL,FPSTATUS,FPIADDR
diff --git a/c/src/lib/libbsp/m68k/shared/gdbstub/m68k-stub.c b/c/src/lib/libbsp/m68k/shared/gdbstub/m68k-stub.c
index 4599dba2db..4ad7482f27 100644
--- a/c/src/lib/libbsp/m68k/shared/gdbstub/m68k-stub.c
+++ b/c/src/lib/libbsp/m68k/shared/gdbstub/m68k-stub.c
@@ -1,10 +1,10 @@
#define GDB_STUB_ENABLE_THREAD_SUPPORT 1
/****************************************************************************
- THIS SOFTWARE IS NOT COPYRIGHTED
-
+ THIS SOFTWARE IS NOT COPYRIGHTED
+
HP offers the following for use in the public domain. HP makes no
- warranty with regard to the software or it's performance and the
+ warranty with regard to the software or it's performance and the
user accepts the software "AS IS" with all faults.
HP DISCLAIMS ANY WARRANTIES, EXPRESS OR IMPLIED, WITH REGARD
@@ -14,22 +14,22 @@
****************************************************************************/
/****************************************************************************
- * Header: remcom.c,v 1.34 91/03/09 12:29:49 glenne Exp $
+ * Header: remcom.c,v 1.34 91/03/09 12:29:49 glenne Exp $
*
- * Module name: remcom.c $
+ * Module name: remcom.c $
* Revision: 1.34 $
* Date: 91/03/09 12:29:49 $
* Contributor: Lake Stevens Instrument Division$
- *
+ *
* Description: low level support for gdb debugger. $
*
* Considerations: only works on target hardware $
*
* Written by: Glenn Engel $
- * ModuleState: Experimental $
+ * ModuleState: Experimental $
*
* NOTES: See Below $
- *
+ *
* To enable debugger support, two things need to happen. One, a
* call to set_debug_traps() is necessary in order to allow any breakpoints
* or error conditions to be properly intercepted and reported to gdb.
@@ -40,15 +40,15 @@
* there either should be a standard breakpoint instruction, or the protocol
* should be extended to provide some means to communicate which breakpoint
* instruction is in use (or have the stub insert the breakpoint).
- *
+ *
* Some explanation is probably necessary to explain how exceptions are
* handled. When an exception is encountered the 68000 pushes the current
* program counter and status register onto the supervisor stack and then
* transfers execution to a location specified in it's vector table.
* The handlers for the exception vectors are hardwired to jmp to an address
- * given by the relation: (exception - 256) * 6. These are decending
+ * given by the relation: (exception - 256) * 6. These are decending
* addresses starting from -6, -12, -18, ... By allowing 6 bytes for
- * each entry, a jsr, jmp, bsr, ... can be used to enter the exception
+ * each entry, a jsr, jmp, bsr, ... can be used to enter the exception
* handler. Using a jsr to handle an exception has an added benefit of
* allowing a single handler to service several exceptions and use the
* return address as the key differentiation. The vector number can be
@@ -60,50 +60,50 @@
* For 68020 machines, the ability to have a return address around just
* so the vector can be determined is not necessary because the '020 pushes an
* extra word onto the stack containing the vector offset
- *
+ *
* Because gdb will sometimes write to the stack area to execute function
* calls, this program cannot rely on using the supervisor stack so it
- * uses it's own stack area reserved in the int array remcomStack.
- *
+ * uses it's own stack area reserved in the int array remcomStack.
+ *
*************
*
* The following gdb commands are supported:
- *
+ *
* command function Return value
- *
+ *
* g return the value of the CPU registers hex data or ENN
* G set the value of the CPU registers OK or ENN
- *
+ *
* mAA..AA,LLLL Read LLLL bytes at address AA..AA hex data or ENN
* MAA..AA,LLLL: Write LLLL bytes at address AA.AA OK or ENN
- *
+ *
* c Resume at current address SNN ( signal NN)
* cAA..AA Continue at address AA..AA SNN
- *
+ *
* s Step one instruction SNN
* sAA..AA Step one instruction from AA..AA SNN
- *
+ *
* k kill
*
* ? What was the last sigval ? SNN (signal NN)
- *
- * All commands and responses are sent with a packet which includes a
- * checksum. A packet consists of
- *
+ *
+ * All commands and responses are sent with a packet which includes a
+ * checksum. A packet consists of
+ *
* $<packet info>#<checksum>.
- *
+ *
* where
* <packet info> :: <characters representing the command or response>
* <checksum> :: < two hex digits computed as modulo 256 sum of <packetinfo>>
- *
+ *
* When a packet is received, it is first acknowledged with either '+' or '-'.
* '+' indicates a successful transfer. '-' indicates a failed transfer.
- *
+ *
* Example:
- *
+ *
* Host: Reply:
* $m0,10#2a +$00010203040506070809101112131415#42
- *
+ *
***************************************************************************
* added 05/27/02 by IMD, Thomas Doerfler:
* XAA..AA,LLLL: Write LLLL binary bytes at address AA.AA OK or ENN
@@ -124,7 +124,7 @@ int current_thread_registers[NUMREGBYTES/4];
/************************************************************************
*
- * external low-level support routines
+ * external low-level support routines
*/
typedef void (*ExceptionHook)(int); /* pointer to function with int parm */
typedef void (*Function)(); /* pointer to a function */
@@ -148,7 +148,7 @@ initializeRemcomErrorFrame ();
static char initialized; /* boolean flag. != 0 means we've been initialized */
int remote_debug;
-/* debug > 0 prints ill-formed commands in valid packets & checksum errors */
+/* debug > 0 prints ill-formed commands in valid packets & checksum errors */
const char gdb_hexchars[]="0123456789abcdef";
#define highhex(x) gdb_hexchars [(x >> 4) & 0xf]
@@ -193,12 +193,12 @@ static int* stackPtr = &remcomStack[STACKSIZE/sizeof(int) - 1];
/*
* In many cases, the system will want to continue exception processing
- * when a continue command is given.
+ * when a continue command is given.
* oldExceptionHook is a function to invoke in this case.
*/
static ExceptionHook oldExceptionHook;
-/* the size of the exception stack on the 68020/30/40/CPU32 varies with
+/* the size of the exception stack on the 68020/30/40/CPU32 varies with
* the type of exception. The following table is the number of WORDS used
* for each exception format.
* This table should be common for all 68k with VBR
@@ -217,7 +217,7 @@ jmp_buf remcomEnv;
/* do an fsave, then remember the address to begin a restore from */
#define SAVE_FP_REGS() asm(" fsave -(%a0)"); \
asm(" fmovem.x %fp0-%fp7,registers+72"); \
- asm(" fmovem.l %fpcr/%fpsr/%fpi,registers+168");
+ asm(" fmovem.l %fpcr/%fpsr/%fpi,registers+168");
#define RESTORE_FP_REGS() \
asm(" \n\
fmovem.l registers+168,%fpcr/%fpsr/%fpi \n\
@@ -255,9 +255,9 @@ void m68k_exceptionHandler
ExceptionHook exceptionHook; /* hook variable for errors/exceptions */
-void m68k_stub_dummy_asm_wrapper()
+void m68k_stub_dummy_asm_wrapper()
/*
- * this dummy wrapper function ensures,
+ * this dummy wrapper function ensures,
* that the C compiler manages sections properly
*/
{
@@ -289,9 +289,9 @@ copyUserLoop: \n\
move.w -(%a1),-(%sp) \n\
dbf %d0,copyUserLoop \n\
");
- RESTORE_FP_REGS()
- asm(" movem.l registers,%d0-%d7/%a0-%a6");
- asm(" rte"); /* pop and go! */
+ RESTORE_FP_REGS()
+ asm(" movem.l registers,%d0-%d7/%a0-%a6");
+ asm(" rte"); /* pop and go! */
#define DISABLE_INTERRUPTS() asm(" oriw #0x0700,%sr");
#define BREAKPOINT() asm(" trap #2");
@@ -333,11 +333,11 @@ asm(" rte");
* stack on entry: stack on exit:
* N bytes of junk exception # MSWord
* Exception Format Word exception # MSWord
- * Program counter LSWord
- * Program counter MSWord
- * Status Register
- *
- *
+ * Program counter LSWord
+ * Program counter MSWord
+ * Status Register
+ *
+ *
*/
asm(" \n\
.text \n\
@@ -348,7 +348,7 @@ asm(" \n\
movem.l %d0-%d7/%a0-%a6,registers /* save registers */ \n\
move.l lastFrame,%a0 /* last frame pointer */ \n\
");
-SAVE_FP_REGS();
+SAVE_FP_REGS();
asm("\n\
lea registers,%a5 /* get address of registers */\n\
move.w (%sp),%d1 /* get status register */\n\
@@ -422,14 +422,14 @@ a7saveDone:\n\
/* This function is called when an exception occurs. It translates the
* return address found on the stack into an exception vector # which
* is then handled by either handle_exception or a system handler.
- * _catchException provides a front end for both.
+ * _catchException provides a front end for both.
*
* stack on entry: stack on exit:
- * Program counter MSWord exception # MSWord
+ * Program counter MSWord exception # MSWord
* Program counter LSWord exception # MSWord
- * Status Register
- * Return Address MSWord
- * Return Address LSWord
+ * Status Register
+ * Return Address MSWord
+ * Return Address LSWord
*/
asm("\n\
.text\n\
@@ -440,7 +440,7 @@ asm("\
moveml %d0-%d7/%a0-%a6,registers /* save registers */ \n\
movel lastFrame,%a0 /* last frame pointer */ \n\
");
-SAVE_FP_REGS();
+SAVE_FP_REGS();
asm(" \n\
lea registers,%a5 /* get address of registers */ \n\
movel (%sp)+,%d2 /* pop return address */ \n\
@@ -534,7 +534,7 @@ void _returnFromException( Frame *frame )
frame->pc = registers[(int) PC];
if (registers[(int) PS] & 0x2000)
- {
+ {
/* return to supervisor mode... */
return_to_super();
}
@@ -563,15 +563,15 @@ char * buffer;
int i;
int count;
char ch;
-
+
do {
/* wait around for the start character, ignore all other characters */
- while ((ch = getDebugChar()) != '$');
+ while ((ch = getDebugChar()) != '$');
checksum = 0;
xmitcsum = -1;
-
+
count = 0;
-
+
/* now, read until a # or end of buffer is found */
while (count < BUFMAX) {
ch = getDebugChar();
@@ -589,8 +589,8 @@ char * buffer;
fprintf (stderr,"bad checksum. My count = 0x%x, sent=0x%x. buf=%s\n",
checksum,xmitcsum,buffer);
}
-
- if (checksum != xmitcsum) putDebugChar('-'); /* failed checksum */
+
+ if (checksum != xmitcsum) putDebugChar('-'); /* failed checksum */
else {
putDebugChar('+'); /* successful transfer */
/* if a sequence char is present, reply the sequence ID */
@@ -600,14 +600,14 @@ char * buffer;
/* remove sequence chars from buffer */
count = strlen(buffer);
for (i=3; i <= count; i++) buffer[i-3] = buffer[i];
- }
- }
- }
+ }
+ }
+ }
} while (checksum != xmitcsum);
-
+
}
-/* send the packet in buffer. The host get's one chance to read it.
+/* send the packet in buffer. The host get's one chance to read it.
This routine does not wait for a positive acknowledge. */
@@ -687,7 +687,7 @@ int count;
*buf++ = gdb_hexchars[ch >> 4];
*buf++ = gdb_hexchars[ch % 16];
}
- *buf = 0;
+ *buf = 0;
return(buf);
}
@@ -753,7 +753,7 @@ void handle_buserror()
longjmp(remcomEnv,1);
}
-/* this function takes the 68000 exception number and attempts to
+/* this function takes the 68000 exception number and attempts to
translate this number into a unix compatible signal value */
int computeSignal( exceptionVector )
int exceptionVector;
@@ -792,7 +792,7 @@ int exceptionVector;
case 52: sigval = 8; break; /* operand error */
case 53: sigval = 8; break; /* overflow */
case 54: sigval = 8; break; /* NAN */
- default:
+ default:
sigval = 7; /* "software generated"*/
}
return (sigval);
@@ -806,7 +806,7 @@ int hexToInt(char **ptr, int *intValue)
{
int numChars = 0;
int hexValue;
-
+
*intValue = 0;
while (**ptr)
@@ -819,7 +819,7 @@ int hexToInt(char **ptr, int *intValue)
}
else
break;
-
+
(*ptr)++;
}
@@ -849,21 +849,21 @@ void gdb_stub_report_exception_info(
*optr++ = highhex(A7);
*optr++ = lowhex(A7);
*optr++ = ':';
- optr = mem2hstr(optr,
- (unsigned char *)&(regs[A7]),
+ optr = mem2hstr(optr,
+ (unsigned char *)&(regs[A7]),
sizeof(regs[A7]));
*optr++ = ';';
-
+
*optr++ = highhex(PC);
*optr++ = lowhex(PC);
*optr++ = ':';
- optr = mem2hstr(optr,
- (unsigned char *)&(regs[PC]),
+ optr = mem2hstr(optr,
+ (unsigned char *)&(regs[PC]),
sizeof(regs[PC]) );
*optr++ = ';';
#if defined(GDB_STUB_ENABLE_THREAD_SUPPORT)
- if (do_threads)
+ if (do_threads)
{
*optr++ = 't';
*optr++ = 'h';
@@ -894,9 +894,9 @@ void handle_exception(int exceptionVector)
void *regptr;
int binary;
- if (remote_debug) printf("vector=%d, sr=0x%x, pc=0x%x\n",
+ if (remote_debug) printf("vector=%d, sr=0x%x, pc=0x%x\n",
exceptionVector,
- registers[ PS ],
+ registers[ PS ],
registers[ PC ]);
thread = 0;
@@ -906,7 +906,7 @@ void handle_exception(int exceptionVector)
}
#endif
current_thread = thread;
-
+
#if 0
/* reply to host that an exception has occurred */
sigval = computeSignal( exceptionVector );
@@ -919,9 +919,9 @@ void handle_exception(int exceptionVector)
gdb_stub_report_exception_info(exceptionVector, registers, thread);
#endif
- putpacket(remcomOutBuffer);
+ putpacket(remcomOutBuffer);
- while (!(host_has_detached)) {
+ while (!(host_has_detached)) {
binary = 0;
error = 0;
remcomOutBuffer[0] = 0;
@@ -932,7 +932,7 @@ void handle_exception(int exceptionVector)
remcomOutBuffer[1] = gdb_hexchars[sigval >> 4];
remcomOutBuffer[2] = gdb_hexchars[sigval % 16];
remcomOutBuffer[3] = 0;
- break;
+ break;
#else
case '?' : gdb_stub_report_exception_info(exceptionVector,
registers,
@@ -940,11 +940,11 @@ void handle_exception(int exceptionVector)
break;
#endif
case 'd' : remote_debug = !(remote_debug); /* toggle debug flag */
- break;
+ break;
case 'D' : /* host has detached */
strcpy(remcomOutBuffer,"OK");
host_has_detached = 1;
- break;
+ break;
case 'g': /* return the values of the CPU registers */
regptr = registers;
#if defined(GDB_STUB_ENABLE_THREAD_SUPPORT)
@@ -961,8 +961,8 @@ void handle_exception(int exceptionVector)
if (do_threads && current_thread != thread )
regptr = &current_thread_registers;
#endif
- if (hex2mem (&remcomInBuffer[1],
- regptr,
+ if (hex2mem (&remcomInBuffer[1],
+ regptr,
sizeof registers)) {
strcpy (remcomOutBuffer, "OK");
}
@@ -970,18 +970,18 @@ void handle_exception(int exceptionVector)
strcpy (remcomOutBuffer, "E00"); /* E00 = bad "set register" command */
}
break;
-
+
/* mAA..AA,LLLL Read LLLL bytes at address AA..AA */
- case 'm' :
+ case 'm' :
if (setjmp(remcomEnv) == 0)
{
- m68k_exceptionHandler(2,handle_buserror);
+ m68k_exceptionHandler(2,handle_buserror);
/* TRY TO READ %x,%x. IF SUCCEED, SET PTR = 0 */
ptr = &remcomInBuffer[1];
if (hexToInt(&ptr,&addr))
if (*(ptr++) == ',')
- if (hexToInt(&ptr,&length))
+ if (hexToInt(&ptr,&length))
{
ptr = 0;
mem2hex((char*) addr, remcomOutBuffer, length);
@@ -991,27 +991,27 @@ void handle_exception(int exceptionVector)
{
strcpy(remcomOutBuffer,"E01");
debug_error("malformed read memory command: %s",remcomInBuffer);
- }
- }
+ }
+ }
else {
- m68k_exceptionHandler(2,_catchException);
+ m68k_exceptionHandler(2,_catchException);
strcpy(remcomOutBuffer,"E03");
debug_error("bus error", 0);
- }
-
+ }
+
/* restore handler for bus error */
- m68k_exceptionHandler(2,_catchException);
+ m68k_exceptionHandler(2,_catchException);
break;
-
+
/* XAA..AA,LLLL: Write LLLL bytes at address AA.AA return OK */
/* Transfer is in binary, '$', '#' and 0x7d is escaped with 0x7d */
- case 'X' :
+ case 'X' :
binary = 1;
/* MAA..AA,LLLL: Write LLLL bytes at address AA.AA return OK */
- case 'M' :
+ case 'M' :
if (setjmp(remcomEnv) == 0) {
- m68k_exceptionHandler(2,handle_buserror);
-
+ m68k_exceptionHandler(2,handle_buserror);
+
/* TRY TO READ '%x,%x:'. IF SUCCEED, SET PTR = 0 */
ptr = &remcomInBuffer[1];
if (hexToInt(&ptr,&addr))
@@ -1032,35 +1032,35 @@ void handle_exception(int exceptionVector)
{
strcpy(remcomOutBuffer,"E02");
debug_error("malformed write memory command: %s",remcomInBuffer);
- }
- }
+ }
+ }
else {
- m68k_exceptionHandler(2,_catchException);
+ m68k_exceptionHandler(2,_catchException);
strcpy(remcomOutBuffer,"E03");
debug_error("bus error", 0);
- }
+ }
/* restore handler for bus error */
- m68k_exceptionHandler(2,_catchException);
+ m68k_exceptionHandler(2,_catchException);
break;
/* cAA..AA Continue at address AA..AA(optional) */
/* sAA..AA Step one instruction from AA..AA(optional) */
- case 'c' :
- case 's' :
+ case 'c' :
+ case 's' :
/* try to read optional parameter, pc unchanged if no parm */
ptr = &remcomInBuffer[1];
if (hexToInt(&ptr,&addr))
registers[ PC ] = addr;
-
+
newPC = registers[ PC];
-
+
/* clear the trace bit */
registers[ PS ] &= 0x7fff;
-
+
/* set the trace bit if we're stepping */
if (remcomInBuffer[0] == 's') registers[ PS ] |= 0x8000;
-
+
/*
* look for newPC in the linked list of exception frames.
* if it is found, use the old frame it. otherwise,
@@ -1085,24 +1085,24 @@ void handle_exception(int exceptionVector)
(frame->exceptionPC == (newPC+2))) break;
if (frame == frame->previous)
{
- frame = 0; /* no match found */
- break;
+ frame = 0; /* no match found */
+ break;
}
frame = frame->previous;
}
-
+
/*
* If we found a match for the PC AND we are not returning
* as a result of a breakpoint (33),
* trace exception (9), nmi (31), jmp to
* the old exception handler as if this code never ran.
*/
- if (frame)
+ if (frame)
{
- if ((frame->exceptionVector != 9) &&
- (frame->exceptionVector != 31) &&
+ if ((frame->exceptionVector != 9) &&
+ (frame->exceptionVector != 31) &&
(frame->exceptionVector != 33))
- {
+ {
/*
* invoke the previous handler.
*/
@@ -1121,13 +1121,13 @@ void handle_exception(int exceptionVector)
_returnFromException( frame ); /* this is a jump */
}
}
- }
+ }
/* if we couldn't find a frame, create one */
if (frame == 0)
{
frame = lastFrame -1 ;
-
+
/* by using a bunch of print commands with breakpoints,
it's possible for the frame stack to creep down. If it creeps
too far, give up and reset it to the top. Normal use should
@@ -1136,22 +1136,22 @@ void handle_exception(int exceptionVector)
if ((unsigned int) (frame-2) < (unsigned int) &gdbFrameStack)
{
initializeRemcomErrorFrame();
- frame = lastFrame;
+ frame = lastFrame;
}
frame->previous = lastFrame;
lastFrame = frame;
- frame = 0; /* null so _return... will properly initialize it */
- }
-
+ frame = 0; /* null so _return... will properly initialize it */
+ }
+
_returnFromException( frame ); /* this is a jump */
break;
-
+
case 'q': /* queries */
#if defined(GDB_STUB_ENABLE_THREAD_SUPPORT)
- rtems_gdb_process_query( remcomInBuffer,
- remcomOutBuffer,
- do_threads,
+ rtems_gdb_process_query( remcomInBuffer,
+ remcomOutBuffer,
+ do_threads,
thread );
#endif
break;
@@ -1161,7 +1161,7 @@ void handle_exception(int exceptionVector)
{
int testThread;
- if( vhstr2thread(&remcomInBuffer[1], &testThread) == NULL )
+ if( vhstr2thread(&remcomInBuffer[1], &testThread) == NULL )
{
strcpy(remcomOutBuffer, "E01");
break;
@@ -1178,20 +1178,20 @@ void handle_exception(int exceptionVector)
}
break;
#endif
-
+
case 'H': /* set new thread */
#if defined(GDB_STUB_ENABLE_THREAD_SUPPORT)
if (remcomInBuffer[1] != 'g') {
break;
}
-
+
if (!do_threads) {
break;
}
-
+
{
int tmp, ret;
-
+
/* Set new generic thread */
if (vhstr2thread(&remcomInBuffer[2], &tmp) == NULL) {
strcpy(remcomOutBuffer, "E01");
@@ -1209,7 +1209,7 @@ void handle_exception(int exceptionVector)
break;
}
- /* Save current thread registers if necessary */
+ /* Save current thread registers if necessary */
if (current_thread != thread) {
ret = rtems_gdb_stub_set_thread_regs(
current_thread, (unsigned int *) &current_thread_registers);
@@ -1226,7 +1226,7 @@ void handle_exception(int exceptionVector)
break;
}
}
-
+
current_thread = tmp;
strcpy(remcomOutBuffer, "OK");
}
@@ -1236,10 +1236,10 @@ void handle_exception(int exceptionVector)
/* kill the program */
case 'k' : /* do nothing */
break;
- } /* switch */
-
+ } /* switch */
+
/* reply to the request */
- putpacket(remcomOutBuffer);
+ putpacket(remcomOutBuffer);
}
}
@@ -1251,7 +1251,7 @@ initializeRemcomErrorFrame()
lastFrame->previous = lastFrame;
}
-/* this function is used to set up exception handlers for tracing and
+/* this function is used to set up exception handlers for tracing and
breakpoints */
void set_debug_traps()
{
@@ -1263,33 +1263,33 @@ void set_debug_traps()
stackPtr = &remcomStack[STACKSIZE/sizeof(int) - 1];
for (exception = 2; exception <= 23; exception++)
- m68k_exceptionHandler(exception,_catchException);
+ m68k_exceptionHandler(exception,_catchException);
/* level 7 interrupt */
- m68k_exceptionHandler(31,_debug_level7);
-
+ m68k_exceptionHandler(31,_debug_level7);
+
/* GDB breakpoint exception (trap #1) */
m68k_exceptionHandler(33,_catchException);
/* coded breakpoint exception (trap #2) */
m68k_exceptionHandler(34,_catchException);
-
+
/* This is a trap #8 instruction. Apparently it is someone's software
convention for some sort of SIGFPE condition. Whose? How many
people are being screwed by having this code the way it is?
Is there a clean solution? */
m68k_exceptionHandler(40,_catchException);
-
+
/* 48 to 54 are floating point coprocessor errors */
for (exception = 48; exception <= 54; exception++)
- m68k_exceptionHandler(exception,_catchException);
+ m68k_exceptionHandler(exception,_catchException);
if (oldExceptionHook != remcomHandler)
{
oldExceptionHook = exceptionHook;
exceptionHook = remcomHandler;
}
-
+
initialized = 1;
}
@@ -1298,7 +1298,7 @@ void set_debug_traps()
beginning of a program to sync up with a debugger and can be used
otherwise as a quick means to stop program execution and "break" into
the debugger. */
-
+
void breakpoint()
{
if (initialized) BREAKPOINT();
diff --git a/c/src/lib/libbsp/m68k/shared/m68000spurious.c b/c/src/lib/libbsp/m68k/shared/m68000spurious.c
index 8bcc3a2ad0..a178cf0cdc 100644
--- a/c/src/lib/libbsp/m68k/shared/m68000spurious.c
+++ b/c/src/lib/libbsp/m68k/shared/m68000spurious.c
@@ -1,7 +1,7 @@
/*
* C3X Spurious Trap Handler
*
- * This is just enough of a trap handler to let us know what
+ * This is just enough of a trap handler to let us know what
* the likely source of the trap was.
*
* COPYRIGHT (c) 1989-1999.
@@ -24,7 +24,7 @@
*/
void bsp_spurious_handler_assistant(
- rtems_vector_number /*,
+ rtems_vector_number /*,
CPU_Interrupt_frame * */
);
diff --git a/c/src/lib/libbsp/m68k/shared/m68kpretaskinghook.c b/c/src/lib/libbsp/m68k/shared/m68kpretaskinghook.c
index dc0132053c..4cc1584087 100644
--- a/c/src/lib/libbsp/m68k/shared/m68kpretaskinghook.c
+++ b/c/src/lib/libbsp/m68k/shared/m68kpretaskinghook.c
@@ -1,4 +1,4 @@
-/*
+/*
* This routine is an implementation of the bsp_pretasking_hook
* that can be used by all m68k BSPs following linkcmds conventions
* regarding heap, stack, and workspace allocation.
diff --git a/c/src/lib/libbsp/m68k/shared/mvme/mvme16x_hw.h b/c/src/lib/libbsp/m68k/shared/mvme/mvme16x_hw.h
index f388ed891d..967faa8d24 100644
--- a/c/src/lib/libbsp/m68k/shared/mvme/mvme16x_hw.h
+++ b/c/src/lib/libbsp/m68k/shared/mvme/mvme16x_hw.h
@@ -26,7 +26,7 @@ extern "C" {
/*
* Network driver configuration
*/
-
+
struct rtems_bsdnet_ifconfig;
int uti596_attach(struct rtems_bsdnet_ifconfig * pConfig, int attaching );
#define RTEMS_BSP_NETWORK_DRIVER_NAME "uti1"
@@ -91,14 +91,14 @@ typedef volatile struct {
unsigned long vector_base;
} lcsr_regs;
-/*
+/*
* Base address of VMEchip2 LCSR
* Not configurable on the MVME167.
* XXX what about 162?
*/
#define lcsr ((lcsr_regs * const) 0xFFF40000)
-/*
+/*
* Vector numbers for the interrupts from the VMEchip2. Use the values
* "recommended" by Motorola.
* See pages 2-70 to 2-92, and table 2-3.
@@ -178,7 +178,7 @@ typedef volatile struct pccchip2_regs_ {
* we have to reconcile them later.
*/
-/*
+/*
* Vector numbers for the interrupts from the PCCchip2. Use the values
* "recommended" by Motorola.
* See page 3-15.
diff --git a/c/src/lib/libbsp/m68k/shared/setvec.c b/c/src/lib/libbsp/m68k/shared/setvec.c
index 13dc820374..90323fbd51 100644
--- a/c/src/lib/libbsp/m68k/shared/setvec.c
+++ b/c/src/lib/libbsp/m68k/shared/setvec.c
@@ -1,7 +1,7 @@
-/*
+/*
*
* This routine installs an interrupt vector using the basic
- * RTEMS mechanisms. This implementation should be suitable for
+ * RTEMS mechanisms. This implementation should be suitable for
* most m68k based boards. However, if the board has an unusual
* interrupt controller or most somehow manipulate board specific
* hardware to enable/disable, mask, prioritize, etc an interrupt
diff --git a/c/src/lib/libbsp/m68k/sim68000/clock/clockdrv.c b/c/src/lib/libbsp/m68k/sim68000/clock/clockdrv.c
index 43347867a5..f3aac18351 100644
--- a/c/src/lib/libbsp/m68k/sim68000/clock/clockdrv.c
+++ b/c/src/lib/libbsp/m68k/sim68000/clock/clockdrv.c
@@ -16,9 +16,9 @@ typedef struct {
volatile uint8_t cr; /* 0 - 0 : Timer Control Register */
volatile uint8_t pad0; /* 1 - 1 : pad */
volatile uint8_t ivr; /* 2 - 2 : Timer Interrupt Vector Register */
- volatile uint8_t pad1; /* 3 - 3 : pad */
+ volatile uint8_t pad1; /* 3 - 3 : pad */
volatile uint32_t cpr; /* 4 - 7 : Timer Counter Preload Register */
- volatile uint8_t pad2[12]; /* 8 - 19 : pad */
+ volatile uint8_t pad2[12]; /* 8 - 19 : pad */
volatile uint32_t sr; /* 20 - 23 : Timer Status Register */
} timer_hw_t;
@@ -40,10 +40,10 @@ void Clock_driver_support_initialize_hardware()
void Clock_driver_support_at_tick()
{
timer_hw_t *t = TIMER_BASE;
-
+
t->sr = 0xA0; /* Negate timer interrupt request */
}
-
+
void Clock_driver_support_shutdown_hardware()
{
diff --git a/c/src/lib/libbsp/m68k/sim68000/include/bsp.h b/c/src/lib/libbsp/m68k/sim68000/include/bsp.h
index 595facf166..5a85923fe1 100644
--- a/c/src/lib/libbsp/m68k/sim68000/include/bsp.h
+++ b/c/src/lib/libbsp/m68k/sim68000/include/bsp.h
@@ -53,9 +53,9 @@ extern "C" {
#define Install_tm27_vector( handler ) /* set_vector( (handler), 6, 1 ) */
-#define Cause_tm27_intr()
+#define Cause_tm27_intr()
-#define Clear_tm27_intr()
+#define Clear_tm27_intr()
#define Lower_tm27_intr()
@@ -89,7 +89,7 @@ extern rtems_configuration_table BSP_Configuration;
/*
* NOTE: Use the standard Console driver entry
*/
-
+
/*
* NOTE: Use the standard Clock driver entry
*/
diff --git a/c/src/lib/libbsp/m68k/sim68000/start/start.S b/c/src/lib/libbsp/m68k/sim68000/start/start.S
index 11aefb7d3c..9c08095c91 100644
--- a/c/src/lib/libbsp/m68k/sim68000/start/start.S
+++ b/c/src/lib/libbsp/m68k/sim68000/start/start.S
@@ -1,21 +1,21 @@
-/*
+/*
* $Id$
*
* Re-written the gen68302 start-up code.
- *
+ *
* Uses gas syntax only, removed the OAR asm.h.
- *
+ *
* Supplies a complete vector table in ROM.
- *
+ *
* Manages all vectors with seperate handlers to trap unhandled
* execptions.
- *
- * Uses the target specific header file to get the runtime
+ *
+ * Uses the target specific header file to get the runtime
* configuration
- *
+ *
* COPYRIGHT (c) 1996
* Objective Design Systems Pty Ltd (ODS)
- *
+ *
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
* On-Line Applications Research Corporation (OAR).
*
@@ -32,17 +32,17 @@
.global _start | program entry
.global M68Kvec | Vector Table
-
+
_start: | standard name for program entry
M68Kvec: | standard location for vectors
-
+
|
| Make relative, can have the code positioned any where
|
V___ISSP: .long STACK_AT_RESET
V____IPC: .long start - V___ISSP
-
+
|
| Create the rest of the vector table to point to the unhandled expection
| handler
@@ -63,7 +63,7 @@ MAKE_EXCEPTION_VECTOR(6)
MAKE_EXCEPTION_VECTOR(7)
MAKE_EXCEPTION_VECTOR(8)
MAKE_EXCEPTION_VECTOR(9)
-
+
MAKE_EXCEPTION_VECTOR(10)
MAKE_EXCEPTION_VECTOR(11)
MAKE_EXCEPTION_VECTOR(12)
@@ -85,7 +85,7 @@ MAKE_EXCEPTION_VECTOR(26)
MAKE_EXCEPTION_VECTOR(27)
MAKE_EXCEPTION_VECTOR(28)
MAKE_EXCEPTION_VECTOR(29)
-
+
MAKE_EXCEPTION_VECTOR(30)
MAKE_EXCEPTION_VECTOR(31)
MAKE_EXCEPTION_VECTOR(32)
@@ -96,7 +96,7 @@ MAKE_EXCEPTION_VECTOR(36)
MAKE_EXCEPTION_VECTOR(37)
MAKE_EXCEPTION_VECTOR(38)
MAKE_EXCEPTION_VECTOR(39)
-
+
MAKE_EXCEPTION_VECTOR(40)
MAKE_EXCEPTION_VECTOR(41)
MAKE_EXCEPTION_VECTOR(42)
@@ -107,7 +107,7 @@ MAKE_EXCEPTION_VECTOR(46)
MAKE_EXCEPTION_VECTOR(47)
MAKE_EXCEPTION_VECTOR(48)
MAKE_EXCEPTION_VECTOR(49)
-
+
MAKE_EXCEPTION_VECTOR(50)
MAKE_EXCEPTION_VECTOR(51)
MAKE_EXCEPTION_VECTOR(52)
@@ -118,7 +118,7 @@ MAKE_EXCEPTION_VECTOR(56)
MAKE_EXCEPTION_VECTOR(57)
MAKE_EXCEPTION_VECTOR(58)
MAKE_EXCEPTION_VECTOR(59)
-
+
MAKE_EXCEPTION_VECTOR(60)
MAKE_EXCEPTION_VECTOR(61)
MAKE_EXCEPTION_VECTOR(62)
@@ -129,7 +129,7 @@ MAKE_EXCEPTION_VECTOR(66)
MAKE_EXCEPTION_VECTOR(67)
MAKE_EXCEPTION_VECTOR(68)
MAKE_EXCEPTION_VECTOR(69)
-
+
MAKE_EXCEPTION_VECTOR(70)
MAKE_EXCEPTION_VECTOR(71)
MAKE_EXCEPTION_VECTOR(72)
@@ -140,7 +140,7 @@ MAKE_EXCEPTION_VECTOR(76)
MAKE_EXCEPTION_VECTOR(77)
MAKE_EXCEPTION_VECTOR(78)
MAKE_EXCEPTION_VECTOR(79)
-
+
MAKE_EXCEPTION_VECTOR(80)
MAKE_EXCEPTION_VECTOR(81)
MAKE_EXCEPTION_VECTOR(82)
@@ -151,7 +151,7 @@ MAKE_EXCEPTION_VECTOR(86)
MAKE_EXCEPTION_VECTOR(87)
MAKE_EXCEPTION_VECTOR(88)
MAKE_EXCEPTION_VECTOR(89)
-
+
MAKE_EXCEPTION_VECTOR(90)
MAKE_EXCEPTION_VECTOR(91)
MAKE_EXCEPTION_VECTOR(92)
@@ -162,7 +162,7 @@ MAKE_EXCEPTION_VECTOR(96)
MAKE_EXCEPTION_VECTOR(97)
MAKE_EXCEPTION_VECTOR(98)
MAKE_EXCEPTION_VECTOR(99)
-
+
MAKE_EXCEPTION_VECTOR(100)
MAKE_EXCEPTION_VECTOR(101)
MAKE_EXCEPTION_VECTOR(102)
@@ -173,7 +173,7 @@ MAKE_EXCEPTION_VECTOR(106)
MAKE_EXCEPTION_VECTOR(107)
MAKE_EXCEPTION_VECTOR(108)
MAKE_EXCEPTION_VECTOR(109)
-
+
MAKE_EXCEPTION_VECTOR(110)
MAKE_EXCEPTION_VECTOR(111)
MAKE_EXCEPTION_VECTOR(112)
@@ -195,7 +195,7 @@ MAKE_EXCEPTION_VECTOR(126)
MAKE_EXCEPTION_VECTOR(127)
MAKE_EXCEPTION_VECTOR(128)
MAKE_EXCEPTION_VECTOR(129)
-
+
MAKE_EXCEPTION_VECTOR(130)
MAKE_EXCEPTION_VECTOR(131)
MAKE_EXCEPTION_VECTOR(132)
@@ -206,7 +206,7 @@ MAKE_EXCEPTION_VECTOR(136)
MAKE_EXCEPTION_VECTOR(137)
MAKE_EXCEPTION_VECTOR(138)
MAKE_EXCEPTION_VECTOR(139)
-
+
MAKE_EXCEPTION_VECTOR(140)
MAKE_EXCEPTION_VECTOR(141)
MAKE_EXCEPTION_VECTOR(142)
@@ -217,7 +217,7 @@ MAKE_EXCEPTION_VECTOR(146)
MAKE_EXCEPTION_VECTOR(147)
MAKE_EXCEPTION_VECTOR(148)
MAKE_EXCEPTION_VECTOR(149)
-
+
MAKE_EXCEPTION_VECTOR(150)
MAKE_EXCEPTION_VECTOR(151)
MAKE_EXCEPTION_VECTOR(152)
@@ -228,7 +228,7 @@ MAKE_EXCEPTION_VECTOR(156)
MAKE_EXCEPTION_VECTOR(157)
MAKE_EXCEPTION_VECTOR(158)
MAKE_EXCEPTION_VECTOR(159)
-
+
MAKE_EXCEPTION_VECTOR(160)
MAKE_EXCEPTION_VECTOR(161)
MAKE_EXCEPTION_VECTOR(162)
@@ -239,7 +239,7 @@ MAKE_EXCEPTION_VECTOR(166)
MAKE_EXCEPTION_VECTOR(167)
MAKE_EXCEPTION_VECTOR(168)
MAKE_EXCEPTION_VECTOR(169)
-
+
MAKE_EXCEPTION_VECTOR(170)
MAKE_EXCEPTION_VECTOR(171)
MAKE_EXCEPTION_VECTOR(172)
@@ -250,7 +250,7 @@ MAKE_EXCEPTION_VECTOR(176)
MAKE_EXCEPTION_VECTOR(177)
MAKE_EXCEPTION_VECTOR(178)
MAKE_EXCEPTION_VECTOR(179)
-
+
MAKE_EXCEPTION_VECTOR(180)
MAKE_EXCEPTION_VECTOR(181)
MAKE_EXCEPTION_VECTOR(182)
@@ -261,7 +261,7 @@ MAKE_EXCEPTION_VECTOR(186)
MAKE_EXCEPTION_VECTOR(187)
MAKE_EXCEPTION_VECTOR(188)
MAKE_EXCEPTION_VECTOR(189)
-
+
MAKE_EXCEPTION_VECTOR(190)
MAKE_EXCEPTION_VECTOR(191)
MAKE_EXCEPTION_VECTOR(192)
@@ -272,7 +272,7 @@ MAKE_EXCEPTION_VECTOR(196)
MAKE_EXCEPTION_VECTOR(197)
MAKE_EXCEPTION_VECTOR(198)
MAKE_EXCEPTION_VECTOR(199)
-
+
MAKE_EXCEPTION_VECTOR(200)
MAKE_EXCEPTION_VECTOR(201)
MAKE_EXCEPTION_VECTOR(202)
@@ -283,7 +283,7 @@ MAKE_EXCEPTION_VECTOR(206)
MAKE_EXCEPTION_VECTOR(207)
MAKE_EXCEPTION_VECTOR(208)
MAKE_EXCEPTION_VECTOR(209)
-
+
MAKE_EXCEPTION_VECTOR(210)
MAKE_EXCEPTION_VECTOR(211)
MAKE_EXCEPTION_VECTOR(212)
@@ -294,7 +294,7 @@ MAKE_EXCEPTION_VECTOR(216)
MAKE_EXCEPTION_VECTOR(217)
MAKE_EXCEPTION_VECTOR(218)
MAKE_EXCEPTION_VECTOR(219)
-
+
MAKE_EXCEPTION_VECTOR(220)
MAKE_EXCEPTION_VECTOR(221)
MAKE_EXCEPTION_VECTOR(222)
@@ -305,7 +305,7 @@ MAKE_EXCEPTION_VECTOR(226)
MAKE_EXCEPTION_VECTOR(227)
MAKE_EXCEPTION_VECTOR(228)
MAKE_EXCEPTION_VECTOR(229)
-
+
MAKE_EXCEPTION_VECTOR(230)
MAKE_EXCEPTION_VECTOR(231)
MAKE_EXCEPTION_VECTOR(232)
@@ -316,7 +316,7 @@ MAKE_EXCEPTION_VECTOR(236)
MAKE_EXCEPTION_VECTOR(237)
MAKE_EXCEPTION_VECTOR(238)
MAKE_EXCEPTION_VECTOR(239)
-
+
MAKE_EXCEPTION_VECTOR(240)
MAKE_EXCEPTION_VECTOR(241)
MAKE_EXCEPTION_VECTOR(242)
@@ -327,13 +327,13 @@ MAKE_EXCEPTION_VECTOR(246)
MAKE_EXCEPTION_VECTOR(247)
MAKE_EXCEPTION_VECTOR(248)
MAKE_EXCEPTION_VECTOR(249)
-
+
MAKE_EXCEPTION_VECTOR(250)
MAKE_EXCEPTION_VECTOR(251)
MAKE_EXCEPTION_VECTOR(252)
MAKE_EXCEPTION_VECTOR(253)
MAKE_EXCEPTION_VECTOR(254)
-MAKE_EXCEPTION_VECTOR(255)
+MAKE_EXCEPTION_VECTOR(255)
#endif
|
@@ -341,7 +341,7 @@ MAKE_EXCEPTION_VECTOR(255)
|
| Entered from a hardware reset.
|
-
+
.global start | Default entry point for GNU
start:
@@ -353,13 +353,13 @@ copy_data:
moveal #_etext,%a0 | find the end of .text
moveal #_copy_start,%a1 | find the beginning of .data
moveal #_edata,%a2 | find the end of .data
-
+
copy_data_loop:
-
+
movel %a0@+,%a1@+ | copy the data
cmpal %a2,%a1
jlt copy_data_loop | loop until edata reached
-
+
|
| zero out uninitialized data area
|
@@ -368,9 +368,9 @@ zerobss:
moveal #_clear_end,%a0 | find end of .bss
moveal #_clear_start,%a1 | find beginning of .bss
moveq #0,%d0
-
+
zerobss_loop:
-
+
movel %d0,%a1@+ | to zero out uninitialized
cmpal %a0,%a1
jlt zerobss_loop | loop until _end reached
@@ -392,23 +392,23 @@ bsp_exitted:
jmp bsp_exitted
-|
+|
| Initialised data
|
.sect .data
-
+
|
| Uninitialised data
|
.sect .bss
-
+
env: .long 0
arg: .long 0
.global environ
.align 2
-
+
environ:
.long env
diff --git a/c/src/lib/libbsp/m68k/sim68000/startup/bspstart.c b/c/src/lib/libbsp/m68k/sim68000/startup/bspstart.c
index debdb8d169..9c242457b7 100644
--- a/c/src/lib/libbsp/m68k/sim68000/startup/bspstart.c
+++ b/c/src/lib/libbsp/m68k/sim68000/startup/bspstart.c
@@ -19,7 +19,7 @@
#include <bsp.h>
#include <rtems/libio.h>
#include <rtems/libcsupport.h>
-
+
/*
* The original table from the application and our copy of it with
* some changes.
@@ -36,7 +36,7 @@ char *rtems_progname;
/*
* Use the shared implementations of the following routines
*/
-
+
void bsp_postdriver_hook(void);
void bsp_libc_init( void *, uint32_t, int );
void bsp_pretasking_hook(void); /* m68k version */