5 #include <soc/qcom_qup_se.h>
10 unsigned int m_irq = 0;
25 unsigned int s_irq = 0;
38 unsigned int tx_rem_bytes)
44 max_bytes =
MIN(tx_rem_bytes, max_bytes);
49 if (tx_rem_bytes == max_bytes)
61 rx_bytes =
MIN(rx_rem_bytes, rx_bytes);
121 rx_fifo_status =
read32(&
regs->geni_rx_fifo_status);
156 unsigned int rx_rem_bytes = din ? size : 0;
157 unsigned int tx_rem_bytes = dout ? size : 0;
165 - rx_rem_bytes, rx_rem_bytes);
168 - tx_rem_bytes, tx_rem_bytes);
176 if (!(m_irq &
M_CMD_DONE_EN) || tx_rem_bytes || rx_rem_bytes) {
static void write32(void *addr, uint32_t val)
static uint32_t read32(const void *addr)
#define printk(level,...)
void buffer_from_fifo32(void *buffer, size_t size, void *fifo, int fifo_stride, int fifo_width)
static void buffer_to_fifo32(const void *buffer, size_t size, void *fifo, int fifo_stride, int fifo_width)
static int stopwatch_expired(struct stopwatch *sw)
static void stopwatch_init_msecs_expire(struct stopwatch *sw, long ms)
static void stopwatch_init_usecs_expire(struct stopwatch *sw, long us)
#define BIOS_INFO
BIOS_INFO - Expected events.
static int handle_tx(unsigned int bus, const u8 *dout, unsigned int tx_rem_bytes)
u32 qup_wait_for_s_irq(unsigned int bus)
static int handle_rx(unsigned int bus, u8 *din, unsigned int rx_rem_bytes)
void qup_m_cancel_and_abort(unsigned int bus)
u32 qup_wait_for_m_irq(unsigned int bus)
int qup_handle_transfer(unsigned int bus, const void *dout, void *din, int size, struct stopwatch *timeout)
void qup_s_cancel_and_abort(unsigned int bus)
#define M_TX_FIFO_WATERMARK_EN
#define S_GENI_CMD_CANCEL
#define M_RX_FIFO_WATERMARK_EN
#define M_RX_FIFO_LAST_EN
#define BYTES_PER_FIFO_WORD
#define M_GENI_CMD_CANCEL