diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1998-07-16 00:03:01 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1998-07-16 00:03:01 +0000 |
commit | dd5d2f041f163977fa9d3af7ac10b4df9ec27d0f (patch) | |
tree | cf161e59ae2ad83648020d61a2b4966102ae735a /c/src/libchip/serial/mc68681.c | |
parent | Fixed typo in which last port did not get switched to default (diff) | |
download | rtems-dd5d2f041f163977fa9d3af7ac10b4df9ec27d0f.tar.bz2 |
Split default baud rate table into its own file. This shrinks the
size of the minimum mc68681 driver. The clock speed field can not
now be configured as NULL but must instead specify the address of
the default table.
Diffstat (limited to 'c/src/libchip/serial/mc68681.c')
-rw-r--r-- | c/src/libchip/serial/mc68681.c | 109 |
1 files changed, 6 insertions, 103 deletions
diff --git a/c/src/libchip/serial/mc68681.c b/c/src/libchip/serial/mc68681.c index 19e9509a79..03675ac33d 100644 --- a/c/src/libchip/serial/mc68681.c +++ b/c/src/libchip/serial/mc68681.c @@ -71,103 +71,6 @@ extern void set_vector( rtems_isr_entry, rtems_vector_number, int ); * must be configured by the user. */ -/* major index of 0 : ACR[7] = 0, X = 0 -- 68c681 only has these */ -/* major index of 1 : ACR[7] = 1, X = 0 -- 68c681 only has these */ -/* major index of 2 : ACR[7] = 0, X = 1 */ -/* major index of 3 : ACR[7] = 1, X = 1 */ - -/* mc68681_baud_table_t mc68681_baud_rate_table[4] = { */ -mc68681_baud_t mc68681_baud_rate_table[4][RTEMS_TERMIOS_NUMBER_BAUD_RATES] = { - { /* ACR[7] = 0, X = 0 */ - MC68681_BAUD_NOT_VALID, /* B0 */ - 0x00, /* B50 */ - MC68681_BAUD_NOT_VALID, /* B75 */ - 0x01, /* B110 */ - 0x02, /* B134 */ - MC68681_BAUD_NOT_VALID, /* B150 */ - 0x03, /* B200 */ - 0x04, /* B300 */ - 0x05, /* B600 */ - 0x06, /* B1200 */ - MC68681_BAUD_NOT_VALID, /* B1800 */ - 0x08, /* B2400 */ - 0x09, /* B4800 */ - 0x0B, /* B9600 */ - MC68681_BAUD_NOT_VALID, /* B19200 */ - 0x0C, /* B38400 */ - MC68681_BAUD_NOT_VALID, /* B57600 */ - MC68681_BAUD_NOT_VALID, /* B115200 */ - MC68681_BAUD_NOT_VALID, /* B230400 */ - MC68681_BAUD_NOT_VALID /* B460800 */ - }, - { /* ACR[7] = 1, X = 0 */ - MC68681_BAUD_NOT_VALID, /* B0 */ - MC68681_BAUD_NOT_VALID, /* B50 */ - 0x00, /* B75 */ - 0x01, /* B110 */ - 0x02, /* B134 */ - 0x03, /* B150 */ - MC68681_BAUD_NOT_VALID, /* B200 */ - 0x04, /* B300 */ - 0x05, /* B600 */ - 0x06, /* B1200 */ - 0x0A, /* B1800 */ - 0x08, /* B2400 */ - 0x09, /* B4800 */ - 0x0B, /* B9600 */ - 0x0C, /* B19200 */ - MC68681_BAUD_NOT_VALID, /* B38400 */ - MC68681_BAUD_NOT_VALID, /* B57600 */ - MC68681_BAUD_NOT_VALID, /* B115200 */ - MC68681_BAUD_NOT_VALID, /* B230400 */ - MC68681_BAUD_NOT_VALID /* B460800 */ - }, - { /* ACR[7] = 0, X = 1 */ - MC68681_BAUD_NOT_VALID, /* B0 */ - MC68681_BAUD_NOT_VALID, /* B50 */ - 0x00, /* B75 */ - 0x01, /* B110 */ - 0x02, /* B134 */ - 0x03, /* B150 */ - MC68681_BAUD_NOT_VALID, /* B200 */ - MC68681_BAUD_NOT_VALID, /* B300 */ - MC68681_BAUD_NOT_VALID, /* B600 */ - MC68681_BAUD_NOT_VALID, /* B1200 */ - 0x0A, /* B1800 */ - MC68681_BAUD_NOT_VALID, /* B2400 */ - 0x08, /* B4800 */ - 0x0B, /* B9600 */ - 0x0C, /* B19200 */ - MC68681_BAUD_NOT_VALID, /* B38400 */ - 0x07, /* B57600 */ - 0x08, /* B115200 */ - MC68681_BAUD_NOT_VALID, /* B230400 */ - MC68681_BAUD_NOT_VALID /* B460800 */ - }, - { /* ACR[7] = 1, X = 1 */ - MC68681_BAUD_NOT_VALID, /* B0 */ - 0x00, /* B50 */ - MC68681_BAUD_NOT_VALID, /* B75 */ - 0x01, /* B110 */ - 0x02, /* B134 */ - MC68681_BAUD_NOT_VALID, /* B150 */ - 0x03, /* B200 */ - MC68681_BAUD_NOT_VALID, /* B300 */ - MC68681_BAUD_NOT_VALID, /* B600 */ - MC68681_BAUD_NOT_VALID, /* B1200 */ - MC68681_BAUD_NOT_VALID, /* B1800 */ - MC68681_BAUD_NOT_VALID, /* B2400 */ - 0x09, /* B4800 */ - 0x0B, /* B9600 */ - MC68681_BAUD_NOT_VALID, /* B19200 */ - 0x0C, /* B38400 */ - 0x07, /* B57600 */ - 0x08, /* B115200 */ - MC68681_BAUD_NOT_VALID, /* B230400 */ - MC68681_BAUD_NOT_VALID /* B460800 */ - }, -}; - MC68681_STATIC int mc68681_baud_rate( int minor, int baud, @@ -657,11 +560,11 @@ MC68681_STATIC int mc68681_baud_rate( unsigned int *command ) { - unsigned int baud_mask; - unsigned int acr_bit; - int status; - int is_extended; - int baud_requested; + unsigned int baud_mask; + unsigned int acr_bit; + int status; + int is_extended; + int baud_requested; mc68681_baud_table_t *baud_tbl; baud_mask = 0; @@ -694,7 +597,7 @@ MC68681_STATIC int mc68681_baud_rate( baud_tbl = (mc68681_baud_table_t *) Console_Port_Tbl[minor].ulClock; if (!baud_tbl) - baud_tbl = (mc68681_baud_table_t *)mc68681_baud_rate_table; + rtems_fatal_error_occured(RTEMS_INVALID_ADDRESS); if ( is_extended ) baud_mask = (unsigned int)baud_tbl[ acr_bit + 2 ][ baud_requested ]; |