Message ID | 20221116144908.234154-1-gsomlo@gmail.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp182433wru; Wed, 16 Nov 2022 06:53:06 -0800 (PST) X-Google-Smtp-Source: AA0mqf6DlLWZVIgwxJNtASEKXX4UgjbPYF08uysM8gUSjxQGrIV9YyrZK/yPft4s8OCVyuN01IdW X-Received: by 2002:aa7:df95:0:b0:467:6035:285c with SMTP id b21-20020aa7df95000000b004676035285cmr19171289edy.386.1668610386225; Wed, 16 Nov 2022 06:53:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668610386; cv=none; d=google.com; s=arc-20160816; b=uDRAyle3cnvrdC/hAvg7nfSV7wGgzznUhudVbjW4GqC9JeodqMGVKjhVJKVbkIuG3C J7Ok9Z14MqqjCNXeaxHSR9nA2zKEaEBl6ArU9QsOCLZOOJeKOrP7M2F//8uSWk6mAQev ExnLsYX233ebNQ1LGdLm6RjB7GpSFkjUQjR2Z4tWOB2BGW56s5AUZ/lECWgph1MvxG+n m3IMv9CS70CVYW8iHjCBBuqPUsRargXFM80vbL3y3aXJFgfZ4yUVgPCbuTkQKZ7GeRNl 5kWoMuUUZ78n+AXh9lA6OIjQbuV40cId94ldO8u9f46/4FDqjojaGbwVE5eOFWf6D6Um GxOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=VhT+wRGsMqZBVBNYbapxMHCh1jnUO0LAhIzATarUXGw=; b=0vGUpk30mRsuYNFFBPB0o6Pf8nC0slejE6Cfy4ZisfiEgENM01iuk9VCMZ5nXn1D11 a3u/P/8brXIJI6afWvA1to6+gXzivjKYup95IiJ0/7jYVQr/ekL8AYTDFtRvGOH5tSAj NPOYc004vPFeKevwaEOTPt5Jb/3Ay1OG+9icdlLGD1gDyjMIWqonJTBDgXGu4SDJwf/c x/Z0i2Ixgp1TmfAkG8CGIMFv4NQl/nz0lAPf4ufSRWNfjIDUmJ9m7juaZmwzL5rMuetg 5U/GVwtyBYK4JDb4U/39LcRLArQKJLQpGcbcBGLdgpWN0Sk+RTcTdWETdiP6+EutX/6F R9eA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="Zj8Wr2/k"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cr19-20020a170906d55300b007ae84881ebasi14652570ejc.505.2022.11.16.06.52.41; Wed, 16 Nov 2022 06:53:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="Zj8Wr2/k"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233570AbiKPOt0 (ORCPT <rfc822;just.gull.subs@gmail.com> + 99 others); Wed, 16 Nov 2022 09:49:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233309AbiKPOtT (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 16 Nov 2022 09:49:19 -0500 Received: from mail-qk1-x733.google.com (mail-qk1-x733.google.com [IPv6:2607:f8b0:4864:20::733]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3255617AAD; Wed, 16 Nov 2022 06:49:17 -0800 (PST) Received: by mail-qk1-x733.google.com with SMTP id i9so11718855qki.10; Wed, 16 Nov 2022 06:49:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=VhT+wRGsMqZBVBNYbapxMHCh1jnUO0LAhIzATarUXGw=; b=Zj8Wr2/kDohSllpnz2X0zeoz2eqddleHHUv7vKHoxgAjy0pWzlYNnjXpy5+Q8HsjaT dH4gC6qIVpFnJwXC023mz1oOzfU2/MvGh1GPK1A9xK5qJATg+Td5KdYhCh5egyFZ3mxR ympEPLtbg1F7LNpR1uK3gMnYlteniwwnWOyR1oROaZI8lAu9aJ/lCOVYplKf8HUTpnAC bMUnrf28iprIYF1R+DdZsv+5MpbYL6amup3zv5ExbIisgI7I7adQ593u9gwD6exY39TE 1QCUqZKyQMtth06rZB/xLL6WkIjIdvgZOLIPQw6CpEoioTm26pnGBRNWkACav96i3LC2 bA8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=VhT+wRGsMqZBVBNYbapxMHCh1jnUO0LAhIzATarUXGw=; b=K/80ZvrLRr7VuK0tmka3ke6qyrUY8KznjLhhogJPcDtBaqTyRS0/HT7Zgq/SoiIKIA x94CXGujFt/771LzlIcZ88gpcX/Sk4uhpKs0txKfMqiMFnQTDrPiVnPkA9As3D7w45oN XMRyAy7wabPzyP6GdUntSvOTFlb3iM+sVQgQhx4aaa7H8xvksjXN+xvdgdB8ZlbFXG2R iQjMX2Mx4eSLQQ9U11ASLJusDOZGUxC95/cOys08QK2vNlEyhPqZionLTQd+c9E/tRO2 N45dEFQokQ/uWsZGj1f/Om1Sy77DHqMzaJs4z1+uQRdjdG3lbdYecKwvi32Wy6O6NOm9 fkKA== X-Gm-Message-State: ANoB5pkjblcXCoVwn+rOCGaZbCFMgoobU+cf5IxI0OPTnBsAKq7RVuey zLS5FtZCvTOHs1ZKM800OlfvDxEFUofHRg== X-Received: by 2002:a05:620a:211d:b0:6fa:182:f2d7 with SMTP id l29-20020a05620a211d00b006fa0182f2d7mr19009471qkl.360.1668610155923; Wed, 16 Nov 2022 06:49:15 -0800 (PST) Received: from glsvmlin.ini.cmu.edu (GLSVMLIN.INI.CMU.EDU. [128.2.16.9]) by smtp.gmail.com with ESMTPSA id g5-20020ac84805000000b0039a55f78792sm8729624qtq.89.2022.11.16.06.49.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Nov 2022 06:49:15 -0800 (PST) From: Gabriel Somlo <gsomlo@gmail.com> To: linux-kernel@vger.kernel.org Cc: linux-serial@vger.kernel.org, gregkh@linuxfoundation.org, jirislaby@kernel.org, kgugala@antmicro.com, mholenko@antmicro.com, joel@jms.id.au, david.abdurachmanov@gmail.com, florent@enjoy-digital.fr, geert@linux-m68k.org, ilpo.jarvinen@linux.intel.com Subject: [PATCH v4 00/14] serial: liteuart: add IRQ support Date: Wed, 16 Nov 2022 09:48:54 -0500 Message-Id: <20221116144908.234154-1-gsomlo@gmail.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749664804248579613?= X-GMAIL-MSGID: =?utf-8?q?1749664804248579613?= |
Series |
serial: liteuart: add IRQ support
|
|
Message
Gabriel L. Somlo
Nov. 16, 2022, 2:48 p.m. UTC
Add IRQ support to the LiteX LiteUART serial interface Changes from v3: - picked up r/b Ilpo Järvinen on select subset of commits - rebased entire series on top of tty-next tree - 2/14 ("use bit number macros"): explicitly include <linux/bits.h> - 3/14 ("remove unused uart_ops stubs"): don't add gratuitous comment removed later on in the series - 12/14 ("add IRQ support for the RX path"): add shadow irq register to support polling mode and avoid reading hardware mmio irq register to learn which irq flags are enabled - this also simplifies both liteuart_interrupt() and liteuart_startup() - 13/14 ("add IRQ support for the TX path"): - removed superfluous curly braces from liteuart_interrupt() - simplified [start|stop]_tx() by using shadow irq register from 12/14 - simplified liteuart_tx_chars() by rebasing on top of tty-next tree > Changes from v2: > - further split out "separate RX loop from poll timer" into > dedicated patches highlighting additional changes explicitly: > - factoring out tty_flip_buffer_push() (6/14) > - ack only RX events in RX loop (7/14) > - pass constant flag to uart_insert_char() directly (8/14) > - fix variable types in rx loop (9/14) > - separating RX loop from poll timer (10/14) > - added patch (11/14) to move function definitions to a more > convenient location, making subsequent changes easier to read > in diff patch form. > - fixes and clarifications for RX path IRQ support patch (now 12/14): > - only return IRQ_HANDLED for RX events > - use pr_fmt() to improve style of irq setup error message > - remove unnecessary locking from around single-register access > - modify TX path to support both IRQ-mode and polling (13/14) > - move polling-only liteuart_putchar() behind same conditional > (CONFIG_SERIAL_LITEUART_CONSOLE) as the rest of the code that's > still using it. > > Changes from v1: > - split minor cosmetic changes out into individual patches > (1/3 became 1..5/7) > - patches 6/7 and 7/7 unchanged (used to be 2/3 and 3/3) Gabriel Somlo (14): serial: liteuart: use KBUILD_MODNAME as driver name serial: liteuart: use bit number macros serial: liteuart: remove unused uart_ops stubs serial: liteuart: don't set unused port fields serial: liteuart: minor style fix in liteuart_init() serial: liteuart: move tty_flip_buffer_push() out of rx loop serial: liteuart: rx loop should only ack rx events serial: liteuart: simplify passing of uart_insert_char() flag serial: liteuart: fix rx loop variable types serial: liteuart: separate rx loop from poll timer serial: liteuart: move function definitions serial: liteuart: add IRQ support for the RX path serial: liteuart: add IRQ support for the TX path serial: liteuart: move polling putchar() function drivers/tty/serial/liteuart.c | 210 ++++++++++++++++++++-------------- 1 file changed, 126 insertions(+), 84 deletions(-)