Deleted Added
sdiff udiff text old ( 150535 ) new ( 152919 )
full compact
1/*-
2 * Copyright (c) 2002 Adaptec Inc.
3 * All rights reserved.
4 *
5 * Written by: David Jeffery
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 11 unchanged lines hidden (view full) ---

20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 *
28 * $FreeBSD: head/sys/dev/ips/ips.h 152919 2005-11-29 09:39:41Z scottl $
29 */
30#ifndef _IPS_H
31#define _IPS_H
32
33#ifdef _KERNEL
34
35#include <sys/param.h>
36#include <sys/systm.h>
37#include <sys/kernel.h>
38#include <sys/module.h>
39#include <sys/bus.h>
40#include <sys/conf.h>
41#include <sys/types.h>
42#include <sys/queue.h>
43#include <sys/bio.h>
44#include <sys/malloc.h>
45#include <sys/mutex.h>
46#include <sys/sema.h>
47#include <sys/time.h>
48
49#include <machine/bus.h>
50#include <sys/rman.h>
51#include <machine/resource.h>
52
53MALLOC_DECLARE(M_IPSBUF);
54
55/*
56 * IPS MACROS
57 */
58
59#define ips_read_1(sc,offset) bus_space_read_1(sc->bustag, sc->bushandle, offset)
60#define ips_read_2(sc,offset) bus_space_read_2(sc->bustag, sc->bushandle, offset)
61#define ips_read_4(sc,offset) bus_space_read_4(sc->bustag, sc->bushandle, offset)
62
63#define ips_write_1(sc,offset,value) bus_space_write_1(sc->bustag, sc->bushandle, offset, value)

--- 15 unchanged lines hidden (view full) ---

79#ifndef IPS_DEBUG
80#define DEVICE_PRINTF(x...)
81#define PRINTF(x...)
82#else
83#define DEVICE_PRINTF(level,x...) if(IPS_DEBUG >= level)device_printf(x)
84#define PRINTF(level,x...) if(IPS_DEBUG >= level)printf(x)
85#endif
86
87struct ips_softc;
88
89typedef struct {
90 u_int32_t status[IPS_MAX_CMD_NUM];
91 u_int32_t base_phys_addr;
92 int nextstatus;
93 bus_dma_tag_t dmatag;
94 bus_dmamap_t dmamap;
95} ips_copper_queue_t;
96
97/* used to keep track of current commands to the card */
98typedef struct ips_command{
99 u_int8_t command_number;
100 u_int8_t id;
101 u_int8_t timeout;
102 struct ips_softc * sc;
103 bus_dma_tag_t data_dmatag;
104 bus_dmamap_t data_dmamap;

--- 74 unchanged lines hidden (view full) ---

179extern void ips_morpheus_intr(void *sc);
180extern void ips_issue_morpheus_cmd(ips_command_t *command);
181extern void ips_morpheus_poll(ips_command_t *command);
182extern int ips_copperhead_reinit(ips_softc_t *sc, int force);
183extern void ips_copperhead_intr(void *sc);
184extern void ips_issue_copperhead_cmd(ips_command_t *command);
185extern void ips_copperhead_poll(ips_command_t *command);
186
187#endif
188#endif