From: Stefan Wahren <stefan.wahren@i2se.com>
To: Stephen Warren <swarren@wwwdotorg.org>,
Phil Elwell <phil@raspberrypi.org>
Cc: Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@codeaurora.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
linux-rpi-kernel <linux-rpi-kernel@lists.infradead.org>,
linux-clk@vger.kernel.org
Subject: Re: CLK_OF_DECLARE advice required
Date: Wed, 31 May 2017 17:58:08 +0200 [thread overview]
Message-ID: <0794f430-9761-c855-9a89-13d9871c5831@i2se.com> (raw)
In-Reply-To: <8b65e551-e6dd-cf5c-1b22-e1f1a5996d73@wwwdotorg.org>
Am 31.05.2017 um 17:27 schrieb Stephen Warren:
> On 05/30/2017 06:23 AM, Phil Elwell wrote:
>> Hi,
>>
>> I've run into a problem using the fixed-factor clock on Raspberry Pi
>> and I'd
>> like some advice before I submit a patch.
>>
>> Some context: the aim is to use a standard UART and some external
>> circuitry
>> as a MIDI interface. This would be straightforward except that Linux
>> doesn't
>> recognise the required 31.25KHz as a valid UART baud rate. Rhe
>> workaround is
>> to declare the UART clock such that the reported rate differs from
>> the actual
>> rate. If one sets the reported rate to be (actual*38400)/31250 then
>> requesting a 38400 baud rate will result in an actual 31250 baud signal.
>
> This sounds like the wrong approach. Forcing the port to use a
> different clock rate than the user requests would prevent anyone from
> using that port for its standard purpose; it'd turn what should be a
> runtime decision into a compile-time decision.
>
> Are you sure there's no way to simply select the correct baud rate on
> the port? I see plenty of references to configuring custom baud rates
> under Linux when I search Google, e.g.:
>
>> https://stackoverflow.com/questions/12646324/how-to-set-a-custom-baud-rate-on-linux
>>
> "How to set a custom baud rate on Linux?"
>
>> https://sourceware.org/ml/libc-help/2009-06/msg00016.html
> "Re: Terminal interface and non-standard baudrates"
>
I remember this gist from Peter Hurley:
https://gist.github.com/peterhurley/fbace59b55d87306a5b8
next prev parent reply other threads:[~2017-05-31 15:58 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-30 12:23 Phil Elwell
2017-05-31 15:27 ` Stephen Warren
2017-05-31 15:58 ` Stefan Wahren [this message]
2017-05-31 16:28 ` Phil Elwell
2017-05-31 16:47 ` Stephen Warren
2017-06-01 6:39 ` Stephen Boyd
2017-06-01 8:26 ` Phil Elwell
2017-06-02 22:34 ` Stephen Boyd
2017-06-05 16:24 ` Phil Elwell
2017-06-05 20:13 ` Stephen Boyd
2017-06-06 7:22 ` Geert Uytterhoeven
2017-06-06 20:49 ` Stephen Boyd
2017-06-06 8:49 ` Phil Elwell
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=0794f430-9761-c855-9a89-13d9871c5831@i2se.com \
--to=stefan.wahren@i2se.com \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rpi-kernel@lists.infradead.org \
--cc=mturquette@baylibre.com \
--cc=phil@raspberrypi.org \
--cc=sboyd@codeaurora.org \
--cc=swarren@wwwdotorg.org \
/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
all inboxes | Powered by JetHome®