public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Patrick Wildt <patrick@blueri.se>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/3] mach-imx: Adding new argument for SIP call interface
Date: Mon, 21 Oct 2019 19:12:08 +0200	[thread overview]
Message-ID: <20191021171208.GA8059@nox.fritz.box> (raw)
In-Reply-To: <20191021155851.16483-1-agust@denx.de>

On Mon, Oct 21, 2019 at 05:58:49PM +0200, Anatolij Gustschin wrote:
> From: Ye Li <ye.li@nxp.com>
> 
> Need to pass total 5 arguments for SIP HAB call on i.MX8MQ,
> so update the interface to add new argument.
> 
> Signed-off-by: Ye Li <ye.li@nxp.com>
> ---
>  arch/arm/include/asm/mach-imx/sys_proto.h | 3 ++-
>  arch/arm/mach-imx/imx_bootaux.c           | 4 ++--
>  arch/arm/mach-imx/sip.c                   | 4 +++-
>  drivers/misc/imx8/fuse.c                  | 2 +-
>  4 files changed, 8 insertions(+), 5 deletions(-)
> 
> diff --git a/arch/arm/include/asm/mach-imx/sys_proto.h b/arch/arm/include/asm/mach-imx/sys_proto.h
> index aa66fdc88f..139a7638c1 100644
> --- a/arch/arm/include/asm/mach-imx/sys_proto.h
> +++ b/arch/arm/include/asm/mach-imx/sys_proto.h
> @@ -143,7 +143,8 @@ int mxs_wait_mask_set(struct mxs_register_32 *reg, u32 mask, u32 timeout);
>  int mxs_wait_mask_clr(struct mxs_register_32 *reg, u32 mask, u32 timeout);
>  
>  unsigned long call_imx_sip(unsigned long id, unsigned long reg0,
> -			   unsigned long reg1, unsigned long reg2);
> +			   unsigned long reg1, unsigned long reg2,
> +			   unsigned long reg3);
>  unsigned long call_imx_sip_ret2(unsigned long id, unsigned long reg0,
>  				unsigned long *reg1, unsigned long reg2,
>  				unsigned long reg3);
> diff --git a/arch/arm/mach-imx/imx_bootaux.c b/arch/arm/mach-imx/imx_bootaux.c
> index 18d7e6819c..3d9422d5a2 100644
> --- a/arch/arm/mach-imx/imx_bootaux.c
> +++ b/arch/arm/mach-imx/imx_bootaux.c
> @@ -26,7 +26,7 @@ int arch_auxiliary_core_up(u32 core_id, ulong boot_private_data)
>  
>  	/* Enable M4 */
>  #ifdef CONFIG_IMX8M
> -	call_imx_sip(IMX_SIP_SRC, IMX_SIP_SRC_M4_START, 0, 0);
> +	call_imx_sip(IMX_SIP_SRC, IMX_SIP_SRC_M4_START, 0, 0, 0);
>  #else
>  	clrsetbits_le32(SRC_BASE_ADDR + SRC_M4_REG_OFFSET,
>  			SRC_M4C_NON_SCLR_RST_MASK, SRC_M4_ENABLE_MASK);
> @@ -38,7 +38,7 @@ int arch_auxiliary_core_up(u32 core_id, ulong boot_private_data)
>  int arch_auxiliary_core_check_up(u32 core_id)
>  {
>  #ifdef CONFIG_IMX8M
> -	return call_imx_sip(IMX_SIP_SRC, IMX_SIP_SRC_M4_STARTED, 0, 0);
> +	return call_imx_sip(IMX_SIP_SRC, IMX_SIP_SRC_M4_STARTED, 0, 0, 0);
>  #else
>  	unsigned int val;
>  
> diff --git a/arch/arm/mach-imx/sip.c b/arch/arm/mach-imx/sip.c
> index 968e7cf309..fca520c671 100644
> --- a/arch/arm/mach-imx/sip.c
> +++ b/arch/arm/mach-imx/sip.c
> @@ -7,7 +7,8 @@
>  #include <asm/arch/sys_proto.h>
>  
>  unsigned long call_imx_sip(unsigned long id, unsigned long reg0,
> -			   unsigned long reg1, unsigned long reg2)
> +			   unsigned long reg1, unsigned long reg2,
> +			   unsigned long reg3)
>  {
>  	struct pt_regs regs;
>  
> @@ -15,6 +16,7 @@ unsigned long call_imx_sip(unsigned long id, unsigned long reg0,
>  	regs.regs[1] = reg0;
>  	regs.regs[2] = reg1;
>  	regs.regs[3] = reg2;
> +	regs.regs[4] = reg3;
>  
>  	smc_call(&regs);
>  
> diff --git a/drivers/misc/imx8/fuse.c b/drivers/misc/imx8/fuse.c
> index 2f2fad2c17..1309215d4d 100644
> --- a/drivers/misc/imx8/fuse.c
> +++ b/drivers/misc/imx8/fuse.c
> @@ -74,7 +74,7 @@ int fuse_prog(u32 bank, u32 word, u32 val)
>  	}
>  
>  	return call_imx_sip(FSL_SIP_OTP_WRITE, (unsigned long)word,
> -			    (unsigned long)val, 0);
> +			    (unsigned long)val, 0, 0);
>  }
>  
>  int fuse_override(u32 bank, u32 word, u32 val)
> -- 
> 2.17.1
> 
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> https://lists.denx.de/listinfo/u-boot

Reviewed-by: Patrick Wildt <patrick@blueri.se>

  parent reply	other threads:[~2019-10-21 17:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-21 15:58 [U-Boot] [PATCH 1/3] mach-imx: Adding new argument for SIP call interface Anatolij Gustschin
2019-10-21 15:58 ` [U-Boot] [PATCH 2/3] imx8: add sc_misc_seco_build_info() Anatolij Gustschin
2019-10-22  2:47   ` Peng Fan
2019-10-22  7:40     ` Anatolij Gustschin
2019-10-24 13:54     ` Anatolij Gustschin
2019-10-25  1:45       ` Peng Fan
2019-10-21 15:58 ` [U-Boot] [PATCH 3/3] imx8: output SECO-FW, ATF and imx-mkimage commit IDs Anatolij Gustschin
2019-10-22  2:49   ` Peng Fan
2019-10-22  7:57     ` Anatolij Gustschin
2019-10-21 17:12 ` Patrick Wildt [this message]
2019-10-22  7:53 ` [U-Boot] [PATCH 1/3] mach-imx: Adding new argument for SIP call interface Anatolij Gustschin

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=20191021171208.GA8059@nox.fritz.box \
    --to=patrick@blueri.se \
    --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