summaryrefslogtreecommitdiffstats
path: root/sound/soc/fsl/fsl_ssi.h
diff options
context:
space:
mode:
authorMarkus Pargmann <mpa@pengutronix.de>2014-04-28 12:54:43 +0200
committerMark Brown <broonie@linaro.org>2014-05-20 23:02:26 +0100
commitf138e6212427d0ea6283e07b706823b657ddf14f (patch)
treeaaddfdb38e47b479a96cb9004736cefa226f2429 /sound/soc/fsl/fsl_ssi.h
parent65c961cc59345fa347173e5a1f5866bc866fd626 (diff)
downloadop-kernel-dev-f138e6212427d0ea6283e07b706823b657ddf14f.zip
op-kernel-dev-f138e6212427d0ea6283e07b706823b657ddf14f.tar.gz
ASoC: fsl-ssi: Move debugging to seperate file
Move all code that is only used for debugging to a seperate file. This makes it easier to see what functions are used for debugging only. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Tested-By: Michael Grzeschik <mgr@pengutronix.de> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/fsl/fsl_ssi.h')
-rw-r--r--sound/soc/fsl/fsl_ssi.h61
1 files changed, 60 insertions, 1 deletions
diff --git a/sound/soc/fsl/fsl_ssi.h b/sound/soc/fsl/fsl_ssi.h
index e6b6324..2e95dd7 100644
--- a/sound/soc/fsl/fsl_ssi.h
+++ b/sound/soc/fsl/fsl_ssi.h
@@ -206,5 +206,64 @@ struct ccsr_ssi {
#define CCSR_SSI_SACNT_FV 0x00000002
#define CCSR_SSI_SACNT_AC97EN 0x00000001
-#endif
+struct device;
+
+#if IS_ENABLED(CONFIG_DEBUG_FS)
+
+struct fsl_ssi_dbg {
+ struct dentry *dbg_dir;
+ struct dentry *dbg_stats;
+
+ struct {
+ unsigned int rfrc;
+ unsigned int tfrc;
+ unsigned int cmdau;
+ unsigned int cmddu;
+ unsigned int rxt;
+ unsigned int rdr1;
+ unsigned int rdr0;
+ unsigned int tde1;
+ unsigned int tde0;
+ unsigned int roe1;
+ unsigned int roe0;
+ unsigned int tue1;
+ unsigned int tue0;
+ unsigned int tfs;
+ unsigned int rfs;
+ unsigned int tls;
+ unsigned int rls;
+ unsigned int rff1;
+ unsigned int rff0;
+ unsigned int tfe1;
+ unsigned int tfe0;
+ } stats;
+};
+
+void fsl_ssi_dbg_isr(struct fsl_ssi_dbg *ssi_dbg, u32 sisr);
+
+int fsl_ssi_debugfs_create(struct fsl_ssi_dbg *ssi_dbg, struct device *dev);
+
+void fsl_ssi_debugfs_remove(struct fsl_ssi_dbg *ssi_dbg);
+
+#else
+
+struct fsl_ssi_dbg {
+};
+
+static inline void fsl_ssi_dbg_isr(struct fsl_ssi_dbg *stats, u32 sisr)
+{
+}
+
+static inline int fsl_ssi_debugfs_create(struct fsl_ssi_dbg *ssi_dbg,
+ struct device *dev)
+{
+ return 0;
+}
+
+static inline void fsl_ssi_debugfs_remove(struct fsl_ssi_dbg *ssi_dbg)
+{
+}
+#endif /* ! IS_ENABLED(CONFIG_DEBUG_FS) */
+
+#endif
OpenPOWER on IntegriCloud