-# Copyright (c) 2012-2016 ARM Limited
+# Copyright (c) 2012-2016,2019 ARM Limited
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
abstract = True
dma = MasterPort("DMA port")
+ _iommu = None
+
sid = Param.Unsigned(0,
"Stream identifier used by an IOMMU to distinguish amongst "
"several devices attached to it")
"Substream identifier used by an IOMMU to distinguish amongst "
"several devices attached to it")
+ def addIommuProperty(self, state, node):
+ """
+ This method takes an FdtState and a FdtNode as parameters, and
+ it is appending a "iommus = <>" property in case the DmaDevice
+ is attached to an IOMMU.
+ This method is necessary for autogenerating a binding between
+ a dma device and the iommu.
+ """
+ if self._iommu is not None:
+ node.append(FdtPropertyWords("iommus",
+ [ state.phandle(self._iommu), self.sid ]))
class IsaFake(BasicPioDevice):
type = 'IsaFake'