diff options
author | Himanshu Sahdev <himanshusah@hcl.com> | 2019-10-21 15:27:19 +0530 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2019-10-24 07:44:53 +0000 |
commit | 7f1da07849c025982cda0e973588dc6305616cbe (patch) | |
tree | 81f722cab57f1a75bf35b4615f217e762d99294a /src | |
parent | afd05050335b3fbcf70f7e3899639c2f65557280 (diff) | |
download | coreboot-7f1da07849c025982cda0e973588dc6305616cbe.tar.xz |
arch/acpi.h: Use of typedef for acpi_vfct
Use of typedef and modify the usage accordingly.
Change-Id: I875ef2fa31e65750233fa8da2b76d8db5db44f2d
Signed-off-by: Himanshu Sahdev <himanshusah@hcl.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36193
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/arch/x86/acpi.c | 8 | ||||
-rw-r--r-- | src/arch/x86/include/arch/acpi.h | 8 | ||||
-rw-r--r-- | src/device/pci_rom.c | 6 |
3 files changed, 11 insertions, 11 deletions
diff --git a/src/arch/x86/acpi.c b/src/arch/x86/acpi.c index 8e4de8214f..e28da5393c 100644 --- a/src/arch/x86/acpi.c +++ b/src/arch/x86/acpi.c @@ -737,14 +737,14 @@ void acpi_create_hpet(acpi_hpet_t *hpet) } void acpi_create_vfct(struct device *device, - struct acpi_vfct *vfct, + acpi_vfct_t *vfct, unsigned long (*acpi_fill_vfct)(struct device *device, - struct acpi_vfct *vfct_struct, unsigned long current)) + acpi_vfct_t *vfct_struct, unsigned long current)) { acpi_header_t *header = &(vfct->header); - unsigned long current = (unsigned long)vfct + sizeof(struct acpi_vfct); + unsigned long current = (unsigned long)vfct + sizeof(acpi_vfct_t); - memset((void *)vfct, 0, sizeof(struct acpi_vfct)); + memset((void *)vfct, 0, sizeof(acpi_vfct_t)); if (!header) return; diff --git a/src/arch/x86/include/arch/acpi.h b/src/arch/x86/include/arch/acpi.h index c3420f80f3..fdffc30a39 100644 --- a/src/arch/x86/include/arch/acpi.h +++ b/src/arch/x86/include/arch/acpi.h @@ -265,14 +265,14 @@ typedef struct acpi_vfct_image_hdr { } __packed acpi_vfct_image_hdr_t; /* VFCT (VBIOS Fetch Table) */ -struct acpi_vfct { +typedef struct acpi_vfct { struct acpi_table_header header; u8 TableUUID[16]; u32 VBIOSImageOffset; u32 Lib1ImageOffset; u32 Reserved[4]; acpi_vfct_image_hdr_t image_hdr; -} __packed; +} __packed acpi_vfct_t; typedef struct acpi_ivrs_info { } __packed acpi_ivrs_info_t; @@ -864,9 +864,9 @@ void acpi_create_slit(acpi_slit_t *slit, unsigned long (*acpi_fill_slit)(unsigned long current)); void acpi_create_vfct(struct device *device, - struct acpi_vfct *vfct, + acpi_vfct_t *vfct, unsigned long (*acpi_fill_vfct)(struct device *device, - struct acpi_vfct *vfct_struct, + acpi_vfct_t *vfct_struct, unsigned long current)); void acpi_create_ipmi(struct device *device, diff --git a/src/device/pci_rom.c b/src/device/pci_rom.c index b2b2266b67..3676f9cf9b 100644 --- a/src/device/pci_rom.c +++ b/src/device/pci_rom.c @@ -197,7 +197,7 @@ static struct rom_header *check_initialized(struct device *dev) } static unsigned long -pci_rom_acpi_fill_vfct(struct device *device, struct acpi_vfct *vfct_struct, +pci_rom_acpi_fill_vfct(struct device *device, acpi_vfct_t *vfct_struct, unsigned long current) { acpi_vfct_image_hdr_t *header = &vfct_struct->image_hdr; @@ -245,10 +245,10 @@ pci_rom_write_acpi_tables(struct device *device, unsigned long current, /* AMD/ATI uses VFCT */ if (device->vendor == PCI_VENDOR_ID_ATI) { - struct acpi_vfct *vfct; + acpi_vfct_t *vfct; current = ALIGN_UP(current, 8); - vfct = (struct acpi_vfct *)current; + vfct = (acpi_vfct_t *)current; acpi_create_vfct(device, vfct, pci_rom_acpi_fill_vfct); if (vfct->header.length) { printk(BIOS_DEBUG, "ACPI: * VFCT at %lx\n", current); |