Merge pull request #6650 from jernejsk/atf

atf: update to v2.7
This commit is contained in:
CvH 2022-06-26 15:52:43 +02:00 committed by GitHub
commit 17f7264160
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 98 deletions

View File

@ -2,8 +2,8 @@
# Copyright (C) 2018-present Team LibreELEC
PKG_NAME="atf"
PKG_VERSION="2.4"
PKG_SHA256="4bfda9fdbe5022f2e88ad3344165f7d38a8ae4a0e2d91d44d9a1603425cc642d"
PKG_VERSION="2.7"
PKG_SHA256="327c65b1bc231608a7a808b068b00c1a22310e9fc86158813cd10a9711d5725e"
PKG_ARCH="arm aarch64"
PKG_LICENSE="BSD-3c"
PKG_SITE="https://github.com/ARM-software/arm-trusted-firmware"

View File

@ -5,22 +5,18 @@ Subject: [PATCH] sunxi: Don't enable referenced regulators
This break certain devices which need appropriate power on sequence.
---
drivers/allwinner/axp/common.c | 2 --
1 file changed, 2 deletions(-)
drivers/allwinner/axp/common.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/allwinner/axp/common.c b/drivers/allwinner/axp/common.c
index e98b16fdb2ec..45c6507e0e23 100644
--- a/drivers/allwinner/axp/common.c
+++ b/drivers/allwinner/axp/common.c
@@ -98,8 +98,6 @@ static int setup_regulator(const void *fdt, int node,
static bool should_enable_regulator(const void *fdt, int node)
{
- if (fdt_getprop(fdt, node, "phandle", NULL) != NULL)
- return true;
if (fdt_getprop(fdt, node, "regulator-always-on", NULL) != NULL)
return true;
@@ -112,9 +112,6 @@ static bool should_enable_regulator(const void *fdt,
if (is_node_disabled(fdt, node)) {
return false;
--
2.30.0
}
- if (fdt_getprop(fdt, node, "phandle", NULL) != NULL) {
- return true;
- }
if (fdt_getprop(fdt, node, "regulator-always-on", NULL) != NULL) {
return true;
}

View File

@ -1,82 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Sat, 16 Jan 2021 01:58:22 -0600
Subject: [PATCH] allwinner: psci: Improve system shutdown/reset sequence
- When the SCPI shutdown/reset command returns success, the SCPI
implementation is still waiting for the CPU to enter WFI. Do that.
- Peform board-level poweroff before CPU poweroff. If there is a PMIC
available, it will turn everything off including the CPUs, so doing
CPU poweroff first is a waste of cycles.
- During poweroff, attempt to turn off the local CPU using the ARISC.
This should use slightly less power than just an infinite WFI.
- Drop the WFI in the reset failure path. The panic will hang anyway.
Change-Id: I897efecb3fe4e77a56041b97dd273156ec51ef8e
Signed-off-by: Samuel Holland <samuel@sholland.org>
---
plat/allwinner/common/sunxi_pm.c | 26 ++++++++++++++++----------
1 file changed, 16 insertions(+), 10 deletions(-)
diff --git a/plat/allwinner/common/sunxi_pm.c b/plat/allwinner/common/sunxi_pm.c
index 03985f40be55..038f2b7edb2f 100644
--- a/plat/allwinner/common/sunxi_pm.c
+++ b/plat/allwinner/common/sunxi_pm.c
@@ -125,24 +125,29 @@ static void sunxi_pwr_domain_on_finish(const psci_power_state_t *target_state)
static void __dead2 sunxi_system_off(void)
{
+ u_register_t mpidr = read_mpidr();
+
gicv2_cpuif_disable();
if (scpi_available) {
/* Send the power down request to the SCP */
uint32_t ret = scpi_sys_power_state(scpi_system_shutdown);
- if (ret != SCP_OK)
- ERROR("PSCI: SCPI %s failed: %d\n", "shutdown", ret);
+ if (ret == SCP_OK)
+ wfi();
+
+ ERROR("PSCI: SCPI %s failed: %d\n", "shutdown", ret);
}
- /* Turn off all secondary CPUs */
- sunxi_disable_secondary_cpus(read_mpidr());
-
+ /* Attempt to power down the board (may not return) */
sunxi_power_down();
- udelay(1000);
+ /* Turn off all CPUs */
+ sunxi_disable_secondary_cpus(mpidr);
+ sunxi_cpu_off(mpidr);
+ wfi();
+
ERROR("PSCI: Cannot turn off system, halting\n");
- wfi();
panic();
}
@@ -154,8 +159,10 @@ static void __dead2 sunxi_system_reset(void)
/* Send the system reset request to the SCP */
uint32_t ret = scpi_sys_power_state(scpi_system_reboot);
- if (ret != SCP_OK)
- ERROR("PSCI: SCPI %s failed: %d\n", "reboot", ret);
+ if (ret == SCP_OK)
+ wfi();
+
+ ERROR("PSCI: SCPI %s failed: %d\n", "reboot", ret);
}
/* Reset the whole system when the watchdog times out */
@@ -166,7 +173,6 @@ static void __dead2 sunxi_system_reset(void)
mdelay(1000);
ERROR("PSCI: System reset failed\n");
- wfi();
panic();
}