diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2009-10-05 20:01:41 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2009-10-05 20:01:41 +0000 |
commit | dd45a3275d4b23dbeb5221af6552cfd89867cb30 (patch) | |
tree | 62f6de1327bcba864eb51de0fc4d951b520a8339 /sys/dev/pci/pciidevar.h | |
parent | 29452034d1c8798d9724795177c9678f7f7913ad (diff) |
Add some minimalistic detach/unmap bits for pciide,
done using a chipset unmap callback.
Still needs to work to distinguish between compat
register mappings and compat interrupts so we
don't get caught out.
Tested with a diskless sii3112 CardBus eSATA controller
by me, and testing and feedback by deraadt@ with
a phison based expresscard SSD.
Diffstat (limited to 'sys/dev/pci/pciidevar.h')
-rw-r--r-- | sys/dev/pci/pciidevar.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/sys/dev/pci/pciidevar.h b/sys/dev/pci/pciidevar.h index fb7d3591388..9de332aaa6f 100644 --- a/sys/dev/pci/pciidevar.h +++ b/sys/dev/pci/pciidevar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pciidevar.h,v 1.18 2009/01/04 10:37:40 jsg Exp $ */ +/* $OpenBSD: pciidevar.h,v 1.19 2009/10/05 20:01:40 jsg Exp $ */ /* $NetBSD: pciidevar.h,v 1.6 2001/01/12 16:04:00 bouyer Exp $ */ /* @@ -60,6 +60,7 @@ struct pciide_softc { int sc_dma_ok; /* bus-master DMA info */ bus_space_tag_t sc_dma_iot; bus_space_handle_t sc_dma_ioh; + bus_size_t sc_dma_iosz; bus_dma_tag_t sc_dmat; /* @@ -71,6 +72,8 @@ struct pciide_softc { /* Chip description */ const struct pciide_product_desc *sc_pp; + /* unmap/detach */ + void (*chip_unmap)(struct pciide_softc *, int); /* Chip revision */ int sc_rev; /* common definitions */ @@ -157,6 +160,17 @@ void pciide_irqack(struct channel_softc *); void pciide_print_modes(struct pciide_channel *); void pciide_print_channels(int, pcireg_t); +void default_chip_unmap(struct pciide_softc *, int); +void pciide_unmapreg_dma(struct pciide_softc *); +void pciide_chanfree(struct pciide_softc *, int); +void pciide_unmap_chan(struct pciide_softc *, struct pciide_channel *, int); +int pciide_unmapregs_compat(struct pciide_softc *, + struct pciide_channel *); +int pciide_unmapregs_native(struct pciide_softc *, + struct pciide_channel *); +int pciide_dma_table_free(struct pciide_softc *, int, int); +void pciide_channel_dma_free(struct pciide_channel *); + /* * Functions defined by machine-dependent code. */ |