diff options
author | Julien Grall <julien.grall@linaro.org> | 2013-08-01 17:09:32 +0100 |
---|---|---|
committer | Ian Campbell <ian.campbell@citrix.com> | 2013-08-08 12:55:51 +0100 |
commit | 6349b01651c4c915a7e9600fcf3f6f77cb5cf9bb (patch) | |
tree | f51aa5fa08c2e4fcb0b25d4c278a5902bff8d6ce /xen/drivers | |
parent | e4618090abb12233ecfb8b1f00c15867aaeeabe8 (diff) | |
download | xen-6349b01651c4c915a7e9600fcf3f6f77cb5cf9bb.tar.gz xen-6349b01651c4c915a7e9600fcf3f6f77cb5cf9bb.tar.bz2 xen-6349b01651c4c915a7e9600fcf3f6f77cb5cf9bb.zip |
pl011: 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/pl011.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/xen/drivers/char/pl011.c b/xen/drivers/char/pl011.c index fd87e68472..05d034f4f6 100644 --- a/xen/drivers/char/pl011.c +++ b/xen/drivers/char/pl011.c @@ -36,6 +36,7 @@ static struct pl011 { void __iomem *regs; /* UART with IRQ line: interrupt-driven I/O. */ struct irqaction irqaction; + struct vuart_info vuart; /* /\* UART with no IRQ line: periodically-polled I/O. *\/ */ /* struct timer timer; */ /* unsigned int timeout_ms; */ @@ -190,6 +191,13 @@ static const struct dt_irq __init *pl011_dt_irq(struct serial_port *port) return &uart->irq; } +static const struct vuart_info *pl011_vuart(struct serial_port *port) +{ + struct pl011 *uart = port->uart; + + return &uart->vuart; +} + static struct uart_driver __read_mostly pl011_driver = { .init_preirq = pl011_init_preirq, .init_postirq = pl011_init_postirq, @@ -201,6 +209,7 @@ static struct uart_driver __read_mostly pl011_driver = { .getc = pl011_getc, .irq = pl011_irq, .dt_irq_get = pl011_dt_irq, + .vuart_info = pl011_vuart, }; /* TODO: Parse UART config from the command line */ @@ -248,6 +257,12 @@ static int __init pl011_uart_init(struct dt_device_node *dev, return res; } + uart->vuart.base_addr = addr; + uart->vuart.size = size; + uart->vuart.data_off = DR; + uart->vuart.status_off = FR; + uart->vuart.status = 0; + /* Register with generic serial driver. */ serial_register_uart(SERHND_DTUART, &pl011_driver, uart); |