Deleted Added
full compact
cy.c (56439) cy.c (61011)
1/*-
2 * cyclades cyclom-y serial driver
3 * Andrew Herbert <andrew@werple.apana.org.au>, 17 August 1993
4 *
5 * Copyright (c) 1993 Andrew Herbert.
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

22 * NO EVENT SHALL I BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
25 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
26 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
27 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 *
1/*-
2 * cyclades cyclom-y serial driver
3 * Andrew Herbert <andrew@werple.apana.org.au>, 17 August 1993
4 *
5 * Copyright (c) 1993 Andrew Herbert.
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

22 * NO EVENT SHALL I BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
25 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
26 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
27 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 *
30 * $FreeBSD: head/sys/dev/cy/cy.c 56439 2000-01-23 11:50:43Z peter $
30 * $FreeBSD: head/sys/dev/cy/cy.c 61011 2000-05-28 13:40:48Z peter $
31 */
32
33#include "opt_compat.h"
34#include "cy.h"
35
36/*
37 * TODO:
38 * Atomic COR change.

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

73#include <sys/proc.h>
74#include <sys/conf.h>
75#include <sys/dkstat.h>
76#include <sys/fcntl.h>
77#include <sys/interrupt.h>
78#include <sys/kernel.h>
79#include <sys/malloc.h>
80#include <sys/syslog.h>
31 */
32
33#include "opt_compat.h"
34#include "cy.h"
35
36/*
37 * TODO:
38 * Atomic COR change.

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

73#include <sys/proc.h>
74#include <sys/conf.h>
75#include <sys/dkstat.h>
76#include <sys/fcntl.h>
77#include <sys/interrupt.h>
78#include <sys/kernel.h>
79#include <sys/malloc.h>
80#include <sys/syslog.h>
81#include <sys/bus.h>
81#include <machine/clock.h>
82#include <machine/ipl.h>
83#ifndef SMP
84#include <machine/lock.h>
85#endif
86#include <machine/psl.h>
87
88#include <i386/isa/isa_device.h>
89#include <i386/isa/cyreg.h>
90#include <i386/isa/ic/cd1400.h>
91
82#include <machine/clock.h>
83#include <machine/ipl.h>
84#ifndef SMP
85#include <machine/lock.h>
86#endif
87#include <machine/psl.h>
88
89#include <i386/isa/isa_device.h>
90#include <i386/isa/cyreg.h>
91#include <i386/isa/ic/cd1400.h>
92
93#ifndef COMPAT_OLDISA
94#error "The cy device requires the old isa compatibility shims"
95#endif
96
92#ifdef SMP
93#define disable_intr() COM_DISABLE_INTR()
94#define enable_intr() COM_ENABLE_INTR()
95#endif /* SMP */
96
97/*
98 * Dictionary so that I can name everything *sio* or *com* to compare with
99 * sio.c. There is also lots of ugly formatting and unnecessary ifdefs to

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

356
357static char driver_name[] = "cy";
358
359/* table and macro for fast conversion from a unit number to its com struct */
360static struct com_s *p_com_addr[NSIO];
361#define com_addr(unit) (p_com_addr[unit])
362
363struct isa_driver siodriver = {
97#ifdef SMP
98#define disable_intr() COM_DISABLE_INTR()
99#define enable_intr() COM_ENABLE_INTR()
100#endif /* SMP */
101
102/*
103 * Dictionary so that I can name everything *sio* or *com* to compare with
104 * sio.c. There is also lots of ugly formatting and unnecessary ifdefs to

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

361
362static char driver_name[] = "cy";
363
364/* table and macro for fast conversion from a unit number to its com struct */
365static struct com_s *p_com_addr[NSIO];
366#define com_addr(unit) (p_com_addr[unit])
367
368struct isa_driver siodriver = {
364 sioprobe, sioattach, driver_name
369 INTR_TYPE_TTY | INTR_TYPE_FAST,
370 sioprobe,
371 sioattach,
372 driver_name
365};
373};
374COMPAT_ISA_DRIVER(cy, cydriver); /* XXX */
366
367static d_open_t sioopen;
368static d_close_t sioclose;
369static d_write_t siowrite;
370static d_ioctl_t sioioctl;
371
372#define CDEV_MAJOR 48
373static struct cdevsw sio_cdevsw = {

--- 2512 unchanged lines hidden ---
375
376static d_open_t sioopen;
377static d_close_t sioclose;
378static d_write_t siowrite;
379static d_ioctl_t sioioctl;
380
381#define CDEV_MAJOR 48
382static struct cdevsw sio_cdevsw = {

--- 2512 unchanged lines hidden ---