aboutsummaryrefslogtreecommitdiff
path: root/src/lib/hardwaremain.c
diff options
context:
space:
mode:
authorMartin Roth <martinroth@google.com>2017-06-24 14:16:38 -0600
committerMartin Roth <martinroth@google.com>2017-07-06 00:19:37 +0000
commit1bf55b4070bef2be8259f3153cade27121127b4a (patch)
tree01df7a81ffbc396d15d1d91ce0de0e54f59573b4 /src/lib/hardwaremain.c
parent5764cbbf91cf80c21f7e6b819526ebd074049551 (diff)
src/lib: add IS_ENABLED() around Kconfig symbol references
Some of these can be changed from #if to if(), but that will happen in a follow-on commmit. Change-Id: Idcea3f8b1a4246cb6b29999a84a191a3133e5c78 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/20341 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'src/lib/hardwaremain.c')
-rw-r--r--src/lib/hardwaremain.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/hardwaremain.c b/src/lib/hardwaremain.c
index a56d68e3f5..0deab4bd0b 100644
--- a/src/lib/hardwaremain.c
+++ b/src/lib/hardwaremain.c
@@ -33,7 +33,7 @@
#include <boot/tables.h>
#include <program_loading.h>
#include <lib.h>
-#if CONFIG_HAVE_ACPI_RESUME
+#if IS_ENABLED(CONFIG_HAVE_ACPI_RESUME)
#include <arch/acpi.h>
#endif
#include <timer.h>
@@ -82,7 +82,7 @@ struct boot_state {
boot_state_t (*run_state)(void *arg);
void *arg;
int complete : 1;
-#if CONFIG_HAVE_MONOTONIC_TIMER
+#if IS_ENABLED(CONFIG_HAVE_MONOTONIC_TIMER)
struct boot_state_times times;
#endif
};
@@ -180,7 +180,7 @@ static boot_state_t bs_post_device(void *arg)
static boot_state_t bs_os_resume_check(void *arg)
{
-#if CONFIG_HAVE_ACPI_RESUME
+#if IS_ENABLED(CONFIG_HAVE_ACPI_RESUME)
void *wake_vector;
wake_vector = acpi_find_wakeup_vector();
@@ -199,7 +199,7 @@ static boot_state_t bs_os_resume_check(void *arg)
static boot_state_t bs_os_resume(void *wake_vector)
{
-#if CONFIG_HAVE_ACPI_RESUME
+#if IS_ENABLED(CONFIG_HAVE_ACPI_RESUME)
arch_bootstate_coreboot_exit();
acpi_resume(wake_vector);
#endif
@@ -239,7 +239,7 @@ static boot_state_t bs_payload_boot(void *arg)
return BS_PAYLOAD_BOOT;
}
-#if CONFIG_HAVE_MONOTONIC_TIMER
+#if IS_ENABLED(CONFIG_HAVE_MONOTONIC_TIMER)
static void bs_sample_time(struct boot_state *state)
{
struct mono_time *mt;
@@ -268,7 +268,7 @@ static inline void bs_sample_time(struct boot_state *state) {}
static inline void bs_report_time(struct boot_state *state) {}
#endif
-#if CONFIG_TIMER_QUEUE
+#if IS_ENABLED(CONFIG_TIMER_QUEUE)
static void bs_run_timers(int drain)
{
/* Drain all timer callbacks until none are left, if directed.
@@ -473,7 +473,7 @@ void main(void)
post_code(POST_ENTRY_RAMSTAGE);
/* Handoff sleep type from romstage. */
-#if CONFIG_HAVE_ACPI_RESUME
+#if IS_ENABLED(CONFIG_HAVE_ACPI_RESUME)
acpi_is_wakeup();
#endif