[coreboot-gerrit] Change in coreboot[master]: soc/intel/braswell: Get rid of device_t
Elyes HAOUAS (Code Review)
gerrit at coreboot.org
Sun Jun 10 11:35:27 CEST 2018
Elyes HAOUAS has uploaded this change for review. ( https://review.coreboot.org/27004
Change subject: soc/intel/braswell: Get rid of device_t
......................................................................
soc/intel/braswell: Get rid of device_t
Change-Id: I30ca4d117b1c21b1b4f1935585f17bd8a15a807b
Signed-off-by: Elyes HAOUAS <ehaouas at noos.fr>
---
M src/soc/intel/braswell/pmutil.c
M src/soc/intel/braswell/smihandler.c
M src/soc/intel/braswell/spi.c
3 files changed, 7 insertions(+), 8 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/27004/1
diff --git a/src/soc/intel/braswell/pmutil.c b/src/soc/intel/braswell/pmutil.c
index 18e655c..5f078df 100644
--- a/src/soc/intel/braswell/pmutil.c
+++ b/src/soc/intel/braswell/pmutil.c
@@ -27,9 +27,9 @@
#if defined(__SIMPLE_DEVICE__)
-static const device_t pcu_dev = PCI_DEV(0, PCU_DEV, 0);
+static const pci_devfn_t pcu_dev = PCI_DEV(0, PCU_DEV, 0);
-static inline device_t get_pcu_dev(void)
+static inline pci_devfn_t get_pcu_dev(void)
{
return pcu_dev;
}
@@ -38,8 +38,8 @@
#include <device/device.h>
#include <device/pci.h>
-static device_t pcu_dev;
-static device_t get_pcu_dev(void)
+static struct device *pcu_dev;
+static struct device *get_pcu_dev(void)
{
if (pcu_dev == NULL)
pcu_dev = dev_find_slot(0, PCI_DEVFN(PCU_DEV, 0));
diff --git a/src/soc/intel/braswell/smihandler.c b/src/soc/intel/braswell/smihandler.c
index 0f5c7c9..edbb766 100644
--- a/src/soc/intel/braswell/smihandler.c
+++ b/src/soc/intel/braswell/smihandler.c
@@ -70,7 +70,7 @@
for (slot = 0; slot < 0x20; slot++) {
for (func = 0; func < 8; func++) {
u32 reg32;
- device_t dev = PCI_DEV(bus, slot, func);
+ pci_devfn_t dev = PCI_DEV(bus, slot, func);
val = pci_read_config32(dev, PCI_VENDOR_ID);
diff --git a/src/soc/intel/braswell/spi.c b/src/soc/intel/braswell/spi.c
index b9e1627..f2d178d 100644
--- a/src/soc/intel/braswell/spi.c
+++ b/src/soc/intel/braswell/spi.c
@@ -233,13 +233,12 @@
static ich9_spi_regs *spi_regs(void)
{
- device_t dev;
uint32_t sbase;
#if ENV_SMM
- dev = PCI_DEV(0, LPC_DEV, LPC_FUNC);
+ pci_devfn_t dev = PCI_DEV(0, LPC_DEV, LPC_FUNC);
#else
- dev = dev_find_slot(0, PCI_DEVFN(LPC_DEV, LPC_FUNC));
+ struct device *dev = dev_find_slot(0, PCI_DEVFN(LPC_DEV, LPC_FUNC));
#endif
if (!dev) {
printk(BIOS_ERR, "%s: PCI device not found", __func__);
--
To view, visit https://review.coreboot.org/27004
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I30ca4d117b1c21b1b4f1935585f17bd8a15a807b
Gerrit-Change-Number: 27004
Gerrit-PatchSet: 1
Gerrit-Owner: Elyes HAOUAS <ehaouas at noos.fr>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180610/8d299b18/attachment-0001.html>
More information about the coreboot-gerrit
mailing list