mirror of
https://github.com/smaeul/u-boot.git
synced 2025-10-14 04:46:01 +01:00
serial: serial-uclass.c: move definition of _serial_flush up a bit
Preparation for next patch. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
This commit is contained in:
parent
2ba0f824ce
commit
1000e2f96b
@ -182,6 +182,18 @@ int serial_initialize(void)
|
|||||||
return serial_init();
|
return serial_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_CONSOLE_FLUSH_SUPPORT
|
||||||
|
static void _serial_flush(struct udevice *dev)
|
||||||
|
{
|
||||||
|
struct dm_serial_ops *ops = serial_get_ops(dev);
|
||||||
|
|
||||||
|
if (!ops->pending)
|
||||||
|
return;
|
||||||
|
while (ops->pending(dev, false) > 0)
|
||||||
|
;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static void _serial_putc(struct udevice *dev, char ch)
|
static void _serial_putc(struct udevice *dev, char ch)
|
||||||
{
|
{
|
||||||
struct dm_serial_ops *ops = serial_get_ops(dev);
|
struct dm_serial_ops *ops = serial_get_ops(dev);
|
||||||
@ -235,18 +247,6 @@ static void _serial_puts(struct udevice *dev, const char *str)
|
|||||||
} while (*str);
|
} while (*str);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_CONSOLE_FLUSH_SUPPORT
|
|
||||||
static void _serial_flush(struct udevice *dev)
|
|
||||||
{
|
|
||||||
struct dm_serial_ops *ops = serial_get_ops(dev);
|
|
||||||
|
|
||||||
if (!ops->pending)
|
|
||||||
return;
|
|
||||||
while (ops->pending(dev, false) > 0)
|
|
||||||
;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static int __serial_getc(struct udevice *dev)
|
static int __serial_getc(struct udevice *dev)
|
||||||
{
|
{
|
||||||
struct dm_serial_ops *ops = serial_get_ops(dev);
|
struct dm_serial_ops *ops = serial_get_ops(dev);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user