From: Alex Elder <elder@linaro.org>
To: One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>
Cc: gregkh@linuxfoundation.org, heikki.krogerus@linux.intel.com,
david.daney@cavium.com, loic.poulain@intel.com,
linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] serial: 8250_dw: support high baudrates if possible
Date: Sat, 28 Jun 2014 15:15:56 -0500 [thread overview]
Message-ID: <53AF227C.3000102@linaro.org> (raw)
In-Reply-To: <20140628163608.0c5536a9@alan.etchedpixels.co.uk>
On 06/28/2014 10:36 AM, One Thousand Gnomes wrote:
> On Fri, 27 Jun 2014 12:25:20 -0500
>> + rate = 16 * max(115200U, (unsigned int)baud);
>> +
>
> This assumes an arbitarily configurable clock, which is not I think the
> usual case.
If the clock's rate can't change, this will return an error,
and the recorded rate (p->uartclk) will not be changed.
This should only matter when attempting to set a baud rate higher
than 115200. It *is* possible that some particular high rate
will realize a better signal rate than whatever results from
requesting 16 times the baud (or even 16 * 115200).
I could make this work *only* for my particular part(s) by
relying on a different device tree compatible string and
setting a flag. It would be nice if other implementations
could benefit from this though.
-Alex
>> + /*
>> + * Request a different clock rate if necessary, and
>> + * record it if successful.
>> + */
>> + if (rate != p->uartclk) {
>> + BUG_ON(!data->clk);
>> + if (!clk_set_rate(data->clk, (unsigned long)rate))
>> + p->uartclk = rate;
>> + }
>
>
next prev parent reply other threads:[~2014-06-28 20:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-27 17:25 [PATCH] serial: 8250_dw: support high baudrates if possible Alex Elder
2014-06-28 15:36 ` One Thousand Gnomes
2014-06-28 20:15 ` Alex Elder [this message]
2014-07-01 22:02 ` One Thousand Gnomes
2014-07-02 0:15 ` Alex Elder
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=53AF227C.3000102@linaro.org \
--to=elder@linaro.org \
--cc=david.daney@cavium.com \
--cc=gnomes@lxorguk.ukuu.org.uk \
--cc=gregkh@linuxfoundation.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=loic.poulain@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.