[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [PATCH] PCI serial card support
From: |
Dugger, Donald D |
Subject: |
RE: [PATCH] PCI serial card support |
Date: |
Tue, 4 Nov 2008 10:38:22 -0800 |
>
>There are some serial boards where you have to give N * IO
>base addresses in order to support all N COMs. Actually there
>are even more complex cards than this one. Some supporting
>much higher than 921600 as maximum speed. Some needing even
>different kinds of formulas in order to get proper baud
>rates... But I think this should be good short term solution.
>More complex cards can have their own driver then.
My goal was to support 1 port to be used as the serial console, I don't see a
great need for grub to support all the ports on a multi-port card, leave that
to the OS that gets booted.
Of course, it gets worse, I believe there are some cards that use a
non-standard I/O register layout, if we want to support those it will indeed
require a special driver.
>
>Thou "base" could be something different. As this is advanced
>feature it could be something more descriptive and harder to
>type... in example divbase, or maxbaud... Of course if we can
>detect some cards automatically we can store some table for
>those. For detection of PCI cases we could use PCI ID's.
>
>> + return ((base << 4) + (speed << 3)) / (speed << 4);
>
>Interesting formula. However. Whats the big gain against base/speed ?
>Perhaps I am missing something? This formula just gives +0.5
>(rounding?) for resulting value which is then rounded down
>with integer maths.
>
I stole that formula from the Linux PCI serial driver. My analysis matches
yours, it only causes a round up of 1 for some cases where the base baud is not
a multiple of 2. Unfortunately, if you look at all the base bauds in the Linux
driver, there are some weird ones where the round up will change the divisor so
I would assume this formula is necessary.
--
Don Dugger
"Censeo Toto nos in Kansa esse decisse." - D. Gale
address@hidden
Ph: (303)443-3786
- Re: [PATCH] PCI serial card support, (continued)
- Re: [PATCH] PCI serial card support, Robert Millan, 2008/11/09
- Re: [PATCH] PCI serial card support, Vesa Jääskeläinen, 2008/11/09
- Re: [PATCH] PCI serial card support, n0ano, 2008/11/09
- Re: [PATCH] PCI serial card support, n0ano, 2008/11/12
- Re: [PATCH] PCI serial card support, Vesa Jääskeläinen, 2008/11/13
- Re: [PATCH] PCI serial card support, n0ano, 2008/11/13
- Re: [PATCH] PCI serial card support, n0ano, 2008/11/14
- Re: [PATCH] PCI serial card support, Neo Jia, 2008/11/21
- Re: [PATCH] PCI serial card support, Vesa Jääskeläinen, 2008/11/22
Re: [PATCH] PCI serial card support, Vesa Jääskeläinen, 2008/11/04
- RE: [PATCH] PCI serial card support,
Dugger, Donald D <=