diff options
author | Caleb Connolly | 2023-12-11 18:41:41 +0000 |
---|---|---|
committer | Tom Rini | 2023-12-21 11:59:49 -0500 |
commit | 76c53dad6b5dc94e4c43069882b2708853c284c0 (patch) | |
tree | f9ef0304d6bd59d54ca9b49c735c269cfe6d8b7c /include/iommu.h | |
parent | e96ecbe71925f31ee43d353ceabe5b2c53df512f (diff) |
iommu: add a connect op
Add an optional iommu callback to be invoked before a device probes.
This can be used to configure the IOMMU in preparation for the device
(e.g. by allocating a context bank)
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Diffstat (limited to 'include/iommu.h')
-rw-r--r-- | include/iommu.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/iommu.h b/include/iommu.h index cf9719c5e91..b8ba0b8e707 100644 --- a/include/iommu.h +++ b/include/iommu.h @@ -5,6 +5,15 @@ struct udevice; struct iommu_ops { /** + * init() - Connect a device to it's IOMMU, called before probe() + * The iommu device can be fetched through dev->iommu + * + * @iommu_dev: IOMMU device + * @dev: Device to connect + * @return 0 if OK, -errno on error + */ + int (*connect)(struct udevice *dev); + /** * map() - map DMA memory * * @dev: device for which to map DMA memory |