Lines Matching +full:smmu +full:- +full:v3

1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
58 { "arm,smmu-v3", 1 },
68 if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0) in smmu_fdt_probe()
71 device_set_desc(dev, "ARM System MMU (SMMU) v3"); in smmu_fdt_probe()
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()
121 * by the SMMU driver. This IRQ line may or may not be provided by 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()
172 device_printf(dev, "Failed to register SMMU.\n"); in smmu_fdt_attach()
176 OF_device_register_xref(sc->xref, dev); in smmu_fdt_attach()
199 DEFINE_CLASS_1(smmu, smmu_fdt_driver, smmu_fdt_methods,
202 EARLY_DRIVER_MODULE(smmu, simplebus, smmu_fdt_driver, 0, 0,