Deleted Added
full compact
comconsole.c (119880) comconsole.c (120118)
1/*
2 * Copyright (c) 1998 Michael Smith (msmith@freebsd.org)
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.

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

19 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23 * SUCH DAMAGE.
24 */
25
26#include <sys/cdefs.h>
1/*
2 * Copyright (c) 1998 Michael Smith (msmith@freebsd.org)
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.

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

19 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23 * SUCH DAMAGE.
24 */
25
26#include <sys/cdefs.h>
27__FBSDID("$FreeBSD: head/sys/boot/pc98/libpc98/comconsole.c 119880 2003-09-08 09:11:32Z obrien $");
27__FBSDID("$FreeBSD: head/sys/boot/pc98/libpc98/comconsole.c 120118 2003-09-16 11:24:23Z bde $");
28
29#include <stand.h>
30#include <bootstrap.h>
31#include <machine/cpufunc.h>
28
29#include <stand.h>
30#include <bootstrap.h>
31#include <machine/cpufunc.h>
32#include <dev/ic/ns16550.h>
32#include "libi386.h"
33
33#include "libi386.h"
34
34/* selected defines from ns16550.h */
35#define com_data 0 /* data register (R/W) */
36#define com_dlbl 0 /* divisor latch low (W) */
37#define com_dlbh 1 /* divisor latch high (W) */
38#define com_ier 1 /* interrupt enable (W) */
39#define com_iir 2 /* interrupt identification (R) */
40#define com_fifo 2 /* FIFO control (W) */
41#define com_lctl 3 /* line control register (R/W) */
42#define com_cfcr 3 /* line control register (R/W) */
43#define com_mcr 4 /* modem control register (R/W) */
44#define com_lsr 5 /* line status register (R/W) */
45#define com_msr 6 /* modem status register (R/W) */
46
47/* selected defines from sioreg.h */
48#define CFCR_DLAB 0x80
49#define MCR_RTS 0x02
50#define MCR_DTR 0x01
51#define LSR_TXRDY 0x20
52#define LSR_RXRDY 0x01
53
54#define COMC_FMT 0x3 /* 8N1 */
55#define COMC_TXWAIT 0x40000 /* transmit timeout */
56#define COMC_BPS(x) (115200 / (x)) /* speed to DLAB divisor */
57
58#ifndef COMPORT
59#ifdef PC98
60#define COMPORT 0x238
61#else

--- 76 unchanged lines hidden ---
35#define COMC_FMT 0x3 /* 8N1 */
36#define COMC_TXWAIT 0x40000 /* transmit timeout */
37#define COMC_BPS(x) (115200 / (x)) /* speed to DLAB divisor */
38
39#ifndef COMPORT
40#ifdef PC98
41#define COMPORT 0x238
42#else

--- 76 unchanged lines hidden ---