Changeset 645d3832 in mainline for uspace/lib/ata/include


Ignore:
Timestamp:
2024-06-10T17:29:13Z (20 months ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master
Children:
a38d504
Parents:
69c376b5
git-author:
Jiri Svoboda <jiri@…> (2024-06-10 17:24:58)
git-committer:
Jiri Svoboda <jiri@…> (2024-06-10 17:29:13)
Message:

Add DMA support to PCI-IDE / libata (register commands)

Location:
uspace/lib/ata/include/ata
Files:
2 edited

Legend:

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

    r69c376b5 r645d3832  
    4747struct ata_device;
    4848
     49/** ATA DMA direction */
     50typedef enum {
     51        /** DMA read */
     52        ata_dma_read,
     53        /** DMA write */
     54        ata_dma_write
     55} ata_dma_dir_t;
     56
    4957/** ATA channel creation parameters */
    5058typedef struct {
     
    5361        /** IRQ is available */
    5462        bool have_irq;
     63        /** Use DMA transfers */
     64        bool use_dma;
    5565        /** Read 16 bits from the data port */
    5666        void (*write_data_16)(void *, uint16_t *, size_t);
     
    6979        /** Disable interrupts */
    7080        errno_t (*irq_disable)(void *);
     81        /** Set up DMA channel */
     82        void (*dma_chan_setup)(void *, void *, size_t, ata_dma_dir_t);
     83        /** Set up DMA channel */
     84        void (*dma_chan_teardown)(void *);
    7185        /** Add new device */
    7286        errno_t (*add_device)(void *, unsigned, void *);
  • uspace/lib/ata/include/ata/ata_hw.h

    r69c376b5 r645d3832  
    141141        CMD_READ_SECTORS        = 0x20,
    142142        CMD_READ_SECTORS_EXT    = 0x24,
     143        CMD_READ_DMA_EXT        = 0x25,
    143144        CMD_WRITE_SECTORS       = 0x30,
    144145        CMD_WRITE_SECTORS_EXT   = 0x34,
     146        CMD_WRITE_DMA_EXT       = 0x35,
    145147        CMD_PACKET              = 0xA0,
    146148        CMD_IDENTIFY_PKT_DEV    = 0xA1,
     149        CMD_READ_DMA            = 0xC8,
     150        CMD_WRITE_DMA           = 0xCA,
    147151        CMD_IDENTIFY_DRIVE      = 0xEC,
    148152        CMD_FLUSH_CACHE         = 0xE7
Note: See TracChangeset for help on using the changeset viewer.