22.11.2021 15:12, Jon Hunter пишет: > > On 18/11/2021 19:13, Dmitry Osipenko wrote: >> 15.11.2021 14:32, Jon Hunter пишет: >>> -static int tegra_pmc_restart_notify(struct notifier_block *this, >>> - unsigned long action, void *data) >>> +static void tegra_pmc_program_reboot_reason(const char *cmd) >>> { >>> - const char *cmd = data; >>> u32 value; >>> + if (!cmd) >>> + return; >> >> There is no explanation of this change in the commit message. Previously >> scratch register was cleared if command is NULL, now it's not. Why? > > > No reason, just an oversight on my part. I can change this back to keep > the behaviour the same. Alright, I'd expect bootloader to clear the register, although perhaps there could be a reason why kernel needs to clear it since all downstream kernels do it. BTW, this patch is also needed in order to support restarting to bootloader using PMIC's restart handler, which should become a thing for some T30 devices soon. Although, will need to double check whether scratch reg state retains after a full SoC power-cycle, but I assume it should retain since RTC domain should stay always-on.