summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElyes HAOUAS <ehaouas@noos.fr>2019-03-21 11:10:03 +0100
committerNico Huber <nico.h@gmx.de>2019-04-06 16:09:12 +0000
commitbf0970e762a6611cef06af761bc2dec068d439bb (patch)
tree44d4854b7027794bc5a76b44a4e8fd07935cd60c
parent161eafb0fb9563decbb953d5dccac4762b770e0c (diff)
downloadcoreboot-bf0970e762a6611cef06af761bc2dec068d439bb.tar.xz
src: Use include <delay.h> when appropriate
Change-Id: I23bc0191ca8fcd88364e5c08be7c90195019e399 Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/32012 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Werner Zeh <werner.zeh@siemens.com> Reviewed-by: David Guckian
-rw-r--r--src/drivers/aspeed/ast2050/ast2050.c4
-rw-r--r--src/drivers/aspeed/common/ast_dp501.c2
-rw-r--r--src/drivers/aspeed/common/ast_main.c4
-rw-r--r--src/drivers/aspeed/common/ast_post.c3
-rw-r--r--src/drivers/emulation/qemu/bochs.c2
-rw-r--r--src/drivers/emulation/qemu/cirrus.c3
-rw-r--r--src/drivers/intel/gma/intel_ddi.c3
-rw-r--r--src/drivers/intel/gma/vbt.c1
-rw-r--r--src/drivers/net/ne2k.c1
-rw-r--r--src/drivers/siemens/nc_fpga/nc_fpga.c2
-rw-r--r--src/drivers/sil/3114/sil_sata.c1
-rw-r--r--src/drivers/spi/spi_flash.c3
-rw-r--r--src/drivers/xgi/common/vb_init.c4
-rw-r--r--src/drivers/xgi/common/vb_setmode.c4
-rw-r--r--src/drivers/xgi/common/xgi_coreboot.c6
-rw-r--r--src/drivers/xgi/common/xgi_coreboot.h2
-rw-r--r--src/drivers/xgi/z9s/z9s.c3
-rw-r--r--src/ec/google/chromeec/crosec_proto.c2
-rw-r--r--src/ec/google/chromeec/ec_i2c.c1
-rw-r--r--src/mainboard/apple/macbook21/mainboard.c2
-rw-r--r--src/mainboard/apple/macbook21/smihandler.c1
-rw-r--r--src/mainboard/google/foster/mainboard.c1
-rw-r--r--src/mainboard/google/gale/mainboard.c1
-rw-r--r--src/mainboard/google/oak/bootblock.c1
-rw-r--r--src/mainboard/google/slippy/variants/peppy/romstage.c1
-rw-r--r--src/mainboard/google/slippy/variants/wolf/romstage.c1
-rw-r--r--src/mainboard/google/smaug/romstage.c1
-rw-r--r--src/mainboard/google/veyron/romstage.c1
-rw-r--r--src/mainboard/google/veyron_mickey/mainboard.c1
-rw-r--r--src/mainboard/google/veyron_mickey/romstage.c1
-rw-r--r--src/mainboard/google/veyron_rialto/mainboard.c1
-rw-r--r--src/mainboard/google/veyron_rialto/romstage.c1
-rw-r--r--src/mainboard/hp/pavilion_m6_1035dx/mainboard_smi.c5
-rw-r--r--src/mainboard/intel/galileo/vboot.c8
-rw-r--r--src/mainboard/lenovo/g505s/mainboard_smi.c4
-rw-r--r--src/mainboard/lenovo/s230u/smihandler.c5
-rw-r--r--src/mainboard/lenovo/x200/dock.c5
-rw-r--r--src/mainboard/opencellular/elgon/mainboard.c1
-rw-r--r--src/mainboard/packardbell/ms2290/mainboard.c1
-rw-r--r--src/mainboard/packardbell/ms2290/romstage.c1
-rw-r--r--src/mainboard/packardbell/ms2290/smihandler.c1
-rw-r--r--src/mainboard/roda/rk886ex/mainboard.c3
-rw-r--r--src/mainboard/siemens/mc_tcu3/ptn3460.c2
-rw-r--r--src/mainboard/siemens/mc_tcu3/ptn3460.h1
-rw-r--r--src/northbridge/amd/amdmct/wrappers/mcti_d.c2
-rw-r--r--src/northbridge/intel/fsp_rangeley/northbridge.c1
-rw-r--r--src/northbridge/intel/gm45/gma.c7
-rw-r--r--src/northbridge/intel/haswell/minihd.c1
-rw-r--r--src/northbridge/intel/sandybridge/raminit.c2
-rw-r--r--src/northbridge/intel/x4x/gma.c9
-rw-r--r--src/northbridge/intel/x4x/raminit.c6
-rw-r--r--src/security/vboot/vboot_logic.c1
-rw-r--r--src/soc/amd/common/block/pi/agesawrapper.c1
-rw-r--r--src/soc/amd/stoneyridge/hda.c1
-rw-r--r--src/soc/amd/stoneyridge/sata.c1
-rw-r--r--src/soc/amd/stoneyridge/smihandler.c1
-rw-r--r--src/soc/cavium/cn81xx/include/soc/timer.h1
-rw-r--r--src/soc/cavium/cn81xx/spi.c1
-rw-r--r--src/soc/cavium/cn81xx/timer.c1
-rw-r--r--src/soc/cavium/common/bdk-coreboot.c2
-rw-r--r--src/soc/intel/baytrail/gfx.c2
-rw-r--r--src/soc/intel/braswell/sata.c1
-rw-r--r--src/soc/intel/broadwell/adsp.c1
-rw-r--r--src/soc/intel/broadwell/ehci.c1
-rw-r--r--src/soc/intel/broadwell/hda.c1
-rw-r--r--src/soc/intel/broadwell/lpc.c1
-rw-r--r--src/soc/intel/broadwell/minihd.c1
-rw-r--r--src/soc/intel/broadwell/pch.c1
-rw-r--r--src/soc/intel/broadwell/romstage/uart.c1
-rw-r--r--src/soc/intel/cannonlake/lpc.c4
-rw-r--r--src/soc/intel/common/block/cpu/cpulib.c1
-rw-r--r--src/soc/intel/common/block/systemagent/systemagent_early.c1
-rw-r--r--src/soc/intel/fsp_baytrail/gfx.c2
-rw-r--r--src/soc/intel/fsp_broadwell_de/smihandler.c1
-rw-r--r--src/soc/intel/icelake/lpc.c4
-rw-r--r--src/soc/intel/quark/gpio_i2c.c1
-rw-r--r--src/soc/intel/quark/include/soc/reg_access.h1
-rw-r--r--src/soc/intel/quark/reg_access.c1
-rw-r--r--src/soc/intel/quark/romstage/pcie.c1
-rw-r--r--src/soc/intel/skylake/cpu.c1
-rw-r--r--src/soc/intel/skylake/lpc.c4
-rw-r--r--src/soc/mediatek/common/include/soc/rtc_common.h1
-rw-r--r--src/soc/mediatek/common/rtc.c1
-rw-r--r--src/soc/mediatek/common/usb.c1
-rw-r--r--src/soc/mediatek/mt8173/ddp.c1
-rw-r--r--src/soc/mediatek/mt8173/dramc_pi_calibration_api.c1
-rw-r--r--src/soc/mediatek/mt8173/emi.c1
-rw-r--r--src/soc/mediatek/mt8173/rtc.c1
-rw-r--r--src/soc/mediatek/mt8183/rtc.c1
-rw-r--r--src/soc/nvidia/tegra/gpio.c1
-rw-r--r--src/soc/nvidia/tegra210/mipi_dsi.c2
-rw-r--r--src/soc/qualcomm/ipq40xx/i2c.c1
-rw-r--r--src/soc/qualcomm/ipq806x/i2c.c1
-rw-r--r--src/soc/qualcomm/sdm845/clock.c1
-rw-r--r--src/soc/qualcomm/sdm845/gpio.c1
-rw-r--r--src/soc/rockchip/common/pwm.c1
-rw-r--r--src/soc/rockchip/common/vop.c1
-rw-r--r--src/soc/rockchip/rk3288/soc.c1
-rw-r--r--src/soc/rockchip/rk3288/tsadc.c1
-rw-r--r--src/soc/rockchip/rk3399/usb.c1
-rw-r--r--src/soc/samsung/exynos5250/clock_init.c1
-rw-r--r--src/soc/samsung/exynos5250/cpu.c1
-rw-r--r--src/soc/samsung/exynos5420/clock_init.c1
-rw-r--r--src/soc/samsung/exynos5420/cpu.c1
-rw-r--r--src/soc/samsung/exynos5420/fimd.c1
-rw-r--r--src/southbridge/amd/agesa/hudson/hda.c3
-rw-r--r--src/southbridge/amd/agesa/hudson/imc.c1
-rw-r--r--src/southbridge/amd/agesa/hudson/sata.c3
-rw-r--r--src/southbridge/amd/agesa/hudson/sd.c2
-rw-r--r--src/southbridge/amd/agesa/hudson/smihandler.c5
-rw-r--r--src/southbridge/amd/pi/hudson/hda.c2
-rw-r--r--src/southbridge/amd/pi/hudson/imc.c1
-rw-r--r--src/southbridge/amd/pi/hudson/sata.c3
-rw-r--r--src/southbridge/amd/pi/hudson/sd.c2
-rw-r--r--src/southbridge/amd/pi/hudson/smihandler.c5
-rw-r--r--src/southbridge/intel/bd82x6x/early_pch.c5
-rw-r--r--src/southbridge/intel/fsp_rangeley/soc.c2
-rw-r--r--src/southbridge/intel/lynxpoint/azalia.c2
-rw-r--r--src/southbridge/intel/lynxpoint/smihandler.c4
-rw-r--r--src/southbridge/nvidia/mcp55/early_setup_car.c1
-rw-r--r--src/southbridge/nvidia/mcp55/sata.c2
121 files changed, 78 insertions, 162 deletions
diff --git a/src/drivers/aspeed/ast2050/ast2050.c b/src/drivers/aspeed/ast2050/ast2050.c
index 035d5c6ef9..631372d428 100644
--- a/src/drivers/aspeed/ast2050/ast2050.c
+++ b/src/drivers/aspeed/ast2050/ast2050.c
@@ -12,17 +12,15 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
-#include <delay.h>
+
#include <stdlib.h>
#include <arch/io.h>
#include <edid.h>
-
#include <console/console.h>
#include <device/device.h>
#include <device/pci.h>
#include <device/pci_ids.h>
#include <device/pci_ops.h>
-
#include <pc80/vga.h>
#include "../common/aspeed_coreboot.h"
diff --git a/src/drivers/aspeed/common/ast_dp501.c b/src/drivers/aspeed/common/ast_dp501.c
index 46b76f51bf..2e8b897464 100644
--- a/src/drivers/aspeed/common/ast_dp501.c
+++ b/src/drivers/aspeed/common/ast_dp501.c
@@ -15,6 +15,8 @@
* GNU General Public License for more details.
*/
+#include <delay.h>
+
#include "ast_drv.h"
static void send_ack(struct ast_private *ast)
diff --git a/src/drivers/aspeed/common/ast_main.c b/src/drivers/aspeed/common/ast_main.c
index 3a0cf209f2..086b0a4f10 100644
--- a/src/drivers/aspeed/common/ast_main.c
+++ b/src/drivers/aspeed/common/ast_main.c
@@ -26,8 +26,10 @@
/*
* Authors: Dave Airlie <airlied@redhat.com>
*/
-#include "ast_drv.h"
+#include <delay.h>
+
+#include "ast_drv.h"
#include "ast_dram_tables.h"
void ast_set_index_reg_mask(struct ast_private *ast,
diff --git a/src/drivers/aspeed/common/ast_post.c b/src/drivers/aspeed/common/ast_post.c
index 0727443732..5f935b9976 100644
--- a/src/drivers/aspeed/common/ast_post.c
+++ b/src/drivers/aspeed/common/ast_post.c
@@ -29,8 +29,9 @@
#define COREBOOT_AST_FAILOVER_TIMEOUT 10000000
-#include "ast_drv.h"
+#include <delay.h>
+#include "ast_drv.h"
#include "ast_dram_tables.h"
static void ast_init_dram_2300(struct drm_device *dev);
diff --git a/src/drivers/emulation/qemu/bochs.c b/src/drivers/emulation/qemu/bochs.c
index 2310c9e463..22095efb02 100644
--- a/src/drivers/emulation/qemu/bochs.c
+++ b/src/drivers/emulation/qemu/bochs.c
@@ -12,11 +12,9 @@
*/
#include <stdint.h>
-#include <delay.h>
#include <edid.h>
#include <stdlib.h>
#include <arch/io.h>
-
#include <boot/coreboot_tables.h>
#include <console/console.h>
#include <device/device.h>
diff --git a/src/drivers/emulation/qemu/cirrus.c b/src/drivers/emulation/qemu/cirrus.c
index 04edef44aa..ed5a4f4767 100644
--- a/src/drivers/emulation/qemu/cirrus.c
+++ b/src/drivers/emulation/qemu/cirrus.c
@@ -15,17 +15,14 @@
*/
#include <stdint.h>
-#include <delay.h>
#include <edid.h>
#include <stdlib.h>
-
#include <boot/coreboot_tables.h>
#include <console/console.h>
#include <device/device.h>
#include <device/pci.h>
#include <device/pci_ids.h>
#include <device/pci_ops.h>
-
#include <pc80/vga.h>
#include <pc80/vga_io.h>
diff --git a/src/drivers/intel/gma/intel_ddi.c b/src/drivers/intel/gma/intel_ddi.c
index 58134db2d3..471a5d2331 100644
--- a/src/drivers/intel/gma/intel_ddi.c
+++ b/src/drivers/intel/gma/intel_ddi.c
@@ -25,20 +25,19 @@
* Eugeni Dodonov <eugeni.dodonov@intel.com>
*
*/
+
#include <types.h>
#include <stdlib.h>
#include <device/device.h>
#include <device/pci_def.h>
#include <device/pci_ops.h>
#include <console/console.h>
-#include <delay.h>
#include <arch/acpi.h>
#include <arch/interrupt.h>
#include <boot/coreboot_tables.h>
#include <smbios.h>
#include <device/pci.h>
#include <ec/google/chromeec/ec.h>
-
#include <cpu/x86/tsc.h>
#include <cpu/x86/cache.h>
#include <cpu/x86/mtrr.h>
diff --git a/src/drivers/intel/gma/vbt.c b/src/drivers/intel/gma/vbt.c
index 7455704530..fa50ae9921 100644
--- a/src/drivers/intel/gma/vbt.c
+++ b/src/drivers/intel/gma/vbt.c
@@ -16,7 +16,6 @@
*/
#include <device/pci_ops.h>
-#include <delay.h>
#include <device/device.h>
#include <string.h>
#include <device/pci.h>
diff --git a/src/drivers/net/ne2k.c b/src/drivers/net/ne2k.c
index 6f8aca2446..e3dd948a83 100644
--- a/src/drivers/net/ne2k.c
+++ b/src/drivers/net/ne2k.c
@@ -29,7 +29,6 @@ SMC8416 PIO support added by Andrew Bettison (andrewb@zip.com.au) on 4/3/02
#include <arch/io.h>
#include <console/ne2k.h>
-#include <delay.h>
#include <device/device.h>
#include <device/pci.h>
#include <device/pci_ids.h>
diff --git a/src/drivers/siemens/nc_fpga/nc_fpga.c b/src/drivers/siemens/nc_fpga/nc_fpga.c
index ef1f2f2136..fb681adb2d 100644
--- a/src/drivers/siemens/nc_fpga/nc_fpga.c
+++ b/src/drivers/siemens/nc_fpga/nc_fpga.c
@@ -19,9 +19,9 @@
#include <device/pci_ops.h>
#include <device/pci_def.h>
#include <device/mmio.h>
-#include <delay.h>
#include <hwilib.h>
#include <bootstate.h>
+
#include "nc_fpga.h"
static void *nc_fpga_bar0;
diff --git a/src/drivers/sil/3114/sil_sata.c b/src/drivers/sil/3114/sil_sata.c
index 4908413fb8..dd6481a204 100644
--- a/src/drivers/sil/3114/sil_sata.c
+++ b/src/drivers/sil/3114/sil_sata.c
@@ -14,7 +14,6 @@
* GNU General Public License for more details.
*/
-#include <delay.h>
#include <stdlib.h>
#include <console/console.h>
#include <device/device.h>
diff --git a/src/drivers/spi/spi_flash.c b/src/drivers/spi/spi_flash.c
index 71dc660d2b..82398ddf06 100644
--- a/src/drivers/spi/spi_flash.c
+++ b/src/drivers/spi/spi_flash.c
@@ -11,14 +11,13 @@
#include <assert.h>
#include <boot_device.h>
#include <cpu/x86/smm.h>
-#include <delay.h>
#include <stdlib.h>
#include <string.h>
#include <spi-generic.h>
#include <spi_flash.h>
+#include <timer.h>
#include "spi_flash_internal.h"
-#include <timer.h>
static void spi_flash_addr(u32 addr, u8 *cmd)
{
diff --git a/src/drivers/xgi/common/vb_init.c b/src/drivers/xgi/common/vb_init.c
index 0d25e254e2..a20c0683d4 100644
--- a/src/drivers/xgi/common/vb_init.c
+++ b/src/drivers/xgi/common/vb_init.c
@@ -17,14 +17,16 @@
* GNU General Public License for more details.
*/
+#include <delay.h>
+
#include "xgi_coreboot.h"
#include "vstruct.h"
-
#include "XGIfb.h"
#include "vb_def.h"
#include "vb_util.h"
#include "vb_setmode.h"
#include "vb_init.h"
+
static const unsigned short XGINew_DDRDRAM_TYPE340[4][2] = {
{ 16, 0x45},
{ 8, 0x35},
diff --git a/src/drivers/xgi/common/vb_setmode.c b/src/drivers/xgi/common/vb_setmode.c
index e80bc35cc4..162d00cfcf 100644
--- a/src/drivers/xgi/common/vb_setmode.c
+++ b/src/drivers/xgi/common/vb_setmode.c
@@ -14,11 +14,11 @@
* GNU General Public License for more details.
*/
+#include <delay.h>
+
#include "xgi_coreboot.h"
#include "vstruct.h"
-
#include "XGIfb.h"
-
#include "vb_def.h"
#include "vb_init.h"
#include "vb_util.h"
diff --git a/src/drivers/xgi/common/xgi_coreboot.c b/src/drivers/xgi/common/xgi_coreboot.c
index 745baa2d88..5aba472eb7 100644
--- a/src/drivers/xgi/common/xgi_coreboot.c
+++ b/src/drivers/xgi/common/xgi_coreboot.c
@@ -15,27 +15,23 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
-#include <delay.h>
+
#include <stdlib.h>
#include <vbe.h>
-
#include <console/console.h>
#include <device/device.h>
#include <device/pci.h>
#include <device/pci_ids.h>
#include <device/pci_ops.h>
-
#include <pc80/vga.h>
#include "xgi_coreboot.h"
#include "vstruct.h"
-
#include "XGIfb.h"
#include "XGI_main.h"
#include "vb_init.h"
#include "vb_util.h"
#include "vb_setmode.h"
-
#include "XGI_main.c"
static int xgi_vbe_valid;
diff --git a/src/drivers/xgi/common/xgi_coreboot.h b/src/drivers/xgi/common/xgi_coreboot.h
index dc8f49eb54..41952d6925 100644
--- a/src/drivers/xgi/common/xgi_coreboot.h
+++ b/src/drivers/xgi/common/xgi_coreboot.h
@@ -19,12 +19,10 @@
#ifndef _XGI_COREBOOT_
#define _XGI_COREBOOT_
-#include <delay.h>
#include <stdlib.h>
#include <stdint.h>
#include <arch/io.h>
#include <device/mmio.h>
-
#include <console/console.h>
#include <device/device.h>
#include <device/pci.h>
diff --git a/src/drivers/xgi/z9s/z9s.c b/src/drivers/xgi/z9s/z9s.c
index 3b468114c9..1925514043 100644
--- a/src/drivers/xgi/z9s/z9s.c
+++ b/src/drivers/xgi/z9s/z9s.c
@@ -12,9 +12,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
-#include <delay.h>
-#include <stdlib.h>
+#include <stdlib.h>
#include <console/console.h>
#include <device/device.h>
#include <device/pci.h>
diff --git a/src/ec/google/chromeec/crosec_proto.c b/src/ec/google/chromeec/crosec_proto.c
index 928cc6cc34..e2fa3ddd97 100644
--- a/src/ec/google/chromeec/crosec_proto.c
+++ b/src/ec/google/chromeec/crosec_proto.c
@@ -14,9 +14,9 @@
*/
#include <console/console.h>
-#include <delay.h>
#include <stdint.h>
#include <string.h>
+
#include "ec.h"
#include "ec_commands.h"
#include "ec_message.h"
diff --git a/src/ec/google/chromeec/ec_i2c.c b/src/ec/google/chromeec/ec_i2c.c
index 2eecced721..c3e1968c95 100644
--- a/src/ec/google/chromeec/ec_i2c.c
+++ b/src/ec/google/chromeec/ec_i2c.c
@@ -14,7 +14,6 @@
*/
#include <console/console.h>
-#include <delay.h>
#include <device/i2c_simple.h>
#include <stdint.h>
#include <string.h>
diff --git a/src/mainboard/apple/macbook21/mainboard.c b/src/mainboard/apple/macbook21/mainboard.c
index 25c466008a..798fc12caf 100644
--- a/src/mainboard/apple/macbook21/mainboard.c
+++ b/src/mainboard/apple/macbook21/mainboard.c
@@ -16,7 +16,6 @@
*/
#include <device/device.h>
-#include <delay.h>
#include <device/pci_def.h>
#include <device/pci_ops.h>
#include <arch/interrupt.h>
@@ -24,6 +23,7 @@
#include <arch/acpigen.h>
#include <drivers/intel/gma/int15.h>
#include <ec/acpi/ec.h>
+
#define PANEL INT15_5F35_CL_DISPLAY_DEFAULT
static acpi_cstate_t cst_entries[] = {
diff --git a/src/mainboard/apple/macbook21/smihandler.c b/src/mainboard/apple/macbook21/smihandler.c
index baff7c1905..88cc4c0eb6 100644
--- a/src/mainboard/apple/macbook21/smihandler.c
+++ b/src/mainboard/apple/macbook21/smihandler.c
@@ -18,7 +18,6 @@
#include <cpu/x86/smm.h>
#include <southbridge/intel/i82801gx/nvs.h>
#include <southbridge/intel/common/pmutil.h>
-#include <delay.h>
#define GPE_EC_SCI 12
diff --git a/src/mainboard/google/foster/mainboard.c b/src/mainboard/google/foster/mainboard.c
index d3091ad8f4..daddf5c04f 100644
--- a/src/mainboard/google/foster/mainboard.c
+++ b/src/mainboard/google/foster/mainboard.c
@@ -16,7 +16,6 @@
#include <arch/mmu.h>
#include <boot/coreboot_tables.h>
-#include <delay.h>
#include <device/device.h>
#include <memrange.h>
#include <soc/addressmap.h>
diff --git a/src/mainboard/google/gale/mainboard.c b/src/mainboard/google/gale/mainboard.c
index 5684f8f867..c8ab88a7fa 100644
--- a/src/mainboard/google/gale/mainboard.c
+++ b/src/mainboard/google/gale/mainboard.c
@@ -16,7 +16,6 @@
#include <boardid.h>
#include <boot/coreboot_tables.h>
-#include <delay.h>
#include <device/device.h>
#include <gpio.h>
#include <soc/clock.h>
diff --git a/src/mainboard/google/oak/bootblock.c b/src/mainboard/google/oak/bootblock.c
index 4df7eeb047..3c50389914 100644
--- a/src/mainboard/google/oak/bootblock.c
+++ b/src/mainboard/google/oak/bootblock.c
@@ -15,7 +15,6 @@
#include <boardid.h>
#include <bootblock_common.h>
-#include <delay.h>
#include <gpio.h>
#include <device/mmio.h>
#include <soc/gpio.h>
diff --git a/src/mainboard/google/slippy/variants/peppy/romstage.c b/src/mainboard/google/slippy/variants/peppy/romstage.c
index e47edc74ca..37c7853347 100644
--- a/src/mainboard/google/slippy/variants/peppy/romstage.c
+++ b/src/mainboard/google/slippy/variants/peppy/romstage.c
@@ -14,7 +14,6 @@
* GNU General Public License for more details.
*/
-#include <delay.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
diff --git a/src/mainboard/google/slippy/variants/wolf/romstage.c b/src/mainboard/google/slippy/variants/wolf/romstage.c
index 3125efe978..731b35748d 100644
--- a/src/mainboard/google/slippy/variants/wolf/romstage.c
+++ b/src/mainboard/google/slippy/variants/wolf/romstage.c
@@ -14,7 +14,6 @@
* GNU General Public License for more details.
*/
-#include <delay.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
diff --git a/src/mainboard/google/smaug/romstage.c b/src/mainboard/google/smaug/romstage.c
index fd7c07f84d..1d10d0e1aa 100644
--- a/src/mainboard/google/smaug/romstage.c
+++ b/src/mainboard/google/smaug/romstage.c
@@ -13,7 +13,6 @@
* GNU General Public License for more details.
*/
-#include <delay.h>
#include <soc/addressmap.h>
#include <device/i2c_simple.h>
#include <soc/clock.h>
diff --git a/src/mainboard/google/veyron/romstage.c b/src/mainboard/google/veyron/romstage.c
index 940752803e..3870b63a60 100644
--- a/src/mainboard/google/veyron/romstage.c
+++ b/src/mainboard/google/veyron/romstage.c
@@ -20,7 +20,6 @@
#include <cbmem.h>
#include <console/console.h>
#include <device/mmio.h>
-#include <delay.h>
#include <program_loading.h>
#include <soc/sdram.h>
#include <soc/clock.h>
diff --git a/src/mainboard/google/veyron_mickey/mainboard.c b/src/mainboard/google/veyron_mickey/mainboard.c
index f29c9d0d8c..bb239732b5 100644
--- a/src/mainboard/google/veyron_mickey/mainboard.c
+++ b/src/mainboard/google/veyron_mickey/mainboard.c
@@ -16,7 +16,6 @@
#include <arch/cache.h>
#include <device/mmio.h>
#include <boot/coreboot_tables.h>
-#include <delay.h>
#include <device/device.h>
#include <device/i2c_simple.h>
#include <edid.h>
diff --git a/src/mainboard/google/veyron_mickey/romstage.c b/src/mainboard/google/veyron_mickey/romstage.c
index a2e8b367e1..c8a98428e9 100644
--- a/src/mainboard/google/veyron_mickey/romstage.c
+++ b/src/mainboard/google/veyron_mickey/romstage.c
@@ -20,7 +20,6 @@
#include <cbmem.h>
#include <console/console.h>
#include <device/mmio.h>
-#include <delay.h>
#include <program_loading.h>
#include <soc/sdram.h>
#include <soc/clock.h>
diff --git a/src/mainboard/google/veyron_rialto/mainboard.c b/src/mainboard/google/veyron_rialto/mainboard.c
index 05973058d3..074e6a4e99 100644
--- a/src/mainboard/google/veyron_rialto/mainboard.c
+++ b/src/mainboard/google/veyron_rialto/mainboard.c
@@ -17,7 +17,6 @@
#include <device/mmio.h>
#include <boot/coreboot_tables.h>
#include <console/console.h>
-#include <delay.h>
#include <device/device.h>
#include <device/i2c_simple.h>
#include <edid.h>
diff --git a/src/mainboard/google/veyron_rialto/romstage.c b/src/mainboard/google/veyron_rialto/romstage.c
index 64119c1fd1..d9fc42b7e6 100644
--- a/src/mainboard/google/veyron_rialto/romstage.c
+++ b/src/mainboard/google/veyron_rialto/romstage.c
@@ -20,7 +20,6 @@
#include <assert.h>
#include <cbmem.h>
#include <console/console.h>
-#include <delay.h>
#include <program_loading.h>
#include <soc/sdram.h>
#include <soc/clock.h>
diff --git a/src/mainboard/hp/pavilion_m6_1035dx/mainboard_smi.c b/src/mainboard/hp/pavilion_m6_1035dx/mainboard_smi.c
index e1527d848d..27b1ac2a7c 100644
--- a/src/mainboard/hp/pavilion_m6_1035dx/mainboard_smi.c
+++ b/src/mainboard/hp/pavilion_m6_1035dx/mainboard_smi.c
@@ -18,16 +18,15 @@
* SMI handler -- mostly takes care of SMIs from the EC
*/
-#include "ec.h"
-
#include <arch/io.h>
#include <console/console.h>
#include <cpu/x86/smm.h>
-#include <delay.h>
#include <ec/compal/ene932/ec.h>
#include <southbridge/amd/agesa/hudson/hudson.h>
#include <southbridge/amd/agesa/hudson/smi.h>
+#include "ec.h"
+
#define ACPI_PM1_CNT_SLEEP(state) ((1 << 13) | (state & 0x7) << 10)
enum sleep_states {
diff --git a/src/mainboard/intel/galileo/vboot.c b/src/mainboard/intel/galileo/vboot.c
index b78ed1bd3e..4b1f09f2e8 100644
--- a/src/mainboard/intel/galileo/vboot.c
+++ b/src/mainboard/intel/galileo/vboot.c
@@ -14,17 +14,17 @@
#include <assert.h>
#include <bootmode.h>
-#include <delay.h>
#include <device/i2c_simple.h>
#include <soc/i2c.h>
#include <soc/reg_access.h>
-#include "reg_access.h"
-#include "gen1.h"
-#include "gen2.h"
#include <spi_flash.h>
#include <security/vboot/vboot_common.h>
#include <security/vboot/vbnv.h>
+#include "reg_access.h"
+#include "gen1.h"
+#include "gen2.h"
+
int clear_recovery_mode_switch(void)
{
/* Nothing to do */
diff --git a/src/mainboard/lenovo/g505s/mainboard_smi.c b/src/mainboard/lenovo/g505s/mainboard_smi.c
index 2eaf7ca49b..27b1ac2a7c 100644
--- a/src/mainboard/lenovo/g505s/mainboard_smi.c
+++ b/src/mainboard/lenovo/g505s/mainboard_smi.c
@@ -17,16 +17,16 @@
/*
* SMI handler -- mostly takes care of SMIs from the EC
*/
-#include "ec.h"
#include <arch/io.h>
#include <console/console.h>
#include <cpu/x86/smm.h>
-#include <delay.h>
#include <ec/compal/ene932/ec.h>
#include <southbridge/amd/agesa/hudson/hudson.h>
#include <southbridge/amd/agesa/hudson/smi.h>
+#include "ec.h"
+
#define ACPI_PM1_CNT_SLEEP(state) ((1 << 13) | (state & 0x7) << 10)
enum sleep_states {
diff --git a/src/mainboard/lenovo/s230u/smihandler.c b/src/mainboard/lenovo/s230u/smihandler.c
index 2f79243e62..3c4df31f08 100644
--- a/src/mainboard/lenovo/s230u/smihandler.c
+++ b/src/mainboard/lenovo/s230u/smihandler.c
@@ -16,16 +16,15 @@
* GNU General Public License for more details.
*/
-#include "ec.h"
-
#include <console/console.h>
#include <cpu/x86/smm.h>
-#include <delay.h>
#include <ec/acpi/ec.h>
#include <ec/compal/ene932/ec.h>
#include <southbridge/intel/bd82x6x/pch.h>
#include <southbridge/intel/common/pmutil.h>
+#include "ec.h"
+
#define GPE_PALMDET1 2
#define GPE_PALMDET2 4
#define GPE_EC_SCI 7
diff --git a/src/mainboard/lenovo/x200/dock.c b/src/mainboard/lenovo/x200/dock.c
index 6e87644302..d5f774bb48 100644
--- a/src/mainboard/lenovo/x200/dock.c
+++ b/src/mainboard/lenovo/x200/dock.c
@@ -16,17 +16,18 @@
*/
#define __SIMPLE_DEVICE__
+
#include <console/console.h>
#include <arch/io.h>
#include <device/pci_ops.h>
#include <device/device.h>
#include <device/pci.h>
-#include <delay.h>
-#include "dock.h"
#include <southbridge/intel/i82801ix/i82801ix.h>
#include <ec/lenovo/h8/h8.h>
#include <ec/acpi/ec.h>
+#include "dock.h"
+
#define LPC_DEV PCI_DEV(0, 0x1f, 0)
void h8_mainboard_init_dock (void)
diff --git a/src/mainboard/opencellular/elgon/mainboard.c b/src/mainboard/opencellular/elgon/mainboard.c
index d140bc1ec9..74e31e1709 100644
--- a/src/mainboard/opencellular/elgon/mainboard.c
+++ b/src/mainboard/opencellular/elgon/mainboard.c
@@ -20,7 +20,6 @@
#include <libbdk-hal/bdk-config.h>
#include <libbdk-hal/bdk-twsi.h>
#include <soc/gpio.h>
-#include <delay.h>
#include <soc/uart.h>
#include <console/console.h>
#include <soc/clock.h>
diff --git a/src/mainboard/packardbell/ms2290/mainboard.c b/src/mainboard/packardbell/ms2290/mainboard.c
index 8e4293bdb7..09310aef72 100644
--- a/src/mainboard/packardbell/ms2290/mainboard.c
+++ b/src/mainboard/packardbell/ms2290/mainboard.c
@@ -19,7 +19,6 @@
#include <console/console.h>
#include <device/device.h>
#include <arch/io.h>
-#include <delay.h>
#include <device/pci_def.h>
#include <device/pci_ops.h>
#include <northbridge/intel/nehalem/nehalem.h>
diff --git a/src/mainboard/packardbell/ms2290/romstage.c b/src/mainboard/packardbell/ms2290/romstage.c
index 35b90f6a2a..8442dfaee9 100644
--- a/src/mainboard/packardbell/ms2290/romstage.c
+++ b/src/mainboard/packardbell/ms2290/romstage.c
@@ -28,7 +28,6 @@
#include <cpu/x86/bist.h>
#include <cpu/intel/romstage.h>
#include <ec/acpi/ec.h>
-#include <delay.h>
#include <timestamp.h>
#include <arch/acpi.h>
diff --git a/src/mainboard/packardbell/ms2290/smihandler.c b/src/mainboard/packardbell/ms2290/smihandler.c
index e4c29b1d70..ff13543cde 100644
--- a/src/mainboard/packardbell/ms2290/smihandler.c
+++ b/src/mainboard/packardbell/ms2290/smihandler.c
@@ -24,7 +24,6 @@
#include <northbridge/intel/nehalem/nehalem.h>
#include <cpu/intel/model_2065x/model_2065x.h>
#include <ec/acpi/ec.h>
-#include <delay.h>
static void mainboard_smm_init(void)
{
diff --git a/src/mainboard/roda/rk886ex/mainboard.c b/src/mainboard/roda/rk886ex/mainboard.c
index 843ca60577..91c11d5830 100644
--- a/src/mainboard/roda/rk886ex/mainboard.c
+++ b/src/mainboard/roda/rk886ex/mainboard.c
@@ -18,10 +18,9 @@
#include <device/device.h>
#include <arch/io.h>
#include <arch/interrupt.h>
-#include <delay.h>
#include <drivers/intel/gma/int15.h>
-
#include <ec/acpi/ec.h>
+
#include "m3885.h"
#define DUMP_RUNTIME_REGISTERS 0
diff --git a/src/mainboard/siemens/mc_tcu3/ptn3460.c b/src/mainboard/siemens/mc_tcu3/ptn3460.c
index 8143a16957..9acc60a345 100644
--- a/src/mainboard/siemens/mc_tcu3/ptn3460.c
+++ b/src/mainboard/siemens/mc_tcu3/ptn3460.c
@@ -16,6 +16,8 @@
#include <console/console.h>
#include <hwilib.h>
#include <string.h>
+#include <delay.h>
+
#include "soc/i2c.h"
#include "ptn3460.h"
diff --git a/src/mainboard/siemens/mc_tcu3/ptn3460.h b/src/mainboard/siemens/mc_tcu3/ptn3460.h
index 217c68a110..8dc002dc39 100644
--- a/src/mainboard/siemens/mc_tcu3/ptn3460.h
+++ b/src/mainboard/siemens/mc_tcu3/ptn3460.h
@@ -16,7 +16,6 @@
#ifndef PTN3460_H_
#define PTN3460_H_
-#include <delay.h>
#include "lcd_panel.h"
#define PTN_SLAVE_ADR 0x20
diff --git a/src/northbridge/amd/amdmct/wrappers/mcti_d.c b/src/northbridge/amd/amdmct/wrappers/mcti_d.c
index e42085dce5..7aaf016d29 100644
--- a/src/northbridge/amd/amdmct/wrappers/mcti_d.c
+++ b/src/northbridge/amd/amdmct/wrappers/mcti_d.c
@@ -17,9 +17,9 @@
/* Call-backs */
#include <arch/cpu.h>
-#include <delay.h>
#include <cpu/amd/msr.h>
#include <console/console.h>
+
#include "mcti.h"
#define NVRAM_DDR2_800 0
diff --git a/src/northbridge/intel/fsp_rangeley/northbridge.c b/src/northbridge/intel/fsp_rangeley/northbridge.c
index edc623a33b..63f2068725 100644
--- a/src/northbridge/intel/fsp_rangeley/northbridge.c
+++ b/src/northbridge/intel/fsp_rangeley/northbridge.c
@@ -19,7 +19,6 @@
#include <arch/acpi.h>
#include <device/pci_ops.h>
#include <stdint.h>
-#include <delay.h>
#include <cpu/intel/fsp_model_406dx/model_406dx.h>
#include <device/device.h>
#include <device/pci.h>
diff --git a/src/northbridge/intel/gm45/gma.c b/src/northbridge/intel/gm45/gma.c
index 6e54208563..3549b49234 100644
--- a/src/northbridge/intel/gm45/gma.c
+++ b/src/northbridge/intel/gm45/gma.c
@@ -16,10 +16,12 @@
#include <device/mmio.h>
#include <console/console.h>
-#include <delay.h>
#include <device/device.h>
#include <device/pci.h>
#include <device/pci_ids.h>
+#include <drivers/intel/gma/edid.h>
+#include <drivers/intel/gma/opregion.h>
+#include <drivers/intel/gma/libgfxinit.h>
#include <string.h>
#include <device/pci_ops.h>
#include <commonlib/helpers.h>
@@ -29,9 +31,6 @@
#include "drivers/intel/gma/i915_reg.h"
#include "chip.h"
#include "gm45.h"
-#include <drivers/intel/gma/edid.h>
-#include <drivers/intel/gma/opregion.h>
-#include <drivers/intel/gma/libgfxinit.h>
static struct resource *gtt_res = NULL;
diff --git a/src/northbridge/intel/haswell/minihd.c b/src/northbridge/intel/haswell/minihd.c
index 994296adb0..61265dd281 100644
--- a/src/northbridge/intel/haswell/minihd.c
+++ b/src/northbridge/intel/haswell/minihd.c
@@ -21,7 +21,6 @@
#include <device/pci_ids.h>
#include <device/pci_ops.h>
#include <device/mmio.h>
-#include <delay.h>
#include <stdlib.h>
#include <southbridge/intel/lynxpoint/hda_verb.h>
diff --git a/src/northbridge/intel/sandybridge/raminit.c b/src/northbridge/intel/sandybridge/raminit.c
index 4a048db7c7..c066634312 100644
--- a/src/northbridge/intel/sandybridge/raminit.c
+++ b/src/northbridge/intel/sandybridge/raminit.c
@@ -30,7 +30,7 @@
#include <southbridge/intel/bd82x6x/me.h>
#include <southbridge/intel/common/smbus.h>
#include <cpu/x86/msr.h>
-#include <delay.h>
+
#include "raminit_native.h"
#include "raminit_common.h"
#include "sandybridge.h"
diff --git a/src/northbridge/intel/x4x/gma.c b/src/northbridge/intel/x4x/gma.c
index c36a10352e..c4e8bf1cdd 100644
--- a/src/northbridge/intel/x4x/gma.c
+++ b/src/northbridge/intel/x4x/gma.c
@@ -16,17 +16,12 @@
*/
#include <console/console.h>
-#include <delay.h>
#include <device/device.h>
#include <device/pci.h>
#include <device/pci_ids.h>
#include <device/pci_ops.h>
#include <commonlib/helpers.h>
#include <cbmem.h>
-
-#include "drivers/intel/gma/i915_reg.h"
-#include "chip.h"
-#include "x4x.h"
#include <drivers/intel/gma/intel_bios.h>
#include <drivers/intel/gma/edid.h>
#include <drivers/intel/gma/i915.h>
@@ -35,6 +30,10 @@
#include <pc80/vga.h>
#include <pc80/vga_io.h>
+#include "chip.h"
+#include "drivers/intel/gma/i915_reg.h"
+#include "x4x.h"
+
#if CONFIG(SOUTHBRIDGE_INTEL_I82801JX)
#include <southbridge/intel/i82801jx/nvs.h>
#elif CONFIG(SOUTHBRIDGE_INTEL_I82801GX)
diff --git a/src/northbridge/intel/x4x/raminit.c b/src/northbridge/intel/x4x/raminit.c
index 02a8b74f70..4943428d0e 100644
--- a/src/northbridge/intel/x4x/raminit.c
+++ b/src/northbridge/intel/x4x/raminit.c
@@ -21,15 +21,12 @@
#include <cpu/x86/cache.h>
#include <cpu/x86/mtrr.h>
#include <arch/cpu.h>
-#include <delay.h>
#include <halt.h>
-#include "iomap.h"
#if CONFIG(SOUTHBRIDGE_INTEL_I82801GX)
#include <southbridge/intel/i82801gx/i82801gx.h> /* smbus_read_byte */
#else
#include <southbridge/intel/i82801jx/i82801jx.h> /* smbus_read_byte */
#endif
-#include "x4x.h"
#include <spd.h>
#include <string.h>
#include <device/dram/ddr2.h>
@@ -37,6 +34,9 @@
#include <mrc_cache.h>
#include <timestamp.h>
+#include "iomap.h"
+#include "x4x.h"
+
#define MRC_CACHE_VERSION 0
static inline int spd_read_byte(unsigned int device, unsigned int address)
diff --git a/src/security/vboot/vboot_logic.c b/src/security/vboot/vboot_logic.c
index ac3d3c33a7..2a8e619289 100644
--- a/src/security/vboot/vboot_logic.c
+++ b/src/security/vboot/vboot_logic.c
@@ -18,7 +18,6 @@
#include <bootmode.h>
#include <console/console.h>
#include <console/vtxprintf.h>
-#include <delay.h>
#include <string.h>
#include <timestamp.h>
#include <vb2_api.h>
diff --git a/src/soc/amd/common/block/pi/agesawrapper.c b/src/soc/amd/common/block/pi/agesawrapper.c
index 5295567a0e..1b9e0fca51 100644
--- a/src/soc/amd/common/block/pi/agesawrapper.c
+++ b/src/soc/amd/common/block/pi/agesawrapper.c
@@ -16,7 +16,6 @@
#include <arch/acpi.h>
#include <cbmem.h>
-#include <delay.h>
#include <timestamp.h>
#include <amdblocks/s3_resume.h>
#include <amdblocks/agesawrapper.h>
diff --git a/src/soc/amd/stoneyridge/hda.c b/src/soc/amd/stoneyridge/hda.c
index 475fc55268..0ab2f91ee7 100644
--- a/src/soc/amd/stoneyridge/hda.c
+++ b/src/soc/amd/stoneyridge/hda.c
@@ -17,7 +17,6 @@
#include <device/pci.h>
#include <device/pci_ids.h>
#include <device/pci_ops.h>
-#include <delay.h>
#include <soc/southbridge.h>
static const unsigned short pci_device_ids[] = {
diff --git a/src/soc/amd/stoneyridge/sata.c b/src/soc/amd/stoneyridge/sata.c
index fc6cdced03..52932e27f0 100644
--- a/src/soc/amd/stoneyridge/sata.c
+++ b/src/soc/amd/stoneyridge/sata.c
@@ -14,7 +14,6 @@
*/
#include <device/device.h>
-#include <delay.h>
#include <device/pci.h>
#include <device/pci_ids.h>
#include <device/pci_ops.h>
diff --git a/src/soc/amd/stoneyridge/smihandler.c b/src/soc/amd/stoneyridge/smihandler.c
index c053d909f7..c3f4b675dc 100644
--- a/src/soc/amd/stoneyridge/smihandler.c
+++ b/src/soc/amd/stoneyridge/smihandler.c
@@ -21,7 +21,6 @@
#include <cpu/x86/cache.h>
#include <arch/acpi.h>
#include <arch/hlt.h>
-#include <delay.h>
#include <device/pci_def.h>
#include <soc/smi.h>
#include <soc/southbridge.h>
diff --git a/src/soc/cavium/cn81xx/include/soc/timer.h b/src/soc/cavium/cn81xx/include/soc/timer.h
index 5c4cbd2ce3..4e4131136e 100644
--- a/src/soc/cavium/cn81xx/include/soc/timer.h
+++ b/src/soc/cavium/cn81xx/include/soc/timer.h
@@ -18,7 +18,6 @@
#include <inttypes.h>
#include <types.h>
-#include <delay.h>
/* Watchdog functions */
void watchdog_set(const size_t index, unsigned int timeout_ms);
diff --git a/src/soc/cavium/cn81xx/spi.c b/src/soc/cavium/cn81xx/spi.c
index dd0baf626f..2ba25a201a 100644
--- a/src/soc/cavium/cn81xx/spi.c
+++ b/src/soc/cavium/cn81xx/spi.c
@@ -19,7 +19,6 @@
#include <device/mmio.h>
#include <assert.h>
#include <console/console.h>
-#include <delay.h>
#include <endian.h>
#include <soc/addressmap.h>
#include <soc/spi.h>
diff --git a/src/soc/cavium/cn81xx/timer.c b/src/soc/cavium/cn81xx/timer.c
index d6828e9ab8..b333c7e4d6 100644
--- a/src/soc/cavium/cn81xx/timer.c
+++ b/src/soc/cavium/cn81xx/timer.c
@@ -16,6 +16,7 @@
* Derived from Cavium's BSD-3 Clause OCTEONTX-SDK-6.2.0.
*/
+#include <delay.h>
#include <device/mmio.h>
#include <arch/lib_helpers.h>
#include <console/console.h>
diff --git a/src/soc/cavium/common/bdk-coreboot.c b/src/soc/cavium/common/bdk-coreboot.c
index f8fa8d499e..740f8e442f 100644
--- a/src/soc/cavium/common/bdk-coreboot.c
+++ b/src/soc/cavium/common/bdk-coreboot.c
@@ -15,13 +15,13 @@
*
* This file consists of data imported from bdk-config.c
*/
+
// coreboot
#include <string.h>
#include <assert.h>
#include <device/i2c.h>
#include <device/i2c_simple.h>
#include <endian.h>
-#include <delay.h>
#include <soc/timer.h>
// BDK
diff --git a/src/soc/intel/baytrail/gfx.c b/src/soc/intel/baytrail/gfx.c
index 73c0d152d8..5d6d504a86 100644
--- a/src/soc/intel/baytrail/gfx.c
+++ b/src/soc/intel/baytrail/gfx.c
@@ -16,14 +16,12 @@
#include <device/mmio.h>
#include <device/pci_ops.h>
#include <console/console.h>
-#include <delay.h>
#include <device/device.h>
#include <device/pci.h>
#include <device/pci_ids.h>
#include <drivers/intel/gma/opregion.h>
#include <reg_script.h>
#include <stdlib.h>
-
#include <soc/gfx.h>
#include <soc/iosf.h>
#include <soc/nvs.h>
diff --git a/src/soc/intel/braswell/sata.c b/src/soc/intel/braswell/sata.c
index ab167455da..80031e6907 100644
--- a/src/soc/intel/braswell/sata.c
+++ b/src/soc/intel/braswell/sata.c
@@ -18,7 +18,6 @@
#include <soc/ramstage.h>
#include <soc/sata.h>
#include <console/console.h>
-#include <delay.h>
#include <device/device.h>
#include <device/pci.h>
#include <device/pci_ids.h>
diff --git a/src/soc/intel/broadwell/adsp.c b/src/soc/intel/broadwell/adsp.c
index d0296e0b2a..7658515c12 100644
--- a/src/soc/intel/broadwell/adsp.c
+++ b/src/soc/intel/broadwell/adsp.c
@@ -20,7 +20,6 @@
#include <device/pci_ids.h>
#include <device/pci_ops.h>
#include <device/mmio.h>
-#include <delay.h>
#include <soc/adsp.h>
#include <soc/device_nvs.h>
#include <soc/iobp.h>
diff --git a/src/soc/intel/broadwell/ehci.c b/src/soc/intel/broadwell/ehci.c
index a03fd5431b..c8a4e7a288 100644
--- a/src/soc/intel/broadwell/ehci.c
+++ b/src/soc/intel/broadwell/ehci.c
@@ -14,7 +14,6 @@
* GNU General Public License for more details.
*/
-#include <delay.h>
#include <device/device.h>
#include <device/pci.h>
#include <device/pci_ids.h>
diff --git a/src/soc/intel/broadwell/hda.c b/src/soc/intel/broadwell/hda.c
index 9ef51c6cd5..d1aee924f4 100644
--- a/src/soc/intel/broadwell/hda.c
+++ b/src/soc/intel/broadwell/hda.c
@@ -22,7 +22,6 @@
#include <device/pci_ids.h>
#include <device/pci_ops.h>
#include <device/mmio.h>
-#include <delay.h>
#include <soc/intel/common/hda_verb.h>
#include <soc/pch.h>
#include <soc/ramstage.h>
diff --git a/src/soc/intel/broadwell/lpc.c b/src/soc/intel/broadwell/lpc.c
index c831c2c5bc..8438ab45db 100644
--- a/src/soc/intel/broadwell/lpc.c
+++ b/src/soc/intel/broadwell/lpc.c
@@ -15,7 +15,6 @@
*/
#include <console/console.h>
-#include <delay.h>
#include <device/device.h>
#include <device/pci.h>
#include <device/pci_ids.h>
diff --git a/src/soc/intel/broadwell/minihd.c b/src/soc/intel/broadwell/minihd.c
index 1b2489cc5c..d44e1532b3 100644
--- a/src/soc/intel/broadwell/minihd.c
+++ b/src/soc/intel/broadwell/minihd.c
@@ -21,7 +21,6 @@
#include <device/pci_ids.h>
#include <device/pci_ops.h>
#include <device/mmio.h>
-#include <delay.h>
#include <stdlib.h>
#include <soc/intel/common/hda_verb.h>
#include <soc/ramstage.h>
diff --git a/src/soc/intel/broadwell/pch.c b/src/soc/intel/broadwell/pch.c
index 06c05c0df3..e555588a2e 100644
--- a/src/soc/intel/broadwell/pch.c
+++ b/src/soc/intel/broadwell/pch.c
@@ -15,7 +15,6 @@
*/
#include <console/console.h>
-#include <delay.h>
#include <device/pci_ops.h>
#include <device/device.h>
#include <device/pci.h>
diff --git a/src/soc/intel/broadwell/romstage/uart.c b/src/soc/intel/broadwell/romstage/uart.c
index a3c4c61975..58450dd834 100644
--- a/src/soc/intel/broadwell/romstage/uart.c
+++ b/src/soc/intel/broadwell/romstage/uart.c
@@ -14,7 +14,6 @@
*/
#include <arch/early_variables.h>
-#include <delay.h>
#include <device/pci_def.h>
#include <reg_script.h>
#include <stdint.h>
diff --git a/src/soc/intel/cannonlake/lpc.c b/src/soc/intel/cannonlake/lpc.c
index 7c6025cb75..56fefa5c05 100644
--- a/src/soc/intel/cannonlake/lpc.c
+++ b/src/soc/intel/cannonlake/lpc.c
@@ -15,8 +15,6 @@
* GNU General Public License for more details.
*/
-#include "chip.h"
-#include <delay.h>
#include <device/device.h>
#include <device/pci.h>
#include <pc80/isa-dma.h>
@@ -34,6 +32,8 @@
#include <soc/pci_devs.h>
#include <soc/pcr_ids.h>
+#include "chip.h"
+
/*
* As per the BWG, Chapter 5.9.1. "PCH BIOS component will reserve
* certain memory range as reserved range for BIOS usage.
diff --git a/src/soc/intel/common/block/cpu/cpulib.c b/src/soc/intel/common/block/cpu/cpulib.c
index 9dbfbd47ee..c847390d40 100644
--- a/src/soc/intel/common/block/cpu/cpulib.c
+++ b/src/soc/intel/common/block/cpu/cpulib.c
@@ -21,7 +21,6 @@
#include <cpu/x86/msr.h>
#include <cpu/x86/mtrr.h>
#include <arch/cpu.h>
-#include <delay.h>
#include <intelblocks/cpulib.h>
#include <intelblocks/fast_spi.h>
#include <soc/cpu.h>
diff --git a/src/soc/intel/common/block/systemagent/systemagent_early.c b/src/soc/intel/common/block/systemagent/systemagent_early.c
index a3e278f3f7..61f14a935c 100644
--- a/src/soc/intel/common/block/systemagent/systemagent_early.c
+++ b/src/soc/intel/common/block/systemagent/systemagent_early.c
@@ -15,7 +15,6 @@
#include <device/mmio.h>
#include <device/pci_ops.h>
-#include <delay.h>
#include <device/device.h>
#include <device/pci.h>
#include <intelblocks/systemagent.h>
diff --git a/src/soc/intel/fsp_baytrail/gfx.c b/src/soc/intel/fsp_baytrail/gfx.c
index 6bde32e6fd..dab997275d 100644
--- a/src/soc/intel/fsp_baytrail/gfx.c
+++ b/src/soc/intel/fsp_baytrail/gfx.c
@@ -15,13 +15,11 @@
*/
#include <console/console.h>
-#include <delay.h>
#include <device/device.h>
#include <device/pci.h>
#include <device/pci_ids.h>
#include <reg_script.h>
#include <stdlib.h>
-
#include <soc/gfx.h>
#include <soc/iosf.h>
#include <soc/pci_devs.h>
diff --git a/src/soc/intel/fsp_broadwell_de/smihandler.c b/src/soc/intel/fsp_broadwell_de/smihandler.c
index 36a01c6fcb..854bd76a38 100644
--- a/src/soc/intel/fsp_broadwell_de/smihandler.c
+++ b/src/soc/intel/fsp_broadwell_de/smihandler.c
@@ -15,7 +15,6 @@
* GNU General Public License for more details.
*/
-#include <delay.h>
#include <types.h>
#include <console/console.h>
#include <cpu/x86/cache.h>
diff --git a/src/soc/intel/icelake/lpc.c b/src/soc/intel/icelake/lpc.c
index a3bce93a7d..8fe0507255 100644
--- a/src/soc/intel/icelake/lpc.c
+++ b/src/soc/intel/icelake/lpc.c
@@ -13,9 +13,7 @@
* GNU General Public License for more details.
*/
-#include "chip.h"
#include <console/console.h>
-#include <delay.h>
#include <device/device.h>
#include <device/pci.h>
#include <pc80/isa-dma.h>
@@ -33,6 +31,8 @@
#include <soc/pci_devs.h>
#include <soc/pcr_ids.h>
+#include "chip.h"
+
/*
* As per the BWG, Chapter 5.9.1. "PCH BIOS component will reserve
* certain memory range as reserved range for BIOS usage.
diff --git a/src/soc/intel/quark/gpio_i2c.c b/src/soc/intel/quark/gpio_i2c.c
index b2bb572800..02b5892946 100644
--- a/src/soc/intel/quark/gpio_i2c.c
+++ b/src/soc/intel/quark/gpio_i2c.c
@@ -14,7 +14,6 @@
*/
#include <console/console.h>
-#include <delay.h>
#include <device/device.h>
#include <device/i2c_simple.h>
#include <device/pci.h>
diff --git a/src/soc/intel/quark/include/soc/reg_access.h b/src/soc/intel/quark/include/soc/reg_access.h
index d06ed82342..27231f9e11 100644
--- a/src/soc/intel/quark/include/soc/reg_access.h
+++ b/src/soc/intel/quark/include/soc/reg_access.h
@@ -19,7 +19,6 @@
#include <cpu/x86/cr.h>
#include <cpu/x86/msr.h>
#include <cpu/x86/mtrr.h>
-#include <delay.h>
#include <fsp/util.h>
#include <reg_script.h>
#include <soc/IntelQNCConfig.h>
diff --git a/src/soc/intel/quark/reg_access.c b/src/soc/intel/quark/reg_access.c
index df171f590a..1063525e03 100644
--- a/src/soc/intel/quark/reg_access.c
+++ b/src/soc/intel/quark/reg_access.c
@@ -19,6 +19,7 @@
#include <assert.h>
#include <cpu/x86/mtrr.h>
#include <console/console.h>
+#include <delay.h>
#include <device/pci_ops.h>
#include <soc/pci_devs.h>
#include <soc/ramstage.h>
diff --git a/src/soc/intel/quark/romstage/pcie.c b/src/soc/intel/quark/romstage/pcie.c
index dc54a3274c..747ac2be6d 100644
--- a/src/soc/intel/quark/romstage/pcie.c
+++ b/src/soc/intel/quark/romstage/pcie.c
@@ -13,7 +13,6 @@
* GNU General Public License for more details.
*/
-#include <delay.h>
#include <device/device.h>
#include <soc/pci_devs.h>
#include <soc/reg_access.h>
diff --git a/src/soc/intel/skylake/cpu.c b/src/soc/intel/skylake/cpu.c
index 0343a237f8..3e77b03c3f 100644
--- a/src/soc/intel/skylake/cpu.c
+++ b/src/soc/intel/skylake/cpu.c
@@ -33,7 +33,6 @@
#include <cpu/x86/cache.h>
#include <cpu/x86/name.h>
#include <cpu/x86/smm.h>
-#include <delay.h>
#include <intelblocks/cpulib.h>
#include <intelblocks/fast_spi.h>
#include <intelblocks/mp_init.h>
diff --git a/src/soc/intel/skylake/lpc.c b/src/soc/intel/skylake/lpc.c
index 0110022274..8d6228c096 100644
--- a/src/soc/intel/skylake/lpc.c
+++ b/src/soc/intel/skylake/lpc.c
@@ -15,8 +15,6 @@
* GNU General Public License for more details.
*/
-#include "chip.h"
-#include <delay.h>
#include <device/device.h>
#include <device/pci.h>
#include <pc80/isa-dma.h>
@@ -30,6 +28,8 @@
#include <soc/pcr_ids.h>
#include <soc/intel/common/block/lpc/lpc_def.h>
+#include "chip.h"
+
/**
PCH preserved MMIO range, 24 MB, from 0xFD000000 to 0xFE7FFFFF
**/
diff --git a/src/soc/mediatek/common/include/soc/rtc_common.h b/src/soc/mediatek/common/include/soc/rtc_common.h
index 11c2f5fb2f..d039e0becf 100644
--- a/src/soc/mediatek/common/include/soc/rtc_common.h
+++ b/src/soc/mediatek/common/include/soc/rtc_common.h
@@ -19,7 +19,6 @@
#include <assert.h>
#include <bcd.h>
#include <console/console.h>
-#include <delay.h>
#include <rtc.h>
#include <soc/pmic_wrap_common.h>
diff --git a/src/soc/mediatek/common/rtc.c b/src/soc/mediatek/common/rtc.c
index 2fe024a568..a9142b612d 100644
--- a/src/soc/mediatek/common/rtc.c
+++ b/src/soc/mediatek/common/rtc.c
@@ -13,6 +13,7 @@
* GNU General Public License for more details.
*/
+#include <delay.h>
#include <soc/rtc_common.h>
#include <soc/rtc.h>
#include <soc/pmic_wrap.h>
diff --git a/src/soc/mediatek/common/usb.c b/src/soc/mediatek/common/usb.c
index 116e5dbba2..dcb93073b7 100644
--- a/src/soc/mediatek/common/usb.c
+++ b/src/soc/mediatek/common/usb.c
@@ -15,7 +15,6 @@
#include <device/mmio.h>
#include <console/console.h>
-#include <delay.h>
#include <soc/addressmap.h>
#include <soc/usb.h>
#include <timer.h>
diff --git a/src/soc/mediatek/mt8173/ddp.c b/src/soc/mediatek/mt8173/ddp.c
index 09ea20005e..0b78c3ea64 100644
--- a/src/soc/mediatek/mt8173/ddp.c
+++ b/src/soc/mediatek/mt8173/ddp.c
@@ -14,7 +14,6 @@
*/
#include <device/mmio.h>
-#include <delay.h>
#include <edid.h>
#include <stdlib.h>
#include <stddef.h>
diff --git a/src/soc/mediatek/mt8173/dramc_pi_calibration_api.c b/src/soc/mediatek/mt8173/dramc_pi_calibration_api.c
index 9e4cb11574..529ebde3f1 100644
--- a/src/soc/mediatek/mt8173/dramc_pi_calibration_api.c
+++ b/src/soc/mediatek/mt8173/dramc_pi_calibration_api.c
@@ -15,7 +15,6 @@
#include <device/mmio.h>
#include <assert.h>
-#include <delay.h>
#include <stdlib.h>
#include <soc/addressmap.h>
#include <soc/dramc_common.h>
diff --git a/src/soc/mediatek/mt8173/emi.c b/src/soc/mediatek/mt8173/emi.c
index 68b178fcb5..d4cd02aa09 100644
--- a/src/soc/mediatek/mt8173/emi.c
+++ b/src/soc/mediatek/mt8173/emi.c
@@ -17,7 +17,6 @@
#include <assert.h>
#include <boardid.h>
#include <console/console.h>
-#include <delay.h>
#include <soc/addressmap.h>
#include <soc/dramc_common.h>
#include <soc/dramc_register.h>
diff --git a/src/soc/mediatek/mt8173/rtc.c b/src/soc/mediatek/mt8173/rtc.c
index ca81d26bb0..79e5732c2f 100644
--- a/src/soc/mediatek/mt8173/rtc.c
+++ b/src/soc/mediatek/mt8173/rtc.c
@@ -13,6 +13,7 @@
* GNU General Public License for more details.
*/
+#include <delay.h>
#include <soc/rtc_common.h>
#include <soc/rtc.h>
#include <soc/mt6391.h>
diff --git a/src/soc/mediatek/mt8183/rtc.c b/src/soc/mediatek/mt8183/rtc.c
index df7501a111..62256ebc1b 100644
--- a/src/soc/mediatek/mt8183/rtc.c
+++ b/src/soc/mediatek/mt8183/rtc.c
@@ -13,6 +13,7 @@
* GNU General Public License for more details.
*/
+#include <delay.h>
#include <halt.h>
#include <soc/rtc_common.h>
#include <soc/rtc.h>
diff --git a/src/soc/nvidia/tegra/gpio.c b/src/soc/nvidia/tegra/gpio.c
index 49649674b4..6800c5d944 100644
--- a/src/soc/nvidia/tegra/gpio.c
+++ b/src/soc/nvidia/tegra/gpio.c
@@ -18,7 +18,6 @@
#include <soc/addressmap.h>
#include <stddef.h>
#include <stdint.h>
-#include <delay.h>
#include "pinmux.h"
diff --git a/src/soc/nvidia/tegra210/mipi_dsi.c b/src/soc/nvidia/tegra210/mipi_dsi.c
index 6b5319ac51..23d92743ce 100644
--- a/src/soc/nvidia/tegra210/mipi_dsi.c
+++ b/src/soc/nvidia/tegra210/mipi_dsi.c
@@ -38,10 +38,10 @@
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
* USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
+
#include <console/console.h>
#include <stdint.h>
#include <stdlib.h>
-#include <delay.h>
#include <string.h>
#include <soc/addressmap.h>
#include <soc/clock.h>
diff --git a/src/soc/qualcomm/ipq40xx/i2c.c b/src/soc/qualcomm/ipq40xx/i2c.c
index b727f6d427..f5c9943cfa 100644
--- a/src/soc/qualcomm/ipq40xx/i2c.c
+++ b/src/soc/qualcomm/ipq40xx/i2c.c
@@ -31,7 +31,6 @@
#include <assert.h>
#include <console/console.h>
-#include <delay.h>
#include <device/i2c_simple.h>
#include <stdlib.h>
#include <string.h>
diff --git a/src/soc/qualcomm/ipq806x/i2c.c b/src/soc/qualcomm/ipq806x/i2c.c
index 4898d9b4f2..cd57591beb 100644
--- a/src/soc/qualcomm/ipq806x/i2c.c
+++ b/src/soc/qualcomm/ipq806x/i2c.c
@@ -29,7 +29,6 @@
#include <assert.h>
#include <console/console.h>
-#include <delay.h>
#include <device/i2c_simple.h>
#include <stdlib.h>
#include <string.h>
diff --git a/src/soc/qualcomm/sdm845/clock.c b/src/soc/qualcomm/sdm845/clock.c
index 5f0c305046..382e5a691e 100644
--- a/src/soc/qualcomm/sdm845/clock.c
+++ b/src/soc/qualcomm/sdm845/clock.c
@@ -16,7 +16,6 @@
#include <device/mmio.h>
#include <types.h>
#include <console/console.h>
-#include <delay.h>
#include <commonlib/helpers.h>
#include <assert.h>
#include <soc/clock.h>
diff --git a/src/soc/qualcomm/sdm845/gpio.c b/src/soc/qualcomm/sdm845/gpio.c
index afa461dabd..faa0133d57 100644
--- a/src/soc/qualcomm/sdm845/gpio.c
+++ b/src/soc/qualcomm/sdm845/gpio.c
@@ -15,7 +15,6 @@
#include <device/mmio.h>
#include <types.h>
-#include <delay.h>
#include <gpio.h>
void gpio_configure(gpio_t gpio, uint32_t func, uint32_t pull,
diff --git a/src/soc/rockchip/common/pwm.c b/src/soc/rockchip/common/pwm.c
index e4045a8937..ad0453b612 100644
--- a/src/soc/rockchip/common/pwm.c
+++ b/src/soc/rockchip/common/pwm.c
@@ -15,7 +15,6 @@
#include <device/mmio.h>
#include <assert.h>
-#include <delay.h>
#include <soc/addressmap.h>
#include <soc/grf.h>
#include <soc/soc.h>
diff --git a/src/soc/rockchip/common/vop.c b/src/soc/rockchip/common/vop.c
index 1ee861ca93..9c70b78171 100644
--- a/src/soc/rockchip/common/vop.c
+++ b/src/soc/rockchip/common/vop.c
@@ -14,7 +14,6 @@
*/
#include <device/mmio.h>
-#include <delay.h>
#include <stdlib.h>
#include <stddef.h>
#include <soc/addressmap.h>
diff --git a/src/soc/rockchip/rk3288/soc.c b/src/soc/rockchip/rk3288/soc.c
index 19ad0eb471..bda9553cd7 100644
--- a/src/soc/rockchip/rk3288/soc.c
+++ b/src/soc/rockchip/rk3288/soc.c
@@ -16,7 +16,6 @@
#include <arch/cache.h>
#include <bootmode.h>
#include <console/console.h>
-#include <delay.h>
#include <device/device.h>
#include <gpio.h>
#include <soc/display.h>
diff --git a/src/soc/rockchip/rk3288/tsadc.c b/src/soc/rockchip/rk3288/tsadc.c
index 8104361d07..a34105d9ac 100644
--- a/src/soc/rockchip/rk3288/tsadc.c
+++ b/src/soc/rockchip/rk3288/tsadc.c
@@ -15,7 +15,6 @@
#include <device/mmio.h>
#include <assert.h>
-#include <delay.h>
#include <soc/clock.h>
#include <soc/grf.h>
#include <soc/pmu.h>
diff --git a/src/soc/rockchip/rk3399/usb.c b/src/soc/rockchip/rk3399/usb.c
index 78facb5050..e016fbf7c1 100644
--- a/src/soc/rockchip/rk3399/usb.c
+++ b/src/soc/rockchip/rk3399/usb.c
@@ -16,7 +16,6 @@
#include <device/mmio.h>
#include <assert.h>
#include <console/console.h>
-#include <delay.h>
#include <soc/clock.h>
#include <soc/grf.h>
#include <soc/soc.h>
diff --git a/src/soc/samsung/exynos5250/clock_init.c b/src/soc/samsung/exynos5250/clock_init.c
index d67b596984..fa19eb1763 100644
--- a/src/soc/samsung/exynos5250/clock_init.c
+++ b/src/soc/samsung/exynos5250/clock_init.c
@@ -16,7 +16,6 @@
/* Clock setup for SMDK5250 board based on EXYNOS5 */
#include <device/mmio.h>
-#include <delay.h>
#include <soc/clk.h>
#include <soc/dp.h>
#include <soc/setup.h>
diff --git a/src/soc/samsung/exynos5250/cpu.c b/src/soc/samsung/exynos5250/cpu.c
index 81f6f382f3..f00351ecf4 100644
--- a/src/soc/samsung/exynos5250/cpu.c
+++ b/src/soc/samsung/exynos5250/cpu.c
@@ -17,7 +17,6 @@
#include <arch/cache.h>
#include <console/console.h>
#include <device/mmio.h>
-#include <delay.h>
#include <device/device.h>
#include <soc/clk.h>
#include <soc/cpu.h>
diff --git a/src/soc/samsung/exynos5420/clock_init.c b/src/soc/samsung/exynos5420/clock_init.c
index 806de6e642..eae08a8dea 100644
--- a/src/soc/samsung/exynos5420/clock_init.c
+++ b/src/soc/samsung/exynos5420/clock_init.c
@@ -16,7 +16,6 @@
/* Clock setup for SMDK5420 board based on EXYNOS5 */
#include <device/mmio.h>
-#include <delay.h>
#include <soc/clk.h>
#include <soc/cpu.h>
#include <soc/dp.h>
diff --git a/src/soc/samsung/exynos5420/cpu.c b/src/soc/samsung/exynos5420/cpu.c
index 1c354e66e7..55b0512179 100644
--- a/src/soc/samsung/exynos5420/cpu.c
+++ b/src/soc/samsung/exynos5420/cpu.c
@@ -17,7 +17,6 @@
#include <arch/cache.h>
#include <console/console.h>
#include <device/mmio.h>
-#include <delay.h>
#include <device/device.h>
#include <ec/google/chromeec/ec.h>
#include <soc/dp.h>
diff --git a/src/soc/samsung/exynos5420/fimd.c b/src/soc/samsung/exynos5420/fimd.c
index 6b69f18cc7..756d2fba54 100644
--- a/src/soc/samsung/exynos5420/fimd.c
+++ b/src/soc/samsung/exynos5420/fimd.c
@@ -18,7 +18,6 @@
#include <device/mmio.h>
#include <console/console.h>
-#include <delay.h>
#include <soc/clk.h>
#include <soc/dp.h>
#include <soc/fimd.h>
diff --git a/src/southbridge/amd/agesa/hudson/hda.c b/src/southbridge/amd/agesa/hudson/hda.c
index 1cd8953c17..2368bb2d4f 100644
--- a/src/southbridge/amd/agesa/hudson/hda.c
+++ b/src/southbridge/amd/agesa/hudson/hda.c
@@ -17,9 +17,8 @@
#include <device/pci.h>
#include <device/pci_ids.h>
#include <device/pci_ops.h>
-#include <delay.h>
-#include "hudson.h"
+#include "hudson.h"
static void hda_init(struct device *dev)
{
diff --git a/src/southbridge/amd/agesa/hudson/imc.c b/src/southbridge/amd/agesa/hudson/imc.c
index 68ff7fb6e3..9ba07316e8 100644
--- a/src/southbridge/amd/agesa/hudson/imc.c
+++ b/src/southbridge/amd/agesa/hudson/imc.c
@@ -15,7 +15,6 @@
#include "imc.h"
#include <device/mmio.h>
-#include <delay.h>
#include <Porting.h>
#include <AGESA.h>
#include <amdlib.h>
diff --git a/src/southbridge/amd/agesa/hudson/sata.c b/src/southbridge/amd/agesa/hudson/sata.c
index 75ec43997e..f6d3689231 100644
--- a/src/southbridge/amd/agesa/hudson/sata.c
+++ b/src/southbridge/amd/agesa/hudson/sata.c
@@ -14,12 +14,11 @@
*/
#include <device/device.h>
-#include <delay.h>
#include <device/pci.h>
#include <device/pci_ids.h>
#include <device/pci_ops.h>
-#include "hudson.h"
+#include "hudson.h"
static void sata_init(struct device *dev)
{
diff --git a/src/southbridge/amd/agesa/hudson/sd.c b/src/southbridge/amd/agesa/hudson/sd.c
index ec447ef20e..cc9470e04b 100644
--- a/src/southbridge/amd/agesa/hudson/sd.c
+++ b/src/southbridge/amd/agesa/hudson/sd.c
@@ -14,10 +14,10 @@
*/
#include <device/device.h>
-#include <delay.h>
#include <device/pci.h>
#include <device/pci_ids.h>
#include <device/pci_ops.h>
+
#include "hudson.h"
static void sd_init(struct device *dev)
diff --git a/src/southbridge/amd/agesa/hudson/smihandler.c b/src/southbridge/amd/agesa/hudson/smihandler.c
index a87b75da00..1b9442b1b6 100644
--- a/src/southbridge/amd/agesa/hudson/smihandler.c
+++ b/src/southbridge/amd/agesa/hudson/smihandler.c
@@ -19,12 +19,11 @@
*/
#include <arch/io.h>
+#include <cpu/x86/smm.h>
+
#include "hudson.h"
#include "smi.h"
-#include <cpu/x86/smm.h>
-#include <delay.h>
-
#define SMI_0x88_ACPI_COMMAND (1 << 11)
enum smi_source {
diff --git a/src/southbridge/amd/pi/hudson/hda.c b/src/southbridge/amd/pi/hudson/hda.c
index d5c92b4608..9cdc1b4cd7 100644
--- a/src/southbridge/amd/pi/hudson/hda.c
+++ b/src/southbridge/amd/pi/hudson/hda.c
@@ -17,7 +17,7 @@
#include <device/pci.h>
#include <device/pci_ids.h>
#include <device/pci_ops.h>
-#include <delay.h>
+
#include "hudson.h"
static const unsigned short pci_device_ids[] = {
diff --git a/src/southbridge/amd/pi/hudson/imc.c b/src/southbridge/amd/pi/hudson/imc.c
index 461d7b41f8..9ea8172af5 100644
--- a/src/southbridge/amd/pi/hudson/imc.c
+++ b/src/southbridge/amd/pi/hudson/imc.c
@@ -19,7 +19,6 @@
#include <device/mmio.h>
#include <device/pci_ops.h>
#include <device/device.h>
-#include <delay.h>
#include <Porting.h>
#include <AGESA.h>
#include <Lib/amdlib.h>
diff --git a/src/southbridge/amd/pi/hudson/sata.c b/src/southbridge/amd/pi/hudson/sata.c
index 153fe6dea4..08e967dd8e 100644
--- a/src/southbridge/amd/pi/hudson/sata.c
+++ b/src/southbridge/amd/pi/hudson/sata.c
@@ -14,12 +14,11 @@
*/
#include <device/device.h>
-#include <delay.h>
#include <device/pci.h>
#include <device/pci_ids.h>
#include <device/pci_ops.h>
-#include "hudson.h"
+#include "hudson.h"
static void sata_init(struct device *dev)
{
diff --git a/src/southbridge/amd/pi/hudson/sd.c b/src/southbridge/amd/pi/hudson/sd.c
index c4193786aa..e4ace38f05 100644
--- a/src/southbridge/amd/pi/hudson/sd.c
+++ b/src/southbridge/amd/pi/hudson/sd.c
@@ -14,10 +14,10 @@
*/
#include <device/device.h>
-#include <delay.h>
#include <device/pci.h>
#include <device/pci_ids.h>
#include <device/pci_ops.h>
+
#include "hudson.h"
static void sd_init(struct device *dev)
diff --git a/src/southbridge/amd/pi/hudson/smihandler.c b/src/southbridge/amd/pi/hudson/smihandler.c
index a87b75da00..1b9442b1b6 100644
--- a/src/southbridge/amd/pi/hudson/smihandler.c
+++ b/src/southbridge/amd/pi/hudson/smihandler.c
@@ -19,12 +19,11 @@
*/
#include <arch/io.h>
+#include <cpu/x86/smm.h>
+
#include "hudson.h"
#include "smi.h"
-#include <cpu/x86/smm.h>
-#include <delay.h>
-
#define SMI_0x88_ACPI_COMMAND (1 << 11)
enum smi_source {
diff --git a/src/southbridge/intel/bd82x6x/early_pch.c b/src/southbridge/intel/bd82x6x/early_pch.c
index 23942feffb..88436213a0 100644
--- a/src/southbridge/intel/bd82x6x/early_pch.c
+++ b/src/southbridge/intel/bd82x6x/early_pch.c
@@ -18,12 +18,11 @@
#include <arch/cbfs.h>
#include <ip_checksum.h>
#include <device/pci_def.h>
-#include <delay.h>
-
-#include "pch.h"
/* For DMI bar. */
#include <northbridge/intel/sandybridge/sandybridge.h>
+#include "pch.h"
+
#define SOUTHBRIDGE PCI_DEV(0, 0x1f, 0)
static void
diff --git a/src/southbridge/intel/fsp_rangeley/soc.c b/src/southbridge/intel/fsp_rangeley/soc.c
index ec5cd073ed..ec66c430a9 100644
--- a/src/southbridge/intel/fsp_rangeley/soc.c
+++ b/src/southbridge/intel/fsp_rangeley/soc.c
@@ -17,10 +17,10 @@
*/
#include <console/console.h>
-#include <delay.h>
#include <device/device.h>
#include <device/pci.h>
#include <device/pci_ops.h>
+
#include "soc.h"
static int soc_revision_id = -1;
diff --git a/src/southbridge/intel/lynxpoint/azalia.c b/src/southbridge/intel/lynxpoint/azalia.c
index 2deb92976e..cb1c190b39 100644
--- a/src/southbridge/intel/lynxpoint/azalia.c
+++ b/src/southbridge/intel/lynxpoint/azalia.c
@@ -21,8 +21,8 @@
#include <device/pci_ids.h>
#include <device/pci_ops.h>
#include <device/mmio.h>
-#include <delay.h>
#include <device/azalia_device.h>
+
#include "pch.h"
#include "hda_verb.h"
diff --git a/src/southbridge/intel/lynxpoint/smihandler.c b/src/southbridge/intel/lynxpoint/smihandler.c
index bfa112a807..88c599f782 100644
--- a/src/southbridge/intel/lynxpoint/smihandler.c
+++ b/src/southbridge/intel/lynxpoint/smihandler.c
@@ -15,7 +15,6 @@
* GNU General Public License for more details.
*/
-#include <delay.h>
#include <types.h>
#include <arch/io.h>
#include <device/pci_ops.h>
@@ -29,12 +28,11 @@
#include <southbridge/intel/common/finalize.h>
#include <northbridge/intel/haswell/haswell.h>
#include <cpu/intel/haswell/haswell.h>
+
#include "me.h"
#include "pch.h"
-
#include "nvs.h"
-
static u8 smm_initialized = 0;
/* GNVS needs to be updated by an 0xEA PM Trap (B2) after it has been located
diff --git a/src/southbridge/nvidia/mcp55/early_setup_car.c b/src/southbridge/nvidia/mcp55/early_setup_car.c
index 3099a09599..09414af3de 100644
--- a/src/southbridge/nvidia/mcp55/early_setup_car.c
+++ b/src/southbridge/nvidia/mcp55/early_setup_car.c
@@ -16,6 +16,7 @@
*/
#include <arch/io.h>
+#include <delay.h>
#ifdef UNUSED_CODE
int set_ht_link_buffer_counts_chain(u8 ht_c_num, unsigned vendorid, unsigned val);
diff --git a/src/southbridge/nvidia/mcp55/sata.c b/src/southbridge/nvidia/mcp55/sata.c
index 4c2830e9be..27f60738b3 100644
--- a/src/southbridge/nvidia/mcp55/sata.c
+++ b/src/southbridge/nvidia/mcp55/sata.c
@@ -19,10 +19,10 @@
#include <console/console.h>
#include <device/device.h>
-#include <delay.h>
#include <device/pci.h>
#include <device/pci_ids.h>
#include <device/pci_ops.h>
+
#include "mcp55.h"
static void sata_init(struct device *dev)