Move console definitions into a new console.h file
The console includes a global variable and several functions that are only
used by a small subset of U-Boot files. Before adding more functions, move
the definitions into their own header file.
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/board/Arcturus/ucp1020/spl.c b/board/Arcturus/ucp1020/spl.c
index 236b0d0..9315bb7 100644
--- a/board/Arcturus/ucp1020/spl.c
+++ b/board/Arcturus/ucp1020/spl.c
@@ -9,6 +9,7 @@
*/
#include <common.h>
+#include <console.h>
#include <ns16550.h>
#include <malloc.h>
#include <mmc.h>
diff --git a/board/amcc/yucca/cmd_yucca.c b/board/amcc/yucca/cmd_yucca.c
index c1724bf..cc78284 100644
--- a/board/amcc/yucca/cmd_yucca.c
+++ b/board/amcc/yucca/cmd_yucca.c
@@ -10,6 +10,7 @@
#include <common.h>
#include <cli.h>
#include <command.h>
+#include <console.h>
#include "yucca.h"
#include <i2c.h>
#include <asm/byteorder.h>
diff --git a/board/astro/mcf5373l/fpga.c b/board/astro/mcf5373l/fpga.c
index d1110df..53e0072 100644
--- a/board/astro/mcf5373l/fpga.c
+++ b/board/astro/mcf5373l/fpga.c
@@ -15,6 +15,7 @@
/* Altera/Xilinx FPGA configuration support for the ASTRO "URMEL" board */
#include <common.h>
+#include <console.h>
#include <watchdog.h>
#include <altera.h>
#include <ACEX1K.h>
diff --git a/board/cobra5272/flash.c b/board/cobra5272/flash.c
index c0b8337..4fac688 100644
--- a/board/cobra5272/flash.c
+++ b/board/cobra5272/flash.c
@@ -6,6 +6,7 @@
*/
#include <common.h>
+#include <console.h>
#define PHYS_FLASH_1 CONFIG_SYS_FLASH_BASE
#define FLASH_BANK_SIZE 0x200000
diff --git a/board/esd/common/cmd_loadpci.c b/board/esd/common/cmd_loadpci.c
index 95d1891..9541817 100644
--- a/board/esd/common/cmd_loadpci.c
+++ b/board/esd/common/cmd_loadpci.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <command.h>
+#include <console.h>
#if !defined(CONFIG_440)
#include <asm/4xx_pci.h>
#endif
diff --git a/board/esd/cpci405/cpci405.c b/board/esd/cpci405/cpci405.c
index bf5a4cb..ca9a944 100644
--- a/board/esd/cpci405/cpci405.c
+++ b/board/esd/cpci405/cpci405.c
@@ -5,6 +5,7 @@
* SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
+#include <console.h>
#include <libfdt.h>
#include <fdt_support.h>
#include <asm/processor.h>
diff --git a/board/esd/pmc405de/pmc405de.c b/board/esd/pmc405de/pmc405de.c
index 3e17132..24e4977 100644
--- a/board/esd/pmc405de/pmc405de.c
+++ b/board/esd/pmc405de/pmc405de.c
@@ -6,6 +6,7 @@
*/
#include <common.h>
+#include <console.h>
#include <libfdt.h>
#include <fdt_support.h>
#include <asm/processor.h>
diff --git a/board/esd/pmc440/cmd_pmc440.c b/board/esd/pmc440/cmd_pmc440.c
index 40b135f..b7cd595 100644
--- a/board/esd/pmc440/cmd_pmc440.c
+++ b/board/esd/pmc440/cmd_pmc440.c
@@ -6,6 +6,7 @@
*/
#include <common.h>
#include <command.h>
+#include <console.h>
#include <asm/io.h>
#include <asm/cache.h>
#include <asm/processor.h>
diff --git a/board/esd/pmc440/pmc440.c b/board/esd/pmc440/pmc440.c
index 15c3151..7e35c19 100644
--- a/board/esd/pmc440/pmc440.c
+++ b/board/esd/pmc440/pmc440.c
@@ -13,6 +13,7 @@
* SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
+#include <console.h>
#include <libfdt.h>
#include <fdt_support.h>
#include <asm/ppc440.h>
diff --git a/board/esd/vme8349/caddy.c b/board/esd/vme8349/caddy.c
index cd56bed..0c1574c 100644
--- a/board/esd/vme8349/caddy.c
+++ b/board/esd/vme8349/caddy.c
@@ -8,6 +8,7 @@
*/
#include <common.h>
+#include <console.h>
#include <ioports.h>
#include <mpc83xx.h>
#include <asm/mpc8349_pci.h>
diff --git a/board/freescale/b4860qds/spl.c b/board/freescale/b4860qds/spl.c
index 3aa5a78..3f7cc03 100644
--- a/board/freescale/b4860qds/spl.c
+++ b/board/freescale/b4860qds/spl.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <console.h>
#include <asm/spl.h>
#include <malloc.h>
#include <ns16550.h>
diff --git a/board/freescale/c29xpcie/spl.c b/board/freescale/c29xpcie/spl.c
index 2111711..3d31d41 100644
--- a/board/freescale/c29xpcie/spl.c
+++ b/board/freescale/c29xpcie/spl.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <console.h>
#include <ns16550.h>
#include <malloc.h>
#include <mmc.h>
diff --git a/board/freescale/mpc8569mds/mpc8569mds.c b/board/freescale/mpc8569mds/mpc8569mds.c
index 836578f..122490c 100644
--- a/board/freescale/mpc8569mds/mpc8569mds.c
+++ b/board/freescale/mpc8569mds/mpc8569mds.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
+#include <console.h>
#include <hwconfig.h>
#include <pci.h>
#include <asm/processor.h>
diff --git a/board/freescale/p1010rdb/spl.c b/board/freescale/p1010rdb/spl.c
index ee873b0..eb8e567 100644
--- a/board/freescale/p1010rdb/spl.c
+++ b/board/freescale/p1010rdb/spl.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <console.h>
#include <ns16550.h>
#include <malloc.h>
#include <mmc.h>
diff --git a/board/freescale/p1022ds/spl.c b/board/freescale/p1022ds/spl.c
index 7bd9d29..89ef95a 100644
--- a/board/freescale/p1022ds/spl.c
+++ b/board/freescale/p1022ds/spl.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <console.h>
#include <ns16550.h>
#include <malloc.h>
#include <mmc.h>
diff --git a/board/freescale/p1_p2_rdb_pc/spl.c b/board/freescale/p1_p2_rdb_pc/spl.c
index 8d0d850..0142746 100644
--- a/board/freescale/p1_p2_rdb_pc/spl.c
+++ b/board/freescale/p1_p2_rdb_pc/spl.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <console.h>
#include <ns16550.h>
#include <malloc.h>
#include <mmc.h>
diff --git a/board/freescale/t102xqds/spl.c b/board/freescale/t102xqds/spl.c
index 08aef6e..073ff2d 100644
--- a/board/freescale/t102xqds/spl.c
+++ b/board/freescale/t102xqds/spl.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <console.h>
#include <malloc.h>
#include <ns16550.h>
#include <nand.h>
diff --git a/board/freescale/t102xrdb/spl.c b/board/freescale/t102xrdb/spl.c
index 9c581ff..da97c44 100644
--- a/board/freescale/t102xrdb/spl.c
+++ b/board/freescale/t102xrdb/spl.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <console.h>
#include <malloc.h>
#include <ns16550.h>
#include <nand.h>
diff --git a/board/freescale/t104xrdb/spl.c b/board/freescale/t104xrdb/spl.c
index 4e8735b..81f48c4 100644
--- a/board/freescale/t104xrdb/spl.c
+++ b/board/freescale/t104xrdb/spl.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <console.h>
#include <malloc.h>
#include <ns16550.h>
#include <nand.h>
diff --git a/board/freescale/t208xqds/spl.c b/board/freescale/t208xqds/spl.c
index a71c617..55a0f8f 100644
--- a/board/freescale/t208xqds/spl.c
+++ b/board/freescale/t208xqds/spl.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <console.h>
#include <malloc.h>
#include <ns16550.h>
#include <nand.h>
diff --git a/board/freescale/t208xrdb/spl.c b/board/freescale/t208xrdb/spl.c
index 9ae2b1e..f63366b 100644
--- a/board/freescale/t208xrdb/spl.c
+++ b/board/freescale/t208xrdb/spl.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <console.h>
#include <malloc.h>
#include <ns16550.h>
#include <nand.h>
diff --git a/board/freescale/t4qds/spl.c b/board/freescale/t4qds/spl.c
index 0c6156e..d52059a 100644
--- a/board/freescale/t4qds/spl.c
+++ b/board/freescale/t4qds/spl.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <console.h>
#include <asm/spl.h>
#include <malloc.h>
#include <ns16550.h>
diff --git a/board/freescale/t4rdb/spl.c b/board/freescale/t4rdb/spl.c
index 68ecde7..4c1e0cc 100644
--- a/board/freescale/t4rdb/spl.c
+++ b/board/freescale/t4rdb/spl.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
+#include <console.h>
#include <asm/spl.h>
#include <malloc.h>
#include <ns16550.h>
diff --git a/board/gdsys/common/cmd_ioloop.c b/board/gdsys/common/cmd_ioloop.c
index e0c74fe..0e81c9d 100644
--- a/board/gdsys/common/cmd_ioloop.c
+++ b/board/gdsys/common/cmd_ioloop.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <command.h>
+#include <console.h>
#include <gdsys_fpga.h>
diff --git a/board/inka4x0/inkadiag.c b/board/inka4x0/inkadiag.c
index 0bd12ec..4c43205 100644
--- a/board/inka4x0/inkadiag.c
+++ b/board/inka4x0/inkadiag.c
@@ -10,6 +10,7 @@
#include <asm/io.h>
#include <common.h>
#include <config.h>
+#include <console.h>
#include <mpc5xxx.h>
#include <pci.h>
diff --git a/board/lwmon5/kbd.c b/board/lwmon5/kbd.c
index 97962da..d6c0a20 100644
--- a/board/lwmon5/kbd.c
+++ b/board/lwmon5/kbd.c
@@ -17,6 +17,7 @@
#include <common.h>
#include <i2c.h>
#include <command.h>
+#include <console.h>
#include <post.h>
#include <serial.h>
#include <malloc.h>
diff --git a/board/mpl/common/kbd.c b/board/mpl/common/kbd.c
index 1da72c5..36b1694 100644
--- a/board/mpl/common/kbd.c
+++ b/board/mpl/common/kbd.c
@@ -8,6 +8,7 @@
* linux/drivers/char/pc_keyb.c
*/
#include <common.h>
+#include <console.h>
#include <asm/processor.h>
#include <stdio_dev.h>
#include "isa.h"
diff --git a/board/mpl/pati/pati.c b/board/mpl/pati/pati.c
index 958cdec..ddc2108 100644
--- a/board/mpl/pati/pati.c
+++ b/board/mpl/pati/pati.c
@@ -29,6 +29,7 @@
**********************************************************************************/
#include <common.h>
+#include <console.h>
#include <mpc5xx.h>
#include <stdio_dev.h>
#include <pci_ids.h>
diff --git a/board/renesas/sh7785lcr/selfcheck.c b/board/renesas/sh7785lcr/selfcheck.c
index d520750..9a6cdab 100644
--- a/board/renesas/sh7785lcr/selfcheck.c
+++ b/board/renesas/sh7785lcr/selfcheck.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <console.h>
#include <asm/io.h>
#include <asm/processor.h>
#include <asm/pci.h>
diff --git a/board/tqc/tqm5200/cmd_stk52xx.c b/board/tqc/tqm5200/cmd_stk52xx.c
index 5f905d5..9d2d5a8 100644
--- a/board/tqc/tqm5200/cmd_stk52xx.c
+++ b/board/tqc/tqm5200/cmd_stk52xx.c
@@ -12,6 +12,7 @@
#include <common.h>
#include <command.h>
+#include <console.h>
#if defined(CONFIG_CMD_BSP)
diff --git a/board/tqc/tqm5200/tqm5200.c b/board/tqc/tqm5200/tqm5200.c
index 4d4f29d..8b82c34 100644
--- a/board/tqc/tqm5200/tqm5200.c
+++ b/board/tqc/tqm5200/tqm5200.c
@@ -12,6 +12,7 @@
*/
#include <common.h>
+#include <console.h>
#include <mpc5xxx.h>
#include <pci.h>
#include <asm/processor.h>
diff --git a/board/xes/xpedite1000/xpedite1000.c b/board/xes/xpedite1000/xpedite1000.c
index daab578..3b8a668 100644
--- a/board/xes/xpedite1000/xpedite1000.c
+++ b/board/xes/xpedite1000/xpedite1000.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <console.h>
#include <asm/processor.h>
#include <spd_sdram.h>
#include <i2c.h>