This patch unifies the use of config options in v2 to all start with CONFIG_

It's basically done with the following script and some manual fixup:

VARS=`grep ^define src/config/Options.lb | cut -f2 -d\ | grep -v ^CONFIG | grep -v ^COREBOOT |grep -v ^CC`
for VAR in $VARS; do
	find . -name .svn -prune -o -type f -exec perl -pi -e "s/(^|[^0-9a-zA-Z_]+)$VAR($|[^0-9a-zA-Z_]+)/\1CONFIG_$VAR\2/g" {} \;
done

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>



git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4381 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
Stefan Reinauer
2009-06-30 15:17:49 +00:00
committed by Stefan Reinauer
parent 9702b6bf7e
commit 0867062412
863 changed files with 14632 additions and 14632 deletions

View File

@@ -23,7 +23,7 @@
// ROMCC doesn't support __FILE__ or __LINE__ :^{
#if DEBUG
#if CONFIG_DEBUG
#ifdef __ROMCC__
#define ASSERT(x) { if (!(x)) die("ASSERT failure!\r\n"); }
#else
@@ -35,7 +35,7 @@
} \
}
#endif // __ROMCC__
#else // !DEBUG
#else // !CONFIG_DEBUG
#define ASSERT(x) { }
#endif

View File

@@ -39,39 +39,39 @@ int do_printk(int msg_level, const char *fmt, ...) __attribute__((format(printf,
#define printk_debug(fmt, arg...) do_printk(BIOS_DEBUG ,fmt, ##arg)
#define printk_spew(fmt, arg...) do_printk(BIOS_SPEW ,fmt, ##arg)
#if MAXIMUM_CONSOLE_LOGLEVEL <= BIOS_EMERG
#if CONFIG_MAXIMUM_CONSOLE_LOGLEVEL <= BIOS_EMERG
#undef printk_emerg
#define printk_emerg(fmt, arg...) do {} while(0)
#endif
#if MAXIMUM_CONSOLE_LOGLEVEL <= BIOS_ALERT
#if CONFIG_MAXIMUM_CONSOLE_LOGLEVEL <= BIOS_ALERT
#undef printk_alert
#define printk_alert(fmt, arg...) do {} while(0)
#endif
#if MAXIMUM_CONSOLE_LOGLEVEL <= BIOS_CRIT
#if CONFIG_MAXIMUM_CONSOLE_LOGLEVEL <= BIOS_CRIT
#undef printk_crit
#define printk_crit(fmt, arg...) do {} while(0)
#endif
#if MAXIMUM_CONSOLE_LOGLEVEL <= BIOS_ERR
#if CONFIG_MAXIMUM_CONSOLE_LOGLEVEL <= BIOS_ERR
#undef printk_err
#define printk_err(fmt, arg...) do {} while(0)
#endif
#if MAXIMUM_CONSOLE_LOGLEVEL <= BIOS_WARNING
#if CONFIG_MAXIMUM_CONSOLE_LOGLEVEL <= BIOS_WARNING
#undef printk_warning
#define printk_warning(fmt, arg...) do {} while(0)
#endif
#if MAXIMUM_CONSOLE_LOGLEVEL <= BIOS_NOTICE
#if CONFIG_MAXIMUM_CONSOLE_LOGLEVEL <= BIOS_NOTICE
#undef printk_notice
#define printk_notice(fmt, arg...) do {} while(0)
#endif
#if MAXIMUM_CONSOLE_LOGLEVEL <= BIOS_INFO
#if CONFIG_MAXIMUM_CONSOLE_LOGLEVEL <= BIOS_INFO
#undef printk_info
#define printk_info(fmt, arg...) do {} while(0)
#endif
#if MAXIMUM_CONSOLE_LOGLEVEL <= BIOS_DEBUG
#if CONFIG_MAXIMUM_CONSOLE_LOGLEVEL <= BIOS_DEBUG
#undef printk_debug
#define printk_debug(fmt, arg...) do {} while(0)
#endif
#if MAXIMUM_CONSOLE_LOGLEVEL <= BIOS_SPEW
#if CONFIG_MAXIMUM_CONSOLE_LOGLEVEL <= BIOS_SPEW
#undef printk_spew
#define printk_spew(fmt, arg...) do {} while(0)
#endif

View File

@@ -3,19 +3,19 @@
/* Safe for inclusion in assembly */
#ifndef MAXIMUM_CONSOLE_LOGLEVEL
#define MAXIMUM_CONSOLE_LOGLEVEL 8
#ifndef CONFIG_MAXIMUM_CONSOLE_LOGLEVEL
#define CONFIG_MAXIMUM_CONSOLE_LOGLEVEL 8
#endif
#ifndef DEFAULT_CONSOLE_LOGLEVEL
#define DEFAULT_CONSOLE_LOGLEVEL 8 /* anything MORE serious than BIOS_SPEW */
#ifndef CONFIG_DEFAULT_CONSOLE_LOGLEVEL
#define CONFIG_DEFAULT_CONSOLE_LOGLEVEL 8 /* anything MORE serious than BIOS_SPEW */
#endif
#ifndef ASM_CONSOLE_LOGLEVEL
#if (DEFAULT_CONSOLE_LOGLEVEL <= MAXIMUM_CONSOLE_LOGLEVEL)
#define ASM_CONSOLE_LOGLEVEL DEFAULT_CONSOLE_LOGLEVEL
#if (CONFIG_DEFAULT_CONSOLE_LOGLEVEL <= CONFIG_MAXIMUM_CONSOLE_LOGLEVEL)
#define ASM_CONSOLE_LOGLEVEL CONFIG_DEFAULT_CONSOLE_LOGLEVEL
#else
#define ASM_CONSOLE_LOGLEVEL MAXIMUM_CONSOLE_LOGLEVEL
#define ASM_CONSOLE_LOGLEVEL CONFIG_MAXIMUM_CONSOLE_LOGLEVEL
#endif
#endif

View File

@@ -1,6 +1,6 @@
#include <arch/cpu.h>
#if K8_REV_F_SUPPORT == 0
#if CONFIG_K8_REV_F_SUPPORT == 0
static inline int is_cpu_rev_a0(void)
{
return (cpuid_eax(1) & 0xfffef) == 0x0f00;
@@ -77,7 +77,7 @@ int is_e0_later_in_bsp(int nodeid); //defined model_fxx_init.c
#endif
#if K8_REV_F_SUPPORT == 1
#if CONFIG_K8_REV_F_SUPPORT == 1
//AMD_F0_SUPPORT
static inline int is_cpu_pre_f0(void)
{

View File

@@ -12,7 +12,7 @@ void pci_write_config8(device_t dev, unsigned where, uint8_t val);
void pci_write_config16(device_t dev, unsigned where, uint16_t val);
void pci_write_config32(device_t dev, unsigned where, uint32_t val);
#if MMCONF_SUPPORT
#if CONFIG_MMCONF_SUPPORT
uint8_t pci_mmio_read_config8(device_t dev, unsigned where);
uint16_t pci_mmio_read_config16(device_t dev, unsigned where);
uint32_t pci_mmio_read_config32(device_t dev, unsigned where);

View File

@@ -3,7 +3,7 @@
#ifndef ASSEMBLY
#if HAVE_FALLBACK_BOOT == 1
#if CONFIG_HAVE_FALLBACK_BOOT == 1
void set_boot_successful(void);
#else
#define set_boot_successful()

View File

@@ -1,7 +1,7 @@
#ifndef PART_HARD_RESET_H
#define PART_HARD_RESET_H
#if HAVE_HARD_RESET == 1
#if CONFIG_HAVE_HARD_RESET == 1
void hard_reset(void);
#else
#define hard_reset() do {} while(0)

View File

@@ -1,7 +1,7 @@
#ifndef PART_INIT_TIMER_H
#define PART_DELAY_H
#if HAVE_INIT_TIMER == 1
#if CONFIG_HAVE_INIT_TIMER == 1
void init_timer(void);
#else
#define init_timer() do{} while(0)

View File

@@ -1,7 +1,7 @@
#ifndef PART_WATCHDOG_H
#define PART_WATCHDOG_H
#if USE_WATCHDOG_ON_BOOT == 1
#if CONFIG_USE_WATCHDOG_ON_BOOT == 1
void watchdog_off(void);
#else
#define watchdog_off()

View File

@@ -82,19 +82,19 @@
#define PC_CKS_LOC 46
/* Linux bios checksum is built only over bytes 49..125 */
#ifndef LB_CKS_RANGE_START
#define LB_CKS_RANGE_START 49
#ifndef CONFIG_LB_CKS_RANGE_START
#define CONFIG_LB_CKS_RANGE_START 49
#endif
#ifndef LB_CKS_RANGE_END
#define LB_CKS_RANGE_END 125
#ifndef CONFIG_LB_CKS_RANGE_END
#define CONFIG_LB_CKS_RANGE_END 125
#endif
#ifndef LB_CKS_LOC
#define LB_CKS_LOC 126
#ifndef CONFIG_LB_CKS_LOC
#define CONFIG_LB_CKS_LOC 126
#endif
#if !defined(ASSEMBLY)
void rtc_init(int invalid);
#if USE_OPTION_TABLE == 1
#if CONFIG_USE_OPTION_TABLE == 1
int get_option(void *dest, char *name);
#else
static inline int get_option(void *dest, char *name) { return -2; }

View File

@@ -40,8 +40,8 @@
#define __X86EMU_FPU_REGS_H
#if defined(DEBUG) && (DEBUG == 0)
#undef DEBUG
#if defined(CONFIG_DEBUG) && (DEBUG == 0)
#undef CONFIG_DEBUG
#endif
#ifdef X86_FPU_SUPPORT
@@ -107,7 +107,7 @@ struct x86_fpu_registers {
#endif /* X86_FPU_SUPPORT */
#ifdef DEBUG
#ifdef CONFIG_DEBUG
# define DECODE_PRINTINSTR32(t,mod,rh,rl) \
DECODE_PRINTF(t[(mod<<3)+(rh)]);
# define DECODE_PRINTINSTR256(t,mod,rh,rl) \

View File

@@ -40,8 +40,8 @@
#ifndef __X86EMU_REGS_H
#define __X86EMU_REGS_H
#if defined(DEBUG) && (DEBUG == 0)
#undef DEBUG
#if defined(CONFIG_DEBUG) && (CONFIG_DEBUG == 0)
#undef CONFIG_DEBUG
#endif
/*---------------------- Macros and type definitions ----------------------*/
@@ -283,7 +283,7 @@ typedef struct {
u32 mode;
volatile int intr; /* mask of pending interrupts */
volatile int debug;
#ifdef DEBUG
#ifdef CONFIG_DEBUG
int check;
u16 saved_ip;
u16 saved_cs;

View File

@@ -42,8 +42,8 @@
#ifndef __X86EMU_X86EMU_H
#define __X86EMU_X86EMU_H
#if defined(DEBUG) && (DEBUG == 0)
#undef DEBUG
#if defined(CONFIG_DEBUG) && (CONFIG_DEBUG == 0)
#undef CONFIG_DEBUG
#endif
/* FIXME: undefine printk for the moment */
@@ -165,7 +165,7 @@ void X86EMU_prepareForInt(int num);
void X86EMU_exec(void);
void X86EMU_halt_sys(void);
#ifdef DEBUG
#ifdef CONFIG_DEBUG
#define HALT_SYS() \
printk("halt_sys: file %s, line %d\n", __FILE__, __LINE__); \
X86EMU_halt_sys();