-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge series "ASoC: SOF: small fixes for 5.10" from Kai Vehmanen <kai…
….vehmanen@linux.intel.com>: Series that adds debug support for IMX platforms, more details to FW version information, adds missing -EACCESS handling to pm_runtime_get_sync() calls and a set of minor cosmetic, trace verbosity and coding style issues. Guennadi Liakhovetski (3): ASoC: SOF: (cosmetic) remove redundant "ret" variable uses ASoC: SOF: remove several superfluous type-casts ASoC: SOF: fix range checks Iulian Olaru (1): ASoC: SOF: imx: Add debug support for imx platforms Karol Trzcinski (1): ASoC: SOF: Add `src_hash` to `sof_ipc_fw_version` structure Pierre-Louis Bossart (3): ASoC: SOF: debug: update test for pm_runtime_get_sync() ASoC: SOF: control: update test for pm_runtime_get_sync() ASoC: SOF: Intel: hda: reduce verbosity of boot error logs include/sound/sof/info.h | 4 +- sound/soc/sof/control.c | 62 +++++++++++++-------------- sound/soc/sof/debug.c | 2 +- sound/soc/sof/imx/Kconfig | 8 ++++ sound/soc/sof/imx/Makefile | 3 ++ sound/soc/sof/imx/imx-common.c | 72 ++++++++++++++++++++++++++++++++ sound/soc/sof/imx/imx-common.h | 16 +++++++ sound/soc/sof/imx/imx8.c | 23 +++++++++- sound/soc/sof/imx/imx8m.c | 17 +++++++- sound/soc/sof/intel/hda-loader.c | 16 +++---- sound/soc/sof/intel/hda.c | 12 ++++-- sound/soc/sof/intel/hda.h | 2 + sound/soc/sof/sof-audio.c | 6 +-- sound/soc/sof/sof-priv.h | 8 ++++ sound/soc/sof/topology.c | 44 ++++++++++--------- 15 files changed, 226 insertions(+), 69 deletions(-) create mode 100644 sound/soc/sof/imx/imx-common.c create mode 100644 sound/soc/sof/imx/imx-common.h -- 2.27.0
- Loading branch information
Showing
15 changed files
with
226 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
// SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) | ||
// | ||
// Copyright 2020 NXP | ||
// | ||
// Common helpers for the audio DSP on i.MX8 | ||
|
||
#include <sound/sof/xtensa.h> | ||
#include "../ops.h" | ||
|
||
#include "imx-common.h" | ||
|
||
/** | ||
* imx8_get_registers() - This function is called in case of DSP oops | ||
* in order to gather information about the registers, filename and | ||
* linenumber and stack. | ||
* @sdev: SOF device | ||
* @xoops: Stores information about registers. | ||
* @panic_info: Stores information about filename and line number. | ||
* @stack: Stores the stack dump. | ||
* @stack_words: Size of the stack dump. | ||
*/ | ||
void imx8_get_registers(struct snd_sof_dev *sdev, | ||
struct sof_ipc_dsp_oops_xtensa *xoops, | ||
struct sof_ipc_panic_info *panic_info, | ||
u32 *stack, size_t stack_words) | ||
{ | ||
u32 offset = sdev->dsp_oops_offset; | ||
|
||
/* first read registers */ | ||
sof_mailbox_read(sdev, offset, xoops, sizeof(*xoops)); | ||
|
||
/* then get panic info */ | ||
if (xoops->arch_hdr.totalsize > EXCEPT_MAX_HDR_SIZE) { | ||
dev_err(sdev->dev, "invalid header size 0x%x. FW oops is bogus\n", | ||
xoops->arch_hdr.totalsize); | ||
return; | ||
} | ||
offset += xoops->arch_hdr.totalsize; | ||
sof_mailbox_read(sdev, offset, panic_info, sizeof(*panic_info)); | ||
|
||
/* then get the stack */ | ||
offset += sizeof(*panic_info); | ||
sof_mailbox_read(sdev, offset, stack, stack_words * sizeof(u32)); | ||
} | ||
|
||
/** | ||
* imx8_dump() - This function is called when a panic message is | ||
* received from the firmware. | ||
*/ | ||
void imx8_dump(struct snd_sof_dev *sdev, u32 flags) | ||
{ | ||
struct sof_ipc_dsp_oops_xtensa xoops; | ||
struct sof_ipc_panic_info panic_info; | ||
u32 stack[IMX8_STACK_DUMP_SIZE]; | ||
u32 status; | ||
|
||
/* Get information about the panic status from the debug box area. | ||
* Compute the trace point based on the status. | ||
*/ | ||
sof_mailbox_read(sdev, sdev->debug_box.offset + 0x4, &status, 4); | ||
|
||
/* Get information about the registers, the filename and line | ||
* number and the stack. | ||
*/ | ||
imx8_get_registers(sdev, &xoops, &panic_info, stack, | ||
IMX8_STACK_DUMP_SIZE); | ||
|
||
/* Print the information to the console */ | ||
snd_sof_get_status(sdev, status, status, &xoops, &panic_info, stack, | ||
IMX8_STACK_DUMP_SIZE); | ||
} | ||
EXPORT_SYMBOL(imx8_dump); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */ | ||
|
||
#ifndef __IMX_COMMON_H__ | ||
#define __IMX_COMMON_H__ | ||
|
||
#define EXCEPT_MAX_HDR_SIZE 0x400 | ||
#define IMX8_STACK_DUMP_SIZE 32 | ||
|
||
void imx8_get_registers(struct snd_sof_dev *sdev, | ||
struct sof_ipc_dsp_oops_xtensa *xoops, | ||
struct sof_ipc_panic_info *panic_info, | ||
u32 *stack, size_t stack_words); | ||
|
||
void imx8_dump(struct snd_sof_dev *sdev, u32 flags); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.