summaryrefslogtreecommitdiff
path: root/src/soc
diff options
context:
space:
mode:
authorRob Barnes <robbarnes@google.com>2022-09-12 06:31:47 -0600
committerFelix Held <felix-coreboot@felixheld.de>2022-09-14 11:55:39 +0000
commitd522f38c7bfccdc4af71bcad133aec20096f3f6c (patch)
tree28824b7b1bb659fffc6d1b8cb793f98f93f53c89 /src/soc
parent51249d6bed93f25569a35fa184038cafddc0dec0 (diff)
timer: Change timer util functions to 64-bit
Since mono_time is now 64-bit, the utility functions interfacing with mono_time should also be 64-bit so precision isn't lost. Fixed build errors related to printing the now int64_t result of stopwatch_duration_[m|u]secs in various places. BUG=b:237082996 BRANCH=All TEST=Boot dewatt Change-Id: I169588f5e14285557f2d03270f58f4c07c0154d5 Signed-off-by: Rob Barnes <robbarnes@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/66170 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Werner Zeh <werner.zeh@siemens.com> Reviewed-by: Raul Rangel <rrangel@chromium.org> Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Diffstat (limited to 'src/soc')
-rw-r--r--src/soc/amd/common/block/smu/smu.c2
-rw-r--r--src/soc/intel/apollolake/chip.c2
-rw-r--r--src/soc/intel/apollolake/reset.c2
-rw-r--r--src/soc/intel/apollolake/xdci.c2
-rw-r--r--src/soc/intel/common/block/cse/cse.c4
-rw-r--r--src/soc/intel/elkhartlake/tsn_gbe.c2
-rw-r--r--src/soc/mediatek/common/mcu.c2
-rw-r--r--src/soc/mediatek/common/memory.c8
-rw-r--r--src/soc/mediatek/common/mt6359p.c2
-rw-r--r--src/soc/mediatek/common/spm.c2
-rw-r--r--src/soc/mediatek/mt8183/spm.c4
-rw-r--r--src/soc/nvidia/tegra210/ccplex.c2
-rw-r--r--src/soc/samsung/exynos5250/fb.c2
13 files changed, 18 insertions, 18 deletions
diff --git a/src/soc/amd/common/block/smu/smu.c b/src/soc/amd/common/block/smu/smu.c
index d68867cae9..a44ff067c8 100644
--- a/src/soc/amd/common/block/smu/smu.c
+++ b/src/soc/amd/common/block/smu/smu.c
@@ -23,7 +23,7 @@ static int32_t smu_poll_response(bool print_command_duration)
result = smn_read32(SMN_SMU_MESG_RESP);
if (result) {
if (print_command_duration)
- printk(BIOS_SPEW, "SMU command consumed %ld usecs\n",
+ printk(BIOS_SPEW, "SMU command consumed %lld usecs\n",
stopwatch_duration_usecs(&sw));
return result;
}
diff --git a/src/soc/intel/apollolake/chip.c b/src/soc/intel/apollolake/chip.c
index bbf0564906..da2d00adb7 100644
--- a/src/soc/intel/apollolake/chip.c
+++ b/src/soc/intel/apollolake/chip.c
@@ -800,7 +800,7 @@ static void configure_xhci_host_mode_port0(void)
}
}
- printk(BIOS_INFO, "xHCI port 0 host switch over took %lu ms\n",
+ printk(BIOS_INFO, "xHCI port 0 host switch over took %lld ms\n",
stopwatch_duration_msecs(&sw));
}
diff --git a/src/soc/intel/apollolake/reset.c b/src/soc/intel/apollolake/reset.c
index 186a546388..25b5bdef6c 100644
--- a/src/soc/intel/apollolake/reset.c
+++ b/src/soc/intel/apollolake/reset.c
@@ -44,5 +44,5 @@ void cf9_reset_prepare(void)
}
mdelay(1);
}
- printk(BIOS_SPEW, "CSE took %lu ms\n", stopwatch_duration_msecs(&sw));
+ printk(BIOS_SPEW, "CSE took %lld ms\n", stopwatch_duration_msecs(&sw));
}
diff --git a/src/soc/intel/apollolake/xdci.c b/src/soc/intel/apollolake/xdci.c
index 5903e34bcc..086bbfd458 100644
--- a/src/soc/intel/apollolake/xdci.c
+++ b/src/soc/intel/apollolake/xdci.c
@@ -67,7 +67,7 @@ static void configure_host_mode_port0(struct device *dev)
}
}
- printk(BIOS_INFO, "XDCI port 0 host switch over took %lu ms\n",
+ printk(BIOS_INFO, "XDCI port 0 host switch over took %lld ms\n",
stopwatch_duration_msecs(&sw));
}
diff --git a/src/soc/intel/common/block/cse/cse.c b/src/soc/intel/common/block/cse/cse.c
index a68c98261f..1e223c72a2 100644
--- a/src/soc/intel/common/block/cse/cse.c
+++ b/src/soc/intel/common/block/cse/cse.c
@@ -315,7 +315,7 @@ uint8_t cse_wait_sec_override_mode(void)
return 0;
}
}
- printk(BIOS_DEBUG, "HECI: CSE took %lu ms to enter security override mode\n",
+ printk(BIOS_DEBUG, "HECI: CSE took %lld ms to enter security override mode\n",
stopwatch_duration_msecs(&sw));
return 1;
}
@@ -335,7 +335,7 @@ uint8_t cse_wait_com_soft_temp_disable(void)
return 0;
}
}
- printk(BIOS_SPEW, "HECI: CSE took %lu ms to boot from RO\n",
+ printk(BIOS_SPEW, "HECI: CSE took %lld ms to boot from RO\n",
stopwatch_duration_msecs(&sw));
return 1;
}
diff --git a/src/soc/intel/elkhartlake/tsn_gbe.c b/src/soc/intel/elkhartlake/tsn_gbe.c
index 50e9e16999..ea2ef0e5c7 100644
--- a/src/soc/intel/elkhartlake/tsn_gbe.c
+++ b/src/soc/intel/elkhartlake/tsn_gbe.c
@@ -39,7 +39,7 @@ enum cb_err phy_gmii_ready(void *base)
} while (!stopwatch_expired(&sw));
- printk(BIOS_ERR, "%s Timeout after %ld msec\n", __func__,
+ printk(BIOS_ERR, "%s Timeout after %lld msec\n", __func__,
stopwatch_duration_msecs(&sw));
return CB_ERR;
}
diff --git a/src/soc/mediatek/common/mcu.c b/src/soc/mediatek/common/mcu.c
index d0a1107548..42b312449f 100644
--- a/src/soc/mediatek/common/mcu.c
+++ b/src/soc/mediatek/common/mcu.c
@@ -31,7 +31,7 @@ int mtk_init_mcu(struct mtk_mcu *mcu)
if (mcu->reset)
mcu->reset(mcu);
- printk(BIOS_DEBUG, "%s: Loaded (and reset) %s in %ld msecs (%zd bytes)\n",
+ printk(BIOS_DEBUG, "%s: Loaded (and reset) %s in %lld msecs (%zd bytes)\n",
__func__, mcu->firmware_name, stopwatch_duration_msecs(&sw), mcu->run_size);
return CB_SUCCESS;
diff --git a/src/soc/mediatek/common/memory.c b/src/soc/mediatek/common/memory.c
index f3f784e121..e4207222b0 100644
--- a/src/soc/mediatek/common/memory.c
+++ b/src/soc/mediatek/common/memory.c
@@ -265,7 +265,7 @@ static void mt_mem_init_run(struct dramc_param *dparam,
ret = dram_run_fast_calibration(dparam);
if (ret != 0) {
printk(BIOS_ERR, "DRAM-K: Failed to run fast calibration "
- "in %ld msecs, error: %d\n",
+ "in %lld msecs, error: %d\n",
stopwatch_duration_msecs(&sw), ret);
/* Erase flash data after fast calibration failed */
@@ -274,7 +274,7 @@ static void mt_mem_init_run(struct dramc_param *dparam,
DRAMC_PARAM_HEADER_VERSION,
dparam, mrc_cache_size);
} else {
- printk(BIOS_INFO, "DRAM-K: Fast calibration passed in %ld msecs\n",
+ printk(BIOS_INFO, "DRAM-K: Fast calibration passed in %lld msecs\n",
stopwatch_duration_msecs(&sw));
return;
}
@@ -290,13 +290,13 @@ static void mt_mem_init_run(struct dramc_param *dparam,
stopwatch_init(&sw);
int err = dram_run_full_calibration(dparam);
if (err == 0) {
- printk(BIOS_INFO, "DRAM-K: Full calibration passed in %ld msecs\n",
+ printk(BIOS_INFO, "DRAM-K: Full calibration passed in %lld msecs\n",
stopwatch_duration_msecs(&sw));
mrc_cache_stash_data(MRC_TRAINING_DATA,
DRAMC_PARAM_HEADER_VERSION,
dparam, mrc_cache_size);
} else {
- printk(BIOS_ERR, "DRAM-K: Full calibration failed in %ld msecs\n",
+ printk(BIOS_ERR, "DRAM-K: Full calibration failed in %lld msecs\n",
stopwatch_duration_msecs(&sw));
}
}
diff --git a/src/soc/mediatek/common/mt6359p.c b/src/soc/mediatek/common/mt6359p.c
index 580079ef47..de22b3e85d 100644
--- a/src/soc/mediatek/common/mt6359p.c
+++ b/src/soc/mediatek/common/mt6359p.c
@@ -141,7 +141,7 @@ static void pmic_efuse_setting(void)
mt6359p_write(PMIC_BUCK_VPA_DLC_CON1, 0x800);
}
- printk(BIOS_DEBUG, "%s: Set efuses in %ld msecs\n",
+ printk(BIOS_DEBUG, "%s: Set efuses in %lld msecs\n",
__func__, stopwatch_duration_msecs(&sw));
}
diff --git a/src/soc/mediatek/common/spm.c b/src/soc/mediatek/common/spm.c
index 71cad48d19..e39f3da56c 100644
--- a/src/soc/mediatek/common/spm.c
+++ b/src/soc/mediatek/common/spm.c
@@ -209,7 +209,7 @@ int spm_init(void)
return -1;
}
- printk(BIOS_INFO, "SPM: %s done in %ld msecs, spm pc = %#x\n",
+ printk(BIOS_INFO, "SPM: %s done in %lld msecs, spm pc = %#x\n",
__func__, stopwatch_duration_msecs(&sw),
read32(&mtk_spm->md32pcm_pc));
diff --git a/src/soc/mediatek/mt8183/spm.c b/src/soc/mediatek/mt8183/spm.c
index e35fc57e2f..5fba84de65 100644
--- a/src/soc/mediatek/mt8183/spm.c
+++ b/src/soc/mediatek/mt8183/spm.c
@@ -264,7 +264,7 @@ static int spm_load_firmware(enum dyna_load_pcm_index index,
assert(offset < file_size);
printk(BIOS_DEBUG, "SPM: version = %s\n", spm_bin + offset);
- printk(BIOS_INFO, "SPM binary loaded in %ld msecs\n",
+ printk(BIOS_INFO, "SPM binary loaded in %lld msecs\n",
stopwatch_duration_msecs(&sw));
return 0;
@@ -330,7 +330,7 @@ int spm_init(void)
spm_init_event_vector(pcmdesc);
spm_kick_pcm_to_run();
- printk(BIOS_INFO, "SPM: %s done in %ld msecs\n", __func__,
+ printk(BIOS_INFO, "SPM: %s done in %lld msecs\n", __func__,
stopwatch_duration_msecs(&sw));
return 0;
diff --git a/src/soc/nvidia/tegra210/ccplex.c b/src/soc/nvidia/tegra210/ccplex.c
index 0bc8fe99e3..b26eb8ea09 100644
--- a/src/soc/nvidia/tegra210/ccplex.c
+++ b/src/soc/nvidia/tegra210/ccplex.c
@@ -64,7 +64,7 @@ static void request_ram_repair(void)
while ((read32(&flow->ram_repair) & sts) != sts)
;
- printk(BIOS_DEBUG, "RAM repair complete in %ld usecs.\n",
+ printk(BIOS_DEBUG, "RAM repair complete in %lld usecs.\n",
stopwatch_duration_usecs(&sw));
}
diff --git a/src/soc/samsung/exynos5250/fb.c b/src/soc/samsung/exynos5250/fb.c
index 9166b02cad..1fc926a7e1 100644
--- a/src/soc/samsung/exynos5250/fb.c
+++ b/src/soc/samsung/exynos5250/fb.c
@@ -174,7 +174,7 @@ static int s5p_dp_config_video(struct s5p_dp_device *dp,
} while (!stopwatch_expired(&sw));
if (!timeout) {
- printk(BIOS_ERR, "Video Clock Not ok after %ldus.\n",
+ printk(BIOS_ERR, "Video Clock Not ok after %lldus.\n",
stopwatch_duration_usecs(&sw));
return -ERR_VIDEO_CLOCK_BAD;
}