Gerd Hoffmann | 038aa29 | 2013-05-29 13:06:22 +0200 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
| 4 | * Copyright (C) 2013 Red Hat Inc. |
| 5 | * Written by Gerd Hoffmann <kraxel@redhat.com> |
| 6 | * |
| 7 | * This program is free software; you can redistribute it and/or modify |
| 8 | * it under the terms of the GNU General Public License as published by |
| 9 | * the Free Software Foundation; version 2 of the License. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
| 15 | * |
| 16 | * You should have received a copy of the GNU General Public License |
| 17 | * along with this program; if not, write to the Free Software |
| 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 19 | */ |
| 20 | |
| 21 | #include <console/console.h> |
Kyösti Mälkki | 03731d7 | 2014-02-02 19:12:14 +0200 | [diff] [blame] | 22 | #include <console/qemu_debugcon.h> |
Gerd Hoffmann | 22f01e6 | 2013-05-30 10:33:38 +0200 | [diff] [blame] | 23 | |
Gerd Hoffmann | 038aa29 | 2013-05-29 13:06:22 +0200 | [diff] [blame] | 24 | static void debugcon_init(void) |
| 25 | { |
Kyösti Mälkki | 03731d7 | 2014-02-02 19:12:14 +0200 | [diff] [blame] | 26 | qemu_debugcon_init(); |
Gerd Hoffmann | 038aa29 | 2013-05-29 13:06:22 +0200 | [diff] [blame] | 27 | } |
| 28 | |
| 29 | static void debugcon_tx_byte(unsigned char data) |
| 30 | { |
Kyösti Mälkki | 03731d7 | 2014-02-02 19:12:14 +0200 | [diff] [blame] | 31 | qemu_debugcon_tx_byte(data); |
Gerd Hoffmann | 038aa29 | 2013-05-29 13:06:22 +0200 | [diff] [blame] | 32 | } |
| 33 | |
| 34 | static const struct console_driver debugcon_console __console = { |
| 35 | .init = debugcon_init, |
| 36 | .tx_byte = debugcon_tx_byte, |
Gerd Hoffmann | 038aa29 | 2013-05-29 13:06:22 +0200 | [diff] [blame] | 37 | }; |