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 <sjg@chromium.org>
[trini: Migrate a few more files]
Signed-off-by: Tom Rini <trini@konsulko.com>
diff --git a/drivers/cache/cache-ncore.c b/drivers/cache/cache-ncore.c
index e3aca36..0aab7ee 100644
--- a/drivers/cache/cache-ncore.c
+++ b/drivers/cache/cache-ncore.c
@@ -4,6 +4,7 @@
*
*/
#include <dm.h>
+#include <hang.h>
#include <wait_bit.h>
#include <asm/io.h>
diff --git a/drivers/cache/cache-v5l2.c b/drivers/cache/cache-v5l2.c
index d367171..1373e7c 100644
--- a/drivers/cache/cache-v5l2.c
+++ b/drivers/cache/cache-v5l2.c
@@ -8,6 +8,7 @@
#include <command.h>
#include <cache.h>
#include <dm.h>
+#include <hang.h>
#include <asm/io.h>
#include <dm/ofnode.h>
diff --git a/drivers/ddr/altera/sdram_agilex.c b/drivers/ddr/altera/sdram_agilex.c
index 0cbcd14..626fb72 100644
--- a/drivers/ddr/altera/sdram_agilex.c
+++ b/drivers/ddr/altera/sdram_agilex.c
@@ -9,6 +9,7 @@
#include <errno.h>
#include <div64.h>
#include <fdtdec.h>
+#include <hang.h>
#include <ram.h>
#include <reset.h>
#include "sdram_soc64.h"
diff --git a/drivers/ddr/altera/sdram_s10.c b/drivers/ddr/altera/sdram_s10.c
index 6beba01..0b36d6c 100644
--- a/drivers/ddr/altera/sdram_s10.c
+++ b/drivers/ddr/altera/sdram_s10.c
@@ -10,6 +10,7 @@
#include <errno.h>
#include <div64.h>
#include <fdtdec.h>
+#include <hang.h>
#include <init.h>
#include <ram.h>
#include <reset.h>
diff --git a/drivers/ddr/altera/sdram_soc64.c b/drivers/ddr/altera/sdram_soc64.c
index 985a108..e0d04cc 100644
--- a/drivers/ddr/altera/sdram_soc64.c
+++ b/drivers/ddr/altera/sdram_soc64.c
@@ -10,6 +10,7 @@
#include <errno.h>
#include <div64.h>
#include <fdtdec.h>
+#include <hang.h>
#include <ram.h>
#include <reset.h>
#include "sdram_soc64.h"
diff --git a/drivers/misc/imx8/scu_api.c b/drivers/misc/imx8/scu_api.c
index b2fdeef..b341917 100644
--- a/drivers/misc/imx8/scu_api.c
+++ b/drivers/misc/imx8/scu_api.c
@@ -6,6 +6,7 @@
*/
#include <common.h>
+#include <hang.h>
#include <asm/io.h>
#include <dm.h>
#include <asm/arch/sci/sci.h>
diff --git a/drivers/mmc/fsl_esdhc_spl.c b/drivers/mmc/fsl_esdhc_spl.c
index 3021c3d..afe55fa 100644
--- a/drivers/mmc/fsl_esdhc_spl.c
+++ b/drivers/mmc/fsl_esdhc_spl.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <cpu_func.h>
+#include <hang.h>
#include <mmc.h>
#include <malloc.h>
diff --git a/drivers/mtd/nand/raw/mxc_nand_spl.c b/drivers/mtd/nand/raw/mxc_nand_spl.c
index 6c03db8..e1e5425 100644
--- a/drivers/mtd/nand/raw/mxc_nand_spl.c
+++ b/drivers/mtd/nand/raw/mxc_nand_spl.c
@@ -11,6 +11,7 @@
*/
#include <common.h>
+#include <hang.h>
#include <nand.h>
#include <asm/arch/imx-regs.h>
#include <asm/io.h>
diff --git a/drivers/mtd/spi/fsl_espi_spl.c b/drivers/mtd/spi/fsl_espi_spl.c
index 580b1e2..5c41d75 100644
--- a/drivers/mtd/spi/fsl_espi_spl.c
+++ b/drivers/mtd/spi/fsl_espi_spl.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <cpu_func.h>
+#include <hang.h>
#include <spi_flash.h>
#include <malloc.h>
diff --git a/drivers/net/fsl_mcdmafec.c b/drivers/net/fsl_mcdmafec.c
index 7838fb5..45954ce 100644
--- a/drivers/net/fsl_mcdmafec.c
+++ b/drivers/net/fsl_mcdmafec.c
@@ -12,6 +12,7 @@
#include <common.h>
#include <env.h>
+#include <hang.h>
#include <malloc.h>
#include <command.h>
#include <config.h>
diff --git a/drivers/net/mcffec.c b/drivers/net/mcffec.c
index 4ec2436..8caf0ba 100644
--- a/drivers/net/mcffec.c
+++ b/drivers/net/mcffec.c
@@ -12,6 +12,7 @@
#include <common.h>
#include <env.h>
+#include <hang.h>
#include <malloc.h>
#include <command.h>
#include <net.h>
diff --git a/drivers/net/mpc8xx_fec.c b/drivers/net/mpc8xx_fec.c
index 0a80985..69b2174 100644
--- a/drivers/net/mpc8xx_fec.c
+++ b/drivers/net/mpc8xx_fec.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <command.h>
+#include <hang.h>
#include <malloc.h>
#include <net.h>
#include <netdev.h>
diff --git a/drivers/ram/k3-j721e/k3-j721e-ddrss.c b/drivers/ram/k3-j721e/k3-j721e-ddrss.c
index 9feb0aa..a9b7d40 100644
--- a/drivers/ram/k3-j721e/k3-j721e-ddrss.c
+++ b/drivers/ram/k3-j721e/k3-j721e-ddrss.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <clk.h>
#include <dm.h>
+#include <hang.h>
#include <ram.h>
#include <asm/io.h>
#include <power-domain.h>
diff --git a/drivers/ram/rockchip/dmc-rk3368.c b/drivers/ram/rockchip/dmc-rk3368.c
index 9df8f8f..8addee8 100644
--- a/drivers/ram/rockchip/dmc-rk3368.c
+++ b/drivers/ram/rockchip/dmc-rk3368.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <clk.h>
#include <dm.h>
+#include <hang.h>
#include <dt-bindings/memory/rk3368-dmc.h>
#include <dt-structs.h>
#include <ram.h>
diff --git a/drivers/ram/rockchip/sdram_rk3188.c b/drivers/ram/rockchip/sdram_rk3188.c
index d3e4316..9b5eb38 100644
--- a/drivers/ram/rockchip/sdram_rk3188.c
+++ b/drivers/ram/rockchip/sdram_rk3188.c
@@ -11,6 +11,7 @@
#include <dm.h>
#include <dt-structs.h>
#include <errno.h>
+#include <hang.h>
#include <ram.h>
#include <regmap.h>
#include <syscon.h>
diff --git a/drivers/ram/rockchip/sdram_rk3288.c b/drivers/ram/rockchip/sdram_rk3288.c
index 690751d..3eb14cd 100644
--- a/drivers/ram/rockchip/sdram_rk3288.c
+++ b/drivers/ram/rockchip/sdram_rk3288.c
@@ -11,6 +11,7 @@
#include <dm.h>
#include <dt-structs.h>
#include <errno.h>
+#include <hang.h>
#include <ram.h>
#include <regmap.h>
#include <syscon.h>
diff --git a/drivers/serial/serial.c b/drivers/serial/serial.c
index bf5f392..baeaeaa 100644
--- a/drivers/serial/serial.c
+++ b/drivers/serial/serial.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <env_internal.h>
+#include <hang.h>
#include <serial.h>
#include <stdio_dev.h>
#include <post.h>
diff --git a/drivers/serial/serial_pxa.c b/drivers/serial/serial_pxa.c
index cf4d8f6..6f8f7e1 100644
--- a/drivers/serial/serial_pxa.c
+++ b/drivers/serial/serial_pxa.c
@@ -20,6 +20,7 @@
*/
#include <common.h>
+#include <hang.h>
#include <asm/arch/pxa-regs.h>
#include <asm/arch/regs-uart.h>
#include <asm/io.h>
diff --git a/drivers/sysreset/sysreset-uclass.c b/drivers/sysreset/sysreset-uclass.c
index 8eff603..51fdb10 100644
--- a/drivers/sysreset/sysreset-uclass.c
+++ b/drivers/sysreset/sysreset-uclass.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <cpu_func.h>
+#include <hang.h>
#include <sysreset.h>
#include <dm.h>
#include <errno.h>
diff --git a/drivers/usb/musb/musb_udc.c b/drivers/usb/musb/musb_udc.c
index 584564b..4d77236 100644
--- a/drivers/usb/musb/musb_udc.c
+++ b/drivers/usb/musb/musb_udc.c
@@ -38,6 +38,7 @@
*/
#include <common.h>
+#include <hang.h>
#include <serial.h>
#include <usbdevice.h>
#include <usb/udc.h>
diff --git a/drivers/usb/phy/rockchip_usb2_phy.c b/drivers/usb/phy/rockchip_usb2_phy.c
index 69e408b..ec99890 100644
--- a/drivers/usb/phy/rockchip_usb2_phy.c
+++ b/drivers/usb/phy/rockchip_usb2_phy.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <hang.h>
#include <asm/io.h>
#include "../gadget/dwc2_udc_otg_priv.h"
diff --git a/drivers/watchdog/imx_watchdog.c b/drivers/watchdog/imx_watchdog.c
index 62bf25e..01762df 100644
--- a/drivers/watchdog/imx_watchdog.c
+++ b/drivers/watchdog/imx_watchdog.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <cpu_func.h>
#include <dm.h>
+#include <hang.h>
#include <asm/io.h>
#include <wdt.h>
#include <watchdog.h>
diff --git a/drivers/watchdog/mtk_wdt.c b/drivers/watchdog/mtk_wdt.c
index dafd2b5..669a323 100644
--- a/drivers/watchdog/mtk_wdt.c
+++ b/drivers/watchdog/mtk_wdt.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <dm.h>
+#include <hang.h>
#include <wdt.h>
#include <asm/io.h>
diff --git a/drivers/watchdog/wdt-uclass.c b/drivers/watchdog/wdt-uclass.c
index bbfac4f..cf1c527 100644
--- a/drivers/watchdog/wdt-uclass.c
+++ b/drivers/watchdog/wdt-uclass.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
#include <errno.h>
+#include <hang.h>
#include <wdt.h>
#include <dm/device-internal.h>
#include <dm/lists.h>