Lines Matching refs:temp
201 uint16_t temp; in saf1761_otg_wakeup_peer() local
208 temp = SAF1761_READ_LE_4(sc, SOTG_MODE); in saf1761_otg_wakeup_peer()
209 SAF1761_WRITE_LE_4(sc, SOTG_MODE, temp | SOTG_MODE_SNDRSU); in saf1761_otg_wakeup_peer()
210 SAF1761_WRITE_LE_4(sc, SOTG_MODE, temp & ~SOTG_MODE_SNDRSU); in saf1761_otg_wakeup_peer()
439 uint32_t temp; in saf1761_host_setup_tx() local
474 temp = SOTG_PTD_DW3_ACTIVE | (td->toggle << 25) | SOTG_PTD_DW3_CERR_3; in saf1761_host_setup_tx()
475 SAF1761_WRITE_LE_4(sc, pdt_addr + SOTG_PTD_DW3, temp); in saf1761_host_setup_tx()
477 temp = SOTG_HC_MEMORY_ADDR(SOTG_DATA_ADDR(td->channel)) << 8; in saf1761_host_setup_tx()
478 SAF1761_WRITE_LE_4(sc, pdt_addr + SOTG_PTD_DW2, temp); in saf1761_host_setup_tx()
480 temp = td->dw1_value | (2 << 10) /* SETUP PID */ | (td->ep_index >> 1); in saf1761_host_setup_tx()
481 SAF1761_WRITE_LE_4(sc, pdt_addr + SOTG_PTD_DW1, temp); in saf1761_host_setup_tx()
483 temp = (td->ep_index << 31) | (1 << 29) /* pkt-multiplier */ | in saf1761_host_setup_tx()
487 SAF1761_WRITE_LE_4(sc, pdt_addr + SOTG_PTD_DW0, temp); in saf1761_host_setup_tx()
505 uint32_t temp; in saf1761_host_bulk_data_rx() local
581 temp = SOTG_PTD_DW3_ACTIVE | (td->toggle << 25) | in saf1761_host_bulk_data_rx()
583 SAF1761_WRITE_LE_4(sc, pdt_addr + SOTG_PTD_DW3, temp); in saf1761_host_bulk_data_rx()
585 temp = (SOTG_HC_MEMORY_ADDR(SOTG_DATA_ADDR(td->channel)) << 8); in saf1761_host_bulk_data_rx()
586 SAF1761_WRITE_LE_4(sc, pdt_addr + SOTG_PTD_DW2, temp); in saf1761_host_bulk_data_rx()
588 temp = td->dw1_value | (1 << 10) /* IN-PID */ | (td->ep_index >> 1); in saf1761_host_bulk_data_rx()
589 SAF1761_WRITE_LE_4(sc, pdt_addr + SOTG_PTD_DW1, temp); in saf1761_host_bulk_data_rx()
591 temp = (td->ep_index << 31) | (1 << 29) /* pkt-multiplier */ | in saf1761_host_bulk_data_rx()
595 SAF1761_WRITE_LE_4(sc, pdt_addr + SOTG_PTD_DW0, temp); in saf1761_host_bulk_data_rx()
611 uint32_t temp; in saf1761_host_bulk_data_tx() local
666 temp = SOTG_PTD_DW3_ACTIVE | (td->toggle << 25) | in saf1761_host_bulk_data_tx()
668 SAF1761_WRITE_LE_4(sc, pdt_addr + SOTG_PTD_DW3, temp); in saf1761_host_bulk_data_tx()
670 temp = (SOTG_HC_MEMORY_ADDR(SOTG_DATA_ADDR(td->channel)) << 8); in saf1761_host_bulk_data_tx()
671 SAF1761_WRITE_LE_4(sc, pdt_addr + SOTG_PTD_DW2, temp); in saf1761_host_bulk_data_tx()
673 temp = td->dw1_value | (0 << 10) /* OUT-PID */ | (td->ep_index >> 1); in saf1761_host_bulk_data_tx()
674 SAF1761_WRITE_LE_4(sc, pdt_addr + SOTG_PTD_DW1, temp); in saf1761_host_bulk_data_tx()
676 temp = (td->ep_index << 31) | (1 << 29) /* pkt-multiplier */ | in saf1761_host_bulk_data_tx()
680 SAF1761_WRITE_LE_4(sc, pdt_addr + SOTG_PTD_DW0, temp); in saf1761_host_bulk_data_tx()
698 uint32_t temp; in saf1761_host_intr_data_rx() local
773 temp = (0xFC << td->uframe) & 0xFF; /* complete split */ in saf1761_host_intr_data_rx()
775 temp = 0; in saf1761_host_intr_data_rx()
777 SAF1761_WRITE_LE_4(sc, pdt_addr + SOTG_PTD_DW5, temp); in saf1761_host_intr_data_rx()
779 temp = (1U << td->uframe); /* start mask or start split */ in saf1761_host_intr_data_rx()
780 SAF1761_WRITE_LE_4(sc, pdt_addr + SOTG_PTD_DW4, temp); in saf1761_host_intr_data_rx()
782 temp = SOTG_PTD_DW3_ACTIVE | (td->toggle << 25) | SOTG_PTD_DW3_CERR_3; in saf1761_host_intr_data_rx()
783 SAF1761_WRITE_LE_4(sc, pdt_addr + SOTG_PTD_DW3, temp); in saf1761_host_intr_data_rx()
785 temp = (SOTG_HC_MEMORY_ADDR(SOTG_DATA_ADDR(td->channel)) << 8) | in saf1761_host_intr_data_rx()
787 SAF1761_WRITE_LE_4(sc, pdt_addr + SOTG_PTD_DW2, temp); in saf1761_host_intr_data_rx()
789 temp = td->dw1_value | (1 << 10) /* IN-PID */ | (td->ep_index >> 1); in saf1761_host_intr_data_rx()
790 SAF1761_WRITE_LE_4(sc, pdt_addr + SOTG_PTD_DW1, temp); in saf1761_host_intr_data_rx()
792 temp = (td->ep_index << 31) | (1 << 29) /* pkt-multiplier */ | in saf1761_host_intr_data_rx()
796 SAF1761_WRITE_LE_4(sc, pdt_addr + SOTG_PTD_DW0, temp); in saf1761_host_intr_data_rx()
812 uint32_t temp; in saf1761_host_intr_data_tx() local
867 temp = (0xFC << td->uframe) & 0xFF; /* complete split */ in saf1761_host_intr_data_tx()
869 temp = 0; in saf1761_host_intr_data_tx()
871 SAF1761_WRITE_LE_4(sc, pdt_addr + SOTG_PTD_DW5, temp); in saf1761_host_intr_data_tx()
873 temp = (1U << td->uframe); /* start mask or start split */ in saf1761_host_intr_data_tx()
874 SAF1761_WRITE_LE_4(sc, pdt_addr + SOTG_PTD_DW4, temp); in saf1761_host_intr_data_tx()
876 temp = SOTG_PTD_DW3_ACTIVE | (td->toggle << 25) | SOTG_PTD_DW3_CERR_3; in saf1761_host_intr_data_tx()
877 SAF1761_WRITE_LE_4(sc, pdt_addr + SOTG_PTD_DW3, temp); in saf1761_host_intr_data_tx()
879 temp = (SOTG_HC_MEMORY_ADDR(SOTG_DATA_ADDR(td->channel)) << 8) | in saf1761_host_intr_data_tx()
881 SAF1761_WRITE_LE_4(sc, pdt_addr + SOTG_PTD_DW2, temp); in saf1761_host_intr_data_tx()
883 temp = td->dw1_value | (0 << 10) /* OUT-PID */ | (td->ep_index >> 1); in saf1761_host_intr_data_tx()
884 SAF1761_WRITE_LE_4(sc, pdt_addr + SOTG_PTD_DW1, temp); in saf1761_host_intr_data_tx()
886 temp = (td->ep_index << 31) | (1 << 29) /* pkt-multiplier */ | in saf1761_host_intr_data_tx()
890 SAF1761_WRITE_LE_4(sc, pdt_addr + SOTG_PTD_DW0, temp); in saf1761_host_intr_data_tx()
908 uint32_t temp; in saf1761_host_isoc_data_rx() local
964 temp = (0xFC << (td->uframe & 7)) & 0xFF; /* complete split */ in saf1761_host_isoc_data_rx()
966 temp = 0; in saf1761_host_isoc_data_rx()
968 SAF1761_WRITE_LE_4(sc, pdt_addr + SOTG_PTD_DW5, temp); in saf1761_host_isoc_data_rx()
970 temp = (1U << (td->uframe & 7)); /* start mask or start split */ in saf1761_host_isoc_data_rx()
971 SAF1761_WRITE_LE_4(sc, pdt_addr + SOTG_PTD_DW4, temp); in saf1761_host_isoc_data_rx()
973 temp = SOTG_PTD_DW3_ACTIVE | SOTG_PTD_DW3_CERR_3; in saf1761_host_isoc_data_rx()
974 SAF1761_WRITE_LE_4(sc, pdt_addr + SOTG_PTD_DW3, temp); in saf1761_host_isoc_data_rx()
976 temp = (SOTG_HC_MEMORY_ADDR(SOTG_DATA_ADDR(td->channel)) << 8) | in saf1761_host_isoc_data_rx()
978 SAF1761_WRITE_LE_4(sc, pdt_addr + SOTG_PTD_DW2, temp); in saf1761_host_isoc_data_rx()
980 temp = td->dw1_value | (1 << 10) /* IN-PID */ | (td->ep_index >> 1); in saf1761_host_isoc_data_rx()
981 SAF1761_WRITE_LE_4(sc, pdt_addr + SOTG_PTD_DW1, temp); in saf1761_host_isoc_data_rx()
983 temp = (td->ep_index << 31) | (1 << 29) /* pkt-multiplier */ | in saf1761_host_isoc_data_rx()
987 SAF1761_WRITE_LE_4(sc, pdt_addr + SOTG_PTD_DW0, temp); in saf1761_host_isoc_data_rx()
1003 uint32_t temp; in saf1761_host_isoc_data_tx() local
1042 temp = (1U << (td->uframe & 7)); /* start mask or start split */ in saf1761_host_isoc_data_tx()
1043 SAF1761_WRITE_LE_4(sc, pdt_addr + SOTG_PTD_DW4, temp); in saf1761_host_isoc_data_tx()
1045 temp = SOTG_PTD_DW3_ACTIVE | SOTG_PTD_DW3_CERR_3; in saf1761_host_isoc_data_tx()
1046 SAF1761_WRITE_LE_4(sc, pdt_addr + SOTG_PTD_DW3, temp); in saf1761_host_isoc_data_tx()
1048 temp = (SOTG_HC_MEMORY_ADDR(SOTG_DATA_ADDR(td->channel)) << 8) | in saf1761_host_isoc_data_tx()
1050 SAF1761_WRITE_LE_4(sc, pdt_addr + SOTG_PTD_DW2, temp); in saf1761_host_isoc_data_tx()
1052 temp = td->dw1_value | (0 << 10) /* OUT-PID */ | (td->ep_index >> 1); in saf1761_host_isoc_data_tx()
1053 SAF1761_WRITE_LE_4(sc, pdt_addr + SOTG_PTD_DW1, temp); in saf1761_host_isoc_data_tx()
1055 temp = (td->ep_index << 31) | (1 << 29) /* pkt-multiplier */ | in saf1761_host_isoc_data_tx()
1059 SAF1761_WRITE_LE_4(sc, pdt_addr + SOTG_PTD_DW0, temp); in saf1761_host_isoc_data_tx()
1710 saf1761_otg_setup_standard_chain_sub(struct saf1761_otg_std_temp *temp) in saf1761_otg_setup_standard_chain_sub() argument
1715 td = temp->td_next; in saf1761_otg_setup_standard_chain_sub()
1716 temp->td = td; in saf1761_otg_setup_standard_chain_sub()
1719 temp->td_next = td->obj_next; in saf1761_otg_setup_standard_chain_sub()
1722 td->func = temp->func; in saf1761_otg_setup_standard_chain_sub()
1723 td->pc = temp->pc; in saf1761_otg_setup_standard_chain_sub()
1724 td->offset = temp->offset; in saf1761_otg_setup_standard_chain_sub()
1725 td->remainder = temp->len; in saf1761_otg_setup_standard_chain_sub()
1729 td->did_stall = temp->did_stall; in saf1761_otg_setup_standard_chain_sub()
1730 td->short_pkt = temp->short_pkt; in saf1761_otg_setup_standard_chain_sub()
1731 td->alt_next = temp->setup_alt_next; in saf1761_otg_setup_standard_chain_sub()
1738 struct saf1761_otg_std_temp temp; in saf1761_otg_setup_standard_chain() local
1753 temp.max_frame_size = xfer->max_frame_size; in saf1761_otg_setup_standard_chain()
1761 temp.pc = NULL; in saf1761_otg_setup_standard_chain()
1762 temp.td = NULL; in saf1761_otg_setup_standard_chain()
1763 temp.td_next = xfer->td_start[0]; in saf1761_otg_setup_standard_chain()
1764 temp.offset = 0; in saf1761_otg_setup_standard_chain()
1765 temp.setup_alt_next = xfer->flags_int.short_frames_ok || in saf1761_otg_setup_standard_chain()
1767 temp.did_stall = !xfer->flags_int.control_stall; in saf1761_otg_setup_standard_chain()
1781 temp.func = &saf1761_host_setup_tx; in saf1761_otg_setup_standard_chain()
1783 temp.func = &saf1761_device_setup_rx; in saf1761_otg_setup_standard_chain()
1785 temp.len = xfer->frlengths[0]; in saf1761_otg_setup_standard_chain()
1786 temp.pc = xfer->frbuffers + 0; in saf1761_otg_setup_standard_chain()
1787 temp.short_pkt = temp.len ? 1 : 0; in saf1761_otg_setup_standard_chain()
1792 temp.setup_alt_next = 0; in saf1761_otg_setup_standard_chain()
1794 saf1761_otg_setup_standard_chain_sub(&temp); in saf1761_otg_setup_standard_chain()
1808 temp.func = &saf1761_host_intr_data_rx; in saf1761_otg_setup_standard_chain()
1810 temp.func = &saf1761_host_isoc_data_rx; in saf1761_otg_setup_standard_chain()
1818 temp.func = &saf1761_host_bulk_data_rx; in saf1761_otg_setup_standard_chain()
1822 temp.func = &saf1761_device_data_tx; in saf1761_otg_setup_standard_chain()
1828 temp.func = &saf1761_host_intr_data_tx; in saf1761_otg_setup_standard_chain()
1830 temp.func = &saf1761_host_isoc_data_tx; in saf1761_otg_setup_standard_chain()
1838 temp.func = &saf1761_host_bulk_data_tx; in saf1761_otg_setup_standard_chain()
1842 temp.func = &saf1761_device_data_rx; in saf1761_otg_setup_standard_chain()
1848 temp.pc = xfer->frbuffers + x; in saf1761_otg_setup_standard_chain()
1857 temp.len = xfer->frlengths[x]; in saf1761_otg_setup_standard_chain()
1864 temp.setup_alt_next = 0; in saf1761_otg_setup_standard_chain()
1867 temp.setup_alt_next = 0; in saf1761_otg_setup_standard_chain()
1870 if (temp.len == 0) { in saf1761_otg_setup_standard_chain()
1874 temp.short_pkt = 0; in saf1761_otg_setup_standard_chain()
1880 temp.short_pkt = (xfer->flags.force_short_xfer) ? 0 : 1; in saf1761_otg_setup_standard_chain()
1883 saf1761_otg_setup_standard_chain_sub(&temp); in saf1761_otg_setup_standard_chain()
1886 temp.offset += temp.len; in saf1761_otg_setup_standard_chain()
1889 temp.td->uframe = uframe_start; in saf1761_otg_setup_standard_chain()
1895 temp.pc = xfer->frbuffers + x; in saf1761_otg_setup_standard_chain()
1902 temp.pc = xfer->frbuffers + 0; in saf1761_otg_setup_standard_chain()
1903 temp.len = 0; in saf1761_otg_setup_standard_chain()
1904 temp.short_pkt = 0; in saf1761_otg_setup_standard_chain()
1905 temp.setup_alt_next = 0; in saf1761_otg_setup_standard_chain()
1916 temp.func = &saf1761_host_bulk_data_tx; in saf1761_otg_setup_standard_chain()
1919 temp.func = &saf1761_device_data_rx; in saf1761_otg_setup_standard_chain()
1924 temp.func = &saf1761_host_bulk_data_rx; in saf1761_otg_setup_standard_chain()
1927 temp.func = &saf1761_device_data_tx; in saf1761_otg_setup_standard_chain()
1931 temp.len = 0; in saf1761_otg_setup_standard_chain()
1932 temp.short_pkt = 0; in saf1761_otg_setup_standard_chain()
1934 saf1761_otg_setup_standard_chain_sub(&temp); in saf1761_otg_setup_standard_chain()
1937 td = temp.td; in saf1761_otg_setup_standard_chain()
1942 temp.func = &saf1761_device_data_tx_sync; in saf1761_otg_setup_standard_chain()
1943 saf1761_otg_setup_standard_chain_sub(&temp); in saf1761_otg_setup_standard_chain()
1948 temp.pc = xfer->frbuffers + 0; in saf1761_otg_setup_standard_chain()
1949 temp.len = 0; in saf1761_otg_setup_standard_chain()
1950 temp.short_pkt = 0; in saf1761_otg_setup_standard_chain()
1951 temp.setup_alt_next = 0; in saf1761_otg_setup_standard_chain()
1954 temp.func = &saf1761_device_data_tx_sync; in saf1761_otg_setup_standard_chain()
1955 saf1761_otg_setup_standard_chain_sub(&temp); in saf1761_otg_setup_standard_chain()
1960 td = temp.td; in saf1761_otg_setup_standard_chain()
2623 uint32_t temp; in saf1761_otg_device_isoc_enter() local
2637 temp = (nframes - xfer->endpoint->isoc_next) & SOTG_FRAME_NUM_SOFR_MASK; in saf1761_otg_device_isoc_enter()
2640 (temp < xfer->nframes)) { in saf1761_otg_device_isoc_enter()
2655 temp = (xfer->endpoint->isoc_next - nframes) & SOTG_FRAME_NUM_SOFR_MASK; in saf1761_otg_device_isoc_enter()
2661 usb_isoc_time_expand(&sc->sc_bus, nframes) + temp + in saf1761_otg_device_isoc_enter()
2705 uint32_t temp; in saf1761_otg_host_isoc_enter() local
2719 temp = (nframes - xfer->endpoint->isoc_next) & (SOTG_FRINDEX_MASK >> 3); in saf1761_otg_host_isoc_enter()
2722 (temp < xfer->nframes)) { in saf1761_otg_host_isoc_enter()
2737 temp = (xfer->endpoint->isoc_next - nframes) & (SOTG_FRINDEX_MASK >> 3); in saf1761_otg_host_isoc_enter()
2743 usb_isoc_time_expand(&sc->sc_bus, nframes) + temp + in saf1761_otg_host_isoc_enter()
2861 uint32_t temp; in saf1761_otg_roothub_exec() local
3174 temp = SAF1761_READ_LE_4(sc, SOTG_PORTSC1); in saf1761_otg_roothub_exec()
3178 SAF1761_WRITE_LE_4(sc, SOTG_PORTSC1, temp & ~SOTG_PORTSC1_PED); in saf1761_otg_roothub_exec()
3181 if ((temp & SOTG_PORTSC1_SUSP) && (!(temp & SOTG_PORTSC1_FPR))) in saf1761_otg_roothub_exec()
3182 SAF1761_WRITE_LE_4(sc, SOTG_PORTSC1, temp | SOTG_PORTSC1_FPR); in saf1761_otg_roothub_exec()
3187 SAF1761_WRITE_LE_4(sc, SOTG_PORTSC1, temp & ~(SOTG_PORTSC1_SUSP | in saf1761_otg_roothub_exec()
3194 SAF1761_WRITE_LE_4(sc, SOTG_PORTSC1, temp & ~SOTG_PORTSC1_PIC); in saf1761_otg_roothub_exec()
3204 SAF1761_WRITE_LE_4(sc, SOTG_PORTSC1, temp & ~SOTG_PORTSC1_PP); in saf1761_otg_roothub_exec()
3207 SAF1761_WRITE_LE_4(sc, SOTG_PORTSC1, temp & ~SOTG_PORTSC1_ECSC); in saf1761_otg_roothub_exec()
3240 temp = SAF1761_READ_LE_4(sc, SOTG_PORTSC1); in saf1761_otg_roothub_exec()
3244 SAF1761_WRITE_LE_4(sc, SOTG_PORTSC1, temp | SOTG_PORTSC1_PED); in saf1761_otg_roothub_exec()
3247 SAF1761_WRITE_LE_4(sc, SOTG_PORTSC1, temp | SOTG_PORTSC1_SUSP); in saf1761_otg_roothub_exec()
3253 temp &= ~(SOTG_PORTSC1_PED | SOTG_PORTSC1_PR); in saf1761_otg_roothub_exec()
3255 SAF1761_WRITE_LE_4(sc, SOTG_PORTSC1, temp | SOTG_PORTSC1_PR); in saf1761_otg_roothub_exec()
3261 SAF1761_WRITE_LE_4(sc, SOTG_PORTSC1, temp); in saf1761_otg_roothub_exec()
3266 temp = SAF1761_READ_LE_4(sc, SOTG_PORTSC1); in saf1761_otg_roothub_exec()
3268 DPRINTF("After reset, status=0x%08x\n", temp); in saf1761_otg_roothub_exec()
3269 if (temp & SOTG_PORTSC1_PR) { in saf1761_otg_roothub_exec()
3274 if (!(temp & SOTG_PORTSC1_PED)) { in saf1761_otg_roothub_exec()
3276 SAF1761_WRITE_LE_4(sc, SOTG_PORTSC1, temp | SOTG_PORTSC1_PO); in saf1761_otg_roothub_exec()
3280 DPRINTF("port %d reset, status = 0x%08x\n", index, temp); in saf1761_otg_roothub_exec()
3284 SAF1761_WRITE_LE_4(sc, SOTG_PORTSC1, temp | SOTG_PORTSC1_PP); in saf1761_otg_roothub_exec()
3293 SAF1761_WRITE_LE_4(sc, SOTG_PORTSC1, temp | SOTG_PORTSC1_PIC); in saf1761_otg_roothub_exec()
3344 temp = SAF1761_READ_LE_4(sc, SOTG_PORTSC1); in saf1761_otg_roothub_exec()
3346 DPRINTFN(9, "UR_GET_PORT_STATUS on port %d = 0x%08x\n", index, temp); in saf1761_otg_roothub_exec()
3350 if (temp & SOTG_PORTSC1_ECCS) in saf1761_otg_roothub_exec()
3352 if (temp & SOTG_PORTSC1_PED) in saf1761_otg_roothub_exec()
3354 if ((temp & SOTG_PORTSC1_SUSP) && !(temp & SOTG_PORTSC1_FPR)) in saf1761_otg_roothub_exec()
3356 if (temp & SOTG_PORTSC1_PR) in saf1761_otg_roothub_exec()
3358 if (temp & SOTG_PORTSC1_PP) in saf1761_otg_roothub_exec()
3364 if (temp & SOTG_PORTSC1_ECSC) in saf1761_otg_roothub_exec()
3366 if (temp & SOTG_PORTSC1_FPR) in saf1761_otg_roothub_exec()