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: Rama Krishna Phani A <rphani@codeaurora.org>
This commit is contained in:
Rama Krishna Phani A 2015-08-17 19:49:50 +05:30 committed by Gerrit - the friendly Code Review server
parent 73ff8081ed
commit 109e998f78
4 changed files with 26 additions and 4 deletions

View File

@ -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) {

View File

@ -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];
};

View File

@ -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); \
SPS_IPC(0, dev, 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); \
SPS_IPC(1, dev, 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); \
SPS_IPC(2, dev, 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); \
SPS_IPC(3, dev, 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)

View File

@ -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;