src/northbridge: add IS_ENABLED() around Kconfig symbol references
Change-Id: I1095944e65bfacd9e878840cc88f8a0a24ecde72 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/20347 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
parent
894977b2cd
commit
3c35ad9053
|
@ -24,7 +24,7 @@
|
||||||
#include <delay.h>
|
#include <delay.h>
|
||||||
#include "cn700.h"
|
#include "cn700.h"
|
||||||
|
|
||||||
#if CONFIG_DEBUG_RAM_SETUP
|
#if IS_ENABLED(CONFIG_DEBUG_RAM_SETUP)
|
||||||
#define PRINT_DEBUG_MEM(x) printk(BIOS_DEBUG, x)
|
#define PRINT_DEBUG_MEM(x) printk(BIOS_DEBUG, x)
|
||||||
#define PRINT_DEBUG_MEM_HEX8(x) printk(BIOS_DEBUG, "%02x", x)
|
#define PRINT_DEBUG_MEM_HEX8(x) printk(BIOS_DEBUG, "%02x", x)
|
||||||
#define PRINT_DEBUG_MEM_HEX16(x) printk(BIOS_DEBUG, "%04x", x)
|
#define PRINT_DEBUG_MEM_HEX16(x) printk(BIOS_DEBUG, "%04x", x)
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
#define SMBUS_DELAY() outb(0x80, 0x80)
|
#define SMBUS_DELAY() outb(0x80, 0x80)
|
||||||
|
|
||||||
/* Internal functions */
|
/* Internal functions */
|
||||||
#if CONFIG_DEBUG_SMBUS
|
#if IS_ENABLED(CONFIG_DEBUG_SMBUS)
|
||||||
static void smbus_print_error(unsigned char host_status_register, int loops)
|
static void smbus_print_error(unsigned char host_status_register, int loops)
|
||||||
{
|
{
|
||||||
/* Check if there actually was an error */
|
/* Check if there actually was an error */
|
||||||
|
@ -85,7 +85,7 @@ static void smbus_wait_until_ready(void)
|
||||||
SMBUS_DELAY();
|
SMBUS_DELAY();
|
||||||
++loops;
|
++loops;
|
||||||
}
|
}
|
||||||
#if CONFIG_DEBUG_SMBUS
|
#if IS_ENABLED(CONFIG_DEBUG_SMBUS)
|
||||||
/* Some systems seem to have a flakey SMBus. No need to spew a lot of
|
/* Some systems seem to have a flakey SMBus. No need to spew a lot of
|
||||||
* errors on those, once we know that SMBus access is principally
|
* errors on those, once we know that SMBus access is principally
|
||||||
* working.
|
* working.
|
||||||
|
@ -211,7 +211,7 @@ static void enable_smbus(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Debugging Function */
|
/* Debugging Function */
|
||||||
#if CONFIG_DEBUG_SMBUS
|
#if IS_ENABLED(CONFIG_DEBUG_SMBUS)
|
||||||
static void dump_spd_data(const struct mem_controller *ctrl)
|
static void dump_spd_data(const struct mem_controller *ctrl)
|
||||||
{
|
{
|
||||||
int dimm, offset, regs;
|
int dimm, offset, regs;
|
||||||
|
|
|
@ -266,7 +266,7 @@ static void cx700_lpc_init(struct device *dev)
|
||||||
{
|
{
|
||||||
cx700_set_lpc_registers(dev);
|
cx700_set_lpc_registers(dev);
|
||||||
|
|
||||||
#if CONFIG_IOAPIC
|
#if IS_ENABLED(CONFIG_IOAPIC)
|
||||||
#define IO_APIC_ID 2
|
#define IO_APIC_ID 2
|
||||||
setup_ioapic(VIO_APIC_VADDR, IO_APIC_ID);
|
setup_ioapic(VIO_APIC_VADDR, IO_APIC_ID);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
#include "registers.h"
|
#include "registers.h"
|
||||||
|
|
||||||
/* Debugging macros. */
|
/* Debugging macros. */
|
||||||
#if CONFIG_DEBUG_RAM_SETUP
|
#if IS_ENABLED(CONFIG_DEBUG_RAM_SETUP)
|
||||||
#define PRINTK_DEBUG(x...) printk(BIOS_DEBUG, x)
|
#define PRINTK_DEBUG(x...) printk(BIOS_DEBUG, x)
|
||||||
#else
|
#else
|
||||||
#define PRINTK_DEBUG(x...)
|
#define PRINTK_DEBUG(x...)
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
#include <arch/interrupt.h>
|
#include <arch/interrupt.h>
|
||||||
#include "registers.h"
|
#include "registers.h"
|
||||||
#include <x86emu/regs.h>
|
#include <x86emu/regs.h>
|
||||||
#if CONFIG_PCI_OPTION_ROM_RUN_REALMODE
|
#if IS_ENABLED(CONFIG_PCI_OPTION_ROM_RUN_REALMODE)
|
||||||
#include <device/oprom/realmode/x86.h>
|
#include <device/oprom/realmode/x86.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -143,7 +143,7 @@ static void write_protect_vgabios(void)
|
||||||
|
|
||||||
static void vga_enable_console(void)
|
static void vga_enable_console(void)
|
||||||
{
|
{
|
||||||
#if CONFIG_PCI_OPTION_ROM_RUN_REALMODE
|
#if IS_ENABLED(CONFIG_PCI_OPTION_ROM_RUN_REALMODE)
|
||||||
/* Call VGA BIOS int10 function 0x4f14 to enable main console
|
/* Call VGA BIOS int10 function 0x4f14 to enable main console
|
||||||
* Epia-M does not always autosense the main console so forcing
|
* Epia-M does not always autosense the main console so forcing
|
||||||
* it on is good.
|
* it on is good.
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
|
|
||||||
#define SMBUS_DELAY() outb(0x80, 0x80)
|
#define SMBUS_DELAY() outb(0x80, 0x80)
|
||||||
|
|
||||||
#if CONFIG_DEBUG_SMBUS
|
#if IS_ENABLED(CONFIG_DEBUG_SMBUS)
|
||||||
#define DEBUG(x...) printk(BIOS_DEBUG, x)
|
#define DEBUG(x...) printk(BIOS_DEBUG, x)
|
||||||
#else
|
#else
|
||||||
#define DEBUG(x...) while (0) { }
|
#define DEBUG(x...) while (0) { }
|
||||||
|
@ -208,7 +208,7 @@ void smbus_fixup(const struct mem_controller *mem_ctrl)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Debugging Function */
|
/* Debugging Function */
|
||||||
#if CONFIG_DEBUG_SMBUS
|
#if IS_ENABLED(CONFIG_DEBUG_SMBUS)
|
||||||
static void dump_spd_data(void)
|
static void dump_spd_data(void)
|
||||||
{
|
{
|
||||||
int dimm, offset, regs;
|
int dimm, offset, regs;
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#pragma clang diagnostic ignored "-Warray-bounds"
|
#pragma clang diagnostic ignored "-Warray-bounds"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if CONFIG_DEBUG_RAM_SETUP
|
#if IS_ENABLED(CONFIG_DEBUG_RAM_SETUP)
|
||||||
#define PRINT_DEBUG_MEM(x) printk(BIOS_DEBUG, x)
|
#define PRINT_DEBUG_MEM(x) printk(BIOS_DEBUG, x)
|
||||||
#define PRINT_DEBUG_MEM_HEX8(x) printk(BIOS_DEBUG, "%02x", x)
|
#define PRINT_DEBUG_MEM_HEX8(x) printk(BIOS_DEBUG, "%02x", x)
|
||||||
#define PRINT_DEBUG_MEM_HEX16(x) printk(BIOS_DEBUG, "%04x", x)
|
#define PRINT_DEBUG_MEM_HEX16(x) printk(BIOS_DEBUG, "%04x", x)
|
||||||
|
|
|
@ -29,9 +29,7 @@
|
||||||
#include <cpu/x86/msr.h>
|
#include <cpu/x86/msr.h>
|
||||||
#include <arch/interrupt.h>
|
#include <arch/interrupt.h>
|
||||||
#include <x86emu/regs.h>
|
#include <x86emu/regs.h>
|
||||||
#if CONFIG_PCI_OPTION_ROM_RUN_REALMODE
|
|
||||||
#include <device/oprom/realmode/x86.h>
|
#include <device/oprom/realmode/x86.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
/* PCI Domain 1 Device 0 Function 0 */
|
/* PCI Domain 1 Device 0 Function 0 */
|
||||||
|
|
||||||
|
@ -139,7 +137,7 @@ static void write_protect_vgabios(void)
|
||||||
|
|
||||||
static void vga_enable_console(void)
|
static void vga_enable_console(void)
|
||||||
{
|
{
|
||||||
#if CONFIG_PCI_OPTION_ROM_RUN_REALMODE
|
#if IS_ENABLED(CONFIG_PCI_OPTION_ROM_RUN_REALMODE)
|
||||||
/* Call VGA BIOS int10 function 0x4f14 to enable main console
|
/* Call VGA BIOS int10 function 0x4f14 to enable main console
|
||||||
* Epia-M does not always autosense the main console so forcing
|
* Epia-M does not always autosense the main console so forcing
|
||||||
* it on is good.
|
* it on is good.
|
||||||
|
|
|
@ -198,7 +198,7 @@ static const struct pci_driver lpc_driver __pci_driver = {
|
||||||
.device = PCI_DEVICE_ID_VIA_VX900_LPC,
|
.device = PCI_DEVICE_ID_VIA_VX900_LPC,
|
||||||
};
|
};
|
||||||
|
|
||||||
#if CONFIG_PIRQ_ROUTE
|
#if IS_ENABLED(CONFIG_PIRQ_ROUTE)
|
||||||
void pirq_assign_irqs(const u8 * pirq)
|
void pirq_assign_irqs(const u8 * pirq)
|
||||||
{
|
{
|
||||||
device_t lpc;
|
device_t lpc;
|
||||||
|
|
Loading…
Reference in New Issue