[U-Boot] [PATCH] powerpc/mpc85xx: Add property 'fsl, sec-era' in device tree node 'crypto'.

Tabi Timur-B04825 B04825 at freescale.com
Thu Jan 10 13:42:07 CET 2013


On Thu, Jan 10, 2013 at 5:49 AM, Vakul Garg <vakul at freescale.com> wrote:
> If property 'fsl,sec-era' is already present, it is updated.
> This property is required so that applications can ascertain which
> descriptor commands are supported on a particular CAAM version.
>
> Signed-off-by: Vakul Garg <vakul at freescale.com>
> Cc: Andy Fleming <afleming at gmail.com>
> ---
>  arch/powerpc/cpu/mpc85xx/fdt.c        |    8 +++
>  arch/powerpc/cpu/mpc8xxx/fdt.c        |   78 ++++++++++++++++++++++++++++++++-
>  arch/powerpc/include/asm/immap_85xx.h |    6 +++
>  3 files changed, 91 insertions(+), 1 deletions(-)
>
> diff --git a/arch/powerpc/cpu/mpc85xx/fdt.c b/arch/powerpc/cpu/mpc85xx/fdt.c
> index 5af2661..e7b5dfd 100644
> --- a/arch/powerpc/cpu/mpc85xx/fdt.c
> +++ b/arch/powerpc/cpu/mpc85xx/fdt.c
> @@ -591,6 +591,14 @@ void ft_cpu_setup(void *blob, bd_t *bd)
>         /* delete crypto node if not on an E-processor */
>         if (!IS_E_PROCESSOR(get_svr()))
>                 fdt_fixup_crypto_node(blob, 0);
> +#if CONFIG_SYS_FSL_SEC_COMPAT >= 4  /* SEC 4.x/5.x */
> +       else {
> +               ccsr_sec_t *sec;

ccsr_sec_t __iomem *sec;

> +
> +               sec = (void __iomem *)CONFIG_SYS_FSL_SEC_ADDR;
> +               fdt_fixup_crypto_node(blob, in_be32(&sec->secvid_ms));
> +       }
> +#endif
>
>         fdt_fixup_ethernet(blob);
>
> diff --git a/arch/powerpc/cpu/mpc8xxx/fdt.c b/arch/powerpc/cpu/mpc8xxx/fdt.c
> index 68db8e2..20cbb45 100644
> --- a/arch/powerpc/cpu/mpc8xxx/fdt.c
> +++ b/arch/powerpc/cpu/mpc8xxx/fdt.c
> @@ -297,10 +297,86 @@ void fdt_fixup_crypto_node(void *blob, int sec_rev)
>                        fdt_strerror(err));
>  }
>  #elif CONFIG_SYS_FSL_SEC_COMPAT >= 4  /* SEC4 */
> +static u8 caam_get_era(void)
> +{
> +       static const struct {
> +               u16 ip_id;
> +               u8 maj_rev;
> +               u8 era;
> +       } caam_eras[] = {
> +               {0x0A10, 1, 1},
> +               {0x0A10, 2, 2},
> +               {0x0A12, 1, 3},
> +               {0x0A14, 1, 3},
> +               {0x0A14, 2, 4},
> +               {0x0A16, 1, 4},
> +               {0x0A10, 3, 4},
> +               {0x0A11, 1, 4},
> +               {0x0A18, 1, 4},
> +               {0x0A11, 2, 5},
> +               {0x0A12, 2, 5},
> +               {0x0A13, 1, 5},
> +               {0x0A1C, 1, 5}
> +       };
> +
> +       ccsr_sec_t *sec = (void __iomem *)CONFIG_SYS_FSL_SEC_ADDR;

same here

-- 
Timur Tabi
Linux kernel developer at Freescale


More information about the U-Boot mailing list