aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bus/fslmc/mc/mc_sys.c
diff options
context:
space:
mode:
authorLuca Boccassi <luca.boccassi@gmail.com>2017-11-08 14:50:17 +0000
committerLuca Boccassi <luca.boccassi@gmail.com>2017-11-08 14:50:22 +0000
commitb30bf840574a70b892bebc6e5281cd614cfc82c5 (patch)
treeaf9a3331209ba3eb575e2de2a41da99a9dd40954 /drivers/bus/fslmc/mc/mc_sys.c
parent01dc13012315b1f147ccce80aed68050c9e31c2d (diff)
parent055c52583a2794da8ba1e85a48cce3832372b12f (diff)
Merge branch 'upstream' into 17.11.x
Change-Id: I9f728c5947bfb5ba81f00306b7997685463ca13e Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
Diffstat (limited to 'drivers/bus/fslmc/mc/mc_sys.c')
-rw-r--r--drivers/bus/fslmc/mc/mc_sys.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/bus/fslmc/mc/mc_sys.c b/drivers/bus/fslmc/mc/mc_sys.c
index 45731658..f0f9a268 100644
--- a/drivers/bus/fslmc/mc/mc_sys.c
+++ b/drivers/bus/fslmc/mc/mc_sys.c
@@ -5,6 +5,7 @@
* BSD LICENSE
*
* Copyright 2013-2015 Freescale Semiconductor Inc.
+ * Copyright 2017 NXP.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -86,6 +87,7 @@ static int mc_status_to_error(enum mc_cmd_status status)
int mc_send_command(struct fsl_mc_io *mc_io, struct mc_command *cmd)
{
enum mc_cmd_status status;
+ uint64_t response;
if (!mc_io || !mc_io->regs)
return -EACCES;
@@ -97,7 +99,8 @@ int mc_send_command(struct fsl_mc_io *mc_io, struct mc_command *cmd)
/* Spin until status changes */
do {
- status = MC_CMD_HDR_READ_STATUS(ioread64(mc_io->regs));
+ response = ioread64(mc_io->regs);
+ status = mc_cmd_read_status((struct mc_command *)&response);
/* --- Call wait function here to prevent blocking ---
* Change the loop condition accordingly to exit on timeout.