Changeset ebb1489 in mainline for uspace/lib/ata/include/ata/ata_hw.h


Ignore:
Timestamp:
2024-10-13T08:23:40Z (8 weeks ago)
Author:
GitHub <noreply@…>
Children:
0472cf17
Parents:
2a0c827c (diff), b3b79981 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
boba-buba <120932204+boba-buba@…> (2024-10-13 08:23:40)
git-committer:
GitHub <noreply@…> (2024-10-13 08:23:40)
Message:

Merge branch 'HelenOS:master' into topic/packet-capture

File:
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/lib/ata/include/ata/ata_hw.h

    r2a0c827c rebb1489  
    11/*
    2  * Copyright (c) 2009 Jiri Svoboda
     2 * Copyright (c) 2024 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    2727 */
    2828
    29 /** @addtogroup ata_bd
     29/** @addtogroup libata
    3030 * @{
    3131 */
     
    3333 */
    3434
    35 #ifndef __ATA_HW_H__
    36 #define __ATA_HW_H__
    37 
     35#ifndef LIBATA_ATA_HW_H
     36#define LIBATA_ATA_HW_H
     37
     38#include <stddef.h>
    3839#include <stdint.h>
    3940
     
    4849
    4950enum {
    50         MAX_DISKS       = 2
     51        MAX_DEVICES     = 2
    5152};
    5253
     
    9697        };
    9798} ata_ctl_t;
     99
     100#define REG_SECTOR_COUNT offsetof(ata_cmd_t, sector_count)
     101#define REG_SECTOR_NUMBER offsetof(ata_cmd_t, sector_number)
     102#define REG_CYLINDER_LOW offsetof(ata_cmd_t, cylinder_low)
     103#define REG_CYLINDER_HIGH offsetof(ata_cmd_t, cylinder_high)
     104#define REG_DRIVE_HEAD offsetof(ata_cmd_t, drive_head)
     105#define REG_STATUS offsetof(ata_cmd_t, status)
     106#define REG_COMMAND offsetof(ata_cmd_t, command)
     107#define REG_FEATURES offsetof(ata_cmd_t, features)
    98108
    99109enum devctl_bits {
     
    132142        CMD_READ_SECTORS        = 0x20,
    133143        CMD_READ_SECTORS_EXT    = 0x24,
     144        CMD_READ_DMA_EXT        = 0x25,
    134145        CMD_WRITE_SECTORS       = 0x30,
    135146        CMD_WRITE_SECTORS_EXT   = 0x34,
     147        CMD_WRITE_DMA_EXT       = 0x35,
    136148        CMD_PACKET              = 0xA0,
    137149        CMD_IDENTIFY_PKT_DEV    = 0xA1,
     150        CMD_READ_DMA            = 0xC8,
     151        CMD_WRITE_DMA           = 0xCA,
    138152        CMD_IDENTIFY_DRIVE      = 0xEC,
    139153        CMD_FLUSH_CACHE         = 0xE7
Note: See TracChangeset for help on using the changeset viewer.