blob: f11dc3a0b075934a9866b2c328098c8730956970 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Simon Glass87aae882016-01-18 19:52:19 -07002/*
3 * Copyright (c) 2015 Google, Inc
4 * (C) Copyright 2015
5 * Bernecker & Rainer Industrieelektronik GmbH - http://www.br-automation.com
Dzmitry Sankouskiaea2d2d2023-03-07 13:21:11 +03006 * (C) Copyright 2023 Dzmitry Sankouski <dsankouski@gmail.com>
Simon Glass87aae882016-01-18 19:52:19 -07007 */
8
Janne Grunau5548c362024-03-16 22:50:19 +01009#include <charset.h>
Simon Glass87aae882016-01-18 19:52:19 -070010#include <dm.h>
11#include <video.h>
12#include <video_console.h>
13#include <video_font.h> /* Get font data, width and height */
Dzmitry Sankouskiaea2d2d2023-03-07 13:21:11 +030014#include "vidconsole_internal.h"
Simon Glass87aae882016-01-18 19:52:19 -070015
16static int console_set_row_1(struct udevice *dev, uint row, int clr)
17{
18 struct video_priv *vid_priv = dev_get_uclass_priv(dev->parent);
Dzmitry Sankouski7fa964a2023-03-07 13:21:14 +030019 struct console_simple_priv *priv = dev_get_priv(dev);
20 struct video_fontdata *fontdata = priv->fontdata;
Simon Glass87aae882016-01-18 19:52:19 -070021 int pbytes = VNBYTES(vid_priv->bpix);
Dzmitry Sankouskiaea2d2d2023-03-07 13:21:11 +030022 void *start, *dst, *line;
Simon Glass87aae882016-01-18 19:52:19 -070023 int i, j;
Simon Glass42301da2020-07-02 21:12:26 -060024 int ret;
Simon Glass87aae882016-01-18 19:52:19 -070025
Simon Glass42301da2020-07-02 21:12:26 -060026 start = vid_priv->fb + vid_priv->line_length -
Dzmitry Sankouski7fa964a2023-03-07 13:21:14 +030027 (row + 1) * fontdata->height * pbytes;
Simon Glass42301da2020-07-02 21:12:26 -060028 line = start;
Simon Glass87aae882016-01-18 19:52:19 -070029 for (j = 0; j < vid_priv->ysize; j++) {
Dzmitry Sankouskiaea2d2d2023-03-07 13:21:11 +030030 dst = line;
Dzmitry Sankouski7fa964a2023-03-07 13:21:14 +030031 for (i = 0; i < fontdata->height; i++)
Dzmitry Sankouskiaea2d2d2023-03-07 13:21:11 +030032 fill_pixel_and_goto_next(&dst, clr, pbytes, pbytes);
Simon Glass87aae882016-01-18 19:52:19 -070033 line += vid_priv->line_length;
34 }
Simon Glass42301da2020-07-02 21:12:26 -060035 ret = vidconsole_sync_copy(dev, start, line);
36 if (ret)
37 return ret;
Simon Glass87aae882016-01-18 19:52:19 -070038
Alexander Graf1b47cf22022-06-10 00:59:17 +020039 video_damage(dev->parent,
40 vid_priv->xsize - ((row + 1) * fontdata->height),
41 0,
42 fontdata->height,
43 vid_priv->ysize);
44
Simon Glass87aae882016-01-18 19:52:19 -070045 return 0;
46}
47
48static int console_move_rows_1(struct udevice *dev, uint rowdst, uint rowsrc,
Dzmitry Sankouskiaea2d2d2023-03-07 13:21:11 +030049 uint count)
Simon Glass87aae882016-01-18 19:52:19 -070050{
51 struct video_priv *vid_priv = dev_get_uclass_priv(dev->parent);
Dzmitry Sankouski7fa964a2023-03-07 13:21:14 +030052 struct console_simple_priv *priv = dev_get_priv(dev);
53 struct video_fontdata *fontdata = priv->fontdata;
Simon Glass80daa3f2020-07-02 21:12:16 -060054 int pbytes = VNBYTES(vid_priv->bpix);
Simon Glass87aae882016-01-18 19:52:19 -070055 void *dst;
56 void *src;
Simon Glass42301da2020-07-02 21:12:26 -060057 int j, ret;
Simon Glass87aae882016-01-18 19:52:19 -070058
59 dst = vid_priv->fb + vid_priv->line_length -
Dzmitry Sankouski7fa964a2023-03-07 13:21:14 +030060 (rowdst + count) * fontdata->height * pbytes;
Simon Glass87aae882016-01-18 19:52:19 -070061 src = vid_priv->fb + vid_priv->line_length -
Dzmitry Sankouski7fa964a2023-03-07 13:21:14 +030062 (rowsrc + count) * fontdata->height * pbytes;
Simon Glass87aae882016-01-18 19:52:19 -070063
64 for (j = 0; j < vid_priv->ysize; j++) {
Simon Glass42301da2020-07-02 21:12:26 -060065 ret = vidconsole_memmove(dev, dst, src,
Dzmitry Sankouski7fa964a2023-03-07 13:21:14 +030066 fontdata->height * pbytes * count);
Simon Glass42301da2020-07-02 21:12:26 -060067 if (ret)
68 return ret;
Simon Glass87aae882016-01-18 19:52:19 -070069 src += vid_priv->line_length;
70 dst += vid_priv->line_length;
71 }
72
Alexander Graf1b47cf22022-06-10 00:59:17 +020073 video_damage(dev->parent,
74 vid_priv->xsize - ((rowdst + count) * fontdata->height),
75 0,
76 count * fontdata->height,
77 vid_priv->ysize);
78
Simon Glass87aae882016-01-18 19:52:19 -070079 return 0;
80}
81
Janne Grunau5548c362024-03-16 22:50:19 +010082static int console_putc_xy_1(struct udevice *dev, uint x_frac, uint y, int cp)
Simon Glass87aae882016-01-18 19:52:19 -070083{
Simon Glass52c10c52016-01-14 18:10:37 -070084 struct vidconsole_priv *vc_priv = dev_get_uclass_priv(dev);
Simon Glass87aae882016-01-18 19:52:19 -070085 struct udevice *vid = dev->parent;
86 struct video_priv *vid_priv = dev_get_uclass_priv(vid);
Dzmitry Sankouski7fa964a2023-03-07 13:21:14 +030087 struct console_simple_priv *priv = dev_get_priv(dev);
88 struct video_fontdata *fontdata = priv->fontdata;
Simon Glass87aae882016-01-18 19:52:19 -070089 int pbytes = VNBYTES(vid_priv->bpix);
Dzmitry Sankouskiaea2d2d2023-03-07 13:21:11 +030090 int x, linenum, ret;
Simon Glass42301da2020-07-02 21:12:26 -060091 void *start, *line;
Janne Grunau5548c362024-03-16 22:50:19 +010092 u8 ch = console_utf_to_cp437(cp);
Dzmitry Sankouski7fa964a2023-03-07 13:21:14 +030093 uchar *pfont = fontdata->video_fontdata +
Janne Grunau5548c362024-03-16 22:50:19 +010094 ch * fontdata->char_pixel_bytes;
Simon Glass87aae882016-01-18 19:52:19 -070095
Dzmitry Sankouskiaea2d2d2023-03-07 13:21:11 +030096 if (x_frac + VID_TO_POS(vc_priv->x_charsize) > vc_priv->xsize_frac)
97 return -EAGAIN;
Simon Glass80daa3f2020-07-02 21:12:16 -060098 linenum = VID_TO_PIXEL(x_frac) + 1;
99 x = y + 1;
Simon Glass42301da2020-07-02 21:12:26 -0600100 start = vid_priv->fb + linenum * vid_priv->line_length - x * pbytes;
101 line = start;
Simon Glass87aae882016-01-18 19:52:19 -0700102
Dzmitry Sankouski7fa964a2023-03-07 13:21:14 +0300103 ret = fill_char_horizontally(pfont, &line, vid_priv, fontdata, FLIPPED_DIRECTION);
Dzmitry Sankouskiaea2d2d2023-03-07 13:21:11 +0300104 if (ret)
105 return ret;
Simon Glass87aae882016-01-18 19:52:19 -0700106
Simon Glass42301da2020-07-02 21:12:26 -0600107 /* We draw backwards from 'start, so account for the first line */
108 ret = vidconsole_sync_copy(dev, start - vid_priv->line_length, line);
109 if (ret)
110 return ret;
Simon Glass87aae882016-01-18 19:52:19 -0700111
Alexander Graf1b47cf22022-06-10 00:59:17 +0200112 video_damage(dev->parent,
113 vid_priv->xsize - y - fontdata->height,
114 linenum - 1,
115 fontdata->height,
116 fontdata->width);
117
Dzmitry Sankouski7fa964a2023-03-07 13:21:14 +0300118 return VID_TO_POS(fontdata->width);
Simon Glass87aae882016-01-18 19:52:19 -0700119}
120
Simon Glass87aae882016-01-18 19:52:19 -0700121static int console_set_row_2(struct udevice *dev, uint row, int clr)
122{
123 struct video_priv *vid_priv = dev_get_uclass_priv(dev->parent);
Dzmitry Sankouski7fa964a2023-03-07 13:21:14 +0300124 struct console_simple_priv *priv = dev_get_priv(dev);
125 struct video_fontdata *fontdata = priv->fontdata;
Dzmitry Sankouskiaea2d2d2023-03-07 13:21:11 +0300126 void *start, *line, *dst, *end;
Dzmitry Sankouski7fa964a2023-03-07 13:21:14 +0300127 int pixels = fontdata->height * vid_priv->xsize;
Simon Glass42301da2020-07-02 21:12:26 -0600128 int i, ret;
Dzmitry Sankouskiaea2d2d2023-03-07 13:21:11 +0300129 int pbytes = VNBYTES(vid_priv->bpix);
Simon Glass87aae882016-01-18 19:52:19 -0700130
Simon Glass42301da2020-07-02 21:12:26 -0600131 start = vid_priv->fb + vid_priv->ysize * vid_priv->line_length -
Dzmitry Sankouski7fa964a2023-03-07 13:21:14 +0300132 (row + 1) * fontdata->height * vid_priv->line_length;
Simon Glass42301da2020-07-02 21:12:26 -0600133 line = start;
Dzmitry Sankouskiaea2d2d2023-03-07 13:21:11 +0300134 dst = line;
135 for (i = 0; i < pixels; i++)
136 fill_pixel_and_goto_next(&dst, clr, pbytes, pbytes);
137 end = dst;
Simon Glass42301da2020-07-02 21:12:26 -0600138 ret = vidconsole_sync_copy(dev, start, end);
139 if (ret)
140 return ret;
Simon Glass87aae882016-01-18 19:52:19 -0700141
Alexander Graf1b47cf22022-06-10 00:59:17 +0200142 video_damage(dev->parent,
143 0,
144 vid_priv->ysize - (row + 1) * fontdata->height,
145 vid_priv->xsize,
146 fontdata->height);
147
Simon Glass87aae882016-01-18 19:52:19 -0700148 return 0;
149}
150
151static int console_move_rows_2(struct udevice *dev, uint rowdst, uint rowsrc,
152 uint count)
153{
154 struct video_priv *vid_priv = dev_get_uclass_priv(dev->parent);
Dzmitry Sankouski7fa964a2023-03-07 13:21:14 +0300155 struct console_simple_priv *priv = dev_get_priv(dev);
156 struct video_fontdata *fontdata = priv->fontdata;
Simon Glass87aae882016-01-18 19:52:19 -0700157 void *dst;
158 void *src;
159 void *end;
160
161 end = vid_priv->fb + vid_priv->ysize * vid_priv->line_length;
Dzmitry Sankouski7fa964a2023-03-07 13:21:14 +0300162 dst = end - (rowdst + count) * fontdata->height *
Simon Glass87aae882016-01-18 19:52:19 -0700163 vid_priv->line_length;
Dzmitry Sankouski7fa964a2023-03-07 13:21:14 +0300164 src = end - (rowsrc + count) * fontdata->height *
Simon Glass87aae882016-01-18 19:52:19 -0700165 vid_priv->line_length;
Simon Glass42301da2020-07-02 21:12:26 -0600166 vidconsole_memmove(dev, dst, src,
Dzmitry Sankouski7fa964a2023-03-07 13:21:14 +0300167 fontdata->height * vid_priv->line_length * count);
Simon Glass87aae882016-01-18 19:52:19 -0700168
Alexander Graf1b47cf22022-06-10 00:59:17 +0200169 video_damage(dev->parent,
170 0,
171 vid_priv->ysize - (rowdst + count) * fontdata->height,
172 vid_priv->xsize,
173 count * fontdata->height);
174
Simon Glass87aae882016-01-18 19:52:19 -0700175 return 0;
176}
177
Janne Grunau5548c362024-03-16 22:50:19 +0100178static int console_putc_xy_2(struct udevice *dev, uint x_frac, uint y, int cp)
Simon Glass87aae882016-01-18 19:52:19 -0700179{
Simon Glass52c10c52016-01-14 18:10:37 -0700180 struct vidconsole_priv *vc_priv = dev_get_uclass_priv(dev);
Simon Glass87aae882016-01-18 19:52:19 -0700181 struct udevice *vid = dev->parent;
182 struct video_priv *vid_priv = dev_get_uclass_priv(vid);
Dzmitry Sankouski7fa964a2023-03-07 13:21:14 +0300183 struct console_simple_priv *priv = dev_get_priv(dev);
184 struct video_fontdata *fontdata = priv->fontdata;
Simon Glass80daa3f2020-07-02 21:12:16 -0600185 int pbytes = VNBYTES(vid_priv->bpix);
Dzmitry Sankouskiaea2d2d2023-03-07 13:21:11 +0300186 int linenum, x, ret;
Simon Glass42301da2020-07-02 21:12:26 -0600187 void *start, *line;
Janne Grunau5548c362024-03-16 22:50:19 +0100188 u8 ch = console_utf_to_cp437(cp);
Dzmitry Sankouski7fa964a2023-03-07 13:21:14 +0300189 uchar *pfont = fontdata->video_fontdata +
Janne Grunau5548c362024-03-16 22:50:19 +0100190 ch * fontdata->char_pixel_bytes;
Simon Glass87aae882016-01-18 19:52:19 -0700191
Simon Glass52c10c52016-01-14 18:10:37 -0700192 if (x_frac + VID_TO_POS(vc_priv->x_charsize) > vc_priv->xsize_frac)
193 return -EAGAIN;
Simon Glass80daa3f2020-07-02 21:12:16 -0600194 linenum = vid_priv->ysize - y - 1;
Simon Glassf50a6b92020-07-02 21:12:17 -0600195 x = vid_priv->xsize - VID_TO_PIXEL(x_frac) - 1;
Simon Glass42301da2020-07-02 21:12:26 -0600196 start = vid_priv->fb + linenum * vid_priv->line_length + x * pbytes;
197 line = start;
Simon Glass87aae882016-01-18 19:52:19 -0700198
Dzmitry Sankouski7fa964a2023-03-07 13:21:14 +0300199 ret = fill_char_vertically(pfont, &line, vid_priv, fontdata, FLIPPED_DIRECTION);
Dzmitry Sankouskiaea2d2d2023-03-07 13:21:11 +0300200 if (ret)
201 return ret;
Simon Glass87aae882016-01-18 19:52:19 -0700202
Simon Glass42301da2020-07-02 21:12:26 -0600203 /* Add 4 bytes to allow for the first pixel writen */
204 ret = vidconsole_sync_copy(dev, start + 4, line);
205 if (ret)
206 return ret;
Simon Glass87aae882016-01-18 19:52:19 -0700207
Alexander Graf1b47cf22022-06-10 00:59:17 +0200208 video_damage(dev->parent,
209 x - fontdata->width + 1,
210 linenum - fontdata->height + 1,
211 fontdata->width,
212 fontdata->height);
213
Dzmitry Sankouski7fa964a2023-03-07 13:21:14 +0300214 return VID_TO_POS(fontdata->width);
Simon Glass87aae882016-01-18 19:52:19 -0700215}
216
217static int console_set_row_3(struct udevice *dev, uint row, int clr)
218{
219 struct video_priv *vid_priv = dev_get_uclass_priv(dev->parent);
Dzmitry Sankouski7fa964a2023-03-07 13:21:14 +0300220 struct console_simple_priv *priv = dev_get_priv(dev);
221 struct video_fontdata *fontdata = priv->fontdata;
Simon Glass87aae882016-01-18 19:52:19 -0700222 int pbytes = VNBYTES(vid_priv->bpix);
Dzmitry Sankouskiaea2d2d2023-03-07 13:21:11 +0300223 void *start, *dst, *line;
Simon Glass42301da2020-07-02 21:12:26 -0600224 int i, j, ret;
Simon Glass87aae882016-01-18 19:52:19 -0700225
Dzmitry Sankouski7fa964a2023-03-07 13:21:14 +0300226 start = vid_priv->fb + row * fontdata->height * pbytes;
Simon Glass42301da2020-07-02 21:12:26 -0600227 line = start;
Simon Glass87aae882016-01-18 19:52:19 -0700228 for (j = 0; j < vid_priv->ysize; j++) {
Dzmitry Sankouskiaea2d2d2023-03-07 13:21:11 +0300229 dst = line;
Dzmitry Sankouski7fa964a2023-03-07 13:21:14 +0300230 for (i = 0; i < fontdata->height; i++)
Dzmitry Sankouskiaea2d2d2023-03-07 13:21:11 +0300231 fill_pixel_and_goto_next(&dst, clr, pbytes, pbytes);
Simon Glass87aae882016-01-18 19:52:19 -0700232 line += vid_priv->line_length;
233 }
Simon Glass42301da2020-07-02 21:12:26 -0600234 ret = vidconsole_sync_copy(dev, start, line);
235 if (ret)
236 return ret;
Simon Glass87aae882016-01-18 19:52:19 -0700237
Alexander Graf1b47cf22022-06-10 00:59:17 +0200238 video_damage(dev->parent,
239 row * fontdata->height,
240 0,
241 fontdata->height,
242 vid_priv->ysize);
243
Simon Glass87aae882016-01-18 19:52:19 -0700244 return 0;
245}
246
247static int console_move_rows_3(struct udevice *dev, uint rowdst, uint rowsrc,
248 uint count)
249{
250 struct video_priv *vid_priv = dev_get_uclass_priv(dev->parent);
Dzmitry Sankouski7fa964a2023-03-07 13:21:14 +0300251 struct console_simple_priv *priv = dev_get_priv(dev);
252 struct video_fontdata *fontdata = priv->fontdata;
Simon Glass80daa3f2020-07-02 21:12:16 -0600253 int pbytes = VNBYTES(vid_priv->bpix);
Simon Glass87aae882016-01-18 19:52:19 -0700254 void *dst;
255 void *src;
Simon Glass42301da2020-07-02 21:12:26 -0600256 int j, ret;
Simon Glass87aae882016-01-18 19:52:19 -0700257
Dzmitry Sankouski7fa964a2023-03-07 13:21:14 +0300258 dst = vid_priv->fb + rowdst * fontdata->height * pbytes;
259 src = vid_priv->fb + rowsrc * fontdata->height * pbytes;
Simon Glass87aae882016-01-18 19:52:19 -0700260
261 for (j = 0; j < vid_priv->ysize; j++) {
Simon Glass42301da2020-07-02 21:12:26 -0600262 ret = vidconsole_memmove(dev, dst, src,
Dzmitry Sankouski7fa964a2023-03-07 13:21:14 +0300263 fontdata->height * pbytes * count);
Simon Glass42301da2020-07-02 21:12:26 -0600264 if (ret)
265 return ret;
Simon Glass87aae882016-01-18 19:52:19 -0700266 src += vid_priv->line_length;
267 dst += vid_priv->line_length;
268 }
269
Alexander Graf1b47cf22022-06-10 00:59:17 +0200270 video_damage(dev->parent,
271 rowdst * fontdata->height,
272 0,
273 count * fontdata->height,
274 vid_priv->ysize);
275
Simon Glass87aae882016-01-18 19:52:19 -0700276 return 0;
277}
278
Janne Grunau5548c362024-03-16 22:50:19 +0100279static int console_putc_xy_3(struct udevice *dev, uint x_frac, uint y, int cp)
Simon Glass87aae882016-01-18 19:52:19 -0700280{
Simon Glass52c10c52016-01-14 18:10:37 -0700281 struct vidconsole_priv *vc_priv = dev_get_uclass_priv(dev);
Simon Glass87aae882016-01-18 19:52:19 -0700282 struct udevice *vid = dev->parent;
283 struct video_priv *vid_priv = dev_get_uclass_priv(vid);
Dzmitry Sankouski7fa964a2023-03-07 13:21:14 +0300284 struct console_simple_priv *priv = dev_get_priv(dev);
285 struct video_fontdata *fontdata = priv->fontdata;
Simon Glass87aae882016-01-18 19:52:19 -0700286 int pbytes = VNBYTES(vid_priv->bpix);
Dzmitry Sankouskiaea2d2d2023-03-07 13:21:11 +0300287 int linenum, x, ret;
Simon Glass42301da2020-07-02 21:12:26 -0600288 void *start, *line;
Janne Grunau5548c362024-03-16 22:50:19 +0100289 u8 ch = console_utf_to_cp437(cp);
Dzmitry Sankouski7fa964a2023-03-07 13:21:14 +0300290 uchar *pfont = fontdata->video_fontdata +
Janne Grunau5548c362024-03-16 22:50:19 +0100291 ch * fontdata->char_pixel_bytes;
Simon Glass87aae882016-01-18 19:52:19 -0700292
Simon Glass52c10c52016-01-14 18:10:37 -0700293 if (x_frac + VID_TO_POS(vc_priv->x_charsize) > vc_priv->xsize_frac)
294 return -EAGAIN;
Dzmitry Sankouskiaea2d2d2023-03-07 13:21:11 +0300295 x = y;
296 linenum = vid_priv->ysize - VID_TO_PIXEL(x_frac) - 1;
297 start = vid_priv->fb + linenum * vid_priv->line_length + y * pbytes;
Simon Glass42301da2020-07-02 21:12:26 -0600298 line = start;
Simon Glass87aae882016-01-18 19:52:19 -0700299
Dzmitry Sankouski7fa964a2023-03-07 13:21:14 +0300300 ret = fill_char_horizontally(pfont, &line, vid_priv, fontdata, NORMAL_DIRECTION);
Dzmitry Sankouskiaea2d2d2023-03-07 13:21:11 +0300301 if (ret)
302 return ret;
Simon Glass42301da2020-07-02 21:12:26 -0600303 /* Add a line to allow for the first pixels writen */
304 ret = vidconsole_sync_copy(dev, start + vid_priv->line_length, line);
305 if (ret)
306 return ret;
Simon Glass87aae882016-01-18 19:52:19 -0700307
Alexander Graf1b47cf22022-06-10 00:59:17 +0200308 video_damage(dev->parent,
309 y,
310 linenum - fontdata->width + 1,
311 fontdata->height,
312 fontdata->width);
313
Dzmitry Sankouski7fa964a2023-03-07 13:21:14 +0300314 return VID_TO_POS(fontdata->width);
Simon Glass87aae882016-01-18 19:52:19 -0700315}
316
Simon Glass87aae882016-01-18 19:52:19 -0700317struct vidconsole_ops console_ops_1 = {
318 .putc_xy = console_putc_xy_1,
319 .move_rows = console_move_rows_1,
320 .set_row = console_set_row_1,
Dzmitry Sankouskibb165e42023-03-07 13:21:16 +0300321 .get_font_size = console_simple_get_font_size,
322 .get_font = console_simple_get_font,
323 .select_font = console_simple_select_font,
Simon Glass87aae882016-01-18 19:52:19 -0700324};
325
326struct vidconsole_ops console_ops_2 = {
327 .putc_xy = console_putc_xy_2,
328 .move_rows = console_move_rows_2,
329 .set_row = console_set_row_2,
Dzmitry Sankouskibb165e42023-03-07 13:21:16 +0300330 .get_font_size = console_simple_get_font_size,
331 .get_font = console_simple_get_font,
332 .select_font = console_simple_select_font,
Simon Glass87aae882016-01-18 19:52:19 -0700333};
334
335struct vidconsole_ops console_ops_3 = {
336 .putc_xy = console_putc_xy_3,
337 .move_rows = console_move_rows_3,
338 .set_row = console_set_row_3,
Dzmitry Sankouskibb165e42023-03-07 13:21:16 +0300339 .get_font_size = console_simple_get_font_size,
340 .get_font = console_simple_get_font,
341 .select_font = console_simple_select_font,
Simon Glass87aae882016-01-18 19:52:19 -0700342};
343
344U_BOOT_DRIVER(vidconsole_1) = {
345 .name = "vidconsole1",
346 .id = UCLASS_VIDEO_CONSOLE,
347 .ops = &console_ops_1,
Dzmitry Sankouskiaea2d2d2023-03-07 13:21:11 +0300348 .probe = console_probe,
Dzmitry Sankouski7fa964a2023-03-07 13:21:14 +0300349 .priv_auto = sizeof(struct console_simple_priv),
Simon Glass87aae882016-01-18 19:52:19 -0700350};
351
352U_BOOT_DRIVER(vidconsole_2) = {
353 .name = "vidconsole2",
354 .id = UCLASS_VIDEO_CONSOLE,
355 .ops = &console_ops_2,
Dzmitry Sankouskiaea2d2d2023-03-07 13:21:11 +0300356 .probe = console_probe,
Dzmitry Sankouski7fa964a2023-03-07 13:21:14 +0300357 .priv_auto = sizeof(struct console_simple_priv),
Simon Glass87aae882016-01-18 19:52:19 -0700358};
359
360U_BOOT_DRIVER(vidconsole_3) = {
361 .name = "vidconsole3",
362 .id = UCLASS_VIDEO_CONSOLE,
363 .ops = &console_ops_3,
Dzmitry Sankouskiaea2d2d2023-03-07 13:21:11 +0300364 .probe = console_probe,
Dzmitry Sankouski7fa964a2023-03-07 13:21:14 +0300365 .priv_auto = sizeof(struct console_simple_priv),
Simon Glass87aae882016-01-18 19:52:19 -0700366};