diff options
author | Martin Roth <martinroth@google.com> | 2017-06-01 11:39:59 -0600 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2017-07-07 16:05:16 +0000 |
commit | 898a77521de97b1e4af9458b82bcc21bc7a6e799 (patch) | |
tree | 4565d11cc5bbed7729b580424006e1745dc0cfc9 /src/arch/x86/smbios.c | |
parent | 50bda05e46d5f34f6519a7814e843d1e777ecf10 (diff) |
arch/*: Update Kconfig symbol usage
- Update all symbols to use IS_ENABLED()
- Update non-romcc usage to use 'if' instead of '#if' where it
makes sense.
Change-Id: I5a84414d2d1631e35ac91efb67a0d4c1f673bf85
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/20005
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'src/arch/x86/smbios.c')
-rw-r--r-- | src/arch/x86/smbios.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/arch/x86/smbios.c b/src/arch/x86/smbios.c index 79279faa79..285027006e 100644 --- a/src/arch/x86/smbios.c +++ b/src/arch/x86/smbios.c @@ -29,7 +29,7 @@ #include <memory_info.h> #include <spd.h> #include <cbmem.h> -#if CONFIG_CHROMEOS +#if IS_ENABLED(CONFIG_CHROMEOS) #include <vendorcode/google/chromeos/gnvs.h> #endif @@ -309,22 +309,22 @@ static int smbios_write_type0(unsigned long *current, int handle) t->system_bios_major_release = 4; t->bios_characteristics = BIOS_CHARACTERISTICS_PCI_SUPPORTED | -#if CONFIG_CARDBUS_PLUGIN_SUPPORT - BIOS_CHARACTERISTICS_PC_CARD | -#endif BIOS_CHARACTERISTICS_SELECTABLE_BOOT | BIOS_CHARACTERISTICS_UPGRADEABLE; -#if CONFIG_HAVE_ACPI_TABLES - t->bios_characteristics_ext1 = BIOS_EXT1_CHARACTERISTICS_ACPI; -#endif + if (IS_ENABLED(CONFIG_CARDBUS_PLUGIN_SUPPORT)) + t->bios_characteristics |= BIOS_CHARACTERISTICS_PC_CARD; + + if (IS_ENABLED(CONFIG_HAVE_ACPI_TABLES)) + t->bios_characteristics_ext1 = BIOS_EXT1_CHARACTERISTICS_ACPI; + t->bios_characteristics_ext2 = BIOS_EXT2_CHARACTERISTICS_TARGET; len = t->length + smbios_string_table_len(t->eos); *current += len; return len; } -#if !CONFIG_SMBIOS_PROVIDED_BY_MOBO +#if !IS_ENABLED(CONFIG_SMBIOS_PROVIDED_BY_MOBO) const char *__attribute__((weak)) smbios_mainboard_serial_number(void) { @@ -623,10 +623,9 @@ unsigned long smbios_write_tables(unsigned long current) handle++)); update_max(len, max_struct_size, smbios_write_type11(¤t, &handle)); -#if CONFIG_ELOG - update_max(len, max_struct_size, elog_smbios_write_type15(¤t, - handle++)); -#endif + if (IS_ENABLED(CONFIG_ELOG)) + update_max(len, max_struct_size, + elog_smbios_write_type15(¤t,handle++)); update_max(len, max_struct_size, smbios_write_type17(¤t, &handle)); update_max(len, max_struct_size, smbios_write_type32(¤t, |