From: Simon Glass Date: Sat, 28 Dec 2019 17:45:07 +0000 (-0700) Subject: common: Move hang() to the same header as panic() X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=db41d65a97f335167e1fbc0400a83333b5157703;p=u-boot.git common: Move hang() to the same header as panic() At present panic() is in the vsprintf.h header file. That does not seem like an obvious choice for hang(), even though it relates to panic(). So let's put hang() in its own header. Signed-off-by: Simon Glass [trini: Migrate a few more files] Signed-off-by: Tom Rini --- diff --git a/arch/arm/cpu/arm926ejs/mxs/mxs.c b/arch/arm/cpu/arm926ejs/mxs/mxs.c index f44205c3a8..16c080a1e1 100644 --- a/arch/arm/cpu/arm926ejs/mxs/mxs.c +++ b/arch/arm/cpu/arm926ejs/mxs/mxs.c @@ -11,6 +11,7 @@ #include #include +#include #include #include #include diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c b/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c index 7a1b39844e..7c57cab0b1 100644 --- a/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c +++ b/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c @@ -8,6 +8,7 @@ #include #include +#include #include #include diff --git a/arch/arm/cpu/armv8/cache_v8.c b/arch/arm/cpu/armv8/cache_v8.c index c1a08fb4ac..6a5518f9de 100644 --- a/arch/arm/cpu/armv8/cache_v8.c +++ b/arch/arm/cpu/armv8/cache_v8.c @@ -9,6 +9,7 @@ #include #include +#include #include #include diff --git a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c index e3df696b88..dce915a2ea 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c +++ b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/arm/include/asm/armv8/mmu.h b/arch/arm/include/asm/armv8/mmu.h index 4a573208df..fc97c55114 100644 --- a/arch/arm/include/asm/armv8/mmu.h +++ b/arch/arm/include/asm/armv8/mmu.h @@ -7,6 +7,7 @@ #ifndef _ASM_ARMV8_MMU_H_ #define _ASM_ARMV8_MMU_H_ +#include #include /* diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c index 769a64257f..a135bcfc7b 100644 --- a/arch/arm/lib/bootm.c +++ b/arch/arm/lib/bootm.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/arm/lib/div0.c b/arch/arm/lib/div0.c index e185bfe0c6..b91b408f64 100644 --- a/arch/arm/lib/div0.c +++ b/arch/arm/lib/div0.c @@ -4,10 +4,10 @@ * Wolfgang Denk, DENX Software Engineering, wd@denx.de. */ +#include + /* Replacement (=dummy) for GNU/Linux division-by zero handler */ void __div0 (void) { - extern void hang (void); - hang(); } diff --git a/arch/arm/mach-at91/spl.c b/arch/arm/mach-at91/spl.c index 6da6d41be2..156150c89c 100644 --- a/arch/arm/mach-at91/spl.c +++ b/arch/arm/mach-at91/spl.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-at91/spl_at91.c b/arch/arm/mach-at91/spl_at91.c index 1065f090e0..822f877de7 100644 --- a/arch/arm/mach-at91/spl_at91.c +++ b/arch/arm/mach-at91/spl_at91.c @@ -9,6 +9,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-at91/spl_atmel.c b/arch/arm/mach-at91/spl_atmel.c index 85290be369..6ee0e1c24c 100644 --- a/arch/arm/mach-at91/spl_atmel.c +++ b/arch/arm/mach-at91/spl_atmel.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-davinci/spl.c b/arch/arm/mach-davinci/spl.c index be3daa9bc0..d44e840aa0 100644 --- a/arch/arm/mach-davinci/spl.c +++ b/arch/arm/mach-davinci/spl.c @@ -5,6 +5,7 @@ */ #include #include +#include #include #include #include diff --git a/arch/arm/mach-imx/mx6/ddr.c b/arch/arm/mach-imx/mx6/ddr.c index 8ed8b79c8b..4396880b74 100644 --- a/arch/arm/mach-imx/mx6/ddr.c +++ b/arch/arm/mach-imx/mx6/ddr.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-imx/spl.c b/arch/arm/mach-imx/spl.c index 5a6493a625..87dbdf3011 100644 --- a/arch/arm/mach-imx/spl.c +++ b/arch/arm/mach-imx/spl.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-k3/security.c b/arch/arm/mach-k3/security.c index 4e011ee10e..6934e88a96 100644 --- a/arch/arm/mach-k3/security.c +++ b/arch/arm/mach-k3/security.c @@ -8,6 +8,7 @@ #include #include +#include #include #include #include diff --git a/arch/arm/mach-keystone/mon.c b/arch/arm/mach-keystone/mon.c index cc2ec88505..b7de9ba099 100644 --- a/arch/arm/mach-keystone/mon.c +++ b/arch/arm/mach-keystone/mon.c @@ -5,6 +5,7 @@ * Copyright (C) 2012-2019 Texas Instruments Incorporated - http://www.ti.com/ */ +#include #include #include #include diff --git a/arch/arm/mach-mediatek/spl.c b/arch/arm/mach-mediatek/spl.c index 9b3590ff3d..37f1f219b2 100644 --- a/arch/arm/mach-mediatek/spl.c +++ b/arch/arm/mach-mediatek/spl.c @@ -6,6 +6,7 @@ #include #include +#include #include #include "init.h" diff --git a/arch/arm/mach-mvebu/spl.c b/arch/arm/mach-mvebu/spl.c index 3cb27b7f4b..a99bf166fd 100644 --- a/arch/arm/mach-mvebu/spl.c +++ b/arch/arm/mach-mvebu/spl.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/arm/mach-omap2/am33xx/clock.c b/arch/arm/mach-omap2/am33xx/clock.c index 7c666be758..8c61547ee9 100644 --- a/arch/arm/mach-omap2/am33xx/clock.c +++ b/arch/arm/mach-omap2/am33xx/clock.c @@ -8,6 +8,7 @@ * Copyright (C) 2013, Texas Instruments, Incorporated - http://www.ti.com/ */ #include +#include #include #include #include diff --git a/arch/arm/mach-omap2/am33xx/fdt.c b/arch/arm/mach-omap2/am33xx/fdt.c index 1005a5be96..c81dc808e5 100644 --- a/arch/arm/mach-omap2/am33xx/fdt.c +++ b/arch/arm/mach-omap2/am33xx/fdt.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-omap2/clocks-common.c b/arch/arm/mach-omap2/clocks-common.c index 5932d694d3..9aff83e9df 100644 --- a/arch/arm/mach-omap2/clocks-common.c +++ b/arch/arm/mach-omap2/clocks-common.c @@ -13,6 +13,7 @@ * Rajendra Nayak */ #include +#include #include #include #include diff --git a/arch/arm/mach-omap2/emif-common.c b/arch/arm/mach-omap2/emif-common.c index bb81063c0f..4658f67e84 100644 --- a/arch/arm/mach-omap2/emif-common.c +++ b/arch/arm/mach-omap2/emif-common.c @@ -9,6 +9,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-omap2/omap5/dra7xx_iodelay.c b/arch/arm/mach-omap2/omap5/dra7xx_iodelay.c index 9eda57c450..598074ba21 100644 --- a/arch/arm/mach-omap2/omap5/dra7xx_iodelay.c +++ b/arch/arm/mach-omap2/omap5/dra7xx_iodelay.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-omap2/omap5/fdt.c b/arch/arm/mach-omap2/omap5/fdt.c index 5ba8806dd7..c4adba31e6 100644 --- a/arch/arm/mach-omap2/omap5/fdt.c +++ b/arch/arm/mach-omap2/omap5/fdt.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-omap2/sec-common.c b/arch/arm/mach-omap2/sec-common.c index f3df8affa3..28b929f84f 100644 --- a/arch/arm/mach-omap2/sec-common.c +++ b/arch/arm/mach-omap2/sec-common.c @@ -14,6 +14,7 @@ #include #include +#include #include #include diff --git a/arch/arm/mach-rockchip/bootrom.c b/arch/arm/mach-rockchip/bootrom.c index 10614c99d9..1524eca272 100644 --- a/arch/arm/mach-rockchip/bootrom.c +++ b/arch/arm/mach-rockchip/bootrom.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-rockchip/rk3188/rk3188.c b/arch/arm/mach-rockchip/rk3188/rk3188.c index 1b012f7f67..61d410d780 100644 --- a/arch/arm/mach-rockchip/rk3188/rk3188.c +++ b/arch/arm/mach-rockchip/rk3188/rk3188.c @@ -4,6 +4,7 @@ */ #include #include +#include #include #include #include diff --git a/arch/arm/mach-rockchip/spl.c b/arch/arm/mach-rockchip/spl.c index 514032a44a..7d0e6fa1af 100644 --- a/arch/arm/mach-rockchip/spl.c +++ b/arch/arm/mach-rockchip/spl.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/arm/mach-rockchip/tpl.c b/arch/arm/mach-rockchip/tpl.c index c3734cb070..31a3eb4c28 100644 --- a/arch/arm/mach-rockchip/tpl.c +++ b/arch/arm/mach-rockchip/tpl.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/arm/mach-socfpga/mailbox_s10.c b/arch/arm/mach-socfpga/mailbox_s10.c index 3254bc1805..f30e7f80a2 100644 --- a/arch/arm/mach-socfpga/mailbox_s10.c +++ b/arch/arm/mach-socfpga/mailbox_s10.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-socfpga/misc.c b/arch/arm/mach-socfpga/misc.c index db71105af3..2901b7db68 100644 --- a/arch/arm/mach-socfpga/misc.c +++ b/arch/arm/mach-socfpga/misc.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/arch/arm/mach-socfpga/spl_a10.c b/arch/arm/mach-socfpga/spl_a10.c index 7c38c50981..d9ef851054 100644 --- a/arch/arm/mach-socfpga/spl_a10.c +++ b/arch/arm/mach-socfpga/spl_a10.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/arch/arm/mach-socfpga/spl_agilex.c b/arch/arm/mach-socfpga/spl_agilex.c index c745d64114..ecc1a35c49 100644 --- a/arch/arm/mach-socfpga/spl_agilex.c +++ b/arch/arm/mach-socfpga/spl_agilex.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/arm/mach-socfpga/spl_gen5.c b/arch/arm/mach-socfpga/spl_gen5.c index e19f55aa9b..70f8455ddc 100644 --- a/arch/arm/mach-socfpga/spl_gen5.c +++ b/arch/arm/mach-socfpga/spl_gen5.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-socfpga/spl_s10.c b/arch/arm/mach-socfpga/spl_s10.c index 8d96918cb4..d89151d902 100644 --- a/arch/arm/mach-socfpga/spl_s10.c +++ b/arch/arm/mach-socfpga/spl_s10.c @@ -4,6 +4,7 @@ * */ +#include #include #include #include diff --git a/arch/arm/mach-stm32mp/spl.c b/arch/arm/mach-stm32mp/spl.c index a3b0d6f382..ca4231cd0d 100644 --- a/arch/arm/mach-stm32mp/spl.c +++ b/arch/arm/mach-stm32mp/spl.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/arch/arm/mach-tegra/cboot.c b/arch/arm/mach-tegra/cboot.c index 0762144ecf..c5361ca73d 100644 --- a/arch/arm/mach-tegra/cboot.c +++ b/arch/arm/mach-tegra/cboot.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include diff --git a/arch/arm/mach-uniphier/spl_board_init.c b/arch/arm/mach-uniphier/spl_board_init.c index d09c91ab42..c7262d70a5 100644 --- a/arch/arm/mach-uniphier/spl_board_init.c +++ b/arch/arm/mach-uniphier/spl_board_init.c @@ -6,6 +6,7 @@ #include #include +#include #include #include "init.h" diff --git a/arch/arm/mach-zynq/spl.c b/arch/arm/mach-zynq/spl.c index 9b7c0be951..96ba90fb7a 100644 --- a/arch/arm/mach-zynq/spl.c +++ b/arch/arm/mach-zynq/spl.c @@ -4,6 +4,7 @@ */ #include #include +#include #include #include diff --git a/arch/microblaze/cpu/exception.c b/arch/microblaze/cpu/exception.c index bdcbe08685..b8dedc4e19 100644 --- a/arch/microblaze/cpu/exception.c +++ b/arch/microblaze/cpu/exception.c @@ -6,6 +6,7 @@ */ #include +#include #include void _hw_exception_handler (void) diff --git a/arch/microblaze/lib/bootm.c b/arch/microblaze/lib/bootm.c index efd5acf359..2d6a41be2f 100644 --- a/arch/microblaze/lib/bootm.c +++ b/arch/microblaze/lib/bootm.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/mips/lib/traps.c b/arch/mips/lib/traps.c index 6fe8ebd16b..b8568c00fe 100644 --- a/arch/mips/lib/traps.c +++ b/arch/mips/lib/traps.c @@ -12,6 +12,7 @@ #include #include +#include #include #include #include diff --git a/arch/mips/mach-ath79/ar934x/clk.c b/arch/mips/mach-ath79/ar934x/clk.c index fc4625d62a..09bdc253ae 100644 --- a/arch/mips/mach-ath79/ar934x/clk.c +++ b/arch/mips/mach-ath79/ar934x/clk.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/arch/mips/mach-jz47xx/jz4780/jz4780.c b/arch/mips/mach-jz47xx/jz4780/jz4780.c index 0ae5e09e01..015840de25 100644 --- a/arch/mips/mach-jz47xx/jz4780/jz4780.c +++ b/arch/mips/mach-jz47xx/jz4780/jz4780.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/mips/mach-jz47xx/jz4780/sdram.c b/arch/mips/mach-jz47xx/jz4780/sdram.c index 5b25c8d002..65afefe53e 100644 --- a/arch/mips/mach-jz47xx/jz4780/sdram.c +++ b/arch/mips/mach-jz47xx/jz4780/sdram.c @@ -10,6 +10,7 @@ */ #include +#include #include #include #include diff --git a/arch/nds32/lib/bootm.c b/arch/nds32/lib/bootm.c index a472f6a187..1003bc87b9 100644 --- a/arch/nds32/lib/bootm.c +++ b/arch/nds32/lib/bootm.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/nios2/cpu/traps.c b/arch/nios2/cpu/traps.c index 1c3cc03178..087a05097d 100644 --- a/arch/nios2/cpu/traps.c +++ b/arch/nios2/cpu/traps.c @@ -4,8 +4,9 @@ * Scott McNutt */ -#include #include +#include +#include void trap_handler (struct pt_regs *regs) { @@ -21,5 +22,5 @@ void soft_emulation (struct pt_regs *regs) */ printf ("\n\n*** ERROR: unimplemented instruction @ %08x\n", regs->reg[29] - 4); - hang (); + hang(); } diff --git a/arch/powerpc/cpu/mpc8xxx/fsl_lbc.c b/arch/powerpc/cpu/mpc8xxx/fsl_lbc.c index c43732f7c5..afcb75ba17 100644 --- a/arch/powerpc/cpu/mpc8xxx/fsl_lbc.c +++ b/arch/powerpc/cpu/mpc8xxx/fsl_lbc.c @@ -4,6 +4,7 @@ */ #include +#include #include #ifdef CONFIG_MPC83xx diff --git a/arch/riscv/lib/bootm.c b/arch/riscv/lib/bootm.c index d1d1573c62..fad16901c5 100644 --- a/arch/riscv/lib/bootm.c +++ b/arch/riscv/lib/bootm.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/riscv/lib/interrupts.c b/arch/riscv/lib/interrupts.c index 3b25c5b7a7..512dce0619 100644 --- a/arch/riscv/lib/interrupts.c +++ b/arch/riscv/lib/interrupts.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include diff --git a/arch/riscv/lib/reset.c b/arch/riscv/lib/reset.c index b8cecb309d..ce3c1cf872 100644 --- a/arch/riscv/lib/reset.c +++ b/arch/riscv/lib/reset.c @@ -5,6 +5,7 @@ #include #include +#include int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { diff --git a/arch/riscv/lib/spl.c b/arch/riscv/lib/spl.c index dc7577f751..ae07bbe40a 100644 --- a/arch/riscv/lib/spl.c +++ b/arch/riscv/lib/spl.c @@ -5,6 +5,7 @@ */ #include #include +#include #include #include diff --git a/arch/sandbox/cpu/spl.c b/arch/sandbox/cpu/spl.c index 44c68a39bc..d5f683bbaa 100644 --- a/arch/sandbox/cpu/spl.c +++ b/arch/sandbox/cpu/spl.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/arch/x86/cpu/i386/interrupt.c b/arch/x86/cpu/i386/interrupt.c index 991cf5c56b..70edbe06e4 100644 --- a/arch/x86/cpu/i386/interrupt.c +++ b/arch/x86/cpu/i386/interrupt.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/x86/cpu/quark/mrc_util.c b/arch/x86/cpu/quark/mrc_util.c index 8a68ddba97..b0bc59b71e 100644 --- a/arch/x86/cpu/quark/mrc_util.c +++ b/arch/x86/cpu/quark/mrc_util.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include diff --git a/arch/x86/lib/bootm.c b/arch/x86/lib/bootm.c index 5443a862ab..07d8f1f279 100644 --- a/arch/x86/lib/bootm.c +++ b/arch/x86/lib/bootm.c @@ -9,6 +9,7 @@ #include #include +#include #include #include #include diff --git a/arch/x86/lib/spl.c b/arch/x86/lib/spl.c index f0e2bf053d..90baec2a17 100644 --- a/arch/x86/lib/spl.c +++ b/arch/x86/lib/spl.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/x86/lib/tpl.c b/arch/x86/lib/tpl.c index 784e3a02de..34804b53cc 100644 --- a/arch/x86/lib/tpl.c +++ b/arch/x86/lib/tpl.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/board/BuR/brppt2/board.c b/board/BuR/brppt2/board.c index 590e92b5a0..c91d2f9494 100644 --- a/board/BuR/brppt2/board.c +++ b/board/BuR/brppt2/board.c @@ -8,6 +8,7 @@ */ #include #include +#include #include #include #include diff --git a/board/armadeus/apf27/apf27.c b/board/armadeus/apf27/apf27.c index 75395d92cd..29e0bf388d 100644 --- a/board/armadeus/apf27/apf27.c +++ b/board/armadeus/apf27/apf27.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/board/bosch/shc/mux.c b/board/bosch/shc/mux.c index b04c5914f0..0a97eafea6 100644 --- a/board/bosch/shc/mux.c +++ b/board/bosch/shc/mux.c @@ -10,6 +10,7 @@ */ #include +#include #include #include #include diff --git a/board/compulab/cl-som-imx7/spl.c b/board/compulab/cl-som-imx7/spl.c index 6833608a53..360c4df17b 100644 --- a/board/compulab/cl-som-imx7/spl.c +++ b/board/compulab/cl-som-imx7/spl.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include diff --git a/board/compulab/cm_fx6/spl.c b/board/compulab/cm_fx6/spl.c index 1ddf424e42..592d741095 100644 --- a/board/compulab/cm_fx6/spl.c +++ b/board/compulab/cm_fx6/spl.c @@ -9,6 +9,7 @@ #include #include +#include #include #include #include diff --git a/board/compulab/cm_t43/spl.c b/board/compulab/cm_t43/spl.c index fdab9c3fd1..016c63a509 100644 --- a/board/compulab/cm_t43/spl.c +++ b/board/compulab/cm_t43/spl.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/engicam/common/board.c b/board/engicam/common/board.c index 6472d382c9..9483516ca0 100644 --- a/board/engicam/common/board.c +++ b/board/engicam/common/board.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/board/firefly/firefly-rk3288/firefly-rk3288.c b/board/firefly/firefly-rk3288/firefly-rk3288.c index a3f784f0a3..a2b0eb5a99 100644 --- a/board/firefly/firefly-rk3288/firefly-rk3288.c +++ b/board/firefly/firefly-rk3288/firefly-rk3288.c @@ -4,6 +4,7 @@ */ #include +#include #ifdef CONFIG_SPL_BUILD static int setup_led(void) diff --git a/board/freescale/imx8mm_evk/spl.c b/board/freescale/imx8mm_evk/spl.c index d125dc9317..a26fc96b91 100644 --- a/board/freescale/imx8mm_evk/spl.c +++ b/board/freescale/imx8mm_evk/spl.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/board/freescale/imx8mn_evk/spl.c b/board/freescale/imx8mn_evk/spl.c index 7bc22d905f..7aed14c52b 100644 --- a/board/freescale/imx8mn_evk/spl.c +++ b/board/freescale/imx8mn_evk/spl.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/board/freescale/imx8mp_evk/spl.c b/board/freescale/imx8mp_evk/spl.c index 7802cef4a7..0b20668e2b 100644 --- a/board/freescale/imx8mp_evk/spl.c +++ b/board/freescale/imx8mp_evk/spl.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/board/freescale/imx8mq_evk/spl.c b/board/freescale/imx8mq_evk/spl.c index 9164cfb9d8..e442510f44 100644 --- a/board/freescale/imx8mq_evk/spl.c +++ b/board/freescale/imx8mq_evk/spl.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/ls1012ardb/ls1012ardb.c b/board/freescale/ls1012ardb/ls1012ardb.c index 90c1824e46..0f665c7bc6 100644 --- a/board/freescale/ls1012ardb/ls1012ardb.c +++ b/board/freescale/ls1012ardb/ls1012ardb.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c b/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c index c85243f58b..71fca8ca1e 100644 --- a/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c +++ b/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/board/gateworks/gw_ventana/gw_ventana_spl.c b/board/gateworks/gw_ventana/gw_ventana_spl.c index b0891379a1..80fec5f9cf 100644 --- a/board/gateworks/gw_ventana/gw_ventana_spl.c +++ b/board/gateworks/gw_ventana/gw_ventana_spl.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/board/gdsys/p1022/controlcenterd-id.c b/board/gdsys/p1022/controlcenterd-id.c index 04d3809566..ad56dd7d01 100644 --- a/board/gdsys/p1022/controlcenterd-id.c +++ b/board/gdsys/p1022/controlcenterd-id.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include diff --git a/board/renesas/alt/alt.c b/board/renesas/alt/alt.c index 70c14d9f33..a6d7cb48a2 100644 --- a/board/renesas/alt/alt.c +++ b/board/renesas/alt/alt.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/board/renesas/condor/condor.c b/board/renesas/condor/condor.c index 11fbd5b07d..6505beda81 100644 --- a/board/renesas/condor/condor.c +++ b/board/renesas/condor/condor.c @@ -8,6 +8,7 @@ #include #include +#include #include #include #include diff --git a/board/renesas/draak/draak.c b/board/renesas/draak/draak.c index 7ad21f9812..2f9364c484 100644 --- a/board/renesas/draak/draak.c +++ b/board/renesas/draak/draak.c @@ -8,6 +8,7 @@ #include #include +#include #include #include #include diff --git a/board/renesas/eagle/eagle.c b/board/renesas/eagle/eagle.c index d5f40717d4..cf06a173e4 100644 --- a/board/renesas/eagle/eagle.c +++ b/board/renesas/eagle/eagle.c @@ -8,6 +8,7 @@ #include #include +#include #include #include #include diff --git a/board/renesas/ebisu/ebisu.c b/board/renesas/ebisu/ebisu.c index b608c61e23..81d7f8eafa 100644 --- a/board/renesas/ebisu/ebisu.c +++ b/board/renesas/ebisu/ebisu.c @@ -8,6 +8,7 @@ #include #include +#include #include #include #include diff --git a/board/renesas/gose/gose.c b/board/renesas/gose/gose.c index c137da64b3..eb6ee6f6a4 100644 --- a/board/renesas/gose/gose.c +++ b/board/renesas/gose/gose.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/board/renesas/koelsch/koelsch.c b/board/renesas/koelsch/koelsch.c index ff7e458b3c..e09d3d0a63 100644 --- a/board/renesas/koelsch/koelsch.c +++ b/board/renesas/koelsch/koelsch.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/board/renesas/lager/lager.c b/board/renesas/lager/lager.c index d6b388fead..9ac9515925 100644 --- a/board/renesas/lager/lager.c +++ b/board/renesas/lager/lager.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/board/renesas/porter/porter.c b/board/renesas/porter/porter.c index b9c29349cc..097710b479 100644 --- a/board/renesas/porter/porter.c +++ b/board/renesas/porter/porter.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/board/renesas/silk/silk.c b/board/renesas/silk/silk.c index b69e7035ab..e7cbd75776 100644 --- a/board/renesas/silk/silk.c +++ b/board/renesas/silk/silk.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/board/samsung/common/board.c b/board/samsung/common/board.c index ee2fc7971e..5d4646d14c 100644 --- a/board/samsung/common/board.c +++ b/board/samsung/common/board.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/board/st/stm32mp1/stm32mp1.c b/board/st/stm32mp1/stm32mp1.c index 1d4a54c902..9c345c7a70 100644 --- a/board/st/stm32mp1/stm32mp1.c +++ b/board/st/stm32mp1/stm32mp1.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include diff --git a/board/sunxi/board.c b/board/sunxi/board.c index a7c4f7f71c..6afea6ef42 100644 --- a/board/sunxi/board.c +++ b/board/sunxi/board.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include diff --git a/board/technexion/pico-imx6ul/spl.c b/board/technexion/pico-imx6ul/spl.c index d3cbaf3989..41b053ab1c 100644 --- a/board/technexion/pico-imx6ul/spl.c +++ b/board/technexion/pico-imx6ul/spl.c @@ -2,6 +2,7 @@ #include #include +#include #include #include #include diff --git a/board/ti/ks2_evm/board.c b/board/ti/ks2_evm/board.c index da98c1c739..6554c0eb11 100644 --- a/board/ti/ks2_evm/board.c +++ b/board/ti/ks2_evm/board.c @@ -9,6 +9,7 @@ #include #include "board.h" #include +#include #include #include #include diff --git a/board/ti/ks2_evm/board_k2g.c b/board/ti/ks2_evm/board_k2g.c index 920d0d3420..c6a14a0554 100644 --- a/board/ti/ks2_evm/board_k2g.c +++ b/board/ti/ks2_evm/board_k2g.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/board/ti/ks2_evm/mux-k2g.h b/board/ti/ks2_evm/mux-k2g.h index 6aa785ea42..3ecf571c5c 100644 --- a/board/ti/ks2_evm/mux-k2g.h +++ b/board/ti/ks2_evm/mux-k2g.h @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/common/board_f.c b/common/board_f.c index 3c6877da33..3f0132a6e3 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include diff --git a/common/board_r.c b/common/board_r.c index 668496abed..8a0c1114e7 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include diff --git a/common/bootstage.c b/common/bootstage.c index 79972e46f2..d2ed33663b 100644 --- a/common/bootstage.c +++ b/common/bootstage.c @@ -10,6 +10,7 @@ */ #include +#include #include #include #include diff --git a/common/cli.c b/common/cli.c index 67ceb635a6..7ffe902b88 100644 --- a/common/cli.c +++ b/common/cli.c @@ -15,6 +15,7 @@ #include #include #include +#include #include DECLARE_GLOBAL_DATA_PTR; diff --git a/common/spl/spl.c b/common/spl/spl.c index 19085ad270..932e6ab98a 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/common/spl/spl_opensbi.c b/common/spl/spl_opensbi.c index 6404373eca..a136073fdb 100644 --- a/common/spl/spl_opensbi.c +++ b/common/spl/spl_opensbi.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/cache/cache-ncore.c b/drivers/cache/cache-ncore.c index e3aca36071..0aab7ee191 100644 --- a/drivers/cache/cache-ncore.c +++ b/drivers/cache/cache-ncore.c @@ -4,6 +4,7 @@ * */ #include +#include #include #include diff --git a/drivers/cache/cache-v5l2.c b/drivers/cache/cache-v5l2.c index d367171b36..1373e7c387 100644 --- a/drivers/cache/cache-v5l2.c +++ b/drivers/cache/cache-v5l2.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include diff --git a/drivers/ddr/altera/sdram_agilex.c b/drivers/ddr/altera/sdram_agilex.c index 0cbcd14056..626fb724d4 100644 --- a/drivers/ddr/altera/sdram_agilex.c +++ b/drivers/ddr/altera/sdram_agilex.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include "sdram_soc64.h" diff --git a/drivers/ddr/altera/sdram_s10.c b/drivers/ddr/altera/sdram_s10.c index 6beba01128..0b36d6c027 100644 --- a/drivers/ddr/altera/sdram_s10.c +++ b/drivers/ddr/altera/sdram_s10.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/ddr/altera/sdram_soc64.c b/drivers/ddr/altera/sdram_soc64.c index 985a108b1c..e0d04ccca2 100644 --- a/drivers/ddr/altera/sdram_soc64.c +++ b/drivers/ddr/altera/sdram_soc64.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include "sdram_soc64.h" diff --git a/drivers/misc/imx8/scu_api.c b/drivers/misc/imx8/scu_api.c index b2fdeef13a..b34191753b 100644 --- a/drivers/misc/imx8/scu_api.c +++ b/drivers/misc/imx8/scu_api.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/drivers/mmc/fsl_esdhc_spl.c b/drivers/mmc/fsl_esdhc_spl.c index 3021c3d6d4..afe55fad9d 100644 --- a/drivers/mmc/fsl_esdhc_spl.c +++ b/drivers/mmc/fsl_esdhc_spl.c @@ -5,6 +5,7 @@ #include #include +#include #include #include diff --git a/drivers/mtd/nand/raw/mxc_nand_spl.c b/drivers/mtd/nand/raw/mxc_nand_spl.c index 6c03db8428..e1e542519d 100644 --- a/drivers/mtd/nand/raw/mxc_nand_spl.c +++ b/drivers/mtd/nand/raw/mxc_nand_spl.c @@ -11,6 +11,7 @@ */ #include +#include #include #include #include diff --git a/drivers/mtd/spi/fsl_espi_spl.c b/drivers/mtd/spi/fsl_espi_spl.c index 580b1e24b7..5c41d7558c 100644 --- a/drivers/mtd/spi/fsl_espi_spl.c +++ b/drivers/mtd/spi/fsl_espi_spl.c @@ -5,6 +5,7 @@ #include #include +#include #include #include diff --git a/drivers/net/fsl_mcdmafec.c b/drivers/net/fsl_mcdmafec.c index 7838fb5c10..45954cecb6 100644 --- a/drivers/net/fsl_mcdmafec.c +++ b/drivers/net/fsl_mcdmafec.c @@ -12,6 +12,7 @@ #include #include +#include #include #include #include diff --git a/drivers/net/mcffec.c b/drivers/net/mcffec.c index 4ec24362d0..8caf0ba6b1 100644 --- a/drivers/net/mcffec.c +++ b/drivers/net/mcffec.c @@ -12,6 +12,7 @@ #include #include +#include #include #include #include diff --git a/drivers/net/mpc8xx_fec.c b/drivers/net/mpc8xx_fec.c index 0a80985192..69b2174ab3 100644 --- a/drivers/net/mpc8xx_fec.c +++ b/drivers/net/mpc8xx_fec.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/drivers/ram/k3-j721e/k3-j721e-ddrss.c b/drivers/ram/k3-j721e/k3-j721e-ddrss.c index 9feb0aa766..a9b7d40890 100644 --- a/drivers/ram/k3-j721e/k3-j721e-ddrss.c +++ b/drivers/ram/k3-j721e/k3-j721e-ddrss.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/ram/rockchip/dmc-rk3368.c b/drivers/ram/rockchip/dmc-rk3368.c index 9df8f8f4af..8addee8cc3 100644 --- a/drivers/ram/rockchip/dmc-rk3368.c +++ b/drivers/ram/rockchip/dmc-rk3368.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/ram/rockchip/sdram_rk3188.c b/drivers/ram/rockchip/sdram_rk3188.c index d3e4316ef0..9b5eb38ecc 100644 --- a/drivers/ram/rockchip/sdram_rk3188.c +++ b/drivers/ram/rockchip/sdram_rk3188.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/ram/rockchip/sdram_rk3288.c b/drivers/ram/rockchip/sdram_rk3288.c index 690751d074..3eb14cdb32 100644 --- a/drivers/ram/rockchip/sdram_rk3288.c +++ b/drivers/ram/rockchip/sdram_rk3288.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/serial/serial.c b/drivers/serial/serial.c index bf5f39215d..baeaeaac8e 100644 --- a/drivers/serial/serial.c +++ b/drivers/serial/serial.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/drivers/serial/serial_pxa.c b/drivers/serial/serial_pxa.c index cf4d8f6442..6f8f7e1198 100644 --- a/drivers/serial/serial_pxa.c +++ b/drivers/serial/serial_pxa.c @@ -20,6 +20,7 @@ */ #include +#include #include #include #include diff --git a/drivers/sysreset/sysreset-uclass.c b/drivers/sysreset/sysreset-uclass.c index 8eff6036e7..51fdb1055e 100644 --- a/drivers/sysreset/sysreset-uclass.c +++ b/drivers/sysreset/sysreset-uclass.c @@ -8,6 +8,7 @@ #include #include +#include #include #include #include diff --git a/drivers/usb/musb/musb_udc.c b/drivers/usb/musb/musb_udc.c index 584564bac2..4d7723621d 100644 --- a/drivers/usb/musb/musb_udc.c +++ b/drivers/usb/musb/musb_udc.c @@ -38,6 +38,7 @@ */ #include +#include #include #include #include diff --git a/drivers/usb/phy/rockchip_usb2_phy.c b/drivers/usb/phy/rockchip_usb2_phy.c index 69e408b6c1..ec998901ab 100644 --- a/drivers/usb/phy/rockchip_usb2_phy.c +++ b/drivers/usb/phy/rockchip_usb2_phy.c @@ -4,6 +4,7 @@ */ #include +#include #include #include "../gadget/dwc2_udc_otg_priv.h" diff --git a/drivers/watchdog/imx_watchdog.c b/drivers/watchdog/imx_watchdog.c index 62bf25e9cc..01762df019 100644 --- a/drivers/watchdog/imx_watchdog.c +++ b/drivers/watchdog/imx_watchdog.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/watchdog/mtk_wdt.c b/drivers/watchdog/mtk_wdt.c index dafd2b56a8..669a32320d 100644 --- a/drivers/watchdog/mtk_wdt.c +++ b/drivers/watchdog/mtk_wdt.c @@ -8,6 +8,7 @@ #include #include +#include #include #include diff --git a/drivers/watchdog/wdt-uclass.c b/drivers/watchdog/wdt-uclass.c index bbfac4f0f9..cf1c527473 100644 --- a/drivers/watchdog/wdt-uclass.c +++ b/drivers/watchdog/wdt-uclass.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/examples/api/libgenwrap.c b/examples/api/libgenwrap.c index 67b2d641fc..769dcc7038 100644 --- a/examples/api/libgenwrap.c +++ b/examples/api/libgenwrap.c @@ -10,6 +10,7 @@ */ #include +#include #include #include @@ -41,7 +42,7 @@ void *malloc (size_t len) return NULL; } -void hang (void) +void hang(void) { while (1) ; } diff --git a/include/common.h b/include/common.h index b25744854c..ca08db0467 100644 --- a/include/common.h +++ b/include/common.h @@ -52,11 +52,6 @@ */ #include -/* - * Function Prototypes - */ -void hang (void) __attribute__ ((noreturn)); - #include /* lib/uuid.c */ diff --git a/include/hang.h b/include/hang.h new file mode 100644 index 0000000000..27cda49359 --- /dev/null +++ b/include/hang.h @@ -0,0 +1,22 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * (C) Copyright 2000-2009 + * Wolfgang Denk, DENX Software Engineering, wd@denx.de. + */ + +#ifndef __HANG_H +#define __HANG_H + +#ifndef __ASSEMBLY__ +/** + * hang() - Print a message and stop execution + * + * This shows a 'hang' message where possible and then goes into an infinite + * loop. This is called by panic() if CONFIG_PANIC_HANG is enabled. + * + * This function does not return. + */ +void hang(void) __attribute__ ((noreturn)); +#endif + +#endif diff --git a/lib/fdtdec.c b/lib/fdtdec.c index f1bdc9f2e2..17051d409c 100644 --- a/lib/fdtdec.c +++ b/lib/fdtdec.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/lib/hang.c b/lib/hang.c index 4d026a3e64..578ac78d45 100644 --- a/lib/hang.c +++ b/lib/hang.c @@ -9,6 +9,7 @@ #include #include +#include #include /** diff --git a/lib/libavb/avb_sysdeps_posix.c b/lib/libavb/avb_sysdeps_posix.c index 4ccf41e428..0bb0cc1498 100644 --- a/lib/libavb/avb_sysdeps_posix.c +++ b/lib/libavb/avb_sysdeps_posix.c @@ -3,6 +3,7 @@ * Copyright (C) 2016 The Android Open Source Project */ +#include #include #include diff --git a/lib/panic.c b/lib/panic.c index bae8a35935..8e72c265a6 100644 --- a/lib/panic.c +++ b/lib/panic.c @@ -10,6 +10,7 @@ */ #include +#include #if !defined(CONFIG_PANIC_HANG) #include #endif diff --git a/lib/zlib/zutil.c b/lib/zlib/zutil.c index 227343e48d..609aac55ce 100644 --- a/lib/zlib/zutil.c +++ b/lib/zlib/zutil.c @@ -6,6 +6,7 @@ /* @(#) $Id$ */ #include "zutil.h" +#include #ifndef NO_DUMMY_DECL struct internal_state {int dummy;}; /* for buggy compilers */ @@ -34,7 +35,7 @@ void z_error (m) char *m; { fprintf(stderr, "%s\n", m); - hang (); + hang(); } #endif