This is pre8 ...
[linux-2.6/linux-mips.git] / drivers / video / dummycon.c
blob9b54b6a76448918e1077618fe6ad75f5a5eff4b0
1 /*
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.
6 */
8 #include <linux/types.h>
9 #include <linux/kdev_t.h>
10 #include <linux/tty.h>
11 #include <linux/console.h>
12 #include <linux/console_struct.h>
13 #include <linux/vt_kern.h>
14 #include <linux/init.h>
17 * Dummy console driver
20 #if defined(__arm__)
21 #define DUMMY_COLUMNS ORIG_VIDEO_COLS
22 #define DUMMY_ROWS ORIG_VIDEO_LINES
23 #else
24 #define DUMMY_COLUMNS 80
25 #define DUMMY_ROWS 25
26 #endif
28 static const char *dummycon_startup(void)
30 return "dummy device";
33 static void dummycon_init(struct vc_data *conp, int init)
35 conp->vc_can_do_color = 1;
36 if (init) {
37 conp->vc_cols = DUMMY_COLUMNS;
38 conp->vc_rows = DUMMY_ROWS;
39 } else
40 vc_resize_con(DUMMY_ROWS, DUMMY_COLUMNS, conp->vc_num);
43 static int dummycon_dummy(void)
45 return 0;
49 * The console `switch' structure for the dummy console
51 * Most of the operations are dummies.
54 struct consw dummy_con = {
55 dummycon_startup, dummycon_init,
56 (void *)dummycon_dummy, /* con_deinit */
57 (void *)dummycon_dummy, /* con_clear */
58 (void *)dummycon_dummy, /* con_putc */
59 (void *)dummycon_dummy, /* con_putcs */
60 (void *)dummycon_dummy, /* con_cursor */
61 (void *)dummycon_dummy, /* con_scroll */
62 (void *)dummycon_dummy, /* con_bmove */
63 (void *)dummycon_dummy, /* con_switch */
64 (void *)dummycon_dummy, /* con_blank */
65 (void *)dummycon_dummy, /* con_font_op */
66 (void *)dummycon_dummy, /* con_set_palette */
67 (void *)dummycon_dummy, /* con_scrolldelta */
68 NULL, /* con_set_origin */
69 NULL, /* con_save_screen */