Patch for supporting CPR register in 16C950 UART

From: fabrizio.gennari@philips.com
Date: Fri May 18 2001 - 11:14:23 EST


Hello.

Here is a patch (tested on kernels 2.4.3 and 2.4.4) that adds 2 ioctl's in serial.c. One, TCSSERCPR, sets the CPR register in 16C950 UARTs. This register is a pre-scaler (that is, a divisor) for the clock. If the value is N, the clock is divided by N/8.
If N<8, pre-scaling is disabled by setting bit 7 of MCR to 0. The other one, TCGSERCPR,, reads the value of CPR. If pre-scaling is disabled, it returns 8 (i.e., the clock frequency is left intact).

The patch also disables resetting the UART via the CSR register every time the serial device is opened (in the startup() function). This would reset the content of CPR.
---------------------------------------------------------
Fabrizio Gennari tel. +39 039 203 7816
Philips Research Monza fax. +39 039 203 7800
via G. Casati 23 fabrizio.gennari@philips.com
20052 Monza (MI) Italy http://www.research.philips.com



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed May 23 2001 - 21:00:28 EST