From patchwork Thu Jul 25 16:59:33 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 18592 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f198.google.com (mail-qc0-f198.google.com [209.85.216.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3320225E59 for ; Thu, 25 Jul 2013 17:00:10 +0000 (UTC) Received: by mail-qc0-f198.google.com with SMTP id c1sf1894040qcz.9 for ; Thu, 25 Jul 2013 10:00:10 -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-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=WEOY5+uYv59uLbUvTt9lzIGz48zCnsc67k0WikVmtWY=; b=gAvh35u/9PfgDSTTUqOM8JR4Gc9wgT4QIo36Z9pimDmeVlRS1tKWHOdLQO/v3x8O3D 8aejXrA6eS+Dm/XuY5CFHGn/7cAt4ymLI4OikZ/LALk45nB6Y4WEqqWcqoWsmn1UpSHz BVqX1j3DVgcPFpsmn86JgiPx81q3TzNLV8hKcbBcIaezMZYLchcBLhflr5T1hPT9QqGa asqs3Gyy5fyEWbq97wX2mXWglj0GDeDirLJlvORfHGn25q5uzCjfJjFiSYrWC5W5jdNP PngvkOPGiLFHij125rPODKQ5rl+YS0z5LXoa7P66z6xXOcbNxtsW49qMfOrbECFEo4mr WJKA== X-Received: by 10.236.63.37 with SMTP id z25mr22836981yhc.49.1374771609878; Thu, 25 Jul 2013 10:00:09 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.82.74 with SMTP id g10ls813227qey.60.gmail; Thu, 25 Jul 2013 10:00:09 -0700 (PDT) X-Received: by 10.52.29.241 with SMTP id n17mr15292356vdh.95.1374771609751; Thu, 25 Jul 2013 10:00:09 -0700 (PDT) Received: from mail-vb0-f52.google.com (mail-vb0-f52.google.com [209.85.212.52]) by mx.google.com with ESMTPS id w1si12645249vei.72.2013.07.25.10.00.09 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 25 Jul 2013 10:00:09 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.52 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.52; Received: by mail-vb0-f52.google.com with SMTP id f12so583395vbg.39 for ; Thu, 25 Jul 2013 10:00:09 -0700 (PDT) X-Received: by 10.58.251.144 with SMTP id zk16mr17774020vec.37.1374771609648; Thu, 25 Jul 2013 10:00:09 -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.58.165.8 with SMTP id yu8csp87048veb; Thu, 25 Jul 2013 10:00:09 -0700 (PDT) X-Received: by 10.194.60.5 with SMTP id d5mr18359468wjr.26.1374771608618; Thu, 25 Jul 2013 10:00:08 -0700 (PDT) Received: from mail-wg0-f50.google.com (mail-wg0-f50.google.com [74.125.82.50]) by mx.google.com with ESMTPS id x12si1987107wia.27.2013.07.25.10.00.08 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 25 Jul 2013 10:00:08 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.50 is neither permitted nor denied by best guess record for domain of julien.grall@linaro.org) client-ip=74.125.82.50; Received: by mail-wg0-f50.google.com with SMTP id m15so1887033wgh.17 for ; Thu, 25 Jul 2013 10:00:08 -0700 (PDT) X-Received: by 10.194.110.39 with SMTP id hx7mr31322768wjb.4.1374771608180; Thu, 25 Jul 2013 10:00:08 -0700 (PDT) Received: from belegaer.uk.xensource.com. (firewall.ctxuk.citrix.com. [46.33.159.2]) by mx.google.com with ESMTPSA id nb12sm3150016wic.3.2013.07.25.10.00.06 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 25 Jul 2013 10:00:07 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Cc: ian.campbell@citrix.com, Stefano.Stabellini@eu.citrix.com, patches@linaro.org, Julien Grall Subject: [PATCH 7/8] exynos4210: Implement serial_info callback Date: Thu, 25 Jul 2013 17:59:33 +0100 Message-Id: <1374771574-7848-8-git-send-email-julien.grall@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1374771574-7848-1-git-send-email-julien.grall@linaro.org> References: <1374771574-7848-1-git-send-email-julien.grall@linaro.org> X-Gm-Message-State: ALoCoQkXaNQZCboDZqXgKOXh7cJxVBzfwtZ4ol+2Tpd0Pn7te+r9a8M129VbefZ92nOxoEDl3Fkp X-Original-Sender: julien.grall@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.52 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 --- 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..9ed70c2 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 serial_info info; } 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 serial_info *exynos4210_uart_info(struct serial_port *port) +{ + struct exynos4210_uart *uart = port->uart; + + return &uart->info; +} + 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, + .info = exynos4210_uart_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->info.base_addr = addr; + uart->info.size = size; + uart->info.data_off = UTXH; + uart->info.status_off = UTRSTAT; + uart->info.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)