travis: Install pyelftools via pip
[platform/kernel/u-boot.git] / drivers / crypto / fsl / sec.c
index b25b1a4..a2c0bfa 100644 (file)
@@ -1,11 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * Copyright 2014 Freescale Semiconductor, Inc.
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
-#include <libfdt.h>
+#include <linux/libfdt.h>
 #include <fdt_support.h>
 #if CONFIG_SYS_FSL_SEC_COMPAT == 2 || CONFIG_SYS_FSL_SEC_COMPAT >= 4
 #include <fsl_sec.h>
@@ -60,27 +59,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));