linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Rengarajan.S@microchip.com
Cc: Kumaravel.Thiagarajan@microchip.com,
	jiaqing.zhao@linux.intel.com, gregkh@linuxfoundation.org,
	ilpo.jarvinen@linux.intel.com, john.ogness@linutronix.de,
	tony@atomide.com, linux-kernel@vger.kernel.org,
	Tharunkumar.Pasumarthi@microchip.com, jirislaby@kernel.org,
	f.fainelli@gmail.com, tglx@linutronix.de,
	UNGLinuxDriver@microchip.com, linux-serial@vger.kernel.org
Subject: Re: [PATCH v1 tty] 8250: microchip: Add 4 Mbps support in PCI1XXXX UART
Date: Thu, 1 Feb 2024 13:52:07 +0200	[thread overview]
Message-ID: <ZbuF53TlbnD09rZA@smile.fi.intel.com> (raw)
In-Reply-To: <8406d8866968950b9bb2f2c01aaa92e3107a7a00.camel@microchip.com>

On Tue, Jan 30, 2024 at 10:52:41AM +0000, Rengarajan.S@microchip.com wrote:
> On Sun, 2024-01-28 at 17:27 +0200, Andy Shevchenko wrote:
> > On Thu, Jan 25, 2024 at 03:36:19PM +0530, Rengarajan S wrote:

...

> > > +     /*
> > > +      * Microchip PCI1XXXX UART supports maximum baud rate up to 4
> > > Mbps
> > > +      */
> > > +     if (up->port.type == PORT_MCHP16550A)
> > > +             max = 4000000;
> > 
> > No. Please refactor the way the 8250_port won't be modified.
> > 
> > Also you have a define for this constant, use it.
> 
> The current UART clk in MCHP Ports in pci1xxxx.c is set to 62.5 MHz in
> order to support fractional baud rates which enables generation of
> acceptable baud rate and lower error percentage from any available
> frequency. With 62.5 MHz the maximum supported baud rate supported as
> per serial_8250_get_baud_rate is 3.9 Mbps. In order to extend the
> support to 4 Mbps we had hardcoded the max value to 4 Mbps. Since, baud
> rate is calculated here we needed to make these changes in 8250_port
> and could not find a way to handle as part 8250_pci1xxxx. Can you let
> us know any alternatives to address this upper(max) limit? 

Update port->uartclk accordingly in your driver, see how other 8250_* drivers
do that (e.g., 8250_mid).

So, it will no go with hack in the 8250_port.

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2024-02-01 11:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-25 10:06 [PATCH v1 tty] 8250: microchip: Add 4 Mbps support in PCI1XXXX UART Rengarajan S
2024-01-28 15:27 ` Andy Shevchenko
2024-01-28 15:28   ` Andy Shevchenko
2024-01-30 10:52   ` Rengarajan.S
2024-02-01 11:52     ` Andy Shevchenko [this message]
2024-02-08  2:53       ` Rengarajan.S

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=ZbuF53TlbnD09rZA@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=Kumaravel.Thiagarajan@microchip.com \
    --cc=Rengarajan.S@microchip.com \
    --cc=Tharunkumar.Pasumarthi@microchip.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=f.fainelli@gmail.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=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=tony@atomide.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;
as well as URLs for NNTP newsgroup(s).