From patchwork Thu Feb 2 17:10:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulrich Hecht X-Patchwork-Id: 9552579 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 37584602F0 for ; Thu, 2 Feb 2017 17:10:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2D5081FFC9 for ; Thu, 2 Feb 2017 17:10:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 220342849C; Thu, 2 Feb 2017 17:10:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9F5CD1FFC9 for ; Thu, 2 Feb 2017 17:10:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751465AbdBBRKm (ORCPT ); Thu, 2 Feb 2017 12:10:42 -0500 Received: from mail-wj0-f193.google.com ([209.85.210.193]:36248 "EHLO mail-wj0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752121AbdBBRKl (ORCPT ); Thu, 2 Feb 2017 12:10:41 -0500 Received: by mail-wj0-f193.google.com with SMTP id kq3so1731435wjc.3; Thu, 02 Feb 2017 09:10:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=pPAt1Gwu0cAa0f/y9gRbnr5TIHwPLOjc3tWa5fblHbk=; b=hCaYkA3Px5Qiq5jpqObaIP08FHSbR2HX8fTSUvCB0AwVnpejvK5ch5VwucmbGniY7o MkB3lGC0u/z+VQWeO1u8HyxFxQxTaI972RkqRobQbXgC14Hzn/JBl1hRKfpY5SPlquhL EHBf9PhlFBqNKgwEe7iKeztpsFQt8X6d8FI4VGEER6bocdepRtahteEPd3kNkA0WQ6bP s5UdPECnxBW6p60hW4NewQ3zpjCkhWBnfGP8FzhwvvgXuVWKoBUCgTouIyLOWt42DmIK 486oqNFR7mNUHLPBqcoYwrfl1DUoF5TzsJqOQUd4ffc7eBrKAiFU33TXpW572ICR1vMV Nz9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=pPAt1Gwu0cAa0f/y9gRbnr5TIHwPLOjc3tWa5fblHbk=; b=PWoEaurSHYWOa9qMmHgqvzDphTC0sMLJ3SqJAvQS61VFqTv2SGrltaQV7I1hY3Bgn6 /DdLTXPVekYLWay7gY0rSP/XyVkFztOJPtW6XvXjDw+xcuzsGHnzW6OmraMNCQqQbIvN Bf0p6ksgKwMK9DE8nlRfWGf6moHdOTHXgZVoT5fcV9UBxJ0FsJgEd9OD/rEwcBu/P6R5 xCjsQ2ONozgW7Vr4ojWnKtRfyMZ1r7tHDcb/opy8QJDmuyhDW2paWb/x6hKi11FBTiHH 4ISN9YrgfeIwghLDW/o+HO14KRoWIusvwPRAgn5S4SWL9yAsqUN/Ulo8JqEq7LE5HAeb rJYw== X-Gm-Message-State: AIkVDXKuYxA6KRAmtbuwOuA4fS+abEUiYkJEkeWjqRQY2qYi3r2Rdp/UiqFsgAiC6YVpng== X-Received: by 10.223.132.39 with SMTP id 36mr9348447wrf.130.1486055439487; Thu, 02 Feb 2017 09:10:39 -0800 (PST) Received: from groucho.site (ipbcc0353e.dynamic.kabel-deutschland.de. [188.192.53.62]) by smtp.gmail.com with ESMTPSA id l67sm4146040wmf.1.2017.02.02.09.10.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 02 Feb 2017 09:10:38 -0800 (PST) From: Ulrich Hecht To: linux-renesas-soc@vger.kernel.org, wsa@the-dreams.de, geert@linux-m68k.org Cc: linux-serial@vger.kernel.org, magnus.damm@gmail.com, sergei.shtylyov@cogentembedded.com, gregkh@linuxfoundation.org, Ulrich Hecht Subject: [PATCH v3 1/7] serial: sh-sci: add FIFO trigger bits Date: Thu, 2 Feb 2017 18:10:14 +0100 Message-Id: <1486055420-31595-2-git-send-email-ulrich.hecht+renesas@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1486055420-31595-1-git-send-email-ulrich.hecht+renesas@gmail.com> References: <1486055420-31595-1-git-send-email-ulrich.hecht+renesas@gmail.com> Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Defines the bits controlling FIFO thresholds, adds the additional HSCIF registers to the register map. Signed-off-by: Ulrich Hecht Reviewed-by: Geert Uytterhoeven --- drivers/tty/serial/sh-sci.c | 2 ++ drivers/tty/serial/sh-sci.h | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index 9bc9756..6085839 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c @@ -373,6 +373,8 @@ static const struct sci_port_params sci_port_params[SCIx_NR_REGTYPES] = { [HSSRR] = { 0x40, 16 }, [SCDL] = { 0x30, 16 }, [SCCKS] = { 0x34, 16 }, + [HSRTRGR] = { 0x54, 16 }, + [HSTTRGR] = { 0x58, 16 }, }, .fifosize = 128, .overrun_reg = SCLSR, diff --git a/drivers/tty/serial/sh-sci.h b/drivers/tty/serial/sh-sci.h index 08073f0..30b6d67 100644 --- a/drivers/tty/serial/sh-sci.h +++ b/drivers/tty/serial/sh-sci.h @@ -29,6 +29,8 @@ enum { SCPDR, /* Serial Port Data Register */ SCDL, /* BRG Frequency Division Register */ SCCKS, /* BRG Clock Select Register */ + HSRTRGR, /* Rx FIFO Data Count Trigger Register */ + HSTTRGR, /* Tx FIFO Data Count Trigger Register */ SCIx_NR_REGS, }; @@ -99,6 +101,10 @@ enum { #define SCIF_BREAK_CLEAR (u32)(~(SCIF_PER | SCIF_FER | SCIF_BRK)) /* SCFCR (FIFO Control Register) */ +#define SCFCR_RTRG1 BIT(7) /* Receive FIFO Data Count Trigger */ +#define SCFCR_RTRG0 BIT(6) +#define SCFCR_TTRG1 BIT(5) /* Transmit FIFO Data Count Trigger */ +#define SCFCR_TTRG0 BIT(4) #define SCFCR_MCE BIT(3) /* Modem Control Enable */ #define SCFCR_TFRST BIT(2) /* Transmit FIFO Data Register Reset */ #define SCFCR_RFRST BIT(1) /* Receive FIFO Data Register Reset */