On 11/6/23 11:24, Jaehoon Chung wrote:
-----Original Message-----
From: Marek Vasut <marek.vasut+rene...@mailbox.org>
Sent: Monday, November 6, 2023 7:43 AM
To: u-boot@lists.denx.de
Cc: Marek Vasut <marek.vasut+rene...@mailbox.org>; Jaehoon Chung
<jh80.ch...@samsung.com>; Nobuhiro
Iwamatsu <iwama...@nigauri.org>; Paul Barker <paul.barker...@bp.renesas.com>;
Peng Fan
<peng....@nxp.com>
Subject: [PATCH] mmc: renesas-sdhi: Disable clock after tuning reset when
possible
Currently the renesas_sdhi_reset_tuning() unconditionally leaves SDHI
clock enabled after the tuning reset. This is not always necessary.
After the driver performed tuning reset at the end of probe function,
or in the unlikely case that tuning failed during regular operation,
the SDHI clock can be disabled after the tuning reset. The following
set_ios call would reconfigure the clock as needed.
In case of regular set_ios call which requires a tuning reset, keep
the clock enabled or disabled according to the mmc->clk_disable state.
With this in place, the controllers which have not been accessed via
block subsystem after boot are left in quiescent state. However, if an
MMC device is used e.g. for environment storage, that controller would
be accessed during the environment load and left active, including its
clock which would still be generated. This is due to the design of the
MMC subsystem, which does not deinit a controller after it was started
once, the controller is only deinited in case of mmc rescan, or before
OS boot.
Signed-off-by: Marek Vasut <marek.vasut+rene...@mailbox.org>
Reviewed-by: Jaehoon Chung <jh80.ch...@samsung.com>
Thanks. Do you want to take this via mmc tree or shall I take it via sh
tree ? I wouldn't mind the later, since it is isolated to renesas platforms.