drivers/crypto/fsl: clean-up - use fdt_setprop_u32 helper

Signed-off-by: Horia Geantă <horia.geanta@freescale.com>
Acked-by: Ruchika Gupta<ruchika.gupta@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
master
horia.geanta@freescale.com 10 years ago committed by York Sun
parent 3ef2412de6
commit 14d5547cf1
  1. 17
      drivers/crypto/fsl/sec.c

@ -60,27 +60,26 @@ void fdt_fixup_crypto_node(void *blob, int sec_rev)
return; return;
} }
val = cpu_to_fdt32(sec_rev_prop_list[sec_idx].num_channels); err = fdt_setprop_u32(blob, crypto_node, "fsl,num-channels",
err = fdt_setprop(blob, crypto_node, "fsl,num-channels", &val, 4); sec_rev_prop_list[sec_idx].num_channels);
if (err < 0) if (err < 0)
printf("WARNING: could not set crypto property: %s\n", printf("WARNING: could not set crypto property: %s\n",
fdt_strerror(err)); fdt_strerror(err));
val = cpu_to_fdt32(sec_rev_prop_list[sec_idx].descriptor_types_mask); err = fdt_setprop_u32(blob, crypto_node, "fsl,descriptor-types-mask",
err = fdt_setprop(blob, crypto_node, "fsl,descriptor-types-mask", sec_rev_prop_list[sec_idx].descriptor_types_mask);
&val, 4);
if (err < 0) if (err < 0)
printf("WARNING: could not set crypto property: %s\n", printf("WARNING: could not set crypto property: %s\n",
fdt_strerror(err)); fdt_strerror(err));
val = cpu_to_fdt32(sec_rev_prop_list[sec_idx].exec_units_mask); err = fdt_setprop_u32(blob, crypto_node, "fsl,exec-units-mask",
err = fdt_setprop(blob, crypto_node, "fsl,exec-units-mask", &val, 4); sec_rev_prop_list[sec_idx].exec_units_mask);
if (err < 0) if (err < 0)
printf("WARNING: could not set crypto property: %s\n", printf("WARNING: could not set crypto property: %s\n",
fdt_strerror(err)); fdt_strerror(err));
val = cpu_to_fdt32(sec_rev_prop_list[sec_idx].channel_fifo_len); err = fdt_setprop_u32(blob, crypto_node, "fsl,channel-fifo-len",
err = fdt_setprop(blob, crypto_node, "fsl,channel-fifo-len", &val, 4); sec_rev_prop_list[sec_idx].channel_fifo_len);
if (err < 0) if (err < 0)
printf("WARNING: could not set crypto property: %s\n", printf("WARNING: could not set crypto property: %s\n",
fdt_strerror(err)); fdt_strerror(err));

Loading…
Cancel
Save