/* NOTE: Mode 1 should be used for baudrates of 19200, and above, as it has a lower deviation error than Mode 0 for higher frequencies. Mode 0 should be used for all baudrates below 19200.  */
static int sti_asc_pending(struct udevice *dev, bool input)
/* NOTE: Mode 1 should be used for baudrates of 19200, and above, as it has a lower deviation error than Mode 0 for higher frequencies. Mode 0 should be used for all baudrates below 19200.  */
static int sti_asc_pending(struct udevice *dev, bool input)
{
	struct sti_asc_serial *priv = dev_get_priv(dev);
	struct sti_asc_uart *const uart = priv->regs;
	unsigned long status;
	status = readl(&uart->status);
	if (input)
		return status & STA_RBF;
	else
		return status & STA_TF;
}