console: Fix includes

Do not pull in console hw-specific prototypes everywhere
with console.h as those are not needed for higher levels.

Move prototypes for UARTs next to other consoles.

Change-Id: Icbc9cd3e5bdfdab85d7dccd7c3827bba35248fb8
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: http://review.coreboot.org/5232
Tested-by: build bot (Jenkins)
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
Kyösti Mälkki 2014-02-17 21:34:42 +02:00
parent 7e75f20477
commit 1d7541feeb
28 changed files with 40 additions and 43 deletions

View File

@ -18,6 +18,8 @@
*/
#include <console/console.h>
#include <console/cbmem_console.h>
#include <console/uart.h>
#include <console/vtxprintf.h>
/* FIXME: need to make console driver more generic */

View File

@ -20,6 +20,7 @@
#include <stdint.h>
#include <console/loglevel.h>
#include <console/post_codes.h>
#include <console/ne2k.h>
/* __PRE_RAM__ */
/* Using a global varible can cause problems when we reset the stack

View File

@ -19,20 +19,16 @@
#include <smp/node.h>
#include <console/console.h>
#include <console/cbmem_console.h>
#include <console/uart.h>
#include <console/usb.h>
#include <console/ne2k.h>
#include <console/spkmodem.h>
#include <console/vtxprintf.h>
#if CONFIG_CONSOLE_SERIAL8250 || CONFIG_CONSOLE_SERIAL8250MEM
#include <uart8250.h>
#endif
#if CONFIG_USBDEBUG
#include <console/usb.h>
#endif
#if CONFIG_CONSOLE_NE2K
#include <console/ne2k.h>
#endif
#if CONFIG_SPKMODEM
#include <console/spkmodem.h>
#endif
void console_tx_byte(unsigned char byte)
{

View File

@ -18,6 +18,7 @@
*/
#include <console/console.h>
#include <console/cbmem_console.h>
static void cbmemc_init_(void)
{

View File

@ -18,6 +18,12 @@
*/
#include <console/console.h>
#include <console/cbmem_console.h>
#include <console/uart.h>
#include <console/usb.h>
#include <console/ne2k.h>
#include <console/spkmodem.h>
#include <build.h>
#include <arch/hlt.h>
#include <arch/io.h>

View File

@ -18,6 +18,7 @@
*/
#include <console/console.h>
#include <console/uart.h>
#include <uart8250.h>
static void ttyS0_init(void)

View File

@ -18,6 +18,7 @@
*/
#include <console/console.h>
#include <console/uart.h>
#include <uart8250.h>
static u32 uart_bar = 0;

View File

@ -7,7 +7,7 @@
#include "uart.h"
#include <arch/io.h>
#include <uart.h>
#include <console/uart.h>
#include <uart8250.h>
/**

View File

@ -8,7 +8,7 @@
#include <config.h>
#include <types.h>
#include <uart.h>
#include <console/uart.h>
#include <arch/io.h>
#include <console/console.h>

View File

@ -18,7 +18,7 @@
*/
#include <console/console.h> /* for __console definition */
#include <uart.h>
#include <console/uart.h>
#include <arch/io.h>
#include "uart.h"
#include "clk.h"

View File

@ -18,7 +18,7 @@
*/
#include <console/console.h> /* for __console definition */
#include <uart.h>
#include <console/uart.h>
#include <arch/io.h>
#include "uart.h"
#include "clk.h"

View File

@ -18,7 +18,7 @@
#include <config.h>
#include <types.h>
#include <uart.h>
#include <console/uart.h>
#include <arch/io.h>
#include <console/console.h> /* for __console definition */

View File

@ -23,7 +23,7 @@
#include <cpu/x86/cache.h>
#include <cpu/x86/smm.h>
#include <console/console.h>
#include <uart.h>
#include <console/uart.h>
#include <uart8250.h>
#include <console/vtxprintf.h>

View File

@ -22,6 +22,7 @@
#include <device/pci.h>
#include <device/pci_ids.h>
#include <console/console.h>
#include <uart8250.h>
#include <arch/io.h>
static void oxford_oxpcie_enable(device_t dev)

View File

@ -21,7 +21,7 @@
#include <arch/io.h>
#include <arch/early_variables.h>
#include <delay.h>
#include <uart.h>
#include <console/uart.h>
#include <uart8250.h>
#include <device/pci_def.h>

View File

@ -14,7 +14,7 @@
*/
#include <console/console.h>
#include <uart.h>
#include <console/uart.h>
static void pl011_uart_tx_byte(unsigned char data)
{

View File

@ -16,7 +16,7 @@
*/
#include <console/console.h>
#include <uart.h>
#include <console/uart.h>
#if CONFIG_USE_OPTION_TABLE
#include <option.h>
#include "option_table.h"

View File

@ -24,22 +24,6 @@
#include <console/loglevel.h>
#include <console/post_codes.h>
#if CONFIG_CONSOLE_SERIAL
#include <uart.h>
#endif
#if CONFIG_USBDEBUG && !defined(__ROMCC__)
#include <console/usb.h>
#endif
#if CONFIG_CONSOLE_NE2K
#include <console/ne2k.h>
#endif
#if CONFIG_CONSOLE_CBMEM
#include <console/cbmem_console.h>
#endif
#if CONFIG_SPKMODEM
#include <console/spkmodem.h>
#endif
#ifndef __PRE_RAM__
unsigned char console_rx_byte(void);
int console_tst_byte(void);

View File

@ -17,8 +17,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef UART_H
#define UART_H
#ifndef CONSOLE_UART_H
#define CONSOLE_UART_H
/* Return the clock frequency UART uses as reference clock for
* baudrate generator. */
@ -44,4 +44,6 @@ void uart_init(void);
uint32_t uartmem_getbaseaddr(void);
#endif /* UART_H */
void oxford_init(void);
#endif /* CONSOLE_UART_H */

View File

@ -129,8 +129,6 @@ u32 uart_mem_init(void);
#if defined(__PRE_RAM__) && CONFIG_DRIVERS_OXFORD_OXPCIE
/* and special init for OXPCIe based cards */
extern int oxford_oxpcie_present;
void oxford_init(void);
#endif
#endif

View File

@ -23,6 +23,7 @@
#include <bootstate.h>
#include <cbmem.h>
#include <console/console.h>
#include <console/cbmem_console.h>
#include <arch/early_variables.h>
#if CONFIG_HAVE_ACPI_RESUME && !defined(__PRE_RAM__)
#include <arch/acpi.h>

View File

@ -18,6 +18,7 @@
*/
#include <console/console.h>
#include <console/cbmem_console.h>
#include <cbmem.h>
#include <arch/early_variables.h>
#include <string.h>

View File

@ -21,6 +21,7 @@
*/
#include <console/console.h>
#include <console/uart.h>
#include <ip_checksum.h>
#include <boot/coreboot_tables.h>
#include <string.h>

View File

@ -19,7 +19,7 @@
*/
#include <arch/io.h>
#include <uart.h>
#include <console/uart.h>
#include <uart8250.h>
#include <trace.h>

View File

@ -19,7 +19,7 @@
*/
#include <arch/io.h>
#include <uart.h>
#include <console/uart.h>
#include <uart8250.h>
#include <device/device.h>
#include <delay.h>

View File

@ -7,7 +7,7 @@
*/
#include <arch/io.h>
#include <uart.h>
#include <console/uart.h>
#include <console/console.h>
#include <delay.h>
#include <cpu/allwinner/a10/gpio.h>

View File

@ -19,7 +19,7 @@
#include <arch/io.h>
#include <types.h>
#include <uart.h>
#include <console/uart.h>
#include <console/console.h>
#include <cpu/ti/am335x/pinmux.h>

View File

@ -18,6 +18,7 @@
*/
#include <console/console.h>
#include <console/usb.h>
#include <string.h>
#include <arch/hlt.h>
#include <arch/io.h>