Changeset 66cb7a2 in mainline for uspace/drv/block/ata_bd/ata_bd.h
- Timestamp:
- 2013-06-27T07:27:53Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a8196c9
- Parents:
- ccf282f
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/block/ata_bd/ata_bd.h
rccf282f r66cb7a2 36 36 #define __ATA_BD_H__ 37 37 38 #include <async.h> 38 39 #include <bd_srv.h> 40 #include <ddf/driver.h> 39 41 #include <sys/types.h> 40 42 #include <fibril_synch.h> 41 43 #include <str.h> 44 #include "ata_hw.h" 45 46 #define NAME "ata_bd" 42 47 43 48 /** Base addresses for ATA I/O blocks. */ … … 96 101 bool present; 97 102 struct ata_ctrl *ctrl; 103 struct ata_fun *afun; 98 104 99 105 /** Device type */ … … 117 123 char model[STR_BOUNDS(40) + 1]; 118 124 119 fibril_mutex_t lock;120 service_id_t service_id;121 125 int disk_id; 122 bd_srvs_t bds;123 126 } disk_t; 124 127 125 128 /** ATA controller */ 126 129 typedef struct ata_ctrl { 130 /** DDF device */ 131 ddf_dev_t *dev; 127 132 /** I/O base address of the command registers */ 128 133 uintptr_t cmd_physical; … … 137 142 /** Per-disk state. */ 138 143 disk_t disk[MAX_DISKS]; 144 145 fibril_mutex_t lock; 139 146 } ata_ctrl_t; 147 148 typedef struct ata_fun { 149 ddf_fun_t *fun; 150 disk_t *disk; 151 bd_srvs_t bds; 152 } ata_fun_t; 153 154 extern int ata_ctrl_init(ata_ctrl_t *); 155 extern int ata_ctrl_remove(ata_ctrl_t *); 156 extern int ata_ctrl_gone(ata_ctrl_t *); 157 158 extern bd_ops_t ata_bd_ops; 140 159 141 160 #endif
Note:
See TracChangeset
for help on using the changeset viewer.