platform: tegra: adsp: add dynamic_app_support

adding dynamic_app_support flag for the dynamic apps and
setting it to true if load from "adsp.elf"

bug 1833670

Change-Id: Ic68611e140f6bc0392a4fb153436d196bf0bda1c
Signed-off-by: Prateek Patel <prpatel@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1618738
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Ajay Nandakumar M <anandakumarm@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Prateek Patel
2017-12-15 07:12:19 -08:00
committed by Laxman Dewangan
parent b3ff5cc423
commit 562a14e11b
2 changed files with 7 additions and 3 deletions

View File

@@ -3,7 +3,7 @@
*
* A header file containing shared data structures shared with ADSP OS
*
* Copyright (C) 2015-2017 NVIDIA Corporation. All rights reserved.
* Copyright (C) 2015-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
@@ -126,7 +126,8 @@ struct nvadsp_os_args {
int32_t timer_prescalar;
char logger[DRAM_DEBUG_LOG_SIZE];
uint64_t adsp_freq_hz;
char reserved[128];
uint32_t dynamic_app_support;
char reserved[124];
} __packed;
/* ARM MODE REGS */

View File

@@ -5,7 +5,7 @@
* Copyright (C) 2011 Texas Instruments, Inc.
* Copyright (C) 2011 Google, Inc.
*
* Copyright (C) 2014-2017, NVIDIA Corporation. All rights reserved.
* 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
@@ -651,6 +651,7 @@ static int __nvadsp_os_secload(struct platform_device *pdev)
}
shared_mem = dram_va;
shared_mem->os_args.dynamic_app_support = 0;
drv_data->shared_adsp_os_data = shared_mem;
/* set logger strcuture with required properties */
priv.logger.debug_ram_rdr = shared_mem->os_args.logger;
@@ -726,6 +727,8 @@ int nvadsp_os_load(void)
goto deallocate_os_memory;
}
shared_mem->os_args.dynamic_app_support = 1;
ret = dram_app_mem_init(priv.app_alloc_addr, priv.app_size);
if (ret) {
dev_err(dev, "Memory allocation dynamic apps failed\n");