2 * This file is part of the LinuxBIOS project.
4 * Copyright (C) 2007 Uwe Hermann <uwe@hermann-uwe.de>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 #include <console/console.h>
23 #include <device/device.h>
24 #include <device/pci.h>
25 #include <device/pci_ids.h>
26 #include <pc80/isa-dma.h>
27 #include <pc80/mc146818rtc.h>
30 static void isa_init(struct device *dev)
35 /* Initialize the real time clock (RTC). */
38 /* Enable access to all BIOS regions. */
39 reg16 = pci_read_config16(dev, XBCS);
40 reg16 |= LOWER_BIOS_ENABLE;
41 reg16 |= EXT_BIOS_ENABLE;
42 reg16 |= EXT_BIOS_ENABLE_1MB;
43 reg16 &= ~(WRITE_PROTECT_ENABLE); /* Disable ROM write access. */
44 pci_write_config16(dev, XBCS, reg16);
47 * The PIIX4 can support the full ISA bus, or the Extended I/O (EIO)
48 * bus, which is a subset of ISA. We select the full ISA bus here.
50 reg32 = pci_read_config32(dev, GENCFG);
51 reg32 |= ISA; /* Select ISA, not EIO. */
52 pci_write_config16(dev, GENCFG, reg32);
54 /* Initialize ISA DMA. */
58 static const struct device_operations isa_ops = {
59 .read_resources = pci_dev_read_resources,
60 .set_resources = pci_dev_set_resources,
61 .enable_resources = pci_dev_enable_resources,
63 .scan_bus = scan_static_bus, /* TODO: Needed? */
65 .ops_pci = 0, /* No subsystem IDs on 82371EB! */
68 static const struct pci_driver isa_driver __pci_driver = {
70 .vendor = PCI_VENDOR_ID_INTEL,
71 .device = PCI_DEVICE_ID_INTEL_82371AB_ISA,