intel/spi: Fix use of __SIMPLE_DEVICE__
Fix cases of using ENV_SMM where __SIMPLE_DEVICE__ should be used instead. Change-Id: I385c82767a87ff7a47466a200488fae9fc8b863d Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/31629 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de> Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
This commit is contained in:
parent
db9e9ac30d
commit
17387f67ad
|
@ -264,7 +264,7 @@ static ich9_spi_regs *spi_regs(void)
|
|||
{
|
||||
uint32_t sbase;
|
||||
|
||||
#ifdef __SMM__
|
||||
#ifdef __SIMPLE_DEVICE__
|
||||
pci_devfn_t dev = PCI_DEV(0, LPC_DEV, LPC_FUNC);
|
||||
#else
|
||||
struct device *dev = pcidev_on_root(LPC_DEV, LPC_FUNC);
|
||||
|
|
|
@ -232,7 +232,7 @@ static ich9_spi_regs *spi_regs(void)
|
|||
{
|
||||
uint32_t sbase;
|
||||
|
||||
#if ENV_SMM
|
||||
#ifdef __SIMPLE_DEVICE__
|
||||
pci_devfn_t dev = PCI_DEV(0, LPC_DEV, LPC_FUNC);
|
||||
#else
|
||||
struct device *dev = pcidev_on_root(LPC_DEV, LPC_FUNC);
|
||||
|
|
|
@ -253,7 +253,7 @@ static ich9_spi_regs *spi_regs(void)
|
|||
{
|
||||
uint32_t sbase;
|
||||
|
||||
#ifdef __SMM__
|
||||
#ifdef __SIMPLE_DEVICE__
|
||||
pci_devfn_t dev = PCI_DEV(0, LPC_DEV, LPC_FUNC);
|
||||
#else
|
||||
struct device *dev = pcidev_on_root(LPC_DEV, LPC_FUNC);
|
||||
|
|
|
@ -344,7 +344,7 @@ void spi_init(void)
|
|||
uint32_t ids;
|
||||
uint16_t vendor_id, device_id;
|
||||
|
||||
#ifdef __SMM__
|
||||
#ifdef __SIMPLE_DEVICE__
|
||||
pci_devfn_t dev = PCI_DEV(0, 31, 0);
|
||||
#else
|
||||
struct device *dev = pcidev_on_root(31, 0);
|
||||
|
|
Loading…
Reference in New Issue