From: Julien Grall <julien.grall@linaro.org>
To: xen-devel@lists.xen.org
Cc: patches@linaro.org, tim@xen.org, ian.campbell@citrix.com,
Julien Grall <julien.grall@linaro.org>,
stefano.stabellini@eu.citrix.com
Subject: [PATCH v3 6/7] exynos4210: Implement vuart_info callback
Date: Thu, 1 Aug 2013 17:09:31 +0100 [thread overview]
Message-ID: <1375373372-15009-7-git-send-email-julien.grall@linaro.org> (raw)
In-Reply-To: <1375373372-15009-1-git-send-email-julien.grall@linaro.org>
Signed-off-by: Julien Grall <julien.grall@linaro.org>
Reviewed-by: Tim Deegan <tim@xen.org>
---
Changes v2:
- Use the renamed callback
---
xen/drivers/char/exynos4210-uart.c | 15 +++++++++++++++
xen/include/asm-arm/exynos4210-uart.h | 1 +
2 files changed, 16 insertions(+)
diff --git a/xen/drivers/char/exynos4210-uart.c b/xen/drivers/char/exynos4210-uart.c
index f7971da..9b34f92 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);
diff --git a/xen/include/asm-arm/exynos4210-uart.h b/xen/include/asm-arm/exynos4210-uart.h
index bd9a4be..e2ab4a4 100644
--- a/xen/include/asm-arm/exynos4210-uart.h
+++ b/xen/include/asm-arm/exynos4210-uart.h
@@ -88,6 +88,7 @@
/* UTRSTAT */
#define UTRSTAT_TXFE (1 << 1)
+#define UTRSTAT_TXE (1 << 2)
/* URHX */
#define URXH_DATA_MASK (0xff)
--
1.7.10.4
next prev parent reply other threads:[~2013-08-01 16:09 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-01 16:09 [PATCH v3 0/7] Emulate virtual UART for DOM0 and some UART clean up Julien Grall
2013-08-01 16:09 ` [PATCH v3 1/7] pl011: Move registers' definition in a separate file Julien Grall
2013-08-01 16:09 ` [PATCH v3 2/7] xen/arm: Use define instead of hardcoded value in debug-pl011 Julien Grall
2013-08-01 16:09 ` [PATCH v3 3/7] xen/arm: New callback in uart_driver to retrieve serial information Julien Grall
2013-08-02 10:31 ` Tim Deegan
2013-08-06 17:45 ` Keir Fraser
2013-08-01 16:09 ` [PATCH v3 4/7] xen/arm: Implement a virtual UART Julien Grall
2013-08-02 10:34 ` Tim Deegan
2013-08-01 16:09 ` [PATCH v3 5/7] exynos4210: rename UTRSTAT_TX_EMPTY in UTRSTAT_TXFE Julien Grall
2013-08-01 16:09 ` Julien Grall [this message]
2013-08-01 16:09 ` [PATCH v3 7/7] pl011: Implement vuart_info callback Julien Grall
2013-08-01 16:12 ` [PATCH v3 0/7] Emulate virtual UART for DOM0 and some UART clean up Julien Grall
2013-08-02 16:17 ` Ian Campbell
2013-08-05 9:27 ` Ian Campbell
2013-08-05 15:08 ` Ian Campbell
2013-08-06 17:10 ` Julien Grall
2013-08-08 12:16 ` Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1375373372-15009-7-git-send-email-julien.grall@linaro.org \
--to=julien.grall@linaro.org \
--cc=ian.campbell@citrix.com \
--cc=patches@linaro.org \
--cc=stefano.stabellini@eu.citrix.com \
--cc=tim@xen.org \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).