Lines Matching refs:portsc

124 static void print_portsc(int port, uint32_t portsc) {
126 if (portsc & PORTSC_CCS) zxlogf(SPEW, " CCS");
127 if (portsc & PORTSC_PED) zxlogf(SPEW, " PED");
128 if (portsc & PORTSC_OCA) zxlogf(SPEW, " OCA");
129 if (portsc & PORTSC_PR) zxlogf(SPEW, " PR");
130 uint32_t pls = (portsc >> PORTSC_PLS_START) & ((1 << PORTSC_PLS_BITS) - 1);
175 if (portsc & PORTSC_PP) zxlogf(SPEW, " PP");
176 uint32_t speed = (portsc >> PORTSC_SPEED_START) & ((1 << PORTSC_SPEED_BITS) - 1);
191 uint32_t pic = (portsc >> PORTSC_PIC_START) & ((1 << PORTSC_PIC_BITS) - 1);
193 if (portsc & PORTSC_LWS) zxlogf(SPEW, " LWS");
194 if (portsc & PORTSC_CSC) zxlogf(SPEW, " CSC");
195 if (portsc & PORTSC_PEC) zxlogf(SPEW, " PEC");
196 if (portsc & PORTSC_WRC) zxlogf(SPEW, " WRC");
197 if (portsc & PORTSC_OCC) zxlogf(SPEW, " OCC");
198 if (portsc & PORTSC_PRC) zxlogf(SPEW, " PRC");
199 if (portsc & PORTSC_PLC) zxlogf(SPEW, " PLC");
200 if (portsc & PORTSC_CEC) zxlogf(SPEW, " CEC");
201 if (portsc & PORTSC_CAS) zxlogf(SPEW, " CAS");
202 if (portsc & PORTSC_WCE) zxlogf(SPEW, " WCE");
203 if (portsc & PORTSC_WDE) zxlogf(SPEW, " WDE");
204 if (portsc & PORTSC_WOE) zxlogf(SPEW, " WOE");
205 if (portsc & PORTSC_DR) zxlogf(SPEW, " DR");
206 if (portsc & PORTSC_WPR) zxlogf(SPEW, " WPR");
211 volatile uint32_t* portsc = &xhci->op_regs->port_regs[rh_port_index].portsc;
212 uint32_t temp = XHCI_READ32(portsc);
217 XHCI_WRITE32(portsc, temp);
307 uint32_t portsc = XHCI_READ32(&port_regs[i].portsc);
308 portsc &= PORTSC_CONTROL_BITS;
309 portsc |= PORTSC_PED; // disable port
310 portsc &= PORTSC_PP; // power off port
311 XHCI_WRITE32(&port_regs[i].portsc, portsc);
509 uint32_t portsc = XHCI_READ32(&port_regs[i].portsc);
510 uint32_t speed = (portsc & XHCI_MASK(PORTSC_SPEED_START, PORTSC_SPEED_BITS)) >> PORTSC_SPEED_START;
511 uint32_t status_bits = portsc & PORTSC_STATUS_BITS;
514 print_portsc(i, portsc);
518 bool connected = !!(portsc & PORTSC_CCS);
519 bool enabled = !!(portsc & PORTSC_PED);
522 XHCI_WRITE32(&port_regs[i].portsc, (portsc & PORTSC_CONTROL_BITS) | status_bits);
530 if (portsc & PORTSC_CSC) {
543 if (portsc & PORTSC_PRC) {