Lines Matching +full:fsl +full:- +full:mc
1 // SPDX-License-Identifier: GPL-2.0+
3 * Freescale Layerscape MC I/O wrapper
5 * Copyright (C) 2013-2015 Freescale Semiconductor, Inc.
9 #include <fsl-mc/fsl_mc_sys.h>
10 #include <fsl-mc/fsl_mc_cmd.h>
19 * mc_send_command - Send MC command and wait for response
21 * @mc_io: Pointer to MC I/O object to be used
22 * @cmd: MC command buffer. On input, it contains the command to send to the MC.
23 * On output, it contains the response from the MC if any.
25 * Depending on the sharing option specified when creating the MC portal
27 * access to the MC portal from the point when the command is sent until a
28 * response is received from the MC.
36 mc_write_command(mc_io->mmio_regs, cmd); in mc_send_command()
39 status = mc_read_response(mc_io->mmio_regs, cmd); in mc_send_command()
43 if (--timeout == 0) { in mc_send_command()
44 printf("Error: Timeout waiting for MC response\n"); in mc_send_command()
45 return -ETIMEDOUT; in mc_send_command()
52 printf("Error: MC command failed (portal: %p, obj handle: %#x, command: %#x, status: %#x)\n", in mc_send_command()
53 mc_io->mmio_regs, in mc_send_command()
54 (unsigned int)MC_CMD_HDR_READ_TOKEN(cmd->header), in mc_send_command()
55 (unsigned int)MC_CMD_HDR_READ_CMDID(cmd->header), in mc_send_command()
58 return -EIO; in mc_send_command()