Revision a8170e5e hw/usb/hcd-ehci.c
b/hw/usb/hcd-ehci.c | ||
---|---|---|
503 | 503 |
return nr2str(ehci_state_names, ARRAY_SIZE(ehci_state_names), state); |
504 | 504 |
} |
505 | 505 |
|
506 |
static const char *addr2str(target_phys_addr_t addr)
|
|
506 |
static const char *addr2str(hwaddr addr)
|
|
507 | 507 |
{ |
508 | 508 |
return nr2str(ehci_mmio_names, ARRAY_SIZE(ehci_mmio_names), |
509 | 509 |
addr + OPREGBASE); |
... | ... | |
663 | 663 |
return async ? s->a_fetch_addr : s->p_fetch_addr; |
664 | 664 |
} |
665 | 665 |
|
666 |
static void ehci_trace_qh(EHCIQueue *q, target_phys_addr_t addr, EHCIqh *qh)
|
|
666 |
static void ehci_trace_qh(EHCIQueue *q, hwaddr addr, EHCIqh *qh)
|
|
667 | 667 |
{ |
668 | 668 |
/* need three here due to argument count limits */ |
669 | 669 |
trace_usb_ehci_qh_ptrs(q, addr, qh->next, |
... | ... | |
681 | 681 |
(bool)(qh->epchar & QH_EPCHAR_I)); |
682 | 682 |
} |
683 | 683 |
|
684 |
static void ehci_trace_qtd(EHCIQueue *q, target_phys_addr_t addr, EHCIqtd *qtd)
|
|
684 |
static void ehci_trace_qtd(EHCIQueue *q, hwaddr addr, EHCIqtd *qtd)
|
|
685 | 685 |
{ |
686 | 686 |
/* need three here due to argument count limits */ |
687 | 687 |
trace_usb_ehci_qtd_ptrs(q, addr, qtd->next, qtd->altnext); |
... | ... | |
698 | 698 |
(bool)(qtd->token & QTD_TOKEN_XACTERR)); |
699 | 699 |
} |
700 | 700 |
|
701 |
static void ehci_trace_itd(EHCIState *s, target_phys_addr_t addr, EHCIitd *itd)
|
|
701 |
static void ehci_trace_itd(EHCIState *s, hwaddr addr, EHCIitd *itd)
|
|
702 | 702 |
{ |
703 | 703 |
trace_usb_ehci_itd(addr, itd->next, |
704 | 704 |
get_field(itd->bufptr[1], ITD_BUFPTR_MAXPKT), |
... | ... | |
707 | 707 |
get_field(itd->bufptr[0], ITD_BUFPTR_DEVADDR)); |
708 | 708 |
} |
709 | 709 |
|
710 |
static void ehci_trace_sitd(EHCIState *s, target_phys_addr_t addr,
|
|
710 |
static void ehci_trace_sitd(EHCIState *s, hwaddr addr,
|
|
711 | 711 |
EHCIsitd *sitd) |
712 | 712 |
{ |
713 | 713 |
trace_usb_ehci_sitd(addr, sitd->next, |
... | ... | |
1100 | 1100 |
qemu_bh_cancel(s->async_bh); |
1101 | 1101 |
} |
1102 | 1102 |
|
1103 |
static uint64_t ehci_caps_read(void *ptr, target_phys_addr_t addr,
|
|
1103 |
static uint64_t ehci_caps_read(void *ptr, hwaddr addr,
|
|
1104 | 1104 |
unsigned size) |
1105 | 1105 |
{ |
1106 | 1106 |
EHCIState *s = ptr; |
1107 | 1107 |
return s->caps[addr]; |
1108 | 1108 |
} |
1109 | 1109 |
|
1110 |
static uint64_t ehci_opreg_read(void *ptr, target_phys_addr_t addr,
|
|
1110 |
static uint64_t ehci_opreg_read(void *ptr, hwaddr addr,
|
|
1111 | 1111 |
unsigned size) |
1112 | 1112 |
{ |
1113 | 1113 |
EHCIState *s = ptr; |
... | ... | |
1118 | 1118 |
return val; |
1119 | 1119 |
} |
1120 | 1120 |
|
1121 |
static uint64_t ehci_port_read(void *ptr, target_phys_addr_t addr,
|
|
1121 |
static uint64_t ehci_port_read(void *ptr, hwaddr addr,
|
|
1122 | 1122 |
unsigned size) |
1123 | 1123 |
{ |
1124 | 1124 |
EHCIState *s = ptr; |
... | ... | |
1157 | 1157 |
} |
1158 | 1158 |
} |
1159 | 1159 |
|
1160 |
static void ehci_port_write(void *ptr, target_phys_addr_t addr,
|
|
1160 |
static void ehci_port_write(void *ptr, hwaddr addr,
|
|
1161 | 1161 |
uint64_t val, unsigned size) |
1162 | 1162 |
{ |
1163 | 1163 |
EHCIState *s = ptr; |
... | ... | |
1202 | 1202 |
trace_usb_ehci_portsc_change(addr + PORTSC_BEGIN, addr >> 2, *portsc, old); |
1203 | 1203 |
} |
1204 | 1204 |
|
1205 |
static void ehci_opreg_write(void *ptr, target_phys_addr_t addr,
|
|
1205 |
static void ehci_opreg_write(void *ptr, hwaddr addr,
|
|
1206 | 1206 |
uint64_t val, unsigned size) |
1207 | 1207 |
{ |
1208 | 1208 |
EHCIState *s = ptr; |
Also available in: Unified diff