From: Jan Kiszka <[email protected]> Those two are needed in order to boot 5.10 which switched to clock management via firmware.
Signed-off-by: Jan Kiszka <[email protected]> --- ...-errors-related-to-clock-gate-permis.patch | 45 ++++++++++++ ...-error-codes-to-match-Linux-and-PMU-.patch | 71 +++++++++++++++++++ .../trusted-firmware-a-ultra96_2.4.bb | 5 ++ 3 files changed, 121 insertions(+) create mode 100644 recipes-bsp/trusted-firmware-a/files/0001-zynqmp-pm-Filter-errors-related-to-clock-gate-permis.patch create mode 100644 recipes-bsp/trusted-firmware-a/files/0002-zynqmp-pm-update-error-codes-to-match-Linux-and-PMU-.patch diff --git a/recipes-bsp/trusted-firmware-a/files/0001-zynqmp-pm-Filter-errors-related-to-clock-gate-permis.patch b/recipes-bsp/trusted-firmware-a/files/0001-zynqmp-pm-Filter-errors-related-to-clock-gate-permis.patch new file mode 100644 index 0000000..0c4dc0b --- /dev/null +++ b/recipes-bsp/trusted-firmware-a/files/0001-zynqmp-pm-Filter-errors-related-to-clock-gate-permis.patch @@ -0,0 +1,45 @@ +From e85c1473dc49acb2feb2d552c9a1bad99e2477ca Mon Sep 17 00:00:00 2001 +From: Mirela Simonovic <[email protected]> +Date: Fri, 24 Aug 2018 17:09:07 +0200 +Subject: [PATCH 1/2] zynqmp: pm: Filter errors related to clock gate + permissions + +Linux clock framework cannot properly deal with these errors. When the +error is related to the lack of permissions to control the clock we +filter the error and report the success to linux. Before recent changes +in clock framework across the stack, this was done in the PMU-FW as a +workaround. Since the PMU-FW now handles clocks and the permissions to +control them using general principles rather than workarounds, it can +no longer distinguish such exceptions and it has to return no-access +error. + +Signed-off-by: Mirela Simonovic <[email protected]> +Acked-by: Will Wong <[email protected]> +Signed-off-by: Michal Simek <[email protected]> +Change-Id: I1491a80e472f44e322a542b29a20eb1cb3319802 +--- + plat/xilinx/zynqmp/pm_service/pm_api_sys.c | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/plat/xilinx/zynqmp/pm_service/pm_api_sys.c b/plat/xilinx/zynqmp/pm_service/pm_api_sys.c +index b1720d9f6..cd9d597bf 100644 +--- a/plat/xilinx/zynqmp/pm_service/pm_api_sys.c ++++ b/plat/xilinx/zynqmp/pm_service/pm_api_sys.c +@@ -907,7 +907,13 @@ static enum pm_ret_status pm_clock_gate(unsigned int clock_id, + + /* Send request to the PMU */ + PM_PACK_PAYLOAD2(payload, api_id, clock_id); +- return pm_ipi_send_sync(primary_proc, payload, NULL, 0); ++ status = pm_ipi_send_sync(primary_proc, payload, NULL, 0); ++ ++ /* If action fails due to the lack of permissions filter the error */ ++ if (status == PM_RET_ERROR_ACCESS) ++ status = PM_RET_SUCCESS; ++ ++ return status; + } + + /** +-- +2.26.2 + diff --git a/recipes-bsp/trusted-firmware-a/files/0002-zynqmp-pm-update-error-codes-to-match-Linux-and-PMU-.patch b/recipes-bsp/trusted-firmware-a/files/0002-zynqmp-pm-update-error-codes-to-match-Linux-and-PMU-.patch new file mode 100644 index 0000000..52fd942 --- /dev/null +++ b/recipes-bsp/trusted-firmware-a/files/0002-zynqmp-pm-update-error-codes-to-match-Linux-and-PMU-.patch @@ -0,0 +1,71 @@ +From 25308b199ee9bd7ba150f9482c2fc5dab4b557a3 Mon Sep 17 00:00:00 2001 +From: Davorin Mista <[email protected]> +Date: Fri, 24 Aug 2018 17:09:06 +0200 +Subject: [PATCH 2/2] zynqmp: pm: update error codes to match Linux and PMU + Firmware + +All EEMI error codes start with value 2000. + +Note: Legacy error codes ARGS (=1) and NOTSUPPORTED (=4) returned by +current ATF code have been left in place. + +Signed-off-by: Davorin Mista <[email protected]> +Acked-by: Will Wong <[email protected]> +Signed-off-by: Michal Simek <[email protected]> +Change-Id: I939afa85957cac88025d82a80f9f6dd49be993b6 +--- + plat/xilinx/zynqmp/pm_service/pm_defs.h | 33 ++++++++++++++----------- + 1 file changed, 18 insertions(+), 15 deletions(-) + +diff --git a/plat/xilinx/zynqmp/pm_service/pm_defs.h b/plat/xilinx/zynqmp/pm_service/pm_defs.h +index cae36c9d8..4776d424b 100644 +--- a/plat/xilinx/zynqmp/pm_service/pm_defs.h ++++ b/plat/xilinx/zynqmp/pm_service/pm_defs.h +@@ -215,26 +215,29 @@ enum pm_opchar_type { + + /** + * @PM_RET_SUCCESS: success +- * @PM_RET_ERROR_ARGS: illegal arguments provided ++ * @PM_RET_ERROR_ARGS: illegal arguments provided (deprecated) ++ * @PM_RET_ERROR_NOTSUPPORTED: feature not supported (deprecated) ++ * @PM_RET_ERROR_INTERNAL: internal error ++ * @PM_RET_ERROR_CONFLICT: conflict + * @PM_RET_ERROR_ACCESS: access rights violation ++ * @PM_RET_ERROR_INVALID_NODE: invalid node ++ * @PM_RET_ERROR_DOUBLE_REQ: duplicate request for same node ++ * @PM_RET_ERROR_ABORT_SUSPEND: suspend procedure has been aborted + * @PM_RET_ERROR_TIMEOUT: timeout in communication with PMU +- * @PM_RET_ERROR_NOTSUPPORTED: feature not supported +- * @PM_RET_ERROR_PROC: node is not a processor node +- * @PM_RET_ERROR_API_ID: illegal API ID +- * @PM_RET_ERROR_OTHER: other error ++ * @PM_RET_ERROR_NODE_USED: node is already in use + */ + enum pm_ret_status { + PM_RET_SUCCESS, +- PM_RET_ERROR_ARGS, +- PM_RET_ERROR_ACCESS, +- PM_RET_ERROR_TIMEOUT, +- PM_RET_ERROR_NOTSUPPORTED, +- PM_RET_ERROR_PROC, +- PM_RET_ERROR_API_ID, +- PM_RET_ERROR_FAILURE, +- PM_RET_ERROR_COMMUNIC, +- PM_RET_ERROR_DOUBLEREQ, +- PM_RET_ERROR_OTHER, ++ PM_RET_ERROR_ARGS = 1, ++ PM_RET_ERROR_NOTSUPPORTED = 4, ++ PM_RET_ERROR_INTERNAL = 2000, ++ PM_RET_ERROR_CONFLICT = 2001, ++ PM_RET_ERROR_ACCESS = 2002, ++ PM_RET_ERROR_INVALID_NODE = 2003, ++ PM_RET_ERROR_DOUBLE_REQ = 2004, ++ PM_RET_ERROR_ABORT_SUSPEND = 2005, ++ PM_RET_ERROR_TIMEOUT = 2006, ++ PM_RET_ERROR_NODE_USED = 2007 + }; + + /** +-- +2.26.2 + diff --git a/recipes-bsp/trusted-firmware-a/trusted-firmware-a-ultra96_2.4.bb b/recipes-bsp/trusted-firmware-a/trusted-firmware-a-ultra96_2.4.bb index d4fac2c..5d82d0a 100644 --- a/recipes-bsp/trusted-firmware-a/trusted-firmware-a-ultra96_2.4.bb +++ b/recipes-bsp/trusted-firmware-a/trusted-firmware-a-ultra96_2.4.bb @@ -11,6 +11,11 @@ require trusted-firmware-a_${PV}.inc +SRC_URI += " \ + file://0001-zynqmp-pm-Filter-errors-related-to-clock-gate-permis.patch \ + file://0002-zynqmp-pm-update-error-codes-to-match-Linux-and-PMU-.patch \ + " + TF_A_NAME = "ultra96" TF_A_PLATFORM = "zynqmp" TF_A_EXTRA_BUILDARGS = "RESET_TO_BL31=1 ZYNQMP_CONSOLE=cadence1" -- 2.26.2 -- You received this message because you are subscribed to the Google Groups "Jailhouse" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jailhouse-dev/130971a3270ce09a3c6019f0b898dcaccbf0234c.1618866389.git.jan.kiszka%40siemens.com.
