Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755652AbaJHAfN (ORCPT ); Tue, 7 Oct 2014 20:35:13 -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" 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 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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; -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/