diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2007-07-02 00:52:26 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2007-07-02 00:52:26 +0000 |
commit | 58512cf1cc5d5fa31c2dcde5820fbe6d00954e68 (patch) | |
tree | 32c8d0573ea3636a1dce27bfbd854bbbf42c5753 /sys/dev/pci/ahcivar.h | |
parent | 77cdcbc78199aa9d62818cfa490ca768b6e390b6 (diff) |
move ahci_softc and the prototype for ahci_attach into a header so other
code will be able to see it.
Diffstat (limited to 'sys/dev/pci/ahcivar.h')
-rw-r--r-- | sys/dev/pci/ahcivar.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/sys/dev/pci/ahcivar.h b/sys/dev/pci/ahcivar.h new file mode 100644 index 00000000000..cde545d9d25 --- /dev/null +++ b/sys/dev/pci/ahcivar.h @@ -0,0 +1,49 @@ +/* $OpenBSD: ahcivar.h,v 1.1 2007/07/02 00:52:25 dlg Exp $ */ + +/* + * Copyright (c) 2007 David Gwynne <dlg@openbsd.org> + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +struct ahci_port; + +struct ahci_softc { + struct device sc_dev; + + void *sc_ih; + + bus_space_tag_t sc_iot; + bus_space_handle_t sc_ioh; + bus_size_t sc_ios; + bus_dma_tag_t sc_dmat; + + int sc_flags; +#define AHCI_F_NO_NCQ (1<<0) + + u_int sc_ncmds; + +#define AHCI_MAX_PORTS 32 + struct ahci_port *sc_ports[AHCI_MAX_PORTS]; + + struct atascsi *sc_atascsi; + +#ifdef AHCI_COALESCE + u_int32_t sc_ccc_mask; + u_int32_t sc_ccc_ports; + u_int32_t sc_ccc_ports_cur; +#endif +}; + +int ahci_attach(struct ahci_softc *, struct pci_attach_args *, + pci_intr_handle_t); |