diff --git a/drivers/platform/tegra/Makefile b/drivers/platform/tegra/Makefile index 9103a035..bf259bdd 100644 --- a/drivers/platform/tegra/Makefile +++ b/drivers/platform/tegra/Makefile @@ -1,5 +1,5 @@ # SPDX-License-Identifier: GPL-2.0-only -# Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# Copyright (c) 2022-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved. tegra-bootloader-debug-objs := tegra_bootloader_debug.o obj-m += tegra-bootloader-debug.o @@ -20,7 +20,4 @@ obj-m += rtcpu/ endif obj-m += aon/ obj-m += tegra-uss-io-proxy.o - -ifneq ($(filter noble oot,$(patsubst -,$(space),$(NV_BUILD_KERNEL_OPTIONS))),) obj-m += nvadsp/ -endif diff --git a/drivers/platform/tegra/nvadsp/dev.c b/drivers/platform/tegra/nvadsp/dev.c index 8f0df6a0..a3ec90c4 100644 --- a/drivers/platform/tegra/nvadsp/dev.c +++ b/drivers/platform/tegra/nvadsp/dev.c @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include #include @@ -130,9 +130,7 @@ static void nvadsp_bw_register(struct nvadsp_drv_data *drv_data) { struct device *dev = &drv_data->pdev->dev; - switch (tegra_get_chip_id()) { - case TEGRA210: - case TEGRA186: + switch (__tegra_get_chip_id()) { case TEGRA194: drv_data->bwmgr = tegra_bwmgr_register( TEGRA_BWMGR_CLIENT_APE_ADSP); @@ -569,7 +567,7 @@ static struct nvadsp_chipdata tegra239_adsp_chipdata = { .amc_err_war = false, /* Populate Chip ID Major Revision as well */ - .chipid_ext = true, + .chipid_ext = 0x9, .num_irqs = NVADSP_VIRQ_MAX, .num_regs = APE_MAX_REG, }; diff --git a/drivers/platform/tegra/nvadsp/dev.h b/drivers/platform/tegra/nvadsp/dev.h index c1e08bc9..a746a0ba 100644 --- a/drivers/platform/tegra/nvadsp/dev.h +++ b/drivers/platform/tegra/nvadsp/dev.h @@ -155,7 +155,7 @@ struct nvadsp_chipdata { bool amc_not_avlbl; bool amc_err_war; - bool chipid_ext; + u32 chipid_ext; u32 adsp_prid; char *adsp_elf; diff --git a/drivers/platform/tegra/nvadsp/os.c b/drivers/platform/tegra/nvadsp/os.c index 262d1c7b..f08a0655 100644 --- a/drivers/platform/tegra/nvadsp/os.c +++ b/drivers/platform/tegra/nvadsp/os.c @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include #include @@ -111,9 +111,6 @@ struct nvadsp_mappings { int len; }; -extern u8 tegra_get_major_rev(void); -extern u8 tegra_get_minor_rev(void); - static struct nvadsp_mappings adsp_map[NM_LOAD_MAPPINGS]; static int map_idx; static struct nvadsp_mbox adsp_com_mbox; @@ -889,9 +886,9 @@ static void nvadsp_set_shared_mem(struct platform_device *pdev, priv.logger.dev = dev; priv.adsp_os_fw_loaded = true; - chip_id = (u32)tegra_get_chip_id(); + chip_id = (u32)__tegra_get_chip_id(); if (drv_data->chip_data->chipid_ext) - chip_id = (chip_id << 4) | tegra_get_major_rev(); + chip_id = (chip_id << 4) | drv_data->chip_data->chipid_ext; os_args = &shared_mem->os_args; /* Chip id info is communicated twice to ADSP