mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
nvadsp: Update license and remove kernel ver check
- Update license of all files in nvadsp that will be used - Remove kernel version checks in the code Bug 4164138 Bug 3682950 Change-Id: Ie1f9ba95c1d46c3dd9bc5614e502b1b444484df6 Signed-off-by: Viswanath L <viswanathl@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2980528 Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
ac4912cb26
commit
119c4f87e2
@@ -1,17 +1,6 @@
|
||||
/*
|
||||
* Copyright (C) 2016-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/>.
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/**
|
||||
* Copyright (c) 2016-2023, NVIDIA CORPORATION. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/platform_device.h>
|
||||
@@ -66,15 +55,6 @@ struct acast_region {
|
||||
#define ACAST_SID_REG_EVAL(IDX) AST_STREAMID_CTL_##IDX
|
||||
#define ACAST_STRMID_REG(IDX) ACAST_SID_REG_EVAL(IDX)
|
||||
|
||||
#if KERNEL_VERSION(4, 14, 0) > LINUX_VERSION_CODE
|
||||
/* Older kernels do not have this function, so stubbing it */
|
||||
static inline int of_property_read_u64_index(const struct device_node *np,
|
||||
const char *propname, u32 index, u64 *out_value)
|
||||
{
|
||||
return -ENOSYS;
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline void acast_write(void __iomem *acast, u32 reg, u32 val)
|
||||
{
|
||||
writel(val, acast + reg);
|
||||
|
||||
@@ -1,19 +1,6 @@
|
||||
/*
|
||||
* adsp_console_dbfs.c
|
||||
*
|
||||
* adsp mailbox console driver
|
||||
*
|
||||
* Copyright (C) 2014-2022, NVIDIA Corporation. All rights reserved.
|
||||
*
|
||||
* This software is licensed under the terms of the GNU General Public
|
||||
* License version 2, as published by the Free Software Foundation, and
|
||||
* may be copied, distributed, and modified under those terms.
|
||||
*
|
||||
* This program is distributed in the hope that 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.
|
||||
*
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/**
|
||||
* Copyright (c) 2014-2023, NVIDIA CORPORATION. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
@@ -44,11 +31,7 @@ static int open_cnt;
|
||||
|
||||
static uint64_t adsp_app_ctx_vals[ADSP_APP_CTX_MAX];
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0)
|
||||
#define ACCESS_OK(addr, size) access_ok(0, addr, size)
|
||||
#else
|
||||
#define ACCESS_OK(addr, size) access_ok(addr, size)
|
||||
#endif
|
||||
|
||||
static int adsp_app_ctx_add(uint64_t ctx)
|
||||
{
|
||||
|
||||
@@ -1,20 +1,7 @@
|
||||
/*
|
||||
* adsp_console_dbfs.h
|
||||
*
|
||||
* A header file for adsp console driver
|
||||
*
|
||||
* Copyright (C) 2014 NVIDIA Corporation. All rights reserved.
|
||||
*
|
||||
* This software is licensed under the terms of the GNU General Public
|
||||
* License version 2, as published by the Free Software Foundation, and
|
||||
* may be copied, distributed, and modified under those terms.
|
||||
*
|
||||
* This program is distributed in the hope that 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.
|
||||
*
|
||||
*/
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/**
|
||||
* Copyright (c) 2014-2023, NVIDIA CORPORATION. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef ADSP_CNSL_DBFS_H
|
||||
#define ADSP_CNSL_DBFS_H
|
||||
|
||||
@@ -1,19 +1,6 @@
|
||||
/*
|
||||
* adsp_shared_struct.h
|
||||
*
|
||||
* A header file containing shared data structures shared with ADSP OS
|
||||
*
|
||||
* Copyright (C) 2015-2022 NVIDIA Corporation. All rights reserved.
|
||||
*
|
||||
* This software is licensed under the terms of the GNU General Public
|
||||
* License version 2, as published by the Free Software Foundation, and
|
||||
* may be copied, distributed, and modified under those terms.
|
||||
*
|
||||
* This program is distributed in the hope that 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.
|
||||
*
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/**
|
||||
* Copyright (c) 2015-2023, NVIDIA CORPORATION. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef __ADSP_SHARED_STRUCT
|
||||
|
||||
@@ -1,30 +1,13 @@
|
||||
/*
|
||||
* amc.c
|
||||
*
|
||||
* AMC and ARAM handling
|
||||
*
|
||||
* Copyright (C) 2014-2021, NVIDIA Corporation. All rights reserved.
|
||||
*
|
||||
* This software is licensed under the terms of the GNU General Public
|
||||
* License version 2, as published by the Free Software Foundation, and
|
||||
* may be copied, distributed, and modified under those terms.
|
||||
*
|
||||
* This program is distributed in the hope that 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.
|
||||
*
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/**
|
||||
* Copyright (c) 2014-2023, NVIDIA CORPORATION. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/tegra_nvadsp.h>
|
||||
#include <linux/irqchip/tegra-agic.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/version.h>
|
||||
#if KERNEL_VERSION(4, 15, 0) > LINUX_VERSION_CODE
|
||||
#include <soc/tegra/chip-id.h>
|
||||
#else
|
||||
#include <soc/tegra/fuse.h>
|
||||
#endif
|
||||
|
||||
#include "dev.h"
|
||||
#include "amc.h"
|
||||
|
||||
@@ -1,19 +1,6 @@
|
||||
/*
|
||||
* amc.h
|
||||
*
|
||||
* A header file for AMC/ARAM
|
||||
*
|
||||
* Copyright (C) 2014 NVIDIA Corporation. All rights reserved.
|
||||
*
|
||||
* This software is licensed under the terms of the GNU General Public
|
||||
* License version 2, as published by the Free Software Foundation, and
|
||||
* may be copied, distributed, and modified under those terms.
|
||||
*
|
||||
* This program is distributed in the hope that 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.
|
||||
*
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/**
|
||||
* Copyright (c) 2014-2023, NVIDIA CORPORATION. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef __TEGRA_NVADSP_AMC_H
|
||||
|
||||
@@ -1,19 +1,6 @@
|
||||
/*
|
||||
* nvadsp_app.c
|
||||
*
|
||||
* ADSP OS App management
|
||||
*
|
||||
* Copyright (C) 2014-2022 NVIDIA Corporation. All rights reserved.
|
||||
*
|
||||
* This software is licensed under the terms of the GNU General Public
|
||||
* License version 2, as published by the Free Software Foundation, and
|
||||
* may be copied, distributed, and modified under those terms.
|
||||
*
|
||||
* This program is distributed in the hope that 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.
|
||||
*
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/**
|
||||
* Copyright (c) 2014-2023, NVIDIA CORPORATION. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/tegra_nvadsp.h>
|
||||
|
||||
@@ -1,19 +1,6 @@
|
||||
/*
|
||||
* aram_managerc
|
||||
*
|
||||
* ARAM manager
|
||||
*
|
||||
* Copyright (C) 2014-2022, NVIDIA Corporation. All rights reserved.
|
||||
*
|
||||
* This software is licensed under the terms of the GNU General Public
|
||||
* License version 2, as published by the Free Software Foundation, and
|
||||
* may be copied, distributed, and modified under those terms.
|
||||
*
|
||||
* This program is distributed in the hope that 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.
|
||||
*
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/**
|
||||
* Copyright (c) 2014-2023, NVIDIA CORPORATION. All rights reserved.
|
||||
*/
|
||||
|
||||
#define pr_fmt(fmt) "%s : %d, " fmt, __func__, __LINE__
|
||||
|
||||
@@ -1,16 +1,6 @@
|
||||
/*
|
||||
* Header file for aram manager
|
||||
*
|
||||
* Copyright (c) 2014-2017, 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.
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/**
|
||||
* Copyright (c) 2014-2023, NVIDIA CORPORATION. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef __TEGRA_NVADSP_ARAM_MANAGER_H
|
||||
|
||||
@@ -1,22 +1,10 @@
|
||||
/*
|
||||
* Copyright (c) 2015-2021, NVIDIA Corporation. All rights reserved.
|
||||
*
|
||||
* This software is licensed under the terms of the GNU General Public
|
||||
* License version 2, as published by the Free Software Foundation, and
|
||||
* may be copied, distributed, and modified under those terms.
|
||||
*
|
||||
* This program is distributed in the hope that 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.
|
||||
*
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/**
|
||||
* Copyright (c) 2015-2023, NVIDIA CORPORATION. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/version.h>
|
||||
#if KERNEL_VERSION(4, 15, 0) > LINUX_VERSION_CODE
|
||||
#include <soc/tegra/chip-id.h>
|
||||
#else
|
||||
#include <soc/tegra/fuse.h>
|
||||
#endif
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/tegra_nvadsp.h>
|
||||
#include <linux/reset.h>
|
||||
|
||||
@@ -1,15 +1,6 @@
|
||||
/*
|
||||
* Copyright (C) 2015-2021, NVIDIA Corporation. All rights reserved.
|
||||
*
|
||||
* This software is licensed under the terms of the GNU General Public
|
||||
* License version 2, as published by the Free Software Foundation, and
|
||||
* may be copied, distributed, and modified under those terms.
|
||||
*
|
||||
* This program is distributed in the hope that 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.
|
||||
*
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/**
|
||||
* Copyright (c) 2015-2023, NVIDIA CORPORATION. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef __TEGRA_NVADSP_DEV_T18X_H
|
||||
|
||||
@@ -1,19 +1,6 @@
|
||||
/*
|
||||
* dev.c
|
||||
*
|
||||
* A device driver for ADSP and APE
|
||||
*
|
||||
* Copyright (C) 2014-2022, NVIDIA Corporation. All rights reserved.
|
||||
*
|
||||
* This software is licensed under the terms of the GNU General Public
|
||||
* License version 2, as published by the Free Software Foundation, and
|
||||
* may be copied, distributed, and modified under those terms.
|
||||
*
|
||||
* This program is distributed in the hope that 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.
|
||||
*
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/**
|
||||
* Copyright (c) 2014-2023, NVIDIA CORPORATION. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/platform_device.h>
|
||||
@@ -28,15 +15,8 @@
|
||||
#include <linux/io.h>
|
||||
#include <linux/tegra_nvadsp.h>
|
||||
#include <linux/version.h>
|
||||
#if KERNEL_VERSION(4, 15, 0) > LINUX_VERSION_CODE
|
||||
#include <soc/tegra/chip-id.h>
|
||||
#else
|
||||
#include <soc/tegra/fuse.h>
|
||||
#endif
|
||||
#include <linux/pm_runtime.h>
|
||||
#if KERNEL_VERSION(5, 4, 0) > LINUX_VERSION_CODE
|
||||
#include <linux/tegra_pm_domains.h>
|
||||
#endif
|
||||
#include <linux/clk/tegra.h>
|
||||
#include <linux/delay.h>
|
||||
#include <asm/arch_timer.h>
|
||||
@@ -128,11 +108,7 @@ static const struct dev_pm_ops nvadsp_pm_ops = {
|
||||
|
||||
uint64_t nvadsp_get_timestamp_counter(void)
|
||||
{
|
||||
#if KERNEL_VERSION(5, 4, 0) > LINUX_VERSION_CODE
|
||||
return arch_counter_get_cntvct();
|
||||
#else
|
||||
return __arch_counter_get_cntvct_stable();
|
||||
#endif
|
||||
}
|
||||
EXPORT_SYMBOL(nvadsp_get_timestamp_counter);
|
||||
|
||||
@@ -143,11 +119,9 @@ int nvadsp_set_bw(struct nvadsp_drv_data *drv_data, u32 efreq)
|
||||
if (drv_data->bwmgr)
|
||||
ret = tegra_bwmgr_set_emc(drv_data->bwmgr, efreq * 1000,
|
||||
TEGRA_BWMGR_SET_EMC_FLOOR);
|
||||
#if KERNEL_VERSION(5, 9, 0) <= LINUX_VERSION_CODE
|
||||
else if (drv_data->icc_path_handle)
|
||||
ret = icc_set_bw(drv_data->icc_path_handle, 0,
|
||||
(unsigned long)FREQ2ICC(efreq * 1000));
|
||||
#endif
|
||||
if (ret)
|
||||
dev_err(&drv_data->pdev->dev,
|
||||
"failed to set emc freq rate:%d\n", ret);
|
||||
@@ -171,7 +145,6 @@ static void nvadsp_bw_register(struct nvadsp_drv_data *drv_data)
|
||||
}
|
||||
break;
|
||||
default:
|
||||
#if KERNEL_VERSION(5, 9, 0) <= LINUX_VERSION_CODE
|
||||
if (!is_tegra_hypervisor_mode()) {
|
||||
/* Interconnect Support */
|
||||
#ifdef CONFIG_ARCH_TEGRA_23x_SOC
|
||||
@@ -185,7 +158,6 @@ static void nvadsp_bw_register(struct nvadsp_drv_data *drv_data)
|
||||
drv_data->icc_path_handle = NULL;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -199,12 +171,10 @@ static void nvadsp_bw_unregister(struct nvadsp_drv_data *drv_data)
|
||||
drv_data->bwmgr = NULL;
|
||||
}
|
||||
|
||||
#if KERNEL_VERSION(5, 9, 0) <= LINUX_VERSION_CODE
|
||||
if (drv_data->icc_path_handle) {
|
||||
icc_put(drv_data->icc_path_handle);
|
||||
drv_data->icc_path_handle = NULL;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static int __init nvadsp_parse_co_mem(struct platform_device *pdev)
|
||||
@@ -454,10 +424,6 @@ static int __init nvadsp_probe(struct platform_device *pdev)
|
||||
nvadsp_drv_data = drv_data;
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
#if KERNEL_VERSION(5, 4, 0) > LINUX_VERSION_CODE
|
||||
tegra_pd_add_device(dev);
|
||||
#endif
|
||||
|
||||
pm_runtime_enable(dev);
|
||||
|
||||
ret = pm_runtime_get_sync(dev);
|
||||
@@ -531,10 +497,6 @@ static int nvadsp_remove(struct platform_device *pdev)
|
||||
nvadsp_runtime_suspend(&pdev->dev);
|
||||
#endif
|
||||
|
||||
#if KERNEL_VERSION(5, 4, 0) > LINUX_VERSION_CODE
|
||||
tegra_pd_remove_device(&pdev->dev);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,19 +1,6 @@
|
||||
/*
|
||||
* dev.h
|
||||
*
|
||||
* A header file for Host driver for ADSP and APE
|
||||
*
|
||||
* Copyright (C) 2014-2022, NVIDIA Corporation. All rights reserved.
|
||||
*
|
||||
* This software is licensed under the terms of the GNU General Public
|
||||
* License version 2, as published by the Free Software Foundation, and
|
||||
* may be copied, distributed, and modified under those terms.
|
||||
*
|
||||
* This program is distributed in the hope that 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.
|
||||
*
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/**
|
||||
* Copyright (c) 2014-2023, NVIDIA CORPORATION. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef __TEGRA_NVADSP_DEV_H
|
||||
@@ -25,13 +12,11 @@
|
||||
#include <linux/debugfs.h>
|
||||
|
||||
#include <linux/platform/tegra/emc_bwmgr.h>
|
||||
#if KERNEL_VERSION(5, 9, 0) <= LINUX_VERSION_CODE
|
||||
#ifdef CONFIG_ARCH_TEGRA_23x_SOC
|
||||
#include <linux/platform/tegra/mc_utils.h>
|
||||
#include <dt-bindings/interconnect/tegra_icc_id.h>
|
||||
#endif
|
||||
#include <linux/interconnect.h>
|
||||
#endif
|
||||
|
||||
#include "hwmailbox.h"
|
||||
#include "amc.h"
|
||||
@@ -96,13 +81,11 @@ enum adsp_unit_fpga_reset {
|
||||
#define AMISC_REG_MBOX_OFFSET 0x64
|
||||
#define ADSP_ACTMON_REG_START_OFFSET 0x800
|
||||
#define ADSP_ACTMON_REG_END_OFFSET 0x828
|
||||
#if KERNEL_VERSION(5, 9, 0) <= LINUX_VERSION_CODE
|
||||
#ifdef CONFIG_ARCH_TEGRA_23x_SOC
|
||||
#define FREQ2ICC(x) (Bps_to_icc(emc_freq_to_bw(x)))
|
||||
#else
|
||||
#define FREQ2ICC(x) 0UL
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define NVADSP_ELF "adsp.elf"
|
||||
#define MAX_FW_STR 30
|
||||
@@ -239,9 +222,7 @@ struct nvadsp_drv_data {
|
||||
u32 agic_irqs[NVADSP_VIRQ_MAX];
|
||||
|
||||
struct tegra_bwmgr_client *bwmgr;
|
||||
#if KERNEL_VERSION(5, 9, 0) <= LINUX_VERSION_CODE
|
||||
struct icc_path *icc_path_handle; /* icc_path handle handle */
|
||||
#endif
|
||||
u32 evp_base[ADSP_EVP_END];
|
||||
|
||||
const struct nvadsp_chipdata *chip_data;
|
||||
|
||||
@@ -1,19 +1,6 @@
|
||||
/*
|
||||
* dram_app_mem_manager.c
|
||||
*
|
||||
* dram app memory manager for allocating memory for text,bss and data
|
||||
*
|
||||
* Copyright (C) 2014-2022, NVIDIA Corporation. All rights reserved.
|
||||
*
|
||||
* This software is licensed under the terms of the GNU General Public
|
||||
* License version 2, as published by the Free Software Foundation, and
|
||||
* may be copied, distributed, and modified under those terms.
|
||||
*
|
||||
* This program is distributed in the hope that 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.
|
||||
*
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/**
|
||||
* Copyright (c) 2014-2023, NVIDIA CORPORATION. All rights reserved.
|
||||
*/
|
||||
|
||||
#define pr_fmt(fmt) "%s : %d, " fmt, __func__, __LINE__
|
||||
|
||||
@@ -1,16 +1,6 @@
|
||||
/*
|
||||
* Header file for dram app memory manager
|
||||
*
|
||||
* Copyright (c) 2014-2015, 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.
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/**
|
||||
* Copyright (c) 2014-2023, NVIDIA CORPORATION. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef __TEGRA_NVADSP_DRAM_APP_MEM_MANAGER_H
|
||||
|
||||
@@ -1,14 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2014-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.
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/**
|
||||
* Copyright (c) 2014-2023, NVIDIA CORPORATION. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/atomic.h>
|
||||
|
||||
@@ -1,14 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2014-2017, 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.
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/**
|
||||
* Copyright (c) 2014-2023, NVIDIA CORPORATION. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef __HWMAILBOX_H
|
||||
|
||||
@@ -1,15 +1,6 @@
|
||||
/*
|
||||
* Copyright (C) 2017, NVIDIA Corporation. All rights reserved.
|
||||
*
|
||||
* This software is licensed under the terms of the GNU General Public
|
||||
* License version 2, as published by the Free Software Foundation, and
|
||||
* may be copied, distributed, and modified under those terms.
|
||||
*
|
||||
* This program is distributed in the hope that 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.
|
||||
*
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/**
|
||||
* Copyright (c) 2017-2023, NVIDIA CORPORATION. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef __LOG_STATE_H
|
||||
|
||||
@@ -1,16 +1,6 @@
|
||||
/*
|
||||
* ADSP mailbox manager
|
||||
*
|
||||
* Copyright (c) 2014-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.
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/**
|
||||
* Copyright (c) 2014-2023, NVIDIA CORPORATION. All rights reserved.
|
||||
*/
|
||||
|
||||
#include "dev.h"
|
||||
|
||||
@@ -1,19 +1,6 @@
|
||||
/*
|
||||
* mem_manager.c
|
||||
*
|
||||
* memory manager
|
||||
*
|
||||
* Copyright (C) 2014-2018 NVIDIA Corporation. All rights reserved.
|
||||
*
|
||||
* This software is licensed under the terms of the GNU General Public
|
||||
* License version 2, as published by the Free Software Foundation, and
|
||||
* may be copied, distributed, and modified under those terms.
|
||||
*
|
||||
* This program is distributed in the hope that 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.
|
||||
*
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/**
|
||||
* Copyright (c) 2014-2023, NVIDIA CORPORATION. All rights reserved.
|
||||
*/
|
||||
|
||||
#define pr_fmt(fmt) "%s : %d, " fmt, __func__, __LINE__
|
||||
|
||||
@@ -1,16 +1,6 @@
|
||||
/*
|
||||
* Header file for memory manager
|
||||
*
|
||||
* Copyright (c) 2014, 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.
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/**
|
||||
* Copyright (c) 2014-2023, NVIDIA CORPORATION. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef __TEGRA_NVADSP_MEM_MANAGER_H
|
||||
|
||||
@@ -1,16 +1,6 @@
|
||||
/*
|
||||
* ADSP circular message queue
|
||||
*
|
||||
* Copyright (c) 2014-2019, 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.
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/**
|
||||
* Copyright (c) 2014-2023, NVIDIA CORPORATION. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/tegra_nvadsp.h>
|
||||
|
||||
@@ -1,19 +1,6 @@
|
||||
/*
|
||||
* nvadsp_shared_sema.c
|
||||
*
|
||||
* ADSP Shared Semaphores
|
||||
*
|
||||
* Copyright (C) 2014 NVIDIA Corporation. All rights reserved.
|
||||
*
|
||||
* This software is licensed under the terms of the GNU General Public
|
||||
* License version 2, as published by the Free Software Foundation, and
|
||||
* may be copied, distributed, and modified under those terms.
|
||||
*
|
||||
* This program is distributed in the hope that 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.
|
||||
*
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/**
|
||||
* Copyright (c) 2014-2023, NVIDIA CORPORATION. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/tegra_nvadsp.h>
|
||||
|
||||
@@ -1,23 +1,10 @@
|
||||
/*
|
||||
* Copyright (C) 2015-2022, NVIDIA Corporation. All rights reserved.
|
||||
*
|
||||
* This software is licensed under the terms of the GNU General Public
|
||||
* License version 2, as published by the Free Software Foundation, and
|
||||
* may be copied, distributed, and modified under those terms.
|
||||
*
|
||||
* This program is distributed in the hope that 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.
|
||||
*
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/**
|
||||
* Copyright (c) 2015-2023, NVIDIA CORPORATION. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/version.h>
|
||||
#if KERNEL_VERSION(4, 15, 0) > LINUX_VERSION_CODE
|
||||
#include <soc/tegra/chip-id.h>
|
||||
#else
|
||||
#include <soc/tegra/fuse.h>
|
||||
#endif
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/tegra_nvadsp.h>
|
||||
#include <linux/tegra-hsp.h>
|
||||
|
||||
@@ -1,21 +1,6 @@
|
||||
/*
|
||||
* os.c
|
||||
*
|
||||
* ADSP OS management
|
||||
* Copyright (C) 2011 Texas Instruments, Inc.
|
||||
* Copyright (C) 2011 Google, Inc.
|
||||
*
|
||||
* Copyright (C) 2014-2022, NVIDIA Corporation. All rights reserved.
|
||||
*
|
||||
* This software is licensed under the terms of the GNU General Public
|
||||
* License version 2, as published by the Free Software Foundation, and
|
||||
* may be copied, distributed, and modified under those terms.
|
||||
*
|
||||
* This program is distributed in the hope that 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.
|
||||
*
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/**
|
||||
* Copyright (c) 2014-2023, NVIDIA CORPORATION. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/init.h>
|
||||
@@ -31,11 +16,7 @@
|
||||
#include <linux/firmware.h>
|
||||
#include <linux/tegra_nvadsp.h>
|
||||
#include <linux/version.h>
|
||||
#if KERNEL_VERSION(4, 15, 0) > LINUX_VERSION_CODE
|
||||
#include <soc/tegra/chip-id.h>
|
||||
#else
|
||||
#include <soc/tegra/fuse.h>
|
||||
#endif
|
||||
#include <linux/elf.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/clk.h>
|
||||
@@ -135,10 +116,6 @@ struct nvadsp_mappings {
|
||||
int len;
|
||||
};
|
||||
|
||||
#if KERNEL_VERSION(4, 15, 0) > LINUX_VERSION_CODE
|
||||
static inline u8 tegra_get_major_rev(void) { return 0; }
|
||||
#endif
|
||||
|
||||
static struct nvadsp_mappings adsp_map[NM_LOAD_MAPPINGS];
|
||||
static int map_idx;
|
||||
static struct nvadsp_mbox adsp_com_mbox;
|
||||
@@ -2430,13 +2407,8 @@ static int adsp_create_os_version(struct dentry *adsp_debugfs_root)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if KERNEL_VERSION(5, 10, 0) > LINUX_VERSION_CODE
|
||||
static unsigned int adsp_health_poll(struct file *file,
|
||||
poll_table *wait)
|
||||
#else
|
||||
static __poll_t adsp_health_poll(struct file *file,
|
||||
poll_table *wait)
|
||||
#endif
|
||||
{
|
||||
struct nvadsp_drv_data *drv_data = platform_get_drvdata(priv.pdev);
|
||||
|
||||
|
||||
@@ -1,20 +1,8 @@
|
||||
/*
|
||||
* os.h
|
||||
*
|
||||
* A header file containing data structures shared with ADSP OS
|
||||
*
|
||||
* Copyright (C) 2014-2022 NVIDIA Corporation. All rights reserved.
|
||||
*
|
||||
* This software is licensed under the terms of the GNU General Public
|
||||
* License version 2, as published by the Free Software Foundation, and
|
||||
* may be copied, distributed, and modified under those terms.
|
||||
*
|
||||
* This program is distributed in the hope that 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.
|
||||
*
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/**
|
||||
* Copyright (c) 2014-2023, NVIDIA CORPORATION. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef __TEGRA_NVADSP_OS_H
|
||||
#define __TEGRA_NVADSP_OS_H
|
||||
|
||||
|
||||
Reference in New Issue
Block a user