From: Ulf Hansson <ulf.hansson@linaro.org>
To: Zhou Yanjie <zhouyanjie@zoho.com>, Paul Cercueil <paul@crapouillou.net>
Cc: linux-mips@vger.kernel.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
DTML <devicetree@vger.kernel.org>,
Rob Herring <robh+dt@kernel.org>,
Paul Burton <paul.burton@mips.com>,
Mark Rutland <mark.rutland@arm.com>,
syq@debian.org, Linus Walleij <linus.walleij@linaro.org>,
armijn@tjaldur.nl, Thomas Gleixner <tglx@linutronix.de>,
YueHaibing <yuehaibing@huawei.com>,
Mathieu Malaterre <malat@debian.org>,
Ezequiel Garcia <ezequiel@collabora.com>
Subject: Re: [PATCH 6/6 v2] MMC: JZ4740: Add support for LPM.
Date: Fri, 18 Oct 2019 10:52:41 +0200 [thread overview]
Message-ID: <CAPDyKFo9juNmf6hrcBjzOprS6GwzAPBq8y3ReGu=ry+MdxT9Bg@mail.gmail.com> (raw)
In-Reply-To: <1570857203-49192-7-git-send-email-zhouyanjie@zoho.com>
On Sat, 12 Oct 2019 at 07:19, Zhou Yanjie <zhouyanjie@zoho.com> wrote:
>
> add support for low power mode of Ingenic's MMC/SD Controller.
>
> Signed-off-by: Zhou Yanjie <zhouyanjie@zoho.com>
I couldn't find a proper coverletter for the series, please provide
that next time as it really helps review. Additionally, it seems like
you forgot to change the prefix of the patches to "mmc: jz4740" (or at
least you chosed upper case letters), but I will take care of that
this time. So, I have applied the series for next, thanks!
I also have a general question. Should we perhaps rename the driver
from jz4740_mmc.c to ingenic.c (and the file for the DT bindings, the
Kconfig, etc), as that seems like a more appropriate name? No?
Kind regards
Uffe
> ---
> drivers/mmc/host/jz4740_mmc.c | 23 +++++++++++++++++++++++
> 1 file changed, 23 insertions(+)
>
> diff --git a/drivers/mmc/host/jz4740_mmc.c b/drivers/mmc/host/jz4740_mmc.c
> index 44a04fe..4cbe7fb 100644
> --- a/drivers/mmc/host/jz4740_mmc.c
> +++ b/drivers/mmc/host/jz4740_mmc.c
> @@ -43,6 +43,7 @@
> #define JZ_REG_MMC_RESP_FIFO 0x34
> #define JZ_REG_MMC_RXFIFO 0x38
> #define JZ_REG_MMC_TXFIFO 0x3C
> +#define JZ_REG_MMC_LPM 0x40
> #define JZ_REG_MMC_DMAC 0x44
>
> #define JZ_MMC_STRPCL_EXIT_MULTIPLE BIT(7)
> @@ -102,6 +103,12 @@
> #define JZ_MMC_DMAC_DMA_SEL BIT(1)
> #define JZ_MMC_DMAC_DMA_EN BIT(0)
>
> +#define JZ_MMC_LPM_DRV_RISING BIT(31)
> +#define JZ_MMC_LPM_DRV_RISING_QTR_PHASE_DLY BIT(31)
> +#define JZ_MMC_LPM_DRV_RISING_1NS_DLY BIT(30)
> +#define JZ_MMC_LPM_SMP_RISING_QTR_OR_HALF_PHASE_DLY BIT(29)
> +#define JZ_MMC_LPM_LOW_POWER_MODE_EN BIT(0)
> +
> #define JZ_MMC_CLK_RATE 24000000
>
> enum jz4740_mmc_version {
> @@ -860,6 +867,22 @@ static int jz4740_mmc_set_clock_rate(struct jz4740_mmc_host *host, int rate)
> }
>
> writew(div, host->base + JZ_REG_MMC_CLKRT);
> +
> + if (real_rate > 25000000) {
> + if (host->version >= JZ_MMC_X1000) {
> + writel(JZ_MMC_LPM_DRV_RISING_QTR_PHASE_DLY |
> + JZ_MMC_LPM_SMP_RISING_QTR_OR_HALF_PHASE_DLY |
> + JZ_MMC_LPM_LOW_POWER_MODE_EN,
> + host->base + JZ_REG_MMC_LPM);
> + } else if (host->version >= JZ_MMC_JZ4760) {
> + writel(JZ_MMC_LPM_DRV_RISING |
> + JZ_MMC_LPM_LOW_POWER_MODE_EN,
> + host->base + JZ_REG_MMC_LPM);
> + } else if (host->version >= JZ_MMC_JZ4725B)
> + writel(JZ_MMC_LPM_LOW_POWER_MODE_EN,
> + host->base + JZ_REG_MMC_LPM);
> + }
> +
> return real_rate;
> }
>
> --
> 2.7.4
>
>
next prev parent reply other threads:[~2019-10-18 8:53 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-05 7:38 MMC: Ingenic: Add support for 8bit mode and LPM and JZ4760 Soc Zhou Yanjie
2019-09-05 7:38 ` [PATCH 1/4] MMC: Ingenic: Adjust the macro definition name Zhou Yanjie
2019-09-13 15:32 ` Ezequiel Garcia
2019-09-13 15:59 ` Zhou Yanjie
2019-09-05 7:38 ` [PATCH 2/4] MMC: Ingenic: Add 8bit mode support Zhou Yanjie
2019-09-05 7:38 ` [PATCH 3/4] dt-bindings: MMC: Add JZ4760 bindings Zhou Yanjie
2019-09-13 14:36 ` Rob Herring
2019-09-05 7:38 ` [PATCH 4/4] MMC: Ingenic: Add support for JZ4760 and support for LPM Zhou Yanjie
2019-10-03 10:00 ` Ulf Hansson
2019-10-06 5:58 ` Zhou Yanjie
2019-10-12 5:13 ` MMC: JZ4740: Add support for 8bit mode and LPM and JZ4760 Soc v2 Zhou Yanjie
2019-10-12 5:13 ` [PATCH 1/6 v2] MMC: Ingenic: Add 8bit mode support Zhou Yanjie
2019-10-12 5:13 ` [PATCH 2/6 v2] dt-bindings: MMC: Add JZ4760 bindings Zhou Yanjie
2019-10-12 5:13 ` [PATCH 3/6 v2] MMC: JZ4740: Add support for the JZ4760 Zhou Yanjie
2019-10-12 5:13 ` [PATCH 4/6 v2] dt-bindings: MMC: Add X1000 bindings Zhou Yanjie
2019-10-14 18:15 ` Rob Herring
2019-10-12 5:13 ` [PATCH 5/6 v2] MMC: JZ4740: Add support for the X1000 Zhou Yanjie
2019-10-12 5:13 ` [PATCH 6/6 v2] MMC: JZ4740: Add support for LPM Zhou Yanjie
2019-10-18 8:52 ` Ulf Hansson [this message]
2019-10-18 15:37 ` Paul Cercueil
2019-10-18 16:54 ` Zhou Yanjie
2019-10-19 20:44 ` Ezequiel Garcia
2019-10-21 14:57 ` Ulf Hansson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAPDyKFo9juNmf6hrcBjzOprS6GwzAPBq8y3ReGu=ry+MdxT9Bg@mail.gmail.com' \
--to=ulf.hansson@linaro.org \
--cc=armijn@tjaldur.nl \
--cc=devicetree@vger.kernel.org \
--cc=ezequiel@collabora.com \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=malat@debian.org \
--cc=mark.rutland@arm.com \
--cc=paul.burton@mips.com \
--cc=paul@crapouillou.net \
--cc=robh+dt@kernel.org \
--cc=syq@debian.org \
--cc=tglx@linutronix.de \
--cc=yuehaibing@huawei.com \
--cc=zhouyanjie@zoho.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).