summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorMartin Dalecki <dalecki@evision-ventures.com>2002-05-31 04:44:39 -0700
committerLinus Torvalds <torvalds@home.transmeta.com>2002-05-31 04:44:39 -0700
commit77da0c5c47be22b6723cf0b0e6663d1bfc3776bd (patch)
treebbfdcb4a2edc70bc4bd240b1c7778ee72a45ea07 /include/linux
parentc2a84d00f6dbb6c8edcc2bc0a92d5e4329773f33 (diff)
[PATCH] 2.5.19 IDE 77
- Get rid of SELECT_DRIVE macro. Start to move all direct hardware access functions in to one place. - Get rid of SELECT_MASK macro. Realize that the mask is always equal 0. Simplify the maskproc therefore. - Get rid of GET_STAT and OK_STAT macros as well. - hpt366 cleanups by Andrej Panin. - Artop driver update by Franz Sirl.
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/ide.h31
1 files changed, 13 insertions, 18 deletions
diff --git a/include/linux/ide.h b/include/linux/ide.h
index b9abcdae096c..f9b112fa19b2 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -112,8 +112,6 @@ enum {
#define GET_ALTSTAT() IN_BYTE(IDE_CONTROL_REG)
#define GET_FEAT() IN_BYTE(IDE_NSECTOR_REG)
-#define OK_STAT(stat,good,bad) (((stat)&((good)|(bad)))==(good))
-
#define BAD_R_STAT (BUSY_STAT | ERR_STAT)
#define BAD_W_STAT (BAD_R_STAT | WRERR_STAT)
#define BAD_STAT (BAD_R_STAT | DRQ_STAT)
@@ -157,19 +155,6 @@ enum {
#define WAIT_CMD (10*HZ) /* 10sec - maximum wait for an IRQ to happen */
#define WAIT_MIN_SLEEP (2*HZ/100) /* 20msec - minimum sleep time */
-#define SELECT_DRIVE(channel, drive) \
-{ \
- if (channel->selectproc) \
- channel->selectproc(drive); \
- OUT_BYTE((drive)->select.all, channel->io_ports[IDE_SELECT_OFFSET]); \
-}
-
-#define SELECT_MASK(channel, drive, mask) \
-{ \
- if (channel->maskproc) \
- channel->maskproc(drive,mask); \
-}
-
/*
* Check for an interrupt and acknowledge the interrupt status
*/
@@ -359,8 +344,12 @@ struct ata_device {
unsigned ata_flash : 1; /* 1=present, 0=default */
unsigned addressing; /* : 2; 0=28-bit, 1=48-bit, 2=64-bit */
byte scsi; /* 0=default, 1=skip current ide-subdriver for ide-scsi emulation */
+
select_t select; /* basic drive/head select reg value */
- byte ctl; /* "normal" value for IDE_CONTROL_REG */
+
+ u8 ctl; /* "normal" value for IDE_CONTROL_REG */
+ u8 status; /* last retrived status value for device */
+
byte ready_stat; /* min status value for drive ready */
byte mult_count; /* current multiple sector setting */
byte bad_wstat; /* used for ignoring WRERR_STAT */
@@ -485,7 +474,7 @@ struct ata_channel {
void (*intrproc) (struct ata_device *);
/* special host masking for drive selection */
- void (*maskproc) (struct ata_device *, int);
+ void (*maskproc) (struct ata_device *);
/* check host's drive quirk list */
int (*quirkproc) (struct ata_device *);
@@ -730,7 +719,7 @@ extern int ide_do_drive_cmd(struct ata_device *, struct request *, ide_action_t)
/*
* Clean up after success/failure of an explicit drive cmd.
*/
-extern void ide_end_drive_cmd(struct ata_device *, struct request *, u8, u8);
+extern void ide_end_drive_cmd(struct ata_device *, struct request *, u8);
struct ata_taskfile {
struct hd_drive_task_hdr taskfile;
@@ -902,4 +891,10 @@ extern spinlock_t ide_lock;
extern int drive_is_ready(struct ata_device *drive);
+/* Low level device access functions. */
+
+extern void ata_select(struct ata_device *, unsigned long);
+extern void ata_mask(struct ata_device *);
+extern int ata_status(struct ata_device *, u8, u8);
+
#endif