[parisc-linux] serial baud_base, high baud rates and divisors

Grant Grundler grundler@dsl2.external.hp.com
Thu, 07 Feb 2002 09:31:07 -0700


Enrik Berkhan wrote:
> Investigating on
> that I've found some oddities concerning setserial, baud_base and
> the divisor calculation in the serial driver ...

good work.

...
>   Memory mapped parisc ports all have port == 0, so this has to fail.
>   Temporary workaround: `setserial /dev/ttyS1 port 0x10000 ...' once
>   will prevent the above loop from finding conflicts.
> 
> So, the following things have to be fixed:
> 
> - get/set_serial_info have to be enhanced for memory mapped ports
> - setserial should be enhanced accordingly

If other non-intel architectures don't have a solution for this.
My first thought was to assign fake port addresses.

Do PCI serial cards also use MMIO?

> - divisor calculation should be changed at least to round to nearest,
>   not round towards zero, or LASI ports might still suffer from the first
>   problem _if_ they really have baud_base 454545
> - baud_base should be initialized correctly for other gsc based ports.

We'd have to dig a bit for documentation on this.
Please poke me offline if that doesn't happen in the next week or so.

> If someone can confirm my analysis and tell me the direction of how to
> fix these things I would be willing to work on it (shouldn't be hard,
> maybe boring ;-).

cool - thanks,

grant