Lines Matching defs:channel

314  * @channel:		Hardware DMA channel for this pipe
334 u8 channel;
340 int channel;
354 * idle_hardware_channels: Bit set for every idle hardware channel.
397 #define USB_FIFO_ADDRESS(channel, usb_index) \
398 (CVMX_USBCX_GOTGCTL(usb_index) + ((channel) + 1) * 0x1000)
694 int channel;
901 * Disable all channel interrupts. We'll enable them per channel later.
903 for (channel = 0; channel < 8; channel++)
905 CVMX_USBCX_HCINTMSKX(channel, usb->index),
1156 int channel;
1170 channel = rx_status.s.chnum;
1177 channel * 8);
1180 cvmx_write64_uint64(CVMX_USBNX_DMA0_INB_CHN0(usb->index) + channel * 8,
1186 USB_FIFO_ADDRESS(channel, usb->index));
1213 u64 csr_address = USB_FIFO_ADDRESS(fifo->entry[i].channel,
1292 * @channel: Channel number to get packet from
1294 static void cvmx_usb_fill_tx_fifo(struct octeon_hcd *usb, int channel)
1303 CVMX_USBCX_HCCHARX(channel, usb->index));
1309 CVMX_USBCX_HCSPLTX(channel, usb->index));
1318 CVMX_USBCX_HCTSIZX(channel, usb->index));
1328 fifo->entry[fifo->head].channel = channel;
1331 channel * 8);
1341 * Perform channel specific setup for Control transactions. All
1345 * @channel: Channel to setup
1349 int channel,
1365 CVMX_USBCX_HCTSIZX(channel, usb->index));
1376 USB_SET_FIELD32(CVMX_USBCX_HCCHARX(channel, usb->index),
1384 channel * 8,
1391 USB_SET_FIELD32(CVMX_USBCX_HCCHARX(channel, usb->index),
1395 USB_SET_FIELD32(CVMX_USBCX_HCSPLTX(channel, usb->index),
1406 USB_SET_FIELD32(CVMX_USBCX_HCCHARX(channel, usb->index),
1416 USB_SET_FIELD32(CVMX_USBCX_HCCHARX(channel, usb->index),
1421 USB_SET_FIELD32(CVMX_USBCX_HCSPLTX(channel, usb->index),
1427 USB_SET_FIELD32(CVMX_USBCX_HCCHARX(channel, usb->index),
1436 USB_SET_FIELD32(CVMX_USBCX_HCCHARX(channel, usb->index),
1441 USB_SET_FIELD32(CVMX_USBCX_HCSPLTX(channel, usb->index),
1485 cvmx_usb_write_csr32(usb, CVMX_USBCX_HCTSIZX(channel, usb->index),
1490 * Start a channel to perform the pipe's head transaction
1493 * @channel: Channel to setup
1496 static void cvmx_usb_start_channel(struct octeon_hcd *usb, int channel,
1506 /* Attach the channel to the pipe */
1507 usb->pipe_for_channel[channel] = pipe;
1508 pipe->channel = channel;
1511 /* Mark this channel as in use */
1512 usb->idle_hardware_channels &= ~(1 << channel);
1514 /* Enable the channel interrupt bits */
1520 /* Clear all channel status bits */
1522 CVMX_USBCX_HCINTX(channel, usb->index));
1525 CVMX_USBCX_HCINTX(channel, usb->index),
1552 CVMX_USBCX_HCINTMSKX(channel, usb->index),
1555 /* Enable the channel interrupt to propagate */
1558 usbc_haintmsk.s.haintmsk |= 1 << channel;
1578 cvmx_write64_uint64(reg + channel * 8, dma_address);
1741 CVMX_USBCX_HCSPLTX(channel, usb->index),
1744 CVMX_USBCX_HCTSIZX(channel, usb->index),
1782 CVMX_USBCX_HCCHARX(channel, usb->index),
1789 cvmx_usb_start_channel_control(usb, channel, pipe);
1803 CVMX_USBCX_HCTSIZX(channel,
1808 CVMX_USBCX_HCTSIZX(channel,
1818 CVMX_USBCX_HCTSIZX(channel,
1827 USB_SET_FIELD32(CVMX_USBCX_HCCHARX(channel, usb->index),
1830 cvmx_usb_fill_tx_fifo(usb, channel);
1900 int channel;
1925 /* Find an idle channel */
1926 channel = __fls(usb->idle_hardware_channels);
1927 if (unlikely(channel > 7))
1934 cvmx_usb_start_channel(usb, channel, pipe);
2308 usb->pipe_for_channel[pipe->channel] = NULL;
2314 CVMX_USBCX_HCCHARX(pipe->channel,
2317 * If the channel isn't enabled then the transaction already
2323 CVMX_USBCX_HCCHARX(pipe->channel,
2588 * Poll a channel for status
2591 * @channel: Channel to poll
2595 static int cvmx_usb_poll_channel(struct octeon_hcd *usb, int channel)
2609 /* Read the interrupt status bits for the channel */
2611 CVMX_USBCX_HCINTX(channel, usb->index));
2615 CVMX_USBCX_HCCHARX(channel,
2625 CVMX_USBCX_HCCHARX(channel,
2642 CVMX_USBCX_HCINTMSKX(channel, usb->index),
2646 CVMX_USBCX_HCCHARX(channel, usb->index),
2656 usb->index, channel);
2663 * channel is still running
2669 /* Disable the channel interrupts now that it is done */
2670 cvmx_usb_write_csr32(usb, CVMX_USBCX_HCINTMSKX(channel, usb->index), 0);
2671 usb->idle_hardware_channels |= (1 << channel);
2673 /* Make sure this channel is tied to a valid pipe */
2674 pipe = usb->pipe_for_channel[channel];
2684 * Disconnect this pipe from the HW channel. Later the schedule
2687 usb->pipe_for_channel[channel] = NULL;
2691 * Read the channel config info so we can figure out how much data
2695 CVMX_USBCX_HCCHARX(channel, usb->index));
2697 CVMX_USBCX_HCTSIZX(channel, usb->index));
2912 * We get channel halted interrupts with no result bits
3007 * (HAINT) register to determine the exact number of the channel
3019 int channel;
3021 channel = __fls(usbc_haint.u32);
3022 cvmx_usb_poll_channel(usb, channel);
3023 usbc_haint.u32 ^= 1 << channel;
3654 /* Only use one channel with non DMA */
3657 /* CN5XXX have an errata with channel 3 */