summaryrefslogtreecommitdiff
path: root/src/devices/oprom
diff options
context:
space:
mode:
authorStefan Reinauer <stefan.reinauer@coreboot.org>2011-04-21 20:45:45 +0000
committerStefan Reinauer <stepan@openbios.org>2011-04-21 20:45:45 +0000
commitd4814bd41c080fb9dda87c762fcaecf4e72fc996 (patch)
tree57a44f8cbfad3642084b8e3d092e230b8f7e7198 /src/devices/oprom
parent1d888a97849d68a7136da558c3697c7f2a8d898a (diff)
downloadcoreboot-d4814bd41c080fb9dda87c762fcaecf4e72fc996.tar.xz
more ifdef -> if fixes
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Acked-by: Stefan Reinauer <stefan.reinauer@coreboot.org> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6536 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/devices/oprom')
-rw-r--r--src/devices/oprom/x86.c2
-rw-r--r--src/devices/oprom/yabel/biosemu.c24
-rw-r--r--src/devices/oprom/yabel/compat/functions.c4
-rw-r--r--src/devices/oprom/yabel/debug.h2
-rw-r--r--src/devices/oprom/yabel/device.h4
5 files changed, 18 insertions, 18 deletions
diff --git a/src/devices/oprom/x86.c b/src/devices/oprom/x86.c
index adbb5fd776..37b45e6376 100644
--- a/src/devices/oprom/x86.c
+++ b/src/devices/oprom/x86.c
@@ -296,7 +296,7 @@ void run_bios(struct device *dev, unsigned long addr)
printk(BIOS_DEBUG, "... Option ROM returned.\n");
}
-#if defined(CONFIG_GEODE_VSA) && CONFIG_GEODE_VSA
+#if CONFIG_GEODE_VSA
#include <cpu/amd/lxdef.h>
#include <cpu/amd/vr.h>
#include <cbfs.h>
diff --git a/src/devices/oprom/yabel/biosemu.c b/src/devices/oprom/yabel/biosemu.c
index f1f19c46be..8d7795971f 100644
--- a/src/devices/oprom/yabel/biosemu.c
+++ b/src/devices/oprom/yabel/biosemu.c
@@ -58,37 +58,37 @@ biosemu(u8 *biosmem, u32 biosmem_size, struct device * dev, unsigned long rom_ad
int i = 0;
#if CONFIG_X86EMU_DEBUG
debug_flags = 0;
-#if defined(CONFIG_X86EMU_DEBUG_JMP) && CONFIG_X86EMU_DEBUG_JMP
+#if CONFIG_X86EMU_DEBUG_JMP
debug_flags |= DEBUG_JMP;
#endif
-#if defined(CONFIG_X86EMU_DEBUG_TRACE) && CONFIG_X86EMU_DEBUG_TRACE
+#if CONFIG_X86EMU_DEBUG_TRACE
debug_flags |= DEBUG_TRACE_X86EMU;
#endif
-#if defined(CONFIG_X86EMU_DEBUG_PNP) && CONFIG_X86EMU_DEBUG_PNP
+#if CONFIG_X86EMU_DEBUG_PNP
debug_flags |= DEBUG_PNP;
#endif
-#if defined(CONFIG_X86EMU_DEBUG_DISK) && CONFIG_X86EMU_DEBUG_DISK
+#if CONFIG_X86EMU_DEBUG_DISK
debug_flags |= DEBUG_DISK;
#endif
-#if defined(CONFIG_X86EMU_DEBUG_PMM) && CONFIG_X86EMU_DEBUG_PMM
+#if CONFIG_X86EMU_DEBUG_PMM
debug_flags |= DEBUG_PMM;
#endif
-#if defined(CONFIG_X86EMU_DEBUG_VBE) && CONFIG_X86EMU_DEBUG_VBE
+#if CONFIG_X86EMU_DEBUG_VBE
debug_flags |= DEBUG_VBE;
#endif
-#if defined(CONFIG_X86EMU_DEBUG_INT10) && CONFIG_X86EMU_DEBUG_INT10
+#if CONFIG_X86EMU_DEBUG_INT10
debug_flags |= DEBUG_PRINT_INT10;
#endif
-#if defined(CONFIG_X86EMU_DEBUG_INTERRUPTS) && CONFIG_X86EMU_DEBUG_INTERRUPTS
+#if CONFIG_X86EMU_DEBUG_INTERRUPTS
debug_flags |= DEBUG_INTR;
#endif
-#if defined(CONFIG_X86EMU_DEBUG_CHECK_VMEM_ACCESS) && CONFIG_X86EMU_DEBUG_CHECK_VMEM_ACCESS
+#if CONFIG_X86EMU_DEBUG_CHECK_VMEM_ACCESS
debug_flags |= DEBUG_CHECK_VMEM_ACCESS;
#endif
-#if defined(CONFIG_X86EMU_DEBUG_MEM) && CONFIG_X86EMU_DEBUG_MEM
+#if CONFIG_X86EMU_DEBUG_MEM
debug_flags |= DEBUG_MEM;
#endif
-#if defined(CONFIG_X86EMU_DEBUG_IO) && CONFIG_X86EMU_DEBUG_IO
+#if CONFIG_X86EMU_DEBUG_IO
debug_flags |= DEBUG_IO;
#endif
@@ -309,7 +309,7 @@ biosemu(u8 *biosmem, u32 biosmem_size, struct device * dev, unsigned long rom_ad
* some boot device status in AX (see PNP BIOS Spec Section 3.3
*/
DEBUG_PRINTF_CS_IP("Option ROM Exit Status: %04x\n", M.x86.R_AX);
-#if defined(CONFIG_X86EMU_DEBUG) && CONFIG_X86EMU_DEBUG
+#if CONFIG_X86EMU_DEBUG
DEBUG_PRINTF("Exit Status Decode:\n");
if (M.x86.R_AX & 0x100) { // bit 8
DEBUG_PRINTF
diff --git a/src/devices/oprom/yabel/compat/functions.c b/src/devices/oprom/yabel/compat/functions.c
index 50bc7b9192..db37fbc6f9 100644
--- a/src/devices/oprom/yabel/compat/functions.c
+++ b/src/devices/oprom/yabel/compat/functions.c
@@ -23,8 +23,8 @@
#define VMEM_SIZE (1024 * 1024) /* 1 MB */
-#if !defined(CONFIG_YABEL_DIRECTHW) || (!CONFIG_YABEL_DIRECTHW)
-#ifdef CONFIG_YABEL_VIRTMEM_LOCATION
+#if !CONFIG_YABEL_DIRECTHW
+#if CONFIG_YABEL_VIRTMEM_LOCATION
u8* vmem = (u8 *) CONFIG_YABEL_VIRTMEM_LOCATION;
#else
u8* vmem = (u8 *) (16*1024*1024); /* default to 16MB */
diff --git a/src/devices/oprom/yabel/debug.h b/src/devices/oprom/yabel/debug.h
index fea1fb7a3b..9361553da7 100644
--- a/src/devices/oprom/yabel/debug.h
+++ b/src/devices/oprom/yabel/debug.h
@@ -66,7 +66,7 @@ static inline void set_ci(void) {};
// set to enable tracing of JMPs in x86emu
#define DEBUG_JMP 0x2000
-#if defined(CONFIG_X86EMU_DEBUG) && CONFIG_X86EMU_DEBUG
+#if CONFIG_X86EMU_DEBUG
#define CHECK_DBG(_flag) if (debug_flags & _flag)
diff --git a/src/devices/oprom/yabel/device.h b/src/devices/oprom/yabel/device.h
index b6ec1e3df8..edee44d20e 100644
--- a/src/devices/oprom/yabel/device.h
+++ b/src/devices/oprom/yabel/device.h
@@ -62,7 +62,7 @@ typedef struct {
typedef struct {
u8 bus;
u8 devfn;
-#ifdef CONFIG_PCI_OPTION_ROM_RUN_YABEL
+#if CONFIG_PCI_OPTION_ROM_RUN_YABEL
struct device* dev;
#else
u64 puid;
@@ -84,7 +84,7 @@ typedef struct {
} biosemu_device_t;
typedef struct {
-#ifdef CONFIG_PCI_OPTION_ROM_RUN_YABEL
+#if CONFIG_PCI_OPTION_ROM_RUN_YABEL
unsigned long info;
#else
u8 info;