aboutsummaryrefslogtreecommitdiff
path: root/src/mainboard/amd/dinar
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2014-07-21 19:35:16 +0300
committerKyösti Mälkki <kyosti.malkki@gmail.com>2014-07-24 13:59:22 +0200
commit0c797f1c28cd16c64482b2cea554e89baaa31445 (patch)
tree0eb73249b03eb0609e350250c32b4f0bdab3bcaf /src/mainboard/amd/dinar
parent0ff17c9cae11b46535b99880f013d0ca084ea1f8 (diff)
AGESA: Drop offset on PCI device enumeration
Integrated PCI devices in southbridge silicon have static BDFs, no need to have variables to store the parent bus or an offset with constant zero. Change-Id: I37d3794d36b5e5775da9215574ddc199696646d0 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/6333 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
Diffstat (limited to 'src/mainboard/amd/dinar')
-rw-r--r--src/mainboard/amd/dinar/get_bus_conf.c24
-rw-r--r--src/mainboard/amd/dinar/irq_tables.c8
-rw-r--r--src/mainboard/amd/dinar/mptable.c5
3 files changed, 5 insertions, 32 deletions
diff --git a/src/mainboard/amd/dinar/get_bus_conf.c b/src/mainboard/amd/dinar/get_bus_conf.c
index 3104b73cd4..5ab2ddd5b2 100644
--- a/src/mainboard/amd/dinar/get_bus_conf.c
+++ b/src/mainboard/amd/dinar/get_bus_conf.c
@@ -32,25 +32,6 @@
*/
u8 bus_sb700[2];
-/*
- * Here you only need to set value in pci1234 for HT-IO that could be installed or not
- * You may need to preset pci1234 for HTIO board,
- * please refer to src/northbridge/amd/amdk8/get_sblk_pci1234.c for detail
- */
-u32 pci1234x[] = {
- 0x0000ff0,
-};
-
-/*
- * HT Chain device num, actually it is unit id base of every ht device in chain,
- * assume every chain only have 4 ht device at most
- */
-u32 hcdnx[] = {
- 0x20202020,
-};
-
-u32 sbdn_sb700;
-
void get_bus_conf(void)
{
device_t dev;
@@ -58,17 +39,14 @@ void get_bus_conf(void)
printk(BIOS_DEBUG, "Mainboard - Get_bus_conf.c - get_bus_conf - Start.\n");
- sbdn_sb700 = 0;
for (i = 0; i < ARRAY_SIZE(bus_sb700); i++) {
bus_sb700[i] = 0;
}
- bus_sb700[0] = (pci1234x[0] >> 16) & 0xff;
-
/* sb700 */
- dev = dev_find_slot(bus_sb700[0], PCI_DEVFN(sbdn_sb700 + 0x14, 4));
+ dev = dev_find_slot(0, PCI_DEVFN(0x14, 4));
diff --git a/src/mainboard/amd/dinar/irq_tables.c b/src/mainboard/amd/dinar/irq_tables.c
index 865d264429..8242b4e911 100644
--- a/src/mainboard/amd/dinar/irq_tables.c
+++ b/src/mainboard/amd/dinar/irq_tables.c
@@ -43,8 +43,6 @@ static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
pirq_info->slot = slot;
pirq_info->rfu = rfu;
}
-extern u8 bus_sb700[2];
-extern unsigned long sbdn_sb700;
unsigned long write_pirq_routing_table(unsigned long addr)
{
@@ -70,8 +68,8 @@ unsigned long write_pirq_routing_table(unsigned long addr)
pirq->signature = PIRQ_SIGNATURE;
pirq->version = PIRQ_VERSION;
- pirq->rtr_bus = bus_sb700[0];
- pirq->rtr_devfn = ((sbdn_sb700 + 0x14) << 3) | 4;
+ pirq->rtr_bus = 0;
+ pirq->rtr_devfn = PCI_DEVFN(0x14, 4);
pirq->exclusive_irqs = 0;
@@ -87,7 +85,7 @@ unsigned long write_pirq_routing_table(unsigned long addr)
/* pci bridge */
- write_pirq_info(pirq_info, bus_sb700[0], ((sbdn_sb700 + 0x14) << 3) | 4,
+ write_pirq_info(pirq_info, 0, PCI_DEVFN(0x14, 4),
0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0,
0);
pirq_info++;
diff --git a/src/mainboard/amd/dinar/mptable.c b/src/mainboard/amd/dinar/mptable.c
index 398ee86f34..d239a7e749 100644
--- a/src/mainboard/amd/dinar/mptable.c
+++ b/src/mainboard/amd/dinar/mptable.c
@@ -29,8 +29,6 @@
#include <cpu/amd/amdfam15.h>
extern u8 bus_sb700[2];
-extern u32 sbdn_sb700;
-
static void *smp_write_config_table(void *v)
{
@@ -60,8 +58,7 @@ static void *smp_write_config_table(void *v)
apicid_sb700 = CONFIG_MAX_CPUS + 1;
apicid_rd890 = apicid_sb700 + 1;
- //bus_sb700[0], TODO: why bus_sb700[0] use same value of bus_rd890[0] assigned by get_pci1234(), instead of 0.
- dev = dev_find_slot(0, PCI_DEVFN(sbdn_sb700 + 0x14, 0));
+ dev = dev_find_slot(0, PCI_DEVFN(0x14, 0));
if (dev) {
/* Set sb700 IOAPIC ID */
dword = pci_read_config32(dev, 0x74) & 0xfffffff0;