mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-03 07:38:10 +00:00
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>
This commit is contained in:
parent
4b4bdfe7d4
commit
d693eb39f5
1 changed files with 6 additions and 6 deletions
|
@ -210,8 +210,8 @@ struct mc_cmd_header {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct fsl_mc_command {
|
struct fsl_mc_command {
|
||||||
u64 header;
|
__le64 header;
|
||||||
u64 params[MC_CMD_NUM_OF_PARAMS];
|
__le64 params[MC_CMD_NUM_OF_PARAMS];
|
||||||
};
|
};
|
||||||
|
|
||||||
enum mc_cmd_status {
|
enum mc_cmd_status {
|
||||||
|
@ -238,11 +238,11 @@ enum mc_cmd_status {
|
||||||
/* Command completion flag */
|
/* Command completion flag */
|
||||||
#define MC_CMD_FLAG_INTR_DIS 0x01
|
#define MC_CMD_FLAG_INTR_DIS 0x01
|
||||||
|
|
||||||
static inline u64 mc_encode_cmd_header(u16 cmd_id,
|
static inline __le64 mc_encode_cmd_header(u16 cmd_id,
|
||||||
u32 cmd_flags,
|
u32 cmd_flags,
|
||||||
u16 token)
|
u16 token)
|
||||||
{
|
{
|
||||||
u64 header = 0;
|
__le64 header = 0;
|
||||||
struct mc_cmd_header *hdr = (struct mc_cmd_header *)&header;
|
struct mc_cmd_header *hdr = (struct mc_cmd_header *)&header;
|
||||||
|
|
||||||
hdr->cmd_id = cpu_to_le16(cmd_id);
|
hdr->cmd_id = cpu_to_le16(cmd_id);
|
||||||
|
|
Loading…
Reference in a new issue