xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@linaro.org>
To: xen-devel@lists.xen.org, ian.campbell@citrix.com
Cc: patches@linaro.org, Julien Grall <julien.grall@linaro.org>,
	stefano.stabellini@eu.citrix.com
Subject: [PATCH v2 8/8] pl011: Implement vuart_info callback
Date: Wed, 31 Jul 2013 16:38:28 +0100	[thread overview]
Message-ID: <1375285109-3053-9-git-send-email-julien.grall@linaro.org> (raw)
In-Reply-To: <1375285109-3053-1-git-send-email-julien.grall@linaro.org>

Signed-off-by: Julien Grall <julien.grall@linaro.org>

---
    Changes in v2:
        - Use the renamed callback
---
 xen/drivers/char/pl011.c |   15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/xen/drivers/char/pl011.c b/xen/drivers/char/pl011.c
index fd87e68..05d034f 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);
 
-- 
1.7.10.4

  parent reply	other threads:[~2013-07-31 15:38 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-31 15:38 [PATCH v2 0/8] Emulate virtual UART for DOM0 and some UART clean up Julien Grall
2013-07-31 15:38 ` [PATCH v2 2/8] pl011: Move registers' definition in a separate file Julien Grall
2013-08-01 11:01   ` Tim Deegan
2013-07-31 15:38 ` [PATCH v2 3/8] xen/arm: Use define instead of hardcoded value in debug-pl011 Julien Grall
2013-07-31 15:38 ` [PATCH v2 4/8] xen/arm: New callback in uart_driver to retrieve serial information Julien Grall
2013-08-01 11:03   ` Tim Deegan
2013-08-01 12:24     ` Julien Grall
2013-07-31 15:38 ` [PATCH v2 5/8] xen/arm: Implement a virtual UART Julien Grall
2013-08-01 11:22   ` Tim Deegan
2013-08-01 12:43     ` Julien Grall
2013-08-01 15:42       ` Ian Campbell
2013-07-31 15:38 ` [PATCH v2 6/8] exynos4210: rename UTRSTAT_TX_EMPTY in UTRSTAT_TXFE Julien Grall
2013-07-31 15:38 ` [PATCH v2 7/8] exynos4210: Implement vuart_info callback Julien Grall
2013-07-31 15:38 ` Julien Grall [this message]
2013-08-01 11:28 ` [PATCH v2 0/8] Emulate virtual UART for DOM0 and some UART clean up Tim Deegan
2013-08-01 12:20   ` Julien Grall

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=1375285109-3053-9-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=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).