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 * notice, this list of conditions and the following disclaimer as 10 * the first lines of this file unmodified. 11 * 2. Redistributions in binary form must reproduce the above copyright 12 * notice, this list of conditions and the following disclaimer in the 13 * documentation and/or other materials provided with the distribution. 14 * 15 * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR 16 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 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 *
| 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 * notice, this list of conditions and the following disclaimer as 10 * the first lines of this file unmodified. 11 * 2. Redistributions in binary form must reproduce the above copyright 12 * notice, this list of conditions and the following disclaimer in the 13 * documentation and/or other materials provided with the distribution. 14 * 15 * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR 16 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 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:$
| 26 * $Id: syscons_isa.c,v 1.1 1999/01/23 16:53:30 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>
| 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
|
41 42#include <dev/syscons/syscons.h> 43 44#include <isa/isareg.h> 45#include <isa/isavar.h> 46 47devclass_t sc_devclass; 48 49static int scprobe(device_t dev); 50static int scattach(device_t dev); 51 52static device_method_t sc_methods[] = { 53 DEVMETHOD(device_probe, scprobe), 54 DEVMETHOD(device_attach, scattach), 55 { 0, 0 } 56}; 57 58static driver_t sc_driver = { 59 "sc", 60 sc_methods, 61 DRIVER_TYPE_TTY, 62 1, /* XXX */ 63}; 64 65static int 66scprobe(device_t dev) 67{ 68 device_set_desc(dev, "System console"); 69 return sc_probe_unit(device_get_unit(dev), isa_get_flags(dev)); 70} 71 72static int 73scattach(device_t dev) 74{ 75 return sc_attach_unit(device_get_unit(dev), isa_get_flags(dev)); 76} 77 78DRIVER_MODULE(sc, isa, sc_driver, sc_devclass, 0, 0); 79 80#endif /* NSC > 0 */
| 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 DRIVER_TYPE_TTY, 65 1, /* XXX */ 66}; 67 68static int 69scprobe(device_t dev) 70{ 71 device_set_desc(dev, "System console"); 72 return sc_probe_unit(device_get_unit(dev), isa_get_flags(dev)); 73} 74 75static int 76scattach(device_t dev) 77{ 78 return sc_attach_unit(device_get_unit(dev), isa_get_flags(dev)); 79} 80 81DRIVER_MODULE(sc, isa, sc_driver, sc_devclass, 0, 0); 82 83#endif /* NSC > 0 */
|