devicetree: Change scan_bus() prototype in device ops
The input/output value max is no longer used for tracking the
bus enumeration sequence, everything is handled in the context
of devicetree bus objects.
Change-Id: I545088bd8eaf205b1436d8c52d3bc7faf4cfb0f9
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: http://review.coreboot.org/8541
Tested-by: build bot (Jenkins)
Tested-by: Raptor Engineering Automated Test Stand <noreply@raptorengineeringinc.com>
Reviewed-by: Timothy Pearson <tpearson@raptorengineeringinc.com>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
diff --git a/src/northbridge/amd/agesa/family10/northbridge.c b/src/northbridge/amd/agesa/family10/northbridge.c
index 6ba6770..0fe1910 100644
--- a/src/northbridge/amd/agesa/family10/northbridge.c
+++ b/src/northbridge/amd/agesa/family10/northbridge.c
@@ -554,7 +554,7 @@
{
}
-static unsigned amdfam10_scan_chains(device_t dev, unsigned unused)
+static void amdfam10_scan_chains(device_t dev)
{
unsigned nodeid;
struct bus *link;
@@ -580,8 +580,6 @@
}
dev->bus->subordinate = max;
-
- return unused;
}
static struct device_operations northbridge_operations = {
@@ -907,7 +905,7 @@
}
}
-static u32 amdfam10_domain_scan_bus(device_t dev, u32 unused)
+static void amdfam10_domain_scan_bus(device_t dev)
{
u32 reg;
int i;
@@ -944,7 +942,6 @@
pci_write_config32(f0_dev, HT_TRANSACTION_CONTROL, httc);
}
}
- return unused;
}
@@ -1012,7 +1009,7 @@
last->next = NULL;
}
-static u32 cpu_bus_scan(device_t dev, u32 passthru)
+static void cpu_bus_scan(device_t dev)
{
struct bus *cpu_bus;
device_t dev_mc;
@@ -1188,7 +1185,6 @@
amd_cpu_topology(cpu, i, j);
} //j
}
- return passthru;
}
static void cpu_bus_init(device_t dev)
diff --git a/src/northbridge/amd/agesa/family14/northbridge.c b/src/northbridge/amd/agesa/family14/northbridge.c
index 426ec74..32b74f6 100644
--- a/src/northbridge/amd/agesa/family14/northbridge.c
+++ b/src/northbridge/amd/agesa/family14/northbridge.c
@@ -765,7 +765,7 @@
/* Bus related code */
-static u32 cpu_bus_scan(struct device *dev, u32 passthru)
+static void cpu_bus_scan(struct device *dev)
{
struct bus *cpu_bus = dev->link_list;
device_t cpu;
@@ -784,7 +784,6 @@
if (cpu)
amd_cpu_topology(cpu, 0, apic_id);
}
- return passthru;
}
static void cpu_bus_init(device_t dev)
diff --git a/src/northbridge/amd/agesa/family15/northbridge.c b/src/northbridge/amd/agesa/family15/northbridge.c
index e480eba..94e16ac 100644
--- a/src/northbridge/amd/agesa/family15/northbridge.c
+++ b/src/northbridge/amd/agesa/family15/northbridge.c
@@ -459,7 +459,7 @@
}
}
-static unsigned scan_chains(device_t dev, unsigned unused)
+static void scan_chains(device_t dev)
{
unsigned nodeid;
struct bus *link;
@@ -485,8 +485,6 @@
}
dev->bus->subordinate = max;
-
- return unused;
}
@@ -953,11 +951,10 @@
}
/* all family15's pci devices are under 0x18.0, so we search from dev 0x18 fun 0 */
-static unsigned int f15_pci_domain_scan_bus(device_t dev, unsigned int unused)
+static void f15_pci_domain_scan_bus(device_t dev)
{
struct bus *link = dev->link_list;
pci_scan_bus(link, PCI_DEVFN(0x18, 0), 0xff);
- return unused;
}
static struct device_operations pci_domain_ops = {
@@ -1011,7 +1008,7 @@
last->next = NULL;
}
-static u32 cpu_bus_scan(device_t dev, u32 passthru)
+static void cpu_bus_scan(device_t dev)
{
struct bus *cpu_bus;
device_t dev_mc;
@@ -1187,7 +1184,6 @@
amd_cpu_topology(cpu, i, j);
} //j
}
- return passthru;
}
static void cpu_bus_init(device_t dev)
diff --git a/src/northbridge/amd/agesa/family15rl/northbridge.c b/src/northbridge/amd/agesa/family15rl/northbridge.c
index d322fdc..0a1e7d3 100644
--- a/src/northbridge/amd/agesa/family15rl/northbridge.c
+++ b/src/northbridge/amd/agesa/family15rl/northbridge.c
@@ -992,7 +992,7 @@
last->next = NULL;
}
-static u32 cpu_bus_scan(device_t dev, u32 passthru)
+static void cpu_bus_scan(device_t dev)
{
struct bus *cpu_bus;
device_t dev_mc;
@@ -1166,7 +1166,6 @@
amd_cpu_topology(cpu, i, j);
} //j
}
- return passthru;
}
static void cpu_bus_init(struct device *dev)
diff --git a/src/northbridge/amd/agesa/family15tn/northbridge.c b/src/northbridge/amd/agesa/family15tn/northbridge.c
index 08287dc..37b6a8e 100644
--- a/src/northbridge/amd/agesa/family15tn/northbridge.c
+++ b/src/northbridge/amd/agesa/family15tn/northbridge.c
@@ -991,7 +991,7 @@
last->next = NULL;
}
-static u32 cpu_bus_scan(device_t dev, u32 passthru)
+static void cpu_bus_scan(device_t dev)
{
struct bus *cpu_bus;
device_t dev_mc;
@@ -1165,7 +1165,6 @@
amd_cpu_topology(cpu, i, j);
} //j
}
- return passthru;
}
static void cpu_bus_init(device_t dev)
diff --git a/src/northbridge/amd/agesa/family16kb/northbridge.c b/src/northbridge/amd/agesa/family16kb/northbridge.c
index 7c603c0..9bbc279 100644
--- a/src/northbridge/amd/agesa/family16kb/northbridge.c
+++ b/src/northbridge/amd/agesa/family16kb/northbridge.c
@@ -1008,7 +1008,7 @@
last->next = NULL;
}
-static u32 cpu_bus_scan(device_t dev, u32 passthru)
+static void cpu_bus_scan(device_t dev)
{
struct bus *cpu_bus;
device_t dev_mc;
@@ -1182,7 +1182,6 @@
amd_cpu_topology(cpu, i, j);
} //j
}
- return passthru;
}
static void cpu_bus_init(device_t dev)