Source
522
522
default:
523
523
ret = vidconsole_output_glyph(dev, ch);
524
524
if (ret < 0)
525
525
return ret;
526
526
break;
527
527
}
528
528
529
529
return 0;
530
530
}
531
531
532
+
int vidconsole_put_string(struct udevice *dev, const char *str)
533
+
{
534
+
const char *s;
535
+
int ret;
536
+
537
+
for (s = str; *s; s++) {
538
+
ret = vidconsole_put_char(dev, *s);
539
+
if (ret)
540
+
return ret;
541
+
}
542
+
543
+
return 0;
544
+
}
545
+
532
546
static void vidconsole_putc(struct stdio_dev *sdev, const char ch)
533
547
{
534
548
struct udevice *dev = sdev->priv;
535
549
536
550
vidconsole_put_char(dev, ch);
537
551
video_sync(dev->parent, false);
538
552
}
539
553
540
554
static void vidconsole_puts(struct stdio_dev *sdev, const char *s)
541
555
{
542
556
struct udevice *dev = sdev->priv;
543
557
544
-
while (*s)
545
-
vidconsole_put_char(dev, *s++);
558
+
vidconsole_put_string(dev, s);
546
559
video_sync(dev->parent, false);
547
560
}
548
561
549
562
/* Set up the number of rows and colours (rotated drivers override this) */
550
563
static int vidconsole_pre_probe(struct udevice *dev)
551
564
{
552
565
struct vidconsole_priv *priv = dev_get_uclass_priv(dev);
553
566
struct udevice *vid = dev->parent;
554
567
struct video_priv *vid_priv = dev_get_uclass_priv(vid);
555
568