Changeset 64cf7a3 in mainline for uspace/drv/block/ata_bd/ata_bd.h
- Timestamp:
- 2024-05-06T18:33:22Z (8 months ago)
- Branches:
- master
- Children:
- 2791fbb7
- Parents:
- 21989e5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/block/ata_bd/ata_bd.h
r21989e5 r64cf7a3 1 1 /* 2 * Copyright (c) 20 09Jiri Svoboda2 * Copyright (c) 2024 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 40 40 #include <ddf/driver.h> 41 41 #include <fibril_synch.h> 42 #include <stdbool.h> 42 43 #include <str.h> 43 44 #include <stdint.h> … … 47 48 #define NAME "ata_bd" 48 49 49 /** Base addresses for ATA I/O blocks.*/50 /** ATA hardware resources */ 50 51 typedef struct { 51 52 uintptr_t cmd; /**< Command block base address. */ 52 53 uintptr_t ctl; /**< Control block base address. */ 53 } ata_base_t; 54 int irq; /**< IRQ */ 55 } ata_hwres_t; 54 56 55 57 /** Timeout definitions. Unit is 10 ms. */ … … 140 142 /** Control registers */ 141 143 ata_ctl_t *ctl; 144 /** IRQ (-1 if not used) */ 145 int irq; 146 /** IRQ handle */ 147 cap_irq_handle_t ihandle; 142 148 143 149 /** Per-disk state. */ 144 150 disk_t disk[MAX_DISKS]; 145 151 152 /** Synchronize controller access */ 146 153 fibril_mutex_t lock; 154 /** Synchronize access to irq_fired/irq_status */ 155 fibril_mutex_t irq_lock; 156 /** Signalled by IRQ handler */ 157 fibril_condvar_t irq_cv; 158 /** Set to true when interrupt occurs */ 159 bool irq_fired; 160 /** Value of status register read by interrupt handler */ 161 uint8_t irq_status; 147 162 } ata_ctrl_t; 148 163 … … 153 168 } ata_fun_t; 154 169 155 extern errno_t ata_ctrl_init(ata_ctrl_t *, ata_ base_t *);170 extern errno_t ata_ctrl_init(ata_ctrl_t *, ata_hwres_t *); 156 171 extern errno_t ata_ctrl_remove(ata_ctrl_t *); 157 172 extern errno_t ata_ctrl_gone(ata_ctrl_t *);
Note:
See TracChangeset
for help on using the changeset viewer.