All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V2 16/20] mx7ulp: Add HAB boot support
Date: Sun, 12 Feb 2017 10:28:00 +0100	[thread overview]
Message-ID: <58c10257-0f0d-f1f6-687c-2278100c819e@denx.de> (raw)
In-Reply-To: <1482833066-29291-17-git-send-email-peng.fan@nxp.com>



On 27/12/2016 11:04, Peng Fan wrote:
> Add CAAM clock functions, SEC_CONFIG[1] fuse checking, and default CSF
> size for HAB support boot on mx7ulp.
> 
> Users need to uncomment the CONFIG_SECURE_BOOT in mx7ulp_evk.h to build
> secure uboot.
> 
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> Signed-off-by: Ye Li <ye.li@nxp.com>
> Cc: Stefano Babic <sbabic@denx.de>
> ---
> 
> V2:
>  New
> 
>  arch/arm/cpu/armv7/mx7ulp/clock.c        | 10 ++++++++++
>  arch/arm/cpu/armv7/mx7ulp/soc.c          |  8 ++++++++
>  arch/arm/imx-common/hab.c                |  3 ++-
>  arch/arm/include/asm/arch-mx7ulp/clock.h |  1 +
>  4 files changed, 21 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/cpu/armv7/mx7ulp/clock.c b/arch/arm/cpu/armv7/mx7ulp/clock.c
> index 30db67d..f7eaa4b 100644
> --- a/arch/arm/cpu/armv7/mx7ulp/clock.c
> +++ b/arch/arm/cpu/armv7/mx7ulp/clock.c
> @@ -312,6 +312,16 @@ void clock_init(void)
>  	enable_usboh3_clk(1);
>  }
>  
> +#ifdef CONFIG_SECURE_BOOT
> +void hab_caam_clock_enable(unsigned char enable)
> +{
> +       if (enable)
> +	       pcc_clock_enable(PER_CLK_CAAM, true);
> +       else
> +	       pcc_clock_enable(PER_CLK_CAAM, false);
> +}
> +#endif
> +
>  /*
>   * Dump some core clockes.
>   */
> diff --git a/arch/arm/cpu/armv7/mx7ulp/soc.c b/arch/arm/cpu/armv7/mx7ulp/soc.c
> index d04edc5..6fa97bb 100644
> --- a/arch/arm/cpu/armv7/mx7ulp/soc.c
> +++ b/arch/arm/cpu/armv7/mx7ulp/soc.c
> @@ -7,9 +7,17 @@
>  #include <asm/arch/clock.h>
>  #include <asm/arch/imx-regs.h>
>  #include <asm/arch/sys_proto.h>
> +#include <asm/imx-common/hab.h>
>  
>  static char *get_reset_cause(char *);
>  
> +#if defined(CONFIG_SECURE_BOOT)
> +struct imx_sec_config_fuse_t const imx_sec_config_fuse = {
> +	.bank = 29,
> +	.word = 6,
> +};
> +#endif
> +
>  u32 get_cpu_rev(void)
>  {
>  	/* Temporally hard code the CPU rev to 0x73, rev 1.0. Fix it later */
> diff --git a/arch/arm/imx-common/hab.c b/arch/arm/imx-common/hab.c
> index 6731825..74bb3ff 100644
> --- a/arch/arm/imx-common/hab.c
> +++ b/arch/arm/imx-common/hab.c
> @@ -77,7 +77,8 @@
>  #define MX6DLS_PU_IROM_MMU_EN_VAR	0x00901dd0
>  #define MX6SL_PU_IROM_MMU_EN_VAR	0x00900a18
>  #define IS_HAB_ENABLED_BIT \
> -	(is_soc_type(MXC_SOC_MX7) ? 0x2000000 : 0x2)
> +	(is_soc_type(MXC_SOC_MX7ULP) ? 0x80000000 :	\
> +	 (is_soc_type(MXC_SOC_MX7) ? 0x2000000 : 0x2))
>  
>  /*
>   * +------------+  0x0 (DDR_UIMAGE_START) -
> diff --git a/arch/arm/include/asm/arch-mx7ulp/clock.h b/arch/arm/include/asm/arch-mx7ulp/clock.h
> index ebf32c6..170a9b3 100644
> --- a/arch/arm/include/asm/arch-mx7ulp/clock.h
> +++ b/arch/arm/include/asm/arch-mx7ulp/clock.h
> @@ -39,4 +39,5 @@ void enable_usboh3_clk(unsigned char enable);
>  #endif
>  void init_clk_usdhc(u32 index);
>  void clock_init(void);
> +void hab_caam_clock_enable(unsigned char enable);
>  #endif
> 


Reviewed-by : Stefano Babic <sbabic@denx.de>

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================

  reply	other threads:[~2017-02-12  9:28 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-27 10:04 [U-Boot] [PATCH V2 00/20] imx: add i.MX7ULP support Peng Fan
2016-12-27 10:04 ` [U-Boot] [PATCH V2 01/20] imx: mx7ulp: Add mx7ulp to Kconfig Peng Fan
2017-02-12  8:39   ` Stefano Babic
2016-12-27 10:04 ` [U-Boot] [PATCH V2 02/20] imx: mx7ulp: add registers header file Peng Fan
2017-02-12  8:40   ` Stefano Babic
2016-12-27 10:04 ` [U-Boot] [PATCH V2 03/20] imx: mx7ulp: add iomux driver to support IOMUXC0 and IOMUXC1 Peng Fan
2017-02-12  8:45   ` Stefano Babic
2016-12-27 10:04 ` [U-Boot] [PATCH V2 04/20] imx: mx7ulp: Add clock framework and functions Peng Fan
2017-02-12  9:12   ` Stefano Babic
2016-12-27 10:04 ` [U-Boot] [PATCH V2 05/20] imx: mx7ulp: Add soc level initialization codes " Peng Fan
2017-02-12  9:19   ` Stefano Babic
2017-02-22  6:48     ` Peng Fan
2016-12-27 10:04 ` [U-Boot] [PATCH V2 06/20] imx: mx7ulp: handle all the lpuarts in get_lpuart_clk Peng Fan
2017-02-12  9:20   ` Stefano Babic
2016-12-27 10:04 ` [U-Boot] [PATCH V2 07/20] imx: mx7ulp: Implement the clock functions for i2c driver Peng Fan
2017-02-12  9:20   ` Stefano Babic
2016-12-27 10:04 ` [U-Boot] [PATCH V2 08/20] gpio: Add Rapid GPIO2P driver for i.MX7ULP Peng Fan
2017-02-12  9:21   ` Stefano Babic
2016-12-27 10:04 ` [U-Boot] [PATCH V2 09/20] mxc_ocotp: Update driver to support OCOTP controller on i.MX7ULP Peng Fan
2017-02-12  9:22   ` Stefano Babic
2016-12-27 10:04 ` [U-Boot] [PATCH V2 10/20] mx7ulp: Add iomux pins header file Peng Fan
2016-12-27 10:04 ` [U-Boot] [PATCH V2 11/20] wdog: Add the watchdog driver for MX7ULP Peng Fan
2017-02-12  9:25   ` Stefano Babic
2017-02-22  6:59     ` Peng Fan
2017-02-22  8:18       ` Stefano Babic
2016-12-27 10:04 ` [U-Boot] [PATCH V2 12/20] pinctrl: Add i.MX7ULP pinctrl driver Peng Fan
2017-01-12  5:07   ` Simon Glass
2017-02-12  9:25   ` Stefano Babic
2016-12-27 10:04 ` [U-Boot] [PATCH V2 13/20] i2c: lpi2c: add lpi2c driver for i.MX7ULP Peng Fan
2016-12-27 10:04 ` [U-Boot] [PATCH V2 14/20] serial: lpuart: restructure lpuart driver Peng Fan
2016-12-29  9:28   ` Bhuvanchandra DV
2017-02-12  9:27   ` Stefano Babic
2016-12-27 10:04 ` [U-Boot] [PATCH V2 15/20] serial: lpuart: add i.MX7ULP support Peng Fan
2016-12-27 10:04 ` [U-Boot] [PATCH V2 16/20] mx7ulp: Add HAB boot support Peng Fan
2017-02-12  9:28   ` Stefano Babic [this message]
2016-12-27 10:04 ` [U-Boot] [PATCH V2 17/20] arm: dts: add i.MX7ULP dtsi file Peng Fan
2016-12-27 10:04 ` [U-Boot] [PATCH V2 18/20] mmc: fsl_esdhc: support i.MX7ULP Peng Fan
2016-12-27 22:17   ` Jaehoon Chung
2017-02-12  9:29   ` Stefano Babic
2016-12-27 10:04 ` [U-Boot] [PATCH V2 19/20] imx: imx7ulp: add EVK board support Peng Fan
2016-12-27 10:04 ` [U-Boot] [PATCH V2 20/20] imx: mx7ulp_evk: enable mmc/regulator support Peng Fan
2016-12-27 11:22   ` Fabio Estevam
2016-12-27 12:07     ` Peng Fan
2017-01-03  9:05       ` Peng Fan
2017-01-12  2:23         ` Peng Fan
2017-01-12  2:24           ` Peng Fan
2017-02-08  8:36 ` [U-Boot] [PATCH V2 00/20] imx: add i.MX7ULP support Peng Fan
2017-02-08 12:16   ` Stefano Babic

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=58c10257-0f0d-f1f6-687c-2278100c819e@denx.de \
    --to=sbabic@denx.de \
    --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.