OSDN Git Service

iommu/arm-smmu: add support for PCI master devices
authorWill Deacon <will.deacon@arm.com>
Thu, 1 May 2014 17:05:08 +0000 (18:05 +0100)
committerWill Deacon <will.deacon@arm.com>
Thu, 3 Jul 2014 14:50:21 +0000 (15:50 +0100)
commita9a1b0b53d8b7ca60abef0687eae927f286f07c2
tree428e91378bf91375047156a8ac707b1eb45f557b
parenta65217a4bcdb654e04fcc42b302d8a15708e14ce
iommu/arm-smmu: add support for PCI master devices

This patch extends the ARM SMMU driver so that it can handle PCI master
devices in addition to platform devices described in the device tree.

The driver is informed about the PCI host controller in the DT via a
phandle to the host controller in the mmu-masters property. The host
controller is then added to the master tree for that SMMU, just like a
normal master (although it probably doesn't advertise any StreamIDs).

When a device is added to the PCI bus, we set the archdata.iommu pointer
for that device to describe its StreamID (actually its RequesterID for
the moment). This allows us to re-use our existing data structures using
the host controller of_node for everything apart from StreamID
configuration, where we reach into the archdata for the information we
require.

Cc: Varun Sethi <varun.sethi@freescale.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
drivers/iommu/arm-smmu.c