[PATCH] xilinx: firmware: Move dcache handling directly to pmufw load config

Michal Simek monstr at monstr.eu
Mon Nov 29 13:55:58 CET 2021


čt 18. 11. 2021 v 13:00 odesílatel Michal Simek
<michal.simek at xilinx.com> napsal:
>
> Core function should make sure that data is stored properly that's why move
> cache operations directly to zynqmp_pmufw_load_config_object() to be able
> to call it from other functions.
>
> Signed-off-by: Michal Simek <michal.simek at xilinx.com>
> ---
>
>  board/xilinx/zynqmp/cmds.c         | 1 -
>  drivers/firmware/firmware-zynqmp.c | 3 +++
>  2 files changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/board/xilinx/zynqmp/cmds.c b/board/xilinx/zynqmp/cmds.c
> index b15c0f599bda..5a277c712f60 100644
> --- a/board/xilinx/zynqmp/cmds.c
> +++ b/board/xilinx/zynqmp/cmds.c
> @@ -211,7 +211,6 @@ static int do_zynqmp_pmufw(struct cmd_tbl *cmdtp, int flag, int argc,
>
>         addr = hextoul(argv[2], NULL);
>         size = hextoul(argv[3], NULL);
> -       flush_dcache_range((ulong)addr, (ulong)(addr + size));
>
>         zynqmp_pmufw_load_config_object((const void *)(uintptr_t)addr,
>                                         (size_t)size);
> diff --git a/drivers/firmware/firmware-zynqmp.c b/drivers/firmware/firmware-zynqmp.c
> index b44fede30799..aa20e33b4046 100644
> --- a/drivers/firmware/firmware-zynqmp.c
> +++ b/drivers/firmware/firmware-zynqmp.c
> @@ -6,6 +6,7 @@
>   */
>
>  #include <common.h>
> +#include <cpu_func.h>
>  #include <dm.h>
>  #include <log.h>
>  #include <zynqmp_firmware.h>
> @@ -99,6 +100,8 @@ void zynqmp_pmufw_load_config_object(const void *cfg_obj, size_t size)
>
>         printf("Loading new PMUFW cfg obj (%ld bytes)\n", size);
>
> +       flush_dcache_range((ulong)cfg_obj, (ulong)(cfg_obj + size));
> +
>         err = xilinx_pm_request(PM_SET_CONFIGURATION, (u32)(u64)cfg_obj, 0, 0,
>                                 0, ret_payload);
>         if (err == XST_PM_NO_ACCESS) {
> --
> 2.33.1
>

Applied.
M

-- 
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Xilinx Microblaze
Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs
U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal SoCs


More information about the U-Boot mailing list