From patchwork Sun May 27 09:06:47 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: stigge@antcom.de X-Patchwork-Id: 161541 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:4978:20e::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 2C252B6F86 for ; Sun, 27 May 2012 19:12:22 +1000 (EST) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1SYZRE-000386-Qg; Sun, 27 May 2012 09:07:00 +0000 Received: from [2a01:4f8:101:2a4:0:bc28:b2d8:8] (helo=chuck.antcom.de) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1SYZRA-00037s-EA for linux-arm-kernel@lists.infradead.org; Sun, 27 May 2012 09:06:57 +0000 Received: from [IPv6:2001:a60:f0c7:1:dd36:e299:314d:2262] (unknown [IPv6:2001:a60:f0c7:1:dd36:e299:314d:2262]) by chuck.antcom.de (Postfix) with ESMTPSA id EABEF7200E0; Sun, 27 May 2012 09:06:48 +0000 (UTC) Message-ID: <4FC1EEA7.2060109@antcom.de> Date: Sun, 27 May 2012 11:06:47 +0200 From: Roland Stigge Organization: ANTCOM Open Source Research and Development User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:10.0.3) Gecko/20120329 Icedove/10.0.3 MIME-Version: 1.0 To: Arnd Bergmann Subject: Re: [PATCH RFC] serial/8250: Adjusting FIFO parameters for LPC32xx References: <1338048678-23991-1-git-send-email-stigge@antcom.de> <201205270232.58253.arnd@arndb.de> In-Reply-To: <201205270232.58253.arnd@arndb.de> X-Enigmail-Version: 1.4 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -1.1 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.8 RDNS_NONE Delivered to internal network by a host with no rDNS Cc: srinivas.bakki@nxp.com, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, kevin.wells@nxp.com, linux-serial@vger.kernel.org, linux-arm-kernel@lists.infradead.org, alan@linux.intel.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org Hi, On 27/05/12 04:32, Arnd Bergmann wrote: >> this is how the modified FIFO is handled in the repositories at >> git.lpclinux.com. Is there a better way for doing this (without ifdef)? Looks >> like registering additional types (like PORT_16550A) isn't encouraged. Maybe >> extending of_serial.c? The latter currently doesn't handle .fifosize and >> .tx_loadsz, though. >> >> Any suggestions appreciated. > > We occasionally add new types, and I think that would be ok here too, if it's > actually a new type. It definitely doesn't look like a 16550. > > I wonder if it's in fact a PORT_16654, or if we can at least pretend it's one. Thanks for the hint! I did it via the following modification in of_serial.c: Works for now, will need to test more thoroughly with LPC32xx (note that the manual explicitly mentions "downwards compatible with the INS16Cx50" and "Register locations conform to ‘550 industry standard" but nothing about an EFR register which 16654 is configured for in 8250.c). The patch should be useful in of_serial anyway (even without the LPC32xx case). Wondering if it should rather be .compatible = "st16654"? Will prepare a patch with adjustment of Documentation/.../of-serial.txt when we agree on sth. Thanks, Roland --- a/drivers/tty/serial/of_serial.c +++ b/drivers/tty/serial/of_serial.c @@ -179,6 +179,7 @@ static struct of_device_id __devinitdata of_platform_serial_table[] = { { .compatible = "ns16450", .data = (void *)PORT_16450, }, { .compatible = "ns16550a", .data = (void *)PORT_16550A, }, { .compatible = "ns16550", .data = (void *)PORT_16550, }, + { .compatible = "ns16654", .data = (void *)PORT_16654, }, { .compatible = "ns16750", .data = (void *)PORT_16750, }, { .compatible = "ns16850", .data = (void *)PORT_16850, }, { .compatible = "nvidia,tegra20-uart", .data = (void *)PORT_TEGRA, },