From patchwork Wed Oct 8 00:35:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ray Jui X-Patchwork-Id: 38444 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f71.google.com (mail-wg0-f71.google.com [74.125.82.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B96C02057C for ; Wed, 8 Oct 2014 00:35:16 +0000 (UTC) Received: by mail-wg0-f71.google.com with SMTP id y10sf4620586wgg.10 for ; Tue, 07 Oct 2014 17:35:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=mDYXh+jHeu5NklwrOp65V41rbhtr5eKWdJFzrNVoYIo=; b=cPvVGcc1CBzXYw4Ac6MeCys4XyGVZuWYntbZOVEGhqltNww/N9FSG5I2h0h3vBpQGC /slZ4pCNwRWcqtgcV8io/dcpBeabRbhhkuZJdM0DBRAkhT0KhLiPrM9NT81j3bUKHKxe uhEF/HC8KIUMbZd/cyUmEtqgwqe5pUeVec4Dm4SREk6w0yoSHbWz3br4apNwinGHfLrf mFA5ea25L68ILTPueqM7P3luQ24tnZunSjaY7EclVhyyfgR8MGJIcFbhKW4K/TCXoZ30 moUq8OeOy17Ge6HtSyAKiW9qoKBtr8FjyrezlwF6S6yg+MgjRJ4mxAlVw5XMeNzNDwE/ YL6w== X-Gm-Message-State: ALoCoQlUflp8LPA6pSoPR7uHkhlXaM7kBQ/MlCvk4lLzXfLo/l+iazjwMIAouQ5soeDLzfW2PDKR X-Received: by 10.112.17.3 with SMTP id k3mr1055981lbd.3.1412728515857; Tue, 07 Oct 2014 17:35:15 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.2.39 with SMTP id 7ls3696lar.87.gmail; Tue, 07 Oct 2014 17:35:15 -0700 (PDT) X-Received: by 10.112.52.74 with SMTP id r10mr7221404lbo.3.1412728515516; Tue, 07 Oct 2014 17:35:15 -0700 (PDT) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com [209.85.215.54]) by mx.google.com with ESMTPS id h5si30737477laf.110.2014.10.07.17.35.14 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 07 Oct 2014 17:35:14 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.54 as permitted sender) client-ip=209.85.215.54; Received: by mail-la0-f54.google.com with SMTP id gm9so7244773lab.41 for ; Tue, 07 Oct 2014 17:35:14 -0700 (PDT) X-Received: by 10.112.183.233 with SMTP id ep9mr7224338lbc.56.1412728514895; Tue, 07 Oct 2014 17:35:14 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.130.169 with SMTP id of9csp436976lbb; Tue, 7 Oct 2014 17:35:14 -0700 (PDT) X-Received: by 10.68.163.195 with SMTP id yk3mr6887511pbb.70.1412728513408; Tue, 07 Oct 2014 17:35:13 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id nb3si16875001pbc.105.2014.10.07.17.35.12 for ; Tue, 07 Oct 2014 17:35:13 -0700 (PDT) Received-SPF: none (google.com: linux-serial-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755484AbaJHAfL (ORCPT + 1 other); Tue, 7 Oct 2014 20:35:11 -0400 Received: from mail-gw3-out.broadcom.com ([216.31.210.64]:43770 "EHLO mail-gw3-out.broadcom.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754820AbaJHAfK (ORCPT ); Tue, 7 Oct 2014 20:35:10 -0400 X-IronPort-AV: E=Sophos;i="5.04,674,1406617200"; d="scan'208";a="47511224" Received: from irvexchcas07.broadcom.com (HELO IRVEXCHCAS07.corp.ad.broadcom.com) ([10.9.208.55]) by mail-gw3-out.broadcom.com with ESMTP; 07 Oct 2014 17:37:44 -0700 Received: from IRVEXCHSMTP2.corp.ad.broadcom.com (10.9.207.52) by IRVEXCHCAS07.corp.ad.broadcom.com (10.9.208.55) with Microsoft SMTP Server (TLS) id 14.3.174.1; Tue, 7 Oct 2014 17:35:17 -0700 Received: from mail-irva-13.broadcom.com (10.10.10.20) by IRVEXCHSMTP2.corp.ad.broadcom.com (10.9.207.52) with Microsoft SMTP Server id 14.3.174.1; Tue, 7 Oct 2014 17:35:17 -0700 Received: from mail.broadcom.com (lbrmn-lnxub44.ric.broadcom.com [10.136.8.49]) by mail-irva-13.broadcom.com (Postfix) with ESMTP id 583284100E; Tue, 7 Oct 2014 17:34:55 -0700 (PDT) From: Ray Jui To: Greg Kroah-Hartman , Jiri Slaby , Mika Westerberg , "Heikki Krogerus" , Andy Shevchenko , Chen-Yu Tsai , "Paul Gortmaker" , Loic Poulain CC: , , JD Zheng , Scott Branden , Ray Jui Subject: [PATCH] serial: 8250_dw: Add DMA support for non-ACPI platforms Date: Tue, 7 Oct 2014 17:35:47 -0700 Message-ID: <1412728547-4126-1-git-send-email-rjui@broadcom.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: MIME-Version: 1.0 Sender: linux-serial-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-serial@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: rjui@broadcom.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.54 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The dma pointer under struct uart_8250_port is currently left unassigned for non-ACPI platforms. It should be pointing to the dma member in struct dw8250_data like how it was done for ACPI, so the core 8250 code will try to request for DMA when registering the port If DMA is not enabled in device tree, request DMA will fail and the driver will fall back to PIO Signed-off-by: Ray Jui Reviewed-by: JD (Jiandong) Zheng Reviewed-by: Scott Branden Tested-by: Scott Branden Reviewed-by: Heikki Krogerus --- drivers/tty/serial/8250/8250_dw.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c index 4db7987..1038ea8 100644 --- a/drivers/tty/serial/8250/8250_dw.c +++ b/drivers/tty/serial/8250/8250_dw.c @@ -293,6 +293,14 @@ static int dw8250_probe_of(struct uart_port *p, if (has_ucv) dw8250_setup_port(up); + /* if we have a valid fifosize, try hooking up DMA here */ + if (p->fifosize) { + up->dma = &data->dma; + + up->dma->rxconf.src_maxburst = p->fifosize / 4; + up->dma->txconf.dst_maxburst = p->fifosize / 4; + } + if (!of_property_read_u32(np, "reg-shift", &val)) p->regshift = val;