Changeset 3de67b4c in mainline for uspace/drv/block/ata_bd/ata_bd.c
- Timestamp:
- 2013-06-27T20:43:29Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 4339f09
- Parents:
- 9f391e9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/block/ata_bd/ata_bd.c
r9f391e9 r3de67b4c 81 81 */ 82 82 static const size_t identify_data_size = 512; 83 84 /** I/O base addresses for legacy (ISA-compatible) controllers. */85 static ata_base_t legacy_base[LEGACY_CTLS] = {86 { 0x1f0, 0x3f0 },87 { 0x170, 0x370 },88 { 0x1e8, 0x3e8 },89 { 0x168, 0x368 }90 };91 83 92 84 static int ata_bd_init_io(ata_ctrl_t *ctrl); … … 145 137 146 138 /** Initialize ATA controller. */ 147 int ata_ctrl_init(ata_ctrl_t *ctrl )139 int ata_ctrl_init(ata_ctrl_t *ctrl, ata_base_t *res) 148 140 { 149 141 int i, rc; 150 142 int n_disks; 151 unsigned ctl_num;152 143 153 144 ddf_msg(LVL_DEBUG, "ata_ctrl_init()"); 154 145 155 ctl_num = 1;156 157 146 fibril_mutex_initialize(&ctrl->lock); 158 ctrl->cmd_physical = legacy_base[ctl_num - 1].cmd;159 ctrl->ctl_physical = legacy_base[ctl_num - 1].ctl;147 ctrl->cmd_physical = res->cmd; 148 ctrl->ctl_physical = res->ctl; 160 149 161 150 ddf_msg(LVL_NOTE, "I/O address %p/%p", (void *) ctrl->cmd_physical,
Note:
See TracChangeset
for help on using the changeset viewer.