lkml.org 
[lkml]   [2015]   [Feb]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v7 1/3] drivers/bus: Added Freescale Management Complex APIs


On 24.02.15 23:21, J. German Rivera wrote:
> APIs to access the Management Complex (MC) hardware
> module of Freescale LS2 SoCs. This patch includes
> APIs to check the MC firmware version and to manipulate
> DPRC objects in the MC.
>
> Signed-off-by: J. German Rivera <German.Rivera@freescale.com>
> Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com>

Only 2 minor nits.

[...]

> +int mc_get_version(struct fsl_mc_io *mc_io, struct mc_version *mc_ver_info)
> +{
> + struct mc_command cmd = { 0 };
> + int err;
> +
> + /* prepare command */
> + cmd.header = mc_encode_cmd_header(DPMNG_CMDID_GET_VERSION,
> + MC_CMD_PRI_LOW, 0);
> +
> + /* send command to mc*/

Either my mail client is broken or this is a copy&paste error throughout
the file :).

> + err = mc_send_command(mc_io, &cmd);
> + if (err)
> + return err;
> +
> + /* retrieve response parameters */
> + mc_ver_info->revision = mc_dec(cmd.params[0], 0, 32);
> + mc_ver_info->major = mc_dec(cmd.params[0], 32, 32);
> + mc_ver_info->minor = mc_dec(cmd.params[1], 0, 32);
> +
> + return 0;
> +}

[...]

> +
> +struct mc_command {
> + uint64_t header;
> + uint64_t params[MC_CMD_NUM_OF_PARAMS];
> +};
> +
> +enum mc_cmd_status {
> + MC_CMD_STATUS_OK = 0x0, /*!< Completed successfully */

What is /*!< supposed to be? Can't this just be /*?

> + MC_CMD_STATUS_READY = 0x1, /*!< Ready to be processed */
> + MC_CMD_STATUS_AUTH_ERR = 0x3, /*!< Authentication error */
> + MC_CMD_STATUS_NO_PRIVILEGE = 0x4, /*!< No privilege */
> + MC_CMD_STATUS_DMA_ERR = 0x5, /*!< DMA or I/O error */
> + MC_CMD_STATUS_CONFIG_ERR = 0x6, /*!< Configuration error */
> + MC_CMD_STATUS_TIMEOUT = 0x7, /*!< Operation timed out */
> + MC_CMD_STATUS_NO_RESOURCE = 0x8, /*!< No resources */
> + MC_CMD_STATUS_NO_MEMORY = 0x9, /*!< No memory available */
> + MC_CMD_STATUS_BUSY = 0xA, /*!< Device is busy */
> + MC_CMD_STATUS_UNSUPPORTED_OP = 0xB, /*!< Unsupported operation */
> + MC_CMD_STATUS_INVALID_STATE = 0xC /*!< Invalid state */
> +};


Alex


\
 
 \ /
  Last update: 2015-02-26 14:21    [W:0.371 / U:0.792 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site