From c0573d7e5d486a126c6a51e6cd49d9f24bbe2083 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 15 Jul 1998 21:40:42 +0000 Subject: Added comment to remove use of TxBuffer ring buffer in all libchip drivers. The scheme used in the mc68681 is the one to follow. --- c/src/lib/libchip/serial/serial.h | 15 ++++++++++++++- c/src/libchip/serial/serial.h | 15 ++++++++++++++- 2 files changed, 28 insertions(+), 2 deletions(-) (limited to 'c/src') diff --git a/c/src/lib/libchip/serial/serial.h b/c/src/lib/libchip/serial/serial.h index 47004aad17..34f643e52c 100644 --- a/c/src/lib/libchip/serial/serial.h +++ b/c/src/lib/libchip/serial/serial.h @@ -52,11 +52,23 @@ typedef struct _console_flow { int (*deviceStartRemoteTx)(int minor); } console_flow; +typedef enum { + SERIAL_MC68681, /* Motorola MC68681 or Exar 88681 */ + SERIAL_NS16550, /* National Semiconductor NS16550 */ + SERIAL_Z85C30, /* Zilog Z85C30 */ + SERIAL_CUSTOM /* BSP specific driver */ + +} console_devs; + /* * Each field is interpreted thus: * * sDeviceName This is the name of the device. * + * deviceType This indicates the chip type. It is especially important when + * multiple devices share the same interrupt vector and must be + * distinguished. + * * pDeviceFns This is a pointer to the set of driver routines to use. * * pDeviceFlow This is a pointer to the set of flow control routines to @@ -112,6 +124,7 @@ typedef struct _console_flow { typedef struct _console_tbl { char *sDeviceName; + console_devs deviceType; console_fns *pDeviceFns; boolean (*deviceProbe)(int minor); console_flow *pDeviceFlow; @@ -132,7 +145,7 @@ typedef struct _console_tbl { typedef struct _console_data { void *termios_data; volatile boolean bActive; - volatile Ring_buffer_t TxBuffer; + volatile Ring_buffer_t TxBuffer; /* XXX remove from other drivers */ /* * This field may be used for any purpose required by the driver */ diff --git a/c/src/libchip/serial/serial.h b/c/src/libchip/serial/serial.h index 47004aad17..34f643e52c 100644 --- a/c/src/libchip/serial/serial.h +++ b/c/src/libchip/serial/serial.h @@ -52,11 +52,23 @@ typedef struct _console_flow { int (*deviceStartRemoteTx)(int minor); } console_flow; +typedef enum { + SERIAL_MC68681, /* Motorola MC68681 or Exar 88681 */ + SERIAL_NS16550, /* National Semiconductor NS16550 */ + SERIAL_Z85C30, /* Zilog Z85C30 */ + SERIAL_CUSTOM /* BSP specific driver */ + +} console_devs; + /* * Each field is interpreted thus: * * sDeviceName This is the name of the device. * + * deviceType This indicates the chip type. It is especially important when + * multiple devices share the same interrupt vector and must be + * distinguished. + * * pDeviceFns This is a pointer to the set of driver routines to use. * * pDeviceFlow This is a pointer to the set of flow control routines to @@ -112,6 +124,7 @@ typedef struct _console_flow { typedef struct _console_tbl { char *sDeviceName; + console_devs deviceType; console_fns *pDeviceFns; boolean (*deviceProbe)(int minor); console_flow *pDeviceFlow; @@ -132,7 +145,7 @@ typedef struct _console_tbl { typedef struct _console_data { void *termios_data; volatile boolean bActive; - volatile Ring_buffer_t TxBuffer; + volatile Ring_buffer_t TxBuffer; /* XXX remove from other drivers */ /* * This field may be used for any purpose required by the driver */ -- cgit v1.2.3