Remove #ifdef checks on Kconfig symbols

In coreboot, bool, hex, and int type symbols are ALWAYS defined.

Change-Id: I58a36b37075988bb5ff67ac692c7d93c145b0dbc
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/12560
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
Martin Roth 2015-11-27 13:05:04 -07:00
parent 19fbdcc828
commit 7c38e1e8bc
16 changed files with 0 additions and 68 deletions

View File

@ -38,11 +38,6 @@
#include <timestamp.h> #include <timestamp.h>
#include <romstage_handoff.h> #include <romstage_handoff.h>
/* FIXME: Kconfig doesn't support overridable defaults :-( */
#ifndef CONFIG_HPET_MIN_TICKS
#define CONFIG_HPET_MIN_TICKS 0x1000
#endif
u8 acpi_checksum(u8 *table, u32 length) u8 acpi_checksum(u8 *table, u32 length)
{ {
u8 ret = 0; u8 ret = 0;

View File

@ -43,10 +43,6 @@ struct irq_info {
u8 rfu; u8 rfu;
} __attribute__((packed)); } __attribute__((packed));
#ifndef CONFIG_IRQ_SLOT_COUNT
#warning "IRQ_SLOT_COUNT is not defined in Kconfig. PIRQ won't work correctly."
#endif
struct irq_routing_table { struct irq_routing_table {
u32 signature; /* PIRQ_SIGNATURE should be here */ u32 signature; /* PIRQ_SIGNATURE should be here */
u16 version; /* PIRQ_VERSION */ u16 version; /* PIRQ_VERSION */

View File

@ -45,10 +45,6 @@ static void check_for_warm_reset(void)
static void set_var_mtrr(int reg, uint32_t base, uint32_t size, int type) static void set_var_mtrr(int reg, uint32_t base, uint32_t size, int type)
{ {
#ifndef CONFIG_CPU_ADDR_BITS
#error "CONFIG_CPU_ADDR_BITS must be set."
#endif
/* Bit Bit 32-35 of MTRRphysMask should be set to 1 */ /* Bit Bit 32-35 of MTRRphysMask should be set to 1 */
msr_t basem, maskm; msr_t basem, maskm;
basem.lo = base | type; basem.lo = base | type;

View File

@ -20,10 +20,6 @@
#include <cpu/x86/post_code.h> #include <cpu/x86/post_code.h>
#include <cbmem.h> #include <cbmem.h>
#ifndef CONFIG_FSP_LOC
# error "CONFIG_FSP_LOC must be set."
#endif
cmp $0, %eax cmp $0, %eax
je cache_as_ram je cache_as_ram
mov $0xa0, %eax mov $0xa0, %eax

View File

@ -27,10 +27,6 @@
#include <lib.h> // hexdump #include <lib.h> // hexdump
#include "fsp_util.h" #include "fsp_util.h"
#ifndef CONFIG_VIRTUAL_ROM_SIZE
#error "CONFIG_VIRTUAL_ROM_SIZE must be set."
#endif
/* convert a pointer to flash area into the offset inside the flash */ /* convert a pointer to flash area into the offset inside the flash */
static inline u32 to_flash_offset(void *p) { static inline u32 to_flash_offset(void *p) {
return ((u32)p + CONFIG_VIRTUAL_ROM_SIZE); return ((u32)p + CONFIG_VIRTUAL_ROM_SIZE);

View File

@ -115,10 +115,6 @@ volatile u8 * find_fsp ()
volatile u8 *fsp_ptr; volatile u8 *fsp_ptr;
#endif /* __PRE_RAM__ */ #endif /* __PRE_RAM__ */
#ifndef CONFIG_FSP_LOC
#error "CONFIG_FSP_LOC must be set."
#endif
/* The FSP is stored in CBFS */ /* The FSP is stored in CBFS */
fsp_ptr = (u8 *) CONFIG_FSP_LOC; fsp_ptr = (u8 *) CONFIG_FSP_LOC;

View File

@ -5,9 +5,6 @@
#include "option_table.h" #include "option_table.h"
#endif #endif
#ifndef CONFIG_MAX_REBOOT_CNT
#error "CONFIG_MAX_REBOOT_CNT not defined"
#endif
#if CONFIG_MAX_REBOOT_CNT > 15 #if CONFIG_MAX_REBOOT_CNT > 15
#error "CONFIG_MAX_REBOOT_CNT too high" #error "CONFIG_MAX_REBOOT_CNT too high"
#endif #endif

View File

@ -49,11 +49,6 @@
/* coreboot wrapper for TPM driver (end) */ /* coreboot wrapper for TPM driver (end) */
#ifndef CONFIG_TPM_TIS_BASE_ADDRESS
/* Base TPM address standard for x86 systems */
#define CONFIG_TPM_TIS_BASE_ADDRESS 0xfed40000
#endif
/* the macro accepts the locality value, but only locality 0 is operational */ /* the macro accepts the locality value, but only locality 0 is operational */
#define TIS_REG(LOCALITY, REG) \ #define TIS_REG(LOCALITY, REG) \
(void *)(CONFIG_TPM_TIS_BASE_ADDRESS + (LOCALITY << 12) + REG) (void *)(CONFIG_TPM_TIS_BASE_ADDRESS + (LOCALITY << 12) + REG)

View File

@ -93,10 +93,6 @@
#define TRY_HIGH_FIRST 0 #define TRY_HIGH_FIRST 0
#endif #endif
#ifndef CONFIG_K8_HT_FREQ_1G_SUPPORT
#define CONFIG_K8_HT_FREQ_1G_SUPPORT 0
#endif
#ifndef K8_HT_CHECK_PENDING_LINK #ifndef K8_HT_CHECK_PENDING_LINK
#if CONFIG_MAX_PHYSICAL_CPUS >= 4 #if CONFIG_MAX_PHYSICAL_CPUS >= 4
#define K8_HT_CHECK_PENDING_LINK 1 #define K8_HT_CHECK_PENDING_LINK 1
@ -109,11 +105,6 @@
#define CONFIG_MAX_PHYSICAL_CPUS_4_BUT_MORE_INSTALLED 0 #define CONFIG_MAX_PHYSICAL_CPUS_4_BUT_MORE_INSTALLED 0
#endif #endif
#ifndef CONFIG_ENABLE_APIC_EXT_ID
#define CONFIG_ENABLE_APIC_EXT_ID 0
#endif
static inline void print_linkn (const char *strval, uint8_t byteval) static inline void print_linkn (const char *strval, uint8_t byteval)
{ {
printk(BIOS_DEBUG, "%s%02x\n", strval, byteval); printk(BIOS_DEBUG, "%s%02x\n", strval, byteval);

View File

@ -24,10 +24,6 @@
#include "../chip.h" #include "../chip.h"
#include <reset.h> #include <reset.h>
#ifndef CONFIG_ENABLE_FSP_FAST_BOOT
# error "CONFIG_ENABLE_FSP_FAST_BOOT must be set."
#endif
#ifdef __PRE_RAM__ #ifdef __PRE_RAM__
#if IS_ENABLED(CONFIG_SOUTHBRIDGE_INTEL_FSP_I89XX) #if IS_ENABLED(CONFIG_SOUTHBRIDGE_INTEL_FSP_I89XX)

View File

@ -22,10 +22,6 @@
* clobbered by the arch/x86/Kconfig if they have the same name. */ * clobbered by the arch/x86/Kconfig if they have the same name. */
static inline int smm_region_size(void) static inline int smm_region_size(void)
{ {
#ifndef CONFIG_SMM_TSEG_SIZE
#error CONFIG_SMM_TSEG_SIZE must be set.
#endif
/* Make it 8MiB by default. */ /* Make it 8MiB by default. */
if (CONFIG_SMM_TSEG_SIZE == 0) if (CONFIG_SMM_TSEG_SIZE == 0)
return (8 << 20); return (8 << 20);

View File

@ -147,9 +147,6 @@ static void adjust_apic_id_map(struct smm_loader_params *smm_params)
static void asmlinkage cpu_smm_do_relocation(void *arg) static void asmlinkage cpu_smm_do_relocation(void *arg)
{ {
#ifndef CONFIG_MAX_CPUS
#error CONFIG_MAX_CPUS must be set.
#endif
msr_t smrr; msr_t smrr;
em64t100_smm_state_save_area_t *smm_state; em64t100_smm_state_save_area_t *smm_state;
const struct smm_module_params *p; const struct smm_module_params *p;
@ -204,9 +201,6 @@ static int install_relocation_handler(int num_cpus)
static int install_permanent_handler(int num_cpus) static int install_permanent_handler(int num_cpus)
{ {
#ifndef CONFIG_SMM_RESERVED_SIZE
#error CONFIG_SMM_RESERVED_SIZE must be set.
#endif
/* There are num_cpus concurrent stacks and num_cpus concurrent save /* There are num_cpus concurrent stacks and num_cpus concurrent save
* state areas. Lastly, set the stack size to the save state size. */ * state areas. Lastly, set the stack size to the save state size. */
int save_state_size = sizeof(em64t100_smm_state_save_area_t); int save_state_size = sizeof(em64t100_smm_state_save_area_t);

View File

@ -18,9 +18,6 @@
#include <baytrail/iosf.h> #include <baytrail/iosf.h>
#if !defined(__PRE_RAM__) #if !defined(__PRE_RAM__)
#ifndef CONFIG_MMCONF_BASE_ADDRESS
#error CONFIG_MMCONF_BASE_ADDRESS must be set.
#endif
#define IOSF_PCI_BASE (CONFIG_MMCONF_BASE_ADDRESS + (IOSF_PCI_DEV << 12)) #define IOSF_PCI_BASE (CONFIG_MMCONF_BASE_ADDRESS + (IOSF_PCI_DEV << 12))
static inline void write_iosf_reg(int reg, uint32_t value) static inline void write_iosf_reg(int reg, uint32_t value)

View File

@ -46,9 +46,6 @@ static int nvm_init(void)
/* Convert memory mapped pointer to flash offset. */ /* Convert memory mapped pointer to flash offset. */
static inline uint32_t to_flash_offset(void *p) static inline uint32_t to_flash_offset(void *p)
{ {
#ifndef CONFIG_ROM_SIZE
#error CONFIG_ROM_SIZE must be set.
#endif
return CONFIG_ROM_SIZE + (uintptr_t)p; return CONFIG_ROM_SIZE + (uintptr_t)p;
} }

View File

@ -177,9 +177,6 @@ static void southbridge_smi_sleep(void)
*/ */
static em64t100_smm_state_save_area_t *smi_apmc_find_state_save(uint8_t cmd) static em64t100_smm_state_save_area_t *smi_apmc_find_state_save(uint8_t cmd)
{ {
#ifndef CONFIG_MAX_CPUS
#error CONFIG_MAX_CPUS must be set.
#endif
em64t100_smm_state_save_area_t *state; em64t100_smm_state_save_area_t *state;
int node; int node;

View File

@ -57,9 +57,6 @@ add_mmio_resource(device_t dev, int i, unsigned long addr, unsigned long size)
static void sc_add_mmio_resources(device_t dev) static void sc_add_mmio_resources(device_t dev)
{ {
#ifndef CONFIG_VIRTUAL_ROM_SIZE
#error CONFIG_VIRTUAL_ROM_SIZE must be set.
#endif
add_mmio_resource(dev, 0xfeb, ABORT_BASE_ADDRESS, ABORT_BASE_SIZE); add_mmio_resource(dev, 0xfeb, ABORT_BASE_ADDRESS, ABORT_BASE_SIZE);
add_mmio_resource(dev, PBASE, PMC_BASE_ADDRESS, PMC_BASE_SIZE); add_mmio_resource(dev, PBASE, PMC_BASE_ADDRESS, PMC_BASE_SIZE);
add_mmio_resource(dev, IOBASE, IO_BASE_ADDRESS, IO_BASE_SIZE); add_mmio_resource(dev, IOBASE, IO_BASE_ADDRESS, IO_BASE_SIZE);