| 680 | } |
| 681 | |
| 682 | static void ide_cmd_write(void *opaque, uint32_t offset, |
| 683 | uint32_t val, int size_log2) |
| 684 | { |
| 685 | IDEIFState *s1 = opaque; |
| 686 | IDEState *s; |
| 687 | int i; |
| 688 | |
| 689 | #ifdef DEBUG_IDE |
| 690 | printf("ide: cmd write=0x%02x\n", val); |
| 691 | #endif |
| 692 | if (!(s1->cmd & IDE_CMD_RESET) && (val & IDE_CMD_RESET)) { |
| 693 | /* low to high */ |
| 694 | for(i = 0; i < 2; i++) { |
| 695 | s = s1->drives[i]; |
| 696 | if (s) { |
| 697 | s->status = BUSY_STAT | SEEK_STAT; |
| 698 | s->error = 0x01; |
| 699 | } |
| 700 | } |
| 701 | } else if ((s1->cmd & IDE_CMD_RESET) && !(val & IDE_CMD_RESET)) { |
| 702 | /* high to low */ |
| 703 | for(i = 0; i < 2; i++) { |
| 704 | s = s1->drives[i]; |
| 705 | if (s) { |
| 706 | s->status = READY_STAT | SEEK_STAT; |
| 707 | ide_set_signature(s); |
| 708 | } |
| 709 | } |
| 710 | } |
| 711 | s1->cmd = val; |
| 712 | } |
| 713 | |
| 714 | static void ide_data_writew(void *opaque, uint32_t offset, |
| 715 | uint32_t val, int size_log2) |
nothing calls this directly
no test coverage detected