sdhci-esdhc-imx/v5.0-rc5: i.MX50 system hangs when "per" clock is disabled

From: Jonathan NeuschÃfer
Date: Thu Feb 07 2019 - 17:52:35 EST


Hi,

I'm currently porting mainline Linux to an i.MX507-based board
(preliminary DT here[1]). Recently I've enabled esdhc1 in the
devicetree.

However, as soon as the mmc driver (sdhci-esdhc-imx.c) disables clk_per
in sdhci_esdhc_runtime_suspend[2], the whole system locks up in some way.
Booting with CONFIG_PM=n "fixes" the problem; commenting out the
offending line in sdhci_esdhc_runtime_suspend lets the system survive,
but leaves the MMC controller in an unusable state (of course it's not a
proper solution anyway).

I tried to compare the CCM's clocks between i.MX50 and i.MX53, but
unfortunately, the i.MX50 reference manual doesn't have the table called
"Output clocks from CCM".

Does anyone have any ideas or patches that I could try in order to
narrow the problem further down?


Thanks,
Jonathan NeuschÃfer

[1]: https://gist.github.com/neuschaefer/27cacf0acf5411219be9372d728d1163
[2]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/mmc/host/sdhci-esdhc-imx.c?h=v5.0-rc5#n1412

Attachment: signature.asc
Description: PGP signature