soc: bcm: brcmstb: Remove bare-metal ARM suspend/resume code
PATCH 1/1 soc: bcm: brcmstb: Remove bare-metal ARM suspend/resume code
Since 2018 these platforms have supported entry via the ARM Trusted Firmware using the standard PSCI SYSTEM_SUSPEND function calls. Remove this legacy code.
--- drivers/soc/bcm/brcmstb/Kconfig | 4 +- drivers/soc/bcm/brcmstb/pm/Makefile | 1 - drivers/soc/bcm/brcmstb/pm/aon_defs.h | 105 ---- drivers/soc/bcm/brcmstb/pm/pm-arm.c | 874 -------------------------- drivers/soc/bcm/brcmstb/pm/s2-arm.S | 69 -- 5 files changed, 1 insertion(+), 1052 deletions(-) delete mode 100644 drivers/soc/bcm/brcmstb/pm/aon_defs.h delete mode 100644 drivers/soc/bcm/brcmstb/pm/pm-arm.c delete mode 100644 drivers/soc/bcm/brcmstb/pm/s2-arm.S
drivers/soc/bcm/brcmstb/Kconfig +1 -3
@@ -4,8 +4,6 @@ if SOC_BRCMSTB config BRCMSTB_PM bool "Support suspend/resume for STB platforms" default y - depends on PM - depends on ARCH_BRCMSTB || BMIPS_GENERIC - select ARM_CPU_SUSPEND if ARM + depends on PM && BMIPS_GENERIC endif # SOC_BRCMSTB
drivers/soc/bcm/brcmstb/pm/Makefile +0 -1
@@ -1,3 +1,2 @@ # SPDX-License-Identifier: GPL-2.0-only -obj-$(CONFIG_ARM) += s2-arm.o pm-arm.o obj-$(CONFIG_BMIPS_GENERIC) += s2-mips.o s3-mips.o pm-mips.o
drivers/soc/bcm/brcmstb/pm/aon_defs.h deleted +0 -105
105 lines not on this page · raw message
drivers/soc/bcm/brcmstb/pm/pm-arm.c deleted +0 -874
874 lines not on this page · raw message
drivers/soc/bcm/brcmstb/pm/s2-arm.S deleted +0 -69
69 lines not on this page · raw message
Signature · 1 line
2.34.1
Quoted 17 lines · Florian Fainelli
Since 2018 these platforms have supported entry via the ARM Trusted Firmware using the standard PSCI
SYSTEM_SUSPENDfunction calls. Remove this legacy code.Signed-off-by Florian Fainelli <[email protected]>[...]drivers/soc/bcm/brcmstb/pm/pm-arm.c deleted +0
-11-/* -* 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. -*
drivers/soc/bcm/brcmstb/pm/pm-arm.c line 685
Quoted 10 lines
drivers/soc/bcm/brcmstb/pm/pm-arm.c deleted +0
-9-* Reference: comment from Florian Fainelli, at -* https://lore.kernel.org/lkml/[email protected] -*/ -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
Quoted 31 lines · Guilherme G. Piccoli
Quoted 17 lines · Florian Fainelli
Since 2018 these platforms have supported entry via the ARM Trusted Firmware using the standard PSCI
SYSTEM_SUSPENDfunction calls. Remove this legacy code.Signed-off-by Florian Fainelli <[email protected]>[...]drivers/soc/bcm/brcmstb/pm/pm-arm.c deleted +0
-11-/* -* 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. -* drivers/soc/bcm/brcmstb/pm/pm-arm.c line 685
Quoted 10 lines
drivers/soc/bcm/brcmstb/pm/pm-arm.c deleted +0
-9-* Reference: comment from Florian Fainelli, at -* https://lore.kernel.org/lkml/[email protected] -*/ -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!
Quoted 2 lines
I'm curious with the above panic notifier - is it not necessary when PSCI is used?
This is a bit of long story, but no, it is not necessary.
Signature · 1 line
Florian
Quoted 11 lines · Florian Fainelli
[...]
Quoted 10 lines
drivers/soc/bcm/brcmstb/pm/pm-arm.c line 685
Quoted 7 lines
drivers/soc/bcm/brcmstb/pm/pm-arm.c deleted +0
-6-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!
Quoted 4 lines
Quoted 2 lines
I'm curious with the above panic notifier - is it not necessary when PSCI is used?
This is a bit of long story, but no, it is not necessary.
OK then heh
Glad for the clean-up!
Florian Fainelli
AppliedQuoted 6 lines · Florian Fainelli
Since 2018 these platforms have supported entry via the ARM Trusted Firmware using the standard PSCI
SYSTEM_SUSPENDfunction calls. Remove this legacy code.Signed-off-by Florian Fainelli <[email protected]>---
Applied to https://github.com/Broadcom/stblinux/commits/drivers/next, thanks! --
Florian