aic7xxx_osm.h (71717) | aic7xxx_osm.h (74094) |
---|---|
1/* 2 * FreeBSD platform specific driver option settings, data structures, 3 * function declarations and includes. 4 * 5 * Copyright (c) 1994-2001 Justin T. Gibbs. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 17 unchanged lines hidden (view full) --- 26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 * 32 * $Id$ 33 * | 1/* 2 * FreeBSD platform specific driver option settings, data structures, 3 * function declarations and includes. 4 * 5 * Copyright (c) 1994-2001 Justin T. Gibbs. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 17 unchanged lines hidden (view full) --- 26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 * 32 * $Id$ 33 * |
34 * $FreeBSD: head/sys/dev/aic7xxx/aic7xxx_osm.h 71717 2001-01-27 20:54:24Z gibbs $ | 34 * $FreeBSD: head/sys/dev/aic7xxx/aic7xxx_osm.h 74094 2001-03-11 06:34:17Z gibbs $ |
35 */ 36 37#ifndef _AIC7XXX_FREEBSD_H_ 38#define _AIC7XXX_FREEBSD_H_ 39 40#include <opt_aic7xxx.h> /* for config options */ 41#include <pci.h> /* for NPCI */ 42 43#include <sys/param.h> 44#include <sys/systm.h> 45#include <sys/bus.h> /* For device_t */ 46#include <sys/eventhandler.h> 47#include <sys/kernel.h> 48#include <sys/malloc.h> 49#include <sys/queue.h> 50 51#if NPCI > 0 | 35 */ 36 37#ifndef _AIC7XXX_FREEBSD_H_ 38#define _AIC7XXX_FREEBSD_H_ 39 40#include <opt_aic7xxx.h> /* for config options */ 41#include <pci.h> /* for NPCI */ 42 43#include <sys/param.h> 44#include <sys/systm.h> 45#include <sys/bus.h> /* For device_t */ 46#include <sys/eventhandler.h> 47#include <sys/kernel.h> 48#include <sys/malloc.h> 49#include <sys/queue.h> 50 51#if NPCI > 0 |
52#define AHC_SUPPORT_PCI 1 | 52#define AHC_PCI_CONFIG 1 |
53#ifdef AHC_ALLOW_MEMIO 54#include <machine/bus_memio.h> 55#endif 56#endif 57#include <machine/bus_pio.h> 58#include <machine/bus.h> 59#include <machine/clock.h> 60#include <machine/resource.h> --- 338 unchanged lines hidden (view full) --- 399 && (scb->io_ctx->ccb_h.status & CAM_RELEASE_SIMQ) == 0) { 400 scb->io_ctx->ccb_h.status |= CAM_RELEASE_SIMQ; 401 ahc->flags &= ~AHC_RESOURCE_SHORTAGE; 402 } 403 scb->io_ctx = NULL; 404} 405 406/********************************** PCI ***************************************/ | 53#ifdef AHC_ALLOW_MEMIO 54#include <machine/bus_memio.h> 55#endif 56#endif 57#include <machine/bus_pio.h> 58#include <machine/bus.h> 59#include <machine/clock.h> 60#include <machine/resource.h> --- 338 unchanged lines hidden (view full) --- 399 && (scb->io_ctx->ccb_h.status & CAM_RELEASE_SIMQ) == 0) { 400 scb->io_ctx->ccb_h.status |= CAM_RELEASE_SIMQ; 401 ahc->flags &= ~AHC_RESOURCE_SHORTAGE; 402 } 403 scb->io_ctx = NULL; 404} 405 406/********************************** PCI ***************************************/ |
407#ifdef AHC_SUPPORT_PCI | 407#ifdef AHC_PCI_CONFIG |
408static __inline uint32_t ahc_pci_read_config(ahc_dev_softc_t pci, 409 int reg, int width); 410static __inline void ahc_pci_write_config(ahc_dev_softc_t pci, 411 int reg, uint32_t value, 412 int width); 413static __inline int ahc_get_pci_function(ahc_dev_softc_t); 414static __inline int ahc_get_pci_slot(ahc_dev_softc_t); 415static __inline int ahc_get_pci_bus(ahc_dev_softc_t); --- 25 unchanged lines hidden (view full) --- 441 return (pci_get_slot(pci)); 442} 443 444static __inline int 445ahc_get_pci_bus(ahc_dev_softc_t pci) 446{ 447 return (pci_get_bus(pci)); 448} | 408static __inline uint32_t ahc_pci_read_config(ahc_dev_softc_t pci, 409 int reg, int width); 410static __inline void ahc_pci_write_config(ahc_dev_softc_t pci, 411 int reg, uint32_t value, 412 int width); 413static __inline int ahc_get_pci_function(ahc_dev_softc_t); 414static __inline int ahc_get_pci_slot(ahc_dev_softc_t); 415static __inline int ahc_get_pci_bus(ahc_dev_softc_t); --- 25 unchanged lines hidden (view full) --- 441 return (pci_get_slot(pci)); 442} 443 444static __inline int 445ahc_get_pci_bus(ahc_dev_softc_t pci) 446{ 447 return (pci_get_bus(pci)); 448} |
449 450typedef enum 451{ 452 AHC_POWER_STATE_D0, 453 AHC_POWER_STATE_D1, 454 AHC_POWER_STATE_D2, 455 AHC_POWER_STATE_D3 456} ahc_power_state; 457 458void ahc_power_state_change(struct ahc_softc *ahc, 459 ahc_power_state new_state); |
|
449#endif 450/******************************** VL/EISA *************************************/ 451int aic7770_map_registers(struct ahc_softc *ahc); | 460#endif 461/******************************** VL/EISA *************************************/ 462int aic7770_map_registers(struct ahc_softc *ahc); |
452int aic7770_map_int(struct ahc_softc *ahc); | 463int aic7770_map_int(struct ahc_softc *ahc, int irq); |
453 454/********************************* Debug **************************************/ 455static __inline void ahc_print_path(struct ahc_softc *, struct scb *); 456static __inline void ahc_platform_dump_card_state(struct ahc_softc *ahc); 457 458static __inline void 459ahc_print_path(struct ahc_softc *ahc, struct scb *scb) 460{ --- 35 unchanged lines hidden --- | 464 465/********************************* Debug **************************************/ 466static __inline void ahc_print_path(struct ahc_softc *, struct scb *); 467static __inline void ahc_platform_dump_card_state(struct ahc_softc *ahc); 468 469static __inline void 470ahc_print_path(struct ahc_softc *ahc, struct scb *scb) 471{ --- 35 unchanged lines hidden --- |