summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/iotrace.h13
-rw-r--r--include/pci.h20
2 files changed, 26 insertions, 7 deletions
diff --git a/include/iotrace.h b/include/iotrace.h
index be1d2753e1..380da1fbc2 100644
--- a/include/iotrace.h
+++ b/include/iotrace.h
@@ -49,30 +49,29 @@ struct iotrace_record {
#define readl(addr) iotrace_readl((const void *)(addr))
#undef writel
-#define writel(val, addr) iotrace_writel(val, (const void *)(addr))
+#define writel(val, addr) iotrace_writel(val, (void *)(addr))
#undef readw
#define readw(addr) iotrace_readw((const void *)(addr))
#undef writew
-#define writew(val, addr) iotrace_writew(val, (const void *)(addr))
+#define writew(val, addr) iotrace_writew(val, (void *)(addr))
#undef readb
#define readb(addr) iotrace_readb((const void *)(uintptr_t)addr)
#undef writeb
-#define writeb(val, addr) \
- iotrace_writeb(val, (const void *)(uintptr_t)addr)
+#define writeb(val, addr) iotrace_writeb(val, (void *)(uintptr_t)addr)
#endif
/* Tracing functions which mirror their io.h counterparts */
u32 iotrace_readl(const void *ptr);
-void iotrace_writel(ulong value, const void *ptr);
+void iotrace_writel(ulong value, void *ptr);
u16 iotrace_readw(const void *ptr);
-void iotrace_writew(ulong value, const void *ptr);
+void iotrace_writew(ulong value, void *ptr);
u8 iotrace_readb(const void *ptr);
-void iotrace_writeb(ulong value, const void *ptr);
+void iotrace_writeb(ulong value, void *ptr);
/**
* iotrace_reset_checksum() - Reset the iotrace checksum
diff --git a/include/pci.h b/include/pci.h
index 8aa6636cfb..ff59ac0e69 100644
--- a/include/pci.h
+++ b/include/pci.h
@@ -1491,6 +1491,17 @@ int dm_pci_find_device(unsigned int vendor, unsigned int device, int index,
int dm_pci_find_class(uint find_class, int index, struct udevice **devp);
/**
+ * struct pci_emul_uc_priv - holds info about an emulator device
+ *
+ * There is always at most one emulator per client
+ *
+ * @client: Client device if any, else NULL
+ */
+struct pci_emul_uc_priv {
+ struct udevice *client;
+};
+
+/**
* struct dm_pci_emul_ops - PCI device emulator operations
*/
struct dm_pci_emul_ops {
@@ -1593,6 +1604,15 @@ int sandbox_pci_get_emul(struct udevice *bus, pci_dev_t find_devfn,
struct udevice **containerp, struct udevice **emulp);
/**
+ * sandbox_pci_get_client() - Find the client for an emulation device
+ *
+ * @emul: Emulation device to check
+ * @devp: Returns the client device emulated by this device
+ * @return 0 if OK, -ENOENT if the device has no client yet
+ */
+int sandbox_pci_get_client(struct udevice *emul, struct udevice **devp);
+
+/**
* pci_get_devfn() - Extract the devfn from fdt_pci_addr of the device
*
* Get devfn from fdt_pci_addr of the specified device