* serial.c patch for MPC8245 DUART
@ 2002-03-27 20:51 Greg Allen
0 siblings, 0 replies; only message in thread
From: Greg Allen @ 2002-03-27 20:51 UTC (permalink / raw)
To: linuxppc-embedded; +Cc: tytso
The Motorola MPC8245 embedded PowerPC has an internal DUART, which
claims to be PC16550D compatible.
However, it has an additional EFR (Enhanced Feature Register) at
offset 0x2, like the Startech UARTS. The MPC8245 calls it the UART
Alternate Function Register (UAFR).
The serial.c driver in the current linuxppc_2_4_devel tree
incorrectly identifies the MPC8245 UART as an ST16650. This disallows
the use of the fifos.
This very small patch to serial.c causes the MPC8245 UART to be
identified as a 16550A.
===== drivers/char/serial.c 1.30 vs edited =====
*** /tmp/serial.c-1.30-23169 Mon Mar 11 23:07:32 2002
--- edited/drivers/char/serial.c Wed Mar 27 14:27:20 2002
***************
*** 3738,3744 ****
/* Check for Startech UART's */
serial_outp(info, UART_LCR, UART_LCR_DLAB);
if (serial_in(info, UART_EFR) == 0) {
! state->type = PORT_16650;
} else {
serial_outp(info, UART_LCR, 0xBF);
if (serial_in(info, UART_EFR) == 0)
--- 3738,3749 ----
/* Check for Startech UART's */
serial_outp(info, UART_LCR, UART_LCR_DLAB);
if (serial_in(info, UART_EFR) == 0) {
! /* the MPC8245 has a 16550D with a EFR/UAFR
that is zero */
! /* a fifo size of 16 is *not* a ST16650 (it's 32) */
! int size = size_fifo(info);
! if (size != 16) {
! state->type = PORT_16650;
! }
} else {
serial_outp(info, UART_LCR, 0xBF);
if (serial_in(info, UART_EFR) == 0)
--
Gregory E. Allen, MSEE Engineering Scientist
Applied Research Laboratories:
The University of Texas at Austin
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-03-27 20:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-03-27 20:51 serial.c patch for MPC8245 DUART Greg Allen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).