On 10/3/19 5:23 AM, Dmitry Osipenko wrote:
02.10.2019 00:13, Stephen Warren пишет:
From: Stephen Warren <swarren@xxxxxxxxxx>
For a little over a year, U-Boot has configured the flow controller to
perform automatic RAM re-repair on off->on power transitions of the CPU
rail1]. This is mandatory for correct operation of Tegra124. However, RAM
re-repair relies on certain clocks, which the kernel must enable and
leave running. The fuse clock is one of those clocks. Enable this clock
so that LP1 power mode (system suspend) operates correctly.
[1] 3cc7942a4ae5 ARM: tegra: implement RAM repair
Reported-by: Jonathan Hunter <jonathanh@xxxxxxxxxx>
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Stephen Warren <swarren@xxxxxxxxxx>
---
drivers/clk/tegra/clk-tegra124.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/clk/tegra/clk-tegra124.c b/drivers/clk/tegra/clk-tegra124.c
index 0224fdc4766f..f53f6315c646 100644
--- a/drivers/clk/tegra/clk-tegra124.c
+++ b/drivers/clk/tegra/clk-tegra124.c
@@ -1291,6 +1291,7 @@ static struct tegra_clk_init_table common_init_table[] __initdata = {
};
static struct tegra_clk_init_table tegra124_init_table[] __initdata = {
+ { TEGRA124_CLK_FUSE, -1, 0, 1 },
{ TEGRA124_CLK_SOC_THERM, TEGRA124_CLK_PLL_P, 51000000, 0 },
{ TEGRA124_CLK_CCLK_G, TEGRA124_CLK_CLK_MAX, 0, 1 },
{ TEGRA124_CLK_HDA, TEGRA124_CLK_PLL_P, 102000000, 0 },
Hello Stephen,
Does this mean that devices which are using older U-Boot version were always in a trouble?
Yes. RAM re-repair wouldn't have been enabled, so in theory any device
could fail after an LP1 resume, or indeed anything that caused the CPU
complex rail to be gated.
It sounds to me that the RAM re-repair should be also enabled by the kernel's flow
controller driver in a case if bootloader did not enable it.
Yes, that might be a good idea too.
If enabling RAM re-repair is a change that won't be easily backportable to stable kernels,
then may be it's worth to simply force-disable LP1 on T124 for the older kernels.
The first two patches in this series are all that's strictly required,
and the change are pretty small and isolated, so it should be easy to
back-port.