Deleted Added
full compact
uart_cpu_ia64.c (119815) uart_cpu_ia64.c (119866)
1/*
2 * Copyright (c) 2003 Marcel Moolenaar
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 *

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

20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
1/*
2 * Copyright (c) 2003 Marcel Moolenaar
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 *

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

20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
28__FBSDID("$FreeBSD: head/sys/dev/uart/uart_cpu_ia64.c 119815 2003-09-06 23:13:47Z marcel $");
28__FBSDID("$FreeBSD: head/sys/dev/uart/uart_cpu_ia64.c 119866 2003-09-07 21:51:03Z marcel $");
29
30#include <sys/param.h>
31#include <sys/systm.h>
32#include <sys/bus.h>
33
34#include <machine/bootinfo.h>
35#include <machine/bus.h>
36#include <machine/dig64.h>
37#include <machine/vmparam.h>
38
39#include <dev/uart/uart.h>
40#include <dev/uart/uart_cpu.h>
41
42static int dig64_to_uart_parity[] = {
43 UART_PARITY_NONE, UART_PARITY_NONE, UART_PARITY_EVEN,
44 UART_PARITY_ODD, UART_PARITY_MARK, UART_PARITY_SPACE
45};
46
29
30#include <sys/param.h>
31#include <sys/systm.h>
32#include <sys/bus.h>
33
34#include <machine/bootinfo.h>
35#include <machine/bus.h>
36#include <machine/dig64.h>
37#include <machine/vmparam.h>
38
39#include <dev/uart/uart.h>
40#include <dev/uart/uart_cpu.h>
41
42static int dig64_to_uart_parity[] = {
43 UART_PARITY_NONE, UART_PARITY_NONE, UART_PARITY_EVEN,
44 UART_PARITY_ODD, UART_PARITY_MARK, UART_PARITY_SPACE
45};
46
47bus_addr_t
48uart_cpu_busaddr(struct uart_bas *bas)
49{
50
51 return (bas->bsh);
52}
53
47int
54int
55uart_cpu_eqres(struct uart_bas *b1, struct uart_bas *b2)
56{
57
58 return ((b1->bsh == b2->bsh && b1->bst == b2->bst) ? 1 : 0);
59}
60
61int
48uart_cpu_getdev(int devtype, struct uart_devinfo *di)
49{
50 struct dig64_hcdp_table *tbl;
51 struct dig64_hcdp_entry *ent;
52 unsigned int i, ivar;
53
54 /*
55 * Use the DIG64 HCDP table if present.

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

125 di->databits = 8;
126 di->stopbits = 1;
127 di->parity = UART_PARITY_NONE;
128 return (0);
129 }
130
131 return (ENXIO);
132}
62uart_cpu_getdev(int devtype, struct uart_devinfo *di)
63{
64 struct dig64_hcdp_table *tbl;
65 struct dig64_hcdp_entry *ent;
66 unsigned int i, ivar;
67
68 /*
69 * Use the DIG64 HCDP table if present.

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

139 di->databits = 8;
140 di->stopbits = 1;
141 di->parity = UART_PARITY_NONE;
142 return (0);
143 }
144
145 return (ENXIO);
146}
133
134int
135uart_cpu_eqres(struct uart_bas *b1, struct uart_bas *b2)
136{
137
138 return ((b1->bsh == b2->bsh && b1->bst == b2->bst) ? 1 : 0);
139}