summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2015-11-08 23:47:45 -0700
committerSimon Glass <sjg@chromium.org>2015-11-19 20:27:50 -0700
commit24b852a7a2b8eca71789100983bdb5104cc00696 (patch)
treeaf9a9ed81d30180f9a9286ed504895c216e80229 /common
parent3884c98c32cd5fb5b5b42185d5d0575659434bbf (diff)
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>
Diffstat (limited to 'common')
-rw-r--r--common/autoboot.c1
-rw-r--r--common/board_f.c1
-rw-r--r--common/board_r.c1
-rw-r--r--common/cli.c1
-rw-r--r--common/cli_hush.c1
-rw-r--r--common/cli_simple.c1
-rw-r--r--common/cmd_armflash.c1
-rw-r--r--common/cmd_bedbug.c1
-rw-r--r--common/cmd_dcr.c1
-rw-r--r--common/cmd_dfu.c1
-rw-r--r--common/cmd_fastboot.c1
-rw-r--r--common/cmd_fpgad.c1
-rw-r--r--common/cmd_fuse.c1
-rw-r--r--common/cmd_i2c.c1
-rw-r--r--common/cmd_load.c1
-rw-r--r--common/cmd_mem.c2
-rw-r--r--common/cmd_misc.c1
-rw-r--r--common/cmd_mmc.c1
-rw-r--r--common/cmd_nand.c1
-rw-r--r--common/cmd_nvedit.c1
-rw-r--r--common/cmd_otp.c1
-rw-r--r--common/cmd_pci.c1
-rw-r--r--common/cmd_usb.c1
-rw-r--r--common/cmd_usb_mass_storage.c1
-rw-r--r--common/command.c1
-rw-r--r--common/console.c1
-rw-r--r--common/iomux.c1
-rw-r--r--common/main.c1
-rw-r--r--common/usb_kbd.c1
29 files changed, 30 insertions, 0 deletions
diff --git a/common/autoboot.c b/common/autoboot.c
index c3670762579..c11fb312361 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 84485e96e8c..09baa5c5504 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 c6aa7e5224a..85aef95a895 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 b6ae80a5fe9..fbcd339c9be 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 296542f4c2d..a7cac4fcb9d 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 d8b40c93915..9c3d073d583 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 af453f7b3b8..b94d128faa2 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 57a8a3f2fe3..69afeafecb5 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 4fddd804abd..cc77250ac82 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 f060db75c6c..6d95ce92231 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 b9d1c8c02bd..488822a2eed 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 1f1d00f28ac..5370c3e72d3 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 d4bc0f6c94a..5998f9b2eb0 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 864b2596cca..3d0de81c32f 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 d043e6d7bcf..0aa7937fd4b 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 43c3fb62bff..9fb25840f10 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 93f9eabd6b5..39d86835cff 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 1335e3d344c..dfc1ec850e2 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 1482462a509..a6b67e29f1c 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 f4c2523f2fb..2f9cdd095a7 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 593bb8c650c..10c1475c5a3 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 dcecef8da85..802e4330440 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 4679134478a..c2d98037fa2 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 198dab15baf..04073891129 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 972ae281c23..858e28885a2 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 ace206ca4ff..10972b04a6f 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 62bdec61aaf..3d8d00b4486 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 ead0cd17aa8..5a0318123bc 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 5c6a372c1f5..5a90f843f2a 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>