From 562a14e11b01007547537658aa9fc32e65ca4bed Mon Sep 17 00:00:00 2001 From: Prateek Patel Date: Fri, 15 Dec 2017 07:12:19 -0800 Subject: [PATCH] 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 Reviewed-on: https://git-master.nvidia.com/r/1618738 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Sachin Nikam Reviewed-by: Ajay Nandakumar M Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/platform/tegra/nvadsp/adsp_shared_struct.h | 5 +++-- drivers/platform/tegra/nvadsp/os.c | 5 ++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/platform/tegra/nvadsp/adsp_shared_struct.h b/drivers/platform/tegra/nvadsp/adsp_shared_struct.h index bbfaef80..fcc7b643 100644 --- a/drivers/platform/tegra/nvadsp/adsp_shared_struct.h +++ b/drivers/platform/tegra/nvadsp/adsp_shared_struct.h @@ -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 */ diff --git a/drivers/platform/tegra/nvadsp/os.c b/drivers/platform/tegra/nvadsp/os.c index b51bae0a..f87703a6 100644 --- a/drivers/platform/tegra/nvadsp/os.c +++ b/drivers/platform/tegra/nvadsp/os.c @@ -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");