diff --git a/drivers/platform/tegra/nvadsp/acast.c b/drivers/platform/tegra/nvadsp/acast.c index f8de7f40..9cf170e2 100644 --- a/drivers/platform/tegra/nvadsp/acast.c +++ b/drivers/platform/tegra/nvadsp/acast.c @@ -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 . +// SPDX-License-Identifier: GPL-2.0-only +/** + * Copyright (c) 2016-2023, NVIDIA CORPORATION. All rights reserved. */ #include @@ -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); diff --git a/drivers/platform/tegra/nvadsp/adsp_console_dbfs.c b/drivers/platform/tegra/nvadsp/adsp_console_dbfs.c index ff5d6cdb..d944c84b 100644 --- a/drivers/platform/tegra/nvadsp/adsp_console_dbfs.c +++ b/drivers/platform/tegra/nvadsp/adsp_console_dbfs.c @@ -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 @@ -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) { diff --git a/drivers/platform/tegra/nvadsp/adsp_console_dbfs.h b/drivers/platform/tegra/nvadsp/adsp_console_dbfs.h index add0b159..6008acd1 100644 --- a/drivers/platform/tegra/nvadsp/adsp_console_dbfs.h +++ b/drivers/platform/tegra/nvadsp/adsp_console_dbfs.h @@ -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 diff --git a/drivers/platform/tegra/nvadsp/adsp_shared_struct.h b/drivers/platform/tegra/nvadsp/adsp_shared_struct.h index b7615a7e..197cb01b 100644 --- a/drivers/platform/tegra/nvadsp/adsp_shared_struct.h +++ b/drivers/platform/tegra/nvadsp/adsp_shared_struct.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 diff --git a/drivers/platform/tegra/nvadsp/amc.c b/drivers/platform/tegra/nvadsp/amc.c index 64db3d0c..faac1f31 100644 --- a/drivers/platform/tegra/nvadsp/amc.c +++ b/drivers/platform/tegra/nvadsp/amc.c @@ -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 #include #include #include -#if KERNEL_VERSION(4, 15, 0) > LINUX_VERSION_CODE -#include -#else #include -#endif #include "dev.h" #include "amc.h" diff --git a/drivers/platform/tegra/nvadsp/amc.h b/drivers/platform/tegra/nvadsp/amc.h index 2bf7d699..eeac6e96 100644 --- a/drivers/platform/tegra/nvadsp/amc.h +++ b/drivers/platform/tegra/nvadsp/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 diff --git a/drivers/platform/tegra/nvadsp/app_loader_linker.c b/drivers/platform/tegra/nvadsp/app_loader_linker.c index cfd8d193..62694879 100644 --- a/drivers/platform/tegra/nvadsp/app_loader_linker.c +++ b/drivers/platform/tegra/nvadsp/app_loader_linker.c @@ -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 diff --git a/drivers/platform/tegra/nvadsp/aram_manager.c b/drivers/platform/tegra/nvadsp/aram_manager.c index e575037b..21f80ff8 100644 --- a/drivers/platform/tegra/nvadsp/aram_manager.c +++ b/drivers/platform/tegra/nvadsp/aram_manager.c @@ -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__ diff --git a/drivers/platform/tegra/nvadsp/aram_manager.h b/drivers/platform/tegra/nvadsp/aram_manager.h index 18e8f887..ccb6ffc2 100644 --- a/drivers/platform/tegra/nvadsp/aram_manager.h +++ b/drivers/platform/tegra/nvadsp/aram_manager.h @@ -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 diff --git a/drivers/platform/tegra/nvadsp/dev-t18x.c b/drivers/platform/tegra/nvadsp/dev-t18x.c index 2e70ebd0..057319b0 100644 --- a/drivers/platform/tegra/nvadsp/dev-t18x.c +++ b/drivers/platform/tegra/nvadsp/dev-t18x.c @@ -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 -#if KERNEL_VERSION(4, 15, 0) > LINUX_VERSION_CODE -#include -#else #include -#endif #include #include #include diff --git a/drivers/platform/tegra/nvadsp/dev-t18x.h b/drivers/platform/tegra/nvadsp/dev-t18x.h index fe0dd8fb..af589861 100644 --- a/drivers/platform/tegra/nvadsp/dev-t18x.h +++ b/drivers/platform/tegra/nvadsp/dev-t18x.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 diff --git a/drivers/platform/tegra/nvadsp/dev.c b/drivers/platform/tegra/nvadsp/dev.c index 6f8f8abf..cf8fa4db 100644 --- a/drivers/platform/tegra/nvadsp/dev.c +++ b/drivers/platform/tegra/nvadsp/dev.c @@ -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 @@ -28,15 +15,8 @@ #include #include #include -#if KERNEL_VERSION(4, 15, 0) > LINUX_VERSION_CODE -#include -#else #include -#endif #include -#if KERNEL_VERSION(5, 4, 0) > LINUX_VERSION_CODE -#include -#endif #include #include #include @@ -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; } diff --git a/drivers/platform/tegra/nvadsp/dev.h b/drivers/platform/tegra/nvadsp/dev.h index bba98892..efd6bcf9 100644 --- a/drivers/platform/tegra/nvadsp/dev.h +++ b/drivers/platform/tegra/nvadsp/dev.h @@ -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 #include -#if KERNEL_VERSION(5, 9, 0) <= LINUX_VERSION_CODE #ifdef CONFIG_ARCH_TEGRA_23x_SOC #include #include #endif #include -#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; diff --git a/drivers/platform/tegra/nvadsp/dram_app_mem_manager.c b/drivers/platform/tegra/nvadsp/dram_app_mem_manager.c index df45f019..738734a7 100644 --- a/drivers/platform/tegra/nvadsp/dram_app_mem_manager.c +++ b/drivers/platform/tegra/nvadsp/dram_app_mem_manager.c @@ -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__ diff --git a/drivers/platform/tegra/nvadsp/dram_app_mem_manager.h b/drivers/platform/tegra/nvadsp/dram_app_mem_manager.h index 7f2ca78e..2cf5a8e9 100644 --- a/drivers/platform/tegra/nvadsp/dram_app_mem_manager.h +++ b/drivers/platform/tegra/nvadsp/dram_app_mem_manager.h @@ -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 diff --git a/drivers/platform/tegra/nvadsp/hwmailbox.c b/drivers/platform/tegra/nvadsp/hwmailbox.c index c6d90820..5d397ba0 100644 --- a/drivers/platform/tegra/nvadsp/hwmailbox.c +++ b/drivers/platform/tegra/nvadsp/hwmailbox.c @@ -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 diff --git a/drivers/platform/tegra/nvadsp/hwmailbox.h b/drivers/platform/tegra/nvadsp/hwmailbox.h index b0792961..dc1122d7 100644 --- a/drivers/platform/tegra/nvadsp/hwmailbox.h +++ b/drivers/platform/tegra/nvadsp/hwmailbox.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 diff --git a/drivers/platform/tegra/nvadsp/log_state.h b/drivers/platform/tegra/nvadsp/log_state.h index 581c1d92..9c33da84 100644 --- a/drivers/platform/tegra/nvadsp/log_state.h +++ b/drivers/platform/tegra/nvadsp/log_state.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 diff --git a/drivers/platform/tegra/nvadsp/mailbox.c b/drivers/platform/tegra/nvadsp/mailbox.c index 94afbd43..79228050 100644 --- a/drivers/platform/tegra/nvadsp/mailbox.c +++ b/drivers/platform/tegra/nvadsp/mailbox.c @@ -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" diff --git a/drivers/platform/tegra/nvadsp/mem_manager.c b/drivers/platform/tegra/nvadsp/mem_manager.c index f0dc582e..371cd8e2 100644 --- a/drivers/platform/tegra/nvadsp/mem_manager.c +++ b/drivers/platform/tegra/nvadsp/mem_manager.c @@ -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__ diff --git a/drivers/platform/tegra/nvadsp/mem_manager.h b/drivers/platform/tegra/nvadsp/mem_manager.h index 6ad04b72..561e83df 100644 --- a/drivers/platform/tegra/nvadsp/mem_manager.h +++ b/drivers/platform/tegra/nvadsp/mem_manager.h @@ -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 diff --git a/drivers/platform/tegra/nvadsp/msgq.c b/drivers/platform/tegra/nvadsp/msgq.c index 1060eec2..e7d66820 100644 --- a/drivers/platform/tegra/nvadsp/msgq.c +++ b/drivers/platform/tegra/nvadsp/msgq.c @@ -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 diff --git a/drivers/platform/tegra/nvadsp/nvadsp_shared_sema.c b/drivers/platform/tegra/nvadsp/nvadsp_shared_sema.c index 6c591466..887a0522 100644 --- a/drivers/platform/tegra/nvadsp/nvadsp_shared_sema.c +++ b/drivers/platform/tegra/nvadsp/nvadsp_shared_sema.c @@ -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 diff --git a/drivers/platform/tegra/nvadsp/os-t18x.c b/drivers/platform/tegra/nvadsp/os-t18x.c index c850892f..ac7a01c3 100644 --- a/drivers/platform/tegra/nvadsp/os-t18x.c +++ b/drivers/platform/tegra/nvadsp/os-t18x.c @@ -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 -#if KERNEL_VERSION(4, 15, 0) > LINUX_VERSION_CODE -#include -#else #include -#endif #include #include #include diff --git a/drivers/platform/tegra/nvadsp/os.c b/drivers/platform/tegra/nvadsp/os.c index df6c2beb..4f8d5914 100644 --- a/drivers/platform/tegra/nvadsp/os.c +++ b/drivers/platform/tegra/nvadsp/os.c @@ -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 @@ -31,11 +16,7 @@ #include #include #include -#if KERNEL_VERSION(4, 15, 0) > LINUX_VERSION_CODE -#include -#else #include -#endif #include #include #include @@ -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); diff --git a/drivers/platform/tegra/nvadsp/os.h b/drivers/platform/tegra/nvadsp/os.h index 2f8e4b89..f8e16c46 100644 --- a/drivers/platform/tegra/nvadsp/os.h +++ b/drivers/platform/tegra/nvadsp/os.h @@ -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