aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/xen/serial.h
diff options
context:
space:
mode:
authorJulien Grall <julien.grall@linaro.org>2013-08-01 17:09:28 +0100
committerIan Campbell <ian.campbell@citrix.com>2013-08-08 12:55:12 +0100
commit7360db4276ffed96b54bbddb7aff4127fe69f051 (patch)
tree1671078a24edbfc5fa4883031dc30697648a6c60 /xen/include/xen/serial.h
parent0aec8823501f8ee058c1ba673d2ac3e0f3f2e8db (diff)
downloadxen-7360db4276ffed96b54bbddb7aff4127fe69f051.tar.gz
xen-7360db4276ffed96b54bbddb7aff4127fe69f051.tar.bz2
xen-7360db4276ffed96b54bbddb7aff4127fe69f051.zip
xen/arm: New callback in uart_driver to retrieve serial information
There is no way to retrieve basic informations (base address, size, ....) for an UART. This callback will be used later to partially emulate the real UART for DOM0 on ARM. Signed-off-by: Julien Grall <julien.grall@linaro.org> Reviewed-by: Tim Deegan <tim@xen.org> Acked-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/include/xen/serial.h')
-rw-r--r--xen/include/xen/serial.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/xen/include/xen/serial.h b/xen/include/xen/serial.h
index 9caf776ad0..403e193d96 100644
--- a/xen/include/xen/serial.h
+++ b/xen/include/xen/serial.h
@@ -32,6 +32,14 @@ enum serial_port_state {
serial_initialized
};
+struct vuart_info {
+ paddr_t base_addr; /* Base address of the UART */
+ unsigned long size; /* Size of the memory region */
+ unsigned long data_off; /* Data register offset */
+ unsigned long status_off; /* Status register offset */
+ unsigned long status; /* Ready status value */
+};
+
struct serial_port {
/* Uart-driver parameters. */
struct uart_driver *driver;
@@ -74,6 +82,8 @@ struct uart_driver {
int (*irq)(struct serial_port *);
/* Get IRQ device node for this port's serial line: returns NULL if none. */
const struct dt_irq *(*dt_irq_get)(struct serial_port *);
+ /* Get serial information */
+ const struct vuart_info *(*vuart_info)(struct serial_port *);
};
/* 'Serial handles' are composed from the following fields. */
@@ -127,6 +137,9 @@ int serial_irq(int idx);
/* Return irq device node for specified serial port (identified by index). */
const struct dt_irq *serial_dt_irq(int idx);
+/* Retrieve basic UART information to emulate it (base address, size...) */
+const struct vuart_info* serial_vuart_info(int idx);
+
/* Serial suspend/resume. */
void serial_suspend(void);
void serial_resume(void);