Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 42d015b7 authored by Rama Krishna Phani A's avatar Rama Krishna Phani A
Browse files

msm: sps: Add loglevel property in IPC logging for SPS driver



IPC logging for SPS driver, helps monitoring the interactions
between BAM clients and SPS driver and helps tracking the BAM
status. Add a loglevel field such that clients can specify the
loglevel to be captured in IPC logging.

Change-Id: Ib3af72485caa48940efca74b2cec2464a09ffed8
Signed-off-by: default avatarRama Krishna Phani A <rphani@codeaurora.org>
parent 3c607a12
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -2189,6 +2189,9 @@ int sps_register_bam_device(const struct sps_bam_props *bam_props,
		goto exit_err;
	}

	if (bam_props->ipc_loglevel)
		bam->ipc_loglevel = bam_props->ipc_loglevel;

	ok = sps_bam_device_init(bam);
	mutex_unlock(&bam->lock);
	if (ok) {
+2 −0
Original line number Diff line number Diff line
@@ -224,6 +224,8 @@ struct sps_bam {
	void *ipc_log3;
	void *ipc_log4;

	u32 ipc_loglevel;

	/* Desc cache pointers */
	u8 *desc_cache_pointers[BAM_MAX_PIPES];
};
+18 −4
Original line number Diff line number Diff line
@@ -98,6 +98,8 @@ struct sps_drv {
	void *ipc_log2;
	void *ipc_log3;
	void *ipc_log4;

	u32 ipc_loglevel;
};

extern struct sps_drv *sps;
@@ -175,7 +177,10 @@ extern u8 print_limit_option;
			pr_debug(msg, ##args);	\
		if (unlikely(debugfs_record_enabled))	\
			SPS_DEBUGFS(msg, ##args);	\
		if (dev) { \
			if ((dev)->ipc_loglevel <= 0)	\
				SPS_IPC(0, dev, msg, args); \
		}	\
	} while (0)
#define SPS_DBG1(dev, msg, args...) do {				\
		if ((unlikely(logging_option > 1))	\
@@ -188,7 +193,10 @@ extern u8 print_limit_option;
			pr_debug(msg, ##args);	\
		if (unlikely(debugfs_record_enabled))	\
			SPS_DEBUGFS(msg, ##args);	\
		if (dev) { \
			if ((dev)->ipc_loglevel <= 1)	\
				SPS_IPC(1, dev, msg, args);	\
		}	\
	} while (0)
#define SPS_DBG2(dev, msg, args...) do {				\
		if ((unlikely(logging_option > 1))	\
@@ -201,7 +209,10 @@ extern u8 print_limit_option;
			pr_debug(msg, ##args);	\
		if (unlikely(debugfs_record_enabled))	\
			SPS_DEBUGFS(msg, ##args);	\
		if (dev) { \
			if ((dev)->ipc_loglevel <= 2)	\
				SPS_IPC(2, dev, msg, args); \
		}	\
	} while (0)
#define SPS_DBG3(dev, msg, args...) do {				\
		if ((unlikely(logging_option > 1))	\
@@ -214,7 +225,10 @@ extern u8 print_limit_option;
			pr_debug(msg, ##args);	\
		if (unlikely(debugfs_record_enabled))	\
			SPS_DEBUGFS(msg, ##args);	\
		if (dev) { \
			if ((dev)->ipc_loglevel <= 3)	\
				SPS_IPC(3, dev, msg, args); \
		}	\
	} while (0)
#else
#define	SPS_DBG3(x...)		pr_debug(x)
+3 −0
Original line number Diff line number Diff line
@@ -456,6 +456,9 @@ struct sps_bam_props {
	u32 restricted_pipes;
	u32 ee;

	/* Log Level property */
	u32 ipc_loglevel;

	/* BAM MTI interrupt generation */

	u32 irq_gen_addr;