Re: [PATCH] soc: bcm: brcmstb: Remove bare-metal ARM suspend/resume code

From: Guilherme G. Piccoli
Date: Mon Feb 27 2023 - 13:36:33 EST


On 24/02/2023 18:52, Florian Fainelli wrote:
> Since 2018 these platforms have supported entry via the ARM Trusted
> Firmware using the standard PSCI SYSTEM_SUSPEND function calls. Remove
> this legacy code.
>
> Signed-off-by: Florian Fainelli <f.fainelli@xxxxxxxxx>
> [...]
> -/*
> - * The AON is a small domain in the SoC that can retain its state across
> - * various system wide sleep states and specific reset conditions; the
> - * AON DATA RAM is a small RAM of a few words (< 1KB) which can store
> - * persistent information across such events.
> - *
> - * The purpose of the below panic notifier is to help with notifying
> - * the bootloader that a panic occurred and so that it should try its
> - * best to preserve the DRAM contents holding that buffer for recovery
> - * by the kernel as opposed to wiping out DRAM clean again.
> - *
> - * Reference: comment from Florian Fainelli, at
> - * https://lore.kernel.org/lkml/781cafb0-8d06-8b56-907a-5175c2da196a@xxxxxxxxx
> - */
> -static int brcmstb_pm_panic_notify(struct notifier_block *nb,
> - unsigned long action, void *data)
> -{
> - writel_relaxed(BRCMSTB_PANIC_MAGIC, ctrl.aon_sram + AON_REG_PANIC);
> -
> - return NOTIFY_DONE;
> [...]

Hi Florian, thanks for the clean-up!

I'm curious with the above panic notifier - is it not necessary when
PSCI is used?

Cheers,


Guilherme