Re: [PATCH v5 03/13] mmc: arm_pl180: Gate idle card clocks

Stephan Gerhold <[email protected]>
Newsgroups org.u-boot-project.lists.u-boot
Message-ID <[email protected]>
On Sun, Aug 23, 2026 at 10:39:22PM +0200, Linus Walleij wrote:
> The MMC core uses mmc->clk_disable to request that the card clock is
> stopped, but the PL180 driver leaves SDI_CLKCR_CLKEN unchanged. This can
> leave inactive hosts driving their card clocks.
> 
> Honor clk_disable when programming the clock control register. Also enable
> the PL180 power-save mode so the clock stops automatically while the bus is
> idle.

I'm not so sure about enabling PWRSAV, given that even Linux keeps that
disabled. See mmci_set_clkreg():

		clk |= MCI_CLK_ENABLE;
		/* This hasn't proven to be worthwhile */
		/* clk |= MCI_CLK_PWRSAVE; */

Which is BTW your own change from 2009. :-)
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=a6a6464a0ecd20c5f1594a4fe5b24af6181b7366

The clk_disable part looks fine to me.

Thanks,
Stephan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.