platform: tegra: Make ADSP CPU driver a LKM

-Made necessary Kconfig and makefile changes
 required to make ADSP CPU driver a loadable kernel
 module.
-Had to replace nsec_to_clock_t api with functions that are
 available as exported symbols as nsec_to_clock_t is not an
 exported symbol

Bug 200560561

Change-Id: Ia2fa069d9bb234b57f19cbf919c9e6d7567f3d7b
Signed-off-by: Asha Talambedu <atalambedu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2215613
(cherry picked from commit 519a4618c452e3a62550d4fdf3ec5b52acf8b9c8)
Reviewed-on: https://git-master.nvidia.com/r/2228337
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Asha Talambedu
2019-10-11 12:32:05 +05:30
committed by Laxman Dewangan
parent 1dd46a95c7
commit dddab770de
3 changed files with 8 additions and 5 deletions

View File

@@ -1,5 +1,5 @@
config TEGRA_NVADSP
bool "Enable Host ADSP driver"
tristate "Enable Host ADSP driver"
default n
select ARM_GIC_PM
select FIQ
@@ -47,6 +47,7 @@ config TEGRA_ADSP_CPUSTAT
config TEGRA_ADSP_FILEIO
bool "Enable ADSP file io"
depends on TEGRA_NVADSP
default n
help
Enable dumping to and reading from file on host from ADSP
@@ -55,7 +56,7 @@ config TEGRA_ADSP_FILEIO
config TEGRA_ADSP_LPTHREAD
bool "Enable ADSP usage calc by lpthread"
depends on DEBUG_FS
depends on DEBUG_FS && TEGRA_NVADSP
default n
help
Enable calculation of ADSP usage by running a low priority
@@ -66,6 +67,7 @@ config TEGRA_ADSP_LPTHREAD
config TEGRA_EMC_APE_DFS
bool "Enable emc dfs due to APE"
depends on TEGRA_NVADSP
default n
help
Enable emc dfs due to APE DRAM access

View File

@@ -1,7 +1,7 @@
GCOV_PROFILE := y
ccflags-y += -Werror
obj-y := nvadsp.o
obj-$(CONFIG_TEGRA_NVADSP) := nvadsp.o
nvadsp-objs += dev.o os.o app.o app_loader_linker.o\
amc.o nvadsp_shared_sema.o \
hwmailbox.o mailbox.o msgq.o \

View File

@@ -3,7 +3,7 @@
*
* adsp dynamic frequency scaling
*
* Copyright (C) 2014-2018, NVIDIA Corporation. All rights reserved.
* Copyright (C) 2014-2019, 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
@@ -610,9 +610,10 @@ static void dump_stats_table(struct seq_file *s, struct adsp_freq_stats *fstats)
adspfreq_stats_update();
for (i = 0; i < fstats->state_num; i++) {
u64 jiffies64 = nsecs_to_jiffies64(fstats->time_in_state[i]);
seq_printf(s, "%lu %llu\n",
(long unsigned int)(adsp_cpu_freq_table[i] / 1000),
nsec_to_clock_t(fstats->time_in_state[i]));
jiffies_64_to_clock_t(jiffies64));
}
mutex_unlock(&policy_mutex);
}