From: Miika Keskinen <weeti@usr.fi>
To: linux-kernel@vger.kernel.org
Subject: serial port, custom divisor
Date: Tue, 10 Jan 2006 15:20:39 +0200 [thread overview]
Message-ID: <43C3B4A7.1000501@usr.fi> (raw)
Hi
I read from the Documentation/serial/driver that the custom divisor is
only applied to ports that have baud 38400. I'm asking if there is some
reason why custom divisor should not be used for other speeds too? I do
have a MIPS-SoC that does have 16550A-type uart but it needs custom
divisor, no matter what the speed is. The custom divisor is calculated
as follows:
baud = speed of port
system_frequency is in MHz
cdiv = (system_frequency * 5000) / baud;
if ((cdiv % 16)>7) cdiv += 8;
cdiv /= 16;
What I'm doing is to use early_serial_setup with flags containing
ASYNC_SPD_CUST and cdiv as .custom_divisor. However the serial_core
doesn't apply that divisor unless the speed is 38400 (and for example I
mostly need to run it in 9600). I'm now asking if I've misunderstood
something or does the removal of baud==38400 from serial_core cause
problems with other architectures?
btw. I'm not subscribed to the list so please cc me if replying.
yours,
Miika
--
All bugs added by me :)
next reply other threads:[~2006-01-10 13:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-10 13:20 Miika Keskinen [this message]
2006-01-10 15:15 ` serial port, custom divisor Stuart MacDonald
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=43C3B4A7.1000501@usr.fi \
--to=weeti@usr.fi \
--cc=linux-kernel@vger.kernel.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