common: Drop linux/printk.h from common header
This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h
Move this out of the common header and include it only where needed.
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/board/dhelectronics/dh_stm32mp1/board.c b/board/dhelectronics/dh_stm32mp1/board.c
index f9cfabe..341d095 100644
--- a/board/dhelectronics/dh_stm32mp1/board.c
+++ b/board/dhelectronics/dh_stm32mp1/board.c
@@ -34,6 +34,7 @@
#include <phy.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/printk.h>
#include <power/regulator.h>
#include <remoteproc.h>
#include <reset.h>
diff --git a/board/mediatek/mt8518/mt8518_ap1.c b/board/mediatek/mt8518/mt8518_ap1.c
index 2490b15..e03da63 100644
--- a/board/mediatek/mt8518/mt8518_ap1.c
+++ b/board/mediatek/mt8518/mt8518_ap1.c
@@ -8,6 +8,7 @@
#include <init.h>
#include <log.h>
#include <asm/global_data.h>
+#include <linux/printk.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/mscc/ocelot/ocelot.c b/board/mscc/ocelot/ocelot.c
index f261346..d69db04 100644
--- a/board/mscc/ocelot/ocelot.c
+++ b/board/mscc/ocelot/ocelot.c
@@ -16,6 +16,7 @@
#include <wait_bit.h>
#include <miiphy.h>
#include <linux/bitops.h>
+#include <linux/printk.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/nvidia/jetson-tk1/jetson-tk1.c b/board/nvidia/jetson-tk1/jetson-tk1.c
index d349531..7f3cdd7 100644
--- a/board/nvidia/jetson-tk1/jetson-tk1.c
+++ b/board/nvidia/jetson-tk1/jetson-tk1.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <dm.h>
#include <log.h>
+#include <linux/printk.h>
#include <power/as3722.h>
#include <power/pmic.h>
diff --git a/board/pine64/pinebook-pro-rk3399/pinebook-pro-rk3399.c b/board/pine64/pinebook-pro-rk3399/pinebook-pro-rk3399.c
index 516292a..4ad7807 100644
--- a/board/pine64/pinebook-pro-rk3399/pinebook-pro-rk3399.c
+++ b/board/pine64/pinebook-pro-rk3399/pinebook-pro-rk3399.c
@@ -12,6 +12,7 @@
#include <asm/arch-rockchip/grf_rk3399.h>
#include <asm/arch-rockchip/hardware.h>
#include <asm/arch-rockchip/misc.h>
+#include <linux/printk.h>
#include <power/regulator.h>
#define GRF_IO_VSEL_BT565_SHIFT 0
diff --git a/board/samsung/common/exynos5-dt.c b/board/samsung/common/exynos5-dt.c
index 726b7f0..1e88a82 100644
--- a/board/samsung/common/exynos5-dt.c
+++ b/board/samsung/common/exynos5-dt.c
@@ -26,6 +26,7 @@
#include <asm/arch/pinmux.h>
#include <asm/arch/power.h>
#include <asm/arch/sromc.h>
+#include <linux/printk.h>
#include <power/pmic.h>
#include <power/max77686_pmic.h>
#include <power/regulator.h>
diff --git a/board/samsung/common/misc.c b/board/samsung/common/misc.c
index 5ffa216..cc114aa 100644
--- a/board/samsung/common/misc.c
+++ b/board/samsung/common/misc.c
@@ -10,6 +10,7 @@
#include <libtizen.h>
#include <asm/global_data.h>
#include <linux/delay.h>
+#include <linux/printk.h>
#include <samsung/misc.h>
#include <errno.h>
#include <version.h>
diff --git a/board/samsung/goni/goni.c b/board/samsung/goni/goni.c
index 535f8e1..c8f5a15 100644
--- a/board/samsung/goni/goni.c
+++ b/board/samsung/goni/goni.c
@@ -13,6 +13,7 @@
#include <asm/arch/mmc.h>
#include <dm.h>
#include <linux/delay.h>
+#include <linux/printk.h>
#include <power/pmic.h>
#include <usb/dwc2_udc.h>
#include <asm/arch/cpu.h>
diff --git a/board/samsung/odroid/odroid.c b/board/samsung/odroid/odroid.c
index 39a60e4..d237828 100644
--- a/board/samsung/odroid/odroid.c
+++ b/board/samsung/odroid/odroid.c
@@ -15,6 +15,7 @@
#include <asm/arch/cpu.h>
#include <dm.h>
#include <env.h>
+#include <linux/printk.h>
#include <power/pmic.h>
#include <power/regulator.h>
#include <power/max77686_pmic.h>
diff --git a/board/st/common/stm32mp_dfu.c b/board/st/common/stm32mp_dfu.c
index 1cf4a3d..faee953 100644
--- a/board/st/common/stm32mp_dfu.c
+++ b/board/st/common/stm32mp_dfu.c
@@ -14,6 +14,7 @@
#include <mtd.h>
#include <mtd_node.h>
#include <asm/arch/stm32prog.h>
+#include <linux/printk.h>
#define DFU_ALT_BUF_LEN SZ_1K
diff --git a/board/st/stm32mp1/stm32mp1.c b/board/st/stm32mp1/stm32mp1.c
index 3205a31..8f5719c 100644
--- a/board/st/stm32mp1/stm32mp1.c
+++ b/board/st/stm32mp1/stm32mp1.c
@@ -44,6 +44,7 @@
#include <linux/delay.h>
#include <linux/err.h>
#include <linux/iopoll.h>
+#include <linux/printk.h>
#include <power/regulator.h>
#include <usb/dwc2_udc.h>
diff --git a/board/sunxi/board.c b/board/sunxi/board.c
index de0f350..ebaa943 100644
--- a/board/sunxi/board.c
+++ b/board/sunxi/board.c
@@ -33,6 +33,7 @@
#include <asm/arch/sys_proto.h>
#include <asm/global_data.h>
#include <linux/delay.h>
+#include <linux/printk.h>
#ifndef CONFIG_ARM64
#include <asm/armv7.h>
#endif
diff --git a/board/synopsys/hsdk/clk-lib.c b/board/synopsys/hsdk/clk-lib.c
index bd43179..be76d6c 100644
--- a/board/synopsys/hsdk/clk-lib.c
+++ b/board/synopsys/hsdk/clk-lib.c
@@ -8,6 +8,7 @@
#include <log.h>
#include <malloc.h>
#include <dm/device.h>
+#include <linux/printk.h>
#include "clk-lib.h"
diff --git a/board/synopsys/hsdk/env-lib.c b/board/synopsys/hsdk/env-lib.c
index fd54ac7..d85e816 100644
--- a/board/synopsys/hsdk/env-lib.c
+++ b/board/synopsys/hsdk/env-lib.c
@@ -7,6 +7,7 @@
#include "env-lib.h"
#include <env.h>
#include <log.h>
+#include <linux/printk.h>
#define MAX_CMD_LEN 25
diff --git a/board/ti/am65x/evm.c b/board/ti/am65x/evm.c
index d52ac33..8bb13ef 100644
--- a/board/ti/am65x/evm.c
+++ b/board/ti/am65x/evm.c
@@ -20,6 +20,7 @@
#include <asm/omap_common.h>
#include <env.h>
#include <spl.h>
+#include <linux/printk.h>
#include "../common/board_detect.h"
diff --git a/board/ti/common/board_detect.c b/board/ti/common/board_detect.c
index 9a53884..ac39b25 100644
--- a/board/ti/common/board_detect.c
+++ b/board/ti/common/board_detect.c
@@ -19,6 +19,7 @@
#include <mmc.h>
#include <errno.h>
#include <malloc.h>
+#include <linux/printk.h>
#include "board_detect.h"
diff --git a/board/ti/j721e/evm.c b/board/ti/j721e/evm.c
index 38fe447..d4f7c1d 100644
--- a/board/ti/j721e/evm.c
+++ b/board/ti/j721e/evm.c
@@ -22,6 +22,7 @@
#include <spl.h>
#include <dm.h>
#include <dm/uclass-internal.h>
+#include <linux/printk.h>
#include "../common/board_detect.h"
diff --git a/board/toradex/apalis-tk1/apalis-tk1.c b/board/toradex/apalis-tk1/apalis-tk1.c
index 86b1040..8513431 100644
--- a/board/toradex/apalis-tk1/apalis-tk1.c
+++ b/board/toradex/apalis-tk1/apalis-tk1.c
@@ -17,6 +17,7 @@
#include <fdt_support.h>
#include <pci_tegra.h>
#include <linux/delay.h>
+#include <linux/printk.h>
#include <power/as3722.h>
#include <power/pmic.h>