aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/xen/serial.h
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2012-09-11 15:47:16 +0200
committerJan Beulich <jbeulich@suse.com>2012-09-11 15:47:16 +0200
commitaf844567f069cfd53ade32c1fcdf8582865129d1 (patch)
tree522014441187c02b971e57c6e5a4f80507fe0c40 /xen/include/xen/serial.h
parent0923fba2cf02e08275c6e454906a0420baa455b5 (diff)
downloadxen-af844567f069cfd53ade32c1fcdf8582865129d1.tar.gz
xen-af844567f069cfd53ade32c1fcdf8582865129d1.tar.bz2
xen-af844567f069cfd53ade32c1fcdf8582865129d1.zip
console: prepare for non-COMn port support
Widen SERHND_IDX (and use it where needed), introduce a flush low level driver method, and remove unnecessary peeking of the common code at the (driver specific) serial port identification string in the "console=" command line option value. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/include/xen/serial.h')
-rw-r--r--xen/include/xen/serial.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/xen/include/xen/serial.h b/xen/include/xen/serial.h
index ee22d27a50..6c4404b1b4 100644
--- a/xen/include/xen/serial.h
+++ b/xen/include/xen/serial.h
@@ -60,6 +60,8 @@ struct uart_driver {
int (*tx_empty)(struct serial_port *);
/* Put a character onto the serial line. */
void (*putc)(struct serial_port *, char);
+ /* Flush accumulated characters. */
+ void (*flush)(struct serial_port *);
/* Get a character from the serial line: returns 0 if none available. */
int (*getc)(struct serial_port *, char *);
/* Get IRQ number for this port's serial line: returns -1 if none. */
@@ -67,10 +69,12 @@ struct uart_driver {
};
/* 'Serial handles' are composed from the following fields. */
-#define SERHND_IDX (1<<0) /* COM1 or COM2? */
-#define SERHND_HI (1<<1) /* Mux/demux each transferred char by MSB. */
-#define SERHND_LO (1<<2) /* Ditto, except that the MSB is cleared. */
-#define SERHND_COOKED (1<<3) /* Newline/carriage-return translation? */
+#define SERHND_IDX (3<<0) /* COM1 or COM2? */
+# define SERHND_COM1 (0<<0)
+# define SERHND_COM2 (1<<0)
+#define SERHND_HI (1<<2) /* Mux/demux each transferred char by MSB. */
+#define SERHND_LO (1<<3) /* Ditto, except that the MSB is cleared. */
+#define SERHND_COOKED (1<<4) /* Newline/carriage-return translation? */
/* Two-stage initialisation (before/after IRQ-subsystem initialisation). */
void serial_init_preirq(void);