From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Thu, 1 Nov 2018 13:10:25 +0100 Subject: [U-Boot] [PATCH 05/13] mmc: tmio: Keep generating clock when clock are enabled In-Reply-To: References: <20181031171606.13561-1-marek.vasut+renesas@gmail.com> <20181031171606.13561-5-marek.vasut+renesas@gmail.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 11/01/2018 12:46 PM, Masahiro Yamada wrote: > On Thu, Nov 1, 2018 at 2:21 AM Marek Vasut wrote: >> >> The TMIO core has a feature where it can automatically disable clock output >> when the bus is not in use. While this is useful, it also interferes with >> switching the bus to 1.8V and other background tasks of the SD/MMC cards, >> which require clock to be enabled. >> >> This patch respects the mmc->clk_disable and only disables the clock when >> the MMC core requests it. Otherwise the clock are continuously generated >> on the bus. >> >> Signed-off-by: Marek Vasut >> Cc: Masahiro Yamada >> --- >> drivers/mmc/tmio-common.c | 10 ++++++++-- >> 1 file changed, 8 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/mmc/tmio-common.c b/drivers/mmc/tmio-common.c >> index ef06f0aa4b..42eb847edb 100644 >> --- a/drivers/mmc/tmio-common.c >> +++ b/drivers/mmc/tmio-common.c >> @@ -603,10 +603,16 @@ static void tmio_sd_set_clk_rate(struct tmio_sd_priv *priv, >> tmio_sd_writel(priv, tmp, TMIO_SD_CLKCTL); >> >> tmp &= ~TMIO_SD_CLKCTL_DIV_MASK; >> - tmp |= val | TMIO_SD_CLKCTL_OFFEN; > > > Sorry, _OFFEN is Socionext-specific extension. It's documented in renesas docs too. > I believe moving tmio_sd_set_clk_rate to a platform hook > will make our life easier. Are you sure ? -- Best regards, Marek Vasut