/* send DMA RX Req when the data byte number in RECV_FIFO reaches RX_TRIG or Read Packet Tansmission completed with RECV_FIFO not empty  */
static void twi_set_rx_trig_level(uint32_t val, const unsigned long base_addr)
/* send DMA RX Req when the data byte number in RECV_FIFO reaches RX_TRIG or Read Packet Tansmission completed with RECV_FIFO not empty  */
static void twi_set_rx_trig_level(uint32_t val, const unsigned long base_addr)
{
    uint32_t mask = TRIG_MASK;
    uint32_t reg_val = readl(base_addr + TWI_DRIVER_DMAC);
    val = (val & mask) << 16;
    reg_val &= ~(mask << 16);
    reg_val |= val;
    writel(reg_val, base_addr + TWI_DRIVER_DMAC);
}