aboutsummaryrefslogtreecommitdiffstats
path: root/xen/drivers
diff options
context:
space:
mode:
authorJulien Grall <julien.grall@linaro.org>2013-08-01 17:09:31 +0100
committerIan Campbell <ian.campbell@citrix.com>2013-08-08 12:55:50 +0100
commite4618090abb12233ecfb8b1f00c15867aaeeabe8 (patch)
treeef76a31a4c0db2d525f30b483b50531e123b038b /xen/drivers
parent1b63024a4b2ddd3bba13f5b8630e7c05d8d33df5 (diff)
downloadxen-e4618090abb12233ecfb8b1f00c15867aaeeabe8.tar.gz
xen-e4618090abb12233ecfb8b1f00c15867aaeeabe8.tar.bz2
xen-e4618090abb12233ecfb8b1f00c15867aaeeabe8.zip
exynos4210: Implement vuart_info callback
Signed-off-by: Julien Grall <julien.grall@linaro.org> Reviewed-by: Tim Deegan <tim@xen.org>
Diffstat (limited to 'xen/drivers')
-rw-r--r--xen/drivers/char/exynos4210-uart.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/xen/drivers/char/exynos4210-uart.c b/xen/drivers/char/exynos4210-uart.c
index f7971da73b..9b34f92713 100644
--- a/xen/drivers/char/exynos4210-uart.c
+++ b/xen/drivers/char/exynos4210-uart.c
@@ -33,6 +33,7 @@ static struct exynos4210_uart {
struct dt_irq irq;
void *regs;
struct irqaction irqaction;
+ struct vuart_info vuart;
} exynos4210_com = {0};
/* These parity settings can be ORed directly into the ULCON. */
@@ -281,6 +282,13 @@ static const struct dt_irq __init *exynos4210_uart_dt_irq(struct serial_port *po
return &uart->irq;
}
+static const struct vuart_info *exynos4210_vuart_info(struct serial_port *port)
+{
+ struct exynos4210_uart *uart = port->uart;
+
+ return &uart->vuart;
+}
+
static struct uart_driver __read_mostly exynos4210_uart_driver = {
.init_preirq = exynos4210_uart_init_preirq,
.init_postirq = exynos4210_uart_init_postirq,
@@ -292,6 +300,7 @@ static struct uart_driver __read_mostly exynos4210_uart_driver = {
.getc = exynos4210_uart_getc,
.irq = exynos4210_uart_irq,
.dt_irq_get = exynos4210_uart_dt_irq,
+ .vuart_info = exynos4210_vuart_info,
};
/* TODO: Parse UART config from the command line */
@@ -337,6 +346,12 @@ static int __init exynos4210_uart_init(struct dt_device_node *dev,
return res;
}
+ uart->vuart.base_addr = addr;
+ uart->vuart.size = size;
+ uart->vuart.data_off = UTXH;
+ uart->vuart.status_off = UTRSTAT;
+ uart->vuart.status = UTRSTAT_TXE | UTRSTAT_TXFE;
+
/* Register with generic serial driver. */
serial_register_uart(SERHND_DTUART, &exynos4210_uart_driver, uart);