From patchwork Thu Aug 1 16:09:31 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 18728 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ye0-f199.google.com (mail-ye0-f199.google.com [209.85.213.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A8147246CC for ; Thu, 1 Aug 2013 16:09:56 +0000 (UTC) Received: by mail-ye0-f199.google.com with SMTP id l12sf2409545yen.6 for ; Thu, 01 Aug 2013 09:09:56 -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=PPEObP5MGNqG7JxjhmVDrP3hMRBAHj/rCoJPZ/Fx2RQ=; b=O5EKnK8QZrcY68Q0KnOncwP3iaIfzuOHaAcPI9hwzL5rssWCujYm4ROOpilaTgsxiY sGDoeoMluVq2F00PFlwIN859HGl7NrM23XEZbNunEHtXu4F1Bijo02KujlkvWS3El94f ThNvGjXrXPyEzOcV2tCuvPizuQBbRzHlxKS2y3LOfi8TOnTY0JfLHtTFlA7TgaZcR3Wg xLS2rtFIlk3BtoTOUPxW0QKLmtnXoQ4oqwQpZh5jp+0ngWv6V6rkZ8RwpW2QpYEcuYkf nDvTXKjkR4gq0T9GZRWWF+nza3QFGKO406QIzhQpzIpTojYlquoeUDVlgHriH1CeOr+E +Kqg== X-Received: by 10.236.198.240 with SMTP id v76mr844696yhn.10.1375373396212; Thu, 01 Aug 2013 09:09:56 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.74.102 with SMTP id s6ls1228633qev.17.gmail; Thu, 01 Aug 2013 09:09:56 -0700 (PDT) X-Received: by 10.221.27.8 with SMTP id ro8mr693440vcb.46.1375373396007; Thu, 01 Aug 2013 09:09:56 -0700 (PDT) Received: from mail-vb0-f54.google.com (mail-vb0-f54.google.com [209.85.212.54]) by mx.google.com with ESMTPS id ha3si771863vdb.108.2013.08.01.09.09.55 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 01 Aug 2013 09:09:55 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.54 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.54; Received: by mail-vb0-f54.google.com with SMTP id q14so2312696vbe.13 for ; Thu, 01 Aug 2013 09:09:55 -0700 (PDT) X-Received: by 10.220.198.133 with SMTP id eo5mr708617vcb.24.1375373395886; Thu, 01 Aug 2013 09:09:55 -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 pc8csp307265vcb; Thu, 1 Aug 2013 09:09:55 -0700 (PDT) X-Received: by 10.194.22.41 with SMTP id a9mr1888829wjf.16.1375373394786; Thu, 01 Aug 2013 09:09:54 -0700 (PDT) Received: from mail-we0-f176.google.com (mail-we0-f176.google.com [74.125.82.176]) by mx.google.com with ESMTPS id k3si1800444wib.80.2013.08.01.09.09.54 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 01 Aug 2013 09:09:54 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.176 is neither permitted nor denied by best guess record for domain of julien.grall@linaro.org) client-ip=74.125.82.176; Received: by mail-we0-f176.google.com with SMTP id q56so1857071wes.21 for ; Thu, 01 Aug 2013 09:09:54 -0700 (PDT) X-Received: by 10.180.14.105 with SMTP id o9mr8459226wic.30.1375373394306; Thu, 01 Aug 2013 09:09:54 -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.52 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 01 Aug 2013 09:09:53 -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 6/7] exynos4210: Implement vuart_info callback Date: Thu, 1 Aug 2013 17:09:31 +0100 Message-Id: <1375373372-15009-7-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: ALoCoQnrFzJalXdbNQTqAGFjrxrdoUcTGCSE4z5P1aDYTh0inTvASl1ZFGBliu6w6mYahPxIoyeL 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.54 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 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)