soc: bcm: brcmstb: fix ARM build errors
PATCH v2 1/1 soc: bcm: brcmstb: fix ARM build errors
When building the new PM driver on older ARM architectures, we can run into one of two build errors:
drivers/soc/bcm/brcmstb/pm/pm-arm.c: In function 'brcmstb_do_pmsm_power_down':drivers/soc/bcm/brcmstb/pm/pm-arm.c:334:2: error: implicit declaration of function 'wfi' [-Werror=implicit-function-declaration]
drivers/soc/bcm/brcmstb/pm/pm-arm.o: In function `brcmstb_pm_s3_finish':
pm-arm.c:(.text+0x860): undefined reference to `cpu_resume'
The first one requires at least ARMv6K, the second one requires the CPU suspend/resume logic which is not available on some of the older CPUs, and needs to be selected explicitly.
This adds the extra Kconfig statements to enforce this, limiting compilation on ARM to the STB platform that is guaranteed to be ARMv7. We could enable compile-testing for other ARMv7 platforms, but there seems to be little value as an allmodconfig kernel already includes it.
---
v2: change Makefile as well
--- drivers/soc/bcm/brcmstb/Kconfig | 3 ++- drivers/soc/bcm/brcmstb/Makefile | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-)
drivers/soc/bcm/brcmstb/Kconfig +2 -1
@@ -4,6 +4,7 @@ config BRCMSTB_PM bool "Support suspend/resume for STB platforms" default y depends on PM - depends on ARM || BMIPS_GENERIC + depends on ARCH_BRCMSTB || BMIPS_GENERIC + select ARM_CPU_SUSPEND if ARM endif # SOC_BRCMSTB
drivers/soc/bcm/brcmstb/Makefile +1 -1
@@ -1,2 +1,2 @@ obj-y += common.o biuctrl.o -obj-y += pm/ +obj-$(CONFIG_BRCMSTB_PM) += pm/
Signature · 1 line
2.9.0
Quoted 13 lines · Arnd Bergmann
When building the new PM driver on older ARM architectures, we can run into one of two build errors:
drivers/soc/bcm/brcmstb/pm/pm-arm.c: In function 'brcmstb_do_pmsm_power_down':drivers/soc/bcm/brcmstb/pm/pm-arm.c:334:2: error: implicit declaration of function 'wfi' [-Werror=implicit-function-declaration]
drivers/soc/bcm/brcmstb/pm/pm-arm.o: In function `brcmstb_pm_s3_finish':
pm-arm.c:(.text+0x860): undefined reference to `cpu_resume'The first one requires at least ARMv6K, the second one requires the CPU suspend/resume logic which is not available on some of the older CPUs, and needs to be selected explicitly.
Quoted 5 lines
This adds the extra
Kconfigstatements to enforce this, limiting compilation on ARM to the STB platform that is guaranteed to be ARMv7. We could enable compile-testing for other ARMv7 platforms, but there seems to be little value as an allmodconfig kernel already includes it.
Thanks, can you pick that change directly and/or fold it in:
6274ca43eba1b2ebcac96f3c9b41fbc4945c0af0 ("soc: bcm: brcmstb: Add support for S2/S3/S5 suspend states (ARM)")?
Thanks!
Quoted 32 lines
Acked-by Florian Fainelli <[email protected]>Signed-off-by Arnd Bergmann <[email protected]>---
v2: changeMakefileas well--- drivers/soc/bcm/brcmstb/Kconfig | 3 ++- drivers/soc/bcm/brcmstb/Makefile | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-)drivers/soc/bcm/brcmstb/Kconfig +2
-1@@ -4,6 +4,7 @@ config BRCMSTB_PM bool "Support suspend/resume for STB platforms" default y depends on PM - depends on ARM || BMIPS_GENERIC + depends on ARCH_BRCMSTB || BMIPS_GENERIC + select ARM_CPU_SUSPEND if ARM endif # SOC_BRCMSTBdrivers/soc/bcm/brcmstb/Makefile +1
-1@@ -1,2 +1,2 @@ obj-y += common.o biuctrl.o -obj-y += pm/ +obj-$(CONFIG_BRCMSTB_PM) += pm/
Signature · 1 line
Florian
Quoted 20 lines · Florian Fainelli
Quoted 13 lines · Arnd Bergmann
When building the new PM driver on older ARM architectures, we can run into one of two build errors:
drivers/soc/bcm/brcmstb/pm/pm-arm.c: In function 'brcmstb_do_pmsm_power_down':drivers/soc/bcm/brcmstb/pm/pm-arm.c:334:2: error: implicit declaration of function 'wfi' [-Werror=implicit-function-declaration]
drivers/soc/bcm/brcmstb/pm/pm-arm.o: In function `brcmstb_pm_s3_finish':
pm-arm.c:(.text+0x860): undefined reference to `cpu_resume'The first one requires at least ARMv6K, the second one requires the CPU suspend/resume logic which is not available on some of the older CPUs, and needs to be selected explicitly.
Quoted 5 lines
This adds the extra
Kconfigstatements to enforce this, limiting compilation on ARM to the STB platform that is guaranteed to be ARMv7. We could enable compile-testing for other ARMv7 platforms, but there seems to be little value as an allmodconfig kernel already includes it.
Quoted 4 lines
Thanks, can you pick that change directly and/or fold it in:
6274ca43eba1b2ebcac96f3c9b41fbc4945c0af0("soc: bcm: brcmstb: Add support for S2/S3/S5 suspend states (ARM)")?
Picked this up in drivers/next, and squashed this change into the original commit, this is what it looks like now:
https://github.com/Broadcom/stblinux/commit/6274ca43eba1b2ebcac96f3c9b41fbc4945c0af0
Thanks Arnd!
Signature · 2 lines
-- Florian