Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/evbarm/dev Backout previous - it breaks rpi console...



details:   https://anonhg.NetBSD.org/src/rev/42b86608f99a
branches:  trunk
changeset: 781075:42b86608f99a
user:      skrll <skrll%NetBSD.org@localhost>
date:      Fri Aug 17 09:38:51 2012 +0000

description:
Backout previous - it breaks rpi console for me and jak.

diffstat:

 sys/arch/evbarm/dev/plcom.c    |  26 ++++++++------------------
 sys/arch/evbarm/dev/plcomvar.h |   3 +--
 2 files changed, 9 insertions(+), 20 deletions(-)

diffs (100 lines):

diff -r 748784aabd24 -r 42b86608f99a sys/arch/evbarm/dev/plcom.c
--- a/sys/arch/evbarm/dev/plcom.c       Thu Aug 16 23:45:58 2012 +0000
+++ b/sys/arch/evbarm/dev/plcom.c       Fri Aug 17 09:38:51 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: plcom.c,v 1.41 2012/08/12 10:13:17 reinoud Exp $       */
+/*     $NetBSD: plcom.c,v 1.42 2012/08/17 09:38:51 skrll Exp $ */
 
 /*-
  * Copyright (c) 2001 ARM Ltd
@@ -94,7 +94,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: plcom.c,v 1.41 2012/08/12 10:13:17 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: plcom.c,v 1.42 2012/08/17 09:38:51 skrll Exp $");
 
 #include "opt_plcom.h"
 #include "opt_ddb.h"
@@ -428,10 +428,8 @@
 void
 plcom_attach_subr(struct plcom_softc *sc)
 {
-       static const uint8_t txintr_fill[] = {14, 12, 8, 4, 2};
        struct plcom_instance *pi = &sc->sc_pi;
        struct tty *tp;
-       int tx_tresh;
 
        aprint_naive("\n");
 
@@ -480,7 +478,6 @@
                break;
        }               
 
-       tx_tresh = PREAD4(pi, PL011COM_IFLS) & 7;
        if (sc->sc_fifolen == 0) {
                switch (pi->pi_type) {
                case PLCOM_TYPE_PL010:
@@ -488,13 +485,11 @@
                         * The PL010 has a 16-byte fifo, but the tx interrupt
                         * triggers when there is space for 8 more bytes.
                        */
-                       sc->sc_fifolen = 8;     /* XXX can be bumped to 16 */
-                       sc->sc_txintrfill = 8;
+                       sc->sc_fifolen = 8;
                        break;
                case PLCOM_TYPE_PL011:
                        /* Some revisions have a 32 byte TX FIFO */
                        sc->sc_fifolen = 16;
-                       sc->sc_txintrfill = txintr_fill[tx_tresh];
                        break;
                }
        }
@@ -1684,16 +1679,11 @@
 
        /* Output the first chunk of the contiguous buffer. */
        {
-               int n, maxn;
-
-               maxn = sc->sc_fifolen;
-               if (!ISSET(PREAD1(pi, PL01XCOM_FR), PL01X_FR_TXFE))
-                       maxn = sc->sc_txintrfill;
+               int n;
 
                n = sc->sc_tbc;
-               if (n > maxn)
-                       n = maxn;
-
+               if (n > sc->sc_fifolen)
+                       n = sc->sc_fifolen;
                PWRITEM1(pi, PL01XCOM_DR, sc->sc_tba, n);
                sc->sc_tbc -= n;
                sc->sc_tba += n;
@@ -2211,8 +2201,8 @@
                                int n;
 
                                n = sc->sc_tbc;
-                               if (n > sc->sc_txintrfill)
-                                       n = sc->sc_txintrfill;
+                               if (n > sc->sc_fifolen)
+                                       n = sc->sc_fifolen;
                                PWRITEM1(pi, PL01XCOM_DR, sc->sc_tba, n);
                                sc->sc_tbc -= n;
                                sc->sc_tba += n;
diff -r 748784aabd24 -r 42b86608f99a sys/arch/evbarm/dev/plcomvar.h
--- a/sys/arch/evbarm/dev/plcomvar.h    Thu Aug 16 23:45:58 2012 +0000
+++ b/sys/arch/evbarm/dev/plcomvar.h    Fri Aug 17 09:38:51 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: plcomvar.h,v 1.12 2012/08/12 10:13:17 reinoud Exp $    */
+/*     $NetBSD: plcomvar.h,v 1.13 2012/08/17 09:38:51 skrll Exp $      */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All rights reserved.
@@ -113,7 +113,6 @@
        int sc_hwflags,
            sc_swflags;
        u_int sc_fifolen;
-       u_int sc_txintrfill;
 
        u_int sc_r_hiwat,
              sc_r_lowat;



Home | Main Index | Thread Index | Old Index