Files
linux-nv-oot/drivers/video/tegra/tsec/tsec_linux.h
Nikesh Oswal 31d2e5fff7 video: tegra: tsec: changes to compile for k5.15
This patch does changes needed in cache flush and
carevout related memory apis which are different
between k5.10 and k5.15.

Also Makefile is changed so that driver gets built
as module on k5.15 and as part of kernel image for
the older k5.10 kernel

Bug 3817626

Change-Id: I4050d41efc61353c34d32d347917e813473ba113
Signed-off-by: Nikesh Oswal <noswal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2793274
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-04 05:28:43 +00:00

46 lines
2.0 KiB
C

/* SPDX-License-Identifier: GPL-2.0-only */
/*
*
* Tegra TSEC Module Support
*
* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef TSEC_LINUX_H
#define TSEC_LINUX_H
#include <linux/types.h> /* for types like u8, u32 etc */
#include <linux/platform_device.h> /* for platform_device */
#include <linux/of_platform.h> /* for of_match_device etc */
#include <linux/slab.h> /* for kzalloc */
#include <linux/delay.h> /* for udelay */
#include <linux/clk.h> /* for clk_prepare_enable */
#include <linux/reset.h> /* for reset_control_reset */
#include <linux/iommu.h> /* for dev_iommu_fwspec_get */
#include <linux/iopoll.h> /* for readl_poll_timeout */
#include <linux/dma-mapping.h> /* for dma_map_page_attrs */
#include <linux/pm.h> /* for dev_pm_ops */
#include <linux/version.h> /* for KERNEL_VERSION */
#include <linux/interrupt.h> /* for enable_irq */
#include <linux/firmware.h> /* for request_firmware */
#include <asm/cacheflush.h> /* for __flush_dcache_area */
#if (KERNEL_VERSION(5, 15, 0) <= LINUX_VERSION_CODE)
#include <soc/tegra/mc.h> /* for tegra_mc_get_carveout_info */
#else
#include <linux/platform/tegra/tegra_mc.h> /* for mc_get_carveout_info */
#endif
#endif /* TSEC_LINUX_H */