* mc_write_command - writes a command to a Management Complex (MC) portal * * @portal: pointer to an MC portal * @cmd: pointer to a filled command */
| 131 | * @cmd: pointer to a filled command |
| 132 | */ |
| 133 | static inline void mc_write_command(struct mc_command __iomem *portal, |
| 134 | struct mc_command *cmd) |
| 135 | { |
| 136 | struct mc_cmd_header *cmd_header = (struct mc_cmd_header *)&cmd->header; |
| 137 | char *header = (char *)&portal->header; |
| 138 | int i; |
| 139 | |
| 140 | /* copy command parameters into the portal */ |
| 141 | for (i = 0; i < MC_CMD_NUM_OF_PARAMS; i++) |
| 142 | iowrite64(cmd->params[i], &portal->params[i]); |
| 143 | |
| 144 | /* submit the command by writing the header */ |
| 145 | iowrite32(le32_to_cpu(cmd_header->word[1]), (((uint32_t *)header) + 1)); |
| 146 | iowrite32(le32_to_cpu(cmd_header->word[0]), (uint32_t *)header); |
| 147 | } |
| 148 | |
| 149 | /** |
| 150 | * mc_read_response - reads the response for the last MC command from a |
no test coverage detected