コード例 #1
0
ファイル: uartlite.c プロジェクト: 274914765/C
static irqreturn_t ulite_isr(int irq, void *dev_id)
{
    struct uart_port *port = dev_id;
    int busy;

    do {
        int stat = readb(port->membase + ULITE_STATUS);
        busy  = ulite_receive(port, stat);
        busy |= ulite_transmit(port, stat);
    } while (busy);

    tty_flip_buffer_push(port->info->tty);

    return IRQ_HANDLED;
}
コード例 #2
0
static irqreturn_t ulite_isr(int irq, void *dev_id)
{
	struct uart_port *port = dev_id;
	int busy, n = 0;

	do {
		int stat = readb(port->membase + ULITE_STATUS);
		busy  = ulite_receive(port, stat);
		busy |= ulite_transmit(port, stat);
		n++;
	} while (busy);

	
	if (n > 1) {
		tty_flip_buffer_push(port->state->port.tty);
		return IRQ_HANDLED;
	} else {
		return IRQ_NONE;
	}
}
コード例 #3
0
static irqreturn_t ulite_isr(int irq, void *dev_id)
{
	struct uart_port *port = dev_id;
	int busy, n = 0;

	do {
		int stat = uart_in32(ULITE_STATUS, port);
		busy  = ulite_receive(port, stat);
		busy |= ulite_transmit(port, stat);
		n++;
	} while (busy);

	/* work done? */
	if (n > 1) {
		tty_flip_buffer_push(&port->state->port);
		return IRQ_HANDLED;
	} else {
		return IRQ_NONE;
	}
}
コード例 #4
0
ファイル: uartlite.c プロジェクト: vucan/linux
static irqreturn_t ulite_isr(int irq, void *dev_id)
{
    struct uart_port *port = dev_id;
    int stat, busy, n = 0;
    unsigned long flags;

    do {
        spin_lock_irqsave(&port->lock, flags);
        stat = uart_in32(ULITE_STATUS, port);
        busy  = ulite_receive(port, stat);
        busy |= ulite_transmit(port, stat);
        spin_unlock_irqrestore(&port->lock, flags);
        n++;
    } while (busy);

    /* work done? */
    if (n > 1) {
        tty_flip_buffer_push(&port->state->port);
        return IRQ_HANDLED;
    } else {
        return IRQ_NONE;
    }
}
コード例 #5
0
ファイル: uartlite.c プロジェクト: vucan/linux
static void ulite_start_tx(struct uart_port *port)
{
    ulite_transmit(port, uart_in32(ULITE_STATUS, port));
}
コード例 #6
0
static void ulite_start_tx(struct uart_port *port)
{
	ulite_transmit(port, readb(port->membase + ULITE_STATUS));
}