public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* serial port, custom divisor
@ 2006-01-10 13:20 Miika Keskinen
  2006-01-10 15:15 ` Stuart MacDonald
  0 siblings, 1 reply; 2+ messages in thread
From: Miika Keskinen @ 2006-01-10 13:20 UTC (permalink / raw)
  To: linux-kernel

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 :)


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-01-10 15:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-10 13:20 serial port, custom divisor Miika Keskinen
2006-01-10 15:15 ` Stuart MacDonald

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox