Lines Matching +full:iommu +full:- +full:names
1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
46 #include <dev/iommu/iommu.h>
51 #include <dev/iommu/iommu.h>
53 #include <arm64/iommu/iommu.h>
58 { "arm,smmu-v3", 1 },
68 if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0) in smmu_fdt_probe()
81 struct iommu_unit *iommu; in smmu_fdt_attach() local
87 sc->dev = dev; in smmu_fdt_attach()
92 sc->res[0] = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, in smmu_fdt_attach()
94 if (sc->res[0] == NULL) { in smmu_fdt_attach()
101 * Interrupt lines are "eventq", "priq", "cmdq-sync", "gerror". in smmu_fdt_attach()
104 err = ofw_bus_find_string_index(node, "interrupt-names", "eventq", in smmu_fdt_attach()
112 sc->res[1] = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_ACTIVE); in smmu_fdt_attach()
113 if (sc->res[1] == NULL) { in smmu_fdt_attach()
120 * sc->res[2] is reserved for priq IRQ. It is optional and not used in smmu_fdt_attach()
125 err = ofw_bus_find_string_index(node, "interrupt-names", "cmdq-sync", in smmu_fdt_attach()
128 device_printf(dev, "Can't get cmdq-sync IRQ.\n"); in smmu_fdt_attach()
133 sc->res[3] = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_ACTIVE); in smmu_fdt_attach()
134 if (sc->res[3] == NULL) { in smmu_fdt_attach()
135 device_printf(dev, "Can't allocate cmdq-sync IRQ resource.\n"); in smmu_fdt_attach()
140 err = ofw_bus_find_string_index(node, "interrupt-names", "gerror", in smmu_fdt_attach()
148 sc->res[4] = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_ACTIVE); in smmu_fdt_attach()
149 if (sc->res[4] == NULL) { in smmu_fdt_attach()
159 unit = &sc->unit; in smmu_fdt_attach()
160 unit->dev = dev; in smmu_fdt_attach()
162 iommu = &unit->iommu; in smmu_fdt_attach()
163 iommu->dev = dev; in smmu_fdt_attach()
165 LIST_INIT(&unit->domain_list); in smmu_fdt_attach()
168 sc->xref = OF_xref_from_node(node); in smmu_fdt_attach()
170 err = iommu_register(iommu); in smmu_fdt_attach()
176 OF_device_register_xref(sc->xref, dev); in smmu_fdt_attach()