* [RFC PATCH V3 10/21] mmc: sdhci: UHS-II support, dump UHS-II registers
@ 2020-07-10 11:10 Ben Chuang
2020-08-21 14:04 ` Adrian Hunter
0 siblings, 1 reply; 3+ messages in thread
From: Ben Chuang @ 2020-07-10 11:10 UTC (permalink / raw)
To: adrian.hunter, ulf.hansson
Cc: linux-mmc, linux-kernel, ben.chuang, takahiro.akashi, greg.tu,
Ben Chuang
From: AKASHI Takahiro <takahiro.akashi@linaro.org>
Dump UHS-II specific registers, if available, in sdhci_dumpregs()
for informative/debugging use.
Signed-off-by: Ben Chuang <ben.chuang@genesyslogic.com.tw>
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
---
drivers/mmc/host/sdhci.c | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 37b1158c1c0c..c2f6923d296c 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -111,6 +111,30 @@ void sdhci_dumpregs(struct sdhci_host *host)
}
}
+ if (IS_ENABLED(CONFIG_MMC_SDHCI_UHS2) &&
+ host->mmc && host->mmc->flags & MMC_UHS2_SUPPORT) {
+ SDHCI_DUMP("==================== UHS2 ==================\n");
+ SDHCI_DUMP("Blk Size: 0x%08x | Blk Cnt: 0x%08x\n",
+ sdhci_readw(host, SDHCI_UHS2_BLOCK_SIZE),
+ sdhci_readl(host, SDHCI_UHS2_BLOCK_COUNT));
+ SDHCI_DUMP("Cmd: 0x%08x | Trn mode: 0x%08x\n",
+ sdhci_readw(host, SDHCI_UHS2_COMMAND),
+ sdhci_readw(host, SDHCI_UHS2_TRANS_MODE));
+ SDHCI_DUMP("Int Stat: 0x%08x | Dev Sel : 0x%08x\n",
+ sdhci_readw(host, SDHCI_UHS2_DEV_INT_STATUS),
+ sdhci_readb(host, SDHCI_UHS2_DEV_SELECT));
+ SDHCI_DUMP("Dev Int Code: 0x%08x\n",
+ sdhci_readb(host, SDHCI_UHS2_DEV_INT_CODE));
+ SDHCI_DUMP("Reset: 0x%08x | Timer: 0x%08x\n",
+ sdhci_readw(host, SDHCI_UHS2_SW_RESET),
+ sdhci_readw(host, SDHCI_UHS2_TIMER_CTRL));
+ SDHCI_DUMP("ErrInt: 0x%08x | ErrIntEn: 0x%08x\n",
+ sdhci_readl(host, SDHCI_UHS2_ERR_INT_STATUS),
+ sdhci_readl(host, SDHCI_UHS2_ERR_INT_STATUS_EN));
+ SDHCI_DUMP("ErrSigEn: 0x%08x\n",
+ sdhci_readl(host, SDHCI_UHS2_ERR_INT_SIG_EN));
+ }
+
if (host->ops->dump_vendor_regs)
host->ops->dump_vendor_regs(host);
--
2.27.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [RFC PATCH V3 10/21] mmc: sdhci: UHS-II support, dump UHS-II registers
2020-07-10 11:10 [RFC PATCH V3 10/21] mmc: sdhci: UHS-II support, dump UHS-II registers Ben Chuang
@ 2020-08-21 14:04 ` Adrian Hunter
2020-09-15 6:49 ` AKASHI Takahiro
0 siblings, 1 reply; 3+ messages in thread
From: Adrian Hunter @ 2020-08-21 14:04 UTC (permalink / raw)
To: Ben Chuang, ulf.hansson
Cc: linux-mmc, linux-kernel, ben.chuang, takahiro.akashi, greg.tu
On 10/07/20 2:10 pm, Ben Chuang wrote:
> From: AKASHI Takahiro <takahiro.akashi@linaro.org>
>
> Dump UHS-II specific registers, if available, in sdhci_dumpregs()
> for informative/debugging use.
>
> Signed-off-by: Ben Chuang <ben.chuang@genesyslogic.com.tw>
> Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
> ---
> drivers/mmc/host/sdhci.c | 24 ++++++++++++++++++++++++
> 1 file changed, 24 insertions(+)
>
> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> index 37b1158c1c0c..c2f6923d296c 100644
> --- a/drivers/mmc/host/sdhci.c
> +++ b/drivers/mmc/host/sdhci.c
> @@ -111,6 +111,30 @@ void sdhci_dumpregs(struct sdhci_host *host)
> }
> }
>
> + if (IS_ENABLED(CONFIG_MMC_SDHCI_UHS2) &&
> + host->mmc && host->mmc->flags & MMC_UHS2_SUPPORT) {
> + SDHCI_DUMP("==================== UHS2 ==================\n");
> + SDHCI_DUMP("Blk Size: 0x%08x | Blk Cnt: 0x%08x\n",
> + sdhci_readw(host, SDHCI_UHS2_BLOCK_SIZE),
> + sdhci_readl(host, SDHCI_UHS2_BLOCK_COUNT));
> + SDHCI_DUMP("Cmd: 0x%08x | Trn mode: 0x%08x\n",
> + sdhci_readw(host, SDHCI_UHS2_COMMAND),
> + sdhci_readw(host, SDHCI_UHS2_TRANS_MODE));
> + SDHCI_DUMP("Int Stat: 0x%08x | Dev Sel : 0x%08x\n",
> + sdhci_readw(host, SDHCI_UHS2_DEV_INT_STATUS),
> + sdhci_readb(host, SDHCI_UHS2_DEV_SELECT));
> + SDHCI_DUMP("Dev Int Code: 0x%08x\n",
> + sdhci_readb(host, SDHCI_UHS2_DEV_INT_CODE));
> + SDHCI_DUMP("Reset: 0x%08x | Timer: 0x%08x\n",
> + sdhci_readw(host, SDHCI_UHS2_SW_RESET),
> + sdhci_readw(host, SDHCI_UHS2_TIMER_CTRL));
> + SDHCI_DUMP("ErrInt: 0x%08x | ErrIntEn: 0x%08x\n",
> + sdhci_readl(host, SDHCI_UHS2_ERR_INT_STATUS),
> + sdhci_readl(host, SDHCI_UHS2_ERR_INT_STATUS_EN));
> + SDHCI_DUMP("ErrSigEn: 0x%08x\n",
> + sdhci_readl(host, SDHCI_UHS2_ERR_INT_SIG_EN));
> + }
> +
Let's make this a host op instead ie.
if (host->ops->dump_uhs2_regs)
host->ops->dump_uhs2_regs(host);
> if (host->ops->dump_vendor_regs)
> host->ops->dump_vendor_regs(host);
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFC PATCH V3 10/21] mmc: sdhci: UHS-II support, dump UHS-II registers
2020-08-21 14:04 ` Adrian Hunter
@ 2020-09-15 6:49 ` AKASHI Takahiro
0 siblings, 0 replies; 3+ messages in thread
From: AKASHI Takahiro @ 2020-09-15 6:49 UTC (permalink / raw)
To: Adrian Hunter
Cc: Ben Chuang, ulf.hansson, linux-mmc, linux-kernel, ben.chuang, greg.tu
On Fri, Aug 21, 2020 at 05:04:54PM +0300, Adrian Hunter wrote:
> On 10/07/20 2:10 pm, Ben Chuang wrote:
> > From: AKASHI Takahiro <takahiro.akashi@linaro.org>
> >
> > Dump UHS-II specific registers, if available, in sdhci_dumpregs()
> > for informative/debugging use.
> >
> > Signed-off-by: Ben Chuang <ben.chuang@genesyslogic.com.tw>
> > Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
> > ---
> > drivers/mmc/host/sdhci.c | 24 ++++++++++++++++++++++++
> > 1 file changed, 24 insertions(+)
> >
> > diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> > index 37b1158c1c0c..c2f6923d296c 100644
> > --- a/drivers/mmc/host/sdhci.c
> > +++ b/drivers/mmc/host/sdhci.c
> > @@ -111,6 +111,30 @@ void sdhci_dumpregs(struct sdhci_host *host)
> > }
> > }
> >
> > + if (IS_ENABLED(CONFIG_MMC_SDHCI_UHS2) &&
> > + host->mmc && host->mmc->flags & MMC_UHS2_SUPPORT) {
> > + SDHCI_DUMP("==================== UHS2 ==================\n");
> > + SDHCI_DUMP("Blk Size: 0x%08x | Blk Cnt: 0x%08x\n",
> > + sdhci_readw(host, SDHCI_UHS2_BLOCK_SIZE),
> > + sdhci_readl(host, SDHCI_UHS2_BLOCK_COUNT));
> > + SDHCI_DUMP("Cmd: 0x%08x | Trn mode: 0x%08x\n",
> > + sdhci_readw(host, SDHCI_UHS2_COMMAND),
> > + sdhci_readw(host, SDHCI_UHS2_TRANS_MODE));
> > + SDHCI_DUMP("Int Stat: 0x%08x | Dev Sel : 0x%08x\n",
> > + sdhci_readw(host, SDHCI_UHS2_DEV_INT_STATUS),
> > + sdhci_readb(host, SDHCI_UHS2_DEV_SELECT));
> > + SDHCI_DUMP("Dev Int Code: 0x%08x\n",
> > + sdhci_readb(host, SDHCI_UHS2_DEV_INT_CODE));
> > + SDHCI_DUMP("Reset: 0x%08x | Timer: 0x%08x\n",
> > + sdhci_readw(host, SDHCI_UHS2_SW_RESET),
> > + sdhci_readw(host, SDHCI_UHS2_TIMER_CTRL));
> > + SDHCI_DUMP("ErrInt: 0x%08x | ErrIntEn: 0x%08x\n",
> > + sdhci_readl(host, SDHCI_UHS2_ERR_INT_STATUS),
> > + sdhci_readl(host, SDHCI_UHS2_ERR_INT_STATUS_EN));
> > + SDHCI_DUMP("ErrSigEn: 0x%08x\n",
> > + sdhci_readl(host, SDHCI_UHS2_ERR_INT_SIG_EN));
> > + }
> > +
>
> Let's make this a host op instead ie.
>
> if (host->ops->dump_uhs2_regs)
> host->ops->dump_uhs2_regs(host);
Sure.
-Takahiro Akashi
> > if (host->ops->dump_vendor_regs)
> > host->ops->dump_vendor_regs(host);
> >
> >
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-09-15 6:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-10 11:10 [RFC PATCH V3 10/21] mmc: sdhci: UHS-II support, dump UHS-II registers Ben Chuang
2020-08-21 14:04 ` Adrian Hunter
2020-09-15 6:49 ` AKASHI Takahiro
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.