mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 14:19:09 -04:00
mhi: core: add log buffer for controller bootup and shutdown
Add support in the MHI controller for a dedicated bootup and shutdown log buffer and fix log message macros. Change-Id: I6425107b9e2a048b44d8912051486d3aaa2abdac Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
This commit is contained in:
parent
0ea391bae1
commit
aa75fcc7cf
1 changed files with 31 additions and 2 deletions
|
|
@ -411,6 +411,7 @@ struct mhi_controller {
|
|||
bool initiate_mhi_reset;
|
||||
void *priv_data;
|
||||
void *log_buf;
|
||||
void *cntrl_log_buf;
|
||||
struct dentry *dentry;
|
||||
struct dentry *parent;
|
||||
|
||||
|
|
@ -905,7 +906,7 @@ char *mhi_get_restart_reason(const char *name);
|
|||
#ifdef CONFIG_MHI_DEBUG
|
||||
|
||||
#define MHI_VERB(fmt, ...) do { \
|
||||
if (mhi_cntrl->klog_lvl <= MHI_MSG_VERBOSE) \
|
||||
if (mhi_cntrl->klog_lvl <= MHI_MSG_LVL_VERBOSE) \
|
||||
pr_dbg("[D][%s] " fmt, __func__, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
|
|
@ -915,8 +916,20 @@ char *mhi_get_restart_reason(const char *name);
|
|||
|
||||
#endif
|
||||
|
||||
#define MHI_CNTRL_LOG(fmt, ...) do { \
|
||||
if (mhi_cntrl->klog_lvl <= MHI_MSG_LVL_INFO) \
|
||||
printk("%s[I][%s] " fmt, KERN_INFO, __func__, \
|
||||
##__VA_ARGS__); \
|
||||
} while (0)
|
||||
|
||||
#define MHI_CNTRL_ERR(fmt, ...) do { \
|
||||
if (mhi_cntrl->klog_lvl <= MHI_MSG_LVL_ERROR) \
|
||||
printk("%s[E][%s] " fmt, KERN_ERR, __func__, \
|
||||
##__VA_ARGS__); \
|
||||
} while (0)
|
||||
|
||||
#define MHI_LOG(fmt, ...) do { \
|
||||
if (mhi_cntrl->klog_lvl <= MHI_MSG_INFO) \
|
||||
if (mhi_cntrl->klog_lvl <= MHI_MSG_LVL_INFO) \
|
||||
printk("%s[I][%s] " fmt, KERN_INFO, __func__, \
|
||||
##__VA_ARGS__); \
|
||||
} while (0)
|
||||
|
|
@ -958,6 +971,22 @@ char *mhi_get_restart_reason(const char *name);
|
|||
|
||||
#endif
|
||||
|
||||
#define MHI_CNTRL_LOG(fmt, ...) do { \
|
||||
if (mhi_cntrl->klog_lvl <= MHI_MSG_LVL_INFO) \
|
||||
printk("%s[I][%s] " fmt, KERN_ERR, __func__, \
|
||||
##__VA_ARGS__); \
|
||||
ipc_log_string(mhi_cntrl->cntrl_log_buf, "[I][%s] " fmt, \
|
||||
__func__, ##__VA_ARGS__); \
|
||||
} while (0)
|
||||
|
||||
#define MHI_CNTRL_ERR(fmt, ...) do { \
|
||||
if (mhi_cntrl->klog_lvl <= MHI_MSG_LVL_ERROR) \
|
||||
printk("%s[E][%s] " fmt, KERN_ERR, __func__, \
|
||||
##__VA_ARGS__); \
|
||||
ipc_log_string(mhi_cntrl->cntrl_log_buf, "[E][%s] " fmt, \
|
||||
__func__, ##__VA_ARGS__); \
|
||||
} while (0)
|
||||
|
||||
#define MHI_LOG(fmt, ...) do { \
|
||||
if (mhi_cntrl->klog_lvl <= MHI_MSG_LVL_INFO) \
|
||||
printk("%s[I][%s] " fmt, KERN_ERR, __func__, \
|
||||
|
|
|
|||
Loading…
Reference in a new issue