Lines Matching defs:dev
14 #include "dev.h"
16 static void host1x_memory_context_release(struct device *dev)
24 struct device_node *node = host1x->dev->of_node;
47 device_initialize(&ctx->dev);
54 ctx->dev.dma_mask = &ctx->dma_mask;
55 ctx->dev.coherent_dma_mask = ctx->dma_mask;
56 dev_set_name(&ctx->dev, "host1x-ctx.%d", i);
57 ctx->dev.bus = &host1x_context_device_bus_type;
58 ctx->dev.parent = host1x->dev;
59 ctx->dev.release = host1x_memory_context_release;
61 dma_set_max_seg_size(&ctx->dev, UINT_MAX);
63 err = device_add(&ctx->dev);
65 dev_err(host1x->dev, "could not add context device %d: %d\n", i, err);
66 put_device(&ctx->dev);
70 err = of_dma_configure_id(&ctx->dev, node, true, &i);
72 dev_err(host1x->dev, "IOMMU configuration failed for context device %d: %d\n",
74 device_unregister(&ctx->dev);
78 if (!tegra_dev_iommu_get_stream_id(&ctx->dev, &ctx->stream_id) ||
79 !device_iommu_mapped(&ctx->dev)) {
80 dev_err(host1x->dev, "Context device %d has no IOMMU!\n", i);
81 device_unregister(&ctx->dev);
98 device_unregister(&cdl->devs[i].dev);
112 device_unregister(&cdl->devs[i].dev);
119 struct device *dev,
134 if (cd->dev.iommu->iommu_dev != dev->iommu->iommu_dev)