2 * linux/drivers/video/dummycon.c -- A dummy console driver
4 * To be used if there's no other console driver (e.g. for plain VGA text)
5 * available, usually until fbcon takes console over.
8 #include <linux/types.h>
9 #include <linux/kdev_t.h>
10 #include <linux/tty.h>
11 #include <linux/console.h>
12 #include <linux/vt_kern.h>
13 #include <linux/init.h>
14 #include <linux/module.h>
17 * Dummy console driver
21 #define DUMMY_COLUMNS ORIG_VIDEO_COLS
22 #define DUMMY_ROWS ORIG_VIDEO_LINES
23 #elif defined(__hppa__)
24 /* set by Kconfig. Use 80x25 for 640x480 and 160x64 for 1280x1024 */
25 #include <linux/config.h>
26 #define DUMMY_COLUMNS CONFIG_DUMMY_CONSOLE_COLUMNS
27 #define DUMMY_ROWS CONFIG_DUMMY_CONSOLE_ROWS
29 #define DUMMY_COLUMNS 80
33 static const char *dummycon_startup(void)
35 return "dummy device";
38 static void dummycon_init(struct vc_data
*vc
, int init
)
40 vc
->vc_can_do_color
= 1;
42 vc
->vc_cols
= DUMMY_COLUMNS
;
43 vc
->vc_rows
= DUMMY_ROWS
;
45 vc_resize(vc
, DUMMY_COLUMNS
, DUMMY_ROWS
);
48 static int dummycon_dummy(void)
53 #define DUMMY (void *)dummycon_dummy
56 * The console `switch' structure for the dummy console
58 * Most of the operations are dummies.
61 const struct consw dummy_con
= {
63 .con_startup
= dummycon_startup
,
64 .con_init
= dummycon_init
,
74 .con_font_set
= DUMMY
,
75 .con_font_get
= DUMMY
,
76 .con_font_default
= DUMMY
,
77 .con_font_copy
= DUMMY
,
78 .con_set_palette
= DUMMY
,
79 .con_scrolldelta
= DUMMY
,