See patch.

Note that we need code-fixes for some chipsets and board when enabling
some of the DEBUG options (my guess is that code was never tested much),
but this is not related to my patch, those problems have been there
already:

 - Some romcc boards throw "too few registers" errors if you enable
   extra debugging options. That can partly fixed by changing code or
   by changing -mcpu=i386 to -mcpu=p2 or similar (if possible for the
   board/CPU).

 - Some chipset code needs fixing as boards won't even compile if some
   of the DEBUG options are enabled.

 - And there are further DEBUG* defines which are not so easily
   converted (e.g. some use integers like LOGLEVEL does, instead of
   just boolean on/off). I will have a look at converting more of those
   to kconfig later.


Uwe.
-- 
http://www.hermann-uwe.de  | http://www.randomprojects.org
http://www.crazy-hacks.org | http://www.unmaintained-free-software.org
Convert all DEBUG_SMBUS, DEBUG_SMI, and DEBUG_RAM_SETUP custom and
local #defines into globally configurable kconfig options (and Options.lb
options for as long as newconfig still exists) which can be enabled
by the user in the "Debugging" menu.

The respective menu items only appear if a board is selected where the
chipset code actually provides such additional DEBUG output.

All three variables default to 0 / off for now.

Also, drop a small chunk of dead/useless code in the
src/northbridge/via/cn700/raminit.c file, which would otherwise break
compilation.

Signed-off-by: Uwe Hermann <[email protected]>

Index: src/southbridge/via/vt8237r/vt8237r.h
===================================================================
--- src/southbridge/via/vt8237r/vt8237r.h	(Revision 4815)
+++ src/southbridge/via/vt8237r/vt8237r.h	(Arbeitskopie)
@@ -65,7 +65,7 @@
 #define I2C_TRANS_CMD			0x40
 #define CLOCK_SLAVE_ADDRESS		0x69
 
-#if DEBUG_SMBUS == 1
+#if CONFIG_DEBUG_SMBUS
 #define PRINT_DEBUG(x)		print_debug(x)
 #define PRINT_DEBUG_HEX16(x)	print_debug_hex16(x)
 #else
Index: src/southbridge/intel/i82801gx/i82801gx_smihandler.c
===================================================================
--- src/southbridge/intel/i82801gx/i82801gx_smihandler.c	(Revision 4815)
+++ src/southbridge/intel/i82801gx/i82801gx_smihandler.c	(Arbeitskopie)
@@ -28,8 +28,6 @@
 #include "i82801gx.h"
 #include "i82801gx_power.h"
 
-#define DEBUG_SMI
-
 #define APM_CNT		0xb2
 #define   CST_CONTROL	0x85 // 0x85 crashes the box
 #define   PST_CONTROL	0x80 // 0x80 crashes the box
Index: src/Kconfig
===================================================================
--- src/Kconfig	(Revision 4815)
+++ src/Kconfig	(Arbeitskopie)
@@ -404,5 +404,52 @@
 	  If enabled, you will be able to set breakpoints for gdb debugging.
 	  See src/arch/i386/lib/c_start.S for details.
 
+config DEBUG_RAM_SETUP
+	bool "Output verbose RAM init debug messages"
+	default n
+	depends on (NORTHBRIDGE_AMD_AMDFAM10 \
+		 || NORTHBRIDGE_AMD_AMDK8 \
+		 || NORTHBRIDGE_VIA_CN700 \
+		 || NORTHBRIDGE_VIA_CX700 \
+		 || NORTHBRIDGE_VIA_VX800 \
+		 || NORTHBRIDGE_INTEL_E7501 \
+		 || NORTHBRIDGE_INTEL_I440BX \
+		 || NORTHBRIDGE_INTEL_I82810 \
+		 || NORTHBRIDGE_INTEL_I82830 \
+		 || NORTHBRIDGE_INTEL_I945)
+	help
+	  This option enables additional RAM init related debug messages.
+	  It is recommended to enable this when debugging issues on your
+	  board which might be RAM init related.
+
+	  Note: This option will increase the size of the coreboot image.
+
+	  If unsure, say N.
+
+config DEBUG_SMBUS
+	bool "Output verbose SMBus debug messages"
+	default n
+	depends on (SOUTHBRIDGE_VIA_VT8237R \
+		 || NORTHBRIDGE_VIA_VX800 \
+		 || NORTHBRIDGE_VIA_CX700 \
+		 || NORTHBRIDGE_AMD_AMDK8)
+	help
+	  This option enables additional SMBus (and SPD) debug messages.
+
+	  Note: This option will increase the size of the coreboot image.
+
+	  If unsure, say N.
+
+config DEBUG_SMI
+	bool "Output verbose SMI debug messages"
+	default n
+	depends on SOUTHBRIDGE_INTEL_I82801GX
+	help
+	  This option enables additional SMI related debug messages.
+
+	  Note: This option will increase the size of the coreboot image.
+
+	  If unsure, say N.
+
 endmenu
 
Index: src/cpu/x86/smm/smihandler.c
===================================================================
--- src/cpu/x86/smm/smihandler.c	(Revision 4815)
+++ src/cpu/x86/smm/smihandler.c	(Arbeitskopie)
@@ -27,8 +27,6 @@
 
 void southbridge_smi_set_eos(void);
 
-#define DEBUG_SMI
-
 typedef enum { SMI_LOCKED, SMI_UNLOCKED } smi_semaphore;
 
 /* SMI multiprocessing semaphore */
@@ -168,7 +166,7 @@
 
 	node=nodeid();
 
-#ifdef DEBUG_SMI
+#if CONFIG_DEBUG_SMI
 	console_loglevel = CONFIG_DEFAULT_CONSOLE_LOGLEVEL;
 #else
 	console_loglevel = 1;
Index: src/mainboard/kontron/986lcd-m/auto.c
===================================================================
--- src/mainboard/kontron/986lcd-m/auto.c	(Revision 4815)
+++ src/mainboard/kontron/986lcd-m/auto.c	(Arbeitskopie)
@@ -381,7 +381,7 @@
 	i945_late_initialization();
 
 #if CONFIG_DEFAULT_CONSOLE_LOGLEVEL > 8
-#if defined(DEBUG_RAM_SETUP)
+#if CONFIG_DEBUG_RAM_SETUP
 	sdram_dump_mchbar_registers();
 #endif
 
Index: src/mainboard/amd/pistachio/cache_as_ram_auto.c
===================================================================
--- src/mainboard/amd/pistachio/cache_as_ram_auto.c	(Revision 4815)
+++ src/mainboard/amd/pistachio/cache_as_ram_auto.c	(Arbeitskopie)
@@ -51,7 +51,6 @@
 
 #include "cpu/x86/lapic/boot_cpu.c"
 #include "northbridge/amd/amdk8/reset_test.c"
-#include "northbridge/amd/amdk8/debug.c"
 #include "superio/ite/it8712f/it8712f_early_serial.c"
 
 #include "cpu/amd/mtrr/amd_earlymtrr.c"
@@ -61,6 +60,7 @@
 
 #include "southbridge/amd/rs690/rs690_early_setup.c"
 #include "southbridge/amd/sb600/sb600_early_setup.c"
+#include "northbridge/amd/amdk8/debug.c" /* After sb600_early_setup.c! */
 
 /* CAN'T BE REMOVED! crt0.S will use it. I don't know WHY!*/
 static void memreset(int controllers, const struct mem_controller *ctrl)
Index: src/mainboard/amd/dbm690t/cache_as_ram_auto.c
===================================================================
--- src/mainboard/amd/dbm690t/cache_as_ram_auto.c	(Revision 4815)
+++ src/mainboard/amd/dbm690t/cache_as_ram_auto.c	(Arbeitskopie)
@@ -57,7 +57,6 @@
 
 #include "cpu/x86/lapic/boot_cpu.c"
 #include "northbridge/amd/amdk8/reset_test.c"
-#include "northbridge/amd/amdk8/debug.c"
 #include "superio/ite/it8712f/it8712f_early_serial.c"
 
 #include "cpu/amd/mtrr/amd_earlymtrr.c"
@@ -67,6 +66,7 @@
 
 #include "southbridge/amd/rs690/rs690_early_setup.c"
 #include "southbridge/amd/sb600/sb600_early_setup.c"
+#include "northbridge/amd/amdk8/debug.c" /* After sb600_early_setup.c! */
 
 /* CAN'T BE REMOVED! crt0.S will use it. I don't know WHY!*/
 static void memreset(int controllers, const struct mem_controller *ctrl)
Index: src/mainboard/amd/serengeti_cheetah_fam10/cache_as_ram_auto.c
===================================================================
--- src/mainboard/amd/serengeti_cheetah_fam10/cache_as_ram_auto.c	(Revision 4815)
+++ src/mainboard/amd/serengeti_cheetah_fam10/cache_as_ram_auto.c	(Arbeitskopie)
@@ -29,8 +29,6 @@
 #define RAMINIT_SYSINFO 1
 #define CACHE_AS_RAM_ADDRESS_DEBUG 1
 
-#define DEBUG_SMBUS 1
-
 #define SET_NB_CFG_54 1
 
 //used by raminit
Index: src/mainboard/msi/ms7135/cache_as_ram_auto.c
===================================================================
--- src/mainboard/msi/ms7135/cache_as_ram_auto.c	(Revision 4815)
+++ src/mainboard/msi/ms7135/cache_as_ram_auto.c	(Arbeitskopie)
@@ -30,9 +30,6 @@
 /* Used by raminit. */
 #define QRANK_DIMM_SUPPORT 1
 
-/* Turn this on for SMBus debugging output. */
-#define DEBUG_SMBUS 0
-
 #if CONFIG_LOGICAL_CPUS == 1
 #define SET_NB_CFG_54 1
 #endif
Index: src/mainboard/msi/ms9282/cache_as_ram_auto.c
===================================================================
--- src/mainboard/msi/ms9282/cache_as_ram_auto.c	(Revision 4815)
+++ src/mainboard/msi/ms9282/cache_as_ram_auto.c	(Arbeitskopie)
@@ -38,8 +38,6 @@
 //if we want to wait for core1 done before DQS training, set it to 0
 #define K8_SET_FIDVID_CORE0_ONLY 1
 
-#define DEBUG_SMBUS 1
-
 #include <stdint.h>
 #include <string.h>
 #include <device/pci_def.h>
Index: src/mainboard/msi/ms9185/cache_as_ram_auto.c
===================================================================
--- src/mainboard/msi/ms9185/cache_as_ram_auto.c	(Revision 4815)
+++ src/mainboard/msi/ms9185/cache_as_ram_auto.c	(Arbeitskopie)
@@ -44,8 +44,6 @@
 //if we want to wait for core1 done before DQS training, set it to 0
 #define K8_SET_FIDVID_CORE0_ONLY 1
 
-#define DEBUG_SMBUS 1
-
 #include <stdint.h>
 #include <string.h>
 #include <device/pci_def.h>
Index: src/mainboard/msi/ms7260/cache_as_ram_auto.c
===================================================================
--- src/mainboard/msi/ms7260/cache_as_ram_auto.c	(Revision 4815)
+++ src/mainboard/msi/ms7260/cache_as_ram_auto.c	(Arbeitskopie)
@@ -24,7 +24,6 @@
 #define __ROMCC__
 
 // #define CACHE_AS_RAM_ADDRESS_DEBUG 1
-// #define DEBUG_SMBUS 1
 // #define RAM_TIMING_DEBUG 1
 // #define DQS_TRAIN_DEBUG 1
 // #define RES_DEBUG 1
Index: src/mainboard/asus/a8v-e_se/cache_as_ram_auto.c
===================================================================
--- src/mainboard/asus/a8v-e_se/cache_as_ram_auto.c	(Revision 4815)
+++ src/mainboard/asus/a8v-e_se/cache_as_ram_auto.c	(Arbeitskopie)
@@ -40,8 +40,6 @@
 /* If we want to wait for core1 done before DQS training, set it to 0. */
 #define K8_SET_FIDVID_CORE0_ONLY 1
 
-/* #define DEBUG_SMBUS 1 */
-
 #include <stdint.h>
 #include <string.h>
 #include <device/pci_def.h>
@@ -59,10 +57,10 @@
 #include "lib/delay.c"
 #include "cpu/x86/lapic/boot_cpu.c"
 #include "northbridge/amd/amdk8/reset_test.c"
-#include "northbridge/amd/amdk8/debug.c"
 #include "northbridge/amd/amdk8/early_ht.c"
 #include "superio/winbond/w83627ehg/w83627ehg_early_serial.c"
 #include "southbridge/via/vt8237r/vt8237r_early_smbus.c"
+#include "northbridge/amd/amdk8/debug.c" /* After vt8237r_early_smbus.c! */
 #include "cpu/amd/mtrr/amd_earlymtrr.c"
 #include "cpu/x86/bist.h"
 #include "northbridge/amd/amdk8/setup_resource_map.c"
Index: src/mainboard/asus/a8n_e/cache_as_ram_auto.c
===================================================================
--- src/mainboard/asus/a8n_e/cache_as_ram_auto.c	(Revision 4815)
+++ src/mainboard/asus/a8n_e/cache_as_ram_auto.c	(Arbeitskopie)
@@ -30,9 +30,6 @@
 /* Used by raminit. */
 #define QRANK_DIMM_SUPPORT 1
 
-/* Turn this on for SMBus debugging output. */
-#define DEBUG_SMBUS 0
-
 #if CONFIG_LOGICAL_CPUS == 1
 #define SET_NB_CFG_54 1
 #endif
Index: src/mainboard/asus/m2v-mx_se/cache_as_ram_auto.c
===================================================================
--- src/mainboard/asus/m2v-mx_se/cache_as_ram_auto.c	(Revision 4815)
+++ src/mainboard/asus/m2v-mx_se/cache_as_ram_auto.c	(Arbeitskopie)
@@ -44,8 +44,6 @@
 #define K8_REV_F_SUPPORT_F0_F1_WORKAROUND 0
 #endif
 
-/* #define DEBUG_SMBUS 1 */
-
 #include <stdint.h>
 #include <string.h>
 #include <device/pci_def.h>
Index: src/config/Options.lb
===================================================================
--- src/config/Options.lb	(Revision 4815)
+++ src/config/Options.lb	(Arbeitskopie)
@@ -1162,3 +1162,21 @@
 	comment "Leave a hole for PCIe config space in the device allocator"
 end
 
+define CONFIG_DEBUG_RAM_SETUP
+	default 0
+	export always
+	comment "Output verbose RAM init debug messages"
+end
+
+define CONFIG_DEBUG_SMBUS
+	default 0
+	export always
+	comment "Output verbose SMBus debug messages"
+end
+
+define CONFIG_DEBUG_SMI
+	default 0
+	export always
+	comment "Output verbose SMI debug messages"
+end
+
Index: src/northbridge/via/cx700/raminit.c
===================================================================
--- src/northbridge/via/cx700/raminit.c	(Revision 4815)
+++ src/northbridge/via/cx700/raminit.c	(Arbeitskopie)
@@ -24,10 +24,8 @@
 #include <delay.h>
 #include "cx700_registers.h"
 
-// #define DEBUG_RAM_SETUP 1
-
 /* Debugging macros. */
-#if defined(DEBUG_RAM_SETUP)
+#if CONFIG_DEBUG_RAM_SETUP
 #define PRINTK_DEBUG(x...)      printk_debug(x)
 #else
 #define PRINTK_DEBUG(x...)
Index: src/northbridge/via/cx700/cx700_early_smbus.c
===================================================================
--- src/northbridge/via/cx700/cx700_early_smbus.c	(Revision 4815)
+++ src/northbridge/via/cx700/cx700_early_smbus.c	(Arbeitskopie)
@@ -48,10 +48,7 @@
 #define SMBUS_DELAY()		outb(0x80, 0x80)
 
 /* Debugging macros. */
-
-// #define DEBUG_SMBUS 1
-
-#ifdef DEBUG_SMBUS
+#if CONFIG_DEBUG_SMBUS
 #define PRINT_DEBUG(x)		print_debug(x)
 #define PRINT_DEBUG_HEX16(x)	print_debug_hex16(x)
 #else
@@ -102,7 +99,7 @@
 		SMBUS_DELAY();
 		++loops;
 	}
-#ifdef DEBUG_SMBUS
+#if CONFIG_DEBUG_SMBUS
 	/* 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
 	 * working.
@@ -234,7 +231,7 @@
 }
 
 /* Debugging Function */
-#ifdef DEBUG_SMBUS
+#ifdef CONFIG_DEBUG_SMBUS
 static void dump_spd_data(const struct mem_controller *ctrl)
 {
 	int dimm, offset, regs;
Index: src/northbridge/via/vx800/raminit.c
===================================================================
--- src/northbridge/via/vx800/raminit.c	(Revision 4815)
+++ src/northbridge/via/vx800/raminit.c	(Arbeitskopie)
@@ -21,9 +21,7 @@
 #include <sdram_mode.h>
 #include <delay.h>
 
-#define DEBUG_RAM_SETUP 1
-
-#ifdef DEBUG_RAM_SETUP
+#if CONFIG_DEBUG_RAM_SETUP
 #define PRINT_DEBUG_MEM(x)		print_debug(x)
 #define PRINT_DEBUG_MEM_HEX8(x)		print_debug_hex8(x)
 #define PRINT_DEBUG_MEM_HEX16(x)	print_debug_hex16(x)
Index: src/northbridge/via/vx800/vx800_early_smbus.c
===================================================================
--- src/northbridge/via/vx800/vx800_early_smbus.c	(Revision 4815)
+++ src/northbridge/via/vx800/vx800_early_smbus.c	(Arbeitskopie)
@@ -49,11 +49,7 @@
 
 #define SMBUS_DELAY()		outb(0x80, 0x80)
 
-/* Debugging macros. Only necessary if something isn't working right */
-
-#define DEBUG_SMBUS 1
-
-#ifdef DEBUG_SMBUS
+#ifdef CONFIG_DEBUG_SMBUS
 #define PRINT_DEBUG(x)		print_debug(x)
 #define PRINT_DEBUG_HEX16(x)	print_debug_hex16(x)
 #else
@@ -289,7 +285,7 @@
 }
 
 /* Debugging Function */
-#ifdef DEBUG_SMBUS
+#if CONFIG_DEBUG_SMBUS
 static void dump_spd_data(void)
 {
 	int dimm, offset, regs;
Index: src/northbridge/via/cn700/raminit.c
===================================================================
--- src/northbridge/via/cn700/raminit.c	(Revision 4815)
+++ src/northbridge/via/cn700/raminit.c	(Arbeitskopie)
@@ -25,9 +25,7 @@
 #include <delay.h>
 #include "cn700.h"
 
-// #define DEBUG_RAM_SETUP 1
-
-#ifdef DEBUG_RAM_SETUP
+#ifdef CONFIG_DEBUG_RAM_SETUP
 #define PRINT_DEBUG_MEM(x)		print_debug(x)
 #define PRINT_DEBUG_MEM_HEX8(x)		print_debug_hex8(x)
 #define PRINT_DEBUG_MEM_HEX16(x)	print_debug_hex16(x)
@@ -51,12 +49,6 @@
 	reg &= 0xf8;		/* Clear bits 2-0. */
 	reg |= command;
 	pci_write_config8(dev, DRAM_MISC_CTL, reg);
-
-	PRINT_DEBUG_MEM("    Sending RAM command 0x");
-	PRINT_DEBUG_MEM_HEX8(reg);
-	PRINT_DEBUG_MEM(" to 0x");
-	PRINT_DEBUG_MEM_HEX32(0 + addr_offset);
-	PRINT_DEBUG_MEM("\r\n");
 }
 
 /**
Index: src/northbridge/amd/amdk8/raminit_f.c
===================================================================
--- src/northbridge/amd/amdk8/raminit_f.c	(Revision 4815)
+++ src/northbridge/amd/amdk8/raminit_f.c	(Arbeitskopie)
@@ -39,9 +39,7 @@
 #error This file needs CONFIG_USE_PRINTK_IN_CAR
 #endif
 
-#define RAM_TIMING_DEBUG 0
-
-#if RAM_TIMING_DEBUG == 1
+#if DEBUG_RAM_SETUP
 #define printk_raminit printk_debug
 #else
 #define printk_raminit(fmt, arg...)
Index: src/northbridge/amd/amdk8/debug.c
===================================================================
--- src/northbridge/amd/amdk8/debug.c	(Revision 4815)
+++ src/northbridge/amd/amdk8/debug.c	(Arbeitskopie)
@@ -174,11 +174,8 @@
 	}
 }
 
-#ifndef DEBUG_SMBUS
-#define DEBUG_SMBUS 0
-#endif
+#if CONFIG_DEBUG_SMBUS
 
-#if DEBUG_SMBUS == 1
 static void dump_spd_registers(const struct mem_controller *ctrl)
 {
 	int i;
Index: src/northbridge/amd/amdfam10/debug.c
===================================================================
--- src/northbridge/amd/amdfam10/debug.c	(Revision 4815)
+++ src/northbridge/amd/amdfam10/debug.c	(Arbeitskopie)
@@ -220,12 +220,8 @@
 	}
 }
 
-#ifndef DEBUG_SMBUS
-#define DEBUG_SMBUS 0
-#endif
+#if CONFIG_DEBUG_SMBUS
 
-#if DEBUG_SMBUS == 1
-
 static void dump_spd_registers(const struct mem_controller *ctrl)
 {
 	int i;
Index: src/northbridge/amd/amdfam10/raminit_amdmct.c
===================================================================
--- src/northbridge/amd/amdfam10/raminit_amdmct.c	(Revision 4815)
+++ src/northbridge/amd/amdfam10/raminit_amdmct.c	(Arbeitskopie)
@@ -23,21 +23,16 @@
 	printk_debug("%s%08x\n", strval, val);
 }
 
-
-#define RAMINIT_DEBUG 1
-
-
 static  void print_tx(const char *strval, u32 val)
 {
-#if RAMINIT_DEBUG == 1
+#if CONFIG_DEBUG_RAM_SETUP
 	print_raminit(strval, val);
 #endif
 }
 
-
 static  void print_t(const char *strval)
 {
-#if RAMINIT_DEBUG == 1
+#if CONFIG_DEBUG_RAM_SETUP
 	print_debug(strval);
 #endif
 }
Index: src/northbridge/intel/e7501/raminit.c
===================================================================
--- src/northbridge/intel/e7501/raminit.c	(Revision 4815)
+++ src/northbridge/intel/e7501/raminit.c	(Arbeitskopie)
@@ -22,10 +22,7 @@
 // Unfortunately the code seems to chew up several K of space.
 //#define VALIDATE_DIMM_COMPATIBILITY
 
-// Uncomment this to enable local debugging messages
-//#define DEBUG_RAM_CONFIG
-
-#if defined(DEBUG_RAM_CONFIG)
+#if CONFIG_DEBUG_RAM_SETUP
 #define RAM_DEBUG_MESSAGE(x)	print_debug(x)
 #define RAM_DEBUG_HEX32(x)		print_debug_hex32(x)
 #define RAM_DEBUG_HEX8(x)		print_debug_hex8(x)
Index: src/northbridge/intel/i855pm/raminit.c
===================================================================
--- src/northbridge/intel/i855pm/raminit.c	(Revision 4815)
+++ src/northbridge/intel/i855pm/raminit.c	(Arbeitskopie)
@@ -17,6 +17,7 @@
 
 /* converted to C 6/2004 yhlu */
 
+/* TODO: Fix code to use CONFIG_DEBUG_RAM_SETUP. */
 #define DEBUG_RAM_CONFIG 2
 #undef ASM_CONSOLE_LOGLEVEL
 #define ASM_CONSOLE_LOGLEVEL 8
Index: src/northbridge/intel/i440bx/raminit.c
===================================================================
--- src/northbridge/intel/i440bx/raminit.c	(Revision 4815)
+++ src/northbridge/intel/i440bx/raminit.c	(Arbeitskopie)
@@ -28,11 +28,8 @@
 Macros and definitions.
 -----------------------------------------------------------------------------*/
 
-/* Uncomment this to enable debugging output. */
-#define DEBUG_RAM_SETUP 1
-
 /* Debugging macros. */
-#if defined(DEBUG_RAM_SETUP)
+#if CONFIG_DEBUG_RAM_SETUP
 #define PRINT_DEBUG(x)		print_debug(x)
 #define PRINT_DEBUG_HEX8(x)	print_debug_hex8(x)
 #define PRINT_DEBUG_HEX16(x)	print_debug_hex16(x)
Index: src/northbridge/intel/i945/raminit.c
===================================================================
--- src/northbridge/intel/i945/raminit.c	(Revision 4815)
+++ src/northbridge/intel/i945/raminit.c	(Arbeitskopie)
@@ -24,10 +24,8 @@
 #include "raminit.h"
 #include "i945.h"
 
-#define DEBUG_RAM_SETUP
-
 /* Debugging macros. */
-#if defined(DEBUG_RAM_SETUP)
+#if CONFIG_DEBUG_RAM_SETUP
 #define PRINTK_DEBUG(x...)	printk_debug(x)
 #else
 #define PRINTK_DEBUG(x...)
@@ -73,7 +71,7 @@
 	read32(offset);
 }
 
-#ifdef DEBUG_RAM_SETUP
+#if CONFIG_DEBUG_RAM_SETUP
 static void sdram_dump_mchbar_registers(void)
 {
 	int i;
Index: src/northbridge/intel/i82810/raminit.c
===================================================================
--- src/northbridge/intel/i82810/raminit.c	(Revision 4815)
+++ src/northbridge/intel/i82810/raminit.c	(Arbeitskopie)
@@ -29,11 +29,8 @@
 Macros and definitions.
 -----------------------------------------------------------------------------*/
 
-/* Uncomment this to enable debugging output. */
-// #define DEBUG_RAM_SETUP 1
-
 /* Debugging macros. */
-#if defined(DEBUG_RAM_SETUP)
+#if CONFIG_DEBUG_RAM_SETUP
 #define PRINT_DEBUG(x)		print_debug(x)
 #define PRINT_DEBUG_HEX8(x)	print_debug_hex8(x)
 #define PRINT_DEBUG_HEX16(x)	print_debug_hex16(x)
Index: src/northbridge/intel/i82830/raminit.c
===================================================================
--- src/northbridge/intel/i82830/raminit.c	(Revision 4815)
+++ src/northbridge/intel/i82830/raminit.c	(Arbeitskopie)
@@ -29,11 +29,8 @@
 Macros and definitions.
 -----------------------------------------------------------------------------*/
 
-/* Uncomment this to enable debugging output. */
-/* #define DEBUG_RAM_SETUP 1 */
-
 /* Debugging macros. */
-#if defined(DEBUG_RAM_SETUP)
+#if CONFIG_DEBUG_RAM_SETUP
 #define PRINT_DEBUG(x)		print_debug(x)
 #define PRINT_DEBUG_HEX8(x)	print_debug_hex8(x)
 #define PRINT_DEBUG_HEX16(x)	print_debug_hex16(x)
-- 
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to