Deleted Added
full compact
sio.c (92401) sio.c (92739)
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 92401 2002-03-16 04:26:46Z imp $
33 * $FreeBSD: head/sys/dev/sio/sio.c 92739 2002-03-20 02:08:01Z alfred $
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 __P((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 __P((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 __P((struct com_s *com));
281static void sioinput __P((struct com_s *com));
282static void siointr1 __P((struct com_s *com));
283static void siointr __P((void *arg));
284static int commctl __P((struct com_s *com, int bits, int how));
285static int comparam __P((struct tty *tp, struct termios *t));
286static void siopoll __P((void *));
287static void siosettimeout __P((void));
288static int siosetwater __P((struct com_s *com, speed_t speed));
289static void comstart __P((struct tty *tp));
290static void comstop __P((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 __P((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 *) \

--- 2396 unchanged lines hidden (view full) ---

2698 u_char dlbl;
2699 u_char dlbh;
2700 u_char ier;
2701 u_char cfcr;
2702 u_char mcr;
2703};
2704
2705#ifndef __alpha__
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 *) \

--- 2396 unchanged lines hidden (view full) ---

2698 u_char dlbl;
2699 u_char dlbh;
2700 u_char ier;
2701 u_char cfcr;
2702 u_char mcr;
2703};
2704
2705#ifndef __alpha__
2706static speed_t siocngetspeed __P((Port_t, u_long rclk));
2706static speed_t siocngetspeed(Port_t, u_long rclk);
2707#endif
2707#endif
2708static void siocnclose __P((struct siocnstate *sp, Port_t iobase));
2709static void siocnopen __P((struct siocnstate *sp, Port_t iobase, int speed));
2710static void siocntxwait __P((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__
2711
2712#ifdef __alpha__
2713int siocnattach __P((int port, int speed));
2714int siogdbattach __P((int port, int speed));
2715int siogdbgetc __P((void));
2716void siogdbputc __P((int c));
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;
2719static cn_init_t siocninit;
2720static cn_term_t siocnterm;
2721#endif
2722static cn_checkc_t siocncheckc;
2723static cn_getc_t siocngetc;
2724static cn_putc_t siocnputc;

--- 467 unchanged lines hidden ---
2717#else
2718static cn_probe_t siocnprobe;
2719static cn_init_t siocninit;
2720static cn_term_t siocnterm;
2721#endif
2722static cn_checkc_t siocncheckc;
2723static cn_getc_t siocngetc;
2724static cn_putc_t siocnputc;

--- 467 unchanged lines hidden ---