Lines Matching refs:temp

297 	uint8_t temp;  in musbotg_pull_common()  local
299 temp = MUSB2_READ_1(sc, MUSB2_REG_POWER); in musbotg_pull_common()
301 temp |= MUSB2_MASK_SOFTC; in musbotg_pull_common()
303 temp &= ~MUSB2_MASK_SOFTC; in musbotg_pull_common()
305 MUSB2_WRITE_1(sc, MUSB2_REG_POWER, temp); in musbotg_pull_common()
334 uint8_t temp; in musbotg_suspend_host() local
340 temp = MUSB2_READ_1(sc, MUSB2_REG_POWER); in musbotg_suspend_host()
341 temp |= MUSB2_MASK_SUSPMODE; in musbotg_suspend_host()
342 MUSB2_WRITE_1(sc, MUSB2_REG_POWER, temp); in musbotg_suspend_host()
349 uint8_t temp; in musbotg_wakeup_host() local
355 temp = MUSB2_READ_1(sc, MUSB2_REG_POWER); in musbotg_wakeup_host()
356 temp &= ~MUSB2_MASK_SUSPMODE; in musbotg_wakeup_host()
357 temp |= MUSB2_MASK_RESUME; in musbotg_wakeup_host()
358 MUSB2_WRITE_1(sc, MUSB2_REG_POWER, temp); in musbotg_wakeup_host()
364 temp = MUSB2_READ_1(sc, MUSB2_REG_POWER); in musbotg_wakeup_host()
365 temp &= ~MUSB2_MASK_RESUME; in musbotg_wakeup_host()
366 MUSB2_WRITE_1(sc, MUSB2_REG_POWER, temp); in musbotg_wakeup_host()
374 uint8_t temp; in musbotg_wakeup_peer() local
380 temp = MUSB2_READ_1(sc, MUSB2_REG_POWER); in musbotg_wakeup_peer()
381 temp |= MUSB2_MASK_RESUME; in musbotg_wakeup_peer()
382 MUSB2_WRITE_1(sc, MUSB2_REG_POWER, temp); in musbotg_wakeup_peer()
388 temp = MUSB2_READ_1(sc, MUSB2_REG_POWER); in musbotg_wakeup_peer()
389 temp &= ~MUSB2_MASK_RESUME; in musbotg_wakeup_peer()
390 MUSB2_WRITE_1(sc, MUSB2_REG_POWER, temp); in musbotg_wakeup_peer()
705 uint32_t temp; in musbotg_dev_ctrl_data_rx() local
716 temp = count & ~3; in musbotg_dev_ctrl_data_rx()
718 if (temp) { in musbotg_dev_ctrl_data_rx()
722 temp / 4); in musbotg_dev_ctrl_data_rx()
724 temp = count & 3; in musbotg_dev_ctrl_data_rx()
725 if (temp) { in musbotg_dev_ctrl_data_rx()
729 (void *)(&sc->sc_bounce_buf[count / 4]), temp); in musbotg_dev_ctrl_data_rx()
747 temp = buf_res.length & ~3; in musbotg_dev_ctrl_data_rx()
750 count -= temp; in musbotg_dev_ctrl_data_rx()
751 td->offset += temp; in musbotg_dev_ctrl_data_rx()
752 td->remainder -= temp; in musbotg_dev_ctrl_data_rx()
823 uint32_t temp; in musbotg_dev_ctrl_data_tx() local
837 temp = count & ~3; in musbotg_dev_ctrl_data_tx()
839 if (temp) { in musbotg_dev_ctrl_data_tx()
843 temp / 4); in musbotg_dev_ctrl_data_tx()
845 temp = count & 3; in musbotg_dev_ctrl_data_tx()
846 if (temp) { in musbotg_dev_ctrl_data_tx()
850 ((void *)&sc->sc_bounce_buf[count / 4]), temp); in musbotg_dev_ctrl_data_tx()
865 temp = buf_res.length & ~3; in musbotg_dev_ctrl_data_tx()
868 count -= temp; in musbotg_dev_ctrl_data_tx()
869 td->offset += temp; in musbotg_dev_ctrl_data_tx()
870 td->remainder -= temp; in musbotg_dev_ctrl_data_tx()
997 uint32_t temp; in musbotg_host_ctrl_data_rx() local
1008 temp = count & ~3; in musbotg_host_ctrl_data_rx()
1010 if (temp) { in musbotg_host_ctrl_data_rx()
1014 temp / 4); in musbotg_host_ctrl_data_rx()
1016 temp = count & 3; in musbotg_host_ctrl_data_rx()
1017 if (temp) { in musbotg_host_ctrl_data_rx()
1021 (void *)(&sc->sc_bounce_buf[count / 4]), temp); in musbotg_host_ctrl_data_rx()
1039 temp = buf_res.length & ~3; in musbotg_host_ctrl_data_rx()
1042 count -= temp; in musbotg_host_ctrl_data_rx()
1043 td->offset += temp; in musbotg_host_ctrl_data_rx()
1044 td->remainder -= temp; in musbotg_host_ctrl_data_rx()
1175 uint32_t temp; in musbotg_host_ctrl_data_tx() local
1189 temp = count & ~3; in musbotg_host_ctrl_data_tx()
1191 if (temp) { in musbotg_host_ctrl_data_tx()
1195 sc->sc_bounce_buf, temp / 4); in musbotg_host_ctrl_data_tx()
1197 temp = count & 3; in musbotg_host_ctrl_data_tx()
1198 if (temp) { in musbotg_host_ctrl_data_tx()
1202 ((void *)&sc->sc_bounce_buf[count / 4]), temp); in musbotg_host_ctrl_data_tx()
1217 temp = buf_res.length & ~3; in musbotg_host_ctrl_data_tx()
1220 count -= temp; in musbotg_host_ctrl_data_tx()
1221 td->offset += temp; in musbotg_host_ctrl_data_tx()
1222 td->remainder -= temp; in musbotg_host_ctrl_data_tx()
1514 uint32_t temp; in musbotg_dev_data_rx() local
1525 temp = count & ~3; in musbotg_dev_data_rx()
1527 if (temp) { in musbotg_dev_data_rx()
1531 temp / 4); in musbotg_dev_data_rx()
1533 temp = count & 3; in musbotg_dev_data_rx()
1534 if (temp) { in musbotg_dev_data_rx()
1538 ((void *)&sc->sc_bounce_buf[count / 4]), temp); in musbotg_dev_data_rx()
1556 temp = buf_res.length & ~3; in musbotg_dev_data_rx()
1559 count -= temp; in musbotg_dev_data_rx()
1560 td->offset += temp; in musbotg_dev_data_rx()
1561 td->remainder -= temp; in musbotg_dev_data_rx()
1640 uint32_t temp; in musbotg_dev_data_tx() local
1654 temp = count & ~3; in musbotg_dev_data_tx()
1656 if (temp) { in musbotg_dev_data_tx()
1660 sc->sc_bounce_buf, temp / 4); in musbotg_dev_data_tx()
1662 temp = count & 3; in musbotg_dev_data_tx()
1663 if (temp) { in musbotg_dev_data_tx()
1667 ((void *)&sc->sc_bounce_buf[count / 4]), temp); in musbotg_dev_data_tx()
1682 temp = buf_res.length & ~3; in musbotg_dev_data_tx()
1685 count -= temp; in musbotg_dev_data_tx()
1686 td->offset += temp; in musbotg_dev_data_tx()
1687 td->remainder -= temp; in musbotg_dev_data_tx()
1863 uint32_t temp; in musbotg_host_data_rx() local
1874 temp = count & ~3; in musbotg_host_data_rx()
1876 if (temp) { in musbotg_host_data_rx()
1880 temp / 4); in musbotg_host_data_rx()
1882 temp = count & 3; in musbotg_host_data_rx()
1883 if (temp) { in musbotg_host_data_rx()
1887 ((void *)&sc->sc_bounce_buf[count / 4]), temp); in musbotg_host_data_rx()
1905 temp = buf_res.length & ~3; in musbotg_host_data_rx()
1908 count -= temp; in musbotg_host_data_rx()
1909 td->offset += temp; in musbotg_host_data_rx()
1910 td->remainder -= temp; in musbotg_host_data_rx()
2041 uint32_t temp; in musbotg_host_data_tx() local
2055 temp = count & ~3; in musbotg_host_data_tx()
2057 if (temp) { in musbotg_host_data_tx()
2061 sc->sc_bounce_buf, temp / 4); in musbotg_host_data_tx()
2063 temp = count & 3; in musbotg_host_data_tx()
2064 if (temp) { in musbotg_host_data_tx()
2068 ((void *)&sc->sc_bounce_buf[count / 4]), temp); in musbotg_host_data_tx()
2083 temp = buf_res.length & ~3; in musbotg_host_data_tx()
2086 count -= temp; in musbotg_host_data_tx()
2087 td->offset += temp; in musbotg_host_data_tx()
2088 td->remainder -= temp; in musbotg_host_data_tx()
2257 uint8_t temp; in musbotg_interrupt() local
2297 temp = MUSB2_READ_1(sc, MUSB2_REG_POWER); in musbotg_interrupt()
2298 if (temp & MUSB2_MASK_HSMODE) in musbotg_interrupt()
2307 temp = MUSB2_MASK_IRESET; in musbotg_interrupt()
2309 temp &= ~MUSB2_MASK_IRESUME; in musbotg_interrupt()
2311 temp |= MUSB2_MASK_ISUSP; in musbotg_interrupt()
2312 MUSB2_WRITE_1(sc, MUSB2_REG_INTUSBE, temp); in musbotg_interrupt()
2327 temp = MUSB2_READ_1(sc, MUSB2_REG_INTUSBE); in musbotg_interrupt()
2329 temp &= ~MUSB2_MASK_IRESUME; in musbotg_interrupt()
2331 temp |= MUSB2_MASK_ISUSP; in musbotg_interrupt()
2332 MUSB2_WRITE_1(sc, MUSB2_REG_INTUSBE, temp); in musbotg_interrupt()
2339 temp = MUSB2_READ_1(sc, MUSB2_REG_INTUSBE); in musbotg_interrupt()
2341 temp &= ~MUSB2_MASK_ISUSP; in musbotg_interrupt()
2343 temp |= MUSB2_MASK_IRESUME; in musbotg_interrupt()
2344 MUSB2_WRITE_1(sc, MUSB2_REG_INTUSBE, temp); in musbotg_interrupt()
2358 temp = MUSB2_READ_1(sc, MUSB2_REG_DEVCTL); in musbotg_interrupt()
2359 temp |= MUSB2_MASK_SESS; in musbotg_interrupt()
2360 MUSB2_WRITE_1(sc, MUSB2_REG_DEVCTL, temp); in musbotg_interrupt()
2388 musbotg_setup_standard_chain_sub(struct musbotg_std_temp *temp) in musbotg_setup_standard_chain_sub() argument
2393 td = temp->td_next; in musbotg_setup_standard_chain_sub()
2394 temp->td = td; in musbotg_setup_standard_chain_sub()
2397 temp->td_next = td->obj_next; in musbotg_setup_standard_chain_sub()
2400 td->func = temp->func; in musbotg_setup_standard_chain_sub()
2401 td->pc = temp->pc; in musbotg_setup_standard_chain_sub()
2402 td->offset = temp->offset; in musbotg_setup_standard_chain_sub()
2403 td->remainder = temp->len; in musbotg_setup_standard_chain_sub()
2406 td->did_stall = temp->did_stall; in musbotg_setup_standard_chain_sub()
2407 td->short_pkt = temp->short_pkt; in musbotg_setup_standard_chain_sub()
2408 td->alt_next = temp->setup_alt_next; in musbotg_setup_standard_chain_sub()
2409 td->channel = temp->channel; in musbotg_setup_standard_chain_sub()
2410 td->dev_addr = temp->dev_addr; in musbotg_setup_standard_chain_sub()
2411 td->haddr = temp->haddr; in musbotg_setup_standard_chain_sub()
2412 td->hport = temp->hport; in musbotg_setup_standard_chain_sub()
2413 td->transfer_type = temp->transfer_type; in musbotg_setup_standard_chain_sub()
2419 struct musbotg_std_temp temp; in musbotg_setup_standard_chain() local
2436 temp.max_frame_size = xfer->max_frame_size; in musbotg_setup_standard_chain()
2447 temp.pc = NULL; in musbotg_setup_standard_chain()
2448 temp.td = NULL; in musbotg_setup_standard_chain()
2449 temp.td_next = xfer->td_start[0]; in musbotg_setup_standard_chain()
2450 temp.offset = 0; in musbotg_setup_standard_chain()
2451 temp.setup_alt_next = xfer->flags_int.short_frames_ok || in musbotg_setup_standard_chain()
2453 temp.did_stall = !xfer->flags_int.control_stall; in musbotg_setup_standard_chain()
2454 temp.channel = -1; in musbotg_setup_standard_chain()
2455 temp.dev_addr = dev_addr; in musbotg_setup_standard_chain()
2456 temp.haddr = xfer->xroot->udev->hs_hub_addr; in musbotg_setup_standard_chain()
2457 temp.hport = xfer->xroot->udev->hs_port_no; in musbotg_setup_standard_chain()
2464 temp.transfer_type = MUSB2_MASK_TI_SPEED_LO; in musbotg_setup_standard_chain()
2467 temp.transfer_type = MUSB2_MASK_TI_SPEED_FS; in musbotg_setup_standard_chain()
2470 temp.transfer_type = MUSB2_MASK_TI_SPEED_HS; in musbotg_setup_standard_chain()
2473 temp.transfer_type = 0; in musbotg_setup_standard_chain()
2480 temp.transfer_type |= MUSB2_MASK_TI_PROTO_CTRL; in musbotg_setup_standard_chain()
2483 temp.transfer_type |= MUSB2_MASK_TI_PROTO_ISOC; in musbotg_setup_standard_chain()
2486 temp.transfer_type |= MUSB2_MASK_TI_PROTO_BULK; in musbotg_setup_standard_chain()
2489 temp.transfer_type |= MUSB2_MASK_TI_PROTO_INTR; in musbotg_setup_standard_chain()
2497 temp.transfer_type |= ep_no; in musbotg_setup_standard_chain()
2507 temp.func = &musbotg_dev_ctrl_setup_rx; in musbotg_setup_standard_chain()
2509 temp.func = &musbotg_host_ctrl_setup_tx; in musbotg_setup_standard_chain()
2511 temp.len = xfer->frlengths[0]; in musbotg_setup_standard_chain()
2512 temp.pc = xfer->frbuffers + 0; in musbotg_setup_standard_chain()
2513 temp.short_pkt = temp.len ? 1 : 0; in musbotg_setup_standard_chain()
2515 musbotg_setup_standard_chain_sub(&temp); in musbotg_setup_standard_chain()
2533 temp.func = &musbotg_host_ctrl_data_tx; in musbotg_setup_standard_chain()
2535 temp.func = &musbotg_host_data_tx; in musbotg_setup_standard_chain()
2538 temp.func = &musbotg_host_ctrl_data_rx; in musbotg_setup_standard_chain()
2540 temp.func = &musbotg_host_data_rx; in musbotg_setup_standard_chain()
2546 temp.func = &musbotg_dev_ctrl_data_tx; in musbotg_setup_standard_chain()
2548 temp.func = &musbotg_dev_data_tx; in musbotg_setup_standard_chain()
2551 temp.func = &musbotg_dev_ctrl_data_rx; in musbotg_setup_standard_chain()
2553 temp.func = &musbotg_dev_data_rx; in musbotg_setup_standard_chain()
2558 temp.pc = xfer->frbuffers + x; in musbotg_setup_standard_chain()
2564 temp.len = xfer->frlengths[x]; in musbotg_setup_standard_chain()
2571 temp.setup_alt_next = 0; in musbotg_setup_standard_chain()
2574 temp.setup_alt_next = 0; in musbotg_setup_standard_chain()
2577 if (temp.len == 0) { in musbotg_setup_standard_chain()
2581 temp.short_pkt = 0; in musbotg_setup_standard_chain()
2588 temp.short_pkt = 1; in musbotg_setup_standard_chain()
2591 temp.short_pkt = (xfer->flags.force_short_xfer ? 0 : 1); in musbotg_setup_standard_chain()
2595 musbotg_setup_standard_chain_sub(&temp); in musbotg_setup_standard_chain()
2598 temp.offset += temp.len; in musbotg_setup_standard_chain()
2601 temp.pc = xfer->frbuffers + x; in musbotg_setup_standard_chain()
2609 temp.pc = xfer->frbuffers + 0; in musbotg_setup_standard_chain()
2610 temp.len = 0; in musbotg_setup_standard_chain()
2611 temp.short_pkt = 0; in musbotg_setup_standard_chain()
2612 temp.setup_alt_next = 0; in musbotg_setup_standard_chain()
2621 temp.func = &musbotg_dev_ctrl_status; in musbotg_setup_standard_chain()
2624 temp.func = musbotg_host_ctrl_status_tx; in musbotg_setup_standard_chain()
2626 temp.func = musbotg_host_ctrl_status_rx; in musbotg_setup_standard_chain()
2628 musbotg_setup_standard_chain_sub(&temp); in musbotg_setup_standard_chain()
2632 td = temp.td; in musbotg_setup_standard_chain()
2652 uint16_t temp; in musbotg_ep_int_set() local
2665 temp = MUSB2_READ_2(sc, MUSB2_REG_INTTXE); in musbotg_ep_int_set()
2667 temp |= MUSB2_MASK_EPINT(0); in musbotg_ep_int_set()
2669 temp &= ~MUSB2_MASK_EPINT(0); in musbotg_ep_int_set()
2671 MUSB2_WRITE_2(sc, MUSB2_REG_INTTXE, temp); in musbotg_ep_int_set()
2673 temp = MUSB2_READ_2(sc, MUSB2_REG_INTRXE); in musbotg_ep_int_set()
2675 temp |= MUSB2_MASK_EPINT(channel); in musbotg_ep_int_set()
2677 temp &= ~MUSB2_MASK_EPINT(channel); in musbotg_ep_int_set()
2678 MUSB2_WRITE_2(sc, MUSB2_REG_INTRXE, temp); in musbotg_ep_int_set()
2680 temp = MUSB2_READ_2(sc, MUSB2_REG_INTTXE); in musbotg_ep_int_set()
2682 temp |= MUSB2_MASK_EPINT(channel); in musbotg_ep_int_set()
2684 temp &= ~MUSB2_MASK_EPINT(channel); in musbotg_ep_int_set()
2685 MUSB2_WRITE_2(sc, MUSB2_REG_INTTXE, temp); in musbotg_ep_int_set()
2905 uint16_t temp; in musbotg_clear_stall_sub() local
2930 temp = 0; in musbotg_clear_stall_sub()
2937 MUSB2_MASK_CSRH_TXMODE | temp); in musbotg_clear_stall_sub()
2943 MUSB2_MASK_CSRH_TXISO | temp); in musbotg_clear_stall_sub()
2948 MUSB2_MASK_CSRH_TXMODE | temp); in musbotg_clear_stall_sub()
2973 temp = MUSB2_READ_2(sc, MUSB2_REG_TXDBDIS); in musbotg_clear_stall_sub()
2977 temp &= ~(1 << ep_no); in musbotg_clear_stall_sub()
2980 temp |= (1 << ep_no); in musbotg_clear_stall_sub()
2982 MUSB2_WRITE_2(sc, MUSB2_REG_TXDBDIS, temp); in musbotg_clear_stall_sub()
2991 temp = 0; in musbotg_clear_stall_sub()
2998 MUSB2_MASK_CSRH_RXNYET | temp); in musbotg_clear_stall_sub()
3004 MUSB2_MASK_CSRH_RXISO | temp); in musbotg_clear_stall_sub()
3008 MUSB2_WRITE_1(sc, MUSB2_REG_RXCSRH, temp); in musbotg_clear_stall_sub()
3033 temp = MUSB2_READ_2(sc, MUSB2_REG_RXDBDIS); in musbotg_clear_stall_sub()
3037 temp &= ~(1 << ep_no); in musbotg_clear_stall_sub()
3040 temp |= (1 << ep_no); in musbotg_clear_stall_sub()
3042 MUSB2_WRITE_2(sc, MUSB2_REG_RXDBDIS, temp); in musbotg_clear_stall_sub()
3089 uint8_t temp; in musbotg_init() local
3118 temp = MUSB2_READ_1(sc, MUSB2_REG_DEVCTL); in musbotg_init()
3119 DPRINTF("pre-DEVCTL=0x%02x\n", temp); in musbotg_init()
3144 temp = MUSB2_READ_1(sc, MUSB2_REG_DEVCTL); in musbotg_init()
3145 temp &= ~MUSB2_MASK_SESS; in musbotg_init()
3146 MUSB2_WRITE_1(sc, MUSB2_REG_DEVCTL, temp); in musbotg_init()
3149 temp = MUSB2_READ_1(sc, MUSB2_REG_DEVCTL); in musbotg_init()
3150 temp |= MUSB2_MASK_SESS; in musbotg_init()
3151 MUSB2_WRITE_1(sc, MUSB2_REG_DEVCTL, temp); in musbotg_init()
3157 DPRINTF("DEVCTL=0x%02x\n", temp); in musbotg_init()
3213 for (temp = 1; temp <= sc->sc_ep_max; temp++) { in musbotg_init()
3214 pf = sc->sc_hw_ep_profile + temp; in musbotg_init()
3217 MUSB2_WRITE_1(sc, MUSB2_REG_EPINDEX, temp); in musbotg_init()
3224 temp, ftx, frx, dynfifo); in musbotg_init()
3227 if (frx && (temp <= nrx)) { in musbotg_init()
3230 if (temp <= cfg->ep_end) { in musbotg_init()
3244 if (ftx && (temp <= ntx)) { in musbotg_init()
3247 if (temp <= cfg->ep_end) { in musbotg_init()
3263 if (frx && ftx && (temp <= nrx) && (temp <= ntx)) { in musbotg_init()
3273 } else if (frx && (temp <= nrx)) { in musbotg_init()
3282 } else if (ftx && (temp <= ntx)) { in musbotg_init()
3477 uint32_t temp; in musbotg_device_isoc_enter() local
3492 temp = (nframes - xfer->endpoint->isoc_next) & MUSB2_MASK_FRAME; in musbotg_device_isoc_enter()
3501 (temp < fs_frames)) { in musbotg_device_isoc_enter()
3516 temp = (xfer->endpoint->isoc_next - nframes) & MUSB2_MASK_FRAME; in musbotg_device_isoc_enter()
3522 usb_isoc_time_expand(&sc->sc_bus, nframes) + temp + in musbotg_device_isoc_enter()