initial success with uartlite w/interrupt and 2.6.18.1

robert corley rdcorle at yahoo.com
Fri Oct 27 23:38:23 EST 2006


DB;

I moved the declaration to outside the loop and now the uartlite driver sends and receives
data.  See below for details (as if it needs explaining, right?  :-))

FYI, the RS232 irq line stays high (it's level-triggered for RX data) for 9usec, although I
suspect that isn't the irq service time as it probably drops as soon as the RX fifo is read.
Still, it's good to know that it takes that long from irq start to reading a byte.

I still don't know why I could not get it to properly function in 2.6.17, although I was close 
with the latest patch you gave me.

Now on to the temac...

-cy

---------------- code follows  ----------------------

static irqreturn_t ulite_isr(int irq, void *dev_id, struct pt_regs *regs)
{
        struct uart_port *port = (struct uart_port *)dev_id;
        int busy;
        int stat;

        spin_lock(&port->lock); /* Lock the port in case of printk */

        do {
                stat = readb((unsigned volatile *) (port->membase + ULITE_STATUS_BYTE));
                busy  = ulite_receive(port, stat);
                busy |= ulite_transmit(port, stat);
        } while (busy);

        spin_unlock(&port->lock);

        tty_flip_buffer_push(port->info->tty);

        return IRQ_HANDLED;
}







More information about the Linuxppc-embedded mailing list