summaryrefslogtreecommitdiffstats
path: root/common/board_f.c
diff options
context:
space:
mode:
authorOvidiu Panait <ovidiu.panait@windriver.com>2020-11-28 10:43:05 +0200
committerTom Rini <trini@konsulko.com>2021-01-15 14:36:11 -0500
commit4b9a121fc6fa211a33b693851f55b60954635fce (patch)
treed7586db2fb58f033ed96bd323083519244e5b0f1 /common/board_f.c
parent8e8d45ee0209f5362b40218bcc5ae172b214042e (diff)
downloadu-boot-4b9a121fc6fa211a33b693851f55b60954635fce.tar.gz
u-boot-4b9a121fc6fa211a33b693851f55b60954635fce.tar.xz
u-boot-4b9a121fc6fa211a33b693851f55b60954635fce.zip
common: board_f: Use IS_ENABLED(CONFIG_TIMER_EARLY) in initf_dm
Use IS_ENABLED(CONFIG_TIMER_EARLY) instead of #ifdef in initf_dm. Also, move timer code to the main ifdef, so that ret is defined. Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common/board_f.c')
-rw-r--r--common/board_f.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/common/board_f.c b/common/board_f.c
index 552552e328..3c4437341a 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -775,11 +775,12 @@ static int initf_dm(void)
bootstage_accum(BOOTSTAGE_ID_ACCUM_DM_F);
if (ret)
return ret;
-#endif
-#ifdef CONFIG_TIMER_EARLY
- ret = dm_timer_init();
- if (ret)
- return ret;
+
+ if (IS_ENABLED(CONFIG_TIMER_EARLY)) {
+ ret = dm_timer_init();
+ if (ret)
+ return ret;
+ }
#endif
return 0;