linux/sound/soc/sof/debug.c

// SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause)
//
// This file is provided under a dual BSD/GPLv2 license.  When using or
// redistributing this file, you may do so under either license.
//
// Copyright(c) 2018 Intel Corporation
//
// Author: Liam Girdwood <[email protected]>
//
// Generic debug routines used to export DSP MMIO and memories to userspace
// for firmware debugging.
//

#include <linux/debugfs.h>
#include <linux/io.h>
#include <linux/pm_runtime.h>
#include <sound/sof/ext_manifest.h>
#include <sound/sof/debug.h>
#include "sof-priv.h"
#include "ops.h"

static ssize_t sof_dfsentry_read(struct file *file, char __user *buffer,
				 size_t count, loff_t *ppos)
{}

static const struct file_operations sof_dfs_fops =;

/* create FS entry for debug files that can expose DSP memories, registers */
static int snd_sof_debugfs_io_item(struct snd_sof_dev *sdev,
				   void __iomem *base, size_t size,
				   const char *name,
				   enum sof_debugfs_access_type access_type)
{}

int snd_sof_debugfs_add_region_item_iomem(struct snd_sof_dev *sdev,
					  enum snd_sof_fw_blk_type blk_type, u32 offset,
					  size_t size, const char *name,
					  enum sof_debugfs_access_type access_type)
{}
EXPORT_SYMBOL_GPL();

/* create FS entry for debug files to expose kernel memory */
int snd_sof_debugfs_buf_item(struct snd_sof_dev *sdev,
			     void *base, size_t size,
			     const char *name, mode_t mode)
{}
EXPORT_SYMBOL_GPL();

static int memory_info_update(struct snd_sof_dev *sdev, char *buf, size_t buff_size)
{}

static ssize_t memory_info_read(struct file *file, char __user *to, size_t count, loff_t *ppos)
{}

static int memory_info_open(struct inode *inode, struct file *file)
{}

static const struct file_operations memory_info_fops =;

int snd_sof_dbg_memory_info_init(struct snd_sof_dev *sdev)
{}
EXPORT_SYMBOL_GPL();

int snd_sof_dbg_init(struct snd_sof_dev *sdev)
{}
EXPORT_SYMBOL_GPL();

void snd_sof_free_debug(struct snd_sof_dev *sdev)
{}
EXPORT_SYMBOL_GPL();

static const struct soc_fw_state_info {} fw_state_dbg[] =;

static void snd_sof_dbg_print_fw_state(struct snd_sof_dev *sdev, const char *level)
{}

void snd_sof_dsp_dbg_dump(struct snd_sof_dev *sdev, const char *msg, u32 flags)
{}
EXPORT_SYMBOL();

static void snd_sof_ipc_dump(struct snd_sof_dev *sdev)
{}

void snd_sof_handle_fw_exception(struct snd_sof_dev *sdev, const char *msg)
{}
EXPORT_SYMBOL();