Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3237145pxb; Fri, 12 Feb 2021 12:51:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJwBKUZqmHNjrjrX4cb1DWMDRdWQiOI3BL8aBft76j4uhwBGrcdtc5IbTXZtSd2Imu57a7sa X-Received: by 2002:aa7:c901:: with SMTP id b1mr5177398edt.329.1613163106561; Fri, 12 Feb 2021 12:51:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613163106; cv=none; d=google.com; s=arc-20160816; b=hDaxr1Kju3GDRAECYHivPERIW/OMinRJdaP2lwdKZwGINuqkejOYM3/RgcUeyhuHCY U1Uy6jFQdy+ShpzW24AUcTqCgZmdn1BBldx2Kyoj74Sd/LmU+8x8DIR4SyjW3OpNrr2O mrEvGgIDPX0B1Jmnl/b+mnXXjgzB/QoNRJlkZCp0KCDdQp+SDXsVLHTyxh0GHbeY2crX ZiM09SG+9EhdPapEDq4FES9NxO26dHH/4MnvV1q5TKj/90W5PBKeDPMwLWjpASShcarW 3p8G22M3JKvx8RPkzWx5U4BzUrLE7mmKCKh7xYayR9E8O1sEyAQzinEUi+uAd/T5MpDU F3pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=9nlPrdgdpUhBT4OqPIpJHurxob/WSRTldRiaZgCuebA=; b=J19PPxWweIxE/taOCOIRgzxl+0LYIfD+dcMrV/OuWBPzLdLxuEQxhxcy0L0TzZRIjF uqZGD8yhqime62Q8dsdhwrbWpLevex7xgj0iZEcqz8X7QVcIs49HV/4MTpto/BtbGjk/ mZrYJdC6HQEygSFhFTNFBTryI0qI5hwKNRDyDVsQg0WRVyek+eW/1u9HPcU+kc2VpS4j 7V+vS6vJC1tPuyrc7BM8eAKh+EmNa5p2gvfpGzGuZiOgBq24prp0pgkTUk0oFG5opyMw /4p2DPh7jZOdHDxIElaEztnuMAnQRGuOgeIssI5Aef9ee3Lhpf8Tczpr6XWDHMSZfJOX GGEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=mEalseKM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z92si7973933ede.291.2021.02.12.12.51.23; Fri, 12 Feb 2021 12:51:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=mEalseKM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S231532AbhBLUr5 (ORCPT + 99 others); Fri, 12 Feb 2021 15:47:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34214 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231445AbhBLUrw (ORCPT ); Fri, 12 Feb 2021 15:47:52 -0500 Received: from mail-pl1-x634.google.com (mail-pl1-x634.google.com [IPv6:2607:f8b0:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 34341C061574; Fri, 12 Feb 2021 12:47:10 -0800 (PST) Received: by mail-pl1-x634.google.com with SMTP id s15so454977plr.9; Fri, 12 Feb 2021 12:47:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=9nlPrdgdpUhBT4OqPIpJHurxob/WSRTldRiaZgCuebA=; b=mEalseKMxInqyKHV7UpFcJBMqxSyFknnSvj7smKWsPgaa04masHhh4Nf9nN3eNhjPG zzzwGLnVafIckFzjBfsEgDgibHfhSz1I47NzHWqMrUX/HbhBoGUFRJ8xzmtpykyQiRQW CNwu0Ki4ybC8HpTAeLxosIa6MyIqwnRjMs2n/oNdVu1YhGpy8tXPJzYd08EoqwWzTcIq ArAZatvCv4/bAcEFQFIEz5PXhFQI4t4C36gEN82yxrOVDPzumFN2viNJuB690YirePqK /6J+GXoQqPFwfdBOVDV+yqPUBOI33H5nobS4jsj+yM5wCTYyPLMzaY9TxsIQlsB4WTwe dHgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=9nlPrdgdpUhBT4OqPIpJHurxob/WSRTldRiaZgCuebA=; b=r3fK26H+WO3CRLnPIZq4ey5col9N556jo05gpIG+pIuiMIlt0IhxRlyct/jWmUQEsn rI547Z87gFzum7ZKh9T7QgQ2DQWb/Vgff1xQIyWzw5rRkOjNMr1UFwz/2w5YaMd5QQnn ghMp0+a4dwPqJKBZO4BoPYqBkOqyzD07yYlmmWbeyqnbpGegAtYhRmrkufSujMScQZwM a390v7DTQpCCHxH/mpE+Zc1LlRxS5wRZpIviCJLD+wbzVyKk8xKfyhkGHCD4taAVsIxe /gWR/ZNdGc5CPNYdlQJM6+OpBnyueOA41JvYZH71KTvLPU2iNhGrfXZdiFKGua5IF6It aF3g== X-Gm-Message-State: AOAM530dyH0Q6OnIkOGUhSsrzm+THpp0A3jXRRAA0A3CxxPjPBkB5nWs aBVMaohqx2/d8eiRfDDhzZI= X-Received: by 2002:a17:90a:ce03:: with SMTP id f3mr4230246pju.44.1613162829402; Fri, 12 Feb 2021 12:47:09 -0800 (PST) Received: from [10.230.29.30] ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id t22sm10659579pgm.18.2021.02.12.12.47.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 12 Feb 2021 12:47:08 -0800 (PST) Subject: Re: [PATCH v3 2/2] serial: 8250: Add new 8250-core based Broadcom STB driver To: Al Cooper , linux-kernel@vger.kernel.org Cc: bcm-kernel-feedback-list@broadcom.com, devicetree@vger.kernel.org, Greg Kroah-Hartman , Jiri Slaby , linux-serial@vger.kernel.org, linux-usb@vger.kernel.org, Masahiro Yamada , Rob Herring References: <20210212195736.45328-1-alcooperx@gmail.com> <20210212195736.45328-3-alcooperx@gmail.com> From: Florian Fainelli Message-ID: <8cb4bae6-5617-8dd5-4c0f-4c81cb4d741b@gmail.com> Date: Fri, 12 Feb 2021 12:47:02 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: <20210212195736.45328-3-alcooperx@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/12/2021 11:57 AM, Al Cooper wrote: > Add a UART driver for the new Broadcom 8250 based STB UART. The new > UART is backward compatible with the standard 8250, but has some > additional features. The new features include a high accuracy baud > rate clock system and DMA support. > > The driver will use the new optional BAUD MUX clock to select the best > one of the four master clocks (81MHz, 108MHz, 64MHz and 48MHz) to feed > the baud rate selection logic for any requested baud rate. This allows > for more accurate BAUD rates when high speed baud rates are selected. > > The driver will use the new UART DMA hardware if the UART DMA registers > are specified in Device Tree "reg" property. > > The driver also sets the UPSTAT_AUTOCTS flag when hardware flow control > is enabled. This flag is needed for UARTs that don't assert a CTS > changed interrupt when CTS changes and AFE (Hardware Flow Control) is > enabled. > > The driver also contains a workaround for a bug in the Synopsis 8250 > core. The problem is that at high baud rates, the RX partial FIFO > timeout interrupt can occur but there is no RX data (DR not set in > the LSR register). In this case the driver will not read the Receive > Buffer Register, which clears the interrupt, and the system will get > continuous UART interrupts until the next RX character arrives. The > fix originally suggested by Synopsis was to read the Receive Buffer > Register and discard the character when the DR bit in the LSR was > not set, to clear the interrupt. The problem was that occasionally > a character would arrive just after the DR bit check and a valid > character would be discarded. The fix that was added will clear > receive interrupts to stop the interrupt, deassert RTS to insure > that no new data can arrive, wait for 1.5 character times for the > sender to react to RTS and then check for data and either do a dummy > read or a valid read. Sysfs error counters were also added and were > used to help create test software that would cause the error condition. > The counters can be found at: > /sys/devices/platform/rdb/*serial/rx_bad_timeout_late_char > /sys/devices/platform/rdb/*serial/rx_bad_timeout_no_char > > Signed-off-by: Al Cooper > --- > MAINTAINERS | 8 + > drivers/tty/serial/8250/8250_bcm7271.c | 1099 ++++++++++++++++++++++++ > drivers/tty/serial/8250/Kconfig | 11 + > drivers/tty/serial/8250/Makefile | 1 + > drivers/tty/serial/8250/bcm7271_uart.h | 158 ++++ > 5 files changed, 1277 insertions(+) > create mode 100644 drivers/tty/serial/8250/8250_bcm7271.c > create mode 100644 drivers/tty/serial/8250/bcm7271_uart.h > > diff --git a/MAINTAINERS b/MAINTAINERS > index 64c7169db617..bb6ad2fc4376 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -3582,6 +3582,14 @@ S: Supported > F: Documentation/devicetree/bindings/i2c/brcm,brcmstb-i2c.yaml > F: drivers/i2c/busses/i2c-brcmstb.c > > +BROADCOM BRCMSTB UART DRIVER > +M: Al Cooper > +L: linux-usb@vger.kernel.org This should probably be linux-serial, copy pasted from the USB entry down below presumably. -- Florian