diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2010-03-22 22:28:28 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2010-03-22 22:28:28 +0000 |
commit | 69a26e66b13a7c4261ca3d797c32ad0c9de955b7 (patch) | |
tree | 21f4e2c96d7785a8ae79ba3da3cbf18122fd3ad1 /sys/dev/cardbus/if_acx_cardbus.c | |
parent | 15c19a9373d03a7892e33c480376958899e0a94d (diff) |
Remove some cardbus defines and types which are identical to
their pci counterparts, similar to recent changes in NetBSD.
ok oga@ deraadt@ jasper@
Diffstat (limited to 'sys/dev/cardbus/if_acx_cardbus.c')
-rw-r--r-- | sys/dev/cardbus/if_acx_cardbus.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/sys/dev/cardbus/if_acx_cardbus.c b/sys/dev/cardbus/if_acx_cardbus.c index 69410183177..87c35fc8f68 100644 --- a/sys/dev/cardbus/if_acx_cardbus.c +++ b/sys/dev/cardbus/if_acx_cardbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_acx_cardbus.c,v 1.15 2009/07/30 21:33:23 miod Exp $ */ +/* $OpenBSD: if_acx_cardbus.c,v 1.16 2010/03/22 22:28:27 jsg Exp $ */ /* * Copyright (c) 2006 Claudio Jeker <claudio@openbsd.org> @@ -64,7 +64,7 @@ struct acx_cardbus_softc { /* cardbus specific goo */ cardbus_devfunc_t sc_ct; - cardbustag_t sc_tag; + pcitag_t sc_tag; void *sc_ih; bus_size_t sc_mapsize1; bus_size_t sc_mapsize2; @@ -90,7 +90,7 @@ struct cfattach acx_cardbus_ca = { acx_cardbus_attach, acx_cardbus_detach }; -static const struct cardbus_matchid acx_cardbus_devices[] = { +static const struct pci_matchid acx_cardbus_devices[] = { { PCI_VENDOR_TI, PCI_PRODUCT_TI_ACX100A }, { PCI_VENDOR_TI, PCI_PRODUCT_TI_ACX100B }, { PCI_VENDOR_TI, PCI_PRODUCT_TI_ACX111 }, @@ -129,46 +129,46 @@ acx_cardbus_attach(struct device *parent, struct device *self, void *aux) sc->sc_disable = acx_cardbus_disable; sc->sc_power = acx_cardbus_power; - if (CARDBUS_PRODUCT(ca->ca_id) == PCI_PRODUCT_TI_ACX100A) { + if (PCI_PRODUCT(ca->ca_id) == PCI_PRODUCT_TI_ACX100A) { /* first map I/O space as seen in the dragonfly code */ error = Cardbus_mapreg_map(ct, CARDBUS_BASE0_REG, - CARDBUS_MAPREG_TYPE_IO, 0, &csc->sc_io_bt, &csc->sc_io_bh, + PCI_MAPREG_TYPE_IO, 0, &csc->sc_io_bt, &csc->sc_io_bh, &base, &csc->sc_iomapsize); if (error != 0) { printf(": can't map i/o space\n"); return; } - csc->sc_iobar_val = base | CARDBUS_MAPREG_TYPE_IO; + csc->sc_iobar_val = base | PCI_MAPREG_TYPE_IO; b1 = CARDBUS_BASE1_REG; b2 = CARDBUS_BASE2_REG; } /* map control/status registers */ - error = Cardbus_mapreg_map(ct, b1, CARDBUS_MAPREG_TYPE_MEM, 0, + error = Cardbus_mapreg_map(ct, b1, PCI_MAPREG_TYPE_MEM, 0, &sc->sc_mem1_bt, &sc->sc_mem1_bh, &base, &csc->sc_mapsize1); if (error != 0) { printf(": can't map mem1 space\n"); return; } - csc->sc_bar1_val = base | CARDBUS_MAPREG_TYPE_MEM; + csc->sc_bar1_val = base | PCI_MAPREG_TYPE_MEM; /* map the other memory region */ - error = Cardbus_mapreg_map(ct, b2, CARDBUS_MAPREG_TYPE_MEM, 0, + error = Cardbus_mapreg_map(ct, b2, PCI_MAPREG_TYPE_MEM, 0, &sc->sc_mem2_bt, &sc->sc_mem2_bh, &base, &csc->sc_mapsize2); if (error != 0) { printf(": can't map mem2 space\n"); return; } - csc->sc_bar2_val = base | CARDBUS_MAPREG_TYPE_MEM; + csc->sc_bar2_val = base | PCI_MAPREG_TYPE_MEM; /* set up the PCI configuration registers */ acx_cardbus_setup(csc); printf(": irq %d\n", csc->sc_intrline); - if (CARDBUS_PRODUCT(ca->ca_id) == PCI_PRODUCT_TI_ACX111) + if (PCI_PRODUCT(ca->ca_id) == PCI_PRODUCT_TI_ACX111) acx111_set_param(sc); else acx100_set_param(sc); @@ -185,7 +185,7 @@ acx_cardbus_detach(struct device *self, int flags) struct acx_cardbus_softc *csc = (struct acx_cardbus_softc *)self; struct acx_softc *sc = &csc->sc_acx; cardbus_devfunc_t ct = csc->sc_ct; - cardbus_chipset_tag_t cc = ct->ct_cc; + pci_chipset_tag_t cc = ct->ct_cc; cardbus_function_tag_t cf = ct->ct_cf; int error, b1 = CARDBUS_BASE0_REG, b2 = CARDBUS_BASE1_REG; @@ -225,7 +225,7 @@ acx_cardbus_enable(struct acx_softc *sc) csc = (struct acx_cardbus_softc *)sc; cardbus_devfunc_t ct = csc->sc_ct; - cardbus_chipset_tag_t cc = ct->ct_cc; + pci_chipset_tag_t cc = ct->ct_cc; cardbus_function_tag_t cf = ct->ct_cf; /* power on the socket */ @@ -254,7 +254,7 @@ acx_cardbus_disable(struct acx_softc *sc) { struct acx_cardbus_softc *csc = (struct acx_cardbus_softc *)sc; cardbus_devfunc_t ct = csc->sc_ct; - cardbus_chipset_tag_t cc = ct->ct_cc; + pci_chipset_tag_t cc = ct->ct_cc; cardbus_function_tag_t cf = ct->ct_cf; /* unhook the interrupt handler */ @@ -280,7 +280,7 @@ void acx_cardbus_setup(struct acx_cardbus_softc *csc) { cardbus_devfunc_t ct = csc->sc_ct; - cardbus_chipset_tag_t cc = ct->ct_cc; + pci_chipset_tag_t cc = ct->ct_cc; cardbus_function_tag_t cf = ct->ct_cf; pcireg_t reg; int b1 = CARDBUS_BASE0_REG, b2 = CARDBUS_BASE1_REG; @@ -303,12 +303,12 @@ acx_cardbus_setup(struct acx_cardbus_softc *csc) /* enable the appropriate bits in the PCI CSR */ reg = cardbus_conf_read(cc, cf, csc->sc_tag, - CARDBUS_COMMAND_STATUS_REG); - reg |= CARDBUS_COMMAND_MASTER_ENABLE | CARDBUS_COMMAND_MEM_ENABLE; + PCI_COMMAND_STATUS_REG); + reg |= PCI_COMMAND_MASTER_ENABLE | PCI_COMMAND_MEM_ENABLE; #if 0 if (csc->sc_iobar_val) - reg |= CARDBUS_COMMAND_IO_ENABLE; + reg |= PCI_COMMAND_IO_ENABLE; #endif - cardbus_conf_write(cc, cf, csc->sc_tag, CARDBUS_COMMAND_STATUS_REG, + cardbus_conf_write(cc, cf, csc->sc_tag, PCI_COMMAND_STATUS_REG, reg); } |