aic79xx_osm.h (107368) | aic79xx_osm.h (107437) |
---|---|
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 * Copyright (c) 2001-2002 Adaptec Inc. 7 * All rights reserved. 8 * --- 16 unchanged lines hidden (view full) --- 25 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * | 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 * Copyright (c) 2001-2002 Adaptec Inc. 7 * All rights reserved. 8 * --- 16 unchanged lines hidden (view full) --- 25 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * |
33 * $Id: //depot/aic7xxx/freebsd/dev/aic7xxx/aic79xx_osm.h#14 $ | 33 * $Id: //depot/aic7xxx/freebsd/dev/aic7xxx/aic79xx_osm.h#18 $ |
34 * | 34 * |
35 * $FreeBSD: head/sys/dev/aic7xxx/aic79xx_osm.h 107368 2002-11-28 04:09:29Z scottl $ | 35 * $FreeBSD: head/sys/dev/aic7xxx/aic79xx_osm.h 107437 2002-12-01 07:50:56Z scottl $ |
36 */ 37 38#ifndef _AIC79XX_FREEBSD_H_ 39#define _AIC79XX_FREEBSD_H_ 40 41#include <opt_aic79xx.h> /* for config options */ 42 43#include <sys/param.h> --- 173 unchanged lines hidden (view full) --- 217#if AHD_REG_PRETTY_PRINT 218#define AIC_DEBUG_REGISTERS 1 219#else 220#define AIC_DEBUG_REGISTERS 0 221#endif 222#include <dev/aic7xxx/aic79xx.h> 223 224/***************************** Timer Facilities *******************************/ | 36 */ 37 38#ifndef _AIC79XX_FREEBSD_H_ 39#define _AIC79XX_FREEBSD_H_ 40 41#include <opt_aic79xx.h> /* for config options */ 42 43#include <sys/param.h> --- 173 unchanged lines hidden (view full) --- 217#if AHD_REG_PRETTY_PRINT 218#define AIC_DEBUG_REGISTERS 1 219#else 220#define AIC_DEBUG_REGISTERS 0 221#endif 222#include <dev/aic7xxx/aic79xx.h> 223 224/***************************** Timer Facilities *******************************/ |
225timeout_t ahd_timeout; |
|
225#if __FreeBSD_version >= 500000 226#define ahd_timer_init(timer) callout_init(timer, /*mpsafe*/0) 227#else 228#define ahd_timer_init callout_init 229#endif 230#define ahd_timer_stop callout_stop 231 232static __inline void | 226#if __FreeBSD_version >= 500000 227#define ahd_timer_init(timer) callout_init(timer, /*mpsafe*/0) 228#else 229#define ahd_timer_init callout_init 230#endif 231#define ahd_timer_stop callout_stop 232 233static __inline void |
233ahd_timer_reset(ahd_timer_t *timer, int usec, ahd_callback_t *func, void *arg) | 234ahd_timer_reset(ahd_timer_t *timer, u_int usec, ahd_callback_t *func, void *arg) |
234{ 235 callout_reset(timer, (usec * hz)/1000000, func, arg); 236} 237 | 235{ 236 callout_reset(timer, (usec * hz)/1000000, func, arg); 237} 238 |
239static __inline void 240ahd_scb_timer_reset(struct scb *scb, u_int usec) 241{ 242 callout_reset(scb->io_ctx->ccb_h.timeout_ch.callout, 243 (usec * hz)/1000000, ahd_timeout, scb); 244} 245 |
|
238/*************************** Device Access ************************************/ 239#define ahd_inb(ahd, port) \ 240 bus_space_read_1((ahd)->tags[(port) >> 8], \ 241 (ahd)->bshs[(port) >> 8], (port) & 0xFF) 242 243#define ahd_outb(ahd, port, value) \ 244 bus_space_write_1((ahd)->tags[(port) >> 8], \ 245 (ahd)->bshs[(port) >> 8], (port) & 0xFF, value) --- 329 unchanged lines hidden (view full) --- 575 576/************************* Initialization/Teardown ****************************/ 577int ahd_platform_alloc(struct ahd_softc *ahd, void *platform_arg); 578void ahd_platform_free(struct ahd_softc *ahd); 579int ahd_map_int(struct ahd_softc *ahd); 580int ahd_attach(struct ahd_softc *); 581int ahd_softc_comp(struct ahd_softc *lahd, struct ahd_softc *rahd); 582int ahd_detach(device_t); | 246/*************************** Device Access ************************************/ 247#define ahd_inb(ahd, port) \ 248 bus_space_read_1((ahd)->tags[(port) >> 8], \ 249 (ahd)->bshs[(port) >> 8], (port) & 0xFF) 250 251#define ahd_outb(ahd, port, value) \ 252 bus_space_write_1((ahd)->tags[(port) >> 8], \ 253 (ahd)->bshs[(port) >> 8], (port) & 0xFF, value) --- 329 unchanged lines hidden (view full) --- 583 584/************************* Initialization/Teardown ****************************/ 585int ahd_platform_alloc(struct ahd_softc *ahd, void *platform_arg); 586void ahd_platform_free(struct ahd_softc *ahd); 587int ahd_map_int(struct ahd_softc *ahd); 588int ahd_attach(struct ahd_softc *); 589int ahd_softc_comp(struct ahd_softc *lahd, struct ahd_softc *rahd); 590int ahd_detach(device_t); |
591#define ahd_platform_init(arg) |
|
583 | 592 |
593 |
|
584/****************************** Interrupts ************************************/ 585void ahd_platform_intr(void *); 586static __inline void ahd_platform_flushwork(struct ahd_softc *ahd); 587static __inline void 588ahd_platform_flushwork(struct ahd_softc *ahd) 589{ 590} 591 592/************************ Misc Function Declarations **************************/ | 594/****************************** Interrupts ************************************/ 595void ahd_platform_intr(void *); 596static __inline void ahd_platform_flushwork(struct ahd_softc *ahd); 597static __inline void 598ahd_platform_flushwork(struct ahd_softc *ahd) 599{ 600} 601 602/************************ Misc Function Declarations **************************/ |
593timeout_t ahd_timeout; | |
594void ahd_done(struct ahd_softc *ahd, struct scb *scb); 595void ahd_send_async(struct ahd_softc *, char /*channel*/, 596 u_int /*target*/, u_int /*lun*/, ac_code, void *arg); 597#endif /* _AIC79XX_FREEBSD_H_ */ | 603void ahd_done(struct ahd_softc *ahd, struct scb *scb); 604void ahd_send_async(struct ahd_softc *, char /*channel*/, 605 u_int /*target*/, u_int /*lun*/, ac_code, void *arg); 606#endif /* _AIC79XX_FREEBSD_H_ */ |