From patchwork Wed Jul 31 15:38:27 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 18716 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f72.google.com (mail-yh0-f72.google.com [209.85.213.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E1183246CC for ; Wed, 31 Jul 2013 15:38:50 +0000 (UTC) Received: by mail-yh0-f72.google.com with SMTP id z20sf1105694yhz.3 for ; Wed, 31 Jul 2013 08:38:50 -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=g/kKxGLHHJcgwD6bSXkwzDF86wAHbjvoINA+ZEIq//k=; b=NYKv8OkDnjX7dnWjtAhw91O+2c3snMXKzLo8zu5CwKdNgEfqU2TgCMetBvySXQ60CT jAEALNgVwsTuUDVB+ghmBf3KRGgX4Ny/q1mgGbZway/Czekd58B/uPhvJlEhCOqZTbup G/Uj6EAE40OVKXfUZY5nStP6akRVJzdhxIxfiV42qLJmM1xDK05DrpV9Cnq0Mokm7w3f m6BSRDli1srwhrZBcAfWMymebwkAQ2A3IseTJ0FJsgOetZKA0MO7d0T1WNUkjgYMOacK Ppe1hG3BpGdgtfSqkyYgBuWZPgjxFkTmRI69WfOP4xVB/Mh+HWNkqIM9pf7ZvBGKYHpJ mmVQ== X-Received: by 10.236.54.135 with SMTP id i7mr36127942yhc.33.1375285130698; Wed, 31 Jul 2013 08:38:50 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.13.168 with SMTP id i8ls772399qec.65.gmail; Wed, 31 Jul 2013 08:38:50 -0700 (PDT) X-Received: by 10.221.63.136 with SMTP id xe8mr11642618vcb.51.1375285130560; Wed, 31 Jul 2013 08:38:50 -0700 (PDT) Received: from mail-vb0-f45.google.com (mail-vb0-f45.google.com [209.85.212.45]) by mx.google.com with ESMTPS id ha3si416724vdb.82.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: 209.85.212.45 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.45; Received: by mail-vb0-f45.google.com with SMTP id e15so872559vbg.32 for ; Wed, 31 Jul 2013 08:38:50 -0700 (PDT) X-Received: by 10.58.154.34 with SMTP id vl2mr29223701veb.35.1375285130409; Wed, 31 Jul 2013 08:38:50 -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 pc8csp243374vcb; Wed, 31 Jul 2013 08:38:49 -0700 (PDT) X-Received: by 10.180.104.73 with SMTP id gc9mr4759337wib.13.1375285129249; Wed, 31 Jul 2013 08:38:49 -0700 (PDT) Received: from mail-wi0-f171.google.com (mail-wi0-f171.google.com [209.85.212.171]) by mx.google.com with ESMTPS id l1si1075632wjz.60.2013.07.31.08.38.48 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 31 Jul 2013 08:38:49 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.171 is neither permitted nor denied by best guess record for domain of julien.grall@linaro.org) client-ip=209.85.212.171; Received: by mail-wi0-f171.google.com with SMTP id hr7so4059553wib.16 for ; Wed, 31 Jul 2013 08:38:48 -0700 (PDT) X-Received: by 10.180.89.231 with SMTP id br7mr4777344wib.19.1375285128815; Wed, 31 Jul 2013 08:38:48 -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.47 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 31 Jul 2013 08:38:47 -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 7/8] exynos4210: Implement vuart_info callback Date: Wed, 31 Jul 2013 16:38:27 +0100 Message-Id: <1375285109-3053-8-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: ALoCoQk9yrDAjD262ar7Zgk4RyAc4kbXUUVRGj27CDlFXtDd9TgYC72dAb1Ox/silADdYO6HMM1e 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.45 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 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)