Menu

#13 CPR support for 16C950 UART

open
nobody
None
5
2001-05-28
2001-05-28
No

This patch adds 2 ioctl's for reading/writing the
content of the CPR (Clock Prescaler Register) in
16C950 UARTs. TIOCGSERCPR reads the value, and returns
it to an unsigned char. If the prescaler flag is
disabled in MCR, it returns 8 (i.e. no prescaling).
TIOCSSERCPR writes the value from an unsigned char and
writes it to CPR. If the value is invalid (<8) it
disables the prescaler flag in MCR.

The UART is not reset anymore when the serial line is
opened, because this would overwrite the CPR. Also,
when the serial line is opened, the value of the
prescaler flag in MCR is preserved, rather than
zeroed.

TIOCGSERCPR and TIOCSSERCPR must be added in
asm/ioctls.h, otherwise the thing will not compile

Discussion

  • Fabrizio Gennari

     
  • Fabrizio Gennari

     
  • Fabrizio Gennari