nb/x4x: Get rid of device_t
Use of `device_t` has been abandoned in ramstage.
Change-Id: Ib3e708a7fa9f0a78dc704a502a2f01ee0fe209ae
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/23655
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
diff --git a/src/northbridge/intel/x4x/acpi.c b/src/northbridge/intel/x4x/acpi.c
index 21f7aa9..678486c 100644
--- a/src/northbridge/intel/x4x/acpi.c
+++ b/src/northbridge/intel/x4x/acpi.c
@@ -30,7 +30,7 @@
unsigned long acpi_fill_mcfg(unsigned long current)
{
- device_t dev;
+ struct device *dev;
u32 pciexbar = 0;
u32 length = 0;
@@ -44,7 +44,7 @@
return current;
}
-unsigned long northbridge_write_acpi_tables(device_t device,
+unsigned long northbridge_write_acpi_tables(struct device *device,
unsigned long start,
struct acpi_rsdp *rsdp)
{
diff --git a/src/northbridge/intel/x4x/gma.c b/src/northbridge/intel/x4x/gma.c
index cf3804d..8ce1a5d 100644
--- a/src/northbridge/intel/x4x/gma.c
+++ b/src/northbridge/intel/x4x/gma.c
@@ -430,7 +430,7 @@
pci_write_config16(dev_host, D0F0_GGC, ggc);
}
-static void gma_set_subsystem(device_t dev, unsigned int vendor,
+static void gma_set_subsystem(struct device *dev, unsigned int vendor,
unsigned int device)
{
if (!vendor || !device) {
@@ -446,14 +446,14 @@
const struct i915_gpu_controller_info *
intel_gma_get_controller_info(void)
{
- device_t dev = dev_find_slot(0, PCI_DEVFN(0x2, 0));
+ struct device *dev = dev_find_slot(0, PCI_DEVFN(0x2, 0));
if (!dev)
return NULL;
struct northbridge_intel_x4x_config *chip = dev->chip_info;
return &chip->gfx;
}
-static void gma_ssdt(device_t device)
+static void gma_ssdt(struct device *device)
{
const struct i915_gpu_controller_info *gfx = intel_gma_get_controller_info();
if (!gfx)
diff --git a/src/northbridge/intel/x4x/northbridge.c b/src/northbridge/intel/x4x/northbridge.c
index 6ba45fe..e51c587 100644
--- a/src/northbridge/intel/x4x/northbridge.c
+++ b/src/northbridge/intel/x4x/northbridge.c
@@ -31,7 +31,7 @@
static const int legacy_hole_base_k = 0xa0000 / 1024;
-static void mch_domain_read_resources(device_t dev)
+static void mch_domain_read_resources(struct device *dev)
{
u8 index, reg8;
u64 tom, touud;
@@ -136,7 +136,7 @@
}
}
-static void mch_domain_set_resources(device_t dev)
+static void mch_domain_set_resources(struct device *dev)
{
struct resource *res;
@@ -146,7 +146,7 @@
assign_resources(dev->link_list);
}
-static void mch_domain_init(device_t dev)
+static void mch_domain_init(struct device *dev)
{
u32 reg32;
@@ -167,7 +167,7 @@
};
-static void cpu_bus_init(device_t dev)
+static void cpu_bus_init(struct device *dev)
{
initialize_cpus(dev->link_list);
}
@@ -180,7 +180,7 @@
};
-static void enable_dev(device_t dev)
+static void enable_dev(struct device *dev)
{
/* Set the operations if it is a special bus type */
if (dev->path.type == DEVICE_PATH_DOMAIN)
diff --git a/src/northbridge/intel/x4x/x4x.h b/src/northbridge/intel/x4x/x4x.h
index e63a055..4ee0c56 100644
--- a/src/northbridge/intel/x4x/x4x.h
+++ b/src/northbridge/intel/x4x/x4x.h
@@ -385,7 +385,8 @@
struct acpi_rsdp;
#ifndef __SIMPLE_DEVICE__
-unsigned long northbridge_write_acpi_tables(device_t device, unsigned long start, struct acpi_rsdp *rsdp);
+unsigned long northbridge_write_acpi_tables(struct device *device,
+ unsigned long start, struct acpi_rsdp *rsdp);
#endif /* __SIMPLE_DEVICE__ */
#endif
#endif /* __NORTHBRIDGE_INTEL_X4X_H__ */