Stefan Reinauer | 509f772 | 2012-12-07 17:31:37 -0800 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
| 4 | * Copyright (C) 2012 The ChromiumOS Authors. All rights reserved. |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by |
| 8 | * the Free Software Foundation; version 2 of the License. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with this program; if not, write to the Free Software |
| 17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
Stefan Reinauer | 509f772 | 2012-12-07 17:31:37 -0800 | [diff] [blame] | 18 | */ |
| 19 | |
David Hendricks | 6a503b6 | 2012-12-31 17:28:43 -0800 | [diff] [blame] | 20 | /* madness. Uarts are a mess. If you include this file, it |
| 21 | * includes ALL uart implementations which may be needed. |
| 22 | * No need to include them separately, and include this file FIRST. |
| 23 | * At least one (but at most one) of the files needs to define |
| 24 | * uart_init(). |
| 25 | */ |
Stefan Reinauer | 509f772 | 2012-12-07 17:31:37 -0800 | [diff] [blame] | 26 | #ifndef UART_H |
| 27 | #define UART_H |
| 28 | |
Hung-Te Lin | 580fa2b | 2013-02-06 21:51:15 +0800 | [diff] [blame^] | 29 | #if CONFIG_CONSOLE_SERIAL8250 || CONFIG_CONSOLE_SERIAL8250MEM |
David Hendricks | 6a503b6 | 2012-12-31 17:28:43 -0800 | [diff] [blame] | 30 | #include <uart8250.h> |
| 31 | #endif |
| 32 | |
| 33 | #if CONFIG_CPU_SAMSUNG_EXYNOS5 |
David Hendricks | 4c2aafe | 2013-02-04 20:40:47 -0800 | [diff] [blame] | 34 | #include <cpu/samsung/exynos5-common/uart.h> |
David Hendricks | 6a503b6 | 2012-12-31 17:28:43 -0800 | [diff] [blame] | 35 | #endif |
| 36 | |
Hung-Te Lin | 580fa2b | 2013-02-06 21:51:15 +0800 | [diff] [blame^] | 37 | #if !defined(__ROMCC__) && CONFIG_CONSOLE_SERIAL_UART |
Stefan Reinauer | 509f772 | 2012-12-07 17:31:37 -0800 | [diff] [blame] | 38 | unsigned char uart_rx_byte(void); |
| 39 | void uart_tx_byte(unsigned char data); |
| 40 | void uart_tx_flush(void); |
David Hendricks | 6a503b6 | 2012-12-31 17:28:43 -0800 | [diff] [blame] | 41 | #endif |
Stefan Reinauer | 509f772 | 2012-12-07 17:31:37 -0800 | [diff] [blame] | 42 | |
| 43 | #endif /* UART_H */ |