dev.c (44156eee91ba6f027afbfd6a39016c0e7e31c8e9) | dev.c (af1cbfb9bf0fe079ca328231451fd4db8b3eafec) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * Tegra host1x driver 4 * 5 * Copyright (c) 2010-2013, NVIDIA Corporation. 6 */ 7 8#include <linux/clk.h> --- 4 unchanged lines hidden (view full) --- 13#include <linux/of_device.h> 14#include <linux/of.h> 15#include <linux/slab.h> 16 17#define CREATE_TRACE_POINTS 18#include <trace/events/host1x.h> 19#undef CREATE_TRACE_POINTS 20 | 1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * Tegra host1x driver 4 * 5 * Copyright (c) 2010-2013, NVIDIA Corporation. 6 */ 7 8#include <linux/clk.h> --- 4 unchanged lines hidden (view full) --- 13#include <linux/of_device.h> 14#include <linux/of.h> 15#include <linux/slab.h> 16 17#define CREATE_TRACE_POINTS 18#include <trace/events/host1x.h> 19#undef CREATE_TRACE_POINTS 20 |
21#if IS_ENABLED(CONFIG_ARM_DMA_USE_IOMMU) 22#include <asm/dma-iommu.h> 23#endif 24 | |
25#include "bus.h" 26#include "channel.h" 27#include "debug.h" 28#include "dev.h" 29#include "intr.h" 30 31#include "hw/host1x01.h" 32#include "hw/host1x02.h" --- 238 unchanged lines hidden (view full) --- 271 } 272 273 host->rst = devm_reset_control_get(&pdev->dev, "host1x"); 274 if (IS_ERR(host->rst)) { 275 err = PTR_ERR(host->rst); 276 dev_err(&pdev->dev, "failed to get reset: %d\n", err); 277 return err; 278 } | 21#include "bus.h" 22#include "channel.h" 23#include "debug.h" 24#include "dev.h" 25#include "intr.h" 26 27#include "hw/host1x01.h" 28#include "hw/host1x02.h" --- 238 unchanged lines hidden (view full) --- 267 } 268 269 host->rst = devm_reset_control_get(&pdev->dev, "host1x"); 270 if (IS_ERR(host->rst)) { 271 err = PTR_ERR(host->rst); 272 dev_err(&pdev->dev, "failed to get reset: %d\n", err); 273 return err; 274 } |
279#if IS_ENABLED(CONFIG_ARM_DMA_USE_IOMMU) 280 if (host->dev->archdata.mapping) { 281 struct dma_iommu_mapping *mapping = 282 to_dma_iommu_mapping(host->dev); 283 arm_iommu_detach_device(host->dev); 284 arm_iommu_release_mapping(mapping); 285 } 286#endif | 275 |
287 if (IS_ENABLED(CONFIG_TEGRA_HOST1X_FIREWALL)) 288 goto skip_iommu; 289 | 276 if (IS_ENABLED(CONFIG_TEGRA_HOST1X_FIREWALL)) 277 goto skip_iommu; 278 |
279 if (iommu_get_domain_for_dev(&pdev->dev)) 280 goto skip_iommu; 281 |
|
290 host->group = iommu_group_get(&pdev->dev); 291 if (host->group) { 292 struct iommu_domain_geometry *geometry; 293 u64 mask = dma_get_mask(host->dev); 294 dma_addr_t start, end; 295 unsigned long order; 296 297 err = iova_cache_get(); --- 165 unchanged lines hidden --- | 282 host->group = iommu_group_get(&pdev->dev); 283 if (host->group) { 284 struct iommu_domain_geometry *geometry; 285 u64 mask = dma_get_mask(host->dev); 286 dma_addr_t start, end; 287 unsigned long order; 288 289 err = iova_cache_get(); --- 165 unchanged lines hidden --- |