Explorar el Código

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>
Simon Glass hace 8 años
padre
commit
24b852a7a2
Se han modificado 100 ficheros con 131 adiciones y 18 borrados
  1. 1 0
      arch/blackfin/lib/cmd_cache_dump.c
  2. 1 0
      arch/powerpc/cpu/mpc8260/ether_fcc.c
  3. 1 0
      arch/powerpc/cpu/mpc8260/i2c.c
  4. 1 0
      arch/powerpc/cpu/mpc8xx/i2c.c
  5. 1 0
      arch/sh/lib/board.c
  6. 1 0
      arch/sparc/lib/board.c
  7. 1 0
      board/Arcturus/ucp1020/spl.c
  8. 1 0
      board/amcc/yucca/cmd_yucca.c
  9. 1 0
      board/astro/mcf5373l/fpga.c
  10. 1 0
      board/cobra5272/flash.c
  11. 1 0
      board/esd/common/cmd_loadpci.c
  12. 1 0
      board/esd/cpci405/cpci405.c
  13. 1 0
      board/esd/pmc405de/pmc405de.c
  14. 1 0
      board/esd/pmc440/cmd_pmc440.c
  15. 1 0
      board/esd/pmc440/pmc440.c
  16. 1 0
      board/esd/vme8349/caddy.c
  17. 1 0
      board/freescale/b4860qds/spl.c
  18. 1 0
      board/freescale/c29xpcie/spl.c
  19. 1 0
      board/freescale/mpc8569mds/mpc8569mds.c
  20. 1 0
      board/freescale/p1010rdb/spl.c
  21. 1 0
      board/freescale/p1022ds/spl.c
  22. 1 0
      board/freescale/p1_p2_rdb_pc/spl.c
  23. 1 0
      board/freescale/t102xqds/spl.c
  24. 1 0
      board/freescale/t102xrdb/spl.c
  25. 1 0
      board/freescale/t104xrdb/spl.c
  26. 1 0
      board/freescale/t208xqds/spl.c
  27. 1 0
      board/freescale/t208xrdb/spl.c
  28. 1 0
      board/freescale/t4qds/spl.c
  29. 1 0
      board/freescale/t4rdb/spl.c
  30. 1 0
      board/gdsys/common/cmd_ioloop.c
  31. 1 0
      board/inka4x0/inkadiag.c
  32. 1 0
      board/lwmon5/kbd.c
  33. 1 0
      board/mpl/common/kbd.c
  34. 1 0
      board/mpl/pati/pati.c
  35. 1 0
      board/renesas/sh7785lcr/selfcheck.c
  36. 1 0
      board/tqc/tqm5200/cmd_stk52xx.c
  37. 1 0
      board/tqc/tqm5200/tqm5200.c
  38. 1 0
      board/xes/xpedite1000/xpedite1000.c
  39. 1 0
      common/autoboot.c
  40. 1 0
      common/board_f.c
  41. 1 0
      common/board_r.c
  42. 1 0
      common/cli.c
  43. 1 0
      common/cli_hush.c
  44. 1 0
      common/cli_simple.c
  45. 1 0
      common/cmd_armflash.c
  46. 1 0
      common/cmd_bedbug.c
  47. 1 0
      common/cmd_dcr.c
  48. 1 0
      common/cmd_dfu.c
  49. 1 0
      common/cmd_fastboot.c
  50. 1 0
      common/cmd_fpgad.c
  51. 1 0
      common/cmd_fuse.c
  52. 1 0
      common/cmd_i2c.c
  53. 1 0
      common/cmd_load.c
  54. 2 0
      common/cmd_mem.c
  55. 1 0
      common/cmd_misc.c
  56. 1 0
      common/cmd_mmc.c
  57. 1 0
      common/cmd_nand.c
  58. 1 0
      common/cmd_nvedit.c
  59. 1 0
      common/cmd_otp.c
  60. 1 0
      common/cmd_pci.c
  61. 1 0
      common/cmd_usb.c
  62. 1 0
      common/cmd_usb_mass_storage.c
  63. 1 0
      common/command.c
  64. 1 0
      common/console.c
  65. 1 0
      common/iomux.c
  66. 1 0
      common/main.c
  67. 1 0
      common/usb_kbd.c
  68. 1 0
      drivers/block/fsl_sata.c
  69. 1 0
      drivers/fpga/ACEX1K.c
  70. 1 0
      drivers/fpga/virtex2.c
  71. 1 0
      drivers/fpga/zynqpl.c
  72. 1 0
      drivers/i2c/adi_i2c.c
  73. 1 0
      drivers/input/input.c
  74. 3 0
      drivers/input/keyboard.c
  75. 1 1
      drivers/misc/cbmem_console.c
  76. 1 0
      drivers/mtd/cfi_flash.c
  77. 1 0
      drivers/mtd/nand/bfin_nand.c
  78. 1 0
      drivers/net/e1000_spi.c
  79. 1 0
      drivers/net/keystone_net.c
  80. 1 0
      drivers/net/phy/phy.c
  81. 1 0
      drivers/net/vsc7385.c
  82. 1 0
      drivers/power/battery/bat_trats.c
  83. 1 0
      drivers/spi/bfin_spi.c
  84. 1 0
      drivers/spi/bfin_spi6xx.c
  85. 1 0
      drivers/spi/sh_qspi.c
  86. 1 0
      drivers/spi/sh_spi.c
  87. 1 0
      drivers/usb/gadget/ether.c
  88. 1 0
      drivers/usb/gadget/f_mass_storage.c
  89. 1 0
      drivers/usb/gadget/f_thor.c
  90. 1 0
      drivers/usb/host/r8a66597-hcd.c
  91. 1 0
      drivers/usb/musb-new/musb_uboot.c
  92. 1 0
      examples/standalone/mem_to_mem_idma2intr.c
  93. 1 0
      examples/standalone/smc911x_eeprom.c
  94. 0 17
      include/common.h
  95. 30 0
      include/console.h
  96. 1 0
      lib/display_options.c
  97. 1 0
      lib/gunzip.c
  98. 1 0
      net/net.c
  99. 1 0
      test/dm/test-main.c
  100. 1 0
      test/dm/usb.c

+ 1 - 0
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>

+ 1 - 0
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>

+ 1 - 0
arch/powerpc/cpu/mpc8260/i2c.c

@@ -9,6 +9,7 @@
  */
 
 #include <common.h>
+#include <console.h>
 
 #if defined(CONFIG_HARD_I2C)
 

+ 1 - 0
arch/powerpc/cpu/mpc8xx/i2c.c

@@ -12,6 +12,7 @@
  */
 
 #include <common.h>
+#include <console.h>
 
 #ifdef CONFIG_HARD_I2C
 

+ 1 - 0
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>

+ 1 - 0
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>

+ 1 - 0
board/Arcturus/ucp1020/spl.c

@@ -9,6 +9,7 @@
  */
 
 #include <common.h>
+#include <console.h>
 #include <ns16550.h>
 #include <malloc.h>
 #include <mmc.h>

+ 1 - 0
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>

+ 1 - 0
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>

+ 1 - 0
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

+ 1 - 0
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

+ 1 - 0
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>

+ 1 - 0
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>

+ 1 - 0
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>

+ 1 - 0
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>

+ 1 - 0
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>

+ 1 - 0
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>

+ 1 - 0
board/freescale/c29xpcie/spl.c

@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <console.h>
 #include <ns16550.h>
 #include <malloc.h>
 #include <mmc.h>

+ 1 - 0
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>

+ 1 - 0
board/freescale/p1010rdb/spl.c

@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <console.h>
 #include <ns16550.h>
 #include <malloc.h>
 #include <mmc.h>

+ 1 - 0
board/freescale/p1022ds/spl.c

@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <console.h>
 #include <ns16550.h>
 #include <malloc.h>
 #include <mmc.h>

+ 1 - 0
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>

+ 1 - 0
board/freescale/t102xqds/spl.c

@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <console.h>
 #include <malloc.h>
 #include <ns16550.h>
 #include <nand.h>

+ 1 - 0
board/freescale/t102xrdb/spl.c

@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <console.h>
 #include <malloc.h>
 #include <ns16550.h>
 #include <nand.h>

+ 1 - 0
board/freescale/t104xrdb/spl.c

@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <console.h>
 #include <malloc.h>
 #include <ns16550.h>
 #include <nand.h>

+ 1 - 0
board/freescale/t208xqds/spl.c

@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <console.h>
 #include <malloc.h>
 #include <ns16550.h>
 #include <nand.h>

+ 1 - 0
board/freescale/t208xrdb/spl.c

@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <console.h>
 #include <malloc.h>
 #include <ns16550.h>
 #include <nand.h>

+ 1 - 0
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>

+ 1 - 0
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>

+ 1 - 0
board/gdsys/common/cmd_ioloop.c

@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <console.h>
 
 #include <gdsys_fpga.h>
 

+ 1 - 0
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>
 

+ 1 - 0
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>

+ 1 - 0
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"

+ 1 - 0
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>

+ 1 - 0
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>

+ 1 - 0
board/tqc/tqm5200/cmd_stk52xx.c

@@ -12,6 +12,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <console.h>
 
 #if defined(CONFIG_CMD_BSP)
 

+ 1 - 0
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>

+ 1 - 0
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>

+ 1 - 0
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>

+ 1 - 0
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>

+ 1 - 0
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

+ 1 - 0
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>
 

+ 1 - 0
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>

+ 1 - 0
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 */

+ 1 - 0
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

+ 1 - 0
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>

+ 1 - 0
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);

+ 1 - 0
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>

+ 1 - 0
common/cmd_fastboot.c

@@ -9,6 +9,7 @@
  */
 #include <common.h>
 #include <command.h>
+#include <console.h>
 #include <g_dnl.h>
 #include <usb.h>
 

+ 1 - 0
common/cmd_fpgad.c

@@ -11,6 +11,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <console.h>
 
 #include <gdsys_fpga.h>
 

+ 1 - 0
common/cmd_fuse.c

@@ -11,6 +11,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <console.h>
 #include <fuse.h>
 #include <asm/errno.h>
 

+ 1 - 0
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>

+ 1 - 0
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>

+ 2 - 0
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

+ 1 - 0
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[])
 {

+ 1 - 0
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;

+ 1 - 0
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>

+ 1 - 0
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>

+ 1 - 0
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>

+ 1 - 0
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>

+ 1 - 0
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>

+ 1 - 0
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>

+ 1 - 0
common/command.c

@@ -11,6 +11,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <console.h>
 #include <linux/ctype.h>
 
 /*

+ 1 - 0
common/console.c

@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <console.h>
 #include <debug_uart.h>
 #include <stdarg.h>
 #include <iomux.h>

+ 1 - 0
common/iomux.c

@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <console.h>
 #include <serial.h>
 #include <malloc.h>
 

+ 1 - 0
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;

+ 1 - 0
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>

+ 1 - 0
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>

+ 1 - 0
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 */

+ 1 - 0
drivers/fpga/virtex2.c

@@ -12,6 +12,7 @@
  */
 
 #include <common.h>
+#include <console.h>
 #include <virtex2.h>
 
 #if 0

+ 1 - 0
drivers/fpga/zynqpl.c

@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <console.h>
 #include <asm/io.h>
 #include <fs.h>
 #include <zynqpl.h>

+ 1 - 0
drivers/i2c/adi_i2c.c

@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <console.h>
 #include <i2c.h>
 
 #include <asm/clock.h>

+ 1 - 0
drivers/input/input.c

@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <console.h>
 #include <dm.h>
 #include <errno.h>
 #include <stdio_dev.h>

+ 3 - 0
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>
 

+ 1 - 1
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

+ 1 - 0
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>

+ 1 - 0
drivers/mtd/nand/bfin_nand.c

@@ -15,6 +15,7 @@
  */
 
 #include <common.h>
+#include <console.h>
 #include <asm/io.h>
 
 #ifdef DEBUG

+ 1 - 0
drivers/net/e1000_spi.c

@@ -1,4 +1,5 @@
 #include <common.h>
+#include <console.h>
 #include "e1000.h"
 #include <linux/compiler.h>
 

+ 1 - 0
drivers/net/keystone_net.c

@@ -8,6 +8,7 @@
  */
 #include <common.h>
 #include <command.h>
+#include <console.h>
 
 #include <net.h>
 #include <phy.h>

+ 1 - 0
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>

+ 1 - 0
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"

+ 1 - 0
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>

+ 1 - 0
drivers/spi/bfin_spi.c

@@ -9,6 +9,7 @@
 /*#define DEBUG*/
 
 #include <common.h>
+#include <console.h>
 #include <malloc.h>
 #include <spi.h>
 

+ 1 - 0
drivers/spi/bfin_spi6xx.c

@@ -18,6 +18,7 @@
  */
 
 #include <common.h>
+#include <console.h>
 #include <malloc.h>
 #include <spi.h>
 

+ 1 - 0
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>

+ 1 - 0
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>

+ 1 - 0
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>

+ 1 - 0
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>

+ 1 - 0
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>

+ 1 - 0
drivers/usb/host/r8a66597-hcd.c

@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <console.h>
 #include <usb.h>
 #include <asm/io.h>
 

+ 1 - 0
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>

+ 1 - 0
examples/standalone/mem_to_mem_idma2intr.c

@@ -28,6 +28,7 @@
 
 
 #include <common.h>
+#include <console.h>
 #include <exports.h>
 
 DECLARE_GLOBAL_DATA_PTR;

+ 1 - 0
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"

+ 0 - 17
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

+ 30 - 0
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

+ 1 - 0
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>

+ 1 - 0
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>

+ 1 - 0
net/net.c

@@ -83,6 +83,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <console.h>
 #include <environment.h>
 #include <errno.h>
 #include <net.h>

+ 1 - 0
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>

+ 1 - 0
test/dm/usb.c

@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <console.h>
 #include <dm.h>
 #include <usb.h>
 #include <asm/io.h>