[U-Boot] [PATCH 3/3] crypto/fsl: clean-up - use fdt_setprop_u32 helper

Ruchika Gupta ruchika.gupta at freescale.com
Wed Jul 22 18:38:49 CEST 2015


Acked-by: Ruchika Gupta<ruchika.gupta at freescale.com>

> -----Original Message-----
> From: Sun York-R58495
> Sent: Sunday, July 19, 2015 3:44 AM
> To: Gupta Ruchika-R66431
> Subject: Re: [PATCH 3/3] crypto/fsl: clean-up - use fdt_setprop_u32 helper
> 
> Ruchika,
> 
> Please comment/ack.
> 
> York
> 
> On 07/08/2015 07:24 AM, Horia Geantă wrote:
> > Signed-off-by: Horia Geantă <horia.geanta at freescale.com>
> > ---
> >  drivers/crypto/fsl/sec.c | 17 ++++++++---------
> >  1 file changed, 8 insertions(+), 9 deletions(-)
> >
> > diff --git a/drivers/crypto/fsl/sec.c b/drivers/crypto/fsl/sec.c index
> > b25b1a4052d2..0940faf768cc 100644
> > --- a/drivers/crypto/fsl/sec.c
> > +++ b/drivers/crypto/fsl/sec.c
> > @@ -60,27 +60,26 @@ void fdt_fixup_crypto_node(void *blob, int
> sec_rev)
> >  		return;
> >  	}
> >
> > -	val = cpu_to_fdt32(sec_rev_prop_list[sec_idx].num_channels);
> > -	err = fdt_setprop(blob, crypto_node, "fsl,num-channels", &val, 4);
> > +	err = fdt_setprop_u32(blob, crypto_node, "fsl,num-channels",
> > +			      sec_rev_prop_list[sec_idx].num_channels);
> >  	if (err < 0)
> >  		printf("WARNING: could not set crypto property: %s\n",
> >  		       fdt_strerror(err));
> >
> > -	val =
> cpu_to_fdt32(sec_rev_prop_list[sec_idx].descriptor_types_mask);
> > -	err = fdt_setprop(blob, crypto_node, "fsl,descriptor-types-mask",
> > -			  &val, 4);
> > +	err = fdt_setprop_u32(blob, crypto_node, "fsl,descriptor-types-
> mask",
> > +
> sec_rev_prop_list[sec_idx].descriptor_types_mask);
> >  	if (err < 0)
> >  		printf("WARNING: could not set crypto property: %s\n",
> >  		       fdt_strerror(err));
> >
> > -	val = cpu_to_fdt32(sec_rev_prop_list[sec_idx].exec_units_mask);
> > -	err = fdt_setprop(blob, crypto_node, "fsl,exec-units-mask", &val, 4);
> > +	err = fdt_setprop_u32(blob, crypto_node, "fsl,exec-units-mask",
> > +			      sec_rev_prop_list[sec_idx].exec_units_mask);
> >  	if (err < 0)
> >  		printf("WARNING: could not set crypto property: %s\n",
> >  		       fdt_strerror(err));
> >
> > -	val = cpu_to_fdt32(sec_rev_prop_list[sec_idx].channel_fifo_len);
> > -	err = fdt_setprop(blob, crypto_node, "fsl,channel-fifo-len", &val, 4);
> > +	err = fdt_setprop_u32(blob, crypto_node, "fsl,channel-fifo-len",
> > +			      sec_rev_prop_list[sec_idx].channel_fifo_len);
> >  	if (err < 0)
> >  		printf("WARNING: could not set crypto property: %s\n",
> >  		       fdt_strerror(err));
> >


More information about the U-Boot mailing list