public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Doug Berger <opendmb@gmail.com>
Cc: "Justin Chen" <justin.chen@broadcom.com>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	linux-serial@vger.kernel.org, "Al Cooper" <alcooperx@gmail.com>,
	"Broadcom internal kernel review list"
	<bcm-kernel-feedback-list@broadcom.com>,
	"Jiri Slaby" <jirislaby@kernel.org>,
	"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
	"John Ogness" <john.ogness@linutronix.de>,
	"Jiaqing Zhao" <jiaqing.zhao@linux.intel.com>,
	"open list:TTY LAYER" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] serial: 8250_bcm7271: improve bcm7271 8250 port
Date: Tue, 15 Aug 2023 09:43:57 +0300	[thread overview]
Message-ID: <ZNsercXiIhPZ4vyB@smile.fi.intel.com> (raw)
In-Reply-To: <5d4757d4-6143-8179-9df9-2de56a716773@gmail.com>

On Mon, Aug 14, 2023 at 11:09:46AM -0700, Doug Berger wrote:
> On 8/14/2023 9:28 AM, Justin Chen wrote:
> > On 8/14/23 8:12 AM, Andy Shevchenko wrote:
> > > On Sat, Aug 12, 2023 at 09:24:21PM -0700, Justin Chen wrote:
> > > > On Sat, Aug 12, 2023 at 3:50 AM Greg Kroah-Hartman
> > > > <gregkh@linuxfoundation.org> wrote:
> > > > > On Fri, Aug 11, 2023 at 03:14:01PM -0700, Justin Chen wrote:

...

> > > > > > +     [PORT_BCM7271] = {
> > > > > > +             .name           = "bcm7271_uart",
> > > 
> > > This is badly named port type.
> > > 
> This may be true, but it does mirror the PORT_BCM63XX naming and I do value
> consistency so it is acceptable to me. However, I will happily yield to a
> better name if one can be determined by popular consensus.
> 
> > 
> > Would "Brcmstb 7271 UART" suffice?
> > 
> Perhaps, "Broadcom BCM7271 UART" but it seems excessively "chatty" to me, so
> as I said I am OK with the original submission.

I'm not okay, sorry. But your variant seems the best from all proposed.

> > > > > > +             .fifo_size      = 32,
> > > > > > +             .tx_loadsz      = 32,
> > > > > > +             .fcr            = UART_FCR_ENABLE_FIFO |
> > > > > > UART_FCR_R_TRIG_01,
> > > > > > +             .rxtrig_bytes   = {1, 8, 16, 30},
> > > > > > +             .flags          = UART_CAP_FIFO | UART_CAP_AFE
> > > > > > +     },
> > > > > >   };
> > > 
> > > This is almost a dup of PORT_ALTR_16550_F32. Use it if you wish.
> > > You can always rename it if it feels the right thing to do.
> > > 
> > 
> > There is some other PORT_ALTR logic that I would like to avoid. I would
> > also like to avoid future changes to PORT_ALTR that wouldn't be
> > applicable to us.
> I too am reluctant to introduce yet another port type, but Justin is correct
> in pointing out that the PORT_ALTR_16550_* port types include Tx FIFO
> threshold programming that is incompatible with the BCM7271 UART hardware.
> This port type does appear necessary to address fundamental differences in
> the hardware unless we are willing to scrap the uart_config[] array and have
> the individual drivers manage these differences (which I would also be OK
> with, but I am just a tail on this dog).
> 
> The BCM7271 UART IP does support programmable Tx FIFO thresholds in a
> different way, so if I (or someone else) decided to enable support for that
> it would appear that this new port type would be necessary at that time as
> well.

All these details are missing in the initial submission. How should we know all
that? Please, amend the commit message accordingly.

> > > But why 8 and not 16 is the default rxtrig?
> > 
> > We were seeing some latency issues on our chips where 16 would cause
> > overflows. Trying to kill 2 birds with one stone. If creating another
> > port type is avoidable then alternatively I can change the default in
> > userspace.

Also choose the number less than 124, IIRC we have gaps that may be filled.

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2023-08-15  6:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-11 22:14 [PATCH] serial: 8250_bcm7271: improve bcm7271 8250 port Justin Chen
2023-08-11 23:40 ` Florian Fainelli
2023-08-12 10:50 ` Greg Kroah-Hartman
2023-08-13  4:24   ` Justin Chen
2023-08-14 15:12     ` Andy Shevchenko
2023-08-14 16:28       ` Justin Chen
2023-08-14 18:09         ` Doug Berger
2023-08-15  6:43           ` Andy Shevchenko [this message]
2023-08-14 18:13 ` Doug Berger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZNsercXiIhPZ4vyB@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=alcooperx@gmail.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=jiaqing.zhao@linux.intel.com \
    --cc=jirislaby@kernel.org \
    --cc=john.ogness@linutronix.de \
    --cc=justin.chen@broadcom.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=opendmb@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox