From 3f5db4388d2fbe108a1b51f76793a6a778cc43c7 Mon Sep 17 00:00:00 2001 From: Sameer Pujar Date: Thu, 18 May 2017 18:44:03 +0530 Subject: [PATCH] ASoC: tegra-alt: adsp: callback func ptr for adma There is a function exported from adsp os code, nvadsp_set_adma_dump_reg, to set the function pointer for adma regdump callback. This patch uses the above exported api and sets the callback to tegra_adma_dump_ch_reg, which is implemented by adma driver. This is done during tegra210_adsp_init. Bug 200289390 Change-Id: If1c2826928d5e5d51a805ed0a2211c20a1ecf6f8 Signed-off-by: Sameer Pujar Reviewed-on: http://git-master/r/1484830 Reviewed-by: mobile promotions Tested-by: mobile promotions --- sound/soc/tegra-alt/tegra210_adsp_alt.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sound/soc/tegra-alt/tegra210_adsp_alt.c b/sound/soc/tegra-alt/tegra210_adsp_alt.c index d2843cb0..bfbf8fbb 100644 --- a/sound/soc/tegra-alt/tegra210_adsp_alt.c +++ b/sound/soc/tegra-alt/tegra210_adsp_alt.c @@ -368,6 +368,11 @@ static void tegra210_adsp_deallocate_dma_buffer(struct snd_dma_buffer *buf) buf->addr = 0; } +#if IS_ENABLED(CONFIG_TEGRA210_ADMA) +/* implemented in adma driver */ +void tegra_adma_dump_ch_reg(void); +#endif + /* ADSP OS boot and init API */ static int tegra210_adsp_init(struct tegra210_adsp *adsp) { @@ -396,6 +401,11 @@ static int tegra210_adsp_init(struct tegra210_adsp *adsp) } } +#if IS_ENABLED(CONFIG_TEGRA210_ADMA) + /* set callback function for adsp to dump adma registers for debug */ + nvadsp_set_adma_dump_reg(&tegra_adma_dump_ch_reg); +#endif + /* Suspend OS for now. Resume will happen via runtime pm calls */ ret = nvadsp_os_suspend(); if (ret < 0) {