summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/m68k/idp
diff options
context:
space:
mode:
Diffstat (limited to 'c/src/lib/libbsp/m68k/idp')
-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
7 files changed, 101 insertions, 101 deletions
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 */