Changeset dd0c8a0 in mainline for uspace/drv/block/ata_bd/ata_bd.h
- Timestamp:
- 2013-09-29T06:56:33Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a9bd960d
- Parents:
- 3deb0155 (diff), 13be2583 (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. - File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/block/ata_bd/ata_bd.h
r3deb0155 rdd0c8a0 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. */ … … 95 100 typedef struct { 96 101 bool present; 102 struct ata_ctrl *ctrl; 103 struct ata_fun *afun; 97 104 98 105 /** Device type */ … … 116 123 char model[STR_BOUNDS(40) + 1]; 117 124 125 int disk_id; 126 } disk_t; 127 128 /** ATA controller */ 129 typedef struct ata_ctrl { 130 /** DDF device */ 131 ddf_dev_t *dev; 132 /** I/O base address of the command registers */ 133 uintptr_t cmd_physical; 134 /** I/O base address of the control registers */ 135 uintptr_t ctl_physical; 136 137 /** Command registers */ 138 ata_cmd_t *cmd; 139 /** Control registers */ 140 ata_ctl_t *ctl; 141 142 /** Per-disk state. */ 143 disk_t disk[MAX_DISKS]; 144 118 145 fibril_mutex_t lock; 119 service_id_t service_id; 120 int disk_id; 146 } ata_ctrl_t; 147 148 typedef struct ata_fun { 149 ddf_fun_t *fun; 150 disk_t *disk; 121 151 bd_srvs_t bds; 122 } disk_t; 152 } ata_fun_t; 153 154 extern int ata_ctrl_init(ata_ctrl_t *, ata_base_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; 123 159 124 160 #endif
Note:
See TracChangeset
for help on using the changeset viewer.