All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peng Fan <peng.fan@nxp.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/3] imx8: add sc_misc_seco_build_info()
Date: Tue, 22 Oct 2019 02:47:28 +0000	[thread overview]
Message-ID: <DB7PR04MB4490AF1FD72C9A263ED3E44388680@DB7PR04MB4490.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <20191021155851.16483-2-agust@denx.de>

Hi Anatolij

> Subject: [PATCH 2/3] imx8: add sc_misc_seco_build_info()

sc_seco_build_info already in Stefano's tree.

Thanks,
Peng.

> 
> Add function for reading SECO-FW commit id.
> 
> Signed-off-by: Anatolij Gustschin <agust@denx.de>
> ---
>  arch/arm/include/asm/arch-imx8/sci/sci.h |  1 +
>  drivers/misc/imx8/scu_api.c              | 27
> ++++++++++++++++++++++++
>  2 files changed, 28 insertions(+)
> 
> diff --git a/arch/arm/include/asm/arch-imx8/sci/sci.h
> b/arch/arm/include/asm/arch-imx8/sci/sci.h
> index 14ee6f999b..df5c60d4ce 100644
> --- a/arch/arm/include/asm/arch-imx8/sci/sci.h
> +++ b/arch/arm/include/asm/arch-imx8/sci/sci.h
> @@ -81,6 +81,7 @@ int sc_misc_get_control(sc_ipc_t ipc, sc_rsrc_t resource,
> sc_ctrl_t ctrl,  void sc_misc_get_boot_dev(sc_ipc_t ipc, sc_rsrc_t
> *boot_dev);  void sc_misc_boot_status(sc_ipc_t ipc, sc_misc_boot_status_t
> status);  void sc_misc_build_info(sc_ipc_t ipc, u32 *build, u32 *commit);
> +void sc_misc_seco_build_info(sc_ipc_t ipc, u32 *version, u32 *commit);
>  int sc_misc_otp_fuse_read(sc_ipc_t ipc, u32 word, u32 *val);  int
> sc_misc_get_temp(sc_ipc_t ipc, sc_rsrc_t resource, sc_misc_temp_t temp,
>  		     s16 *celsius, s8 *tenths);
> diff --git a/drivers/misc/imx8/scu_api.c b/drivers/misc/imx8/scu_api.c index
> b2fdeef13a..44d0165c3f 100644
> --- a/drivers/misc/imx8/scu_api.c
> +++ b/drivers/misc/imx8/scu_api.c
> @@ -349,6 +349,33 @@ void sc_misc_build_info(sc_ipc_t ipc, u32 *build,
> u32 *commit)
>  		*commit = RPC_U32(&msg, 4);
>  }
> 
> +void sc_misc_seco_build_info(sc_ipc_t ipc, u32 *version, u32 *commit) {
> +	struct udevice *dev = gd->arch.scu_dev;
> +	int size = sizeof(struct sc_rpc_msg_s);
> +	struct sc_rpc_msg_s msg;
> +	int ret;
> +
> +	if (!dev)
> +		hang();
> +
> +	RPC_VER(&msg) = SC_RPC_VERSION;
> +	RPC_SVC(&msg) = SC_RPC_SVC_MISC;
> +	RPC_FUNC(&msg) = MISC_FUNC_SECO_BUILD_INFO;
> +	RPC_SIZE(&msg) = 1;
> +
> +	ret = misc_call(dev, SC_FALSE, &msg, size, &msg, size);
> +	if (ret < 0) {
> +		printf("%s: err: %d\n", __func__, ret);
> +		return;
> +	}
> +
> +	if (version)
> +		*version = RPC_U32(&msg, 0);
> +	if (commit)
> +		*commit = RPC_U32(&msg, 4);
> +}
> +
>  int sc_misc_otp_fuse_read(sc_ipc_t ipc, u32 word, u32 *val)  {
>  	struct udevice *dev = gd->arch.scu_dev;
> --
> 2.17.1

  reply	other threads:[~2019-10-22  2:47 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 [this message]
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 ` [U-Boot] [PATCH 1/3] mach-imx: Adding new argument for SIP call interface Patrick Wildt
2019-10-22  7:53 ` 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=DB7PR04MB4490AF1FD72C9A263ED3E44388680@DB7PR04MB4490.eurprd04.prod.outlook.com \
    --to=peng.fan@nxp.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.