Lines Matching refs:portsc
695 uint32_t *portsc = &s->portsc[port->index]; in ehci_attach() local
696 const char *owner = (*portsc & PORTSC_POWNER) ? "comp" : "ehci"; in ehci_attach()
700 if (*portsc & PORTSC_POWNER) { in ehci_attach()
707 *portsc |= PORTSC_CONNECT; in ehci_attach()
708 *portsc |= PORTSC_CSC; in ehci_attach()
716 uint32_t *portsc = &s->portsc[port->index]; in ehci_detach() local
717 const char *owner = (*portsc & PORTSC_POWNER) ? "comp" : "ehci"; in ehci_detach()
721 if (*portsc & PORTSC_POWNER) { in ehci_detach()
729 *portsc &= ~PORTSC_POWNER; in ehci_detach()
736 *portsc &= ~(PORTSC_CONNECT|PORTSC_PED|PORTSC_SUSPEND); in ehci_detach()
737 *portsc |= PORTSC_CSC; in ehci_detach()
745 uint32_t portsc = s->portsc[port->index]; in ehci_child_detach() local
747 if (portsc & PORTSC_POWNER) { in ehci_child_detach()
760 uint32_t *portsc = &s->portsc[port->index]; in ehci_wakeup() local
762 if (*portsc & PORTSC_POWNER) { in ehci_wakeup()
770 if (*portsc & PORTSC_SUSPEND) { in ehci_wakeup()
772 *portsc |= PORTSC_FPRES; in ehci_wakeup()
807 s->portsc[firstport + i] = PORTSC_POWNER; in ehci_register_companion()
818 uint32_t portsc = s->portsc[ep->dev->port->index]; in ehci_wakeup_endpoint() local
820 if (portsc & PORTSC_POWNER) { in ehci_wakeup_endpoint()
836 if (!(ehci->portsc[i] & PORTSC_PED)) { in ehci_find_device()
869 memset(&s->portsc, 0x00, sizeof(s->portsc)); in ehci_reset()
882 s->portsc[i] = PORTSC_POWNER | PORTSC_PPOWER; in ehci_reset()
884 s->portsc[i] = PORTSC_PPOWER; in ehci_reset()
934 val = s->portsc[addr >> 2]; in ehci_port_read()
942 uint32_t *portsc = &s->portsc[port]; in handle_port_owner_write() local
949 orig = *portsc & PORTSC_POWNER; in handle_port_owner_write()
959 *portsc &= ~PORTSC_POWNER; in handle_port_owner_write()
960 *portsc |= owner; in handle_port_owner_write()
972 uint32_t *portsc = &s->portsc[port]; in ehci_port_write() local
973 uint32_t old = *portsc; in ehci_port_write()
979 *portsc &= ~(val & PORTSC_RWC_MASK); in ehci_port_write()
981 *portsc &= val | ~PORTSC_PED; in ehci_port_write()
987 if ((val & PORTSC_PRESET) && !(*portsc & PORTSC_PRESET)) { in ehci_port_write()
991 if (!(val & PORTSC_PRESET) &&(*portsc & PORTSC_PRESET)) { in ehci_port_write()
995 *portsc &= ~PORTSC_CSC; in ehci_port_write()
1007 if ((val & PORTSC_SUSPEND) && !(*portsc & PORTSC_SUSPEND)) { in ehci_port_write()
1010 if (!(val & PORTSC_FPRES) && (*portsc & PORTSC_FPRES)) { in ehci_port_write()
1015 *portsc &= ~PORTSC_RO_MASK; in ehci_port_write()
1016 *portsc |= val; in ehci_port_write()
1017 trace_usb_ehci_portsc_change(addr + s->portscbase, addr >> 2, *portsc, old); in ehci_port_write()
1241 uint32_t portsc = s->portsc[port->index]; in ehci_async_complete_packet() local
1243 if (portsc & PORTSC_POWNER) { in ehci_async_complete_packet()
2436 if (s->portsc[i] & PORTSC_POWNER) { in usb_ehci_post_load()
2490 VMSTATE_UINT32(portsc[0], EHCIState),
2491 VMSTATE_UINT32(portsc[1], EHCIState),
2492 VMSTATE_UINT32(portsc[2], EHCIState),
2493 VMSTATE_UINT32(portsc[3], EHCIState),
2494 VMSTATE_UINT32(portsc[4], EHCIState),
2495 VMSTATE_UINT32(portsc[5], EHCIState),