Deleted Added
sdiff udiff text old ( 74250 ) new ( 74302 )
full compact
1/*-
2 * Copyright (c) 1998,1999,2000,2001 S�ren Schmidt
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 *
28 * $FreeBSD: head/sys/dev/ata/ata-all.h 74302 2001-03-15 15:36:25Z sos $
29 */
30
31/* ATA register defines */
32#define ATA_DATA 0x00 /* data register */
33#define ATA_ERROR 0x01 /* (R) error register */
34#define ATA_E_NM 0x02 /* no media */
35#define ATA_E_ABORT 0x04 /* command aborted */
36#define ATA_E_MCR 0x08 /* media change request */

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

144#define ATA_BMDTP_PORT 0x04
145
146/* structure for holding DMA address data */
147struct ata_dmaentry {
148 u_int32_t base;
149 u_int32_t count;
150};
151
152/* structure describing an ATA device */
153struct ata_softc {
154 struct device *dev; /* device handle */
155 int channel; /* channel on this controller */
156 struct resource *r_io; /* io addr resource handle */
157 struct resource *r_altio; /* altio addr resource handle */
158 struct resource *r_bmio; /* bmio addr resource handle */
159 struct resource *r_irq; /* interrupt of this channel */
160 void *ih; /* interrupt handle */
161 int (*intr_func)(struct ata_softc *); /* interrupt function */
162 u_int32_t chiptype; /* pciid of controller chip */
163 u_int32_t alignment; /* dma engine min alignment */
164 char *dev_name[2]; /* name of device */
165 struct ata_params *dev_param[2]; /* ptr to devices params */
166 void *dev_softc[2]; /* ptr to devices softc's */
167 int mode[2]; /* transfer mode for devices */
168 int flags; /* controller flags */
169#define ATA_DMA_ACTIVE 0x01
170#define ATA_ATAPI_DMA_RO 0x02
171#define ATA_USE_16BIT 0x04
172#define ATA_NO_SLAVE 0x08
173#define ATA_QUEUED 0x10
174
175 int devices; /* what is present */

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

205int ata_resume(device_t);
206
207void ata_start(struct ata_softc *);
208void ata_reset(struct ata_softc *);
209int ata_reinit(struct ata_softc *);
210int ata_wait(struct ata_softc *, int, u_int8_t);
211int ata_command(struct ata_softc *, int, u_int8_t, u_int16_t, u_int8_t, u_int8_t, u_int8_t, u_int8_t, int);
212int ata_printf(struct ata_softc *, int, const char *, ...) __printflike(3, 4);
213void ata_set_name(struct ata_softc *, int, char *);
214void ata_free_name(struct ata_softc *, int);
215int ata_get_lun(u_int32_t *);
216int ata_test_lun(u_int32_t *, int);
217void ata_free_lun(u_int32_t *, int);
218char *ata_mode2str(int);
219int ata_pio2mode(int);
220int ata_pmode(struct ata_params *);
221int ata_wmode(struct ata_params *);
222int ata_umode(struct ata_params *);

--- 44 unchanged lines hidden ---