From patchwork Mon Jan 23 16:04:12 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulrich Hecht X-Patchwork-Id: 9532901 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 EDF5B6020B for ; Mon, 23 Jan 2017 16:04:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DCE6C2845E for ; Mon, 23 Jan 2017 16:04:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D1C1228461; Mon, 23 Jan 2017 16:04:32 +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 542B22845E for ; Mon, 23 Jan 2017 16:04:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751430AbdAWQEb (ORCPT ); Mon, 23 Jan 2017 11:04:31 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:36843 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751514AbdAWQEb (ORCPT ); Mon, 23 Jan 2017 11:04:31 -0500 Received: by mail-wm0-f68.google.com with SMTP id r126so27417984wmr.3; Mon, 23 Jan 2017 08:04:30 -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=+M1PWsDIVRfUKpm1GmlXB0iTorXRKrhhiWisJZjCpxc=; b=ntpnwqutwFoNAP8PVgINpQtoClnOwk+ds1slgjksmlF4yhT6epjMLtkXq3qbiLxfnV gzRoUO3r3qDse/USFv1qUEvLxHU7uEX+6zjlCtyZv0afdXKjgXBl0FbJN+ahS63k1Wep C2aMTH4lSjpeABOWYveHwQ1pSQ4s0tXft5Xb8YurZnPlD70FtkCsWfRgD0EnB6sDQ0n2 fztGPhMu25ifxXZhKM1T2Dz2rpziedaYEYoFenNxLcD6IUNIupM2VVH4df0SskviLhxl 8puujrneK/VqDHZ89Je/7648pr9LTUsihLef5DpALwsh/n5/DJZKI3coKNM6hv925Pnn enVQ== 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=+M1PWsDIVRfUKpm1GmlXB0iTorXRKrhhiWisJZjCpxc=; b=RIfep422sipTrFi4R4lTiXuMxMJs6VknO80rKdPNZLRM1hO3Vewz2ihkkY6uMQQkKu YNFYZLzK4jUK4wFTzejwHiukWJBL8gi5aeDisOuNVgYK+BiF893CNxbbP+7mVnAaafaS +1S88wH+xK/9CK9ZdR/n8y1A2PDU/HAjxjjWS78o5rVEMwmAW8iQOn9Aje/uQEEfRrW7 PZ/0KoWP5f9sLtxXRjwrPxqE+GWpqJTDeLs6a5IoU6oERKx/JtXsKTKNXHwKN0zJTb4q sjGSBMVMpu51VndvnP4uD4kbvXOgOqbE7bAbSu0MKZvmKrED14jBwJodpjgLrHhoijIJ j8eA== X-Gm-Message-State: AIkVDXJTelwYY0dRYJXe9vi/w+6omybZqRDjhMOiRCsPING8zQ6hw7xNGhdyNwRCs7pazQ== X-Received: by 10.28.29.141 with SMTP id d135mr15722742wmd.108.1485187469495; Mon, 23 Jan 2017 08:04:29 -0800 (PST) Received: from groucho.site (ipbcc0353e.dynamic.kabel-deutschland.de. [188.192.53.62]) by smtp.gmail.com with ESMTPSA id 204sm21788033wmj.7.2017.01.23.08.04.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 23 Jan 2017 08:04:28 -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, Ulrich Hecht Subject: [PATCH v2 1/7] serial: sh-sci: add FIFO trigger bits Date: Mon, 23 Jan 2017 17:04:12 +0100 Message-Id: <1485187458-8195-2-git-send-email-ulrich.hecht+renesas@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1485187458-8195-1-git-send-email-ulrich.hecht+renesas@gmail.com> References: <1485187458-8195-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 db5de80..3a9c001 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c @@ -377,6 +377,8 @@ static const struct plat_sci_reg sci_regmap[SCIx_NR_REGTYPES][SCIx_NR_REGS] = { [SCPDR] = sci_reg_invalid, [SCDL] = { 0x30, 16 }, [SCCKS] = { 0x34, 16 }, + [HSRTRGR] = { 0x54, 16 }, + [HSTTRGR] = { 0x58, 16 }, }, /* diff --git a/drivers/tty/serial/sh-sci.h b/drivers/tty/serial/sh-sci.h index ffa6d68..2c45e79 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 */