aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/xen/serial.h
diff options
context:
space:
mode:
authorJulien Grall <julien.grall@linaro.org>2013-04-27 21:02:04 +0100
committerIan Campbell <ian.campbell@citrix.com>2013-05-13 11:59:59 +0100
commit2a403a18dd34050d9439ce78576fca5f5d03d69d (patch)
tree01b6e3521b6dba232bc6ae6c3136e4a204b1bf17 /xen/include/xen/serial.h
parent2be37b2cda31fc1b5f11deb912249bc54803f055 (diff)
downloadxen-2a403a18dd34050d9439ce78576fca5f5d03d69d.tar.gz
xen-2a403a18dd34050d9439ce78576fca5f5d03d69d.tar.bz2
xen-2a403a18dd34050d9439ce78576fca5f5d03d69d.zip
xen/arm: Add generic UART to get the device in the device tree
This generic UART will find the right UART via xen command line with dtuart=myserial. "myserial" is the alias of the UART in the device tree. Xen will retrieve the information via the device tree and call the initialization function for this specific UART thanks to the device API. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/include/xen/serial.h')
-rw-r--r--xen/include/xen/serial.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/xen/include/xen/serial.h b/xen/include/xen/serial.h
index 5de517136b..8af3bc415a 100644
--- a/xen/include/xen/serial.h
+++ b/xen/include/xen/serial.h
@@ -9,6 +9,7 @@
#ifndef __XEN_SERIAL_H__
#define __XEN_SERIAL_H__
+#include <xen/init.h>
#include <xen/spinlock.h>
struct cpu_user_regs;
@@ -76,10 +77,11 @@ struct uart_driver {
};
/* 'Serial handles' are composed from the following fields. */
-#define SERHND_IDX (3<<0) /* COM1, COM2, or DBGP? */
+#define SERHND_IDX (3<<0) /* COM1, COM2, DBGP, DTUART? */
# define SERHND_COM1 (0<<0)
# define SERHND_COM2 (1<<0)
# define SERHND_DBGP (2<<0)
+# define SERHND_DTUART (0<<0) /* Steal SERHND_COM1 value */
#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? */
@@ -156,6 +158,7 @@ void ns16550_init(int index, struct ns16550_defaults *defaults);
void ehci_dbgp_init(void);
void pl011_init(int index, unsigned long register_base_address);
+void __init dt_uart_init(void);
struct physdev_dbgp_op;
int dbgp_op(const struct physdev_dbgp_op *);