sio.c (92739) | sio.c (93010) |
---|---|
1/*- 2 * Copyright (c) 1991 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 16 unchanged lines hidden (view full) --- 25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * | 1/*- 2 * Copyright (c) 1991 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 16 unchanged lines hidden (view full) --- 25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * |
33 * $FreeBSD: head/sys/dev/sio/sio.c 92739 2002-03-20 02:08:01Z alfred $ | 33 * $FreeBSD: head/sys/dev/sio/sio.c 93010 2002-03-23 12:13:34Z bde $ |
34 * from: @(#)com.c 7.5 (Berkeley) 5/16/91 35 * from: i386/isa sio.c,v 1.234 36 */ 37 38#include "opt_comconsole.h" 39#include "opt_compat.h" 40#include "opt_ddb.h" 41#include "opt_sio.h" --- 224 unchanged lines hidden (view full) --- 266 * Data area for output buffers. Someday we should build the output 267 * buffer queue without copying data. 268 */ 269 u_char obuf1[256]; 270 u_char obuf2[256]; 271}; 272 273#ifdef COM_ESP | 34 * from: @(#)com.c 7.5 (Berkeley) 5/16/91 35 * from: i386/isa sio.c,v 1.234 36 */ 37 38#include "opt_comconsole.h" 39#include "opt_compat.h" 40#include "opt_ddb.h" 41#include "opt_sio.h" --- 224 unchanged lines hidden (view full) --- 266 * Data area for output buffers. Someday we should build the output 267 * buffer queue without copying data. 268 */ 269 u_char obuf1[256]; 270 u_char obuf2[256]; 271}; 272 273#ifdef COM_ESP |
274static int espattach (struct com_s *com, Port_t esp_port); | 274static int espattach(struct com_s *com, Port_t esp_port); |
275#endif 276 277static timeout_t siobusycheck; | 275#endif 276 277static timeout_t siobusycheck; |
278static u_int siodivisor (u_long rclk, speed_t speed); | 278static u_int siodivisor(u_long rclk, speed_t speed); |
279static timeout_t siodtrwakeup; | 279static timeout_t siodtrwakeup; |
280static void comhardclose (struct com_s *com); 281static void sioinput (struct com_s *com); 282static void siointr1 (struct com_s *com); 283static void siointr (void *arg); 284static int commctl (struct com_s *com, int bits, int how); 285static int comparam (struct tty *tp, struct termios *t); 286static void siopoll (void *); 287static void siosettimeout (void); 288static int siosetwater (struct com_s *com, speed_t speed); 289static void comstart (struct tty *tp); 290static void comstop (struct tty *tp, int rw); | 280static void comhardclose(struct com_s *com); 281static void sioinput(struct com_s *com); 282static void siointr1(struct com_s *com); 283static void siointr(void *arg); 284static int commctl(struct com_s *com, int bits, int how); 285static int comparam(struct tty *tp, struct termios *t); 286static void siopoll(void *); 287static void siosettimeout(void); 288static int siosetwater(struct com_s *com, speed_t speed); 289static void comstart(struct tty *tp); 290static void comstop(struct tty *tp, int rw); |
291static timeout_t comwakeup; | 291static timeout_t comwakeup; |
292static void disc_optim (struct tty *tp, struct termios *t, 293 struct com_s *com); | 292static void disc_optim(struct tty *tp, struct termios *t, 293 struct com_s *com); |
294 295char sio_driver_name[] = "sio"; 296static struct mtx sio_lock; 297static int sio_inited; 298 299/* table and macro for fast conversion from a unit number to its com struct */ 300devclass_t sio_devclass; 301#define com_addr(unit) ((struct com_s *) \ --- 2398 unchanged lines hidden (view full) --- 2700 u_char ier; 2701 u_char cfcr; 2702 u_char mcr; 2703}; 2704 2705#ifndef __alpha__ 2706static speed_t siocngetspeed(Port_t, u_long rclk); 2707#endif | 294 295char sio_driver_name[] = "sio"; 296static struct mtx sio_lock; 297static int sio_inited; 298 299/* table and macro for fast conversion from a unit number to its com struct */ 300devclass_t sio_devclass; 301#define com_addr(unit) ((struct com_s *) \ --- 2398 unchanged lines hidden (view full) --- 2700 u_char ier; 2701 u_char cfcr; 2702 u_char mcr; 2703}; 2704 2705#ifndef __alpha__ 2706static speed_t siocngetspeed(Port_t, u_long rclk); 2707#endif |
2708static void siocnclose (struct siocnstate *sp, Port_t iobase); 2709static void siocnopen (struct siocnstate *sp, Port_t iobase, int speed); 2710static void siocntxwait (Port_t iobase); | 2708static void siocnclose(struct siocnstate *sp, Port_t iobase); 2709static void siocnopen(struct siocnstate *sp, Port_t iobase, int speed); 2710static void siocntxwait(Port_t iobase); |
2711 2712#ifdef __alpha__ 2713int siocnattach(int port, int speed); 2714int siogdbattach(int port, int speed); 2715int siogdbgetc(void); 2716void siogdbputc(int c); 2717#else 2718static cn_probe_t siocnprobe; --- 473 unchanged lines hidden --- | 2711 2712#ifdef __alpha__ 2713int siocnattach(int port, int speed); 2714int siogdbattach(int port, int speed); 2715int siogdbgetc(void); 2716void siogdbputc(int c); 2717#else 2718static cn_probe_t siocnprobe; --- 473 unchanged lines hidden --- |