From patchwork Thu Aug 1 16:09:32 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 18729 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vb0-f71.google.com (mail-vb0-f71.google.com [209.85.212.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3F4F4246CC for ; Thu, 1 Aug 2013 16:09:58 +0000 (UTC) Received: by mail-vb0-f71.google.com with SMTP id g17sf2659404vbg.2 for ; Thu, 01 Aug 2013 09:09:58 -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=XMQbmBuK3X0pBqXhx8QxxJkQFlvk9LOLLxsEzSpiuUg=; b=RnsufkV1tIkX8/UBNJaEArruUjBC8RwDuEuMwRcLXk7mL6/Qz9bOC4Z0BTucLInDID /PiKGgLDV1++sh8gfNYYTMRBGkXanLoCVRsIGQdeHRbaOR4jRim9F5mt6KzW5+rsJblQ UXqcveJIYYBIOV8ohmXAUcO3rPgavzfxaGG77AohU0fPu8jtnS1x3Vcp0gv4V1piwQh9 f8+Wu0vLmKalTYasBQez+TBcXtkRciKdcsqYbnyz4wNxwaKxkHDL00p1Ur6pm5JO+0F2 i84rnQUTfD4AdEcL3Xebsl1EmtVkFbWJqp9nO/uqnk2ChDLWeQxRm0T0eHmDTCOxg9QV AZyA== X-Received: by 10.236.148.33 with SMTP id u21mr786248yhj.37.1375373398017; Thu, 01 Aug 2013 09:09:58 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.36.70 with SMTP id o6ls729612qej.54.gmail; Thu, 01 Aug 2013 09:09:57 -0700 (PDT) X-Received: by 10.52.27.116 with SMTP id s20mr595007vdg.42.1375373397849; Thu, 01 Aug 2013 09:09:57 -0700 (PDT) Received: from mail-vb0-f43.google.com (mail-vb0-f43.google.com [209.85.212.43]) by mx.google.com with ESMTPS id l8si786987vez.10.2013.08.01.09.09.57 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 01 Aug 2013 09:09:57 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.43 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.43; Received: by mail-vb0-f43.google.com with SMTP id h11so2281277vbh.30 for ; Thu, 01 Aug 2013 09:09:57 -0700 (PDT) X-Received: by 10.58.211.227 with SMTP id nf3mr718736vec.20.1375373397713; Thu, 01 Aug 2013 09:09:57 -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 pc8csp307267vcb; Thu, 1 Aug 2013 09:09:57 -0700 (PDT) X-Received: by 10.180.212.70 with SMTP id ni6mr8479274wic.11.1375373396616; Thu, 01 Aug 2013 09:09:56 -0700 (PDT) Received: from mail-we0-f180.google.com (mail-we0-f180.google.com [74.125.82.180]) by mx.google.com with ESMTPS id cz5si1846532wjb.156.2013.08.01.09.09.55 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 01 Aug 2013 09:09:56 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.180 is neither permitted nor denied by best guess record for domain of julien.grall@linaro.org) client-ip=74.125.82.180; Received: by mail-we0-f180.google.com with SMTP id p61so1905467wes.11 for ; Thu, 01 Aug 2013 09:09:55 -0700 (PDT) X-Received: by 10.194.248.130 with SMTP id ym2mr1826544wjc.61.1375373395871; Thu, 01 Aug 2013 09:09:55 -0700 (PDT) Received: from belegaer.uk.xensource.com. (firewall.ctxuk.citrix.com. [46.33.159.2]) by mx.google.com with ESMTPSA id a8sm4594556wie.6.2013.08.01.09.09.54 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 01 Aug 2013 09:09:55 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Cc: stefano.stabellini@eu.citrix.com, ian.campbell@citrix.com, patches@linaro.org, tim@xen.org, Julien Grall Subject: [PATCH v3 7/7] pl011: Implement vuart_info callback Date: Thu, 1 Aug 2013 17:09:32 +0100 Message-Id: <1375373372-15009-8-git-send-email-julien.grall@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1375373372-15009-1-git-send-email-julien.grall@linaro.org> References: <1375373372-15009-1-git-send-email-julien.grall@linaro.org> X-Gm-Message-State: ALoCoQmd/BC0+ss8INtxgMw8jaW1/bCXEDY310XnkfhhMqwGcRJ3x9Vu1gc4Hxk2UQsKS9Rvf3Ct 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.43 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 Reviewed-by: Tim Deegan --- 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);