linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Greg Allen <gallen@arlut.utexas.edu>
To: linuxppc-embedded@lists.linuxppc.org
Cc: tytso@mit.edu
Subject: serial.c patch for MPC8245 DUART
Date: Wed, 27 Mar 2002 14:51:11 -0600	[thread overview]
Message-ID: <a05101509b8c7dd36e820@[10.8.16.89]> (raw)


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/

                 reply	other threads:[~2002-03-27 20:51 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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='a05101509b8c7dd36e820@[10.8.16.89]' \
    --to=gallen@arlut.utexas.edu \
    --cc=linuxppc-embedded@lists.linuxppc.org \
    --cc=tytso@mit.edu \
    /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 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).