From patchwork Fri Jul 8 09:00:40 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 71657 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp339735qgy; Fri, 8 Jul 2016 02:01:33 -0700 (PDT) X-Received: by 10.98.18.131 with SMTP id 3mr8146684pfs.102.1467968493023; Fri, 08 Jul 2016 02:01:33 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w2si3113520pac.286.2016.07.08.02.01.32; Fri, 08 Jul 2016 02:01:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-serial-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-serial-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-serial-owner@vger.kernel.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752799AbcGHJBc (ORCPT + 2 others); Fri, 8 Jul 2016 05:01:32 -0400 Received: from mail.kernel.org ([198.145.29.136]:46190 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751723AbcGHJBb (ORCPT ); Fri, 8 Jul 2016 05:01:31 -0400 Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AEF0920173; Fri, 8 Jul 2016 09:01:30 +0000 (UTC) Received: from localhost.localdomain (unknown [180.106.221.147]) (using TLSv1.2 with cipher AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5880A2017D; Fri, 8 Jul 2016 09:01:27 +0000 (UTC) From: Shawn Guo To: Greg Kroah-Hartman , Russell King Cc: Andre Przywara , Peter Hurley , Timur Tabi , Jun Nie , Jason Liu , xie.baoyou@zte.com.cn, linux-serial@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Shawn Guo Subject: [PATCH v3 2/3] tty: amba-pl011: add .get_fifosize for ZTE device Date: Fri, 8 Jul 2016 17:00:40 +0800 Message-Id: <1467968441-4056-3-git-send-email-shawn.guo@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1467968441-4056-1-git-send-email-shawn.guo@linaro.org> References: <1467968441-4056-1-git-send-email-shawn.guo@linaro.org> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, 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 Sender: linux-serial-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org ZTE PL011 device has a fixed FIFO size 16. Let's add a .get_fifosize hook for it. Signed-off-by: Shawn Guo --- drivers/tty/serial/amba-pl011.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c index e09354e6bcb7..8b7fb3689ee7 100644 --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c @@ -204,6 +204,11 @@ static const u16 pl011_zte_offsets[REG_ARRAY_SIZE] = { [REG_DMACR] = ZX_UART011_DMACR, }; +static unsigned int get_fifosize_zte(struct amba_device *dev) +{ + return 16; +} + static struct vendor_data vendor_zte __maybe_unused = { .reg_offset = pl011_zte_offsets, .access_32b = true, @@ -212,7 +217,7 @@ static struct vendor_data vendor_zte __maybe_unused = { .fr_dsr = ZX_UART01x_FR_DSR, .fr_cts = ZX_UART01x_FR_CTS, .fr_ri = ZX_UART011_FR_RI, - .get_fifosize = get_fifosize_arm, + .get_fifosize = get_fifosize_zte, }; /* Deals with DMA transactions */