diff mbox series

[v2,6/8] mach-snapdragon: use SYSRESET_PSCI

Message ID 20240527-b4-qcom-capsule-updates-v2-6-47583d7ad428@linaro.org
State Superseded
Headers show
Series qcom: implement capsule updates | expand

Commit Message

Caleb Connolly May 27, 2024, 5:17 p.m. UTC
Capsule updates depend on SYSRESET, which we currently don't select but
instead use a custom reset_cpu() implementation which just calls
psci_reset().

Clean this up, drop our custom function and require PSCI reset.

There are some Qualcomm platforms that either can or do run without PSCI
support, but we didn't handle these properly before anyway.

Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
---
 arch/arm/Kconfig                 | 2 ++
 arch/arm/mach-snapdragon/board.c | 5 -----
 2 files changed, 2 insertions(+), 5 deletions(-)

Comments

Neil Armstrong May 28, 2024, 8:04 a.m. UTC | #1
On 27/05/2024 19:17, Caleb Connolly wrote:
> Capsule updates depend on SYSRESET, which we currently don't select but
> instead use a custom reset_cpu() implementation which just calls
> psci_reset().
> 
> Clean this up, drop our custom function and require PSCI reset.
> 
> There are some Qualcomm platforms that either can or do run without PSCI
> support, but we didn't handle these properly before anyway.
> 
> Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
> ---
>   arch/arm/Kconfig                 | 2 ++
>   arch/arm/mach-snapdragon/board.c | 5 -----
>   2 files changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index 39ad03acd2e4..0d5161358e33 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -1084,8 +1084,10 @@ config ARCH_SNAPDRAGON
>   	select OF_CONTROL
>   	select OF_SEPARATE
>   	select SMEM
>   	select SPMI
> +	select SYSRESET
> +	select SYSRESET_PSCI
>   	select BOARD_LATE_INIT
>   	select OF_BOARD
>   	select SAVE_PREV_BL_FDT_ADDR
>   	select LINUX_KERNEL_IMAGE_HEADER if !ENABLE_ARM_SOC_BOOT0_HOOK
> diff --git a/arch/arm/mach-snapdragon/board.c b/arch/arm/mach-snapdragon/board.c
> index c4a3394706e6..b0d9a65bb8f5 100644
> --- a/arch/arm/mach-snapdragon/board.c
> +++ b/arch/arm/mach-snapdragon/board.c
> @@ -106,13 +106,8 @@ void *board_fdt_blob_setup(int *err)
>   
>   	return (void *)fdt;
>   }
>   
> -void reset_cpu(void)
> -{
> -	psci_system_reset();
> -}
> -
>   /*
>    * Some Qualcomm boards require GPIO configuration when switching USB modes.
>    * Support setting this configuration via pinctrl state.
>    */
> 

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Ilias Apalodimas May 28, 2024, 8:28 a.m. UTC | #2
On Mon, 27 May 2024 at 20:17, Caleb Connolly <caleb.connolly@linaro.org> wrote:
>
> Capsule updates depend on SYSRESET, which we currently don't select but
> instead use a custom reset_cpu() implementation which just calls
> psci_reset().
>
> Clean this up, drop our custom function and require PSCI reset.
>
> There are some Qualcomm platforms that either can or do run without PSCI
> support, but we didn't handle these properly before anyway.
>
> Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
> ---
>  arch/arm/Kconfig                 | 2 ++
>  arch/arm/mach-snapdragon/board.c | 5 -----
>  2 files changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index 39ad03acd2e4..0d5161358e33 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -1084,8 +1084,10 @@ config ARCH_SNAPDRAGON
>         select OF_CONTROL
>         select OF_SEPARATE
>         select SMEM
>         select SPMI
> +       select SYSRESET
> +       select SYSRESET_PSCI
>         select BOARD_LATE_INIT
>         select OF_BOARD
>         select SAVE_PREV_BL_FDT_ADDR
>         select LINUX_KERNEL_IMAGE_HEADER if !ENABLE_ARM_SOC_BOOT0_HOOK
> diff --git a/arch/arm/mach-snapdragon/board.c b/arch/arm/mach-snapdragon/board.c
> index c4a3394706e6..b0d9a65bb8f5 100644
> --- a/arch/arm/mach-snapdragon/board.c
> +++ b/arch/arm/mach-snapdragon/board.c
> @@ -106,13 +106,8 @@ void *board_fdt_blob_setup(int *err)
>
>         return (void *)fdt;
>  }
>
> -void reset_cpu(void)
> -{
> -       psci_system_reset();
> -}
> -
>  /*
>   * Some Qualcomm boards require GPIO configuration when switching USB modes.
>   * Support setting this configuration via pinctrl state.
>   */
>
> --
> 2.45.0
>

Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
diff mbox series

Patch

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 39ad03acd2e4..0d5161358e33 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1084,8 +1084,10 @@  config ARCH_SNAPDRAGON
 	select OF_CONTROL
 	select OF_SEPARATE
 	select SMEM
 	select SPMI
+	select SYSRESET
+	select SYSRESET_PSCI
 	select BOARD_LATE_INIT
 	select OF_BOARD
 	select SAVE_PREV_BL_FDT_ADDR
 	select LINUX_KERNEL_IMAGE_HEADER if !ENABLE_ARM_SOC_BOOT0_HOOK
diff --git a/arch/arm/mach-snapdragon/board.c b/arch/arm/mach-snapdragon/board.c
index c4a3394706e6..b0d9a65bb8f5 100644
--- a/arch/arm/mach-snapdragon/board.c
+++ b/arch/arm/mach-snapdragon/board.c
@@ -106,13 +106,8 @@  void *board_fdt_blob_setup(int *err)
 
 	return (void *)fdt;
 }
 
-void reset_cpu(void)
-{
-	psci_system_reset();
-}
-
 /*
  * Some Qualcomm boards require GPIO configuration when switching USB modes.
  * Support setting this configuration via pinctrl state.
  */