3 #define ACME_ROADRUNNER 1 /* 504MB classic IDE drive */
4 #define ACME_COYOTE 2 /* 20MB early IDE drive */
5 #define ACME_NEMESIS 3 /* 20MB LBA capable drive */
6 #define ACME_ULTRASONICUS 4 /* 40MB LBA capable drive */
7 #define ACME_ACCELLERATTI 5 /* 128MB LBA capable drive */
8 #define ACME_ZIPPIBUS 6 /* 256MB LBA capable drive */
10 #define MAX_DRIVE_TYPE 6
14 #define ide_feature_w 1
15 #define ide_sec_count 2
22 #define ide_dev_head 6
24 #define ide_status_r 7
25 #define ide_command_w 7
27 #define ide_devctrl_w 8
28 #define ide_data_latch 9
42 struct ide_drive *drive;
46 struct ide_controller *controller;
47 struct ide_taskfile taskfile;
48 unsigned int present:1, intrq:1, failed:1, lba:1, eightbit:1;
50 uint8_t heads, sectors;
52 uint16_t identify[256];
60 struct ide_controller {
61 struct ide_drive drive[2];
67 //extern ide_controller idectrl;
68 extern const uint8_t ide_magic[8];
70 void ide_reset_begin(struct ide_controller *c);
71 uint8_t ide_read8(struct ide_controller *c, uint8_t r);
72 void ide_write8(struct ide_controller *c, uint8_t r, uint8_t v);
73 uint16_t ide_read16(struct ide_controller *c, uint8_t r);
74 void ide_write16(struct ide_controller *c, uint8_t r, uint16_t v);
75 uint8_t ide_read_latched(struct ide_controller *c, uint8_t r);
76 void ide_write_latched(struct ide_controller *c, uint8_t r, uint8_t v);
78 struct ide_controller *ide_allocate(const char *name);
79 int ide_attach(struct ide_controller *c, int drive, int fd);
80 void ide_detach(struct ide_drive *d);
81 void ide_free(struct ide_controller *c);
83 int ide_make_drive(uint8_t type, int fd);