/* Read a single byte from the serial port. Returns 1 on success, 0 otherwise. When the function is succesfull, the character read is written into its argument c.  */
int _serial_getc(const int dev_index)
/* Read a single byte from the serial port. Returns 1 on success, 0 otherwise. When the function is succesfull, the character read is written into its argument c.  */
int _serial_getc(const int dev_index)
{
	struct s3c24x0_uart *uart = s3c24x0_get_base_uart(dev_index);
	while (!(readl(&uart->UTRSTAT) & 0x1)) ;
	return readb(&uart->URXH) & 0xff;
}