ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/src/trunk/sys/dev/uart/uart_bus.h
(Generate patch)

Comparing trunk/sys/dev/uart/uart_bus.h (file contents):
Revision 10056 by laffer1, Mon Sep 26 22:42:31 2016 UTC vs.
Revision 10057 by laffer1, Sun May 27 22:53:06 2018 UTC

# Line 1 | Line 1
1 + /* $MidnightBSD$ */
2   /*-
3   * Copyright (c) 2003 Marcel Moolenaar
4   * All rights reserved.
# Line 23 | Line 24
24   * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25   * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26   *
27 < * $MidnightBSD$
27 > * $FreeBSD: stable/10/sys/dev/uart/uart_bus.h 294229 2016-01-17 18:18:01Z ian $
28   */
29  
30   #ifndef _DEV_UART_BUS_H_
# Line 48 | Line 49
49   #define UART_STAT_OVERRUN       0x0400
50   #define UART_STAT_PARERR        0x0800
51  
51 #ifdef UART_PPS_ON_CTS
52 #define UART_SIG_DPPS           SER_DCTS
53 #define UART_SIG_PPS            SER_CTS
54 #else
55 #define UART_SIG_DPPS           SER_DDCD
56 #define UART_SIG_PPS            SER_DCD
57 #endif
58
52   /* UART_IOCTL() requests */
53   #define UART_IOCTL_BREAK        1
54   #define UART_IOCTL_IFLOW        2
# Line 87 | Line 80 | struct uart_softc {
80          struct resource *sc_ires;       /* Interrupt resource. */
81          void            *sc_icookie;
82          int             sc_irid;
83 +        struct callout  sc_timer;
84  
85          int             sc_callout:1;   /* This UART is opened for callout. */
86          int             sc_fastintr:1;  /* This UART uses fast interrupts. */
# Line 97 | Line 91 | struct uart_softc {
91          int             sc_polled:1;    /* This UART has no interrupts. */
92          int             sc_txbusy:1;    /* This UART is transmitting. */
93          int             sc_isquelch:1;  /* This UART has input squelched. */
94 +        int             sc_testintr:1;  /* This UART is under int. testing. */
95  
96          struct uart_devinfo *sc_sysdev; /* System device (or NULL). */
97  
# Line 117 | Line 112 | struct uart_softc {
112  
113          /* Pulse capturing support (PPS). */
114          struct pps_state sc_pps;
115 +        int              sc_pps_mode;
116 +        sbintime_t       sc_pps_captime;
117  
118          /* Upper layer data. */
119          void            *sc_softih;
# Line 133 | Line 130 | struct uart_softc {
130   };
131  
132   extern devclass_t uart_devclass;
133 < extern char uart_driver_name[];
133 > extern const char uart_driver_name[];
134  
135   int uart_bus_attach(device_t dev);
136   int uart_bus_detach(device_t dev);
# Line 147 | Line 144 | void uart_sched_softih(struct uart_softc *, uint32_t);
144  
145   int uart_tty_attach(struct uart_softc *);
146   int uart_tty_detach(struct uart_softc *);
147 + struct mtx *uart_tty_getlock(struct uart_softc *);
148   void uart_tty_intr(void *arg);
149  
150   /*
# Line 155 | Line 153 | void uart_tty_intr(void *arg);
153   static __inline int
154   uart_rx_empty(struct uart_softc *sc)
155   {
156 +
157          return ((sc->sc_rxget == sc->sc_rxput) ? 1 : 0);
158   }
159  
160   static __inline int
161   uart_rx_full(struct uart_softc *sc)
162   {
163 <        return ((sc->sc_rxput + 1 < sc->sc_rxbufsz)
164 <            ? (sc->sc_rxput + 1 == sc->sc_rxget) : (sc->sc_rxget == 0));
163 >
164 >        return ((sc->sc_rxput + 1 < sc->sc_rxbufsz) ?
165 >            (sc->sc_rxput + 1 == sc->sc_rxget) : (sc->sc_rxget == 0));
166   }
167  
168   static __inline int

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines