summaryrefslogtreecommitdiffstats
path: root/sys/pci/pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/pci/pci.c')
-rw-r--r--sys/pci/pci.c37
1 files changed, 6 insertions, 31 deletions
diff --git a/sys/pci/pci.c b/sys/pci/pci.c
index d1d696d..2913c5b 100644
--- a/sys/pci/pci.c
+++ b/sys/pci/pci.c
@@ -1,6 +1,6 @@
/**************************************************************************
**
-** $Id: pci.c,v 1.56 1996/10/14 13:04:34 se Exp $
+** $Id: pci.c,v 1.57 1996/10/22 20:20:11 se Exp $
**
** General subroutines for the PCI bus.
** pci_configure ()
@@ -729,23 +729,14 @@ pci_bus_config (void)
** Bridge was configured by the bios.
** Read out the mapped io region.
*/
- u_int reg, data, mask;
+ unsigned reg;
reg = pci_conf_read (tag,
PCI_PCI_BRIDGE_IO_REG);
- pci_conf_write(tag,
- PCI_PCI_BRIDGE_IO_REG, 0xFFFF);
- data = pci_conf_read (tag,
- PCI_PCI_BRIDGE_IO_REG);
- pci_conf_write(tag,
- PCI_PCI_BRIDGE_IO_REG, reg & 0xffff);
-
- mask = (0xFF00 ^ (data & 0xFF00)) | 0xFF;
-
this->pcicb_iobase =
PCI_PPB_IOBASE_EXTRACT (reg);
this->pcicb_iolimit =
- PCI_PPB_IOLIMIT_EXTRACT(reg) | mask;
+ PCI_PPB_IOLIMIT_EXTRACT(reg);
/*
** Note the used io space.
@@ -760,25 +751,17 @@ pci_bus_config (void)
** Bridge was configured by the bios.
** Read out the mapped memory regions.
*/
- u_int reg, data, mask;
+ unsigned reg;
/*
** non prefetchable memory
*/
reg = pci_conf_read (tag,
PCI_PCI_BRIDGE_MEM_REG);
- pci_conf_write(tag,
- PCI_PCI_BRIDGE_MEM_REG, 0xFFFFFFFF);
- data = pci_conf_read (tag,
- PCI_PCI_BRIDGE_MEM_REG);
- pci_conf_write(tag,
- PCI_PCI_BRIDGE_MEM_REG, reg);
-
- mask = 0xFFFFFFFF ^ (data & 0xFFFF0000);
this->pcicb_membase =
PCI_PPB_MEMBASE_EXTRACT (reg);
this->pcicb_memlimit =
- PCI_PPB_MEMLIMIT_EXTRACT(reg) | mask;
+ PCI_PPB_MEMLIMIT_EXTRACT(reg);
/*
** Register used memory space.
@@ -792,18 +775,10 @@ pci_bus_config (void)
*/
reg = pci_conf_read (tag,
PCI_PCI_BRIDGE_PMEM_REG);
- pci_conf_write(tag,
- PCI_PCI_BRIDGE_PMEM_REG, 0xFFFFFFFF);
- data = pci_conf_read (tag,
- PCI_PCI_BRIDGE_PMEM_REG);
- pci_conf_write(tag,
- PCI_PCI_BRIDGE_PMEM_REG, reg);
-
- mask = 0xFFFFFFFF ^ (data & 0xFFFF0000);
this->pcicb_p_membase=
PCI_PPB_MEMBASE_EXTRACT (reg);
this->pcicb_p_memlimit=
- PCI_PPB_MEMLIMIT_EXTRACT(reg) | mask;
+ PCI_PPB_MEMLIMIT_EXTRACT(reg);
/*
** Register used memory space.
OpenPOWER on IntegriCloud