[BACK]Return to com.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / dev / ic

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/dev/ic/com.c between version 1.329.2.1 and 1.329.2.2

version 1.329.2.1, 2015/04/06 15:18:09 version 1.329.2.2, 2015/06/06 14:40:07
Line 75  __KERNEL_RCSID(0, "$NetBSD$");
Line 75  __KERNEL_RCSID(0, "$NetBSD$");
 #include "opt_multiprocessor.h"  #include "opt_multiprocessor.h"
 #include "opt_ntp.h"  #include "opt_ntp.h"
   
 #include "rnd.h"  
   
 /* The COM16650 option was renamed to COM_16650. */  /* The COM16650 option was renamed to COM_16650. */
 #ifdef COM16650  #ifdef COM16650
 #error Obsolete COM16650 option; use COM_16650 instead.  #error Obsolete COM16650 option; use COM_16650 instead.
Line 114  __KERNEL_RCSID(0, "$NetBSD$");
Line 112  __KERNEL_RCSID(0, "$NetBSD$");
 #include <sys/kauth.h>  #include <sys/kauth.h>
 #include <sys/intr.h>  #include <sys/intr.h>
 #ifdef RND_COM  #ifdef RND_COM
 #include <sys/rnd.h>  #include <sys/rndsource.h>
 #endif  #endif
   
   
Line 382  com_enable_debugport(struct com_softc *s
Line 380  com_enable_debugport(struct com_softc *s
         sc->sc_ier = IER_ERXRDY;          sc->sc_ier = IER_ERXRDY;
         if (sc->sc_type == COM_TYPE_PXA2x0)          if (sc->sc_type == COM_TYPE_PXA2x0)
                 sc->sc_ier |= IER_EUART | IER_ERXTOUT;                  sc->sc_ier |= IER_EUART | IER_ERXTOUT;
         if (sc->sc_type == COM_TYPE_INGENIC)          if (sc->sc_type == COM_TYPE_INGENIC ||
               sc->sc_type == COM_TYPE_TEGRA)
                 sc->sc_ier |= IER_ERXTOUT;                  sc->sc_ier |= IER_ERXTOUT;
         CSR_WRITE_1(&sc->sc_regs, COM_REG_IER, sc->sc_ier);          CSR_WRITE_1(&sc->sc_regs, COM_REG_IER, sc->sc_ier);
         SET(sc->sc_mcr, MCR_DTR | MCR_RTS);          SET(sc->sc_mcr, MCR_DTR | MCR_RTS);
Line 474  com_attach_subr(struct com_softc *sc)
Line 473  com_attach_subr(struct com_softc *sc)
         /* look for a NS 16550AF UART with FIFOs */          /* look for a NS 16550AF UART with FIFOs */
         if (sc->sc_type == COM_TYPE_INGENIC) {          if (sc->sc_type == COM_TYPE_INGENIC) {
                 CSR_WRITE_1(regsp, COM_REG_FIFO,                  CSR_WRITE_1(regsp, COM_REG_FIFO,
                     FIFO_ENABLE | FIFO_RCV_RST | FIFO_XMT_RST |                      FIFO_ENABLE | FIFO_RCV_RST | FIFO_XMT_RST |
                     FIFO_TRIGGER_14 | FIFO_UART_ON);                      FIFO_TRIGGER_14 | FIFO_UART_ON);
         } else          } else
                 CSR_WRITE_1(regsp, COM_REG_FIFO,                  CSR_WRITE_1(regsp, COM_REG_FIFO,
Line 815  com_shutdown(struct com_softc *sc)
Line 814  com_shutdown(struct com_softc *sc)
         if (ISSET(sc->sc_hwflags, COM_HW_CONSOLE)) {          if (ISSET(sc->sc_hwflags, COM_HW_CONSOLE)) {
                 sc->sc_ier = IER_ERXRDY; /* interrupt on break */                  sc->sc_ier = IER_ERXRDY; /* interrupt on break */
                 if ((sc->sc_type == COM_TYPE_PXA2x0) ||                  if ((sc->sc_type == COM_TYPE_PXA2x0) ||
                     (sc->sc_type == COM_TYPE_INGENIC))                      (sc->sc_type == COM_TYPE_INGENIC) ||
                       (sc->sc_type == COM_TYPE_TEGRA))
                         sc->sc_ier |= IER_ERXTOUT;                          sc->sc_ier |= IER_ERXTOUT;
         } else          } else
                 sc->sc_ier = 0;                  sc->sc_ier = 0;
Line 897  comopen(dev_t dev, int flag, int mode, s
Line 897  comopen(dev_t dev, int flag, int mode, s
   
                 if (sc->sc_type == COM_TYPE_PXA2x0)                  if (sc->sc_type == COM_TYPE_PXA2x0)
                         sc->sc_ier |= IER_EUART | IER_ERXTOUT;                          sc->sc_ier |= IER_EUART | IER_ERXTOUT;
                 else if (sc->sc_type == COM_TYPE_INGENIC)                  else if (sc->sc_type == COM_TYPE_INGENIC ||
                            sc->sc_type == COM_TYPE_TEGRA)
                         sc->sc_ier |= IER_ERXTOUT;                          sc->sc_ier |= IER_ERXTOUT;
                 CSR_WRITE_1(&sc->sc_regs, COM_REG_IER, sc->sc_ier);                  CSR_WRITE_1(&sc->sc_regs, COM_REG_IER, sc->sc_ier);
   
Line 1906  com_rxsoft(struct com_softc *sc, struct 
Line 1907  com_rxsoft(struct com_softc *sc, struct 
                                 if (sc->sc_type == COM_TYPE_PXA2x0)                                  if (sc->sc_type == COM_TYPE_PXA2x0)
                                         SET(sc->sc_ier, IER_ERXTOUT);                                          SET(sc->sc_ier, IER_ERXTOUT);
 #endif  #endif
                                 if (sc->sc_type == COM_TYPE_INGENIC)                                  if (sc->sc_type == COM_TYPE_INGENIC ||
                                         sc->sc_ier |= IER_ERXTOUT;                                      sc->sc_type == COM_TYPE_TEGRA)
                                           SET(sc->sc_ier, IER_ERXTOUT);
   
                                 CSR_WRITE_1(&sc->sc_regs, COM_REG_IER,                                  CSR_WRITE_1(&sc->sc_regs, COM_REG_IER,
                                     sc->sc_ier);                                      sc->sc_ier);
                         }                          }
Line 2111  again: do {
Line 2114  again: do {
                                         CLR(sc->sc_ier, IER_ERXRDY|IER_ERXTOUT);                                          CLR(sc->sc_ier, IER_ERXRDY|IER_ERXTOUT);
                                 else                                  else
 #endif  #endif
                                 if (sc->sc_type == COM_TYPE_INGENIC)                                  if (sc->sc_type == COM_TYPE_INGENIC ||
                                         sc->sc_ier |= IER_ERXRDY|IER_ERXTOUT;                                      sc->sc_type == COM_TYPE_TEGRA)
                                 else                                          CLR(sc->sc_ier,
                                               IER_ERXRDY | IER_ERXTOUT);
                                   else
                                         CLR(sc->sc_ier, IER_ERXRDY);                                          CLR(sc->sc_ier, IER_ERXRDY);
                                 CSR_WRITE_1(regsp, COM_REG_IER, sc->sc_ier);                                  CSR_WRITE_1(regsp, COM_REG_IER, sc->sc_ier);
                         }                          }
Line 2330  cominit(struct com_regs *regsp, int rate
Line 2335  cominit(struct com_regs *regsp, int rate
                         CSR_WRITE_2(regsp, COM_REG_DLBL, rate);                          CSR_WRITE_2(regsp, COM_REG_DLBL, rate);
                 } else {                  } else {
                         /* no EFR on alchemy */                          /* no EFR on alchemy */
                         if ((type != COM_TYPE_16550_NOERS) &&                          if ((type != COM_TYPE_16550_NOERS) &&
                             (type != COM_TYPE_INGENIC)) {                              (type != COM_TYPE_INGENIC)) {
                                 CSR_WRITE_1(regsp, COM_REG_LCR, LCR_EERS);                                  CSR_WRITE_1(regsp, COM_REG_LCR, LCR_EERS);
                                 CSR_WRITE_1(regsp, COM_REG_EFR, 0);                                  CSR_WRITE_1(regsp, COM_REG_EFR, 0);

Legend:
Removed from v.1.329.2.1  
changed lines
  Added in v.1.329.2.2

CVSweb <webmaster@jp.NetBSD.org>