comconsole.c (41285) | comconsole.c (42480) |
---|---|
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. --- 8 unchanged lines hidden (view full) --- 17 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 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 * | 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. --- 8 unchanged lines hidden (view full) --- 17 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 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 * $Id: comconsole.c,v 1.4 1998/10/11 10:05:13 peter Exp $ | 25 * $Id: comconsole.c,v 1.5 1998/11/22 07:59:16 rnordier Exp $ |
26 */ 27 28#include <stand.h> 29#include <bootstrap.h> 30#include <machine/cpufunc.h> 31#include "libi386.h" 32 33/* selected defines from ns16550.h */ --- 15 unchanged lines hidden (view full) --- 49#define MCR_DTR 0x01 50#define LSR_TXRDY 0x20 51#define LSR_RXRDY 0x01 52 53#define COMC_FMT 0x3 /* 8N1 */ 54#define COMC_TXWAIT 0x40000 /* transmit timeout */ 55#define COMC_BPS(x) (115200 / (x)) /* speed to DLAB divisor */ 56 | 26 */ 27 28#include <stand.h> 29#include <bootstrap.h> 30#include <machine/cpufunc.h> 31#include "libi386.h" 32 33/* selected defines from ns16550.h */ --- 15 unchanged lines hidden (view full) --- 49#define MCR_DTR 0x01 50#define LSR_TXRDY 0x20 51#define LSR_RXRDY 0x01 52 53#define COMC_FMT 0x3 /* 8N1 */ 54#define COMC_TXWAIT 0x40000 /* transmit timeout */ 55#define COMC_BPS(x) (115200 / (x)) /* speed to DLAB divisor */ 56 |
57#ifndef COMPORT |
|
57#define COMPORT 0x3f8 | 58#define COMPORT 0x3f8 |
59#endif 60#ifndef COMSPEED |
|
58#define COMSPEED 9600 | 61#define COMSPEED 9600 |
62#endif |
|
59 60static void comc_probe(struct console *cp); 61static int comc_init(int arg); 62static void comc_putchar(int c); 63static int comc_getchar(void); 64static int comc_ischar(void); 65 66static int comc_started; --- 62 unchanged lines hidden --- | 63 64static void comc_probe(struct console *cp); 65static int comc_init(int arg); 66static void comc_putchar(int c); 67static int comc_getchar(void); 68static int comc_ischar(void); 69 70static int comc_started; --- 62 unchanged lines hidden --- |