From bbc79b8745e6cf24c8bf90ba53516cdde267cc41 Mon Sep 17 00:00:00 2001 From: Sameer Pujar Date: Thu, 18 May 2017 18:23:41 +0530 Subject: drivers: nvadsp: support for adma regdump callback With adma driver as module, following compilation error is seen "undefined reference to tegra_adma_dump_ch_reg". In the current patch, adsp code exports a function to set regdump function call back. This function is used by adsp audio driver to set the function pointer to tegra_adma_dump_ch_reg. This is done in tegra210_adsp_init(). Bug 200289390 Reviewed-on: http://git-master/r/1483001 Change-Id: I1ef259cf3b988a41720fb6706d39d9bd6f86aac3 Signed-off-by: Sameer Pujar (cherry picked from commit 36ccba1262928a6ce8b0f4fff1d4ad2591c4305d) Reviewed-on: https://git-master.nvidia.com/r/1528158 Signed-off-by: Nitin Kumbhar Reviewed-on: https://git-master.nvidia.com/r/1537339 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: svccoveritychecker GVS: Gerrit_Virtual_Submit --- include/linux/tegra_nvadsp.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'include/linux') diff --git a/include/linux/tegra_nvadsp.h b/include/linux/tegra_nvadsp.h index 6bace0eda..b5cc25dbf 100644 --- a/include/linux/tegra_nvadsp.h +++ b/include/linux/tegra_nvadsp.h @@ -1,7 +1,7 @@ /* * A Header file for managing ADSP/APE * - * Copyright (c) 2014-2016, 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, @@ -357,6 +357,16 @@ static inline long wait_for_nvadsp_app_complete_timeout(nvadsp_app_info_t *info, return ret; } +/* + * set adma reg dump callback function pointer + * @cb_adma_regdump: function pointer for callback + * + * This api is exported and can be accessed by adsp audio driver, + * which during adsp init, calls this api to set the callback + * function pointer + */ +void nvadsp_set_adma_dump_reg(void (*cb_adma_regdump)(void)); + #ifdef CONFIG_TEGRA_ADSP_DFS /* * Override adsp freq and reinit actmon counters -- cgit v1.2.2