]> git.sur5r.net Git - u-boot/commitdiff
drivers/crypto/fsl: clean-up - use fdt_setprop_u32 helper
authorhoria.geanta@freescale.com <horia.geanta@freescale.com>
Wed, 8 Jul 2015 14:24:58 +0000 (17:24 +0300)
committerYork Sun <yorksun@freescale.com>
Mon, 3 Aug 2015 19:06:38 +0000 (12:06 -0700)
Signed-off-by: Horia Geantă <horia.geanta@freescale.com>
Acked-by: Ruchika Gupta<ruchika.gupta@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
drivers/crypto/fsl/sec.c

index b25b1a4052d23b596341145a98dea1d742dabd89..0940faf768cc26154f08c1c0bb4967f44e5ee8cb 100644 (file)
@@ -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));