Changeset 01d5049 in mainline
- Timestamp:
- 2024-06-11T14:56:24Z (3 months ago)
- Branches:
- master
- Children:
- 221daa5
- Parents:
- c4ed9fa
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/block/pci-ide/pci-ide.c
rc4ed9fa r01d5049 81 81 .base = 0, 82 82 .size = sizeof(ata_cmd_t) 83 }, 84 { 85 .base = 0, 86 .size = sizeof(pci_ide_regs_t) 83 87 } 84 88 }; … … 86 90 /** IDE interrupt pseudo code. */ 87 91 static const irq_cmd_t pci_ide_irq_cmds[] = { 92 /* [0] Read BMISX */ 88 93 { 89 94 .cmd = CMD_PIO_READ_8, … … 91 96 .dstarg = 1 92 97 }, 98 /* [1] Test BMISX.IDEINTS */ 99 { 100 .cmd = CMD_AND, 101 .value = bmisx_ideints, 102 .srcarg = 1, 103 .dstarg = 2 104 }, 105 /* [2] if (BMISX.IDEINTS != 0) { */ 106 { 107 .cmd = CMD_PREDICATE, 108 .srcarg = 2, 109 .value = 3 110 }, 111 /* 112 * [3] Clear BMISX.IDEINTS by writing 1 to it. This clears bits 6,5, 113 * but that should not matter. 114 */ 115 { 116 .cmd = CMD_PIO_WRITE_8, 117 .addr = NULL, /* will be patched in run-time */ 118 .value = bmisx_ideints 119 }, 120 /* [4] Read IDE status register */ 121 { 122 .cmd = CMD_PIO_READ_8, 123 .addr = NULL, /* will be patched in run-time */ 124 .dstarg = 1 125 }, 126 /* [5] Accept */ 93 127 { 94 128 .cmd = CMD_ACCEPT 95 } 129 }, 130 /* [6] } else { Decline */ 131 { 132 .cmd = CMD_DECLINE 133 } 134 /* } */ 96 135 }; 97 136 … … 329 368 irq_pio_range_t *ranges; 330 369 irq_cmd_t *cmds; 370 uint8_t *bmisx; 331 371 errno_t rc; 332 372 … … 344 384 } 345 385 386 /* Bus master IDE status register (primary or secondary) */ 387 bmisx = chan->chan_id == 0 ? 388 &chan->ctrl->bmregs->bmisp : 389 &chan->ctrl->bmregs->bmiss; 390 346 391 memcpy(ranges, &pci_ide_irq_ranges, sizeof(pci_ide_irq_ranges)); 347 392 ranges[0].base = chan->cmd_physical; 393 ranges[1].base = chan->ctrl->bmregs_physical; 394 348 395 memcpy(cmds, &pci_ide_irq_cmds, sizeof(pci_ide_irq_cmds)); 349 cmds[0].addr = &chan->cmd->status; 396 cmds[0].addr = bmisx; 397 cmds[3].addr = bmisx; 398 cmds[4].addr = &chan->cmd->status; 350 399 351 400 irq_code.rangecount = sizeof(pci_ide_irq_ranges) / sizeof(irq_pio_range_t);
Note:
See TracChangeset
for help on using the changeset viewer.