diff options
| author | Dov Levenglick <dovl@codeaurora.org> | 2014-12-18 09:13:44 +0200 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-22 10:58:25 -0700 |
| commit | f6786d1fec861506b3e3339cd4f6066c75cdb203 (patch) | |
| tree | 832493e9840f6fed13ab3a401c9ccdeb7ec6c2af /include/linux | |
| parent | 1fd1c6a6970c8d44a0e29463e9a8d378ec9bea84 (diff) | |
scsi: ufs: add print suppressing debugfs mechanism
Provides a mechanism for the userspace to suppress specific
debug prints via the debugfs. This is useful in order to avoid
cases where too much printing would cause watchdog timers to expire.
Change-Id: I1ab068cd616ddac767ec5f30ab130e3b1ac34e15
Signed-off-by: Dov Levenglick <dovl@codeaurora.org>
[imaund@codeaurora.org: Resolved context conflicts]
Signed-off-by: Ian Maund <imaund@codeaurora.org>
[subhashj@codeaurora.org: resolved trivial merge conflicts]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/scsi/ufs/ufshcd.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/linux/scsi/ufs/ufshcd.h b/include/linux/scsi/ufs/ufshcd.h index 76e08ee8c1ae..e3a5c23f39ea 100644 --- a/include/linux/scsi/ufs/ufshcd.h +++ b/include/linux/scsi/ufs/ufshcd.h @@ -486,6 +486,7 @@ struct debugfs_files { struct dentry *power_mode; struct dentry *dme_local_read; struct dentry *dme_peer_read; + struct dentry *dbg_print_en; u32 dme_local_attr_id; u32 dme_peer_attr_id; #ifdef CONFIG_UFS_FAULT_INJECTION @@ -538,6 +539,20 @@ struct ufshcd_pm_qos { bool is_suspended; }; +/* UFS Host Controller debug print bitmask */ +#define UFSHCD_DBG_PRINT_CLK_FREQ_EN UFS_BIT(0) +#define UFSHCD_DBG_PRINT_UIC_ERR_HIST_EN UFS_BIT(1) +#define UFSHCD_DBG_PRINT_HOST_REGS_EN UFS_BIT(2) +#define UFSHCD_DBG_PRINT_TRS_EN UFS_BIT(3) +#define UFSHCD_DBG_PRINT_TMRS_EN UFS_BIT(4) +#define UFSHCD_DBG_PRINT_PWR_EN UFS_BIT(5) + +#define UFSHCD_DBG_PRINT_ALL \ + (UFSHCD_DBG_PRINT_CLK_FREQ_EN | \ + UFSHCD_DBG_PRINT_UIC_ERR_HIST_EN | \ + UFSHCD_DBG_PRINT_HOST_REGS_EN | UFSHCD_DBG_PRINT_TRS_EN | \ + UFSHCD_DBG_PRINT_TMRS_EN | UFSHCD_DBG_PRINT_PWR_EN) + /** * struct ufs_hba - per adapter private structure * @mmio_base: UFSHCI base register address @@ -585,6 +600,7 @@ struct ufshcd_pm_qos { * @auto_bkops_enabled: to track whether bkops is enabled in device * @ufs_stats: ufshcd statistics to be used via debugfs * @debugfs_files: debugfs files associated with the ufs stats + * @ufshcd_dbg_print: Bitmask for enabling debug prints * @vreg_info: UFS device voltage regulator information * @clk_list_head: UFS host controller clocks list node head * @pwr_info: holds current power mode @@ -737,6 +753,9 @@ struct ufs_hba { /* Number of lanes available (1 or 2) for Rx/Tx */ u32 lanes_per_direction; + /* Bitmask for enabling debug prints */ + u32 ufshcd_dbg_print; + struct ufs_pa_layer_attr pwr_info; struct ufs_pwr_mode_info max_pwr_info; |
