2 * linux/arch/alpha/kernel/console.c
4 * Architecture-specific specific support for VGA device on
8 #include <linux/config.h>
10 #include <linux/init.h>
11 #include <linux/tty.h>
12 #include <linux/console.h>
14 #include <asm/machvec.h>
16 #ifdef CONFIG_VGA_HOSE
19 * Externally-visible vga hose bases
21 unsigned long __vga_hose_io_base = 0; /* base for default hose */
22 unsigned long __vga_hose_mem_base = 0; /* base for default hose */
24 static struct pci_controller * __init
25 default_vga_hose_select(struct pci_controller *h1, struct pci_controller *h2)
27 if (h2->index < h1->index)
34 set_vga_hose(struct pci_controller *hose)
37 __vga_hose_io_base = hose->io_space->start;
38 __vga_hose_mem_base = hose->mem_space->start;
43 locate_and_init_vga(void *(*sel_func)(void *, void *))
45 struct pci_controller *hose = NULL;
46 struct pci_dev *dev = NULL;
48 if (!sel_func) sel_func = (void *)default_vga_hose_select;
50 for(dev=NULL; (dev=pci_get_class(PCI_CLASS_DISPLAY_VGA << 8, dev));) {
51 if (!hose) hose = dev->sysdata;
52 else hose = sel_func(hose, dev->sysdata);
55 /* Did we already inititialize the correct one? */
56 if (conswitchp == &vga_con &&
57 __vga_hose_io_base == hose->io_space->start &&
58 __vga_hose_mem_base == hose->mem_space->start)
61 /* Set the VGA hose and init the new console */
63 take_over_console(&vga_con, 0, MAX_NR_CONSOLES-1, 1);