summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2019-01-03 11:38:37 +0200
committerKyösti Mälkki <kyosti.malkki@gmail.com>2019-01-04 17:20:08 +0000
commita2cfe9e90001fe11f7c7653c9917ea75dd082333 (patch)
treeb84bfda6b4278f37a38f57d3313128ea575843f2
parentd482c7dace772278d988682e94247e3801587ff7 (diff)
downloadcoreboot-a2cfe9e90001fe11f7c7653c9917ea75dd082333.tar.gz
coreboot-a2cfe9e90001fe11f7c7653c9917ea75dd082333.tar.bz2
coreboot-a2cfe9e90001fe11f7c7653c9917ea75dd082333.zip
amdfam10 boards: Add Makefiles and fix resourcemap.c
Also remove global ramstage-y += get_bus_conf.c, this is specific to amdfam10. Change-Id: I49b604ebff6bcfe85518b2c3896ab798c3c7878d Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/30629 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
-rw-r--r--src/arch/x86/Makefile.inc3
-rw-r--r--src/mainboard/advansus/a785e-i/Makefile.inc16
-rw-r--r--src/mainboard/advansus/a785e-i/resourcemap.c6
-rw-r--r--src/mainboard/advansus/a785e-i/romstage.c1
-rw-r--r--src/mainboard/amd/bimini_fam10/Makefile.inc16
-rw-r--r--src/mainboard/amd/bimini_fam10/resourcemap.c6
-rw-r--r--src/mainboard/amd/bimini_fam10/romstage.c1
-rw-r--r--src/mainboard/amd/mahogany_fam10/Makefile.inc16
-rw-r--r--src/mainboard/amd/mahogany_fam10/resourcemap.c6
-rw-r--r--src/mainboard/amd/mahogany_fam10/romstage.c1
-rw-r--r--src/mainboard/amd/serengeti_cheetah_fam10/Makefile.inc4
-rw-r--r--src/mainboard/amd/serengeti_cheetah_fam10/resourcemap.c6
-rw-r--r--src/mainboard/amd/serengeti_cheetah_fam10/romstage.c1
-rw-r--r--src/mainboard/amd/tilapia_fam10/Makefile.inc16
-rw-r--r--src/mainboard/amd/tilapia_fam10/resourcemap.c6
-rw-r--r--src/mainboard/amd/tilapia_fam10/romstage.c1
-rw-r--r--src/mainboard/asus/kcma-d8/Makefile.inc16
-rw-r--r--src/mainboard/asus/kcma-d8/resourcemap.c6
-rw-r--r--src/mainboard/asus/kcma-d8/romstage.c1
-rw-r--r--src/mainboard/asus/kfsn4-dre/Makefile.inc16
-rw-r--r--src/mainboard/asus/kfsn4-dre/resourcemap.c6
-rw-r--r--src/mainboard/asus/kfsn4-dre/romstage.c1
-rw-r--r--src/mainboard/asus/kgpe-d16/Makefile.inc16
-rw-r--r--src/mainboard/asus/kgpe-d16/resourcemap.c6
-rw-r--r--src/mainboard/asus/kgpe-d16/romstage.c1
-rw-r--r--src/mainboard/asus/m4a78-em/Makefile.inc16
-rw-r--r--src/mainboard/asus/m4a78-em/resourcemap.c6
-rw-r--r--src/mainboard/asus/m4a78-em/romstage.c1
-rw-r--r--src/mainboard/asus/m4a785-m/Makefile.inc16
-rw-r--r--src/mainboard/asus/m4a785-m/resourcemap.c6
-rw-r--r--src/mainboard/asus/m4a785-m/romstage.c1
-rw-r--r--src/mainboard/asus/m4a785t-m/Makefile.inc16
-rw-r--r--src/mainboard/asus/m5a88-v/Makefile.inc16
-rw-r--r--src/mainboard/asus/m5a88-v/resourcemap.c6
-rw-r--r--src/mainboard/asus/m5a88-v/romstage.c1
-rw-r--r--src/mainboard/avalue/eax-785e/Makefile.inc16
-rw-r--r--src/mainboard/avalue/eax-785e/resourcemap.c6
-rw-r--r--src/mainboard/avalue/eax-785e/romstage.c1
-rw-r--r--src/mainboard/gigabyte/ma785gm/Makefile.inc16
-rw-r--r--src/mainboard/gigabyte/ma785gm/resourcemap.c6
-rw-r--r--src/mainboard/gigabyte/ma785gm/romstage.c1
-rw-r--r--src/mainboard/gigabyte/ma785gmt/Makefile.inc16
-rw-r--r--src/mainboard/gigabyte/ma785gmt/resourcemap.c6
-rw-r--r--src/mainboard/gigabyte/ma785gmt/romstage.c1
-rw-r--r--src/mainboard/gigabyte/ma78gm/Makefile.inc16
-rw-r--r--src/mainboard/gigabyte/ma78gm/resourcemap.c6
-rw-r--r--src/mainboard/gigabyte/ma78gm/romstage.c1
-rw-r--r--src/mainboard/hp/dl165_g6_fam10/Makefile.inc14
-rw-r--r--src/mainboard/iei/kino-780am2-fam10/Makefile.inc16
-rw-r--r--src/mainboard/iei/kino-780am2-fam10/resourcemap.c6
-rw-r--r--src/mainboard/iei/kino-780am2-fam10/romstage.c1
-rw-r--r--src/mainboard/jetway/pa78vm5/Makefile.inc16
-rw-r--r--src/mainboard/jetway/pa78vm5/resourcemap.c6
-rw-r--r--src/mainboard/jetway/pa78vm5/romstage.c1
-rw-r--r--src/mainboard/msi/ms9652_fam10/Makefile.inc16
-rw-r--r--src/mainboard/msi/ms9652_fam10/resourcemap.c6
-rw-r--r--src/mainboard/msi/ms9652_fam10/romstage.c1
-rw-r--r--src/mainboard/supermicro/h8dmr_fam10/Makefile.inc16
-rw-r--r--src/mainboard/supermicro/h8dmr_fam10/resourcemap.c6
-rw-r--r--src/mainboard/supermicro/h8dmr_fam10/romstage.c1
-rw-r--r--src/mainboard/supermicro/h8qme_fam10/Makefile.inc16
-rw-r--r--src/mainboard/supermicro/h8qme_fam10/resourcemap.c6
-rw-r--r--src/mainboard/supermicro/h8qme_fam10/romstage.c1
-rw-r--r--src/mainboard/supermicro/h8scm_fam10/Makefile.inc16
-rw-r--r--src/mainboard/supermicro/h8scm_fam10/resourcemap.c6
-rw-r--r--src/mainboard/supermicro/h8scm_fam10/romstage.c1
-rw-r--r--src/mainboard/tyan/s2912_fam10/Makefile.inc16
-rw-r--r--src/mainboard/tyan/s2912_fam10/resourcemap.c6
-rw-r--r--src/mainboard/tyan/s2912_fam10/romstage.c1
-rw-r--r--src/northbridge/amd/amdfam10/amdfam10.h1
70 files changed, 479 insertions, 49 deletions
diff --git a/src/arch/x86/Makefile.inc b/src/arch/x86/Makefile.inc
index 0c554b0b803c..d6f9b6b0a0b4 100644
--- a/src/arch/x86/Makefile.inc
+++ b/src/arch/x86/Makefile.inc
@@ -378,9 +378,6 @@ ifneq ($(wildcard src/mainboard/$(MAINBOARDDIR)/smihandler.c),)
smm-srcs += src/mainboard/$(MAINBOARDDIR)/smihandler.c
endif
endif
-ifneq ($(wildcard src/mainboard/$(MAINBOARDDIR)/get_bus_conf.c),)
-ramstage-srcs += src/mainboard/$(MAINBOARDDIR)/get_bus_conf.c
-endif
ramstage-libs ?=
diff --git a/src/mainboard/advansus/a785e-i/Makefile.inc b/src/mainboard/advansus/a785e-i/Makefile.inc
new file mode 100644
index 000000000000..91d4b39c3249
--- /dev/null
+++ b/src/mainboard/advansus/a785e-i/Makefile.inc
@@ -0,0 +1,16 @@
+#
+# This file is part of the coreboot project.
+#
+# 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.
+#
+
+romstage-y += resourcemap.c
+
+ramstage-y += get_bus_conf.c
diff --git a/src/mainboard/advansus/a785e-i/resourcemap.c b/src/mainboard/advansus/a785e-i/resourcemap.c
index 19181fb2a95f..8390f49504a2 100644
--- a/src/mainboard/advansus/a785e-i/resourcemap.c
+++ b/src/mainboard/advansus/a785e-i/resourcemap.c
@@ -13,7 +13,11 @@
* GNU General Public License for more details.
*/
-static void setup_mb_resource_map(void)
+#include <arch/io.h>
+#include <commonlib/helpers.h>
+#include <northbridge/amd/amdfam10/amdfam10.h>
+
+void setup_mb_resource_map(void)
{
static const unsigned int register_values[] = {
/* Careful set limit registers before base registers which contain the enables */
diff --git a/src/mainboard/advansus/a785e-i/romstage.c b/src/mainboard/advansus/a785e-i/romstage.c
index c63c2feb35af..f9ea822c7f99 100644
--- a/src/mainboard/advansus/a785e-i/romstage.c
+++ b/src/mainboard/advansus/a785e-i/romstage.c
@@ -46,7 +46,6 @@
#include <arch/early_variables.h>
#include <cbmem.h>
-#include "resourcemap.c"
#include "cpu/amd/quadcore/quadcore.c"
#include "spd.h"
diff --git a/src/mainboard/amd/bimini_fam10/Makefile.inc b/src/mainboard/amd/bimini_fam10/Makefile.inc
new file mode 100644
index 000000000000..91d4b39c3249
--- /dev/null
+++ b/src/mainboard/amd/bimini_fam10/Makefile.inc
@@ -0,0 +1,16 @@
+#
+# This file is part of the coreboot project.
+#
+# 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.
+#
+
+romstage-y += resourcemap.c
+
+ramstage-y += get_bus_conf.c
diff --git a/src/mainboard/amd/bimini_fam10/resourcemap.c b/src/mainboard/amd/bimini_fam10/resourcemap.c
index b647f4812964..ce4351f8eb98 100644
--- a/src/mainboard/amd/bimini_fam10/resourcemap.c
+++ b/src/mainboard/amd/bimini_fam10/resourcemap.c
@@ -13,7 +13,11 @@
* GNU General Public License for more details.
*/
-static void setup_mb_resource_map(void)
+#include <arch/io.h>
+#include <commonlib/helpers.h>
+#include <northbridge/amd/amdfam10/amdfam10.h>
+
+void setup_mb_resource_map(void)
{
static const unsigned int register_values[] = {
/* Careful set limit registers before base registers which contain the enables */
diff --git a/src/mainboard/amd/bimini_fam10/romstage.c b/src/mainboard/amd/bimini_fam10/romstage.c
index 6c40f6e036e9..3d86b60afc44 100644
--- a/src/mainboard/amd/bimini_fam10/romstage.c
+++ b/src/mainboard/amd/bimini_fam10/romstage.c
@@ -45,7 +45,6 @@
#include "southbridge/amd/sb800/early_setup.c"
#include <spd.h>
-#include "resourcemap.c"
#include "cpu/amd/quadcore/quadcore.c"
void activate_spd_rom(const struct mem_controller *ctrl);
diff --git a/src/mainboard/amd/mahogany_fam10/Makefile.inc b/src/mainboard/amd/mahogany_fam10/Makefile.inc
new file mode 100644
index 000000000000..91d4b39c3249
--- /dev/null
+++ b/src/mainboard/amd/mahogany_fam10/Makefile.inc
@@ -0,0 +1,16 @@
+#
+# This file is part of the coreboot project.
+#
+# 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.
+#
+
+romstage-y += resourcemap.c
+
+ramstage-y += get_bus_conf.c
diff --git a/src/mainboard/amd/mahogany_fam10/resourcemap.c b/src/mainboard/amd/mahogany_fam10/resourcemap.c
index acdf645a54c4..a4a1d9251aa5 100644
--- a/src/mainboard/amd/mahogany_fam10/resourcemap.c
+++ b/src/mainboard/amd/mahogany_fam10/resourcemap.c
@@ -15,7 +15,11 @@
-static void setup_mb_resource_map(void)
+#include <arch/io.h>
+#include <commonlib/helpers.h>
+#include <northbridge/amd/amdfam10/amdfam10.h>
+
+void setup_mb_resource_map(void)
{
static const unsigned int register_values[] = {
/* Careful set limit registers before base registers which contain the enables */
diff --git a/src/mainboard/amd/mahogany_fam10/romstage.c b/src/mainboard/amd/mahogany_fam10/romstage.c
index ef7afdeb71ae..b0d23b2deca8 100644
--- a/src/mainboard/amd/mahogany_fam10/romstage.c
+++ b/src/mainboard/amd/mahogany_fam10/romstage.c
@@ -51,7 +51,6 @@
#define SERIAL_DEV PNP_DEV(0x2e, IT8718F_SP1)
-#include "resourcemap.c"
#include "cpu/amd/quadcore/quadcore.c"
void activate_spd_rom(const struct mem_controller *ctrl);
diff --git a/src/mainboard/amd/serengeti_cheetah_fam10/Makefile.inc b/src/mainboard/amd/serengeti_cheetah_fam10/Makefile.inc
index e826e8153a52..c9a38fab7e00 100644
--- a/src/mainboard/amd/serengeti_cheetah_fam10/Makefile.inc
+++ b/src/mainboard/amd/serengeti_cheetah_fam10/Makefile.inc
@@ -2,3 +2,7 @@ $(eval $(call asl_template,ssdt2))
$(eval $(call asl_template,ssdt3))
$(eval $(call asl_template,ssdt4))
$(eval $(call asl_template,ssdt5))
+
+romstage-y += resourcemap.c
+
+ramstage-y += get_bus_conf.c
diff --git a/src/mainboard/amd/serengeti_cheetah_fam10/resourcemap.c b/src/mainboard/amd/serengeti_cheetah_fam10/resourcemap.c
index 0e47c52784c1..2a2380a3f97e 100644
--- a/src/mainboard/amd/serengeti_cheetah_fam10/resourcemap.c
+++ b/src/mainboard/amd/serengeti_cheetah_fam10/resourcemap.c
@@ -13,7 +13,11 @@
* GNU General Public License for more details.
*/
-static void setup_mb_resource_map(void)
+#include <arch/io.h>
+#include <commonlib/helpers.h>
+#include <northbridge/amd/amdfam10/amdfam10.h>
+
+void setup_mb_resource_map(void)
{
static const unsigned int register_values[] = {
/* Careful set limit registers before base registers which contain the enables */
diff --git a/src/mainboard/amd/serengeti_cheetah_fam10/romstage.c b/src/mainboard/amd/serengeti_cheetah_fam10/romstage.c
index fcb10b1daa63..03d348410567 100644
--- a/src/mainboard/amd/serengeti_cheetah_fam10/romstage.c
+++ b/src/mainboard/amd/serengeti_cheetah_fam10/romstage.c
@@ -44,7 +44,6 @@
#include "southbridge/amd/amd8111/early_smbus.c"
#include "southbridge/amd/amd8111/early_ctrl.c"
-#include "resourcemap.c"
#include "cpu/amd/quadcore/quadcore.c"
#define SERIAL_DEV PNP_DEV(0x2e, W83627HF_SP1)
diff --git a/src/mainboard/amd/tilapia_fam10/Makefile.inc b/src/mainboard/amd/tilapia_fam10/Makefile.inc
new file mode 100644
index 000000000000..91d4b39c3249
--- /dev/null
+++ b/src/mainboard/amd/tilapia_fam10/Makefile.inc
@@ -0,0 +1,16 @@
+#
+# This file is part of the coreboot project.
+#
+# 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.
+#
+
+romstage-y += resourcemap.c
+
+ramstage-y += get_bus_conf.c
diff --git a/src/mainboard/amd/tilapia_fam10/resourcemap.c b/src/mainboard/amd/tilapia_fam10/resourcemap.c
index 5a4381424a83..37b6d207974c 100644
--- a/src/mainboard/amd/tilapia_fam10/resourcemap.c
+++ b/src/mainboard/amd/tilapia_fam10/resourcemap.c
@@ -13,7 +13,11 @@
* GNU General Public License for more details.
*/
-static void setup_mb_resource_map(void)
+#include <arch/io.h>
+#include <commonlib/helpers.h>
+#include <northbridge/amd/amdfam10/amdfam10.h>
+
+void setup_mb_resource_map(void)
{
static const unsigned int register_values[] = {
/* Careful set limit registers before base registers which contain the enables */
diff --git a/src/mainboard/amd/tilapia_fam10/romstage.c b/src/mainboard/amd/tilapia_fam10/romstage.c
index 0001f9326045..50c7a002dd17 100644
--- a/src/mainboard/amd/tilapia_fam10/romstage.c
+++ b/src/mainboard/amd/tilapia_fam10/romstage.c
@@ -47,7 +47,6 @@
#include <spd.h>
#include <southbridge/amd/rs780/rs780.h>
-#include "resourcemap.c"
#include "cpu/amd/quadcore/quadcore.c"
#define SERIAL_DEV PNP_DEV(0x2e, IT8718F_SP1)
diff --git a/src/mainboard/asus/kcma-d8/Makefile.inc b/src/mainboard/asus/kcma-d8/Makefile.inc
new file mode 100644
index 000000000000..91d4b39c3249
--- /dev/null
+++ b/src/mainboard/asus/kcma-d8/Makefile.inc
@@ -0,0 +1,16 @@
+#
+# This file is part of the coreboot project.
+#
+# 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.
+#
+
+romstage-y += resourcemap.c
+
+ramstage-y += get_bus_conf.c
diff --git a/src/mainboard/asus/kcma-d8/resourcemap.c b/src/mainboard/asus/kcma-d8/resourcemap.c
index 5e66c56251c9..0edc3d13647e 100644
--- a/src/mainboard/asus/kcma-d8/resourcemap.c
+++ b/src/mainboard/asus/kcma-d8/resourcemap.c
@@ -17,9 +17,11 @@
* GNU General Public License for more details.
*/
-#include <arch/cpu.h>
+#include <arch/io.h>
+#include <commonlib/helpers.h>
+#include <northbridge/amd/amdfam10/amdfam10.h>
-static void setup_mb_resource_map(void)
+void setup_mb_resource_map(void)
{
static const unsigned int fam15h_register_values[] = {
/* Careful set limit registers before base registers which contain the enables */
diff --git a/src/mainboard/asus/kcma-d8/romstage.c b/src/mainboard/asus/kcma-d8/romstage.c
index 12c0926f8719..caff4dfd1cc1 100644
--- a/src/mainboard/asus/kcma-d8/romstage.c
+++ b/src/mainboard/asus/kcma-d8/romstage.c
@@ -46,7 +46,6 @@
#include <arch/early_variables.h>
#include <cbmem.h>
-#include "resourcemap.c"
#include "cpu/amd/quadcore/quadcore.c"
#define SERIAL_0_DEV PNP_DEV(0x2e, W83667HG_A_SP1)
diff --git a/src/mainboard/asus/kfsn4-dre/Makefile.inc b/src/mainboard/asus/kfsn4-dre/Makefile.inc
new file mode 100644
index 000000000000..91d4b39c3249
--- /dev/null
+++ b/src/mainboard/asus/kfsn4-dre/Makefile.inc
@@ -0,0 +1,16 @@
+#
+# This file is part of the coreboot project.
+#
+# 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.
+#
+
+romstage-y += resourcemap.c
+
+ramstage-y += get_bus_conf.c
diff --git a/src/mainboard/asus/kfsn4-dre/resourcemap.c b/src/mainboard/asus/kfsn4-dre/resourcemap.c
index 9644201da4ca..3591488199d9 100644
--- a/src/mainboard/asus/kfsn4-dre/resourcemap.c
+++ b/src/mainboard/asus/kfsn4-dre/resourcemap.c
@@ -17,7 +17,11 @@
* GNU General Public License for more details.
*/
-static void setup_mb_resource_map(void)
+#include <arch/io.h>
+#include <commonlib/helpers.h>
+#include <northbridge/amd/amdfam10/amdfam10.h>
+
+void setup_mb_resource_map(void)
{
static const unsigned int register_values[] = {
/* Careful set limit registers before base registers which contain the enables */
diff --git a/src/mainboard/asus/kfsn4-dre/romstage.c b/src/mainboard/asus/kfsn4-dre/romstage.c
index b93372c372f3..99d437f9be2d 100644
--- a/src/mainboard/asus/kfsn4-dre/romstage.c
+++ b/src/mainboard/asus/kfsn4-dre/romstage.c
@@ -45,7 +45,6 @@
#include <northbridge/amd/amdfam10/raminit.h>
#include <cpu/amd/family_10h-family_15h/init_cpus.h>
-#include "resourcemap.c"
#include "cpu/amd/quadcore/quadcore.c"
#define SERIAL_DEV PNP_DEV(0x2e, W83627THG_SP1)
diff --git a/src/mainboard/asus/kgpe-d16/Makefile.inc b/src/mainboard/asus/kgpe-d16/Makefile.inc
new file mode 100644
index 000000000000..91d4b39c3249
--- /dev/null
+++ b/src/mainboard/asus/kgpe-d16/Makefile.inc
@@ -0,0 +1,16 @@
+#
+# This file is part of the coreboot project.
+#
+# 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.
+#
+
+romstage-y += resourcemap.c
+
+ramstage-y += get_bus_conf.c
diff --git a/src/mainboard/asus/kgpe-d16/resourcemap.c b/src/mainboard/asus/kgpe-d16/resourcemap.c
index 6d6e556183bf..b3c4465f87b0 100644
--- a/src/mainboard/asus/kgpe-d16/resourcemap.c
+++ b/src/mainboard/asus/kgpe-d16/resourcemap.c
@@ -17,9 +17,11 @@
* GNU General Public License for more details.
*/
-#include <arch/cpu.h>
+#include <arch/io.h>
+#include <commonlib/helpers.h>
+#include <northbridge/amd/amdfam10/amdfam10.h>
-static void setup_mb_resource_map(void)
+void setup_mb_resource_map(void)
{
static const unsigned int fam15h_register_values[] = {
/* Careful set limit registers before base registers which contain the enables */
diff --git a/src/mainboard/asus/kgpe-d16/romstage.c b/src/mainboard/asus/kgpe-d16/romstage.c
index 31ba25192c93..59ad0263f708 100644
--- a/src/mainboard/asus/kgpe-d16/romstage.c
+++ b/src/mainboard/asus/kgpe-d16/romstage.c
@@ -46,7 +46,6 @@
#include <arch/early_variables.h>
#include <cbmem.h>
-#include "resourcemap.c"
#include "cpu/amd/quadcore/quadcore.c"
#define SERIAL_0_DEV PNP_DEV(0x2e, W83667HG_A_SP1)
diff --git a/src/mainboard/asus/m4a78-em/Makefile.inc b/src/mainboard/asus/m4a78-em/Makefile.inc
new file mode 100644
index 000000000000..91d4b39c3249
--- /dev/null
+++ b/src/mainboard/asus/m4a78-em/Makefile.inc
@@ -0,0 +1,16 @@
+#
+# This file is part of the coreboot project.
+#
+# 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.
+#
+
+romstage-y += resourcemap.c
+
+ramstage-y += get_bus_conf.c
diff --git a/src/mainboard/asus/m4a78-em/resourcemap.c b/src/mainboard/asus/m4a78-em/resourcemap.c
index acdf645a54c4..a4a1d9251aa5 100644
--- a/src/mainboard/asus/m4a78-em/resourcemap.c
+++ b/src/mainboard/asus/m4a78-em/resourcemap.c
@@ -15,7 +15,11 @@
-static void setup_mb_resource_map(void)
+#include <arch/io.h>
+#include <commonlib/helpers.h>
+#include <northbridge/amd/amdfam10/amdfam10.h>
+
+void setup_mb_resource_map(void)
{
static const unsigned int register_values[] = {
/* Careful set limit registers before base registers which contain the enables */
diff --git a/src/mainboard/asus/m4a78-em/romstage.c b/src/mainboard/asus/m4a78-em/romstage.c
index 3175a027551f..87a5d77d7418 100644
--- a/src/mainboard/asus/m4a78-em/romstage.c
+++ b/src/mainboard/asus/m4a78-em/romstage.c
@@ -48,7 +48,6 @@
#include <spd.h>
#include <southbridge/amd/rs780/rs780.h>
-#include "resourcemap.c"
#include "cpu/amd/quadcore/quadcore.c"
#define SERIAL_DEV PNP_DEV(0x2e, IT8712F_SP1)
diff --git a/src/mainboard/asus/m4a785-m/Makefile.inc b/src/mainboard/asus/m4a785-m/Makefile.inc
new file mode 100644
index 000000000000..91d4b39c3249
--- /dev/null
+++ b/src/mainboard/asus/m4a785-m/Makefile.inc
@@ -0,0 +1,16 @@
+#
+# This file is part of the coreboot project.
+#
+# 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.
+#
+
+romstage-y += resourcemap.c
+
+ramstage-y += get_bus_conf.c
diff --git a/src/mainboard/asus/m4a785-m/resourcemap.c b/src/mainboard/asus/m4a785-m/resourcemap.c
index acdf645a54c4..a4a1d9251aa5 100644
--- a/src/mainboard/asus/m4a785-m/resourcemap.c
+++ b/src/mainboard/asus/m4a785-m/resourcemap.c
@@ -15,7 +15,11 @@
-static void setup_mb_resource_map(void)
+#include <arch/io.h>
+#include <commonlib/helpers.h>
+#include <northbridge/amd/amdfam10/amdfam10.h>
+
+void setup_mb_resource_map(void)
{
static const unsigned int register_values[] = {
/* Careful set limit registers before base registers which contain the enables */
diff --git a/src/mainboard/asus/m4a785-m/romstage.c b/src/mainboard/asus/m4a785-m/romstage.c
index 8dbaefa21dbe..02c396f93a28 100644
--- a/src/mainboard/asus/m4a785-m/romstage.c
+++ b/src/mainboard/asus/m4a785-m/romstage.c
@@ -49,7 +49,6 @@
#include <spd.h>
#include <southbridge/amd/rs780/rs780.h>
-#include "resourcemap.c"
#include "cpu/amd/quadcore/quadcore.c"
#define SERIAL_DEV PNP_DEV(0x2e, IT8712F_SP1)
diff --git a/src/mainboard/asus/m4a785t-m/Makefile.inc b/src/mainboard/asus/m4a785t-m/Makefile.inc
new file mode 100644
index 000000000000..7b6cdb0d737c
--- /dev/null
+++ b/src/mainboard/asus/m4a785t-m/Makefile.inc
@@ -0,0 +1,16 @@
+#
+# This file is part of the coreboot project.
+#
+# 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.
+#
+
+romstage-y += ../m4a785-m/resourcemap.c
+
+ramstage-y += ../m4a785-m/get_bus_conf.c
diff --git a/src/mainboard/asus/m5a88-v/Makefile.inc b/src/mainboard/asus/m5a88-v/Makefile.inc
new file mode 100644
index 000000000000..91d4b39c3249
--- /dev/null
+++ b/src/mainboard/asus/m5a88-v/Makefile.inc
@@ -0,0 +1,16 @@
+#
+# This file is part of the coreboot project.
+#
+# 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.
+#
+
+romstage-y += resourcemap.c
+
+ramstage-y += get_bus_conf.c
diff --git a/src/mainboard/asus/m5a88-v/resourcemap.c b/src/mainboard/asus/m5a88-v/resourcemap.c
index 2987b7c8fc0e..94ada1e867f0 100644
--- a/src/mainboard/asus/m5a88-v/resourcemap.c
+++ b/src/mainboard/asus/m5a88-v/resourcemap.c
@@ -13,7 +13,11 @@
* GNU General Public License for more details.
*/
-static void setup_mb_resource_map(void)
+#include <arch/io.h>
+#include <commonlib/helpers.h>
+#include <northbridge/amd/amdfam10/amdfam10.h>
+
+void setup_mb_resource_map(void)
{
static const unsigned int register_values[] = {
/* Careful set limit registers before base registers which contain the enables */
diff --git a/src/mainboard/asus/m5a88-v/romstage.c b/src/mainboard/asus/m5a88-v/romstage.c
index 3ad33ec862b6..4c2687f0c02f 100644
--- a/src/mainboard/asus/m5a88-v/romstage.c
+++ b/src/mainboard/asus/m5a88-v/romstage.c
@@ -48,7 +48,6 @@
#include "southbridge/amd/sb800/early_setup.c"
#include "spd.h"
-#include "resourcemap.c"
#include "cpu/amd/quadcore/quadcore.c"
#define SERIAL_DEV PNP_DEV(0x4e, IT8721F_SP1)
diff --git a/src/mainboard/avalue/eax-785e/Makefile.inc b/src/mainboard/avalue/eax-785e/Makefile.inc
new file mode 100644
index 000000000000..91d4b39c3249
--- /dev/null
+++ b/src/mainboard/avalue/eax-785e/Makefile.inc
@@ -0,0 +1,16 @@
+#
+# This file is part of the coreboot project.
+#
+# 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.
+#
+
+romstage-y += resourcemap.c
+
+ramstage-y += get_bus_conf.c
diff --git a/src/mainboard/avalue/eax-785e/resourcemap.c b/src/mainboard/avalue/eax-785e/resourcemap.c
index 19181fb2a95f..8390f49504a2 100644
--- a/src/mainboard/avalue/eax-785e/resourcemap.c
+++ b/src/mainboard/avalue/eax-785e/resourcemap.c
@@ -13,7 +13,11 @@
* GNU General Public License for more details.
*/
-static void setup_mb_resource_map(void)
+#include <arch/io.h>
+#include <commonlib/helpers.h>
+#include <northbridge/amd/amdfam10/amdfam10.h>
+
+void setup_mb_resource_map(void)
{
static const unsigned int register_values[] = {
/* Careful set limit registers before base registers which contain the enables */
diff --git a/src/mainboard/avalue/eax-785e/romstage.c b/src/mainboard/avalue/eax-785e/romstage.c
index 85ff722f5991..88cb7844c38a 100644
--- a/src/mainboard/avalue/eax-785e/romstage.c
+++ b/src/mainboard/avalue/eax-785e/romstage.c
@@ -46,7 +46,6 @@
#include <southbridge/amd/rs780/rs780.h>
#include <southbridge/amd/sb800/early_setup.c>
-#include "resourcemap.c"
#include "cpu/amd/quadcore/quadcore.c"
#define SERIAL_DEV PNP_DEV(0x2e, W83627HF_SP1)
diff --git a/src/mainboard/gigabyte/ma785gm/Makefile.inc b/src/mainboard/gigabyte/ma785gm/Makefile.inc
new file mode 100644
index 000000000000..91d4b39c3249
--- /dev/null
+++ b/src/mainboard/gigabyte/ma785gm/Makefile.inc
@@ -0,0 +1,16 @@
+#
+# This file is part of the coreboot project.
+#
+# 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.
+#
+
+romstage-y += resourcemap.c
+
+ramstage-y += get_bus_conf.c
diff --git a/src/mainboard/gigabyte/ma785gm/resourcemap.c b/src/mainboard/gigabyte/ma785gm/resourcemap.c
index acdf645a54c4..a4a1d9251aa5 100644
--- a/src/mainboard/gigabyte/ma785gm/resourcemap.c
+++ b/src/mainboard/gigabyte/ma785gm/resourcemap.c
@@ -15,7 +15,11 @@
-static void setup_mb_resource_map(void)
+#include <arch/io.h>
+#include <commonlib/helpers.h>
+#include <northbridge/amd/amdfam10/amdfam10.h>
+
+void setup_mb_resource_map(void)
{
static const unsigned int register_values[] = {
/* Careful set limit registers before base registers which contain the enables */
diff --git a/src/mainboard/gigabyte/ma785gm/romstage.c b/src/mainboard/gigabyte/ma785gm/romstage.c
index 3a777f2adb78..2a0a54b27688 100644
--- a/src/mainboard/gigabyte/ma785gm/romstage.c
+++ b/src/mainboard/gigabyte/ma785gm/romstage.c
@@ -45,7 +45,6 @@
#include <spd.h>
#include <southbridge/amd/rs780/rs780.h>
-#include "resourcemap.c"
#include "cpu/amd/quadcore/quadcore.c"
#define SERIAL_DEV PNP_DEV(0x2e, IT8718F_SP1)
diff --git a/src/mainboard/gigabyte/ma785gmt/Makefile.inc b/src/mainboard/gigabyte/ma785gmt/Makefile.inc
new file mode 100644
index 000000000000..91d4b39c3249
--- /dev/null
+++ b/src/mainboard/gigabyte/ma785gmt/Makefile.inc
@@ -0,0 +1,16 @@
+#
+# This file is part of the coreboot project.
+#
+# 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.
+#
+
+romstage-y += resourcemap.c
+
+ramstage-y += get_bus_conf.c
diff --git a/src/mainboard/gigabyte/ma785gmt/resourcemap.c b/src/mainboard/gigabyte/ma785gmt/resourcemap.c
index acdf645a54c4..a4a1d9251aa5 100644
--- a/src/mainboard/gigabyte/ma785gmt/resourcemap.c
+++ b/src/mainboard/gigabyte/ma785gmt/resourcemap.c
@@ -15,7 +15,11 @@
-static void setup_mb_resource_map(void)
+#include <arch/io.h>
+#include <commonlib/helpers.h>
+#include <northbridge/amd/amdfam10/amdfam10.h>
+
+void setup_mb_resource_map(void)
{
static const unsigned int register_values[] = {
/* Careful set limit registers before base registers which contain the enables */
diff --git a/src/mainboard/gigabyte/ma785gmt/romstage.c b/src/mainboard/gigabyte/ma785gmt/romstage.c
index d08e1e03ab6b..67cd4a8bd0a0 100644
--- a/src/mainboard/gigabyte/ma785gmt/romstage.c
+++ b/src/mainboard/gigabyte/ma785gmt/romstage.c
@@ -45,7 +45,6 @@
#include <spd.h>
#include <southbridge/amd/rs780/rs780.h>
-#include "resourcemap.c"
#include "cpu/amd/quadcore/quadcore.c"
#define SERIAL_DEV PNP_DEV(0x2e, IT8718F_SP1)
diff --git a/src/mainboard/gigabyte/ma78gm/Makefile.inc b/src/mainboard/gigabyte/ma78gm/Makefile.inc
new file mode 100644
index 000000000000..91d4b39c3249
--- /dev/null
+++ b/src/mainboard/gigabyte/ma78gm/Makefile.inc
@@ -0,0 +1,16 @@
+#
+# This file is part of the coreboot project.
+#
+# 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.
+#
+
+romstage-y += resourcemap.c
+
+ramstage-y += get_bus_conf.c
diff --git a/src/mainboard/gigabyte/ma78gm/resourcemap.c b/src/mainboard/gigabyte/ma78gm/resourcemap.c
index acdf645a54c4..a4a1d9251aa5 100644
--- a/src/mainboard/gigabyte/ma78gm/resourcemap.c
+++ b/src/mainboard/gigabyte/ma78gm/resourcemap.c
@@ -15,7 +15,11 @@
-static void setup_mb_resource_map(void)
+#include <arch/io.h>
+#include <commonlib/helpers.h>
+#include <northbridge/amd/amdfam10/amdfam10.h>
+
+void setup_mb_resource_map(void)
{
static const unsigned int register_values[] = {
/* Careful set limit registers before base registers which contain the enables */
diff --git a/src/mainboard/gigabyte/ma78gm/romstage.c b/src/mainboard/gigabyte/ma78gm/romstage.c
index 7e854980ec46..191a391d0f62 100644
--- a/src/mainboard/gigabyte/ma78gm/romstage.c
+++ b/src/mainboard/gigabyte/ma78gm/romstage.c
@@ -48,7 +48,6 @@
#include <cbmem.h>
#include <southbridge/amd/rs780/rs780.h>
-#include "resourcemap.c"
#include "cpu/amd/quadcore/quadcore.c"
#define SERIAL_DEV PNP_DEV(0x2e, IT8718F_SP1)
diff --git a/src/mainboard/hp/dl165_g6_fam10/Makefile.inc b/src/mainboard/hp/dl165_g6_fam10/Makefile.inc
new file mode 100644
index 000000000000..0fd5b079f57c
--- /dev/null
+++ b/src/mainboard/hp/dl165_g6_fam10/Makefile.inc
@@ -0,0 +1,14 @@
+#
+# This file is part of the coreboot project.
+#
+# 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.
+#
+
+ramstage-y += get_bus_conf.c
diff --git a/src/mainboard/iei/kino-780am2-fam10/Makefile.inc b/src/mainboard/iei/kino-780am2-fam10/Makefile.inc
new file mode 100644
index 000000000000..91d4b39c3249
--- /dev/null
+++ b/src/mainboard/iei/kino-780am2-fam10/Makefile.inc
@@ -0,0 +1,16 @@
+#
+# This file is part of the coreboot project.
+#
+# 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.
+#
+
+romstage-y += resourcemap.c
+
+ramstage-y += get_bus_conf.c
diff --git a/src/mainboard/iei/kino-780am2-fam10/resourcemap.c b/src/mainboard/iei/kino-780am2-fam10/resourcemap.c
index acdf645a54c4..a4a1d9251aa5 100644
--- a/src/mainboard/iei/kino-780am2-fam10/resourcemap.c
+++ b/src/mainboard/iei/kino-780am2-fam10/resourcemap.c
@@ -15,7 +15,11 @@
-static void setup_mb_resource_map(void)
+#include <arch/io.h>
+#include <commonlib/helpers.h>
+#include <northbridge/amd/amdfam10/amdfam10.h>
+
+void setup_mb_resource_map(void)
{
static const unsigned int register_values[] = {
/* Careful set limit registers before base registers which contain the enables */
diff --git a/src/mainboard/iei/kino-780am2-fam10/romstage.c b/src/mainboard/iei/kino-780am2-fam10/romstage.c
index 72146e7ef426..1a89343a13fd 100644
--- a/src/mainboard/iei/kino-780am2-fam10/romstage.c
+++ b/src/mainboard/iei/kino-780am2-fam10/romstage.c
@@ -48,7 +48,6 @@
#include <cbmem.h>
#include <southbridge/amd/rs780/rs780.h>
-#include "resourcemap.c"
#include "cpu/amd/quadcore/quadcore.c"
#define SERIAL_DEV PNP_DEV(0x2e, F71859_SP1)
diff --git a/src/mainboard/jetway/pa78vm5/Makefile.inc b/src/mainboard/jetway/pa78vm5/Makefile.inc
new file mode 100644
index 000000000000..91d4b39c3249
--- /dev/null
+++ b/src/mainboard/jetway/pa78vm5/Makefile.inc
@@ -0,0 +1,16 @@
+#
+# This file is part of the coreboot project.
+#
+# 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.
+#
+
+romstage-y += resourcemap.c
+
+ramstage-y += get_bus_conf.c
diff --git a/src/mainboard/jetway/pa78vm5/resourcemap.c b/src/mainboard/jetway/pa78vm5/resourcemap.c
index 58b681f197cc..da7fc1b0a296 100644
--- a/src/mainboard/jetway/pa78vm5/resourcemap.c
+++ b/src/mainboard/jetway/pa78vm5/resourcemap.c
@@ -16,7 +16,11 @@
-static void setup_mb_resource_map(void)
+#include <arch/io.h>
+#include <commonlib/helpers.h>
+#include <northbridge/amd/amdfam10/amdfam10.h>
+
+void setup_mb_resource_map(void)
{
static const unsigned int register_values[] = {
/* Careful set limit registers before base registers which contain the enables */
diff --git a/src/mainboard/jetway/pa78vm5/romstage.c b/src/mainboard/jetway/pa78vm5/romstage.c
index 45ee1c2c2711..0b2d1641edf5 100644
--- a/src/mainboard/jetway/pa78vm5/romstage.c
+++ b/src/mainboard/jetway/pa78vm5/romstage.c
@@ -49,7 +49,6 @@
#include <cbmem.h>
#include <southbridge/amd/rs780/rs780.h>
-#include "resourcemap.c"
#include "cpu/amd/quadcore/quadcore.c"
#if CONFIG_TTYS0_BASE == 0x2f8
diff --git a/src/mainboard/msi/ms9652_fam10/Makefile.inc b/src/mainboard/msi/ms9652_fam10/Makefile.inc
new file mode 100644
index 000000000000..91d4b39c3249
--- /dev/null
+++ b/src/mainboard/msi/ms9652_fam10/Makefile.inc
@@ -0,0 +1,16 @@
+#
+# This file is part of the coreboot project.
+#
+# 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.
+#
+
+romstage-y += resourcemap.c
+
+ramstage-y += get_bus_conf.c
diff --git a/src/mainboard/msi/ms9652_fam10/resourcemap.c b/src/mainboard/msi/ms9652_fam10/resourcemap.c
index 825f5ae664c7..59155c6d2381 100644
--- a/src/mainboard/msi/ms9652_fam10/resourcemap.c
+++ b/src/mainboard/msi/ms9652_fam10/resourcemap.c
@@ -15,7 +15,11 @@
* GNU General Public License for more details.
*/
-static void setup_mb_resource_map(void)
+#include <arch/io.h>
+#include <commonlib/helpers.h>
+#include <northbridge/amd/amdfam10/amdfam10.h>
+
+void setup_mb_resource_map(void)
{
static const unsigned int register_values[] = {
/* Careful set limit registers before base registers which contain the enables */
diff --git a/src/mainboard/msi/ms9652_fam10/romstage.c b/src/mainboard/msi/ms9652_fam10/romstage.c
index 7caf6cde68e9..8b4350429ab0 100644
--- a/src/mainboard/msi/ms9652_fam10/romstage.c
+++ b/src/mainboard/msi/ms9652_fam10/romstage.c
@@ -44,7 +44,6 @@
#include <southbridge/amd/common/reset.h>
#include <southbridge/nvidia/mcp55/mcp55.h>
-#include "resourcemap.c"
#include "cpu/amd/quadcore/quadcore.c"
#define SERIAL_DEV PNP_DEV(0x2e, W83627EHG_SP1)
diff --git a/src/mainboard/supermicro/h8dmr_fam10/Makefile.inc b/src/mainboard/supermicro/h8dmr_fam10/Makefile.inc
new file mode 100644
index 000000000000..91d4b39c3249
--- /dev/null
+++ b/src/mainboard/supermicro/h8dmr_fam10/Makefile.inc
@@ -0,0 +1,16 @@
+#
+# This file is part of the coreboot project.
+#
+# 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.
+#
+
+romstage-y += resourcemap.c
+
+ramstage-y += get_bus_conf.c
diff --git a/src/mainboard/supermicro/h8dmr_fam10/resourcemap.c b/src/mainboard/supermicro/h8dmr_fam10/resourcemap.c
index d4cbc93f47c0..7dc4df1fdbc2 100644
--- a/src/mainboard/supermicro/h8dmr_fam10/resourcemap.c
+++ b/src/mainboard/supermicro/h8dmr_fam10/resourcemap.c
@@ -15,7 +15,11 @@
* GNU General Public License for more details.
*/
-static void setup_mb_resource_map(void)
+#include <arch/io.h>
+#include <commonlib/helpers.h>
+#include <northbridge/amd/amdfam10/amdfam10.h>
+
+void setup_mb_resource_map(void)
{
static const unsigned int register_values[] = {
/* Careful set limit registers before base registers which contain the enables */
diff --git a/src/mainboard/supermicro/h8dmr_fam10/romstage.c b/src/mainboard/supermicro/h8dmr_fam10/romstage.c
index dea481fe189e..838d7e2f0962 100644
--- a/src/mainboard/supermicro/h8dmr_fam10/romstage.c
+++ b/src/mainboard/supermicro/h8dmr_fam10/romstage.c
@@ -45,7 +45,6 @@
#include <southbridge/nvidia/mcp55/mcp55.h> // for enable the FAN
-#include "resourcemap.c"
#include "cpu/amd/quadcore/quadcore.c"
#include <southbridge/nvidia/mcp55/early_setup_ss.h>
#include "southbridge/nvidia/mcp55/early_setup_car.c"
diff --git a/src/mainboard/supermicro/h8qme_fam10/Makefile.inc b/src/mainboard/supermicro/h8qme_fam10/Makefile.inc
new file mode 100644
index 000000000000..91d4b39c3249
--- /dev/null
+++ b/src/mainboard/supermicro/h8qme_fam10/Makefile.inc
@@ -0,0 +1,16 @@
+#
+# This file is part of the coreboot project.
+#
+# 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.
+#
+
+romstage-y += resourcemap.c
+
+ramstage-y += get_bus_conf.c
diff --git a/src/mainboard/supermicro/h8qme_fam10/resourcemap.c b/src/mainboard/supermicro/h8qme_fam10/resourcemap.c
index d4cbc93f47c0..7dc4df1fdbc2 100644
--- a/src/mainboard/supermicro/h8qme_fam10/resourcemap.c
+++ b/src/mainboard/supermicro/h8qme_fam10/resourcemap.c
@@ -15,7 +15,11 @@
* GNU General Public License for more details.
*/
-static void setup_mb_resource_map(void)
+#include <arch/io.h>
+#include <commonlib/helpers.h>
+#include <northbridge/amd/amdfam10/amdfam10.h>
+
+void setup_mb_resource_map(void)
{
static const unsigned int register_values[] = {
/* Careful set limit registers before base registers which contain the enables */
diff --git a/src/mainboard/supermicro/h8qme_fam10/romstage.c b/src/mainboard/supermicro/h8qme_fam10/romstage.c
index 127b76f0a2e3..660610eb3305 100644
--- a/src/mainboard/supermicro/h8qme_fam10/romstage.c
+++ b/src/mainboard/supermicro/h8qme_fam10/romstage.c
@@ -44,7 +44,6 @@
#include <cbmem.h>
#include <southbridge/nvidia/mcp55/mcp55.h> // for enable the FAN
-#include "resourcemap.c"
#include "cpu/amd/quadcore/quadcore.c"
#include <southbridge/nvidia/mcp55/early_setup_ss.h>
#include "southbridge/nvidia/mcp55/early_setup_car.c"
diff --git a/src/mainboard/supermicro/h8scm_fam10/Makefile.inc b/src/mainboard/supermicro/h8scm_fam10/Makefile.inc
new file mode 100644
index 000000000000..91d4b39c3249
--- /dev/null
+++ b/src/mainboard/supermicro/h8scm_fam10/Makefile.inc
@@ -0,0 +1,16 @@
+#
+# This file is part of the coreboot project.
+#
+# 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.
+#
+
+romstage-y += resourcemap.c
+
+ramstage-y += get_bus_conf.c
diff --git a/src/mainboard/supermicro/h8scm_fam10/resourcemap.c b/src/mainboard/supermicro/h8scm_fam10/resourcemap.c
index acdf645a54c4..a4a1d9251aa5 100644
--- a/src/mainboard/supermicro/h8scm_fam10/resourcemap.c
+++ b/src/mainboard/supermicro/h8scm_fam10/resourcemap.c
@@ -15,7 +15,11 @@
-static void setup_mb_resource_map(void)
+#include <arch/io.h>
+#include <commonlib/helpers.h>
+#include <northbridge/amd/amdfam10/amdfam10.h>
+
+void setup_mb_resource_map(void)
{
static const unsigned int register_values[] = {
/* Careful set limit registers before base registers which contain the enables */
diff --git a/src/mainboard/supermicro/h8scm_fam10/romstage.c b/src/mainboard/supermicro/h8scm_fam10/romstage.c
index 0ad12188d1f9..23d47b4e2fb7 100644
--- a/src/mainboard/supermicro/h8scm_fam10/romstage.c
+++ b/src/mainboard/supermicro/h8scm_fam10/romstage.c
@@ -47,7 +47,6 @@
#include <arch/early_variables.h>
#include <cbmem.h>
-#include "resourcemap.c"
#include "cpu/amd/quadcore/quadcore.c"
void activate_spd_rom(const struct mem_controller *ctrl);
diff --git a/src/mainboard/tyan/s2912_fam10/Makefile.inc b/src/mainboard/tyan/s2912_fam10/Makefile.inc
new file mode 100644
index 000000000000..91d4b39c3249
--- /dev/null
+++ b/src/mainboard/tyan/s2912_fam10/Makefile.inc
@@ -0,0 +1,16 @@
+#
+# This file is part of the coreboot project.
+#
+# 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.
+#
+
+romstage-y += resourcemap.c
+
+ramstage-y += get_bus_conf.c
diff --git a/src/mainboard/tyan/s2912_fam10/resourcemap.c b/src/mainboard/tyan/s2912_fam10/resourcemap.c
index 10c97f59da01..f02d6a766d44 100644
--- a/src/mainboard/tyan/s2912_fam10/resourcemap.c
+++ b/src/mainboard/tyan/s2912_fam10/resourcemap.c
@@ -15,7 +15,11 @@
* GNU General Public License for more details.
*/
-static void setup_mb_resource_map(void)
+#include <arch/io.h>
+#include <commonlib/helpers.h>
+#include <northbridge/amd/amdfam10/amdfam10.h>
+
+void setup_mb_resource_map(void)
{
static const unsigned int register_values[] = {
/* Careful set limit registers before base registers which contain the enables */
diff --git a/src/mainboard/tyan/s2912_fam10/romstage.c b/src/mainboard/tyan/s2912_fam10/romstage.c
index 1734b3a77cc4..126724f6a2ac 100644
--- a/src/mainboard/tyan/s2912_fam10/romstage.c
+++ b/src/mainboard/tyan/s2912_fam10/romstage.c
@@ -44,7 +44,6 @@
#include <cbmem.h>
#include <southbridge/nvidia/mcp55/mcp55.h>
-#include "resourcemap.c"
#include "cpu/amd/quadcore/quadcore.c"
#define SERIAL_DEV PNP_DEV(0x2e, W83627HF_SP1)
diff --git a/src/northbridge/amd/amdfam10/amdfam10.h b/src/northbridge/amd/amdfam10/amdfam10.h
index f16ef8325b85..163d9dfdccfc 100644
--- a/src/northbridge/amd/amdfam10/amdfam10.h
+++ b/src/northbridge/amd/amdfam10/amdfam10.h
@@ -1000,6 +1000,7 @@ void setup_resource_map_x_offset(const u32 *register_values, u32 max, u32
void setup_resource_map_x(const u32 *register_values, u32 max);
void setup_resource_map(const u32 *register_values, u32 max);
+void setup_mb_resource_map(void);
/* reset_test.c */
u32 cpu_init_detected(u8 nodeid);