From: "Vesa Jääskeläinen" <chaac@nic.fi>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: [PATCH] PCI serial card support
Date: Tue, 04 Nov 2008 20:26:44 +0200 [thread overview]
Message-ID: <491093E4.1000906@nic.fi> (raw)
In-Reply-To: <20081104153950.GB8894@thorin>
Robert Millan wrote:
> On Mon, Nov 03, 2008 at 04:38:02PM -0800, donald.d.dugger@intel.com wrote:
>> The problem with using a PCI serial card for the console is that many
>> PCI cards use a different crystal than the IBM PC standard. This means
>> that serial drivers wind up computing the wrong divisor when trying to
>> set the baud rate. This patch solves this problem by adding the `--base'
>> parameter to the `serial' command. The allows you to set the base baud
>> (typically the highest baud rate supported by the device) so that PCI
>> cards with non-standard crystal frequencies can be supported. For example,
>> the option I use with my PCI serial card is:
>>
>> serial --port=0xe880 --speed=115200 --base=921600
>
> Is there no better way to do this than queriing the user? Can you read this
> info from the device itself, or from its PCI id?
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.
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.
next prev parent reply other threads:[~2008-11-04 18:26 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-04 0:38 [PATCH] PCI serial card support donald.d.dugger
2008-11-04 15:39 ` Robert Millan
2008-11-04 18:24 ` Dugger, Donald D
2008-11-05 9:58 ` Robert Millan
2008-11-05 15:37 ` Dugger, Donald D
2008-11-06 15:02 ` Robert Millan
2008-11-06 15:28 ` Dugger, Donald D
2008-11-06 16:06 ` Robert Millan
2008-11-06 16:30 ` Dugger, Donald D
2008-11-06 17:00 ` Dugger, Donald D
2008-11-07 16:07 ` n0ano
2008-11-07 16:52 ` Vesa Jääskeläinen
2008-11-08 11:25 ` Robert Millan
2008-11-08 12:23 ` Vesa Jääskeläinen
2008-11-08 12:45 ` Robert Millan
2008-11-08 14:00 ` Vesa Jääskeläinen
2008-11-09 1:58 ` n0ano
2008-11-09 21:57 ` Robert Millan
2008-11-09 22:13 ` Vesa Jääskeläinen
2008-11-09 22:14 ` n0ano
2008-11-12 18:58 ` n0ano
2008-11-13 18:05 ` Vesa Jääskeläinen
2008-11-13 20:13 ` n0ano
2008-11-14 19:24 ` n0ano
2008-11-22 2:53 ` Neo Jia
2008-11-22 7:18 ` Vesa Jääskeläinen
2008-11-04 18:26 ` Vesa Jääskeläinen [this message]
2008-11-04 18:38 ` Dugger, Donald D
2009-07-21 8:11 ` tony.gugo
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=491093E4.1000906@nic.fi \
--to=chaac@nic.fi \
--cc=grub-devel@gnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.