diff options
author | peter <peter@FreeBSD.org> | 2000-05-28 16:31:35 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2000-05-28 16:31:35 +0000 |
commit | deeb13a8dbcfd2933374a20e990791e83cd77096 (patch) | |
tree | 39030c3ea9be58f7cbf6b4fb3d7aaf9bbbb003e7 /sys/pccard/pcic_pci.c | |
parent | 256d18b0e284b31999136a99c0065a351532b66c (diff) | |
download | FreeBSD-src-deeb13a8dbcfd2933374a20e990791e83cd77096.zip FreeBSD-src-deeb13a8dbcfd2933374a20e990791e83cd77096.tar.gz |
Make this compile without depending on the FreeBSD 2.2 compatability
defines.
Diffstat (limited to 'sys/pccard/pcic_pci.c')
-rw-r--r-- | sys/pccard/pcic_pci.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/sys/pccard/pcic_pci.c b/sys/pccard/pcic_pci.c index 5c88e22..d995e5d 100644 --- a/sys/pccard/pcic_pci.c +++ b/sys/pccard/pcic_pci.c @@ -67,7 +67,7 @@ pd6832_legacy_init(device_t dev) io_port = PCIC_INDEX_0 + num6832 * CLPD6832_NUM_REGS; if (unit == 0) pci_write_config(dev, CLPD6832_LEGACY_16BIT_IOADDR, - io_port & ~PCI_MAP_IO, 4); + io_port & ~CLPD6832_LEGACY_16BIT_IOENABLE, 4); /* * I think this should be a call to pci_map_port, but that @@ -75,7 +75,7 @@ pd6832_legacy_init(device_t dev) * need to map is 0x44. */ io_port = pci_read_config(dev, CLPD6832_LEGACY_16BIT_IOADDR, 4) & - ~PCI_MAP_IO; + ~CLPD6832_LEGACY_16BIT_IOENABLE; /* * Configure the first I/O window to contain CLPD6832_NUM_REGS @@ -93,8 +93,7 @@ pd6832_legacy_init(device_t dev) * Set default operating mode (I/O port space) and allocate * this socket to the current unit. */ - pci_write_config(dev, PCI_COMMAND_STATUS_REG, - CLPD6832_COMMAND_DEFAULTS, 4); + pci_write_config(dev, PCIR_COMMAND, CLPD6832_COMMAND_DEFAULTS, 4); pci_write_config(dev, CLPD6832_SOCKET, unit, 4); /* @@ -200,13 +199,13 @@ generic_cardbus_attach(device_t dev) if (unit != 0) return; - iobase = pci_read_config(dev, CB_PCI_LEGACY16_IOADDR, 2) - & ~PCI_MAP_IO; + iobase = pci_read_config(dev, CB_PCI_LEGACY16_IOADDR, 2) & + ~CB_PCI_LEGACY16_IOENABLE; if (!iobase) { - iobase = 0x3e0 | PCI_MAP_IO; + iobase = 0x3e0 | CB_PCI_LEGACY16_IOENABLE; pci_write_config(dev, CB_PCI_LEGACY16_IOADDR, iobase, 2); iobase = pci_read_config(dev, CB_PCI_LEGACY16_IOADDR, 2) - & ~PCI_MAP_IO; + & ~CB_PCI_LEGACY16_IOENABLE; } PRVERB((dev, "Legacy address set to %#x\n", iobase)); return; @@ -326,13 +325,13 @@ pcic_pci_attach(device_t dev) /* Place any per "slot" initialization here */ /* - * In sys/pci/pcireg.h, PCI_COMMAND_STATUS_REG must be separated + * In sys/pci/pcireg.h, PCIR_COMMAND must be separated * PCI_COMMAND_REG(0x04) and PCI_STATUS_REG(0x06). * Takeshi Shibagaki(shiba@jp.freebsd.org). */ - command = pci_read_config(dev, PCI_COMMAND_STATUS_REG, 4); - command |= PCI_COMMAND_IO_ENABLE | PCI_COMMAND_MEM_ENABLE; - pci_write_config(dev, PCI_COMMAND_STATUS_REG, command, 4); + command = pci_read_config(dev, PCIR_COMMAND, 4); + command |= PCIM_CMD_PORTEN | PCIM_CMD_MEMEN; + pci_write_config(dev, PCIR_COMMAND, command, 4); switch (device_id) { case PCI_DEVICE_ID_PCIC_TI1130: |