Lines Matching defs:fifo
1193 * Fill the TX hardware fifo with data out of the software
1197 * @fifo: Software fifo to use
1198 * @available: Amount of space in the hardware fifo
1200 * Returns: Non zero if the hardware fifo was too small and needs
1204 struct cvmx_usb_tx_fifo *fifo, int available)
1210 while (available && (fifo->head != fifo->tail)) {
1211 int i = fifo->tail;
1212 const u32 *ptr = cvmx_phys_to_ptr(fifo->entry[i].address);
1213 u64 csr_address = USB_FIFO_ADDRESS(fifo->entry[i].channel,
1217 /* Limit the amount of data to what the SW fifo has */
1218 if (fifo->entry[i].size <= available) {
1219 words = fifo->entry[i].size;
1220 fifo->tail++;
1221 if (fifo->tail > MAX_CHANNELS)
1222 fifo->tail = 0;
1227 fifo->entry[i].address += words * 4;
1228 fifo->entry[i].size -= words;
1231 * Write the HW fifo data. The read every three writes is due
1249 return fifo->head != fifo->tail;
1299 struct cvmx_usb_tx_fifo *fifo;
1324 fifo = &usb->periodic;
1326 fifo = &usb->nonperiodic;
1328 fifo->entry[fifo->head].channel = channel;
1329 fifo->entry[fifo->head].address =
1332 fifo->entry[fifo->head].size = (usbc_hctsiz.s.xfersize + 3) >> 2;
1333 fifo->head++;
1334 if (fifo->head > MAX_CHANNELS)
1335 fifo->head = 0;