Lines Matching refs:temp

293 	uint8_t temp;  in musbotg_pull_common()  local
295 temp = MUSB2_READ_1(sc, MUSB2_REG_POWER); in musbotg_pull_common()
297 temp |= MUSB2_MASK_SOFTC; in musbotg_pull_common()
299 temp &= ~MUSB2_MASK_SOFTC; in musbotg_pull_common()
301 MUSB2_WRITE_1(sc, MUSB2_REG_POWER, temp); in musbotg_pull_common()
330 uint8_t temp; in musbotg_suspend_host() local
336 temp = MUSB2_READ_1(sc, MUSB2_REG_POWER); in musbotg_suspend_host()
337 temp |= MUSB2_MASK_SUSPMODE; in musbotg_suspend_host()
338 MUSB2_WRITE_1(sc, MUSB2_REG_POWER, temp); in musbotg_suspend_host()
345 uint8_t temp; in musbotg_wakeup_host() local
351 temp = MUSB2_READ_1(sc, MUSB2_REG_POWER); in musbotg_wakeup_host()
352 temp &= ~MUSB2_MASK_SUSPMODE; in musbotg_wakeup_host()
353 temp |= MUSB2_MASK_RESUME; in musbotg_wakeup_host()
354 MUSB2_WRITE_1(sc, MUSB2_REG_POWER, temp); in musbotg_wakeup_host()
360 temp = MUSB2_READ_1(sc, MUSB2_REG_POWER); in musbotg_wakeup_host()
361 temp &= ~MUSB2_MASK_RESUME; in musbotg_wakeup_host()
362 MUSB2_WRITE_1(sc, MUSB2_REG_POWER, temp); in musbotg_wakeup_host()
370 uint8_t temp; in musbotg_wakeup_peer() local
376 temp = MUSB2_READ_1(sc, MUSB2_REG_POWER); in musbotg_wakeup_peer()
377 temp |= MUSB2_MASK_RESUME; in musbotg_wakeup_peer()
378 MUSB2_WRITE_1(sc, MUSB2_REG_POWER, temp); in musbotg_wakeup_peer()
384 temp = MUSB2_READ_1(sc, MUSB2_REG_POWER); in musbotg_wakeup_peer()
385 temp &= ~MUSB2_MASK_RESUME; in musbotg_wakeup_peer()
386 MUSB2_WRITE_1(sc, MUSB2_REG_POWER, temp); in musbotg_wakeup_peer()
700 uint32_t temp; in musbotg_dev_ctrl_data_rx() local
710 temp = count & ~3; in musbotg_dev_ctrl_data_rx()
712 if (temp) { in musbotg_dev_ctrl_data_rx()
716 temp / 4); in musbotg_dev_ctrl_data_rx()
718 temp = count & 3; in musbotg_dev_ctrl_data_rx()
719 if (temp) { in musbotg_dev_ctrl_data_rx()
723 (void *)(&sc->sc_bounce_buf[count / 4]), temp); in musbotg_dev_ctrl_data_rx()
740 temp = buf_res.length & ~3; in musbotg_dev_ctrl_data_rx()
743 count -= temp; in musbotg_dev_ctrl_data_rx()
744 td->offset += temp; in musbotg_dev_ctrl_data_rx()
745 td->remainder -= temp; in musbotg_dev_ctrl_data_rx()
816 uint32_t temp; in musbotg_dev_ctrl_data_tx() local
829 temp = count & ~3; in musbotg_dev_ctrl_data_tx()
831 if (temp) { in musbotg_dev_ctrl_data_tx()
835 temp / 4); in musbotg_dev_ctrl_data_tx()
837 temp = count & 3; in musbotg_dev_ctrl_data_tx()
838 if (temp) { in musbotg_dev_ctrl_data_tx()
842 ((void *)&sc->sc_bounce_buf[count / 4]), temp); in musbotg_dev_ctrl_data_tx()
856 temp = buf_res.length & ~3; in musbotg_dev_ctrl_data_tx()
859 count -= temp; in musbotg_dev_ctrl_data_tx()
860 td->offset += temp; in musbotg_dev_ctrl_data_tx()
861 td->remainder -= temp; in musbotg_dev_ctrl_data_tx()
988 uint32_t temp; in musbotg_host_ctrl_data_rx() local
998 temp = count & ~3; in musbotg_host_ctrl_data_rx()
1000 if (temp) { in musbotg_host_ctrl_data_rx()
1004 temp / 4); in musbotg_host_ctrl_data_rx()
1006 temp = count & 3; in musbotg_host_ctrl_data_rx()
1007 if (temp) { in musbotg_host_ctrl_data_rx()
1011 (void *)(&sc->sc_bounce_buf[count / 4]), temp); in musbotg_host_ctrl_data_rx()
1028 temp = buf_res.length & ~3; in musbotg_host_ctrl_data_rx()
1031 count -= temp; in musbotg_host_ctrl_data_rx()
1032 td->offset += temp; in musbotg_host_ctrl_data_rx()
1033 td->remainder -= temp; in musbotg_host_ctrl_data_rx()
1162 uint32_t temp; in musbotg_host_ctrl_data_tx() local
1175 temp = count & ~3; in musbotg_host_ctrl_data_tx()
1177 if (temp) { in musbotg_host_ctrl_data_tx()
1181 sc->sc_bounce_buf, temp / 4); in musbotg_host_ctrl_data_tx()
1183 temp = count & 3; in musbotg_host_ctrl_data_tx()
1184 if (temp) { in musbotg_host_ctrl_data_tx()
1188 ((void *)&sc->sc_bounce_buf[count / 4]), temp); in musbotg_host_ctrl_data_tx()
1202 temp = buf_res.length & ~3; in musbotg_host_ctrl_data_tx()
1205 count -= temp; in musbotg_host_ctrl_data_tx()
1206 td->offset += temp; in musbotg_host_ctrl_data_tx()
1207 td->remainder -= temp; in musbotg_host_ctrl_data_tx()
1498 uint32_t temp; in musbotg_dev_data_rx() local
1508 temp = count & ~3; in musbotg_dev_data_rx()
1510 if (temp) { in musbotg_dev_data_rx()
1514 temp / 4); in musbotg_dev_data_rx()
1516 temp = count & 3; in musbotg_dev_data_rx()
1517 if (temp) { in musbotg_dev_data_rx()
1521 ((void *)&sc->sc_bounce_buf[count / 4]), temp); in musbotg_dev_data_rx()
1538 temp = buf_res.length & ~3; in musbotg_dev_data_rx()
1541 count -= temp; in musbotg_dev_data_rx()
1542 td->offset += temp; in musbotg_dev_data_rx()
1543 td->remainder -= temp; in musbotg_dev_data_rx()
1622 uint32_t temp; in musbotg_dev_data_tx() local
1635 temp = count & ~3; in musbotg_dev_data_tx()
1637 if (temp) { in musbotg_dev_data_tx()
1641 sc->sc_bounce_buf, temp / 4); in musbotg_dev_data_tx()
1643 temp = count & 3; in musbotg_dev_data_tx()
1644 if (temp) { in musbotg_dev_data_tx()
1648 ((void *)&sc->sc_bounce_buf[count / 4]), temp); in musbotg_dev_data_tx()
1662 temp = buf_res.length & ~3; in musbotg_dev_data_tx()
1665 count -= temp; in musbotg_dev_data_tx()
1666 td->offset += temp; in musbotg_dev_data_tx()
1667 td->remainder -= temp; in musbotg_dev_data_tx()
1843 uint32_t temp; in musbotg_host_data_rx() local
1853 temp = count & ~3; in musbotg_host_data_rx()
1855 if (temp) { in musbotg_host_data_rx()
1859 temp / 4); in musbotg_host_data_rx()
1861 temp = count & 3; in musbotg_host_data_rx()
1862 if (temp) { in musbotg_host_data_rx()
1866 ((void *)&sc->sc_bounce_buf[count / 4]), temp); in musbotg_host_data_rx()
1883 temp = buf_res.length & ~3; in musbotg_host_data_rx()
1886 count -= temp; in musbotg_host_data_rx()
1887 td->offset += temp; in musbotg_host_data_rx()
1888 td->remainder -= temp; in musbotg_host_data_rx()
2019 uint32_t temp; in musbotg_host_data_tx() local
2032 temp = count & ~3; in musbotg_host_data_tx()
2034 if (temp) { in musbotg_host_data_tx()
2038 sc->sc_bounce_buf, temp / 4); in musbotg_host_data_tx()
2040 temp = count & 3; in musbotg_host_data_tx()
2041 if (temp) { in musbotg_host_data_tx()
2045 ((void *)&sc->sc_bounce_buf[count / 4]), temp); in musbotg_host_data_tx()
2059 temp = buf_res.length & ~3; in musbotg_host_data_tx()
2062 count -= temp; in musbotg_host_data_tx()
2063 td->offset += temp; in musbotg_host_data_tx()
2064 td->remainder -= temp; in musbotg_host_data_tx()
2229 uint8_t temp; in musbotg_interrupt() local
2267 temp = MUSB2_READ_1(sc, MUSB2_REG_POWER); in musbotg_interrupt()
2268 if (temp & MUSB2_MASK_HSMODE) in musbotg_interrupt()
2277 temp = MUSB2_MASK_IRESET; in musbotg_interrupt()
2279 temp &= ~MUSB2_MASK_IRESUME; in musbotg_interrupt()
2281 temp |= MUSB2_MASK_ISUSP; in musbotg_interrupt()
2282 MUSB2_WRITE_1(sc, MUSB2_REG_INTUSBE, temp); in musbotg_interrupt()
2297 temp = MUSB2_READ_1(sc, MUSB2_REG_INTUSBE); in musbotg_interrupt()
2299 temp &= ~MUSB2_MASK_IRESUME; in musbotg_interrupt()
2301 temp |= MUSB2_MASK_ISUSP; in musbotg_interrupt()
2302 MUSB2_WRITE_1(sc, MUSB2_REG_INTUSBE, temp); in musbotg_interrupt()
2309 temp = MUSB2_READ_1(sc, MUSB2_REG_INTUSBE); in musbotg_interrupt()
2311 temp &= ~MUSB2_MASK_ISUSP; in musbotg_interrupt()
2313 temp |= MUSB2_MASK_IRESUME; in musbotg_interrupt()
2314 MUSB2_WRITE_1(sc, MUSB2_REG_INTUSBE, temp); in musbotg_interrupt()
2328 temp = MUSB2_READ_1(sc, MUSB2_REG_DEVCTL); in musbotg_interrupt()
2329 temp |= MUSB2_MASK_SESS; in musbotg_interrupt()
2330 MUSB2_WRITE_1(sc, MUSB2_REG_DEVCTL, temp); in musbotg_interrupt()
2358 musbotg_setup_standard_chain_sub(struct musbotg_std_temp *temp) in musbotg_setup_standard_chain_sub() argument
2363 td = temp->td_next; in musbotg_setup_standard_chain_sub()
2364 temp->td = td; in musbotg_setup_standard_chain_sub()
2367 temp->td_next = td->obj_next; in musbotg_setup_standard_chain_sub()
2370 td->func = temp->func; in musbotg_setup_standard_chain_sub()
2371 td->pc = temp->pc; in musbotg_setup_standard_chain_sub()
2372 td->offset = temp->offset; in musbotg_setup_standard_chain_sub()
2373 td->remainder = temp->len; in musbotg_setup_standard_chain_sub()
2376 td->did_stall = temp->did_stall; in musbotg_setup_standard_chain_sub()
2377 td->short_pkt = temp->short_pkt; in musbotg_setup_standard_chain_sub()
2378 td->alt_next = temp->setup_alt_next; in musbotg_setup_standard_chain_sub()
2379 td->channel = temp->channel; in musbotg_setup_standard_chain_sub()
2380 td->dev_addr = temp->dev_addr; in musbotg_setup_standard_chain_sub()
2381 td->haddr = temp->haddr; in musbotg_setup_standard_chain_sub()
2382 td->hport = temp->hport; in musbotg_setup_standard_chain_sub()
2383 td->transfer_type = temp->transfer_type; in musbotg_setup_standard_chain_sub()
2389 struct musbotg_std_temp temp; in musbotg_setup_standard_chain() local
2406 temp.max_frame_size = xfer->max_frame_size; in musbotg_setup_standard_chain()
2417 temp.pc = NULL; in musbotg_setup_standard_chain()
2418 temp.td = NULL; in musbotg_setup_standard_chain()
2419 temp.td_next = xfer->td_start[0]; in musbotg_setup_standard_chain()
2420 temp.offset = 0; in musbotg_setup_standard_chain()
2421 temp.setup_alt_next = xfer->flags_int.short_frames_ok || in musbotg_setup_standard_chain()
2423 temp.did_stall = !xfer->flags_int.control_stall; in musbotg_setup_standard_chain()
2424 temp.channel = -1; in musbotg_setup_standard_chain()
2425 temp.dev_addr = dev_addr; in musbotg_setup_standard_chain()
2426 temp.haddr = xfer->xroot->udev->hs_hub_addr; in musbotg_setup_standard_chain()
2427 temp.hport = xfer->xroot->udev->hs_port_no; in musbotg_setup_standard_chain()
2434 temp.transfer_type = MUSB2_MASK_TI_SPEED_LO; in musbotg_setup_standard_chain()
2437 temp.transfer_type = MUSB2_MASK_TI_SPEED_FS; in musbotg_setup_standard_chain()
2440 temp.transfer_type = MUSB2_MASK_TI_SPEED_HS; in musbotg_setup_standard_chain()
2443 temp.transfer_type = 0; in musbotg_setup_standard_chain()
2450 temp.transfer_type |= MUSB2_MASK_TI_PROTO_CTRL; in musbotg_setup_standard_chain()
2453 temp.transfer_type |= MUSB2_MASK_TI_PROTO_ISOC; in musbotg_setup_standard_chain()
2456 temp.transfer_type |= MUSB2_MASK_TI_PROTO_BULK; in musbotg_setup_standard_chain()
2459 temp.transfer_type |= MUSB2_MASK_TI_PROTO_INTR; in musbotg_setup_standard_chain()
2467 temp.transfer_type |= ep_no; in musbotg_setup_standard_chain()
2476 temp.func = &musbotg_dev_ctrl_setup_rx; in musbotg_setup_standard_chain()
2478 temp.func = &musbotg_host_ctrl_setup_tx; in musbotg_setup_standard_chain()
2480 temp.len = xfer->frlengths[0]; in musbotg_setup_standard_chain()
2481 temp.pc = xfer->frbuffers + 0; in musbotg_setup_standard_chain()
2482 temp.short_pkt = temp.len ? 1 : 0; in musbotg_setup_standard_chain()
2484 musbotg_setup_standard_chain_sub(&temp); in musbotg_setup_standard_chain()
2502 temp.func = &musbotg_host_ctrl_data_tx; in musbotg_setup_standard_chain()
2504 temp.func = &musbotg_host_data_tx; in musbotg_setup_standard_chain()
2507 temp.func = &musbotg_host_ctrl_data_rx; in musbotg_setup_standard_chain()
2509 temp.func = &musbotg_host_data_rx; in musbotg_setup_standard_chain()
2515 temp.func = &musbotg_dev_ctrl_data_tx; in musbotg_setup_standard_chain()
2517 temp.func = &musbotg_dev_data_tx; in musbotg_setup_standard_chain()
2520 temp.func = &musbotg_dev_ctrl_data_rx; in musbotg_setup_standard_chain()
2522 temp.func = &musbotg_dev_data_rx; in musbotg_setup_standard_chain()
2527 temp.pc = xfer->frbuffers + x; in musbotg_setup_standard_chain()
2532 temp.len = xfer->frlengths[x]; in musbotg_setup_standard_chain()
2539 temp.setup_alt_next = 0; in musbotg_setup_standard_chain()
2542 temp.setup_alt_next = 0; in musbotg_setup_standard_chain()
2545 if (temp.len == 0) { in musbotg_setup_standard_chain()
2548 temp.short_pkt = 0; in musbotg_setup_standard_chain()
2554 temp.short_pkt = 1; in musbotg_setup_standard_chain()
2557 temp.short_pkt = (xfer->flags.force_short_xfer ? 0 : 1); in musbotg_setup_standard_chain()
2561 musbotg_setup_standard_chain_sub(&temp); in musbotg_setup_standard_chain()
2564 temp.offset += temp.len; in musbotg_setup_standard_chain()
2567 temp.pc = xfer->frbuffers + x; in musbotg_setup_standard_chain()
2574 temp.pc = xfer->frbuffers + 0; in musbotg_setup_standard_chain()
2575 temp.len = 0; in musbotg_setup_standard_chain()
2576 temp.short_pkt = 0; in musbotg_setup_standard_chain()
2577 temp.setup_alt_next = 0; in musbotg_setup_standard_chain()
2586 temp.func = &musbotg_dev_ctrl_status; in musbotg_setup_standard_chain()
2589 temp.func = musbotg_host_ctrl_status_tx; in musbotg_setup_standard_chain()
2591 temp.func = musbotg_host_ctrl_status_rx; in musbotg_setup_standard_chain()
2593 musbotg_setup_standard_chain_sub(&temp); in musbotg_setup_standard_chain()
2597 td = temp.td; in musbotg_setup_standard_chain()
2617 uint16_t temp; in musbotg_ep_int_set() local
2630 temp = MUSB2_READ_2(sc, MUSB2_REG_INTTXE); in musbotg_ep_int_set()
2632 temp |= MUSB2_MASK_EPINT(0); in musbotg_ep_int_set()
2634 temp &= ~MUSB2_MASK_EPINT(0); in musbotg_ep_int_set()
2636 MUSB2_WRITE_2(sc, MUSB2_REG_INTTXE, temp); in musbotg_ep_int_set()
2638 temp = MUSB2_READ_2(sc, MUSB2_REG_INTRXE); in musbotg_ep_int_set()
2640 temp |= MUSB2_MASK_EPINT(channel); in musbotg_ep_int_set()
2642 temp &= ~MUSB2_MASK_EPINT(channel); in musbotg_ep_int_set()
2643 MUSB2_WRITE_2(sc, MUSB2_REG_INTRXE, temp); in musbotg_ep_int_set()
2645 temp = MUSB2_READ_2(sc, MUSB2_REG_INTTXE); in musbotg_ep_int_set()
2647 temp |= MUSB2_MASK_EPINT(channel); in musbotg_ep_int_set()
2649 temp &= ~MUSB2_MASK_EPINT(channel); in musbotg_ep_int_set()
2650 MUSB2_WRITE_2(sc, MUSB2_REG_INTTXE, temp); in musbotg_ep_int_set()
2865 uint16_t temp; in musbotg_clear_stall_sub() local
2889 temp = 0; in musbotg_clear_stall_sub()
2896 MUSB2_MASK_CSRH_TXMODE | temp); in musbotg_clear_stall_sub()
2902 MUSB2_MASK_CSRH_TXISO | temp); in musbotg_clear_stall_sub()
2907 MUSB2_MASK_CSRH_TXMODE | temp); in musbotg_clear_stall_sub()
2932 temp = MUSB2_READ_2(sc, MUSB2_REG_TXDBDIS); in musbotg_clear_stall_sub()
2936 temp &= ~(1 << ep_no); in musbotg_clear_stall_sub()
2939 temp |= (1 << ep_no); in musbotg_clear_stall_sub()
2941 MUSB2_WRITE_2(sc, MUSB2_REG_TXDBDIS, temp); in musbotg_clear_stall_sub()
2949 temp = 0; in musbotg_clear_stall_sub()
2956 MUSB2_MASK_CSRH_RXNYET | temp); in musbotg_clear_stall_sub()
2962 MUSB2_MASK_CSRH_RXISO | temp); in musbotg_clear_stall_sub()
2966 MUSB2_WRITE_1(sc, MUSB2_REG_RXCSRH, temp); in musbotg_clear_stall_sub()
2991 temp = MUSB2_READ_2(sc, MUSB2_REG_RXDBDIS); in musbotg_clear_stall_sub()
2995 temp &= ~(1 << ep_no); in musbotg_clear_stall_sub()
2998 temp |= (1 << ep_no); in musbotg_clear_stall_sub()
3000 MUSB2_WRITE_2(sc, MUSB2_REG_RXDBDIS, temp); in musbotg_clear_stall_sub()
3047 uint8_t temp; in musbotg_init() local
3076 temp = MUSB2_READ_1(sc, MUSB2_REG_DEVCTL); in musbotg_init()
3077 DPRINTF("pre-DEVCTL=0x%02x\n", temp); in musbotg_init()
3101 temp = MUSB2_READ_1(sc, MUSB2_REG_DEVCTL); in musbotg_init()
3102 temp &= ~MUSB2_MASK_SESS; in musbotg_init()
3103 MUSB2_WRITE_1(sc, MUSB2_REG_DEVCTL, temp); in musbotg_init()
3106 temp = MUSB2_READ_1(sc, MUSB2_REG_DEVCTL); in musbotg_init()
3107 temp |= MUSB2_MASK_SESS; in musbotg_init()
3108 MUSB2_WRITE_1(sc, MUSB2_REG_DEVCTL, temp); in musbotg_init()
3114 DPRINTF("DEVCTL=0x%02x\n", temp); in musbotg_init()
3170 for (temp = 1; temp <= sc->sc_ep_max; temp++) { in musbotg_init()
3171 pf = sc->sc_hw_ep_profile + temp; in musbotg_init()
3174 MUSB2_WRITE_1(sc, MUSB2_REG_EPINDEX, temp); in musbotg_init()
3181 temp, ftx, frx, dynfifo); in musbotg_init()
3184 if (frx && (temp <= nrx)) { in musbotg_init()
3187 if (temp <= cfg->ep_end) { in musbotg_init()
3201 if (ftx && (temp <= ntx)) { in musbotg_init()
3204 if (temp <= cfg->ep_end) { in musbotg_init()
3220 if (frx && ftx && (temp <= nrx) && (temp <= ntx)) { in musbotg_init()
3230 } else if (frx && (temp <= nrx)) { in musbotg_init()
3239 } else if (ftx && (temp <= ntx)) { in musbotg_init()