[PATCH] mmc: renesas-sdhi: Disable clock after tuning reset when possible

Marek Vasut marek.vasut at mailbox.org
Sat Nov 11 17:14:25 CET 2023


On 11/6/23 11:24, Jaehoon Chung wrote:
> 
> 
>> -----Original Message-----
>> From: Marek Vasut <marek.vasut+renesas at mailbox.org>
>> Sent: Monday, November 6, 2023 7:43 AM
>> To: u-boot at lists.denx.de
>> Cc: Marek Vasut <marek.vasut+renesas at mailbox.org>; Jaehoon Chung <jh80.chung at samsung.com>; Nobuhiro
>> Iwamatsu <iwamatsu at nigauri.org>; Paul Barker <paul.barker.ct at bp.renesas.com>; Peng Fan
>> <peng.fan at 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+renesas at mailbox.org>
> 
> Reviewed-by: Jaehoon Chung <jh80.chung at 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.


More information about the U-Boot mailing list