/** * fsl_sysfs_ssi_show: display SSI statistics * * Display the statistics for the current SSI device. To avoid confusion, * we only show those counts that are enabled. */ static ssize_t fsl_sysfs_ssi_show(struct device *dev, struct device_attribute *attr, char *buf) { struct fsl_ssi_private *ssi_private = container_of(attr, struct fsl_ssi_private, dev_attr); ssize_t length = 0; SIER_SHOW(RFRC_EN, rfrc); SIER_SHOW(TFRC_EN, tfrc); SIER_SHOW(CMDAU_EN, cmdau); SIER_SHOW(CMDDU_EN, cmddu); SIER_SHOW(RXT_EN, rxt); SIER_SHOW(RDR1_EN, rdr1); SIER_SHOW(RDR0_EN, rdr0); SIER_SHOW(TDE1_EN, tde1); SIER_SHOW(TDE0_EN, tde0); SIER_SHOW(ROE1_EN, roe1); SIER_SHOW(ROE0_EN, roe0); SIER_SHOW(TUE1_EN, tue1); SIER_SHOW(TUE0_EN, tue0); SIER_SHOW(TFS_EN, tfs); SIER_SHOW(RFS_EN, rfs); SIER_SHOW(TLS_EN, tls); SIER_SHOW(RLS_EN, rls); SIER_SHOW(RFF1_EN, rff1); SIER_SHOW(RFF0_EN, rff0); SIER_SHOW(TFE1_EN, tfe1); SIER_SHOW(TFE0_EN, tfe0); return length; }
/** * fsl_sysfs_ssi_show: display SSI statistics * * Display the statistics for the current SSI device. To avoid confusion, * we only show those counts that are enabled. */ static int fsl_ssi_stats_show(struct seq_file *s, void *unused) { struct fsl_ssi_dbg *ssi_dbg = s->private; unsigned int sier = ssi_dbg->sier_ever_enabled; SIER_SHOW(RFRC_EN, rfrc); SIER_SHOW(TFRC_EN, tfrc); SIER_SHOW(CMDAU_EN, cmdau); SIER_SHOW(CMDDU_EN, cmddu); SIER_SHOW(RXT_EN, rxt); SIER_SHOW(RDR1_EN, rdr1); SIER_SHOW(RDR0_EN, rdr0); SIER_SHOW(TDE1_EN, tde1); SIER_SHOW(TDE0_EN, tde0); SIER_SHOW(ROE1_EN, roe1); SIER_SHOW(ROE0_EN, roe0); SIER_SHOW(TUE1_EN, tue1); SIER_SHOW(TUE0_EN, tue0); SIER_SHOW(TFS_EN, tfs); SIER_SHOW(RFS_EN, rfs); SIER_SHOW(TLS_EN, tls); SIER_SHOW(RLS_EN, rls); SIER_SHOW(RFF1_EN, rff1); SIER_SHOW(RFF0_EN, rff0); SIER_SHOW(TFE1_EN, tfe1); SIER_SHOW(TFE0_EN, tfe0); return 0; }