MCPcopy Create free account
hub / github.com/F-Stack/f-stack / mc_write_command

Function mc_write_command

dpdk/drivers/bus/fslmc/mc/fsl_mc_cmd.h:133–147  ·  view source on GitHub ↗

* mc_write_command - writes a command to a Management Complex (MC) portal * * @portal: pointer to an MC portal * @cmd: pointer to a filled command */

Source from the content-addressed store, hash-verified

131 * @cmd: pointer to a filled command
132 */
133static 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

Callers 1

mc_send_commandFunction · 0.85

Calls 1

iowrite32Function · 0.50

Tested by

no test coverage detected