summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDov Levenglick <dovl@codeaurora.org>2015-01-05 16:48:33 +0200
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-22 10:58:31 -0700
commit4229a8a3ed2c668e0b95e7791b422cd019ed6758 (patch)
treea65c4badfb53654b936cb1170676c167ecdab187 /include
parent7d17fba879bb36459d82844567380cd1745129d6 (diff)
scsi: ufs-qcom: expose debug registers by debugfs
Add support for exposing debug registers via debugfs. This can be used for runtime debugging of failures/errors without the need to add more prints to the console. In order to avoid unnecessary code duplication, the function for dumping registers to a file (in debugfs.c) has been slightly modified and exposed as an external function. Signed-off-by: Dov Levenglick <dovl@codeaurora.org> Change-Id: I77f9f3a6d041f805a93d095446f3e8077977036f
Diffstat (limited to 'include')
-rw-r--r--include/linux/scsi/ufs/ufs-qcom.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/scsi/ufs/ufs-qcom.h b/include/linux/scsi/ufs/ufs-qcom.h
index c2df38d4f559..fc8b2c98f191 100644
--- a/include/linux/scsi/ufs/ufs-qcom.h
+++ b/include/linux/scsi/ufs/ufs-qcom.h
@@ -218,6 +218,7 @@ struct qcom_debugfs_files {
struct dentry *testbus_en;
struct dentry *testbus_cfg;
struct dentry *testbus_bus;
+ struct dentry *dbg_regs;
};
#endif
@@ -263,6 +264,9 @@ struct ufs_qcom_host {
#define ufs_qcom_is_link_hibern8(hba) ufshcd_is_link_hibern8(hba)
int ufs_qcom_testbus_config(struct ufs_qcom_host *host);
+void ufs_qcom_print_hw_debug_reg_all(struct ufs_hba *hba, void *priv,
+ void (*print_fn)(struct ufs_hba *hba, int offset, int num_regs,
+ char *str, void *priv));
#define MAX_PROP_NAME 32
#define VDDA_PHY_MIN_UV 1000000