-struct ata_channel_s {
- u16 iobase1; // IO Base 1
- u16 iobase2; // IO Base 2
- u16 pci_bdf;
- u8 irq; // IRQ
-};
-
-struct ata_device_s {
- u8 type; // Detected type of ata (ata/atapi/none/unknown)
- u8 device; // Detected type of attached devices (hd/cd/none)
- u8 removable; // Removable device flag
- u8 lock; // Locks for removable devices
- u8 mode; // transfer mode : PIO 16/32 bits - IRQ - ISADMA - PCIDMA
- u16 blksize; // block size
-
- u8 translation; // type of translation
- struct chs_s lchs; // Logical CHS
- struct chs_s pchs; // Physical CHS
-
- u64 sectors; // Total sectors count
-};
-
-struct ata_s {
- // ATA channels info
- struct ata_channel_s channels[CONFIG_MAX_ATA_INTERFACES];
-
- // ATA devices info
- struct ata_device_s devices[CONFIG_MAX_ATA_DEVICES];
- //
- // map between bios hd/cd id and ata channels
- u8 hdcount, cdcount;
- u8 idmap[2][CONFIG_MAX_ATA_DEVICES];
-
- // Buffer for DPTE table
- struct dpte_s dpte;
-
- // Count of transferred sectors and bytes
- u16 trsfsectors;
-};
-