6 * Copyright (C) 2005 Stefan Reinauer <stepan@openbios.org>
7 * Copyright (C) 2013 Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation
16 #include "libopenbios/bindings.h"
17 #include "libopenbios/console.h"
18 #include "drivers/drivers.h"
20 /* ******************************************************************
21 * common functions, implementing simple concurrent console
22 * ****************************************************************** */
24 /* Dummy routines for when console is unassigned */
26 static int dummy_putchar(int c)
31 static int dummy_availchar(void)
36 static int dummy_getchar(void)
41 struct _console_ops console_ops = {
42 .putchar = dummy_putchar,
43 .availchar = dummy_availchar,
44 .getchar = dummy_getchar
47 #ifdef CONFIG_DEBUG_CONSOLE
49 void init_console(struct _console_ops ops)
56 return (*console_ops.putchar)(c);
61 return (*console_ops.availchar)();
66 return (*console_ops.getchar)();
68 #endif // CONFIG_DEBUG_CONSOLE