Changeset 645d3832 in mainline for uspace/drv/block/pci-ide/pci-ide.h


Ignore:
Timestamp:
2024-06-10T17:29:13Z (4 weeks 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)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/block/pci-ide/pci-ide.h

    r69c376b5 r645d3832  
    4242#include <stdbool.h>
    4343#include <stdint.h>
     44#include "pci-ide_hw.h"
    4445
    4546#define NAME "pci-ide"
     
    7980        uint8_t irq_status;
    8081
     82        /** Physical region descriptor table */
     83        pci_ide_prd_t *prdt;
     84        /** Physical region descriptor table physical address */
     85        uintptr_t prdt_pa;
     86        /** DMA buffer */
     87        void *dma_buf;
     88        /** DMA buffer physical address */
     89        uintptr_t dma_buf_pa;
     90        /** DMA buffer size */
     91        size_t dma_buf_size;
     92        /** Current DMA transfer direction */
     93        ata_dma_dir_t cur_dir;
     94        /** Current data buffer */
     95        void *cur_buf;
     96        /** Current data buffer size */
     97        size_t cur_buf_size;
     98
    8199        /** Libata ATA channel */
    82100        ata_channel_t *channel;
     
    92110        ddf_dev_t *dev;
    93111
     112        /** I/O base address of bus master IDE registers */
     113        uintptr_t bmregs_physical;
     114        /** Bus master IDE registers */
     115        pci_ide_regs_t *bmregs;
    94116        /** Primary and secondary channel */
    95117        pci_ide_channel_t channel[2];
     
    102124} pci_ide_fun_t;
    103125
     126extern errno_t pci_ide_ctrl_init(pci_ide_ctrl_t *, pci_ide_hwres_t *);
     127extern errno_t pci_ide_ctrl_fini(pci_ide_ctrl_t *);
    104128extern errno_t pci_ide_channel_init(pci_ide_ctrl_t *, pci_ide_channel_t *,
    105129    unsigned, pci_ide_hwres_t *);
Note: See TracChangeset for help on using the changeset viewer.