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: Tue, 01 Jul 2014 19:15:21 -0500 [thread overview]
Message-ID: <53B34F19.9060608@linaro.org> (raw)
In-Reply-To: <20140701230259.23f2f452@alan.etchedpixels.co.uk>
On 07/01/2014 05:02 PM, One Thousand Gnomes wrote:
> On Sat, 28 Jun 2014 15:15:56 -0500
> Alex Elder <elder@linaro.org> wrote:
>
>> 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.
>
> Which assumes an arbitrarily configurable clock, whereas you want to find
> the correct clock and multiplier combination for the baud rate.
>
> Most of these ports are wired to fixed clocks (which is fine) or clocks
> with limited numbers of supported frequencies (which is not).
Yes, I acknowledged that in my earlier response. But over
the weekend I decided to abandon hope that I'd be able to
verify there are no problems for affected machines, and
re-formulated my patch.
https://lkml.org/lkml/2014/7/1/323
> Your patch is an improvement but doesn't really fix the overall problem.
> If we have enough devices with variable clocks for it to be useful then
> fine - but can we merge it with a big FIXME note so that whoever comes
> along wondering why their clock doesn't work or behaves very oddly can
> figure it out and fix that case ?
What I've done now is define a dw8250_adjustable_clk() predicate
that indicates the UART baud can be adjusted by changing the
clock rate. Anyone who wants to activate this functionality
can just modify that function to recognize their device.
-Alex
> Alan
>
prev parent reply other threads:[~2014-07-02 0: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
2014-07-01 22:02 ` One Thousand Gnomes
2014-07-02 0:15 ` Alex Elder [this message]
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=53B34F19.9060608@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 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).