Commit e54a8fd432 (soc/intel/meteorlake:
Add entry for GSPI2 device) added an entry for the GSPI2 device in the
devicetree, but did not add any other entries. Ensure that the rest of
the code is aware of the GSPI2 device to avoid any problems.
Change-Id: Ib59bd289751bd96402c4adc61ffbee3bebe0edb0
Found-by: Coverity CID 1490681
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65916
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Tarun Tuli <taruntuli@google.com>
18 lines
300 B
C
18 lines
300 B
C
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
#include <intelblocks/gspi.h>
|
|
#include <soc/pci_devs.h>
|
|
|
|
int gspi_soc_bus_to_devfn(unsigned int gspi_bus)
|
|
{
|
|
switch (gspi_bus) {
|
|
case 0:
|
|
return PCI_DEVFN_GSPI0;
|
|
case 1:
|
|
return PCI_DEVFN_GSPI1;
|
|
case 2:
|
|
return PCI_DEVFN_GSPI2;
|
|
}
|
|
return -1;
|
|
}
|