return copied;
}
+static bool sci_is_rsci_type(u8 type)
+{
+ return (type == SCI_PORT_RSCI);
+}
+
static int sci_handle_fifo_overrun(struct uart_port *port)
{
struct tty_port *tport = &port->state->port;
int copied = 0;
u32 status;
- if (s->type != SCI_PORT_RSCI) {
+ if (!sci_is_rsci_type(s->type)) {
reg = sci_getreg(port, s->params->overrun_reg);
if (!reg->size)
return 0;
status = s->ops->read_reg(port, s->params->overrun_reg);
if (status & s->params->overrun_mask) {
- if (s->type == SCI_PORT_RSCI) {
+ if (sci_is_rsci_type(s->type)) {
/*
* All of the CFCLR_*C clearing bits match the corresponding
* CSR_*status bits. So, reuse the overrun mask for clearing.
unsigned long flags;
u32 ctrl;
- if (s->type != PORT_SCI && s->type != SCI_PORT_RSCI)
+ if (s->type != PORT_SCI && !sci_is_rsci_type(s->type))
return sci_tx_interrupt(irq, ptr);
uart_port_lock_irqsave(port, &flags);
* The fourth interrupt on SCI and RSCI port is transmit end interrupt, so
* shuffle the interrupts.
*/
- if (p->type == PORT_SCI || p->type == SCI_PORT_RSCI)
+ if (p->type == PORT_SCI || sci_is_rsci_type(p->type))
swap(sci_port->irqs[SCIx_BRI_IRQ], sci_port->irqs[SCIx_TEI_IRQ]);
/* The SCI generates several interrupts. They can be muxed together or