From patchwork Wed Jul 31 15:38:28 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 18717 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f197.google.com (mail-qc0-f197.google.com [209.85.216.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 32498246CC for ; Wed, 31 Jul 2013 15:38:52 +0000 (UTC) Received: by mail-qc0-f197.google.com with SMTP id s1sf879699qcw.0 for ; Wed, 31 Jul 2013 08:38:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-beenthere:x-forwarded-to:x-forwarded-for :delivered-to:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state:x-removed-original-auth :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:x-google-group-id:list-post:list-help :list-archive:list-unsubscribe; bh=byizd42cHS9wh88qscWvgee6eUXtj6ygeCt58CiViuM=; b=bek59p9lCywT0D/S/J0UoxLF30WuJl2PJZ+TX/zcmvuLQdsKjHgYrC3MxQ3KPk0DyE u480ohpMdM5rSDq//1jBkWfD9HBohj/3MX7RENKu7qwM7oTTXc2nsPqhJJRrQX2lC0lG EH3ZqWvmul3pb2GDB8AWEVKqnulFfk43SJB6Eq/6A7RjQZ/5XDf4/zJVte/gQ2vWvxWK nIRWYXu0H6T2KZPW455M/jDT0cbFd6BNNwMNih4MSqWYaLTF6ZkeGtdHdQ1/JeqtwioX NPQe4zs3qQnapGJ+QIzeSF/xOooJ5ve3+rehwsPIxwmEx5XIppS4Wbl0k+fMSvhNTHIK IaCg== X-Received: by 10.236.133.19 with SMTP id p19mr35702061yhi.54.1375285131991; Wed, 31 Jul 2013 08:38:51 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.106.195 with SMTP id gw3ls737622qeb.64.gmail; Wed, 31 Jul 2013 08:38:51 -0700 (PDT) X-Received: by 10.58.180.102 with SMTP id dn6mr29362722vec.79.1375285131866; Wed, 31 Jul 2013 08:38:51 -0700 (PDT) Received: from mail-vb0-f47.google.com (mail-vb0-f47.google.com [209.85.212.47]) by mx.google.com with ESMTPS id op1si415457vcb.90.2013.07.31.08.38.51 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 31 Jul 2013 08:38:51 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.47 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.47; Received: by mail-vb0-f47.google.com with SMTP id h10so878647vbh.34 for ; Wed, 31 Jul 2013 08:38:51 -0700 (PDT) X-Received: by 10.52.107.201 with SMTP id he9mr15529343vdb.106.1375285131734; Wed, 31 Jul 2013 08:38:51 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.221.11.8 with SMTP id pc8csp243378vcb; Wed, 31 Jul 2013 08:38:51 -0700 (PDT) X-Received: by 10.194.238.199 with SMTP id vm7mr48997034wjc.37.1375285130822; Wed, 31 Jul 2013 08:38:50 -0700 (PDT) Received: from mail-wg0-f46.google.com (mail-wg0-f46.google.com [74.125.82.46]) by mx.google.com with ESMTPS id z15si13532614wiu.74.2013.07.31.08.38.50 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 31 Jul 2013 08:38:50 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.46 is neither permitted nor denied by best guess record for domain of julien.grall@linaro.org) client-ip=74.125.82.46; Received: by mail-wg0-f46.google.com with SMTP id k13so731701wgh.1 for ; Wed, 31 Jul 2013 08:38:50 -0700 (PDT) X-Received: by 10.194.103.73 with SMTP id fu9mr49902598wjb.70.1375285130297; Wed, 31 Jul 2013 08:38:50 -0700 (PDT) Received: from belegaer.uk.xensource.com. (firewall.ctxuk.citrix.com. [46.33.159.2]) by mx.google.com with ESMTPSA id u9sm3135483wif.6.2013.07.31.08.38.48 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 31 Jul 2013 08:38:49 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org, ian.campbell@citrix.com Cc: stefano.stabellini@eu.citrix.com, patches@linaro.org, Julien Grall Subject: [PATCH v2 8/8] pl011: Implement vuart_info callback Date: Wed, 31 Jul 2013 16:38:28 +0100 Message-Id: <1375285109-3053-9-git-send-email-julien.grall@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1375285109-3053-1-git-send-email-julien.grall@linaro.org> References: <1375285109-3053-1-git-send-email-julien.grall@linaro.org> X-Gm-Message-State: ALoCoQlAp9VWfq7TQ1wk8uveVr+6FqHmpAFpGx8aDonX9kJ+NSuQICIkKCgATxX8j6ZqTgrkYri2 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: julien.grall@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.47 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Signed-off-by: Julien Grall --- 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);