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 111616 2003-02-27 12:53:21Z phk $
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"
--- 267 unchanged lines hidden (view full) ---
309static d_open_t sioopen;
310static d_close_t sioclose;
311static d_read_t sioread;
312static d_write_t siowrite;
313static d_ioctl_t sioioctl;
314
315#define CDEV_MAJOR 28
316static struct cdevsw sio_cdevsw = {
317 /* open */ sioopen,
318 /* close */ sioclose,
319 /* read */ sioread,
320 /* write */ siowrite,
321 /* ioctl */ sioioctl,
322 /* poll */ ttypoll,
323 /* mmap */ nommap,
324 /* strategy */ nostrategy,
325 /* name */ sio_driver_name,
326 /* maj */ CDEV_MAJOR,
327 /* dump */ nodump,
328 /* psize */ nopsize,
329 /* flags */ D_TTY | D_KQFILTER,
330 /* kqfilter */ ttykqfilter,
331};
332
333int comconsole = -1;
334static volatile speed_t comdefaultrate = CONSPEED;
335static u_long comdefaultrclk = DEFAULT_RCLK;
336SYSCTL_ULONG(_machdep, OID_AUTO, conrclk, CTLFLAG_RW, &comdefaultrclk, 0, "");
337static speed_t gdbdefaultrate = GDBSPEED;
338SYSCTL_UINT(_machdep, OID_AUTO, gdbspeed, CTLFLAG_RW,
--- 2943 unchanged lines hidden ---
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 111616 2003-02-27 12:53:21Z phk $
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"
--- 267 unchanged lines hidden (view full) ---
309static d_open_t sioopen;
310static d_close_t sioclose;
311static d_read_t sioread;
312static d_write_t siowrite;
313static d_ioctl_t sioioctl;
314
315#define CDEV_MAJOR 28
316static struct cdevsw sio_cdevsw = {
317 /* open */ sioopen,
318 /* close */ sioclose,
319 /* read */ sioread,
320 /* write */ siowrite,
321 /* ioctl */ sioioctl,
322 /* poll */ ttypoll,
323 /* mmap */ nommap,
324 /* strategy */ nostrategy,
325 /* name */ sio_driver_name,
326 /* maj */ CDEV_MAJOR,
327 /* dump */ nodump,
328 /* psize */ nopsize,
329 /* flags */ D_TTY | D_KQFILTER,
330 /* kqfilter */ ttykqfilter,
331};
332
333int comconsole = -1;
334static volatile speed_t comdefaultrate = CONSPEED;
335static u_long comdefaultrclk = DEFAULT_RCLK;
336SYSCTL_ULONG(_machdep, OID_AUTO, conrclk, CTLFLAG_RW, &comdefaultrclk, 0, "");
337static speed_t gdbdefaultrate = GDBSPEED;
338SYSCTL_UINT(_machdep, OID_AUTO, gdbspeed, CTLFLAG_RW,
--- 2943 unchanged lines hidden ---