[coreboot-gerrit] Patch set updated for coreboot: 334bbb8 pci_ops.{c, h}: Don't hide pointers behind typedefs
Edward O'Callaghan (eocallaghan@alterapraxis.com)
gerrit at coreboot.org
Tue Nov 4 23:46:51 CET 2014
Edward O'Callaghan (eocallaghan at alterapraxis.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/7227
-gerrit
commit 334bbb8d0cc925ed881a99d46b0e9cc5b1093503
Author: Edward O'Callaghan <eocallaghan at alterapraxis.com>
Date: Wed Oct 29 03:04:40 2014 +1100
pci_ops.{c,h}: Don't hide pointers behind typedefs
Change-Id: I7cf7c236f94314d7970b19063d73db788c8267e5
Signed-off-by: Edward O'Callaghan <eocallaghan at alterapraxis.com>
---
src/device/pci_ops.c | 28 ++++++++++++++--------------
src/include/device/pci_ops.h | 24 ++++++++++++------------
2 files changed, 26 insertions(+), 26 deletions(-)
diff --git a/src/device/pci_ops.c b/src/device/pci_ops.c
index 5b633c8..6ddb493 100644
--- a/src/device/pci_ops.c
+++ b/src/device/pci_ops.c
@@ -34,7 +34,7 @@ const struct pci_bus_operations *pci_bus_default_ops(device_t dev)
#endif
}
-static const struct pci_bus_operations *pci_bus_ops(struct bus *bus, device_t dev)
+static const struct pci_bus_operations *pci_bus_ops(struct bus *bus, struct device *dev)
{
const struct pci_bus_operations *bops;
bops = NULL;
@@ -50,7 +50,7 @@ static const struct pci_bus_operations *pci_bus_ops(struct bus *bus, device_t de
* The only consumer of the return value of get_pbus() is pci_bus_ops().
* pci_bus_ops() can handle being passed NULL and auto-picks working ops.
*/
-static struct bus *get_pbus(device_t dev)
+static struct bus *get_pbus(struct device *dev)
{
struct bus *pbus = NULL;
@@ -82,42 +82,42 @@ static struct bus *get_pbus(device_t dev)
return pbus;
}
-u8 pci_read_config8(device_t dev, unsigned int where)
+u8 pci_read_config8(struct device *dev, unsigned int where)
{
struct bus *pbus = get_pbus(dev);
return pci_bus_ops(pbus, dev)->read8(pbus, dev->bus->secondary,
dev->path.pci.devfn, where);
}
-u16 pci_read_config16(device_t dev, unsigned int where)
+u16 pci_read_config16(struct device *dev, unsigned int where)
{
struct bus *pbus = get_pbus(dev);
return pci_bus_ops(pbus, dev)->read16(pbus, dev->bus->secondary,
dev->path.pci.devfn, where);
}
-u32 pci_read_config32(device_t dev, unsigned int where)
+u32 pci_read_config32(struct device *dev, unsigned int where)
{
struct bus *pbus = get_pbus(dev);
return pci_bus_ops(pbus, dev)->read32(pbus, dev->bus->secondary,
dev->path.pci.devfn, where);
}
-void pci_write_config8(device_t dev, unsigned int where, u8 val)
+void pci_write_config8(struct device *dev, unsigned int where, u8 val)
{
struct bus *pbus = get_pbus(dev);
pci_bus_ops(pbus, dev)->write8(pbus, dev->bus->secondary,
dev->path.pci.devfn, where, val);
}
-void pci_write_config16(device_t dev, unsigned int where, u16 val)
+void pci_write_config16(struct device *dev, unsigned int where, u16 val)
{
struct bus *pbus = get_pbus(dev);
pci_bus_ops(pbus, dev)->write16(pbus, dev->bus->secondary,
dev->path.pci.devfn, where, val);
}
-void pci_write_config32(device_t dev, unsigned int where, u32 val)
+void pci_write_config32(struct device *dev, unsigned int where, u32 val)
{
struct bus *pbus = get_pbus(dev);
pci_bus_ops(pbus, dev)->write32(pbus, dev->bus->secondary,
@@ -125,42 +125,42 @@ void pci_write_config32(device_t dev, unsigned int where, u32 val)
}
#if CONFIG_MMCONF_SUPPORT
-u8 pci_mmio_read_config8(device_t dev, unsigned int where)
+u8 pci_mmio_read_config8(struct device *dev, unsigned int where)
{
struct bus *pbus = get_pbus(dev);
return pci_ops_mmconf.read8(pbus, dev->bus->secondary,
dev->path.pci.devfn, where);
}
-u16 pci_mmio_read_config16(device_t dev, unsigned int where)
+u16 pci_mmio_read_config16(struct device *dev, unsigned int where)
{
struct bus *pbus = get_pbus(dev);
return pci_ops_mmconf.read16(pbus, dev->bus->secondary,
dev->path.pci.devfn, where);
}
-u32 pci_mmio_read_config32(device_t dev, unsigned int where)
+u32 pci_mmio_read_config32(struct device *dev, unsigned int where)
{
struct bus *pbus = get_pbus(dev);
return pci_ops_mmconf.read32(pbus, dev->bus->secondary,
dev->path.pci.devfn, where);
}
-void pci_mmio_write_config8(device_t dev, unsigned int where, u8 val)
+void pci_mmio_write_config8(struct device *dev, unsigned int where, u8 val)
{
struct bus *pbus = get_pbus(dev);
pci_ops_mmconf.write8(pbus, dev->bus->secondary, dev->path.pci.devfn,
where, val);
}
-void pci_mmio_write_config16(device_t dev, unsigned int where, u16 val)
+void pci_mmio_write_config16(struct device *dev, unsigned int where, u16 val)
{
struct bus *pbus = get_pbus(dev);
pci_ops_mmconf.write16(pbus, dev->bus->secondary, dev->path.pci.devfn,
where, val);
}
-void pci_mmio_write_config32(device_t dev, unsigned int where, u32 val)
+void pci_mmio_write_config32(struct device *dev, unsigned int where, u32 val)
{
struct bus *pbus = get_pbus(dev);
pci_ops_mmconf.write32(pbus, dev->bus->secondary, dev->path.pci.devfn,
diff --git a/src/include/device/pci_ops.h b/src/include/device/pci_ops.h
index ae58a01..920475a 100644
--- a/src/include/device/pci_ops.h
+++ b/src/include/device/pci_ops.h
@@ -6,20 +6,20 @@
#include <arch/pci_ops.h>
#ifndef __SIMPLE_DEVICE__
-u8 pci_read_config8(device_t dev, unsigned int where);
-u16 pci_read_config16(device_t dev, unsigned int where);
-u32 pci_read_config32(device_t dev, unsigned int where);
-void pci_write_config8(device_t dev, unsigned int where, u8 val);
-void pci_write_config16(device_t dev, unsigned int where, u16 val);
-void pci_write_config32(device_t dev, unsigned int where, u32 val);
+u8 pci_read_config8(struct device *dev, unsigned int where);
+u16 pci_read_config16(struct device *dev, unsigned int where);
+u32 pci_read_config32(struct device *dev, unsigned int where);
+void pci_write_config8(struct device *dev, unsigned int where, u8 val);
+void pci_write_config16(struct device *dev, unsigned int where, u16 val);
+void pci_write_config32(struct device *dev, unsigned int where, u32 val);
#if CONFIG_MMCONF_SUPPORT
-u8 pci_mmio_read_config8(device_t dev, unsigned int where);
-u16 pci_mmio_read_config16(device_t dev, unsigned int where);
-u32 pci_mmio_read_config32(device_t dev, unsigned int where);
-void pci_mmio_write_config8(device_t dev, unsigned int where, u8 val);
-void pci_mmio_write_config16(device_t dev, unsigned int where, u16 val);
-void pci_mmio_write_config32(device_t dev, unsigned int where, u32 val);
+u8 pci_mmio_read_config8(struct device *dev, unsigned int where);
+u16 pci_mmio_read_config16(struct device *dev, unsigned int where);
+u32 pci_mmio_read_config32(struct device *dev, unsigned int where);
+void pci_mmio_write_config8(struct device *dev, unsigned int where, u8 val);
+void pci_mmio_write_config16(struct device *dev, unsigned int where, u16 val);
+void pci_mmio_write_config32(struct device *dev, unsigned int where, u32 val);
#endif
#endif
More information about the coreboot-gerrit
mailing list