]> rtime.felk.cvut.cz Git - hercules2020/nv-tegra/linux-4.4.git/commitdiff
platform: nvadsp: rename aram manager apis
authorNitin Kumbhar <nkumbhar@nvidia.com>
Thu, 24 Aug 2017 11:25:43 +0000 (04:25 -0700)
committermobile promotions <svcmobile_promotions@nvidia.com>
Tue, 5 Sep 2017 17:16:08 +0000 (10:16 -0700)
As aram manager functions are made available through
tegra_nvadsp.h header, rename those to make those specific
to nvadsp.

Bug 200326188

Change-Id: Ib10d78f6f74600bb2771151ca38792f6f81858f1
Signed-off-by: Nitin Kumbhar <nkumbhar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1545002
(cherry picked from commit c577561c2dc41a64cc9611c7d8f8e49f6bda4e48)
Reviewed-on: https://git-master.nvidia.com/r/1551087
Reviewed-by: Ajay Nandakumar M <anandakumarm@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
drivers/platform/tegra/nvadsp/app.c
drivers/platform/tegra/nvadsp/aram_manager.c
drivers/platform/tegra/nvadsp/aram_manager.h
drivers/platform/tegra/nvadsp/dev.c
include/linux/tegra_nvadsp.h

index 6dc927f8e57f590624c13b735fd7db077015068d..4b1acb1cc56ee3d9008af1d4bf6250bc45a80c55 100644 (file)
@@ -3,7 +3,7 @@
  *
  * ADSP OS App management
  *
- * Copyright (C) 2014-2016, NVIDIA Corporation. All rights reserved.
+ * Copyright (C) 2014-2017, 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
@@ -387,7 +387,7 @@ static void free_instance_memory(nvadsp_app_info_t *app,
        }
 
        if (mem->aram_flag)
-               aram_release(mem->aram);
+               nvadsp_aram_release(mem->aram);
        else if (mem->aram)
                nvadsp_free_coherent(sz->aram, mem->aram, iova_mem->aram);
        mem->aram = NULL;
@@ -395,7 +395,7 @@ static void free_instance_memory(nvadsp_app_info_t *app,
        mem->aram_flag = 0;
 
        if (mem->aram_x_flag) {
-               aram_release(mem->aram_x);
+               nvadsp_aram_release(mem->aram_x);
                mem->aram_x = NULL;
                iova_mem->aram_x = 0;
                mem->aram_flag = 0;
@@ -454,9 +454,9 @@ static int create_instance_memory(nvadsp_app_info_t *app,
        }
 
        if (sz->aram) {
-               aram_handle = aram_request(name, sz->aram);
+               aram_handle = nvadsp_aram_request(name, sz->aram);
                if (!IS_ERR_OR_NULL(aram_handle)) {
-                       iova_mem->aram = aram_get_address(aram_handle);
+                       iova_mem->aram = nvadsp_aram_get_address(aram_handle);
                        mem->aram = aram_handle;
                        iova_mem->aram_flag = mem->aram_flag = 1;
                        dev_dbg(dev, "%s aram %x\n", name, iova_mem->aram);
@@ -479,9 +479,9 @@ static int create_instance_memory(nvadsp_app_info_t *app,
        }
 
        if (sz->aram_x) {
-               aram_handle = aram_request(name, sz->aram);
+               aram_handle = nvadsp_aram_request(name, sz->aram);
                if (!IS_ERR_OR_NULL(aram_handle)) {
-                       iova_mem->aram_x = aram_get_address(aram_handle);
+                       iova_mem->aram_x = nvadsp_aram_get_address(aram_handle);
                        mem->aram_x = aram_handle;
                        iova_mem->aram_x_flag = mem->aram_x_flag = 1;
                        dev_dbg(dev, "aram_x %x\n", iova_mem->aram_x);
index 2740e8b2fa491453339129ed9b16a0a0ca5188e5..4b28ae95e56125811d0543bce2a01754ffbdf9e7 100644 (file)
@@ -3,7 +3,7 @@
  *
  * ARAM manager
  *
- * Copyright (C) 2014-2016, NVIDIA Corporation. All rights reserved.
+ * Copyright (C) 2014-2017, 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
@@ -19,6 +19,7 @@
 #define pr_fmt(fmt) "%s : %d, " fmt, __func__, __LINE__
 
 #include <linux/debugfs.h>
+#include <linux/tegra_nvadsp.h>
 
 #include "aram_manager.h"
 
@@ -27,53 +28,53 @@ static void *aram_handle;
 static LIST_HEAD(aram_alloc_list);
 static LIST_HEAD(aram_free_list);
 
-void aram_print(void)
+void nvadsp_aram_print(void)
 {
        mem_print(aram_handle);
 }
-EXPORT_SYMBOL(aram_print);
+EXPORT_SYMBOL(nvadsp_aram_print);
 
-void *aram_request(const char *name, size_t size)
+void *nvadsp_aram_request(const char *name, size_t size)
 {
        return mem_request(aram_handle, name, size);
 }
-EXPORT_SYMBOL(aram_request);
+EXPORT_SYMBOL(nvadsp_aram_request);
 
-bool aram_release(void *handle)
+bool nvadsp_aram_release(void *handle)
 {
        return mem_release(aram_handle, handle);
 }
-EXPORT_SYMBOL(aram_release);
+EXPORT_SYMBOL(nvadsp_aram_release);
 
-unsigned long aram_get_address(void *handle)
+unsigned long nvadsp_aram_get_address(void *handle)
 {
        return mem_get_address(handle);
 }
-EXPORT_SYMBOL(aram_get_address);
+EXPORT_SYMBOL(nvadsp_aram_get_address);
 
 #ifdef CONFIG_DEBUG_FS
 static struct dentry *aram_dump_debugfs_file;
 
-static int aram_dump(struct seq_file *s, void *data)
+static int nvadsp_aram_dump(struct seq_file *s, void *data)
 {
        mem_dump(aram_handle, s);
        return 0;
 }
 
-static int aram_dump_open(struct inode *inode, struct file *file)
+static int nvadsp_aram_dump_open(struct inode *inode, struct file *file)
 {
-       return single_open(file, aram_dump, inode->i_private);
+       return single_open(file, nvadsp_aram_dump, inode->i_private);
 }
 
 static const struct file_operations aram_dump_fops = {
-       .open           = aram_dump_open,
+       .open           = nvadsp_aram_dump_open,
        .read           = seq_read,
        .llseek         = seq_lseek,
        .release        = single_release,
 };
 #endif
 
-int aram_init(unsigned long addr, unsigned long size)
+int nvadsp_aram_init(unsigned long addr, unsigned long size)
 {
        aram_handle = create_mem_manager("ARAM", addr, size);
        if (IS_ERR(aram_handle)) {
@@ -92,14 +93,12 @@ int aram_init(unsigned long addr, unsigned long size)
 #endif
        return 0;
 }
-EXPORT_SYMBOL(aram_init);
 
-void aram_exit(void)
+void nvadsp_aram_exit(void)
 {
 #ifdef CONFIG_DEBUG_FS
        debugfs_remove(aram_dump_debugfs_file);
 #endif
        destroy_mem_manager(aram_handle);
 }
-EXPORT_SYMBOL(aram_exit);
 
index 786c304b981e3768a075b8d3946b91063e8f3bc8..18e8f887eda4c771f6c82e709205cb5a65f2d81f 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Header file for aram manager
  *
- * Copyright (c) 2014-2015, NVIDIA CORPORATION.  All rights reserved.
+ * Copyright (c) 2014-2017, NVIDIA CORPORATION.  All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms and conditions of the GNU General Public License,
 
 #include "mem_manager.h"
 
-int aram_init(unsigned long addr, unsigned long size);
-void aram_exit(void);
-
-void *aram_request(const char *name, size_t size);
-bool aram_release(void *handle);
-
-unsigned long aram_get_address(void *handle);
-void aram_print(void);
-
+int nvadsp_aram_init(unsigned long addr, unsigned long size);
+void nvadsp_aram_exit(void);
 #endif /* __TEGRA_NVADSP_ARAM_MANAGER_H */
index f87ca51be72d396a2f9ed65ed5e7df2abee54113..fa6a939702c828049edd03957b23019e717b288c 100644 (file)
@@ -362,7 +362,7 @@ static int __init nvadsp_probe(struct platform_device *pdev)
 
        aram_addr = drv_data->adsp_mem[ARAM_ALIAS_0_ADDR];
        aram_size = drv_data->adsp_mem[ARAM_ALIAS_0_SIZE];
-       ret = aram_init(aram_addr, aram_size);
+       ret = nvadsp_aram_init(aram_addr, aram_size);
        if (ret)
                dev_err(dev, "Failed to init aram\n");
 err:
@@ -380,7 +380,7 @@ static int nvadsp_remove(struct platform_device *pdev)
 #ifdef CONFIG_TEGRA_EMC_APE_DFS
        emc_dfs_exit();
 #endif
-       aram_exit();
+       nvadsp_aram_exit();
 
        pm_runtime_disable(&pdev->dev);
 
index 6bace0edad35e007c75d552f71dbae0a95236946..ffefaf63ceb90d6628cb4608f620e95f3f248491 100644 (file)
@@ -185,12 +185,6 @@ nvadsp_dram_sync_single_for_device(struct device *nvadsp_dev,
                                   nvadsp_iova_addr_t iova_addr, size_t size,
                                   nvadsp_data_direction_t direction);
 
-/*
- * ARAM Bookkeeping
- */
-bool nvadsp_aram_request(char *start, size_t size, char *id);
-void nvadsp_aram_release(char *start, size_t size);
-
 /*
  * ADSP OS
  */
@@ -389,4 +383,10 @@ static inline void adsp_update_dfs(bool enable)
 }
 #endif
 
+void *nvadsp_aram_request(const char *name, size_t size);
+bool nvadsp_aram_release(void *handle);
+
+unsigned long nvadsp_aram_get_address(void *handle);
+void nvadsp_aram_print(void);
+
 #endif /* __LINUX_TEGRA_NVADSP_H */