- Add rules that build either 4 or 5 ssdts (only those variants exist in the board now)
- Change ACPI_SSDTX_NUM to either 4 or 5 for boards that have ssdtX.asl
  files, according to the number of ssdtX.asl there.
- Remove custom ssdt rules

Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>
Acked-by: Peter Stuge <peter@stuge.se>


git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5176 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
diff --git a/src/arch/i386/Makefile.inc b/src/arch/i386/Makefile.inc
index 2231895..e24bd1b 100644
--- a/src/arch/i386/Makefile.inc
+++ b/src/arch/i386/Makefile.inc
@@ -202,6 +202,15 @@
 ifeq ($(CONFIG_GENERATE_ACPI_TABLES),y)
 objs += $(obj)/mainboard/$(MAINBOARDDIR)/acpi_tables.o
 objs += $(obj)/mainboard/$(MAINBOARDDIR)/dsdt.o
+# make doesn't have arithmetic operators or greater-than comparisons
+ifeq ($(subst 5,4,$(CONFIG_ACPI_SSDTX_NUM)),4)
+objs += $(obj)/mainboard/$(MAINBOARDDIR)/ssdt2.o
+objs += $(obj)/mainboard/$(MAINBOARDDIR)/ssdt3.o
+objs += $(obj)/mainboard/$(MAINBOARDDIR)/ssdt4.o
+endif
+ifeq ($(CONFIG_ACPI_SSDTX_NUM),5)
+objs += $(obj)/mainboard/$(MAINBOARDDIR)/ssdt5.o
+endif
 ifeq ($(CONFIG_BOARD_HAS_FADT),y)
 objs += $(obj)/mainboard/$(MAINBOARDDIR)/fadt.o
 endif
diff --git a/src/mainboard/amd/serengeti_cheetah/Kconfig b/src/mainboard/amd/serengeti_cheetah/Kconfig
index 84ef676..2814654 100644
--- a/src/mainboard/amd/serengeti_cheetah/Kconfig
+++ b/src/mainboard/amd/serengeti_cheetah/Kconfig
@@ -128,5 +128,5 @@
 
 config ACPI_SSDTX_NUM
 	int
-	default 1
+	default 4
 	depends on BOARD_AMD_SERENGETI_CHEETAH
diff --git a/src/mainboard/amd/serengeti_cheetah/Makefile.inc b/src/mainboard/amd/serengeti_cheetah/Makefile.inc
index f2b4800..8f4424e 100644
--- a/src/mainboard/amd/serengeti_cheetah/Makefile.inc
+++ b/src/mainboard/amd/serengeti_cheetah/Makefile.inc
@@ -17,9 +17,4 @@
 ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 ##
 
-# Needed by irq_tables and mptable and acpi_tables.
-obj-$(CONFIG_GENERATE_ACPI_TABLES) += ssdt2.o
-obj-$(CONFIG_GENERATE_ACPI_TABLES) += ssdt3.o
-obj-$(CONFIG_GENERATE_ACPI_TABLES) += ssdt4.o
-
 obj-y += ../../../drivers/i2c/i2cmux/i2cmux.o
diff --git a/src/mainboard/amd/serengeti_cheetah_fam10/Kconfig b/src/mainboard/amd/serengeti_cheetah_fam10/Kconfig
index 075ef91..f74e40c 100644
--- a/src/mainboard/amd/serengeti_cheetah_fam10/Kconfig
+++ b/src/mainboard/amd/serengeti_cheetah_fam10/Kconfig
@@ -116,7 +116,7 @@
 
 config ACPI_SSDTX_NUM
 	int
-	default 31
+	default 5
 	depends on BOARD_AMD_SERENGETI_CHEETAH_FAM10
 
 config MAINBOARD_PCI_SUBSYSTEM_DEVICE_ID
diff --git a/src/mainboard/amd/serengeti_cheetah_fam10/Makefile.inc b/src/mainboard/amd/serengeti_cheetah_fam10/Makefile.inc
index a0339ee..78e805d2 100644
--- a/src/mainboard/amd/serengeti_cheetah_fam10/Makefile.inc
+++ b/src/mainboard/amd/serengeti_cheetah_fam10/Makefile.inc
@@ -17,12 +17,4 @@
 ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 ##
 
-# Needed by irq_tables and mptable and acpi_tables.
-
-# ./ssdt.o is in northbridge/amd/amdfam10/Makefile.inc
-obj-$(CONFIG_GENERATE_ACPI_TABLES) += ssdt2.o
-obj-$(CONFIG_GENERATE_ACPI_TABLES) += ssdt3.o
-obj-$(CONFIG_GENERATE_ACPI_TABLES) += ssdt4.o
-obj-$(CONFIG_GENERATE_ACPI_TABLES) += ssdt5.o
-
 obj-y += ../../../drivers/i2c/i2cmux2/i2cmux2.o
diff --git a/src/mainboard/iwill/dk8_htx/Kconfig b/src/mainboard/iwill/dk8_htx/Kconfig
index 5250e4d..098e29b 100644
--- a/src/mainboard/iwill/dk8_htx/Kconfig
+++ b/src/mainboard/iwill/dk8_htx/Kconfig
@@ -122,5 +122,5 @@
 
 config ACPI_SSDTX_NUM
 	int
-	default 3
+	default 5
 	depends on BOARD_IWILL_DK8_HTX
diff --git a/src/mainboard/iwill/dk8_htx/Makefile.inc b/src/mainboard/iwill/dk8_htx/Makefile.inc
deleted file mode 100644
index 2537702..0000000
--- a/src/mainboard/iwill/dk8_htx/Makefile.inc
+++ /dev/null
@@ -1,24 +0,0 @@
-##
-## This file is part of the coreboot project.
-##
-## Copyright (C) 2007-2008 coresystems GmbH
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; version 2 of the License.
-##
-## This program is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with this program; if not, write to the Free Software
-## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-##
-
-# Needed by irq_tables and mptable and acpi_tables.
-obj-$(CONFIG_GENERATE_ACPI_TABLES) += ssdt2.o
-obj-$(CONFIG_GENERATE_ACPI_TABLES) += ssdt3.o
-obj-$(CONFIG_GENERATE_ACPI_TABLES) += ssdt4.o
-obj-$(CONFIG_GENERATE_ACPI_TABLES) += ssdt5.o
diff --git a/src/mainboard/tyan/s2912/Kconfig b/src/mainboard/tyan/s2912/Kconfig
index 83cf5e5..790e2cc 100644
--- a/src/mainboard/tyan/s2912/Kconfig
+++ b/src/mainboard/tyan/s2912/Kconfig
@@ -140,8 +140,3 @@
 	int
 	default 11
 	depends on BOARD_TYAN_S2912
-
-config ACPI_SSDTX_NUM
-	int
-	default 3
-	depends on BOARD_TYAN_S2912
diff --git a/src/mainboard/tyan/s2912_fam10/Kconfig b/src/mainboard/tyan/s2912_fam10/Kconfig
index 23e18ba..c71ffd8 100644
--- a/src/mainboard/tyan/s2912_fam10/Kconfig
+++ b/src/mainboard/tyan/s2912_fam10/Kconfig
@@ -153,11 +153,6 @@
 	default n
 	depends on BOARD_TYAN_S2912_FAM10
 
-config ACPI_SSDTX_NUM
-	int
-	default 31
-	depends on BOARD_TYAN_S2912_FAM10
-
 config RAMBASE
 	hex
 	default 0x200000