mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-24 10:11:26 +03:00
nvadsp: don't use tegra-pd for kernel 5.4 onwards
The usage of Tegra power-domains is deprecated from kernel-5.4 and instead generic power-domains should be used. Current driver code is common across multiple kernel versions and to maintain backward compatibility kernel version checks are added. Bug 200593718 Change-Id: Ia49c0bab0d320de2d4a3a23e7e675242f56dbff7 Signed-off-by: Sameer Pujar <spujar@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2334795 Reviewed-by: automaticguardword <automaticguardword@nvidia.com> Reviewed-by: Mohan Kumar D <mkumard@nvidia.com> Reviewed-by: Dipesh Gandhi <dipeshg@nvidia.com> Reviewed-by: Sharad Gupta <sharadg@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
Laxman Dewangan
parent
003fec905d
commit
6cd83e4d26
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* A device driver for ADSP and APE
|
||||
*
|
||||
* Copyright (C) 2014-2019, NVIDIA Corporation. All rights reserved.
|
||||
* Copyright (C) 2014-2020, 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
|
||||
@@ -29,7 +29,10 @@
|
||||
#include <linux/tegra_nvadsp.h>
|
||||
#include <soc/tegra/chip-id.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <linux/version.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>
|
||||
@@ -321,7 +324,9 @@ 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);
|
||||
|
||||
@@ -400,7 +405,9 @@ 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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user