Lines Matching refs:temp
294 uint8_t temp; in musbotg_pull_common() local
296 temp = MUSB2_READ_1(sc, MUSB2_REG_POWER); in musbotg_pull_common()
298 temp |= MUSB2_MASK_SOFTC; in musbotg_pull_common()
300 temp &= ~MUSB2_MASK_SOFTC; in musbotg_pull_common()
302 MUSB2_WRITE_1(sc, MUSB2_REG_POWER, temp); in musbotg_pull_common()
331 uint8_t temp; in musbotg_suspend_host() local
337 temp = MUSB2_READ_1(sc, MUSB2_REG_POWER); in musbotg_suspend_host()
338 temp |= MUSB2_MASK_SUSPMODE; in musbotg_suspend_host()
339 MUSB2_WRITE_1(sc, MUSB2_REG_POWER, temp); in musbotg_suspend_host()
346 uint8_t temp; in musbotg_wakeup_host() local
352 temp = MUSB2_READ_1(sc, MUSB2_REG_POWER); in musbotg_wakeup_host()
353 temp &= ~MUSB2_MASK_SUSPMODE; in musbotg_wakeup_host()
354 temp |= MUSB2_MASK_RESUME; in musbotg_wakeup_host()
355 MUSB2_WRITE_1(sc, MUSB2_REG_POWER, temp); in musbotg_wakeup_host()
361 temp = MUSB2_READ_1(sc, MUSB2_REG_POWER); in musbotg_wakeup_host()
362 temp &= ~MUSB2_MASK_RESUME; in musbotg_wakeup_host()
363 MUSB2_WRITE_1(sc, MUSB2_REG_POWER, temp); in musbotg_wakeup_host()
371 uint8_t temp; in musbotg_wakeup_peer() local
377 temp = MUSB2_READ_1(sc, MUSB2_REG_POWER); in musbotg_wakeup_peer()
378 temp |= MUSB2_MASK_RESUME; in musbotg_wakeup_peer()
379 MUSB2_WRITE_1(sc, MUSB2_REG_POWER, temp); in musbotg_wakeup_peer()
385 temp = MUSB2_READ_1(sc, MUSB2_REG_POWER); in musbotg_wakeup_peer()
386 temp &= ~MUSB2_MASK_RESUME; in musbotg_wakeup_peer()
387 MUSB2_WRITE_1(sc, MUSB2_REG_POWER, temp); in musbotg_wakeup_peer()
701 uint32_t temp; in musbotg_dev_ctrl_data_rx() local
711 temp = count & ~3; in musbotg_dev_ctrl_data_rx()
713 if (temp) { in musbotg_dev_ctrl_data_rx()
717 temp / 4); in musbotg_dev_ctrl_data_rx()
719 temp = count & 3; in musbotg_dev_ctrl_data_rx()
720 if (temp) { in musbotg_dev_ctrl_data_rx()
724 (void *)(&sc->sc_bounce_buf[count / 4]), temp); in musbotg_dev_ctrl_data_rx()
741 temp = buf_res.length & ~3; in musbotg_dev_ctrl_data_rx()
744 count -= temp; in musbotg_dev_ctrl_data_rx()
745 td->offset += temp; in musbotg_dev_ctrl_data_rx()
746 td->remainder -= temp; in musbotg_dev_ctrl_data_rx()
817 uint32_t temp; in musbotg_dev_ctrl_data_tx() local
830 temp = count & ~3; in musbotg_dev_ctrl_data_tx()
832 if (temp) { in musbotg_dev_ctrl_data_tx()
836 temp / 4); in musbotg_dev_ctrl_data_tx()
838 temp = count & 3; in musbotg_dev_ctrl_data_tx()
839 if (temp) { in musbotg_dev_ctrl_data_tx()
843 ((void *)&sc->sc_bounce_buf[count / 4]), temp); in musbotg_dev_ctrl_data_tx()
857 temp = buf_res.length & ~3; in musbotg_dev_ctrl_data_tx()
860 count -= temp; in musbotg_dev_ctrl_data_tx()
861 td->offset += temp; in musbotg_dev_ctrl_data_tx()
862 td->remainder -= temp; in musbotg_dev_ctrl_data_tx()
989 uint32_t temp; in musbotg_host_ctrl_data_rx() local
999 temp = count & ~3; in musbotg_host_ctrl_data_rx()
1001 if (temp) { in musbotg_host_ctrl_data_rx()
1005 temp / 4); in musbotg_host_ctrl_data_rx()
1007 temp = count & 3; in musbotg_host_ctrl_data_rx()
1008 if (temp) { in musbotg_host_ctrl_data_rx()
1012 (void *)(&sc->sc_bounce_buf[count / 4]), temp); in musbotg_host_ctrl_data_rx()
1029 temp = buf_res.length & ~3; in musbotg_host_ctrl_data_rx()
1032 count -= temp; in musbotg_host_ctrl_data_rx()
1033 td->offset += temp; in musbotg_host_ctrl_data_rx()
1034 td->remainder -= temp; in musbotg_host_ctrl_data_rx()
1163 uint32_t temp; in musbotg_host_ctrl_data_tx() local
1176 temp = count & ~3; in musbotg_host_ctrl_data_tx()
1178 if (temp) { in musbotg_host_ctrl_data_tx()
1182 sc->sc_bounce_buf, temp / 4); in musbotg_host_ctrl_data_tx()
1184 temp = count & 3; in musbotg_host_ctrl_data_tx()
1185 if (temp) { in musbotg_host_ctrl_data_tx()
1189 ((void *)&sc->sc_bounce_buf[count / 4]), temp); in musbotg_host_ctrl_data_tx()
1203 temp = buf_res.length & ~3; in musbotg_host_ctrl_data_tx()
1206 count -= temp; in musbotg_host_ctrl_data_tx()
1207 td->offset += temp; in musbotg_host_ctrl_data_tx()
1208 td->remainder -= temp; in musbotg_host_ctrl_data_tx()
1499 uint32_t temp; in musbotg_dev_data_rx() local
1509 temp = count & ~3; in musbotg_dev_data_rx()
1511 if (temp) { in musbotg_dev_data_rx()
1515 temp / 4); in musbotg_dev_data_rx()
1517 temp = count & 3; in musbotg_dev_data_rx()
1518 if (temp) { in musbotg_dev_data_rx()
1522 ((void *)&sc->sc_bounce_buf[count / 4]), temp); in musbotg_dev_data_rx()
1539 temp = buf_res.length & ~3; in musbotg_dev_data_rx()
1542 count -= temp; in musbotg_dev_data_rx()
1543 td->offset += temp; in musbotg_dev_data_rx()
1544 td->remainder -= temp; in musbotg_dev_data_rx()
1623 uint32_t temp; in musbotg_dev_data_tx() local
1636 temp = count & ~3; in musbotg_dev_data_tx()
1638 if (temp) { in musbotg_dev_data_tx()
1642 sc->sc_bounce_buf, temp / 4); in musbotg_dev_data_tx()
1644 temp = count & 3; in musbotg_dev_data_tx()
1645 if (temp) { in musbotg_dev_data_tx()
1649 ((void *)&sc->sc_bounce_buf[count / 4]), temp); in musbotg_dev_data_tx()
1663 temp = buf_res.length & ~3; in musbotg_dev_data_tx()
1666 count -= temp; in musbotg_dev_data_tx()
1667 td->offset += temp; in musbotg_dev_data_tx()
1668 td->remainder -= temp; in musbotg_dev_data_tx()
1844 uint32_t temp; in musbotg_host_data_rx() local
1854 temp = count & ~3; in musbotg_host_data_rx()
1856 if (temp) { in musbotg_host_data_rx()
1860 temp / 4); in musbotg_host_data_rx()
1862 temp = count & 3; in musbotg_host_data_rx()
1863 if (temp) { in musbotg_host_data_rx()
1867 ((void *)&sc->sc_bounce_buf[count / 4]), temp); in musbotg_host_data_rx()
1884 temp = buf_res.length & ~3; in musbotg_host_data_rx()
1887 count -= temp; in musbotg_host_data_rx()
1888 td->offset += temp; in musbotg_host_data_rx()
1889 td->remainder -= temp; in musbotg_host_data_rx()
2020 uint32_t temp; in musbotg_host_data_tx() local
2033 temp = count & ~3; in musbotg_host_data_tx()
2035 if (temp) { in musbotg_host_data_tx()
2039 sc->sc_bounce_buf, temp / 4); in musbotg_host_data_tx()
2041 temp = count & 3; in musbotg_host_data_tx()
2042 if (temp) { in musbotg_host_data_tx()
2046 ((void *)&sc->sc_bounce_buf[count / 4]), temp); in musbotg_host_data_tx()
2060 temp = buf_res.length & ~3; in musbotg_host_data_tx()
2063 count -= temp; in musbotg_host_data_tx()
2064 td->offset += temp; in musbotg_host_data_tx()
2065 td->remainder -= temp; in musbotg_host_data_tx()
2233 uint8_t temp; in musbotg_interrupt() local
2271 temp = MUSB2_READ_1(sc, MUSB2_REG_POWER); in musbotg_interrupt()
2272 if (temp & MUSB2_MASK_HSMODE) in musbotg_interrupt()
2281 temp = MUSB2_MASK_IRESET; in musbotg_interrupt()
2283 temp &= ~MUSB2_MASK_IRESUME; in musbotg_interrupt()
2285 temp |= MUSB2_MASK_ISUSP; in musbotg_interrupt()
2286 MUSB2_WRITE_1(sc, MUSB2_REG_INTUSBE, temp); in musbotg_interrupt()
2301 temp = MUSB2_READ_1(sc, MUSB2_REG_INTUSBE); in musbotg_interrupt()
2303 temp &= ~MUSB2_MASK_IRESUME; in musbotg_interrupt()
2305 temp |= MUSB2_MASK_ISUSP; in musbotg_interrupt()
2306 MUSB2_WRITE_1(sc, MUSB2_REG_INTUSBE, temp); in musbotg_interrupt()
2313 temp = MUSB2_READ_1(sc, MUSB2_REG_INTUSBE); in musbotg_interrupt()
2315 temp &= ~MUSB2_MASK_ISUSP; in musbotg_interrupt()
2317 temp |= MUSB2_MASK_IRESUME; in musbotg_interrupt()
2318 MUSB2_WRITE_1(sc, MUSB2_REG_INTUSBE, temp); in musbotg_interrupt()
2332 temp = MUSB2_READ_1(sc, MUSB2_REG_DEVCTL); in musbotg_interrupt()
2333 temp |= MUSB2_MASK_SESS; in musbotg_interrupt()
2334 MUSB2_WRITE_1(sc, MUSB2_REG_DEVCTL, temp); in musbotg_interrupt()
2362 musbotg_setup_standard_chain_sub(struct musbotg_std_temp *temp) in musbotg_setup_standard_chain_sub() argument
2367 td = temp->td_next; in musbotg_setup_standard_chain_sub()
2368 temp->td = td; in musbotg_setup_standard_chain_sub()
2371 temp->td_next = td->obj_next; in musbotg_setup_standard_chain_sub()
2374 td->func = temp->func; in musbotg_setup_standard_chain_sub()
2375 td->pc = temp->pc; in musbotg_setup_standard_chain_sub()
2376 td->offset = temp->offset; in musbotg_setup_standard_chain_sub()
2377 td->remainder = temp->len; in musbotg_setup_standard_chain_sub()
2380 td->did_stall = temp->did_stall; in musbotg_setup_standard_chain_sub()
2381 td->short_pkt = temp->short_pkt; in musbotg_setup_standard_chain_sub()
2382 td->alt_next = temp->setup_alt_next; in musbotg_setup_standard_chain_sub()
2383 td->channel = temp->channel; in musbotg_setup_standard_chain_sub()
2384 td->dev_addr = temp->dev_addr; in musbotg_setup_standard_chain_sub()
2385 td->haddr = temp->haddr; in musbotg_setup_standard_chain_sub()
2386 td->hport = temp->hport; in musbotg_setup_standard_chain_sub()
2387 td->transfer_type = temp->transfer_type; in musbotg_setup_standard_chain_sub()
2393 struct musbotg_std_temp temp; in musbotg_setup_standard_chain() local
2410 temp.max_frame_size = xfer->max_frame_size; in musbotg_setup_standard_chain()
2421 temp.pc = NULL; in musbotg_setup_standard_chain()
2422 temp.td = NULL; in musbotg_setup_standard_chain()
2423 temp.td_next = xfer->td_start[0]; in musbotg_setup_standard_chain()
2424 temp.offset = 0; in musbotg_setup_standard_chain()
2425 temp.setup_alt_next = xfer->flags_int.short_frames_ok || in musbotg_setup_standard_chain()
2427 temp.did_stall = !xfer->flags_int.control_stall; in musbotg_setup_standard_chain()
2428 temp.channel = -1; in musbotg_setup_standard_chain()
2429 temp.dev_addr = dev_addr; in musbotg_setup_standard_chain()
2430 temp.haddr = xfer->xroot->udev->hs_hub_addr; in musbotg_setup_standard_chain()
2431 temp.hport = xfer->xroot->udev->hs_port_no; in musbotg_setup_standard_chain()
2438 temp.transfer_type = MUSB2_MASK_TI_SPEED_LO; in musbotg_setup_standard_chain()
2441 temp.transfer_type = MUSB2_MASK_TI_SPEED_FS; in musbotg_setup_standard_chain()
2444 temp.transfer_type = MUSB2_MASK_TI_SPEED_HS; in musbotg_setup_standard_chain()
2447 temp.transfer_type = 0; in musbotg_setup_standard_chain()
2454 temp.transfer_type |= MUSB2_MASK_TI_PROTO_CTRL; in musbotg_setup_standard_chain()
2457 temp.transfer_type |= MUSB2_MASK_TI_PROTO_ISOC; in musbotg_setup_standard_chain()
2460 temp.transfer_type |= MUSB2_MASK_TI_PROTO_BULK; in musbotg_setup_standard_chain()
2463 temp.transfer_type |= MUSB2_MASK_TI_PROTO_INTR; in musbotg_setup_standard_chain()
2471 temp.transfer_type |= ep_no; in musbotg_setup_standard_chain()
2480 temp.func = &musbotg_dev_ctrl_setup_rx; in musbotg_setup_standard_chain()
2482 temp.func = &musbotg_host_ctrl_setup_tx; in musbotg_setup_standard_chain()
2484 temp.len = xfer->frlengths[0]; in musbotg_setup_standard_chain()
2485 temp.pc = xfer->frbuffers + 0; in musbotg_setup_standard_chain()
2486 temp.short_pkt = temp.len ? 1 : 0; in musbotg_setup_standard_chain()
2488 musbotg_setup_standard_chain_sub(&temp); in musbotg_setup_standard_chain()
2506 temp.func = &musbotg_host_ctrl_data_tx; in musbotg_setup_standard_chain()
2508 temp.func = &musbotg_host_data_tx; in musbotg_setup_standard_chain()
2511 temp.func = &musbotg_host_ctrl_data_rx; in musbotg_setup_standard_chain()
2513 temp.func = &musbotg_host_data_rx; in musbotg_setup_standard_chain()
2519 temp.func = &musbotg_dev_ctrl_data_tx; in musbotg_setup_standard_chain()
2521 temp.func = &musbotg_dev_data_tx; in musbotg_setup_standard_chain()
2524 temp.func = &musbotg_dev_ctrl_data_rx; in musbotg_setup_standard_chain()
2526 temp.func = &musbotg_dev_data_rx; in musbotg_setup_standard_chain()
2531 temp.pc = xfer->frbuffers + x; in musbotg_setup_standard_chain()
2536 temp.len = xfer->frlengths[x]; in musbotg_setup_standard_chain()
2543 temp.setup_alt_next = 0; in musbotg_setup_standard_chain()
2546 temp.setup_alt_next = 0; in musbotg_setup_standard_chain()
2549 if (temp.len == 0) { in musbotg_setup_standard_chain()
2552 temp.short_pkt = 0; in musbotg_setup_standard_chain()
2558 temp.short_pkt = 1; in musbotg_setup_standard_chain()
2561 temp.short_pkt = (xfer->flags.force_short_xfer ? 0 : 1); in musbotg_setup_standard_chain()
2565 musbotg_setup_standard_chain_sub(&temp); in musbotg_setup_standard_chain()
2568 temp.offset += temp.len; in musbotg_setup_standard_chain()
2571 temp.pc = xfer->frbuffers + x; in musbotg_setup_standard_chain()
2578 temp.pc = xfer->frbuffers + 0; in musbotg_setup_standard_chain()
2579 temp.len = 0; in musbotg_setup_standard_chain()
2580 temp.short_pkt = 0; in musbotg_setup_standard_chain()
2581 temp.setup_alt_next = 0; in musbotg_setup_standard_chain()
2590 temp.func = &musbotg_dev_ctrl_status; in musbotg_setup_standard_chain()
2593 temp.func = musbotg_host_ctrl_status_tx; in musbotg_setup_standard_chain()
2595 temp.func = musbotg_host_ctrl_status_rx; in musbotg_setup_standard_chain()
2597 musbotg_setup_standard_chain_sub(&temp); in musbotg_setup_standard_chain()
2601 td = temp.td; in musbotg_setup_standard_chain()
2621 uint16_t temp; in musbotg_ep_int_set() local
2634 temp = MUSB2_READ_2(sc, MUSB2_REG_INTTXE); in musbotg_ep_int_set()
2636 temp |= MUSB2_MASK_EPINT(0); in musbotg_ep_int_set()
2638 temp &= ~MUSB2_MASK_EPINT(0); in musbotg_ep_int_set()
2640 MUSB2_WRITE_2(sc, MUSB2_REG_INTTXE, temp); in musbotg_ep_int_set()
2642 temp = MUSB2_READ_2(sc, MUSB2_REG_INTRXE); in musbotg_ep_int_set()
2644 temp |= MUSB2_MASK_EPINT(channel); in musbotg_ep_int_set()
2646 temp &= ~MUSB2_MASK_EPINT(channel); in musbotg_ep_int_set()
2647 MUSB2_WRITE_2(sc, MUSB2_REG_INTRXE, temp); in musbotg_ep_int_set()
2649 temp = MUSB2_READ_2(sc, MUSB2_REG_INTTXE); in musbotg_ep_int_set()
2651 temp |= MUSB2_MASK_EPINT(channel); in musbotg_ep_int_set()
2653 temp &= ~MUSB2_MASK_EPINT(channel); in musbotg_ep_int_set()
2654 MUSB2_WRITE_2(sc, MUSB2_REG_INTTXE, temp); in musbotg_ep_int_set()
2869 uint16_t temp; in musbotg_clear_stall_sub() local
2893 temp = 0; in musbotg_clear_stall_sub()
2900 MUSB2_MASK_CSRH_TXMODE | temp); in musbotg_clear_stall_sub()
2906 MUSB2_MASK_CSRH_TXISO | temp); in musbotg_clear_stall_sub()
2911 MUSB2_MASK_CSRH_TXMODE | temp); in musbotg_clear_stall_sub()
2936 temp = MUSB2_READ_2(sc, MUSB2_REG_TXDBDIS); in musbotg_clear_stall_sub()
2940 temp &= ~(1 << ep_no); in musbotg_clear_stall_sub()
2943 temp |= (1 << ep_no); in musbotg_clear_stall_sub()
2945 MUSB2_WRITE_2(sc, MUSB2_REG_TXDBDIS, temp); in musbotg_clear_stall_sub()
2953 temp = 0; in musbotg_clear_stall_sub()
2960 MUSB2_MASK_CSRH_RXNYET | temp); in musbotg_clear_stall_sub()
2966 MUSB2_MASK_CSRH_RXISO | temp); in musbotg_clear_stall_sub()
2970 MUSB2_WRITE_1(sc, MUSB2_REG_RXCSRH, temp); in musbotg_clear_stall_sub()
2995 temp = MUSB2_READ_2(sc, MUSB2_REG_RXDBDIS); in musbotg_clear_stall_sub()
2999 temp &= ~(1 << ep_no); in musbotg_clear_stall_sub()
3002 temp |= (1 << ep_no); in musbotg_clear_stall_sub()
3004 MUSB2_WRITE_2(sc, MUSB2_REG_RXDBDIS, temp); in musbotg_clear_stall_sub()
3051 uint8_t temp; in musbotg_init() local
3080 temp = MUSB2_READ_1(sc, MUSB2_REG_DEVCTL); in musbotg_init()
3081 DPRINTF("pre-DEVCTL=0x%02x\n", temp); in musbotg_init()
3105 temp = MUSB2_READ_1(sc, MUSB2_REG_DEVCTL); in musbotg_init()
3106 temp &= ~MUSB2_MASK_SESS; in musbotg_init()
3107 MUSB2_WRITE_1(sc, MUSB2_REG_DEVCTL, temp); in musbotg_init()
3110 temp = MUSB2_READ_1(sc, MUSB2_REG_DEVCTL); in musbotg_init()
3111 temp |= MUSB2_MASK_SESS; in musbotg_init()
3112 MUSB2_WRITE_1(sc, MUSB2_REG_DEVCTL, temp); in musbotg_init()
3118 DPRINTF("DEVCTL=0x%02x\n", temp); in musbotg_init()
3174 for (temp = 1; temp <= sc->sc_ep_max; temp++) { in musbotg_init()
3175 pf = sc->sc_hw_ep_profile + temp; in musbotg_init()
3178 MUSB2_WRITE_1(sc, MUSB2_REG_EPINDEX, temp); in musbotg_init()
3185 temp, ftx, frx, dynfifo); in musbotg_init()
3188 if (frx && (temp <= nrx)) { in musbotg_init()
3191 if (temp <= cfg->ep_end) { in musbotg_init()
3205 if (ftx && (temp <= ntx)) { in musbotg_init()
3208 if (temp <= cfg->ep_end) { in musbotg_init()
3224 if (frx && ftx && (temp <= nrx) && (temp <= ntx)) { in musbotg_init()
3234 } else if (frx && (temp <= nrx)) { in musbotg_init()
3243 } else if (ftx && (temp <= ntx)) { in musbotg_init()