Clean up use of CONFIG_ variables in coreboot_table.c

CONFIG_ variables are used inconsistently within the file
src/arch/x86/boot/coreboot_table.c. #ifdef will do the wrong
thing if the option is disabled. #if (CONFIG_FOO == 1) is
not needed.

Change-Id: Ifcac6ceac5fb34b931281beae500023597b3533b
Signed-off-by: Stefan Reinauer <reinauer@google.com>
Reviewed-on: http://review.coreboot.org/701
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Tested-by: build bot (Jenkins)
This commit is contained in:
Stefan Reinauer 2011-08-15 11:26:35 -07:00 committed by Stefan Reinauer
parent 526087172d
commit c75bfde967
1 changed files with 7 additions and 7 deletions

View File

@ -29,7 +29,7 @@
#include <version.h> #include <version.h>
#include <device/device.h> #include <device/device.h>
#include <stdlib.h> #include <stdlib.h>
#if (CONFIG_USE_OPTION_TABLE == 1) #if CONFIG_USE_OPTION_TABLE
#include <option_table.h> #include <option_table.h>
#include <cbfs.h> #include <cbfs.h>
#endif #endif
@ -198,7 +198,7 @@ static struct lb_mainboard *lb_mainboard(struct lb_header *header)
return mainboard; return mainboard;
} }
#if (CONFIG_USE_OPTION_TABLE == 1) #if CONFIG_USE_OPTION_TABLE
static struct cmos_checksum *lb_cmos_checksum(struct lb_header *header) static struct cmos_checksum *lb_cmos_checksum(struct lb_header *header)
{ {
struct lb_record *rec; struct lb_record *rec;
@ -512,7 +512,7 @@ static void add_lb_reserved(struct lb_memory *mem)
lb_add_rsvd_range, mem); lb_add_rsvd_range, mem);
} }
#if CONFIG_WRITE_HIGH_TABLES == 1 #if CONFIG_WRITE_HIGH_TABLES
extern uint64_t high_tables_base, high_tables_size; extern uint64_t high_tables_base, high_tables_size;
#endif #endif
@ -523,7 +523,7 @@ unsigned long write_coreboot_table(
struct lb_header *head; struct lb_header *head;
struct lb_memory *mem; struct lb_memory *mem;
#if CONFIG_WRITE_HIGH_TABLES == 1 #if CONFIG_WRITE_HIGH_TABLES
printk(BIOS_DEBUG, "Writing high table forward entry at 0x%08lx\n", printk(BIOS_DEBUG, "Writing high table forward entry at 0x%08lx\n",
low_table_end); low_table_end);
head = lb_table_init(low_table_end); head = lb_table_init(low_table_end);
@ -559,7 +559,7 @@ unsigned long write_coreboot_table(
rom_table_end &= ~0xffff; rom_table_end &= ~0xffff;
printk(BIOS_DEBUG, "0x%08lx \n", rom_table_end); printk(BIOS_DEBUG, "0x%08lx \n", rom_table_end);
#if (CONFIG_USE_OPTION_TABLE == 1) #if CONFIG_USE_OPTION_TABLE
{ {
struct cmos_option_table *option_table = cbfs_find_file("cmos_layout.bin", 0x1aa); struct cmos_option_table *option_table = cbfs_find_file("cmos_layout.bin", 0x1aa);
if (option_table) { if (option_table) {
@ -584,7 +584,7 @@ unsigned long write_coreboot_table(
lb_add_memory_range(mem, LB_MEM_TABLE, lb_add_memory_range(mem, LB_MEM_TABLE,
rom_table_start, rom_table_end-rom_table_start); rom_table_start, rom_table_end-rom_table_start);
#if CONFIG_WRITE_HIGH_TABLES == 1 #if CONFIG_WRITE_HIGH_TABLES
printk(BIOS_DEBUG, "Adding high table area\n"); printk(BIOS_DEBUG, "Adding high table area\n");
// should this be LB_MEM_ACPI? // should this be LB_MEM_ACPI?
lb_add_memory_range(mem, LB_MEM_TABLE, lb_add_memory_range(mem, LB_MEM_TABLE,
@ -594,7 +594,7 @@ unsigned long write_coreboot_table(
/* Add reserved regions */ /* Add reserved regions */
add_lb_reserved(mem); add_lb_reserved(mem);
#if (CONFIG_HAVE_MAINBOARD_RESOURCES == 1) #if CONFIG_HAVE_MAINBOARD_RESOURCES
add_mainboard_resources(mem); add_mainboard_resources(mem);
#endif #endif