diff options
author | Simon Glass <sjg@chromium.org> | 2015-11-08 23:47:45 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-11-19 20:27:50 -0700 |
commit | 24b852a7a2b8eca71789100983bdb5104cc00696 (patch) | |
tree | af9a9ed81d30180f9a9286ed504895c216e80229 | |
parent | 3884c98c32cd5fb5b5b42185d5d0575659434bbf (diff) | |
download | u-boot-24b852a7a2b8eca71789100983bdb5104cc00696.tar.gz u-boot-24b852a7a2b8eca71789100983bdb5104cc00696.tar.bz2 u-boot-24b852a7a2b8eca71789100983bdb5104cc00696.zip |
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>
100 files changed, 131 insertions, 18 deletions
diff --git a/arch/blackfin/lib/cmd_cache_dump.c b/arch/blackfin/lib/cmd_cache_dump.c index 412e0198af..f9f909791e 100644 --- a/arch/blackfin/lib/cmd_cache_dump.c +++ b/arch/blackfin/lib/cmd_cache_dump.c @@ -9,6 +9,7 @@ #include <config.h> #include <common.h> #include <command.h> +#include <console.h> #include <asm/blackfin.h> #include <asm/mach-common/bits/mpu.h> diff --git a/arch/powerpc/cpu/mpc8260/ether_fcc.c b/arch/powerpc/cpu/mpc8260/ether_fcc.c index 30ea3de9cf..9bb395e6a2 100644 --- a/arch/powerpc/cpu/mpc8260/ether_fcc.c +++ b/arch/powerpc/cpu/mpc8260/ether_fcc.c @@ -24,6 +24,7 @@ */ #include <common.h> +#include <console.h> #include <malloc.h> #include <asm/cpm_8260.h> #include <mpc8260.h> diff --git a/arch/powerpc/cpu/mpc8260/i2c.c b/arch/powerpc/cpu/mpc8260/i2c.c index 8658ebdadd..a0de101329 100644 --- a/arch/powerpc/cpu/mpc8260/i2c.c +++ b/arch/powerpc/cpu/mpc8260/i2c.c @@ -9,6 +9,7 @@ */ #include <common.h> +#include <console.h> #if defined(CONFIG_HARD_I2C) diff --git a/arch/powerpc/cpu/mpc8xx/i2c.c b/arch/powerpc/cpu/mpc8xx/i2c.c index 6146de3875..3dff4ab4ac 100644 --- a/arch/powerpc/cpu/mpc8xx/i2c.c +++ b/arch/powerpc/cpu/mpc8xx/i2c.c @@ -12,6 +12,7 @@ */ #include <common.h> +#include <console.h> #ifdef CONFIG_HARD_I2C diff --git a/arch/sh/lib/board.c b/arch/sh/lib/board.c index 6dad3c7dbf..69cdca3744 100644 --- a/arch/sh/lib/board.c +++ b/arch/sh/lib/board.c @@ -7,6 +7,7 @@ #include <common.h> #include <command.h> +#include <console.h> #include <malloc.h> #include <stdio_dev.h> #include <version.h> diff --git a/arch/sparc/lib/board.c b/arch/sparc/lib/board.c index d2ac6bcaca..10475d1082 100644 --- a/arch/sparc/lib/board.c +++ b/arch/sparc/lib/board.c @@ -11,6 +11,7 @@ #include <common.h> #include <command.h> +#include <console.h> #include <malloc.h> #include <stdio_dev.h> #include <config.h> diff --git a/board/Arcturus/ucp1020/spl.c b/board/Arcturus/ucp1020/spl.c index 236b0d0de5..9315bb7401 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 c1724bf034..cc78284e2b 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 d1110dfd6e..53e00728c3 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 c0b8337ddb..4fac6880f1 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 95d18911c3..9541817d09 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 bf5a4cb682..ca9a94427f 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 3e1713247d..24e4977c9b 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 40b135f2ba..b7cd595362 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 15c3151b84..7e35c1984d 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 cd56bed991..0c1574ca51 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 3aa5a780f4..3f7cc03581 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 2111711400..3d31d41a4f 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 836578f3cb..122490c026 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 ee873b0914..eb8e567554 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 7bd9d296ee..89ef95aab8 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 8d0d850480..0142746c84 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 08aef6e159..073ff2dcde 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 9c581ff88e..da97c440c4 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 4e8735b9ff..81f48c4c30 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 a71c617121..55a0f8fdce 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 9ae2b1e863..f63366bb0e 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 0c6156e7f0..d52059a145 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 68ecde7909..4c1e0cc8d0 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 e0c74fee80..0e81c9d9e4 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 0bd12ece86..4c43205129 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 97962daf93..d6c0a205a3 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 1da72c5398..36b169489e 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 958cdec136..ddc21083d8 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 d520750703..9a6cdab9ee 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 5f905d5dca..9d2d5a8fa9 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 4d4f29da74..8b82c348a7 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 daab578f87..3b8a6683eb 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> diff --git a/common/autoboot.c b/common/autoboot.c index c367076257..c11fb31236 100644 --- a/common/autoboot.c +++ b/common/autoboot.c @@ -9,6 +9,7 @@ #include <autoboot.h> #include <bootretry.h> #include <cli.h> +#include <console.h> #include <fdtdec.h> #include <menu.h> #include <post.h> diff --git a/common/board_f.c b/common/board_f.c index 84485e96e8..09baa5c550 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -13,6 +13,7 @@ #include <common.h> #include <linux/compiler.h> #include <version.h> +#include <console.h> #include <environment.h> #include <dm.h> #include <fdtdec.h> diff --git a/common/board_r.c b/common/board_r.c index c6aa7e5224..85aef95a89 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -15,6 +15,7 @@ #if defined(CONFIG_CMD_BEDBUG) #include <bedbug/type.h> #endif +#include <console.h> #ifdef CONFIG_HAS_DATAFLASH #include <dataflash.h> #endif diff --git a/common/cli.c b/common/cli.c index b6ae80a5fe..fbcd339c9b 100644 --- a/common/cli.c +++ b/common/cli.c @@ -12,6 +12,7 @@ #include <common.h> #include <cli.h> #include <cli_hush.h> +#include <console.h> #include <fdtdec.h> #include <malloc.h> diff --git a/common/cli_hush.c b/common/cli_hush.c index 296542f4c2..a7cac4fcb9 100644 --- a/common/cli_hush.c +++ b/common/cli_hush.c @@ -79,6 +79,7 @@ #include <malloc.h> /* malloc, free, realloc*/ #include <linux/ctype.h> /* isalpha, isdigit */ #include <common.h> /* readline */ +#include <console.h> #include <bootretry.h> #include <cli.h> #include <cli_hush.h> diff --git a/common/cli_simple.c b/common/cli_simple.c index d8b40c9391..9c3d073d58 100644 --- a/common/cli_simple.c +++ b/common/cli_simple.c @@ -12,6 +12,7 @@ #include <common.h> #include <bootretry.h> #include <cli.h> +#include <console.h> #include <linux/ctype.h> #define DEBUG_PARSER 0 /* set to 1 to debug */ diff --git a/common/cmd_armflash.c b/common/cmd_armflash.c index af453f7b3b..b94d128faa 100644 --- a/common/cmd_armflash.c +++ b/common/cmd_armflash.c @@ -8,6 +8,7 @@ */ #include <common.h> #include <command.h> +#include <console.h> #include <asm/io.h> #define MAX_REGIONS 4 diff --git a/common/cmd_bedbug.c b/common/cmd_bedbug.c index 57a8a3f2fe..69afeafecb 100644 --- a/common/cmd_bedbug.c +++ b/common/cmd_bedbug.c @@ -5,6 +5,7 @@ #include <common.h> #include <cli.h> #include <command.h> +#include <console.h> #include <linux/ctype.h> #include <net.h> #include <bedbug/type.h> diff --git a/common/cmd_dcr.c b/common/cmd_dcr.c index 4fddd804ab..cc77250ac8 100644 --- a/common/cmd_dcr.c +++ b/common/cmd_dcr.c @@ -13,6 +13,7 @@ #include <cli.h> #include <config.h> #include <command.h> +#include <console.h> unsigned long get_dcr (unsigned short); unsigned long set_dcr (unsigned short, unsigned long); diff --git a/common/cmd_dfu.c b/common/cmd_dfu.c index f060db75c6..6d95ce9223 100644 --- a/common/cmd_dfu.c +++ b/common/cmd_dfu.c @@ -14,6 +14,7 @@ #include <common.h> #include <watchdog.h> #include <dfu.h> +#include <console.h> #include <g_dnl.h> #include <usb.h> #include <net.h> diff --git a/common/cmd_fastboot.c b/common/cmd_fastboot.c index b9d1c8c02b..488822a2ee 100644 --- a/common/cmd_fastboot.c +++ b/common/cmd_fastboot.c @@ -9,6 +9,7 @@ */ #include <common.h> #include <command.h> +#include <console.h> #include <g_dnl.h> #include <usb.h> diff --git a/common/cmd_fpgad.c b/common/cmd_fpgad.c index 1f1d00f28a..5370c3e72d 100644 --- a/common/cmd_fpgad.c +++ b/common/cmd_fpgad.c @@ -11,6 +11,7 @@ #include <common.h> #include <command.h> +#include <console.h> #include <gdsys_fpga.h> diff --git a/common/cmd_fuse.c b/common/cmd_fuse.c index d4bc0f6c94..5998f9b2eb 100644 --- a/common/cmd_fuse.c +++ b/common/cmd_fuse.c @@ -11,6 +11,7 @@ #include <common.h> #include <command.h> +#include <console.h> #include <fuse.h> #include <asm/errno.h> diff --git a/common/cmd_i2c.c b/common/cmd_i2c.c index 864b2596cc..3d0de81c32 100644 --- a/common/cmd_i2c.c +++ b/common/cmd_i2c.c @@ -69,6 +69,7 @@ #include <bootretry.h> #include <cli.h> #include <command.h> +#include <console.h> #include <dm.h> #include <edid.h> #include <environment.h> diff --git a/common/cmd_load.c b/common/cmd_load.c index d043e6d7bc..0aa7937fd4 100644 --- a/common/cmd_load.c +++ b/common/cmd_load.c @@ -10,6 +10,7 @@ */ #include <common.h> #include <command.h> +#include <console.h> #include <s_record.h> #include <net.h> #include <exports.h> diff --git a/common/cmd_mem.c b/common/cmd_mem.c index 43c3fb62bf..9fb25840f1 100644 --- a/common/cmd_mem.c +++ b/common/cmd_mem.c @@ -12,9 +12,11 @@ */ #include <common.h> +#include <console.h> #include <bootretry.h> #include <cli.h> #include <command.h> +#include <console.h> #ifdef CONFIG_HAS_DATAFLASH #include <dataflash.h> #endif diff --git a/common/cmd_misc.c b/common/cmd_misc.c index 93f9eabd6b..39d86835cf 100644 --- a/common/cmd_misc.c +++ b/common/cmd_misc.c @@ -10,6 +10,7 @@ */ #include <common.h> #include <command.h> +#include <console.h> static int do_sleep(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { diff --git a/common/cmd_mmc.c b/common/cmd_mmc.c index 1335e3d344..dfc1ec850e 100644 --- a/common/cmd_mmc.c +++ b/common/cmd_mmc.c @@ -7,6 +7,7 @@ #include <common.h> #include <command.h> +#include <console.h> #include <mmc.h> static int curr_device = -1; diff --git a/common/cmd_nand.c b/common/cmd_nand.c index 1482462a50..a6b67e29f1 100644 --- a/common/cmd_nand.c +++ b/common/cmd_nand.c @@ -22,6 +22,7 @@ #include <common.h> #include <linux/mtd/mtd.h> #include <command.h> +#include <console.h> #include <watchdog.h> #include <malloc.h> #include <asm/byteorder.h> diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c index f4c2523f2f..2f9cdd095a 100644 --- a/common/cmd_nvedit.c +++ b/common/cmd_nvedit.c @@ -27,6 +27,7 @@ #include <common.h> #include <cli.h> #include <command.h> +#include <console.h> #include <environment.h> #include <search.h> #include <errno.h> diff --git a/common/cmd_otp.c b/common/cmd_otp.c index 593bb8c650..10c1475c5a 100644 --- a/common/cmd_otp.c +++ b/common/cmd_otp.c @@ -16,6 +16,7 @@ #include <config.h> #include <common.h> #include <command.h> +#include <console.h> #include <asm/blackfin.h> #include <asm/clock.h> diff --git a/common/cmd_pci.c b/common/cmd_pci.c index dcecef8da8..802e433044 100644 --- a/common/cmd_pci.c +++ b/common/cmd_pci.c @@ -17,6 +17,7 @@ #include <bootretry.h> #include <cli.h> #include <command.h> +#include <console.h> #include <asm/processor.h> #include <asm/io.h> #include <pci.h> diff --git a/common/cmd_usb.c b/common/cmd_usb.c index 4679134478..c2d98037fa 100644 --- a/common/cmd_usb.c +++ b/common/cmd_usb.c @@ -13,6 +13,7 @@ #include <common.h> #include <command.h> +#include <console.h> #include <dm.h> #include <memalign.h> #include <asm/byteorder.h> diff --git a/common/cmd_usb_mass_storage.c b/common/cmd_usb_mass_storage.c index 198dab15ba..0407389112 100644 --- a/common/cmd_usb_mass_storage.c +++ b/common/cmd_usb_mass_storage.c @@ -8,6 +8,7 @@ #include <errno.h> #include <common.h> #include <command.h> +#include <console.h> #include <g_dnl.h> #include <part.h> #include <usb.h> diff --git a/common/command.c b/common/command.c index 972ae281c2..858e28885a 100644 --- a/common/command.c +++ b/common/command.c @@ -11,6 +11,7 @@ #include <common.h> #include <command.h> +#include <console.h> #include <linux/ctype.h> /* diff --git a/common/console.c b/common/console.c index ace206ca4f..10972b04a6 100644 --- a/common/console.c +++ b/common/console.c @@ -6,6 +6,7 @@ */ #include <common.h> +#include <console.h> #include <debug_uart.h> #include <stdarg.h> #include <iomux.h> diff --git a/common/iomux.c b/common/iomux.c index 62bdec61aa..3d8d00b448 100644 --- a/common/iomux.c +++ b/common/iomux.c @@ -6,6 +6,7 @@ */ #include <common.h> +#include <console.h> #include <serial.h> #include <malloc.h> diff --git a/common/main.c b/common/main.c index ead0cd17aa..5a0318123b 100644 --- a/common/main.c +++ b/common/main.c @@ -10,6 +10,7 @@ #include <common.h> #include <autoboot.h> #include <cli.h> +#include <console.h> #include <version.h> DECLARE_GLOBAL_DATA_PTR; diff --git a/common/usb_kbd.c b/common/usb_kbd.c index 5c6a372c1f..5a90f843f2 100644 --- a/common/usb_kbd.c +++ b/common/usb_kbd.c @@ -8,6 +8,7 @@ * SPDX-License-Identifier: GPL-2.0+ */ #include <common.h> +#include <console.h> #include <dm.h> #include <errno.h> #include <malloc.h> diff --git a/drivers/block/fsl_sata.c b/drivers/block/fsl_sata.c index 735708aa20..208a0ae889 100644 --- a/drivers/block/fsl_sata.c +++ b/drivers/block/fsl_sata.c @@ -7,6 +7,7 @@ #include <common.h> #include <command.h> +#include <console.h> #include <asm/io.h> #include <asm/processor.h> #include <asm/fsl_serdes.h> diff --git a/drivers/fpga/ACEX1K.c b/drivers/fpga/ACEX1K.c index 06b88372e5..1627f0e6ff 100644 --- a/drivers/fpga/ACEX1K.c +++ b/drivers/fpga/ACEX1K.c @@ -9,6 +9,7 @@ */ #include <common.h> /* core U-Boot definitions */ +#include <console.h> #include <ACEX1K.h> /* ACEX device family */ /* Define FPGA_DEBUG to get debug printf's */ diff --git a/drivers/fpga/virtex2.c b/drivers/fpga/virtex2.c index 0d2d9a4693..f7cf02ab5b 100644 --- a/drivers/fpga/virtex2.c +++ b/drivers/fpga/virtex2.c @@ -12,6 +12,7 @@ */ #include <common.h> +#include <console.h> #include <virtex2.h> #if 0 diff --git a/drivers/fpga/zynqpl.c b/drivers/fpga/zynqpl.c index 6a74f89610..ef889ea4e6 100644 --- a/drivers/fpga/zynqpl.c +++ b/drivers/fpga/zynqpl.c @@ -8,6 +8,7 @@ */ #include <common.h> +#include <console.h> #include <asm/io.h> #include <fs.h> #include <zynqpl.h> diff --git a/drivers/i2c/adi_i2c.c b/drivers/i2c/adi_i2c.c index c58f14a36e..f0c084132a 100644 --- a/drivers/i2c/adi_i2c.c +++ b/drivers/i2c/adi_i2c.c @@ -7,6 +7,7 @@ */ #include <common.h> +#include <console.h> #include <i2c.h> #include <asm/clock.h> diff --git a/drivers/input/input.c b/drivers/input/input.c index a39db3cc9c..011667fedd 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c @@ -8,6 +8,7 @@ */ #include <common.h> +#include <console.h> #include <dm.h> #include <errno.h> #include <stdio_dev.h> diff --git a/drivers/input/keyboard.c b/drivers/input/keyboard.c index 71546cb086..48255bd87b 100644 --- a/drivers/input/keyboard.c +++ b/drivers/input/keyboard.c @@ -9,7 +9,10 @@ ***********************************************************************/ #include <common.h> +#include <console.h> #include <input.h> + +#include <stdio_dev.h> #include <keyboard.h> #include <stdio_dev.h> diff --git a/drivers/misc/cbmem_console.c b/drivers/misc/cbmem_console.c index 5f85ccf21e..127121e797 100644 --- a/drivers/misc/cbmem_console.c +++ b/drivers/misc/cbmem_console.c @@ -16,7 +16,7 @@ */ #include <common.h> - +#include <console.h> #ifndef CONFIG_SYS_COREBOOT #error This driver requires coreboot #endif diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c index e3cb59887c..39932f4647 100644 --- a/drivers/mtd/cfi_flash.c +++ b/drivers/mtd/cfi_flash.c @@ -18,6 +18,7 @@ /* #define DEBUG */ #include <common.h> +#include <console.h> #include <dm.h> #include <errno.h> #include <fdt_support.h> diff --git a/drivers/mtd/nand/bfin_nand.c b/drivers/mtd/nand/bfin_nand.c index 7e755e8965..7c11868cd3 100644 --- a/drivers/mtd/nand/bfin_nand.c +++ b/drivers/mtd/nand/bfin_nand.c @@ -15,6 +15,7 @@ */ #include <common.h> +#include <console.h> #include <asm/io.h> #ifdef DEBUG diff --git a/drivers/net/e1000_spi.c b/drivers/net/e1000_spi.c index e7f68263a4..df72375238 100644 --- a/drivers/net/e1000_spi.c +++ b/drivers/net/e1000_spi.c @@ -1,4 +1,5 @@ #include <common.h> +#include <console.h> #include "e1000.h" #include <linux/compiler.h> diff --git a/drivers/net/keystone_net.c b/drivers/net/keystone_net.c index 5ed29ae917..24ca52e2df 100644 --- a/drivers/net/keystone_net.c +++ b/drivers/net/keystone_net.c @@ -8,6 +8,7 @@ */ #include <common.h> #include <command.h> +#include <console.h> #include <net.h> #include <phy.h> diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 5633ec2402..51b5746a5a 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -11,6 +11,7 @@ #include <config.h> #include <common.h> +#include <console.h> #include <dm.h> #include <malloc.h> #include <net.h> diff --git a/drivers/net/vsc7385.c b/drivers/net/vsc7385.c index a5110e516d..c6d6dce4ae 100644 --- a/drivers/net/vsc7385.c +++ b/drivers/net/vsc7385.c @@ -14,6 +14,7 @@ #include <config.h> #include <common.h> +#include <console.h> #include <asm/io.h> #include <asm/errno.h> #include "vsc7385.h" diff --git a/drivers/power/battery/bat_trats.c b/drivers/power/battery/bat_trats.c index bfde692176..089e789b62 100644 --- a/drivers/power/battery/bat_trats.c +++ b/drivers/power/battery/bat_trats.c @@ -6,6 +6,7 @@ */ #include <common.h> +#include <console.h> #include <power/pmic.h> #include <power/battery.h> #include <power/max8997_pmic.h> diff --git a/drivers/spi/bfin_spi.c b/drivers/spi/bfin_spi.c index 71a31d0127..9a6fc78151 100644 --- a/drivers/spi/bfin_spi.c +++ b/drivers/spi/bfin_spi.c @@ -9,6 +9,7 @@ /*#define DEBUG*/ #include <common.h> +#include <console.h> #include <malloc.h> #include <spi.h> diff --git a/drivers/spi/bfin_spi6xx.c b/drivers/spi/bfin_spi6xx.c index 8359d760f9..9a27b78f64 100644 --- a/drivers/spi/bfin_spi6xx.c +++ b/drivers/spi/bfin_spi6xx.c @@ -18,6 +18,7 @@ */ #include <common.h> +#include <console.h> #include <malloc.h> #include <spi.h> diff --git a/drivers/spi/sh_qspi.c b/drivers/spi/sh_qspi.c index 7209e1d319..75999c812d 100644 --- a/drivers/spi/sh_qspi.c +++ b/drivers/spi/sh_qspi.c @@ -8,6 +8,7 @@ */ #include <common.h> +#include <console.h> #include <malloc.h> #include <spi.h> #include <asm/arch/rmobile.h> diff --git a/drivers/spi/sh_spi.c b/drivers/spi/sh_spi.c index 7ca5e363da..1384385e05 100644 --- a/drivers/spi/sh_spi.c +++ b/drivers/spi/sh_spi.c @@ -19,6 +19,7 @@ */ #include <common.h> +#include <console.h> #include <malloc.h> #include <spi.h> #include <asm/io.h> diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c index c5e35ee350..cfe9a24e24 100644 --- a/drivers/usb/gadget/ether.c +++ b/drivers/usb/gadget/ether.c @@ -9,6 +9,7 @@ */ #include <common.h> +#include <console.h> #include <asm/errno.h> #include <linux/netdevice.h> #include <linux/usb/ch9.h> diff --git a/drivers/usb/gadget/f_mass_storage.c b/drivers/usb/gadget/f_mass_storage.c index abe9391d3d..ec1f23a0cf 100644 --- a/drivers/usb/gadget/f_mass_storage.c +++ b/drivers/usb/gadget/f_mass_storage.c @@ -243,6 +243,7 @@ #include <config.h> #include <malloc.h> #include <common.h> +#include <console.h> #include <g_dnl.h> #include <linux/err.h> diff --git a/drivers/usb/gadget/f_thor.c b/drivers/usb/gadget/f_thor.c index 9ed0ce3d31..a60e9487e7 100644 --- a/drivers/usb/gadget/f_thor.c +++ b/drivers/usb/gadget/f_thor.c @@ -17,6 +17,7 @@ #include <errno.h> #include <common.h> +#include <console.h> #include <malloc.h> #include <memalign.h> #include <version.h> diff --git a/drivers/usb/host/r8a66597-hcd.c b/drivers/usb/host/r8a66597-hcd.c index 373e04cbe5..6ef51906c2 100644 --- a/drivers/usb/host/r8a66597-hcd.c +++ b/drivers/usb/host/r8a66597-hcd.c @@ -7,6 +7,7 @@ */ #include <common.h> +#include <console.h> #include <usb.h> #include <asm/io.h> diff --git a/drivers/usb/musb-new/musb_uboot.c b/drivers/usb/musb-new/musb_uboot.c index 10f6b5d1cf..233a0e4a5e 100644 --- a/drivers/usb/musb-new/musb_uboot.c +++ b/drivers/usb/musb-new/musb_uboot.c @@ -1,4 +1,5 @@ #include <common.h> +#include <console.h> #include <watchdog.h> #ifdef CONFIG_ARCH_SUNXI #include <asm/arch/usb_phy.h> diff --git a/examples/standalone/mem_to_mem_idma2intr.c b/examples/standalone/mem_to_mem_idma2intr.c index 215dc22033..17da8db9b9 100644 --- a/examples/standalone/mem_to_mem_idma2intr.c +++ b/examples/standalone/mem_to_mem_idma2intr.c @@ -28,6 +28,7 @@ #include <common.h> +#include <console.h> #include <exports.h> DECLARE_GLOBAL_DATA_PTR; diff --git a/examples/standalone/smc911x_eeprom.c b/examples/standalone/smc911x_eeprom.c index 6c79c5f65a..364ad2d2d5 100644 --- a/examples/standalone/smc911x_eeprom.c +++ b/examples/standalone/smc911x_eeprom.c @@ -15,6 +15,7 @@ */ #include <common.h> +#include <console.h> #include <exports.h> #include <linux/ctype.h> #include "../drivers/net/smc911x.h" diff --git a/include/common.h b/include/common.h index 09a131da0b..e9107300e5 100644 --- a/include/common.h +++ b/include/common.h @@ -218,7 +218,6 @@ int run_command_repeatable(const char *cmd, int flag); * @return 0 on success, or != 0 on error. */ int run_command_list(const char *cmd, int len, int flag); -extern char console_buffer[]; /* arch/$(ARCH)/lib/board.c */ void board_init_f(ulong); @@ -862,15 +861,6 @@ void srand(unsigned int seed); unsigned int rand(void); unsigned int rand_r(unsigned int *seedp); -/* common/console.c */ -int console_init_f(void); /* Before relocation; uses the serial stuff */ -int console_init_r(void); /* After relocation; uses the console stuff */ -int console_assign(int file, const char *devname); /* Assign the console */ -int ctrlc (void); -int had_ctrlc (void); /* have we had a Control-C since last clear? */ -void clear_ctrlc (void); /* clear the Control-C condition */ -int disable_ctrlc (int); /* 1 to disable, 0 to enable Control-C detect */ -int confirm_yesno(void); /* 1 if input is "y", "Y", "yes" or "YES" */ /* * STDIO based functions (can always be used) */ @@ -929,13 +919,6 @@ static inline struct in_addr getenv_ip(char *var) return string_to_ip(getenv(var)); } -/* - * CONSOLE multiplexing. - */ -#ifdef CONFIG_CONSOLE_MUX -#include <iomux.h> -#endif - int pcmcia_init (void); #ifdef CONFIG_STATUS_LED diff --git a/include/console.h b/include/console.h new file mode 100644 index 0000000000..097518d150 --- /dev/null +++ b/include/console.h @@ -0,0 +1,30 @@ +/* + * (C) Copyright 2000-2009 + * Wolfgang Denk, DENX Software Engineering, wd@denx.de. + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#ifndef __CONSOLE_H +#define __CONSOLE_H + +extern char console_buffer[]; + +/* common/console.c */ +int console_init_f(void); /* Before relocation; uses the serial stuff */ +int console_init_r(void); /* After relocation; uses the console stuff */ +int console_assign(int file, const char *devname); /* Assign the console */ +int ctrlc(void); +int had_ctrlc(void); /* have we had a Control-C since last clear? */ +void clear_ctrlc(void); /* clear the Control-C condition */ +int disable_ctrlc(int); /* 1 to disable, 0 to enable Control-C detect */ +int confirm_yesno(void); /* 1 if input is "y", "Y", "yes" or "YES" */ + +/* + * CONSOLE multiplexing. + */ +#ifdef CONFIG_CONSOLE_MUX +#include <iomux.h> +#endif + +#endif diff --git a/lib/display_options.c b/lib/display_options.c index 83ea4decb5..4f2961fbfb 100644 --- a/lib/display_options.c +++ b/lib/display_options.c @@ -7,6 +7,7 @@ #include <config.h> #include <common.h> +#include <console.h> #include <div64.h> #include <inttypes.h> #include <version.h> diff --git a/lib/gunzip.c b/lib/gunzip.c index 4128a1871c..bdd85c4c17 100644 --- a/lib/gunzip.c +++ b/lib/gunzip.c @@ -8,6 +8,7 @@ #include <common.h> #include <watchdog.h> #include <command.h> +#include <console.h> #include <image.h> #include <malloc.h> #include <u-boot/zlib.h> @@ -83,6 +83,7 @@ #include <common.h> #include <command.h> +#include <console.h> #include <environment.h> #include <errno.h> #include <net.h> diff --git a/test/dm/test-main.c b/test/dm/test-main.c index a36a9c04ab..867b5177e0 100644 --- a/test/dm/test-main.c +++ b/test/dm/test-main.c @@ -6,6 +6,7 @@ #include <common.h> #include <command.h> +#include <console.h> #include <dm.h> #include <errno.h> #include <malloc.h> diff --git a/test/dm/usb.c b/test/dm/usb.c index 4300bbd5c9..ccc07d5c9b 100644 --- a/test/dm/usb.c +++ b/test/dm/usb.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <console.h> #include <dm.h> #include <usb.h> #include <asm/io.h> |