Home | History | Annotate | Line # | Download | only in isa
isa_machdep.c revision 1.4
      1 /*	$NetBSD: isa_machdep.c,v 1.4 1996/11/19 04:54:43 cgd Exp $	*/
      2 
      3 /*
      4  * Copyright (c) 1995, 1996 Carnegie-Mellon University.
      5  * All rights reserved.
      6  *
      7  * Author: Chris G. Demetriou
      8  *
      9  * Permission to use, copy, modify and distribute this software and
     10  * its documentation is hereby granted, provided that both the copyright
     11  * notice and this permission notice appear in all copies of the
     12  * software, derivative works or modified versions, and any portions
     13  * thereof, and that both notices appear in supporting documentation.
     14  *
     15  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
     16  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
     17  * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
     18  *
     19  * Carnegie Mellon requests users of this software to return to
     20  *
     21  *  Software Distribution Coordinator  or  Software.Distribution (at) CS.CMU.EDU
     22  *  School of Computer Science
     23  *  Carnegie Mellon University
     24  *  Pittsburgh PA 15213-3890
     25  *
     26  * any improvements or extensions that they make and grant Carnegie the
     27  * rights to redistribute these changes.
     28  */
     29 
     30 /*
     31  * Machine-specific functions for PCI autoconfiguration.
     32  */
     33 
     34 #include <sys/types.h>
     35 #include <sys/param.h>
     36 #include <sys/time.h>
     37 #include <sys/systm.h>
     38 #include <sys/errno.h>
     39 #include <sys/device.h>
     40 #include <vm/vm.h>
     41 
     42 #include <dev/isa/isavar.h>
     43 
     44 #include "vga_isa.h"
     45 #if NVGA_ISA
     46 #include <alpha/isa/vga_isavar.h>
     47 #endif
     48 
     49 struct {
     50 	int	(*probe) __P((bus_space_tag_t, bus_space_tag_t));
     51 	void	(*console) __P((bus_space_tag_t, bus_space_tag_t));
     52 } isa_display_console_devices[] = {
     53 #if NVGA_ISA
     54 	{ vga_isa_probe, vga_isa_console },
     55 #endif
     56 	{ },
     57 };
     58 
     59 void
     60 isa_display_console(iot, memt)
     61 	bus_space_tag_t iot, memt;
     62 {
     63 	int i = 0;
     64 
     65 	while (isa_display_console_devices[i].probe != NULL)
     66 		if ((*isa_display_console_devices[i].probe)(iot, memt)) {
     67 			(*isa_display_console_devices[i].console)(iot, memt);
     68 			break;
     69 		}
     70 }
     71