Changeset a99cf073 in mainline for uspace/srv/bd/ata_bd/ata_bd.h


Ignore:
Timestamp:
2009-08-22T15:08:43Z (16 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4ef117f8
Parents:
b94334f
Message:

Add LBA-28 addressing support.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/bd/ata_bd/ata_bd.h

    rb94334f ra99cf073  
    116116
    117117enum drive_head_bits {
    118         DHR_DRV         = 0x10
     118        DHR_LBA         = 0x40, /**< Use LBA addressing mode */
     119        DHR_DRV         = 0x10  /**< Select device 1 */
    119120};
    120121
     
    190191} identify_data_t;
    191192
     193enum ata_caps {
     194        cap_iordy       = 0x0800,
     195        cap_iordy_cbd   = 0x0400,
     196        cap_lba         = 0x0200,
     197        cap_dma         = 0x0100
     198};
     199
     200/** Block addressing mode. */
     201enum addr_mode {
     202        am_chs,
     203        am_lba28
     204};
     205
    192206typedef struct {
    193207        bool present;
    194         unsigned heads;
    195         unsigned cylinders;
    196         unsigned sectors;
     208        enum addr_mode amode;
     209
     210        /*
     211         * Geometry. Only valid if operating in CHS mode.
     212         */
     213        struct {
     214                unsigned heads;
     215                unsigned cylinders;
     216                unsigned sectors;
     217        } geom;
     218
    197219        uint64_t blocks;
    198220
Note: See TracChangeset for help on using the changeset viewer.