AGESA: Drop CONFIG_CBB and CONFIG_CDB
Static values, copy paste from multi-node fam15 code.
Add header that shall have declarations of functions
common to different families factored out.
Change-Id: I07bc046c74280f49e46793c119d36b87b8789949
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/30732
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Nico Huber <nico.h@gmx.de>
diff --git a/src/northbridge/amd/agesa/family15tn/northbridge.c b/src/northbridge/amd/agesa/family15tn/northbridge.c
index f1a2051..edc4585 100644
--- a/src/northbridge/amd/agesa/family15tn/northbridge.c
+++ b/src/northbridge/amd/agesa/family15tn/northbridge.c
@@ -34,6 +34,7 @@
#include <Porting.h>
#include <Options.h>
#include <Topology.h>
+#include <northbridge/amd/agesa/nb_common.h>
#include <northbridge/amd/agesa/state_machine.h>
#include <northbridge/amd/agesa/agesa_helper.h>
@@ -99,7 +100,7 @@
static struct device *get_node_pci(u32 nodeid, u32 fn)
{
- return pcidev_on_root(CONFIG_CDB + nodeid, fn);
+ return pcidev_on_root(DEV_CDB + nodeid, fn);
}
static void get_fx_devs(void)
@@ -142,7 +143,7 @@
static u32 amdfam15_nodeid(struct device *dev)
{
- return (dev->path.pci.devfn >> 3) - CONFIG_CDB;
+ return (dev->path.pci.devfn >> 3) - DEV_CDB;
}
static void set_vga_enable_reg(u32 nodeid, u32 linkn)
@@ -818,9 +819,9 @@
int siblings = 0;
unsigned int family;
- dev_mc = pcidev_on_root(CONFIG_CDB, 0);
+ dev_mc = pcidev_on_root(DEV_CDB, 0);
if (!dev_mc) {
- printk(BIOS_ERR, "%02x:%02x.0 not found", CONFIG_CBB, CONFIG_CDB);
+ printk(BIOS_ERR, "0:%02x.0 not found", DEV_CDB);
die("");
}
sysconf_init(dev_mc);
@@ -843,7 +844,7 @@
unsigned devn;
struct bus *pbus;
- devn = CONFIG_CDB + i;
+ devn = DEV_CDB + i;
pbus = dev_mc->bus;
/* Find the cpu's pci device */