Lines Matching refs:cmd
418 int cmd, sector, addr; in via1_rtc_update() local
453 trace_via1_rtc_internal_status(v1s->cmd, v1s->alt, v1s->data_out); in via1_rtc_update()
455 if (v1s->cmd == REG_EMPTY) { in via1_rtc_update()
457 cmd = via1_rtc_compact_cmd(v1s->data_out); in via1_rtc_update()
458 trace_via1_rtc_internal_cmd(cmd); in via1_rtc_update()
460 if (cmd == REG_INVALID) { in via1_rtc_update()
465 if (cmd & 0x80) { /* this is a read command */ in via1_rtc_update()
466 switch (cmd & 0x7f) { in via1_rtc_update()
476 v1s->data_in = (time >> ((cmd & 0x03) << 3)) & 0xff; in via1_rtc_update()
478 trace_via1_rtc_cmd_seconds_read((cmd & 0x7f) - REG_0, in via1_rtc_update()
483 v1s->data_in = v1s->PRAM[(cmd & 0x7f) - REG_PRAM_ADDR]; in via1_rtc_update()
485 trace_via1_rtc_cmd_pram_read((cmd & 0x7f) - REG_PRAM_ADDR, in via1_rtc_update()
493 trace_via1_rtc_internal_set_cmd(cmd); in via1_rtc_update()
494 v1s->cmd = cmd; in via1_rtc_update()
504 if (cmd == REG_WPROTECT || !v1s->wprotect) { in via1_rtc_update()
505 trace_via1_rtc_internal_set_cmd(cmd); in via1_rtc_update()
506 v1s->cmd = cmd; in via1_rtc_update()
508 trace_via1_rtc_internal_ignore_cmd(cmd); in via1_rtc_update()
515 switch (v1s->cmd & 0x7f) { in via1_rtc_update()
518 trace_via1_rtc_cmd_seconds_write(v1s->cmd - REG_0, v1s->data_out); in via1_rtc_update()
519 v1s->cmd = REG_EMPTY; in via1_rtc_update()
524 v1s->cmd = REG_EMPTY; in via1_rtc_update()
530 v1s->cmd = REG_EMPTY; in via1_rtc_update()
534 trace_via1_rtc_cmd_pram_write(v1s->cmd - REG_PRAM_ADDR, in via1_rtc_update()
536 v1s->PRAM[v1s->cmd - REG_PRAM_ADDR] = v1s->data_out; in via1_rtc_update()
538 v1s->cmd = REG_EMPTY; in via1_rtc_update()
542 sector = (v1s->cmd & 0x7f) - REG_PRAM_SECT; in via1_rtc_update()
543 if (v1s->cmd & 0x80) { in via1_rtc_update()
550 v1s->cmd = REG_EMPTY; in via1_rtc_update()
565 g_assert(REG_PRAM_SECT <= v1s->cmd && v1s->cmd <= REG_PRAM_SECT_LAST); in via1_rtc_update()
566 sector = v1s->cmd - REG_PRAM_SECT; in via1_rtc_update()
572 v1s->cmd = REG_EMPTY; in via1_rtc_update()
640 uint8_t cmd = data & 0xc; in adb_via_send_len() local
643 switch (cmd) { in adb_via_send_len()
1224 v1s->cmd = REG_EMPTY; in mos6522_q800_via1_reset_hold()
1306 VMSTATE_UINT8(cmd, MOS6522Q800VIA1State),