diff options
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/uart.h | 22 | ||||
-rw-r--r-- | src/include/uart8250.h | 1 |
2 files changed, 16 insertions, 7 deletions
diff --git a/src/include/uart.h b/src/include/uart.h index 931d6dce82..6628314ae2 100644 --- a/src/include/uart.h +++ b/src/include/uart.h @@ -15,19 +15,29 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * FIXME(dhendrix): This file contains generic prototypes for UART functions. - * The existing headers are too specific to the 8250, so we need a better - * abstraction for use with non-8250 UARTs. */ +/* madness. Uarts are a mess. If you include this file, it + * includes ALL uart implementations which may be needed. + * No need to include them separately, and include this file FIRST. + * At least one (but at most one) of the files needs to define + * uart_init(). + */ #ifndef UART_H #define UART_H +#if CONFIG_CONSOLE_SERIAL8250 +#include <uart8250.h> +#endif + +#if CONFIG_CPU_SAMSUNG_EXYNOS5 +#include <cpu/samsung/exynos5250/uart.h> +#endif + +#ifndef __ROMCC__ unsigned char uart_rx_byte(void); void uart_tx_byte(unsigned char data); void uart_tx_flush(void); - -void uart_init(void); +#endif #endif /* UART_H */ diff --git a/src/include/uart8250.h b/src/include/uart8250.h index b00ff48006..9af43f264b 100644 --- a/src/include/uart8250.h +++ b/src/include/uart8250.h @@ -120,7 +120,6 @@ unsigned char uart8250_rx_byte(unsigned base_port); int uart8250_can_rx_byte(unsigned base_port); void uart8250_tx_byte(unsigned base_port, unsigned char data); void uart8250_tx_flush(unsigned base_port); - /* Yes it is silly to have three different uart init functions. But we used to * have three different sets of uart code, so it's an improvement. */ |