mainboard: Get rid of device_t in ramstage
Use of device_t has been abandoned in ramstage.
Change-Id: I07e00afbbd2c19cf3ea6e08f228eb39e45f1ad0c
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/26983
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
diff --git a/src/mainboard/compulab/intense_pc/mainboard.c b/src/mainboard/compulab/intense_pc/mainboard.c
index f06e900..001a1d9 100644
--- a/src/mainboard/compulab/intense_pc/mainboard.c
+++ b/src/mainboard/compulab/intense_pc/mainboard.c
@@ -20,12 +20,12 @@
#include <console/console.h>
#include <pc80/keyboard.h>
-static void mainboard_init(device_t dev)
+static void mainboard_init(struct device *dev)
{
pc_keyboard_init(NO_AUX_DEVICE);
}
-static void mainboard_enable(device_t dev)
+static void mainboard_enable(struct device *dev)
{
dev->ops->init = mainboard_init;
diff --git a/src/mainboard/emulation/qemu-armv7/mainboard.c b/src/mainboard/emulation/qemu-armv7/mainboard.c
index 39c2361..d91d77a 100644
--- a/src/mainboard/emulation/qemu-armv7/mainboard.c
+++ b/src/mainboard/emulation/qemu-armv7/mainboard.c
@@ -50,7 +50,7 @@
set_vbe_mode_info_valid(&edid, framebuffer);
}
-static void mainboard_enable(device_t dev)
+static void mainboard_enable(struct device *dev)
{
int discovered;
if (!dev) {
diff --git a/src/mainboard/emulation/qemu-i440fx/acpi.h b/src/mainboard/emulation/qemu-i440fx/acpi.h
index f2ffdeb..5fc860b 100644
--- a/src/mainboard/emulation/qemu-i440fx/acpi.h
+++ b/src/mainboard/emulation/qemu-i440fx/acpi.h
@@ -1 +1,2 @@
-unsigned long northbridge_write_acpi_tables(device_t device, unsigned long start);
+unsigned long northbridge_write_acpi_tables(struct device *device,
+ unsigned long start);
diff --git a/src/mainboard/emulation/qemu-i440fx/mainboard.c b/src/mainboard/emulation/qemu-i440fx/mainboard.c
index 63b1833..b2439bb 100644
--- a/src/mainboard/emulation/qemu-i440fx/mainboard.c
+++ b/src/mainboard/emulation/qemu-i440fx/mainboard.c
@@ -26,7 +26,7 @@
11, 10, 10, 11,
};
-static void qemu_nb_init(device_t dev)
+static void qemu_nb_init(struct device *dev)
{
/* Map memory at 0xc0000 - 0xfffff */
int i;
diff --git a/src/mainboard/emulation/qemu-power8/mainboard.c b/src/mainboard/emulation/qemu-power8/mainboard.c
index 3c86fad..6d75bb1 100644
--- a/src/mainboard/emulation/qemu-power8/mainboard.c
+++ b/src/mainboard/emulation/qemu-power8/mainboard.c
@@ -17,7 +17,7 @@
#include <device/device.h>
#include <cbmem.h>
-static void mainboard_enable(device_t dev)
+static void mainboard_enable(struct device *dev)
{
if (!dev) {
diff --git a/src/mainboard/emulation/qemu-q35/mainboard.c b/src/mainboard/emulation/qemu-q35/mainboard.c
index d107c11..9b93751 100644
--- a/src/mainboard/emulation/qemu-q35/mainboard.c
+++ b/src/mainboard/emulation/qemu-q35/mainboard.c
@@ -43,7 +43,7 @@
return &gfx_controller_info;
}
-static void qemu_nb_init(device_t dev)
+static void qemu_nb_init(struct device *dev)
{
/* Map memory at 0xc0000 - 0xfffff */
int i;
diff --git a/src/mainboard/emulation/qemu-riscv/mainboard.c b/src/mainboard/emulation/qemu-riscv/mainboard.c
index b0e00e8..7061bcf 100644
--- a/src/mainboard/emulation/qemu-riscv/mainboard.c
+++ b/src/mainboard/emulation/qemu-riscv/mainboard.c
@@ -17,7 +17,7 @@
#include <device/device.h>
#include <cbmem.h>
-static void mainboard_enable(device_t dev)
+static void mainboard_enable(struct device *dev)
{
if (!dev) {
diff --git a/src/mainboard/emulation/spike-riscv/mainboard.c b/src/mainboard/emulation/spike-riscv/mainboard.c
index 6ccbd93..5d2b0b9 100644
--- a/src/mainboard/emulation/spike-riscv/mainboard.c
+++ b/src/mainboard/emulation/spike-riscv/mainboard.c
@@ -17,7 +17,7 @@
#include <device/device.h>
#include <cbmem.h>
-static void mainboard_enable(device_t dev)
+static void mainboard_enable(struct device *dev)
{
/*
* Size of the emulated system RAM. On hardware, this would be external
diff --git a/src/mainboard/intel/cannonlake_rvp/mainboard.c b/src/mainboard/intel/cannonlake_rvp/mainboard.c
index 316485d..3dbae70 100644
--- a/src/mainboard/intel/cannonlake_rvp/mainboard.c
+++ b/src/mainboard/intel/cannonlake_rvp/mainboard.c
@@ -31,8 +31,9 @@
gpio_configure_pads(pads, num);
}
-static unsigned long mainboard_write_acpi_tables(
- device_t device, unsigned long current, acpi_rsdp_t *rsdp)
+static unsigned long mainboard_write_acpi_tables(struct device *device,
+ unsigned long current,
+ acpi_rsdp_t *rsdp)
{
uintptr_t start_addr;
uintptr_t end_addr;
@@ -55,7 +56,7 @@
return end_addr;
}
-static void mainboard_enable(device_t dev)
+static void mainboard_enable(struct device *dev)
{
dev->ops->write_acpi_tables = mainboard_write_acpi_tables;
dev->ops->acpi_inject_dsdt_generator = chromeos_dsdt_generator;
diff --git a/src/mainboard/lowrisc/nexys4ddr/mainboard.c b/src/mainboard/lowrisc/nexys4ddr/mainboard.c
index 97acc1e..3ef8337 100644
--- a/src/mainboard/lowrisc/nexys4ddr/mainboard.c
+++ b/src/mainboard/lowrisc/nexys4ddr/mainboard.c
@@ -17,7 +17,7 @@
#include <device/device.h>
#include <symbols.h>
-static void mainboard_enable(device_t dev)
+static void mainboard_enable(struct device *dev)
{
uintptr_t ram_base;
size_t ram_size;
diff --git a/src/mainboard/ocp/monolake/mainboard.c b/src/mainboard/ocp/monolake/mainboard.c
index 393fad8..395480b 100644
--- a/src/mainboard/ocp/monolake/mainboard.c
+++ b/src/mainboard/ocp/monolake/mainboard.c
@@ -34,7 +34,7 @@
* mainboard_enable is executed as first thing after enumerate_buses().
* This is the earliest point to add customization.
*/
-static void mainboard_enable(device_t dev)
+static void mainboard_enable(struct device *dev)
{
}
diff --git a/src/mainboard/ocp/wedge100s/mainboard.c b/src/mainboard/ocp/wedge100s/mainboard.c
index 393fad8..395480b 100644
--- a/src/mainboard/ocp/wedge100s/mainboard.c
+++ b/src/mainboard/ocp/wedge100s/mainboard.c
@@ -34,7 +34,7 @@
* mainboard_enable is executed as first thing after enumerate_buses().
* This is the earliest point to add customization.
*/
-static void mainboard_enable(device_t dev)
+static void mainboard_enable(struct device *dev)
{
}
diff --git a/src/mainboard/samsung/lumpy/mainboard.c b/src/mainboard/samsung/lumpy/mainboard.c
index 3de067e..0a00612 100644
--- a/src/mainboard/samsung/lumpy/mainboard.c
+++ b/src/mainboard/samsung/lumpy/mainboard.c
@@ -42,7 +42,7 @@
-static void mainboard_init(device_t dev)
+static void mainboard_init(struct device *dev)
{
/* Initialize the Embedded Controller */
lumpy_ec_init();
@@ -74,7 +74,7 @@
}
-static int lumpy_onboard_smbios_data(device_t dev, int *handle,
+static int lumpy_onboard_smbios_data(struct device *dev, int *handle,
unsigned long *current)
{
int len = 0;
@@ -95,7 +95,7 @@
// mainboard_enable is executed as first thing after
// enumerate_buses().
-static void mainboard_enable(device_t dev)
+static void mainboard_enable(struct device *dev)
{
dev->ops->init = mainboard_init;
dev->ops->get_smbios_data = lumpy_onboard_smbios_data;
diff --git a/src/mainboard/samsung/stumpy/mainboard.c b/src/mainboard/samsung/stumpy/mainboard.c
index 654b1de..7ea1c51 100644
--- a/src/mainboard/samsung/stumpy/mainboard.c
+++ b/src/mainboard/samsung/stumpy/mainboard.c
@@ -33,7 +33,7 @@
// mainboard_enable is executed as first thing after
// enumerate_buses().
-static void mainboard_enable(device_t dev)
+static void mainboard_enable(struct device *dev)
{
dev->ops->acpi_inject_dsdt_generator = chromeos_dsdt_generator;
install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_EDP, GMA_INT15_PANEL_FIT_CENTERING, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0);
diff --git a/src/mainboard/tyan/s2912_fam10/mptable.c b/src/mainboard/tyan/s2912_fam10/mptable.c
index 87d06b8..a56e23e 100644
--- a/src/mainboard/tyan/s2912_fam10/mptable.c
+++ b/src/mainboard/tyan/s2912_fam10/mptable.c
@@ -44,7 +44,7 @@
/*I/O APICs: APIC ID Version State Address*/
{
- device_t dev;
+ struct device *dev;
struct resource *res;
uint32_t dword;
diff --git a/src/mainboard/via/epia-m850/mainboard.c b/src/mainboard/via/epia-m850/mainboard.c
index 68c49bc..4cfee2e 100644
--- a/src/mainboard/via/epia-m850/mainboard.c
+++ b/src/mainboard/via/epia-m850/mainboard.c
@@ -92,7 +92,7 @@
}
#endif
-static void mainboard_enable(device_t dev)
+static void mainboard_enable(struct device *dev)
{
(void)dev;