static int u32_writer(struct driver_data *drv_data) { void __iomem *reg = drv_data->ioaddr; if (is_tx_fifo_full(drv_data) || (drv_data->tx == drv_data->tx_end)) return 0; write_SSDR(*(u32 *)(drv_data->tx), reg); drv_data->tx += 4; return 1; }
static int u32_writer(struct driver_data *drv_data) { void __iomem *reg = drv_data->ioaddr; if (((read_SSSR(reg) & SSSR_TFL_MASK) == SSSR_TFL_MASK) || (drv_data->tx == drv_data->tx_end)) return 0; write_SSDR(*(u32 *)(drv_data->tx), reg); drv_data->tx += 4; return 1; }
static int u16_writer(struct driver_data *drv_data) { void __iomem *reg = drv_data->ioaddr; if (((read_SSSR(reg) & 0x00000f00) == 0x00000f00) || (drv_data->tx == drv_data->tx_end)) return 0; write_SSDR(*(u16 *)(drv_data->tx), reg); drv_data->tx += 2; return 1; }
static int null_writer(struct driver_data *drv_data) { void __iomem *reg = drv_data->ioaddr; u8 n_bytes = drv_data->n_bytes; if (is_tx_fifo_full(drv_data) || (drv_data->tx == drv_data->tx_end)) return 0; write_SSDR(0, reg); drv_data->tx += n_bytes; return 1; }
static int null_writer(struct driver_data *drv_data) { void __iomem *reg = drv_data->ioaddr; u8 n_bytes = drv_data->n_bytes; if (((read_SSSR(reg) & SSSR_TFL_MASK) == SSSR_TFL_MASK) || (drv_data->tx == drv_data->tx_end)) return 0; write_SSDR(0, reg); drv_data->tx += n_bytes; return 1; }