From patchwork Mon Jun 16 03:50:27 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Emilio_L=C3=B3pez?= X-Patchwork-Id: 4356021 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 3F153BEEAA for ; Mon, 16 Jun 2014 03:56:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3822420279 for ; Mon, 16 Jun 2014 03:56:14 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6D1692024F for ; Mon, 16 Jun 2014 03:56:13 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WwNyq-0001tv-0d; Mon, 16 Jun 2014 03:53:12 +0000 Received: from yotta.elopez.com.ar ([2a00:1768:1004:d00d:c0de:4:f00d:cafe]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WwNyg-0001nr-UO for linux-arm-kernel@lists.infradead.org; Mon, 16 Jun 2014 03:53:03 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=elopez.com.ar; s=mail; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=RIay9ZiaK0bz64JcxktVd1Sdzr6F7Y7zjYlhH/2hfEQ=; b=XfqNrEadIMlXYG/C64dsQph1XCxZStwPF9LUwmrvpA8RGmQtWvSfmghI9rMaUOfZS2KYeALvu34CM7stlvDskS/22qYYx9SHDPNihNp+2nv5xbN/8Xl2BZPy20iOY0o6Q5YHhTuuSSqaNRb1fcFUXX30YeaxeBShIyHbjb+lbawR9pwH+GBSPFCiKM9hkx1Mvoj7mSFa249RaTgX5AUijtisDk9n2z5jIQY7w/IRrlA0RZxdyEf5+RzT7mPh1GvuEX+VRfZB/OGzhW+xzzTUGKi0+kqnwuqW4jW54Gr8YoXbw44y4h1tRYeHmyt/eRmmrqWtESxNwmCul0pEwuE5Kw==; Received: from 200-122-75-123.cab.prima.net.ar ([200.122.75.123] helo=desktop.lan) by yotta.elopez.com.ar with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_CBC_SHA256:128) (Exim 4.82_1-5b7a7c0-XX) id 1WwNyB-0005L1-L0; Mon, 16 Jun 2014 00:52:31 -0300 From: =?UTF-8?q?Emilio=20L=C3=B3pez?= To: Maxime Ripard , vinod.koul@intel.com, dan.j.williams@intel.com Subject: [PATCH 02/10] serial: 8250_dw: support DMA on the OF case Date: Mon, 16 Jun 2014 00:50:27 -0300 Message-Id: <1402890635-12342-3-git-send-email-emilio@elopez.com.ar> X-Mailer: git-send-email 2.0.0 In-Reply-To: <1402890635-12342-1-git-send-email-emilio@elopez.com.ar> References: <1402890635-12342-1-git-send-email-emilio@elopez.com.ar> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140615_205303_213106_BF455C60 X-CRM114-Status: UNSURE ( 9.42 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.8 (/) Cc: Ezequiel Garcia , =?UTF-8?q?Emilio=20L=C3=B3pez?= , zhuzhenhua@allwinnertech.com, shuge@allwinnertech.com, kevin.z.m.zh@gmail.com, sunny@allwinnertech.com, dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Currently, DMA properties on the DT are ignored when using the 8250_dw driver. With this patch, DMA will be used when available. Signed-off-by: Emilio López --- drivers/tty/serial/8250/8250_dw.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c index ed31135..f75c0bf 100644 --- a/drivers/tty/serial/8250/8250_dw.c +++ b/drivers/tty/serial/8250/8250_dw.c @@ -222,6 +222,8 @@ static int dw8250_probe_of(struct uart_port *p, struct dw8250_data *data) { struct device_node *np = p->dev->of_node; + struct uart_8250_port *up = container_of(p, struct uart_8250_port, + port); u32 val; bool has_ucv = true; @@ -254,11 +256,14 @@ static int dw8250_probe_of(struct uart_port *p, } } if (has_ucv) - dw8250_setup_port(container_of(p, struct uart_8250_port, port)); + dw8250_setup_port(up); if (!of_property_read_u32(np, "reg-shift", &val)) p->regshift = val; + if (of_get_property(np, "dmas", NULL)) + up->dma = &data->dma; + /* clock got configured through clk api, all done */ if (p->uartclk) return 0;