/* This routine is called whenever a serial port is opened. It enables interrupts for a serial port, linking in its async structure into the IRQ chain. It also performs the serial-specific initialization for the tty structure.  */
static void rs_poll(unsigned long)
/* This routine is called whenever a serial port is opened. It enables interrupts for a serial port, linking in its async structure into the IRQ chain. It also performs the serial-specific initialization for the tty structure.  */
static void rs_poll(unsigned long)
{
	struct tty_struct* tty = (struct tty_struct*) priv;
	struct timeval tv = { .tv_sec = 0, .tv_usec = 0 };
	int i = 0;
	unsigned char c;
	spin_lock(&timer_lock);
	while (__simc(SYS_select_one, 0, XTISS_SELECT_ONE_READ, (int)&tv,0,0)){
		__simc (SYS_read, 0, (unsigned long)&c, 1, 0, 0);
		tty_insert_flip_char(tty, c, TTY_NORMAL);
		i++;
	}
	if (i)
		tty_flip_buffer_push(tty);
	mod_timer(&serial_timer, jiffies + SERIAL_TIMER_VALUE);
	spin_unlock(&timer_lock);
}