Using the 'reboot edl' command in Linux, the platform can reboot to the
Emergency Download mode. Implement the same for U-Boot.

v6: * Add r-b Sumit
    * Wrap the new code inside CONFIG_SYSRESET_CMD_RESET_ARGS
    * Size change details
------------------------
qcom_qcs9100
------------------------
Building 2 commits for 1 boards (1 thread, 16 jobs per thread)
01: Merge tag 'u-boot-imx-master-20260117' of 
https://gitlab.denx.de/u-boot/custodians/u-boot-imx
07: qcom_defconfig: enable psci based sysreset
    2    0    0 /2              qcom_qcs9100
Completed: 2 total built, 2 newly), duration 0:00:25, rate 0.08
/tmp/qcom_qcs9100/tot/boards.cfg is up to date. Nothing to do.
Summary of 2 commits for 1 boards (1 thread, 16 jobs per thread)
01: Merge tag 'u-boot-imx-master-20260117' of 
https://gitlab.denx.de/u-boot/custodians/u-boot-imx
07: qcom_defconfig: enable psci based sysreset
   aarch64: (for 1/1 boards) all +145.0 data -40.0 rodata +89.0 text +96.0
            qcom_qcs9100   : all +145 data -40 rodata +89 text +96
               u-boot: add: 9/0, grow: 4/0 bytes: 656/0 (656)
                 function                                   old     new   delta
                 sysreset_walk_arg                            -     124    +124
                 _u_boot_list_2_driver_2_qcom_psci_sysreset       -     120    
+120
                 qcom_psci_sysreset_request_arg               -      84     +84
                 smc_call                                     -      68     +68
                 do_reset                                   100     160     +60
                 psci_system_reset2                           -      44     +44
                 psci_features                                -      44     +44
                 sysreset_request_arg                         -      32     +32
                 qcom_psci_sysreset_ops                       -      32     +32
                 psci_bind                                  188     212     +24
                 qcom_pshold_ops                             24      32      +8
                 qcom_psci_sysreset_get_status                -       8      +8
                 psci_sysreset_ops                           24      32      +8
(no errors to report)

------------------------
qemu_arm
------------------------
Building 2 commits for 1 boards (1 thread, 16 jobs per thread)
01: Merge tag 'u-boot-imx-master-20260117' of 
https://gitlab.denx.de/u-boot/custodians/u-boot-imx
07: qcom_defconfig: enable psci based sysreset
    2    0    0 /2              qemu_arm
Completed: 2 total built, 2 newly), duration 0:00:19, rate 0.11
/tmp/qemu_arm/tot/boards.cfg is up to date. Nothing to do.
Summary of 2 commits for 1 boards (1 thread, 16 jobs per thread)
01: Merge tag 'u-boot-imx-master-20260117' of 
https://gitlab.denx.de/u-boot/custodians/u-boot-imx
07: qcom_defconfig: enable psci based sysreset
(no errors to report)

------------------------
qemu_arm64
------------------------
Building 2 commits for 1 boards (1 thread, 16 jobs per thread)
01: Merge tag 'u-boot-imx-master-20260117' of 
https://gitlab.denx.de/u-boot/custodians/u-boot-imx
07: qcom_defconfig: enable psci based sysreset
    2    0    0 /2              qemu_arm64
Completed: 2 total built, 2 newly), duration 0:00:18, rate 0.11
/tmp/qemu_arm64/tot/boards.cfg is up to date. Nothing to do.
Summary of 2 commits for 1 boards (1 thread, 16 jobs per thread)
01: Merge tag 'u-boot-imx-master-20260117' of 
https://gitlab.denx.de/u-boot/custodians/u-boot-imx
07: qcom_defconfig: enable psci based sysreset
   aarch64: (for 1/1 boards) all +8.0 data +8.0
            qemu_arm64     : all +8 data +8
               u-boot: add: 0/0, grow: 1/0 bytes: 8/0 (8)
                 function                                   old     new   delta
                 psci_sysreset_ops                           24      32      +8
(no errors to report)

v5: * Update author and signed-off-by email id from quicinc.com to 
oss.qualcomm.com
    * Add r-b tags
    * Enable CONFIG_SYSRESET_QCOM_PSCI in qcom_defconfig instead of 
qcs9100_defconfig

v4: * Update documentation about '-edl' option
    * Add API to check for support of PSCI functions
    * Check if RESET2 is supported before issuing the command
    * Fix compiler warnings

v3: * Introduce a sysreset op that will pass down the 'reset' command
      arguments to registered handlers
    * Handle 'reset to edl' alone in qcom-psci driver

v2: * Rebased to recent sources
    * Dropped the first patch as it is not applicable anymore
    * Bind the new driver from psci driver

Varadarajan Narayanan (5):
  arm: psci: Add API to check for support of specific PSCI function
  drivers: sysreset: Add sysreset op that can take arguments
  sysreset: Implement PSCI based reset to EDL mode for QCOM SoCs
  cmd: boot: Add '-edl' option to reset command documentation
  qcom_defconfig: enable psci based sysreset

 arch/arm/cpu/armv8/fwcall.c           | 15 +++++++++
 arch/arm/include/asm/system.h         |  1 +
 cmd/boot.c                            |  3 ++
 configs/qcom_defconfig                |  2 ++
 doc/usage/cmd/reset.rst               |  2 ++
 drivers/firmware/psci.c               |  4 +++
 drivers/sysreset/Kconfig              | 14 +++++++++
 drivers/sysreset/Makefile             |  1 +
 drivers/sysreset/sysreset-uclass.c    | 37 ++++++++++++++++++++++
 drivers/sysreset/sysreset_qcom-psci.c | 45 +++++++++++++++++++++++++++
 include/sysreset.h                    | 18 +++++++++++
 11 files changed, 142 insertions(+)
 create mode 100644 drivers/sysreset/sysreset_qcom-psci.c

--
2.34.1

Reply via email to