Lines Matching defs:iommu
54 * Return the iommu registered with the specified node, or NULL if
60 struct fdtbus_iommu *iommu;
62 LIST_FOREACH(iommu, &fdtbus_iommus, iommu_next) {
63 if (iommu->iommu_phandle == phandle) {
64 return iommu;
74 * Register an IOMMU on the specified node.
80 struct fdtbus_iommu *iommu;
87 if (of_getprop_uint32(phandle, "#iommu-cells", &cells) != 0) {
95 iommu = kmem_alloc(sizeof(*iommu), KM_SLEEP);
96 iommu->iommu_dev = dev;
97 iommu->iommu_phandle = phandle;
98 iommu->iommu_funcs = funcs;
99 iommu->iommu_cells = cells;
101 LIST_INSERT_HEAD(&fdtbus_iommus, iommu, iommu_next);
112 * IOMMU is not found, the original bus dma tag is returned.
117 struct fdtbus_iommu *iommu;
130 if (of_getprop_uint32(iommu_phandle, "#iommu-cells", &cells)) {
134 iommu = fdtbus_get_iommu(iommu_phandle);
135 if (iommu == NULL) {
138 return iommu->iommu_funcs->map(iommu->iommu_dev,
158 struct fdtbus_iommu *iommu;
165 p = fdtbus_get_prop(phandle, "iommu-map", &len);
168 if (of_getprop_uint32(phandle, "iommu-map-mask", &map_mask) == 0) {
183 if (of_getprop_uint32(iommu_phandle, "#iommu-cells", &cells)) {
188 * The pci-iommu bindings expect iommu references with
193 iommu = fdtbus_get_iommu(iommu_phandle);
194 if (iommu == NULL) {
200 return iommu->iommu_funcs->map(iommu->iommu_dev,