summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElyes HAOUAS <ehaouas@noos.fr>2019-03-21 09:55:49 +0100
committerNico Huber <nico.h@gmx.de>2019-04-06 16:02:49 +0000
commitadd76f91d5e6e18d5df52a9ad34906459f5f69e2 (patch)
tree4a561a339b0f7eeeaa20513a2706745dc649f5c7
parent2452c8414dca45d5e7e3006dc034d523c7ab06b2 (diff)
src: Use #include <timer.h> when appropriate
Also, extra-lines added or removed and local includes moved down. Change-Id: I5e739233f3742fd68d537f671642bb04886e3009 Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/32009 Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
-rw-r--r--src/commonlib/storage/sd.c2
-rw-r--r--src/commonlib/storage/sd_mmc.c4
-rw-r--r--src/commonlib/storage/sdhci_adma.c4
-rw-r--r--src/cpu/allwinner/a10/timer.c5
-rw-r--r--src/cpu/x86/mp_init.c1
-rw-r--r--src/drivers/i2c/tpm/tis.c5
-rw-r--r--src/lib/thread.c2
-rw-r--r--src/soc/cavium/cn81xx/include/soc/timer.h1
-rw-r--r--src/soc/intel/apollolake/pmutil.c2
-rw-r--r--src/soc/intel/cannonlake/pmutil.c2
-rw-r--r--src/soc/intel/cannonlake/reset.c1
-rw-r--r--src/soc/intel/common/block/systemagent/systemagent_early.c2
-rw-r--r--src/soc/intel/icelake/pmutil.c2
-rw-r--r--src/soc/intel/icelake/reset.c1
-rw-r--r--src/soc/intel/quark/storage_test.c1
-rw-r--r--src/soc/intel/skylake/pmutil.c2
-rw-r--r--src/soc/intel/skylake/reset.c1
-rw-r--r--src/soc/mediatek/common/include/soc/pmic_wrap_common.h1
-rw-r--r--src/soc/mediatek/common/include/soc/rtc_common.h1
-rw-r--r--src/soc/mediatek/common/pmic_wrap.c1
-rw-r--r--src/soc/mediatek/common/rtc.c1
-rw-r--r--src/soc/mediatek/mt8183/pmic_wrap.c1
-rw-r--r--src/soc/nvidia/tegra210/romstage.c1
-rw-r--r--src/soc/nvidia/tegra210/soc.c1
-rw-r--r--src/soc/nvidia/tegra210/spi.c2
-rw-r--r--src/soc/qualcomm/ipq40xx/blobs_init.c2
-rw-r--r--src/soc/qualcomm/sdm845/clock.c2
-rw-r--r--src/soc/qualcomm/sdm845/gpio.c2
-rw-r--r--src/soc/samsung/exynos5420/dp.c1
-rw-r--r--src/soc/samsung/exynos5420/dp_lowlevel.c1
-rw-r--r--src/soc/samsung/exynos5420/fimd.c1
31 files changed, 21 insertions, 35 deletions
diff --git a/src/commonlib/storage/sd.c b/src/commonlib/storage/sd.c
index 1389ffb409..2e1ae85f06 100644
--- a/src/commonlib/storage/sd.c
+++ b/src/commonlib/storage/sd.c
@@ -24,9 +24,9 @@
#include <commonlib/storage.h>
#include <delay.h>
#include <endian.h>
+
#include "sd_mmc.h"
#include "storage.h"
-#include <timer.h>
int sd_send_if_cond(struct storage_media *media)
{
diff --git a/src/commonlib/storage/sd_mmc.c b/src/commonlib/storage/sd_mmc.c
index bda8d7470c..fd59bd0b6f 100644
--- a/src/commonlib/storage/sd_mmc.c
+++ b/src/commonlib/storage/sd_mmc.c
@@ -24,11 +24,11 @@
#include <commonlib/storage.h>
#include <delay.h>
#include <endian.h>
+#include <string.h>
+
#include "mmc.h"
#include "sd_mmc.h"
#include "storage.h"
-#include <string.h>
-#include <timer.h>
uint64_t sd_mmc_extract_uint32_bits(const uint32_t *array, int start, int count)
{
diff --git a/src/commonlib/storage/sdhci_adma.c b/src/commonlib/storage/sdhci_adma.c
index e95742b35b..1bae3fbff2 100644
--- a/src/commonlib/storage/sdhci_adma.c
+++ b/src/commonlib/storage/sdhci_adma.c
@@ -22,11 +22,11 @@
#include <commonlib/storage.h>
#include <delay.h>
#include <endian.h>
+#include <string.h>
+
#include "sdhci.h"
#include "sd_mmc.h"
#include "storage.h"
-#include <string.h>
-#include <timer.h>
static void sdhci_alloc_adma_descs(struct sdhci_ctrlr *sdhci_ctrlr,
u32 need_descriptors)
diff --git a/src/cpu/allwinner/a10/timer.c b/src/cpu/allwinner/a10/timer.c
index c91d492171..87228a06d4 100644
--- a/src/cpu/allwinner/a10/timer.c
+++ b/src/cpu/allwinner/a10/timer.c
@@ -17,11 +17,10 @@
*
*/
-#include "timer.h"
-
#include <device/mmio.h>
#include <delay.h>
-#include <timer.h>
+
+#include "timer.h"
struct a1x_timer_module *const timer_module = (void *)A1X_TIMER_BASE;
struct a1x_timer *const tmr0 =
diff --git a/src/cpu/x86/mp_init.c b/src/cpu/x86/mp_init.c
index 138f194ee2..9d51b3e8b5 100644
--- a/src/cpu/x86/mp_init.c
+++ b/src/cpu/x86/mp_init.c
@@ -36,6 +36,7 @@
#include <smp/atomic.h>
#include <smp/spinlock.h>
#include <symbols.h>
+#include <timer.h>
#include <thread.h>
#define MAX_APIC_IDS 256
diff --git a/src/drivers/i2c/tpm/tis.c b/src/drivers/i2c/tpm/tis.c
index 92c89211df..fd56adefcc 100644
--- a/src/drivers/i2c/tpm/tis.c
+++ b/src/drivers/i2c/tpm/tis.c
@@ -18,15 +18,14 @@
#include <string.h>
#include <assert.h>
#include <commonlib/endian.h>
+#include <console/console.h>
#include <delay.h>
#include <device/i2c_simple.h>
#include <endian.h>
#include <lib.h>
#include <security/tpm/tis.h>
-#include "tpm.h"
-#include <timer.h>
-#include <console/console.h>
+#include "tpm.h"
/* global structure for tpm chip data */
static struct tpm_chip g_chip CAR_GLOBAL;
diff --git a/src/lib/thread.c b/src/lib/thread.c
index 57a0f8c185..281885ff9b 100644
--- a/src/lib/thread.c
+++ b/src/lib/thread.c
@@ -12,6 +12,7 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
+
#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>
@@ -19,6 +20,7 @@
#include <bootstate.h>
#include <console/console.h>
#include <thread.h>
+#include <timer.h>
static void idle_thread_init(void);
diff --git a/src/soc/cavium/cn81xx/include/soc/timer.h b/src/soc/cavium/cn81xx/include/soc/timer.h
index 4507b0b49f..5c4cbd2ce3 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 <timer.h>
#include <delay.h>
/* Watchdog functions */
diff --git a/src/soc/intel/apollolake/pmutil.c b/src/soc/intel/apollolake/pmutil.c
index e766c77f3f..22f53094a1 100644
--- a/src/soc/intel/apollolake/pmutil.c
+++ b/src/soc/intel/apollolake/pmutil.c
@@ -35,8 +35,8 @@
#include <soc/pci_devs.h>
#include <soc/pm.h>
#include <soc/smbus.h>
-#include <timer.h>
#include <security/vboot/vbnv.h>
+
#include "chip.h"
static uintptr_t read_pmc_mmio_bar(void)
diff --git a/src/soc/intel/cannonlake/pmutil.c b/src/soc/intel/cannonlake/pmutil.c
index 310a0c69d7..ab36c70c10 100644
--- a/src/soc/intel/cannonlake/pmutil.c
+++ b/src/soc/intel/cannonlake/pmutil.c
@@ -38,8 +38,8 @@
#include <soc/pci_devs.h>
#include <soc/pm.h>
#include <soc/smbus.h>
-#include <timer.h>
#include <security/vboot/vbnv.h>
+
#include "chip.h"
/*
diff --git a/src/soc/intel/cannonlake/reset.c b/src/soc/intel/cannonlake/reset.c
index a6f8092908..e92396f39a 100644
--- a/src/soc/intel/cannonlake/reset.c
+++ b/src/soc/intel/cannonlake/reset.c
@@ -20,7 +20,6 @@
#include <fsp/util.h>
#include <soc/intel/common/reset.h>
#include <string.h>
-#include <timer.h>
#include <soc/pci_devs.h>
/* Reset Request */
diff --git a/src/soc/intel/common/block/systemagent/systemagent_early.c b/src/soc/intel/common/block/systemagent/systemagent_early.c
index 93fa5df9c9..a3e278f3f7 100644
--- a/src/soc/intel/common/block/systemagent/systemagent_early.c
+++ b/src/soc/intel/common/block/systemagent/systemagent_early.c
@@ -22,8 +22,8 @@
#include <soc/iomap.h>
#include <soc/pci_devs.h>
#include <soc/systemagent.h>
+
#include "systemagent_def.h"
-#include <timer.h>
#if !ENV_RAMSTAGE
void bootblock_systemagent_early_init(void)
diff --git a/src/soc/intel/icelake/pmutil.c b/src/soc/intel/icelake/pmutil.c
index fa2411ddd2..96ff52d122 100644
--- a/src/soc/intel/icelake/pmutil.c
+++ b/src/soc/intel/icelake/pmutil.c
@@ -37,8 +37,8 @@
#include <soc/pci_devs.h>
#include <soc/pm.h>
#include <soc/smbus.h>
-#include <timer.h>
#include <security/vboot/vbnv.h>
+
#include "chip.h"
/*
diff --git a/src/soc/intel/icelake/reset.c b/src/soc/intel/icelake/reset.c
index 854723ca07..470b5f4fde 100644
--- a/src/soc/intel/icelake/reset.c
+++ b/src/soc/intel/icelake/reset.c
@@ -20,7 +20,6 @@
#include <fsp/util.h>
#include <soc/intel/common/reset.h>
#include <string.h>
-#include <timer.h>
#include <soc/pci_devs.h>
/* Reset Request */
diff --git a/src/soc/intel/quark/storage_test.c b/src/soc/intel/quark/storage_test.c
index 79901f29ff..bdf86b1f12 100644
--- a/src/soc/intel/quark/storage_test.c
+++ b/src/soc/intel/quark/storage_test.c
@@ -25,6 +25,7 @@
#include <soc/iomap.h>
#include <soc/pci_devs.h>
#include <soc/storage_test.h>
+#include <timer.h>
#include <string.h>
#if CONFIG(STORAGE_LOG)
diff --git a/src/soc/intel/skylake/pmutil.c b/src/soc/intel/skylake/pmutil.c
index b517e6d6a9..7d0dc0adb8 100644
--- a/src/soc/intel/skylake/pmutil.c
+++ b/src/soc/intel/skylake/pmutil.c
@@ -37,8 +37,8 @@
#include <soc/pm.h>
#include <soc/pmc.h>
#include <soc/smbus.h>
-#include <timer.h>
#include <security/vboot/vbnv.h>
+
#include "chip.h"
/*
diff --git a/src/soc/intel/skylake/reset.c b/src/soc/intel/skylake/reset.c
index f73563e05e..ff1a959194 100644
--- a/src/soc/intel/skylake/reset.c
+++ b/src/soc/intel/skylake/reset.c
@@ -20,7 +20,6 @@
#include <soc/intel/common/reset.h>
#include <soc/me.h>
#include <soc/pm.h>
-#include <timer.h>
static void do_force_global_reset(void)
{
diff --git a/src/soc/mediatek/common/include/soc/pmic_wrap_common.h b/src/soc/mediatek/common/include/soc/pmic_wrap_common.h
index bf0b7520ed..0b9f2d3860 100644
--- a/src/soc/mediatek/common/include/soc/pmic_wrap_common.h
+++ b/src/soc/mediatek/common/include/soc/pmic_wrap_common.h
@@ -17,7 +17,6 @@
#define SOC_MEDIATEK_PMIC_WRAP_COMMON_H
#include <console/console.h>
-#include <timer.h>
#define PWRAPTAG "[PWRAP] "
#define pwrap_err(fmt, arg ...) printk(BIOS_ERR, PWRAPTAG "ERROR,line=%d" fmt, \
diff --git a/src/soc/mediatek/common/include/soc/rtc_common.h b/src/soc/mediatek/common/include/soc/rtc_common.h
index e3c231bfc4..11c2f5fb2f 100644
--- a/src/soc/mediatek/common/include/soc/rtc_common.h
+++ b/src/soc/mediatek/common/include/soc/rtc_common.h
@@ -21,7 +21,6 @@
#include <console/console.h>
#include <delay.h>
#include <rtc.h>
-#include <timer.h>
#include <soc/pmic_wrap_common.h>
#define RTCTAG "[RTC]"
diff --git a/src/soc/mediatek/common/pmic_wrap.c b/src/soc/mediatek/common/pmic_wrap.c
index 9e1163b64a..1b8bc5d3a0 100644
--- a/src/soc/mediatek/common/pmic_wrap.c
+++ b/src/soc/mediatek/common/pmic_wrap.c
@@ -16,6 +16,7 @@
#include <device/mmio.h>
#include <assert.h>
#include <soc/pmic_wrap.h>
+#include <timer.h>
u32 wait_for_state_idle(u32 timeout_us, void *wacs_register,
void *wacs_vldclr_register, u32 *read_reg)
diff --git a/src/soc/mediatek/common/rtc.c b/src/soc/mediatek/common/rtc.c
index 3b1a600c15..2fe024a568 100644
--- a/src/soc/mediatek/common/rtc.c
+++ b/src/soc/mediatek/common/rtc.c
@@ -16,6 +16,7 @@
#include <soc/rtc_common.h>
#include <soc/rtc.h>
#include <soc/pmic_wrap.h>
+#include <timer.h>
/* ensure rtc write success */
int rtc_busy_wait(void)
diff --git a/src/soc/mediatek/mt8183/pmic_wrap.c b/src/soc/mediatek/mt8183/pmic_wrap.c
index 2593b7a6d2..65584ab8a7 100644
--- a/src/soc/mediatek/mt8183/pmic_wrap.c
+++ b/src/soc/mediatek/mt8183/pmic_wrap.c
@@ -17,6 +17,7 @@
#include <soc/infracfg.h>
#include <soc/pll.h>
#include <soc/pmic_wrap.h>
+#include <timer.h>
#define PRIORITY_FIELD(x) ((x % 4) * 8)
#define PRIORITY_IN(id, priority) (id << PRIORITY_FIELD(priority))
diff --git a/src/soc/nvidia/tegra210/romstage.c b/src/soc/nvidia/tegra210/romstage.c
index bfa3c0afb4..3bd1a5b1da 100644
--- a/src/soc/nvidia/tegra210/romstage.c
+++ b/src/soc/nvidia/tegra210/romstage.c
@@ -28,7 +28,6 @@
#include <soc/romstage.h>
#include <soc/nvidia/tegra/apbmisc.h>
#include <symbols.h>
-#include <timer.h>
#include <vendorcode/google/chromeos/chromeos.h>
void __weak romstage_mainboard_init(void)
diff --git a/src/soc/nvidia/tegra210/soc.c b/src/soc/nvidia/tegra210/soc.c
index c013099742..cedcc18094 100644
--- a/src/soc/nvidia/tegra210/soc.c
+++ b/src/soc/nvidia/tegra210/soc.c
@@ -26,7 +26,6 @@
#include <soc/cpu.h>
#include <soc/mc.h>
#include <soc/nvidia/tegra/apbmisc.h>
-#include <timer.h>
#include <soc/sdram.h>
#include <soc/sdram_configs.h>
diff --git a/src/soc/nvidia/tegra210/spi.c b/src/soc/nvidia/tegra210/spi.c
index 6542df19c1..edb052df6b 100644
--- a/src/soc/nvidia/tegra210/spi.c
+++ b/src/soc/nvidia/tegra210/spi.c
@@ -29,8 +29,6 @@
#include <stdint.h>
#include <stdlib.h>
#include <symbols.h>
-#include <timer.h>
-
#if defined(CONFIG_DEBUG_SPI) && CONFIG_DEBUG_SPI
# define DEBUG_SPI(x,...) printk(BIOS_DEBUG, "TEGRA_SPI: " x)
diff --git a/src/soc/qualcomm/ipq40xx/blobs_init.c b/src/soc/qualcomm/ipq40xx/blobs_init.c
index 761b5714ed..5cda9fc7fb 100644
--- a/src/soc/qualcomm/ipq40xx/blobs_init.c
+++ b/src/soc/qualcomm/ipq40xx/blobs_init.c
@@ -19,9 +19,7 @@
#include <cbfs.h>
#include <console/console.h>
#include <string.h>
-#include <timer.h>
#include <program_loading.h>
-
#include <soc/iomap.h>
#include <soc/soc_services.h>
diff --git a/src/soc/qualcomm/sdm845/clock.c b/src/soc/qualcomm/sdm845/clock.c
index bdbcfb827e..5f0c305046 100644
--- a/src/soc/qualcomm/sdm845/clock.c
+++ b/src/soc/qualcomm/sdm845/clock.c
@@ -17,10 +17,8 @@
#include <types.h>
#include <console/console.h>
#include <delay.h>
-#include <timer.h>
#include <commonlib/helpers.h>
#include <assert.h>
-
#include <soc/clock.h>
#define DIV(div) (2*div - 1)
diff --git a/src/soc/qualcomm/sdm845/gpio.c b/src/soc/qualcomm/sdm845/gpio.c
index a2a6fb9959..afa461dabd 100644
--- a/src/soc/qualcomm/sdm845/gpio.c
+++ b/src/soc/qualcomm/sdm845/gpio.c
@@ -16,8 +16,6 @@
#include <device/mmio.h>
#include <types.h>
#include <delay.h>
-#include <timer.h>
-
#include <gpio.h>
void gpio_configure(gpio_t gpio, uint32_t func, uint32_t pull,
diff --git a/src/soc/samsung/exynos5420/dp.c b/src/soc/samsung/exynos5420/dp.c
index 190842e3cd..5ad3dd3e77 100644
--- a/src/soc/samsung/exynos5420/dp.c
+++ b/src/soc/samsung/exynos5420/dp.c
@@ -23,7 +23,6 @@
#include <soc/sysreg.h>
#include <stdlib.h>
#include <string.h>
-#include <timer.h>
/*
* Here is the rough outline of how we bring up the display:
diff --git a/src/soc/samsung/exynos5420/dp_lowlevel.c b/src/soc/samsung/exynos5420/dp_lowlevel.c
index 538165706c..164704bb8a 100644
--- a/src/soc/samsung/exynos5420/dp_lowlevel.c
+++ b/src/soc/samsung/exynos5420/dp_lowlevel.c
@@ -23,7 +23,6 @@
#include <soc/power.h>
#include <soc/sysreg.h>
#include <stdlib.h>
-#include <timer.h>
/* FIXME: I think the DP controller shouldn't be hardcoded here... */
static struct exynos_dp * const dp_regs = (void *)EXYNOS5_DP1_BASE;
diff --git a/src/soc/samsung/exynos5420/fimd.c b/src/soc/samsung/exynos5420/fimd.c
index 29875983ff..6b69f18cc7 100644
--- a/src/soc/samsung/exynos5420/fimd.c
+++ b/src/soc/samsung/exynos5420/fimd.c
@@ -24,7 +24,6 @@
#include <soc/fimd.h>
#include <soc/periph.h>
#include <soc/sysreg.h>
-#include <timer.h>
/* fairly useful debugging stuff. */
#if 0