* mc_read_response - reads the response for the last MC command from a * Management Complex (MC) portal * * @portal: pointer to an MC portal * @resp: pointer to command response buffer * * Returns MC_CMD_STATUS_OK on Success; Error code otherwise. */
| 156 | * Returns MC_CMD_STATUS_OK on Success; Error code otherwise. |
| 157 | */ |
| 158 | static inline enum mc_cmd_status mc_read_response( |
| 159 | struct mc_command __iomem *portal, |
| 160 | struct mc_command *resp) |
| 161 | { |
| 162 | int i; |
| 163 | enum mc_cmd_status status; |
| 164 | |
| 165 | /* Copy command response header from MC portal: */ |
| 166 | resp->header = ioread64(&portal->header); |
| 167 | status = mc_cmd_read_status(resp); |
| 168 | if (status != MC_CMD_STATUS_OK) |
| 169 | return status; |
| 170 | |
| 171 | /* Copy command response data from MC portal: */ |
| 172 | for (i = 0; i < MC_CMD_NUM_OF_PARAMS; i++) |
| 173 | resp->params[i] = ioread64(&portal->params[i]); |
| 174 | |
| 175 | return status; |
| 176 | } |
| 177 | |
| 178 | #endif /* __FSL_MC_CMD_H */ |
no test coverage detected