public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: "Jorge Ramirez-Ortiz, Foundries" <jorge@foundries.io>
To: Jorge Ramirez-Ortiz <jorge@foundries.io>
Cc: michal.simek@xilinx.com, t.karthik.reddy@xilinx.com,
	ashok.reddy.soma@xilinx.com, adrian.fiergolski@fastree3d.com,
	igor.opaniuk@foundries.io, ricardo@foundries.io,
	u-boot@lists.denx.de
Subject: Re: [PATCH] arm64: zynqmp: enable the PMUFW watchdog
Date: Wed, 23 Mar 2022 15:27:46 +0100	[thread overview]
Message-ID: <20220323142746.GA1093552@trex> (raw)
In-Reply-To: <20220323140458.1087767-1-jorge@foundries.io>

On 23/03/22, Jorge Ramirez-Ortiz wrote:
> From 528b3117a36b7b4eea1839afbea7191d60638b0c Mon Sep 17 00:00:00 2001
> From: Jorge Ramirez-Ortiz <jorge@foundries.io>
> Date: Wed, 23 Mar 2022 14:41:15 +0100
> Subject: [PATCH] arm64: zynqmp: enable the PMUFW watchdog

um, seems my sendpatch script is a bit off.
please let me know if I should send a v2.

> 
> If the PMUFW was built with support for the CSU watchdog we must let the
> firmware know that it can be started.
> 
> We do this by faking the FSBL done state.
> 
> Reference code in PMUFW:
> https://github.com/Xilinx/embeddedsw/blob/master/lib/sw_apps/zynqmp_pmufw/src/xpfw_mod_common.c#L36
> 
> It needs this fix on the PMUFW
> https://github.com/Xilinx/embeddedsw/pull/190
> 
> Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io>
> ---
>  arch/arm/mach-zynqmp/include/mach/hardware.h | 5 ++++-
>  board/xilinx/zynqmp/zynqmp.c                 | 4 ++++
>  2 files changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/mach-zynqmp/include/mach/hardware.h b/arch/arm/mach-zynqmp/include/mach/hardware.h
> index a70d6d611b..24c3ef3d7d 100644
> --- a/arch/arm/mach-zynqmp/include/mach/hardware.h
> +++ b/arch/arm/mach-zynqmp/include/mach/hardware.h
> @@ -174,8 +174,11 @@ struct csu_regs {
>  
>  #define ZYNQMP_PMU_BASEADDR	0xFFD80000
>  
> +#define FSBL_COMPLETION	0x1
> +
>  struct pmu_regs {
> -	u32 reserved[18];
> +	u32 reserved[17];
> +	u32 gen_storage5; /* 0x44 */
>  	u32 gen_storage6; /* 0x48 */
>  };
>  
> diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c
> index 70b3c81f12..c88c5fb8ea 100644
> --- a/board/xilinx/zynqmp/zynqmp.c
> +++ b/board/xilinx/zynqmp/zynqmp.c
> @@ -419,6 +419,10 @@ int board_init(void)
>  						zynqmp_pm_cfg_obj_size);
>  	printf("Silicon version:\t%d\n", zynqmp_get_silicon_version());
>  
> +	/* fake FSBL completion to start the PMUFW watchdog when enabled */
> +	writel(readl(&pmu_base->gen_storage5) | FSBL_COMPLETION,
> +	       &pmu_base->gen_storage5);
> +
>  	/* the CSU disables the JTAG interface when secure boot is enabled */
>  	if (CONFIG_IS_ENABLED(ZYNQMP_RESTORE_JTAG))
>  		restore_jtag();
> -- 
> 2.34.1
> 

  reply	other threads:[~2022-03-23 14:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-23 14:04 [PATCH] arm64: zynqmp: enable the PMUFW watchdog Jorge Ramirez-Ortiz
2022-03-23 14:27 ` Jorge Ramirez-Ortiz, Foundries [this message]
2022-03-24  9:47 ` Michal Simek
2022-03-24 21:03   ` Jorge Ramirez-Ortiz, Foundries
2022-03-25  7:16     ` Michal Simek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220323142746.GA1093552@trex \
    --to=jorge@foundries.io \
    --cc=adrian.fiergolski@fastree3d.com \
    --cc=ashok.reddy.soma@xilinx.com \
    --cc=igor.opaniuk@foundries.io \
    --cc=michal.simek@xilinx.com \
    --cc=ricardo@foundries.io \
    --cc=t.karthik.reddy@xilinx.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox