30.11.2021 14:44, Jon Hunter пишет: > The Tegra PMC driver implements a restart handler that supports Tegra > specific reboot commands such as placing the device into 'recovery' mode > in order to reprogram the platform. This is accomplished by setting the > appropriate bit in the PMC scratch0 register prior to rebooting the > platform. > > For Tegra platforms that support PSCI or EFI, the default Tegra restart > handler is not called and the PSCI or EFI restart handler is called > instead. Hence, for Tegra platforms that support PSCI or EFI, the Tegra > specific reboot commands do not currently work. Fix this by moving the > code that programs the PMC scratch0 register into a separate reboot > notifier that will always be called on reboot. > > Signed-off-by: Jon Hunter <jonathanh@xxxxxxxxxx> > --- > Changes since V2: > - Don't call tegra_pmc_program_reboot_reason() a 2nd time from the > restart notifier. > > Changes since V1: > - Don't change the behaviour for writing scratch0 register when the > notifier is called. > > drivers/soc/tegra/pmc.c | 31 ++++++++++++++++++++++++++++--- > 1 file changed, 28 insertions(+), 3 deletions(-) Reviewed-by: Dmitry Osipenko <digetx@xxxxxxxxx> Tested-by: Dmitry Osipenko <digetx@xxxxxxxxx>