move console includes to central console/console.h
Because it's included everywhere anyways. Change-Id: I99a9e6edac08df57c50ef3a706fdbd395cad0abc Signed-off-by: Stefan Reinauer <reinauer@google.com> Reviewed-on: http://review.coreboot.org/691 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
This commit is contained in:
parent
a6087d155d
commit
8907e81626
|
@ -22,18 +22,6 @@
|
||||||
#include <arch/hlt.h>
|
#include <arch/hlt.h>
|
||||||
#include <arch/io.h>
|
#include <arch/io.h>
|
||||||
|
|
||||||
#if CONFIG_CONSOLE_SERIAL8250 || CONFIG_CONSOLE_SERIAL8250MEM
|
|
||||||
#include <uart8250.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if CONFIG_CONSOLE_NE2K
|
|
||||||
#include <console/ne2k.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if CONFIG_USBDEBUG
|
|
||||||
#include <usbdebug.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef __PRE_RAM__
|
#ifndef __PRE_RAM__
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <pc80/mc146818rtc.h>
|
#include <pc80/mc146818rtc.h>
|
||||||
|
@ -52,14 +40,6 @@ void console_init(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __console_tx_byte(unsigned char byte)
|
|
||||||
{
|
|
||||||
struct console_driver *driver;
|
|
||||||
for(driver = console_drivers; driver < econsole_drivers; driver++) {
|
|
||||||
driver->tx_byte(byte);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void console_tx_flush(void)
|
void console_tx_flush(void)
|
||||||
{
|
{
|
||||||
struct console_driver *driver;
|
struct console_driver *driver;
|
||||||
|
@ -70,6 +50,14 @@ void console_tx_flush(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void __console_tx_byte(unsigned char byte)
|
||||||
|
{
|
||||||
|
struct console_driver *driver;
|
||||||
|
for(driver = console_drivers; driver < econsole_drivers; driver++) {
|
||||||
|
driver->tx_byte(byte);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void console_tx_byte(unsigned char byte)
|
void console_tx_byte(unsigned char byte)
|
||||||
{
|
{
|
||||||
if (byte == '\n')
|
if (byte == '\n')
|
||||||
|
|
|
@ -23,18 +23,8 @@
|
||||||
#include <arch/romcc_io.h>
|
#include <arch/romcc_io.h>
|
||||||
#include <cpu/x86/cache.h>
|
#include <cpu/x86/cache.h>
|
||||||
#include <cpu/x86/smm.h>
|
#include <cpu/x86/smm.h>
|
||||||
|
|
||||||
#include <console/console.h>
|
#include <console/console.h>
|
||||||
#include <console/vtxprintf.h>
|
#include <console/vtxprintf.h>
|
||||||
#if CONFIG_CONSOLE_SERIAL8250 || CONFIG_CONSOLE_SERIAL8250MEM
|
|
||||||
#include <uart8250.h>
|
|
||||||
#endif
|
|
||||||
#if CONFIG_USBDEBUG
|
|
||||||
#include <usbdebug.h>
|
|
||||||
#endif
|
|
||||||
#if CONFIG_CONSOLE_NE2K
|
|
||||||
#include <console/ne2k.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if CONFIG_CONSOLE_SERIAL8250MEM
|
#if CONFIG_CONSOLE_SERIAL8250MEM
|
||||||
static u32 serial8250mem_base_address = 0;
|
static u32 serial8250mem_base_address = 0;
|
||||||
|
|
|
@ -24,15 +24,21 @@
|
||||||
#include <console/loglevel.h>
|
#include <console/loglevel.h>
|
||||||
#include <console/post_codes.h>
|
#include <console/post_codes.h>
|
||||||
|
|
||||||
|
#if CONFIG_CONSOLE_SERIAL8250 || CONFIG_CONSOLE_SERIAL8250MEM
|
||||||
|
#include <uart8250.h>
|
||||||
|
#endif
|
||||||
|
#if CONFIG_USBDEBUG
|
||||||
|
#include <usbdebug.h>
|
||||||
|
#endif
|
||||||
|
#if CONFIG_CONSOLE_NE2K
|
||||||
|
#include <console/ne2k.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef __PRE_RAM__
|
#ifndef __PRE_RAM__
|
||||||
void console_tx_byte(unsigned char byte);
|
void console_tx_byte(unsigned char byte);
|
||||||
void console_tx_flush(void);
|
void console_tx_flush(void);
|
||||||
unsigned char console_rx_byte(void);
|
unsigned char console_rx_byte(void);
|
||||||
int console_tst_byte(void);
|
int console_tst_byte(void);
|
||||||
#if CONFIG_USBDEBUG
|
|
||||||
#include <usbdebug.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
struct console_driver {
|
struct console_driver {
|
||||||
void (*init)(void);
|
void (*init)(void);
|
||||||
void (*tx_byte)(unsigned char byte);
|
void (*tx_byte)(unsigned char byte);
|
||||||
|
@ -55,9 +61,6 @@ extern int console_loglevel;
|
||||||
* we could use the same code on all architectures.
|
* we could use the same code on all architectures.
|
||||||
*/
|
*/
|
||||||
#define console_loglevel CONFIG_DEFAULT_CONSOLE_LOGLEVEL
|
#define console_loglevel CONFIG_DEFAULT_CONSOLE_LOGLEVEL
|
||||||
#if CONFIG_CONSOLE_SERIAL8250
|
|
||||||
#include <uart8250.h>
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __ROMCC__
|
#ifndef __ROMCC__
|
||||||
|
|
|
@ -20,26 +20,7 @@
|
||||||
#ifndef UART8250_H
|
#ifndef UART8250_H
|
||||||
#define UART8250_H
|
#define UART8250_H
|
||||||
|
|
||||||
/* Base Address */
|
#if CONFIG_CONSOLE_SERIAL8250 || CONFIG_CONSOLE_SERIAL8250MEM
|
||||||
#ifndef CONFIG_TTYS0_BASE
|
|
||||||
#define CONFIG_TTYS0_BASE 0x3f8
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef CONFIG_TTYS0_BAUD
|
|
||||||
#define CONFIG_TTYS0_BAUD 115200
|
|
||||||
#endif
|
|
||||||
#if ((115200%CONFIG_TTYS0_BAUD) != 0)
|
|
||||||
#error Bad ttys0 baud rate
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Line Control Settings */
|
|
||||||
#ifndef CONFIG_TTYS0_LCS
|
|
||||||
/* Set 8bit, 1 stop bit, no parity */
|
|
||||||
#define CONFIG_TTYS0_LCS 0x3
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define UART_LCS CONFIG_TTYS0_LCS
|
|
||||||
|
|
||||||
|
|
||||||
/* Data */
|
/* Data */
|
||||||
#define UART_RBR 0x00
|
#define UART_RBR 0x00
|
||||||
|
@ -126,6 +107,12 @@
|
||||||
#define UART_SCR 0x07
|
#define UART_SCR 0x07
|
||||||
#define UART_SPR 0x07
|
#define UART_SPR 0x07
|
||||||
|
|
||||||
|
#if ((115200 % CONFIG_TTYS0_BAUD) != 0)
|
||||||
|
#error Bad ttyS0 baud rate
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Line Control Settings */
|
||||||
|
#define UART_LCS CONFIG_TTYS0_LCS
|
||||||
|
|
||||||
#ifndef __ROMCC__
|
#ifndef __ROMCC__
|
||||||
unsigned char uart8250_rx_byte(unsigned base_port);
|
unsigned char uart8250_rx_byte(unsigned base_port);
|
||||||
|
@ -151,6 +138,8 @@ u32 uartmem_getbaseaddr(void);
|
||||||
/* and special init for OXPCIe based cards */
|
/* and special init for OXPCIe based cards */
|
||||||
void oxford_init(void);
|
void oxford_init(void);
|
||||||
|
|
||||||
#endif
|
#endif /* __ROMCC__ */
|
||||||
|
|
||||||
|
#endif /* CONFIG_CONSOLE_SERIAL8250 || CONFIG_CONSOLE_SERIAL8250MEM */
|
||||||
|
|
||||||
#endif /* UART8250_H */
|
#endif /* UART8250_H */
|
||||||
|
|
Loading…
Reference in New Issue