nvadsp: allocate adsp shared memory dynamically

NVADSP driver tries to allocate shared memory for ADSP
by requesting the DMA APIs to allocate at address hardcoded
in DT. This poses an issue where if kernel has already allocated
that memory to a different driver in same iommu group, this
memory becomes unavailable and ADSP does not boot

Adding support to allocate shared memory for ADSP dynamically
to avoid dependencies on other drivers

Jira EMA-1213

Change-Id: I1bc8d49f17ec8226d34f3c943cccabef97b2afb6
Signed-off-by: Hariharan Sivaraman <hariharans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2134341
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Uday Gupta <udayg@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: Niranjan Dighe <ndighe@nvidia.com>
Reviewed-by: Nitin Pai <npai@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Hariharan Sivaraman
2019-03-04 16:18:00 +05:30
committed by Laxman Dewangan
parent dfc3347d28
commit cb8fd9beb2
3 changed files with 34 additions and 12 deletions

View File

@@ -132,6 +132,7 @@ struct nvadsp_chipdata {
u32 adsp_state_hwmbox;
u32 adsp_thread_hwmbox;
u32 adsp_irq_hwmbox;
u32 adsp_shared_mem_hwmbox;
reset_init reset_init;
os_init os_init;
#ifdef CONFIG_PM
@@ -182,6 +183,7 @@ struct nvadsp_drv_data {
bool adsp_os_secload;
void *shared_adsp_os_data;
dma_addr_t shared_adsp_os_data_iova;
#ifdef CONFIG_TEGRA_ADSP_DFS
bool dfs_initialized;