soc/cavium: Fix non matching types

There is no struct device *dev equivalent of this function. Clang LTO
warns about mismatching types.

Change-Id: I22c8c9b9f350c53469a5d386db211969c8a41cf0
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84084
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
This commit is contained in:
Arthur Heymans 2024-08-23 18:07:25 +02:00
commit e5742fbd97
2 changed files with 1 additions and 7 deletions

View file

@ -181,7 +181,7 @@ static size_t ecam0_pci_enable_msix(struct device *dev,
dev_path(dev));
return -1;
}
bar = ecam0_get_bar_val(dev, bar_idx);
bar = ecam0_get_bar_val(pcidev_bdf(dev), bar_idx);
if (!bar) {
printk(BIOS_ERR, "%s: Failed to find MSI-X bar\n",
dev_path(dev));

View file

@ -3,14 +3,8 @@
#ifndef __COREBOOT_SRC_SOC_CAVIUM_COMMON_INCLUDE_SOC_ECAM_H
#define __COREBOOT_SRC_SOC_CAVIUM_COMMON_INCLUDE_SOC_ECAM_H
#ifdef __SIMPLE_DEVICE__
#include <device/pci_type.h>
uint64_t ecam0_get_bar_val(pci_devfn_t dev, u8 bar);
#else
#include <device/device.h>
uint64_t ecam0_get_bar_val(struct device *dev, u8 bar);
#endif
#endif