diff options
author | 2018-11-15 12:12:12 +0000 | |
---|---|---|
committer | 2018-12-06 15:53:15 +0100 | |
commit | d693eb39f5f8500ac950378b010fba78452fcf14 (patch) | |
tree | 2a05b9c84f44c1b557475e59a5309b4e9d010042 /include/linux/fsl | |
parent | misc: ti-st: make array read_ver_cmd static, shrinks object size (diff) | |
download | linux-d693eb39f5f8500ac950378b010fba78452fcf14.tar.gz linux-d693eb39f5f8500ac950378b010fba78452fcf14.tar.bz2 linux-d693eb39f5f8500ac950378b010fba78452fcf14.zip |
bus: fsl-mc: explicitly define the fsl_mc_command endianness
Both the header and the command parameters of the fsl_mc_command are
64-bit little-endian words. Use the appropriate type to explicitly
specify their endianness.
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/fsl')
-rw-r--r-- | include/linux/fsl/mc.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/include/linux/fsl/mc.h b/include/linux/fsl/mc.h index 9d3f668df7df..741f567253ef 100644 --- a/include/linux/fsl/mc.h +++ b/include/linux/fsl/mc.h @@ -210,8 +210,8 @@ struct mc_cmd_header { }; struct fsl_mc_command { - u64 header; - u64 params[MC_CMD_NUM_OF_PARAMS]; + __le64 header; + __le64 params[MC_CMD_NUM_OF_PARAMS]; }; enum mc_cmd_status { @@ -238,11 +238,11 @@ enum mc_cmd_status { /* Command completion flag */ #define MC_CMD_FLAG_INTR_DIS 0x01 -static inline u64 mc_encode_cmd_header(u16 cmd_id, - u32 cmd_flags, - u16 token) +static inline __le64 mc_encode_cmd_header(u16 cmd_id, + u32 cmd_flags, + u16 token) { - u64 header = 0; + __le64 header = 0; struct mc_cmd_header *hdr = (struct mc_cmd_header *)&header; hdr->cmd_id = cpu_to_le16(cmd_id); |