Deleted Added
sdiff udiff text old ( 47618 ) new ( 48104 )
full compact
1/*-
2 * Copyright (c) 1999 Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
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

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

18 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
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 * $Id: syscons_isa.c,v 1.3 1999/05/08 21:59:31 dfr Exp $
27 */
28
29#include "sc.h"
30#include "opt_syscons.h"
31
32#if NSC > 0
33
34#include <sys/param.h>
35#include <sys/systm.h>
36#include <sys/kernel.h>
37#include <sys/module.h>
38#include <sys/bus.h>
39
40#include <machine/console.h>
41#ifdef __i386__
42#include <machine/apm_bios.h>
43#endif
44
45#include <dev/syscons/syscons.h>
46
47#include <isa/isareg.h>
48#include <isa/isavar.h>
49
50devclass_t sc_devclass;
51
52static int scprobe(device_t dev);
53static int scattach(device_t dev);
54
55static device_method_t sc_methods[] = {
56 DEVMETHOD(device_probe, scprobe),
57 DEVMETHOD(device_attach, scattach),
58 { 0, 0 }
59};
60
61static driver_t sc_driver = {
62 "sc",
63 sc_methods,
64 1, /* XXX */
65};
66
67static int
68scprobe(device_t dev)
69{
70 /* No pnp support */
71 if (isa_get_vendorid(dev))
72 return (ENXIO);
73
74 device_set_desc(dev, "System console");
75 return sc_probe_unit(device_get_unit(dev), isa_get_flags(dev));
76}
77
78static int
79scattach(device_t dev)
80{
81 return sc_attach_unit(device_get_unit(dev), isa_get_flags(dev));
82}
83
84DRIVER_MODULE(sc, isa, sc_driver, sc_devclass, 0, 0);
85
86#endif /* NSC > 0 */