drop COREBOOT_V2 and COREBOOT_V4 define. We're not sharing code with v3 anymore
so this ugly hack is no longer needed.

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>

Index: src/Kconfig
===================================================================
--- src/Kconfig	(revision 5039)
+++ src/Kconfig	(working copy)
@@ -115,14 +115,6 @@
 	hex
 	default 0x4000
 
-config COREBOOT_V2
-	bool
-	default y
-
-config COREBOOT_V4
-	bool
-	default y
-
 config DEBUG
 	bool
 	default n
Index: src/config/Options.lb
===================================================================
--- src/config/Options.lb	(revision 5039)
+++ src/config/Options.lb	(working copy)
@@ -176,12 +176,6 @@
 	comment "Use stage 1 initialization code"
 end
 
-define CONFIG_COREBOOT_V2
-	default 1
-	export always
-	comment "This is used by code to determine v2 vs v3"
-end
-
 ###############################################
 # ROM image options
 ###############################################
Index: util/x86emu/include/x86emu/x86emu.h
===================================================================
--- util/x86emu/include/x86emu/x86emu.h	(revision 5039)
+++ util/x86emu/include/x86emu/x86emu.h	(working copy)
@@ -43,7 +43,6 @@
 #define __X86EMU_X86EMU_H
 
 /* FIXME: redefine printk for the moment */
-#ifdef CONFIG_COREBOOT_V2
 #include <stddef.h>
 #include <console/console.h>
 #undef printk
@@ -51,9 +50,6 @@
 #if defined(CONFIG_DEBUG) && (CONFIG_DEBUG == 0)
 #undef CONFIG_DEBUG
 #endif
-#else
-#define printk printf
-#endif 
 
 #ifdef SCITECH
 #include "scitech.h"
Index: util/x86emu/biosemu.c
===================================================================
--- util/x86emu/biosemu.c	(revision 5039)
+++ util/x86emu/biosemu.c	(working copy)
@@ -37,13 +37,8 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
  */
 #include <string.h>
-#ifdef CONFIG_COREBOOT_V2
 #include <arch/io.h>
 #include <console/console.h>
-#else
-#include <io.h>
-#include <console.h>
-#endif
 #include <device/device.h>
 #include <device/pci.h>
 #include <device/pci_ids.h>
@@ -243,11 +238,7 @@
 		break;
 	case FIND_PCI_DEVICE:
 		/* FIXME: support SI != 0 */
-#ifdef CONFIG_COREBOOT_V2
 		dev = dev_find_device(X86_DX, X86_CX, dev);
-#else
-		dev = dev_find_pci_device(X86_DX, X86_CX, dev);
-#endif
 		if (dev != 0) {
 			X86_BH = dev->bus->secondary;
 			X86_BL = dev->path.pci.devfn;
Index: util/x86emu/x86_interrupts.c
===================================================================
--- util/x86emu/x86_interrupts.c	(revision 5039)
+++ util/x86emu/x86_interrupts.c	(working copy)
@@ -23,15 +23,10 @@
 #include <device/pci_ids.h>
 #include <device/pci_ops.h>
 #include <string.h>
-#ifdef CONFIG_COREBOOT_V2
 #include <console/console.h>
 #include <arch/io.h>
 #include <arch/registers.h>
 #define printk(x...) do_printk(x)
-#else
-#include <console.h>
-#include <io.h>
-#endif
 
 enum {
 	PCIBIOS_CHECK = 0xb101,
@@ -88,11 +83,7 @@
 		vendorid = regs->edx;
 		devindex = regs->esi;
 		dev = 0;
-#ifdef CONFIG_COREBOOT_V2
 		while ((dev = dev_find_device(vendorid, devid, dev))) {
-#else
-		while ((dev = dev_find_pci_device(vendorid, devid, dev))) {
-#endif
 			if (devindex <= 0)
 				break;
 			devindex--;
Index: util/x86emu/x86.c
===================================================================
--- util/x86emu/x86.c	(revision 5039)
+++ util/x86emu/x86.c	(working copy)
@@ -20,14 +20,10 @@
 #include <device/pci.h>
 #include <string.h>
 
-#ifdef CONFIG_COREBOOT_V2
 #include <arch/io.h>
 #include <arch/registers.h>
 #include <console/console.h>
 #define printk(x...) do_printk(x)
-#else
-#include <console.h>
-#endif
 
 #include <arch/interrupt.h>
 
Index: util/x86emu/x86emu/sys.c
===================================================================
--- util/x86emu/x86emu/sys.c	(revision 5039)
+++ util/x86emu/x86emu/sys.c	(working copy)
@@ -46,12 +46,8 @@
 #include "debug.h"
 #include "prim_ops.h"
 #if 1 /* Coreboot needs to map prinkf to printk. */
-#ifdef CONFIG_COREBOOT_V2
 #include "arch/io.h"
 #else
-#include "io.h"
-#endif
-#else
 #include <sys/io.h>
 #endif
 
Index: util/x86emu/yabel/device.c
===================================================================
--- util/x86emu/yabel/device.c	(revision 5039)
+++ util/x86emu/yabel/device.c	(working copy)
@@ -13,11 +13,7 @@
 
 
 #include "device.h"
-#ifdef CONFIG_COREBOOT_V2
 #include "compat/rtas.h"
-#else
-#include "rtas.h"
-#endif
 #include <string.h>
 #include "debug.h"
 
@@ -397,11 +393,7 @@
 {
 	u8 rval = 0;
 	//init bios_device struct
-#ifdef CONFIG_COREBOOT_V2
 	DEBUG_PRINTF("%s\n", __func__);
-#else
-	DEBUG_PRINTF("%s(%s)\n", __func__, device->dtsname);
-#endif
 	memset(&bios_device, 0, sizeof(bios_device));
 
 #ifndef CONFIG_PCI_OPTION_ROM_RUN_YABEL
Index: util/x86emu/yabel/compat/functions.c
===================================================================
--- util/x86emu/yabel/compat/functions.c	(revision 5039)
+++ util/x86emu/yabel/compat/functions.c	(working copy)
@@ -14,9 +14,6 @@
  */
 
 #include <types.h>
-#ifndef CONFIG_COREBOOT_V2
-#include <config.h>
-#endif
 #include <string.h>
 #include <device/device.h>
 
Index: util/x86emu/yabel/biosemu.c
===================================================================
--- util/x86emu/yabel/biosemu.c	(revision 5039)
+++ util/x86emu/yabel/biosemu.c	(working copy)
@@ -14,19 +14,12 @@
 #include <string.h>
 
 #include <types.h>
-#ifndef CONFIG_COREBOOT_V2
-#include <cpu.h>
-#endif
 
 #include "debug.h"
 
 #include <x86emu/x86emu.h>
 #include <x86emu/regs.h>
-#ifdef CONFIG_COREBOOT_V2
 #include "../x86emu/prim_ops.h"
-#else
-#include <x86emu/prim_ops.h>	// for push_word
-#endif
 
 #include "biosemu.h"
 #include "io.h"
@@ -35,11 +28,7 @@
 #include "device.h"
 #include "pmm.h"
 
-#ifdef CONFIG_COREBOOT_V2
 #include "compat/rtas.h"
-#else
-#include <rtas.h>
-#endif
 
 #include <device/device.h>
 
Index: util/x86emu/yabel/device.h
===================================================================
--- util/x86emu/yabel/device.h	(revision 5039)
+++ util/x86emu/yabel/device.h	(working copy)
@@ -15,14 +15,8 @@
 #define DEVICE_LIB_H
 
 #include <types.h>
-#ifdef CONFIG_COREBOOT_V2
 #include <arch/byteorder.h>
 #include "compat/of.h"
-#else
-#include <cpu.h>
-#include <byteorder.h>
-#include "of.h"
-#endif
 #include "debug.h"
 
 
Index: util/x86emu/yabel/io.c
===================================================================
--- util/x86emu/yabel/io.c	(revision 5039)
+++ util/x86emu/yabel/io.c	(working copy)
@@ -12,14 +12,8 @@
  *****************************************************************************/
 
 #include <types.h>
-#ifdef CONFIG_COREBOOT_V2
 #include "compat/rtas.h"
 #include "compat/time.h"
-#else
-#include <cpu.h>
-#include "rtas.h"
-#include <time.h>
-#endif
 #include "device.h"
 #include "debug.h"
 #include <x86emu/x86emu.h>
@@ -36,7 +30,7 @@
 //defined in net-snk/kernel/timer.c
 extern u64 get_time(void);
 
-#ifdef COREBOOT_V2
+#ifdef CONFIG_ARCH_X86
 #include <arch/io.h>
 #else
 // these are not used, only needed for linking,  must be overridden using X86emu_setupPioFuncs
Index: util/x86emu/yabel/vbe.c
===================================================================
--- util/x86emu/yabel/vbe.c	(revision 5039)
+++ util/x86emu/yabel/vbe.c	(working copy)
@@ -13,19 +13,12 @@
 
 #include <string.h>
 #include <types.h>
-#ifndef CONFIG_COREBOOT_V2
-#include <cpu.h>
-#endif
 
 #include "debug.h"
 
 #include <x86emu/x86emu.h>
 #include <x86emu/regs.h>
-#ifdef CONFIG_COREBOOT_V2
 #include "../x86emu/prim_ops.h"
-#else
-#include <x86emu/prim_ops.h>	// for push_word
-#endif
 
 #include "biosemu.h"
 #include "io.h"
Index: util/x86emu/yabel/mem.c
===================================================================
--- util/x86emu/yabel/mem.c	(revision 5039)
+++ util/x86emu/yabel/mem.c	(working copy)
@@ -12,18 +12,11 @@
  *****************************************************************************/
 
 #include <types.h>
-#ifndef CONFIG_COREBOOT_V2
-#include <cpu.h>
-#endif
 #include "debug.h"
 #include "device.h"
 #include "x86emu/x86emu.h"
 #include "biosemu.h"
-#ifdef CONFIG_COREBOOT_V2
 #include "compat/time.h"
-#else
-#include <time.h>
-#endif
 
 // define a check for access to certain (virtual) memory regions (interrupt handlers, BIOS Data Area, ...)
 #ifdef CONFIG_DEBUG
Index: util/x86emu/yabel/debug.c
===================================================================
--- util/x86emu/yabel/debug.c	(revision 5039)
+++ util/x86emu/yabel/debug.c	(working copy)
@@ -11,10 +11,6 @@
  *     IBM Corporation - initial implementation
  *****************************************************************************/
 
-#ifndef CONFIG_COREBOOT_V2
-#include <cpu.h>
-#endif
-
 #include "debug.h"
 
 u32 debug_flags = 0;
Index: util/x86emu/yabel/pmm.c
===================================================================
--- util/x86emu/yabel/pmm.c	(revision 5039)
+++ util/x86emu/yabel/pmm.c	(working copy)
@@ -10,11 +10,7 @@
  ****************************************************************************/
 
 #include <x86emu/x86emu.h>
-#ifdef CONFIG_COREBOOT_V2
 #include "../x86emu/prim_ops.h"
-#else
-#include <x86emu/prim_ops.h>
-#endif
 #include <string.h>
 
 #include "biosemu.h"
Index: util/x86emu/yabel/debug.h
===================================================================
--- util/x86emu/yabel/debug.h	(revision 5039)
+++ util/x86emu/yabel/debug.h	(working copy)
@@ -20,11 +20,7 @@
 extern void x86emu_dump_xregs(void);
 
 /* printf is not available in coreboot... use printk */
-#ifdef CONFIG_COREBOOT_V2
 #include <console/console.h>
-#else
-#include <console.h>
-#endif
 /* uurgs... yuck... x86emu/x86emu.h is redefining printk... we include it here
  * and use its redefinition of printk
  * TODO: FIX!!!! */
Index: util/x86emu/yabel/interrupt.c
===================================================================
--- util/x86emu/yabel/interrupt.c	(revision 5039)
+++ util/x86emu/yabel/interrupt.c	(working copy)
@@ -11,11 +11,7 @@
  *     IBM Corporation - initial implementation
  *****************************************************************************/
 
-#ifdef CONFIG_COREBOOT_V2
 #include "compat/rtas.h"
-#else
-#include <rtas.h>
-#endif
 
 #include "biosemu.h"
 #include "mem.h"
@@ -24,11 +20,7 @@
 #include "pmm.h"
 
 #include <x86emu/x86emu.h>
-#ifdef CONFIG_COREBOOT_V2
 #include "../x86emu/prim_ops.h"
-#else
-#include <x86emu/prim_ops.h>
-#endif
 
 #ifdef CONFIG_PCI_OPTION_ROM_RUN_YABEL
 #include <device/pci.h>
@@ -350,11 +342,7 @@
 				  __func__, M.x86.R_AX);
 		/* FixME: support SI != 0 */
 #if defined(CONFIG_YABEL_PCI_ACCESS_OTHER_DEVICES) && CONFIG_YABEL_PCI_ACCESS_OTHER_DEVICES==1
-#ifdef CONFIG_COREBOOT_V2
 		dev = dev_find_device(M.x86.R_DX, M.x86.R_CX, 0);
-#else
-		dev = dev_find_pci_device(M.x86.R_DX, M.x86.R_CX, 0);
-#endif
 		if (dev != 0) {
 			DEBUG_PRINTF_INTR
 			    ("%s(): function %x: PCI Find Device --> 0x%04x\n",
Index: util/compareboard/compareboard
===================================================================
--- util/compareboard/compareboard	(revision 5039)
+++ util/compareboard/compareboard	(working copy)
@@ -89,7 +89,6 @@
 	-e "/^CONFIG_SUPERIO_/ d" \
 	-e "/^CONFIG_GX1_VIDEOMODE_/ d" \
 	-e "/^CONFIG_CONSOLE_/ d" \
-	-e "/^CONFIG_COREBOOT_V4/ d" \
 	-e "/^CONFIG_PAYLOAD_/ d" \
 	-e "/^CONFIG_XIP_ROM_/ d" \
 	-e "/^CONFIG_MULTIBOOT/ d" \
Index: Makefile
===================================================================
--- Makefile	(revision 5039)
+++ Makefile	(working copy)
@@ -3,6 +3,7 @@
 ##
 ## Copyright (C) 2008 Advanced Micro Devices, Inc.
 ## Copyright (C) 2008 Uwe Hermann <uwe@hermann-uwe.de>
+## Copyright (C) 2009-2010 coresystems GmbH
 ##
 ## Redistribution and use in source and binary forms, with or without
 ## modification, are permitted provided that the following conditions
@@ -44,7 +45,6 @@
 export KERNELVERSION      := 2.3
 export KCONFIG_AUTOHEADER := $(obj)/config.h
 export KCONFIG_AUTOCONFIG := $(obj)/auto.conf
-export COREBOOT_V2	:= 1
 
 CONFIG_SHELL := sh
 KBUILD_DEFCONFIG := configs/defconfig
@@ -271,7 +271,6 @@
 	@printf "    GEN        build.h\n"
 	printf "#define COREBOOT_VERSION \"$(KERNELVERSION)\"\n" > $(obj)/build.h
 	printf "#define COREBOOT_EXTRA_VERSION \"$(COREBOOT_EXTRA_VERSION)\"\n" >> $(obj)/build.h
-	printf "#define COREBOOT_V2 \"$(COREBOOT_V2)\"\n" >> $(obj)/build.h
 	printf "#define COREBOOT_BUILD \"`LANG= date`\"\n" >> $(obj)/build.h
 	printf "\n" >> $(obj)/build.h
 	printf "#define COREBOOT_COMPILER \"$(shell LANG= $(CC) --version | head -n1)\"\n" >> $(obj)/build.h
