aboutsummaryrefslogtreecommitdiff
path: root/src/lib/generic_sdram.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/generic_sdram.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/generic_sdram.c')
-rw-r--r--src/lib/generic_sdram.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/generic_sdram.c b/src/lib/generic_sdram.c
index 801ae61c32..6aa8d29962 100644
--- a/src/lib/generic_sdram.c
+++ b/src/lib/generic_sdram.c
@@ -1,7 +1,7 @@
#include <lib.h> /* Prototypes */
/* Setup SDRAM */
-#if CONFIG_RAMINIT_SYSINFO
+#if IS_ENABLED(CONFIG_RAMINIT_SYSINFO)
void sdram_initialize(int controllers, const struct mem_controller *ctrl,
void *sysinfo)
#else
@@ -13,7 +13,7 @@ void sdram_initialize(int controllers, const struct mem_controller *ctrl)
for (i = 0; i < controllers; i++) {
printk(BIOS_DEBUG, "Ram1.%02x\n", i);
- #if CONFIG_RAMINIT_SYSINFO
+ #if IS_ENABLED(CONFIG_RAMINIT_SYSINFO)
sdram_set_registers(ctrl + i, sysinfo);
#else
sdram_set_registers(ctrl + i);
@@ -24,7 +24,7 @@ void sdram_initialize(int controllers, const struct mem_controller *ctrl)
for (i = 0; i < controllers; i++) {
printk(BIOS_DEBUG, "Ram2.%02x\n", i);
- #if CONFIG_RAMINIT_SYSINFO
+ #if IS_ENABLED(CONFIG_RAMINIT_SYSINFO)
sdram_set_spd_registers(ctrl + i, sysinfo);
#else
sdram_set_spd_registers(ctrl + i);
@@ -38,7 +38,7 @@ void sdram_initialize(int controllers, const struct mem_controller *ctrl)
*/
printk(BIOS_DEBUG, "Ram3\n");
- #if CONFIG_RAMINIT_SYSINFO
+ #if IS_ENABLED(CONFIG_RAMINIT_SYSINFO)
sdram_enable(controllers, ctrl, sysinfo);
#else
sdram_enable(controllers, ctrl);