/* Process all characters in the RX FIFO of the UART. Check all char status bytes as well, and process as required. We need to check all bytes in the FIFO, in case some more enter the FIFO while we are here. To get the exact character error type we need to switch into CHAR error mode (that is why we need to make sure we empty the FIFO).  */
static void stl_sc26198rxbadchars(struct stlport *portp)
/* Process all characters in the RX FIFO of the UART. Check all char status bytes as well, and process as required. We need to check all bytes in the FIFO, in case some more enter the FIFO while we are here. To get the exact character error type we need to switch into CHAR error mode (that is why we need to make sure we empty the FIFO).  */
static void stl_sc26198rxbadchars(struct stlport *portp)
{
	unsigned char	status, mr1;
	char		ch;
	mr1 = stl_sc26198getreg(portp, MR1);
	stl_sc26198setreg(portp, MR1, (mr1 & ~MR1_ERRBLOCK));
	while ((status = stl_sc26198getreg(portp, SR)) & SR_RXRDY) {
		stl_sc26198setreg(portp, SCCR, CR_CLEARRXERR);
		ch = stl_sc26198getreg(portp, RXFIFO);
		stl_sc26198rxbadch(portp, status, ch);
	}
	stl_sc26198setreg(portp, MR1, mr1);
}