Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void serial_interrupt(int irq, void *dev_id)
- {
- ...
- // Need to loop through each port to see which port caused the interrupt.
- list_for_each(lpNode, &serial_ports)
- {
- struct serial_port_module *ser_dev = list_entry(lpNode, struct serial_port_module, port_list);
- lnIsr = ioread8(ser_dev->membase + ser_dev->chan_num * PORT_OFFSET + SERIAL_ISR);
- if (lnIsr & IPM512_RX_INT)
- {
- while (serialdata_is_data_available(ser_dev)) // equals a ioread8()
- {
- lcIn = ioread8(ser_dev->membase + ser_dev->chan_num * PORT_OFFSET + SERIAL_RBR);
- kfifo_in(&ser_dev->rx_fifo, &lcIn, sizeof(lcIn));
- // Notify if anyone is doing a blocking read.
- wake_up_interruptible(&ser_dev->read_queue);
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment