staging: fsl-mc: Fixed uintX_t CHECK checkpatch warnings

Replaced all uses of uintX_t types to uX types, to be
checkpatch clean.

Signed-off-by: J. German Rivera <German.Rivera@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
J. German Rivera 2015-09-25 11:21:01 -05:00 committed by Greg Kroah-Hartman
parent e9bf3f206b
commit ba72f25b25
15 changed files with 401 additions and 401 deletions

View File

@ -52,9 +52,9 @@
* Return: '0' on Success; Error code otherwise. * Return: '0' on Success; Error code otherwise.
*/ */
int dpbp_open(struct fsl_mc_io *mc_io, int dpbp_open(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
int dpbp_id, int dpbp_id,
uint16_t *token) u16 *token)
{ {
struct mc_command cmd = { 0 }; struct mc_command cmd = { 0 };
int err; int err;
@ -88,8 +88,8 @@ EXPORT_SYMBOL(dpbp_open);
* Return: '0' on Success; Error code otherwise. * Return: '0' on Success; Error code otherwise.
*/ */
int dpbp_close(struct fsl_mc_io *mc_io, int dpbp_close(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token) u16 token)
{ {
struct mc_command cmd = { 0 }; struct mc_command cmd = { 0 };
@ -124,9 +124,9 @@ EXPORT_SYMBOL(dpbp_close);
* Return: '0' on Success; Error code otherwise. * Return: '0' on Success; Error code otherwise.
*/ */
int dpbp_create(struct fsl_mc_io *mc_io, int dpbp_create(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
const struct dpbp_cfg *cfg, const struct dpbp_cfg *cfg,
uint16_t *token) u16 *token)
{ {
struct mc_command cmd = { 0 }; struct mc_command cmd = { 0 };
int err; int err;
@ -157,8 +157,8 @@ int dpbp_create(struct fsl_mc_io *mc_io,
* Return: '0' on Success; error code otherwise. * Return: '0' on Success; error code otherwise.
*/ */
int dpbp_destroy(struct fsl_mc_io *mc_io, int dpbp_destroy(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token) u16 token)
{ {
struct mc_command cmd = { 0 }; struct mc_command cmd = { 0 };
@ -179,8 +179,8 @@ int dpbp_destroy(struct fsl_mc_io *mc_io,
* Return: '0' on Success; Error code otherwise. * Return: '0' on Success; Error code otherwise.
*/ */
int dpbp_enable(struct fsl_mc_io *mc_io, int dpbp_enable(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token) u16 token)
{ {
struct mc_command cmd = { 0 }; struct mc_command cmd = { 0 };
@ -202,8 +202,8 @@ EXPORT_SYMBOL(dpbp_enable);
* Return: '0' on Success; Error code otherwise. * Return: '0' on Success; Error code otherwise.
*/ */
int dpbp_disable(struct fsl_mc_io *mc_io, int dpbp_disable(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token) u16 token)
{ {
struct mc_command cmd = { 0 }; struct mc_command cmd = { 0 };
@ -226,8 +226,8 @@ EXPORT_SYMBOL(dpbp_disable);
* Return: '0' on Success; Error code otherwise. * Return: '0' on Success; Error code otherwise.
*/ */
int dpbp_is_enabled(struct fsl_mc_io *mc_io, int dpbp_is_enabled(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
int *en) int *en)
{ {
struct mc_command cmd = { 0 }; struct mc_command cmd = { 0 };
@ -256,8 +256,8 @@ int dpbp_is_enabled(struct fsl_mc_io *mc_io,
* Return: '0' on Success; Error code otherwise. * Return: '0' on Success; Error code otherwise.
*/ */
int dpbp_reset(struct fsl_mc_io *mc_io, int dpbp_reset(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token) u16 token)
{ {
struct mc_command cmd = { 0 }; struct mc_command cmd = { 0 };
@ -280,9 +280,9 @@ int dpbp_reset(struct fsl_mc_io *mc_io,
* Return: '0' on Success; Error code otherwise. * Return: '0' on Success; Error code otherwise.
*/ */
int dpbp_set_irq(struct fsl_mc_io *mc_io, int dpbp_set_irq(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
uint8_t irq_index, u8 irq_index,
struct dpbp_irq_cfg *irq_cfg) struct dpbp_irq_cfg *irq_cfg)
{ {
struct mc_command cmd = { 0 }; struct mc_command cmd = { 0 };
@ -312,9 +312,9 @@ int dpbp_set_irq(struct fsl_mc_io *mc_io,
* Return: '0' on Success; Error code otherwise. * Return: '0' on Success; Error code otherwise.
*/ */
int dpbp_get_irq(struct fsl_mc_io *mc_io, int dpbp_get_irq(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
uint8_t irq_index, u8 irq_index,
int *type, int *type,
struct dpbp_irq_cfg *irq_cfg) struct dpbp_irq_cfg *irq_cfg)
{ {
@ -332,8 +332,8 @@ int dpbp_get_irq(struct fsl_mc_io *mc_io,
return err; return err;
/* retrieve response parameters */ /* retrieve response parameters */
irq_cfg->val = (uint32_t)mc_dec(cmd.params[0], 0, 32); irq_cfg->val = (u32)mc_dec(cmd.params[0], 0, 32);
irq_cfg->addr = (uint64_t)mc_dec(cmd.params[1], 0, 64); irq_cfg->addr = (u64)mc_dec(cmd.params[1], 0, 64);
irq_cfg->user_irq_id = (int)mc_dec(cmd.params[2], 0, 32); irq_cfg->user_irq_id = (int)mc_dec(cmd.params[2], 0, 32);
*type = (int)mc_dec(cmd.params[2], 32, 32); *type = (int)mc_dec(cmd.params[2], 32, 32);
return 0; return 0;
@ -355,10 +355,10 @@ int dpbp_get_irq(struct fsl_mc_io *mc_io,
* Return: '0' on Success; Error code otherwise. * Return: '0' on Success; Error code otherwise.
*/ */
int dpbp_set_irq_enable(struct fsl_mc_io *mc_io, int dpbp_set_irq_enable(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
uint8_t irq_index, u8 irq_index,
uint8_t en) u8 en)
{ {
struct mc_command cmd = { 0 }; struct mc_command cmd = { 0 };
@ -383,10 +383,10 @@ int dpbp_set_irq_enable(struct fsl_mc_io *mc_io,
* Return: '0' on Success; Error code otherwise. * Return: '0' on Success; Error code otherwise.
*/ */
int dpbp_get_irq_enable(struct fsl_mc_io *mc_io, int dpbp_get_irq_enable(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
uint8_t irq_index, u8 irq_index,
uint8_t *en) u8 *en)
{ {
struct mc_command cmd = { 0 }; struct mc_command cmd = { 0 };
int err; int err;
@ -402,7 +402,7 @@ int dpbp_get_irq_enable(struct fsl_mc_io *mc_io,
return err; return err;
/* retrieve response parameters */ /* retrieve response parameters */
*en = (uint8_t)mc_dec(cmd.params[0], 0, 8); *en = (u8)mc_dec(cmd.params[0], 0, 8);
return 0; return 0;
} }
@ -423,10 +423,10 @@ int dpbp_get_irq_enable(struct fsl_mc_io *mc_io,
* Return: '0' on Success; Error code otherwise. * Return: '0' on Success; Error code otherwise.
*/ */
int dpbp_set_irq_mask(struct fsl_mc_io *mc_io, int dpbp_set_irq_mask(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
uint8_t irq_index, u8 irq_index,
uint32_t mask) u32 mask)
{ {
struct mc_command cmd = { 0 }; struct mc_command cmd = { 0 };
@ -454,10 +454,10 @@ int dpbp_set_irq_mask(struct fsl_mc_io *mc_io,
* Return: '0' on Success; Error code otherwise. * Return: '0' on Success; Error code otherwise.
*/ */
int dpbp_get_irq_mask(struct fsl_mc_io *mc_io, int dpbp_get_irq_mask(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
uint8_t irq_index, u8 irq_index,
uint32_t *mask) u32 *mask)
{ {
struct mc_command cmd = { 0 }; struct mc_command cmd = { 0 };
int err; int err;
@ -473,7 +473,7 @@ int dpbp_get_irq_mask(struct fsl_mc_io *mc_io,
return err; return err;
/* retrieve response parameters */ /* retrieve response parameters */
*mask = (uint32_t)mc_dec(cmd.params[0], 0, 32); *mask = (u32)mc_dec(cmd.params[0], 0, 32);
return 0; return 0;
} }
@ -491,10 +491,10 @@ int dpbp_get_irq_mask(struct fsl_mc_io *mc_io,
* Return: '0' on Success; Error code otherwise. * Return: '0' on Success; Error code otherwise.
*/ */
int dpbp_get_irq_status(struct fsl_mc_io *mc_io, int dpbp_get_irq_status(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
uint8_t irq_index, u8 irq_index,
uint32_t *status) u32 *status)
{ {
struct mc_command cmd = { 0 }; struct mc_command cmd = { 0 };
int err; int err;
@ -510,7 +510,7 @@ int dpbp_get_irq_status(struct fsl_mc_io *mc_io,
return err; return err;
/* retrieve response parameters */ /* retrieve response parameters */
*status = (uint32_t)mc_dec(cmd.params[0], 0, 32); *status = (u32)mc_dec(cmd.params[0], 0, 32);
return 0; return 0;
} }
@ -528,10 +528,10 @@ int dpbp_get_irq_status(struct fsl_mc_io *mc_io,
* Return: '0' on Success; Error code otherwise. * Return: '0' on Success; Error code otherwise.
*/ */
int dpbp_clear_irq_status(struct fsl_mc_io *mc_io, int dpbp_clear_irq_status(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
uint8_t irq_index, u8 irq_index,
uint32_t status) u32 status)
{ {
struct mc_command cmd = { 0 }; struct mc_command cmd = { 0 };
@ -556,8 +556,8 @@ int dpbp_clear_irq_status(struct fsl_mc_io *mc_io,
* Return: '0' on Success; Error code otherwise. * Return: '0' on Success; Error code otherwise.
*/ */
int dpbp_get_attributes(struct fsl_mc_io *mc_io, int dpbp_get_attributes(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
struct dpbp_attr *attr) struct dpbp_attr *attr)
{ {
struct mc_command cmd = { 0 }; struct mc_command cmd = { 0 };
@ -573,10 +573,10 @@ int dpbp_get_attributes(struct fsl_mc_io *mc_io,
return err; return err;
/* retrieve response parameters */ /* retrieve response parameters */
attr->bpid = (uint16_t)mc_dec(cmd.params[0], 16, 16); attr->bpid = (u16)mc_dec(cmd.params[0], 16, 16);
attr->id = (int)mc_dec(cmd.params[0], 32, 32); attr->id = (int)mc_dec(cmd.params[0], 32, 32);
attr->version.major = (uint16_t)mc_dec(cmd.params[1], 0, 16); attr->version.major = (u16)mc_dec(cmd.params[1], 0, 16);
attr->version.minor = (uint16_t)mc_dec(cmd.params[1], 16, 16); attr->version.minor = (u16)mc_dec(cmd.params[1], 16, 16);
return 0; return 0;
} }
EXPORT_SYMBOL(dpbp_get_attributes); EXPORT_SYMBOL(dpbp_get_attributes);

View File

@ -52,9 +52,9 @@
* Return: '0' on Success; Error code otherwise. * Return: '0' on Success; Error code otherwise.
*/ */
int dpmcp_open(struct fsl_mc_io *mc_io, int dpmcp_open(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
int dpmcp_id, int dpmcp_id,
uint16_t *token) u16 *token)
{ {
struct mc_command cmd = { 0 }; struct mc_command cmd = { 0 };
int err; int err;
@ -87,8 +87,8 @@ int dpmcp_open(struct fsl_mc_io *mc_io,
* Return: '0' on Success; Error code otherwise. * Return: '0' on Success; Error code otherwise.
*/ */
int dpmcp_close(struct fsl_mc_io *mc_io, int dpmcp_close(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token) u16 token)
{ {
struct mc_command cmd = { 0 }; struct mc_command cmd = { 0 };
@ -122,9 +122,9 @@ int dpmcp_close(struct fsl_mc_io *mc_io,
* Return: '0' on Success; Error code otherwise. * Return: '0' on Success; Error code otherwise.
*/ */
int dpmcp_create(struct fsl_mc_io *mc_io, int dpmcp_create(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
const struct dpmcp_cfg *cfg, const struct dpmcp_cfg *cfg,
uint16_t *token) u16 *token)
{ {
struct mc_command cmd = { 0 }; struct mc_command cmd = { 0 };
int err; int err;
@ -154,8 +154,8 @@ int dpmcp_create(struct fsl_mc_io *mc_io,
* Return: '0' on Success; error code otherwise. * Return: '0' on Success; error code otherwise.
*/ */
int dpmcp_destroy(struct fsl_mc_io *mc_io, int dpmcp_destroy(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token) u16 token)
{ {
struct mc_command cmd = { 0 }; struct mc_command cmd = { 0 };
@ -176,8 +176,8 @@ int dpmcp_destroy(struct fsl_mc_io *mc_io,
* Return: '0' on Success; Error code otherwise. * Return: '0' on Success; Error code otherwise.
*/ */
int dpmcp_reset(struct fsl_mc_io *mc_io, int dpmcp_reset(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token) u16 token)
{ {
struct mc_command cmd = { 0 }; struct mc_command cmd = { 0 };
@ -200,9 +200,9 @@ int dpmcp_reset(struct fsl_mc_io *mc_io,
* Return: '0' on Success; Error code otherwise. * Return: '0' on Success; Error code otherwise.
*/ */
int dpmcp_set_irq(struct fsl_mc_io *mc_io, int dpmcp_set_irq(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
uint8_t irq_index, u8 irq_index,
struct dpmcp_irq_cfg *irq_cfg) struct dpmcp_irq_cfg *irq_cfg)
{ {
struct mc_command cmd = { 0 }; struct mc_command cmd = { 0 };
@ -232,9 +232,9 @@ int dpmcp_set_irq(struct fsl_mc_io *mc_io,
* Return: '0' on Success; Error code otherwise. * Return: '0' on Success; Error code otherwise.
*/ */
int dpmcp_get_irq(struct fsl_mc_io *mc_io, int dpmcp_get_irq(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
uint8_t irq_index, u8 irq_index,
int *type, int *type,
struct dpmcp_irq_cfg *irq_cfg) struct dpmcp_irq_cfg *irq_cfg)
{ {
@ -252,8 +252,8 @@ int dpmcp_get_irq(struct fsl_mc_io *mc_io,
return err; return err;
/* retrieve response parameters */ /* retrieve response parameters */
irq_cfg->val = (uint32_t)mc_dec(cmd.params[0], 0, 32); irq_cfg->val = (u32)mc_dec(cmd.params[0], 0, 32);
irq_cfg->paddr = (uint64_t)mc_dec(cmd.params[1], 0, 64); irq_cfg->paddr = (u64)mc_dec(cmd.params[1], 0, 64);
irq_cfg->user_irq_id = (int)mc_dec(cmd.params[2], 0, 32); irq_cfg->user_irq_id = (int)mc_dec(cmd.params[2], 0, 32);
*type = (int)mc_dec(cmd.params[2], 32, 32); *type = (int)mc_dec(cmd.params[2], 32, 32);
return 0; return 0;
@ -275,10 +275,10 @@ int dpmcp_get_irq(struct fsl_mc_io *mc_io,
* Return: '0' on Success; Error code otherwise. * Return: '0' on Success; Error code otherwise.
*/ */
int dpmcp_set_irq_enable(struct fsl_mc_io *mc_io, int dpmcp_set_irq_enable(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
uint8_t irq_index, u8 irq_index,
uint8_t en) u8 en)
{ {
struct mc_command cmd = { 0 }; struct mc_command cmd = { 0 };
@ -303,10 +303,10 @@ int dpmcp_set_irq_enable(struct fsl_mc_io *mc_io,
* Return: '0' on Success; Error code otherwise. * Return: '0' on Success; Error code otherwise.
*/ */
int dpmcp_get_irq_enable(struct fsl_mc_io *mc_io, int dpmcp_get_irq_enable(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
uint8_t irq_index, u8 irq_index,
uint8_t *en) u8 *en)
{ {
struct mc_command cmd = { 0 }; struct mc_command cmd = { 0 };
int err; int err;
@ -322,7 +322,7 @@ int dpmcp_get_irq_enable(struct fsl_mc_io *mc_io,
return err; return err;
/* retrieve response parameters */ /* retrieve response parameters */
*en = (uint8_t)mc_dec(cmd.params[0], 0, 8); *en = (u8)mc_dec(cmd.params[0], 0, 8);
return 0; return 0;
} }
@ -343,10 +343,10 @@ int dpmcp_get_irq_enable(struct fsl_mc_io *mc_io,
* Return: '0' on Success; Error code otherwise. * Return: '0' on Success; Error code otherwise.
*/ */
int dpmcp_set_irq_mask(struct fsl_mc_io *mc_io, int dpmcp_set_irq_mask(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
uint8_t irq_index, u8 irq_index,
uint32_t mask) u32 mask)
{ {
struct mc_command cmd = { 0 }; struct mc_command cmd = { 0 };
@ -374,10 +374,10 @@ int dpmcp_set_irq_mask(struct fsl_mc_io *mc_io,
* Return: '0' on Success; Error code otherwise. * Return: '0' on Success; Error code otherwise.
*/ */
int dpmcp_get_irq_mask(struct fsl_mc_io *mc_io, int dpmcp_get_irq_mask(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
uint8_t irq_index, u8 irq_index,
uint32_t *mask) u32 *mask)
{ {
struct mc_command cmd = { 0 }; struct mc_command cmd = { 0 };
int err; int err;
@ -393,7 +393,7 @@ int dpmcp_get_irq_mask(struct fsl_mc_io *mc_io,
return err; return err;
/* retrieve response parameters */ /* retrieve response parameters */
*mask = (uint32_t)mc_dec(cmd.params[0], 0, 32); *mask = (u32)mc_dec(cmd.params[0], 0, 32);
return 0; return 0;
} }
@ -411,10 +411,10 @@ int dpmcp_get_irq_mask(struct fsl_mc_io *mc_io,
* Return: '0' on Success; Error code otherwise. * Return: '0' on Success; Error code otherwise.
*/ */
int dpmcp_get_irq_status(struct fsl_mc_io *mc_io, int dpmcp_get_irq_status(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
uint8_t irq_index, u8 irq_index,
uint32_t *status) u32 *status)
{ {
struct mc_command cmd = { 0 }; struct mc_command cmd = { 0 };
int err; int err;
@ -430,7 +430,7 @@ int dpmcp_get_irq_status(struct fsl_mc_io *mc_io,
return err; return err;
/* retrieve response parameters */ /* retrieve response parameters */
*status = (uint32_t)mc_dec(cmd.params[0], 0, 32); *status = (u32)mc_dec(cmd.params[0], 0, 32);
return 0; return 0;
} }
@ -448,10 +448,10 @@ int dpmcp_get_irq_status(struct fsl_mc_io *mc_io,
* Return: '0' on Success; Error code otherwise. * Return: '0' on Success; Error code otherwise.
*/ */
int dpmcp_clear_irq_status(struct fsl_mc_io *mc_io, int dpmcp_clear_irq_status(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
uint8_t irq_index, u8 irq_index,
uint32_t status) u32 status)
{ {
struct mc_command cmd = { 0 }; struct mc_command cmd = { 0 };
@ -476,8 +476,8 @@ int dpmcp_clear_irq_status(struct fsl_mc_io *mc_io,
* Return: '0' on Success; Error code otherwise. * Return: '0' on Success; Error code otherwise.
*/ */
int dpmcp_get_attributes(struct fsl_mc_io *mc_io, int dpmcp_get_attributes(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
struct dpmcp_attr *attr) struct dpmcp_attr *attr)
{ {
struct mc_command cmd = { 0 }; struct mc_command cmd = { 0 };
@ -494,7 +494,7 @@ int dpmcp_get_attributes(struct fsl_mc_io *mc_io,
/* retrieve response parameters */ /* retrieve response parameters */
attr->id = (int)mc_dec(cmd.params[0], 32, 32); attr->id = (int)mc_dec(cmd.params[0], 32, 32);
attr->version.major = (uint16_t)mc_dec(cmd.params[1], 0, 16); attr->version.major = (u16)mc_dec(cmd.params[1], 0, 16);
attr->version.minor = (uint16_t)mc_dec(cmd.params[1], 16, 16); attr->version.minor = (u16)mc_dec(cmd.params[1], 16, 16);
return 0; return 0;
} }

View File

@ -44,7 +44,7 @@
* Return: '0' on Success; Error code otherwise. * Return: '0' on Success; Error code otherwise.
*/ */
int mc_get_version(struct fsl_mc_io *mc_io, int mc_get_version(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
struct mc_version *mc_ver_info) struct mc_version *mc_ver_info)
{ {
struct mc_command cmd = { 0 }; struct mc_command cmd = { 0 };
@ -77,7 +77,7 @@ int mc_get_version(struct fsl_mc_io *mc_io,
* Return: '0' on Success; Error code otherwise. * Return: '0' on Success; Error code otherwise.
*/ */
int dpmng_get_container_id(struct fsl_mc_io *mc_io, int dpmng_get_container_id(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
int *container_id) int *container_id)
{ {
struct mc_command cmd = { 0 }; struct mc_command cmd = { 0 };

View File

@ -126,7 +126,7 @@ static void check_plugged_state_change(struct fsl_mc_device *mc_dev,
struct dprc_obj_desc *obj_desc) struct dprc_obj_desc *obj_desc)
{ {
int error; int error;
uint32_t plugged_flag_at_mc = u32 plugged_flag_at_mc =
(obj_desc->state & DPRC_OBJ_STATE_PLUGGED); (obj_desc->state & DPRC_OBJ_STATE_PLUGGED);
if (plugged_flag_at_mc != if (plugged_flag_at_mc !=

View File

@ -46,9 +46,9 @@
* @warning Required before any operation on the object. * @warning Required before any operation on the object.
*/ */
int dprc_open(struct fsl_mc_io *mc_io, int dprc_open(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
int container_id, int container_id,
uint16_t *token) u16 *token)
{ {
struct mc_command cmd = { 0 }; struct mc_command cmd = { 0 };
int err; int err;
@ -82,8 +82,8 @@ EXPORT_SYMBOL(dprc_open);
* Return: '0' on Success; Error code otherwise. * Return: '0' on Success; Error code otherwise.
*/ */
int dprc_close(struct fsl_mc_io *mc_io, int dprc_close(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token) u16 token)
{ {
struct mc_command cmd = { 0 }; struct mc_command cmd = { 0 };
@ -108,11 +108,11 @@ EXPORT_SYMBOL(dprc_close);
* Return: '0' on Success; Error code otherwise. * Return: '0' on Success; Error code otherwise.
*/ */
int dprc_create_container(struct fsl_mc_io *mc_io, int dprc_create_container(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
struct dprc_cfg *cfg, struct dprc_cfg *cfg,
int *child_container_id, int *child_container_id,
uint64_t *child_portal_offset) u64 *child_portal_offset)
{ {
struct mc_command cmd = { 0 }; struct mc_command cmd = { 0 };
int err; int err;
@ -176,8 +176,8 @@ int dprc_create_container(struct fsl_mc_io *mc_io,
* *
*/ */
int dprc_destroy_container(struct fsl_mc_io *mc_io, int dprc_destroy_container(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
int child_container_id) int child_container_id)
{ {
struct mc_command cmd = { 0 }; struct mc_command cmd = { 0 };
@ -214,8 +214,8 @@ int dprc_destroy_container(struct fsl_mc_io *mc_io,
* Return: '0' on Success; Error code otherwise. * Return: '0' on Success; Error code otherwise.
*/ */
int dprc_reset_container(struct fsl_mc_io *mc_io, int dprc_reset_container(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
int child_container_id) int child_container_id)
{ {
struct mc_command cmd = { 0 }; struct mc_command cmd = { 0 };
@ -242,9 +242,9 @@ int dprc_reset_container(struct fsl_mc_io *mc_io,
* Return: '0' on Success; Error code otherwise. * Return: '0' on Success; Error code otherwise.
*/ */
int dprc_get_irq(struct fsl_mc_io *mc_io, int dprc_get_irq(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
uint8_t irq_index, u8 irq_index,
int *type, int *type,
struct dprc_irq_cfg *irq_cfg) struct dprc_irq_cfg *irq_cfg)
{ {
@ -282,9 +282,9 @@ int dprc_get_irq(struct fsl_mc_io *mc_io,
* Return: '0' on Success; Error code otherwise. * Return: '0' on Success; Error code otherwise.
*/ */
int dprc_set_irq(struct fsl_mc_io *mc_io, int dprc_set_irq(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
uint8_t irq_index, u8 irq_index,
struct dprc_irq_cfg *irq_cfg) struct dprc_irq_cfg *irq_cfg)
{ {
struct mc_command cmd = { 0 }; struct mc_command cmd = { 0 };
@ -313,10 +313,10 @@ int dprc_set_irq(struct fsl_mc_io *mc_io,
* Return: '0' on Success; Error code otherwise. * Return: '0' on Success; Error code otherwise.
*/ */
int dprc_get_irq_enable(struct fsl_mc_io *mc_io, int dprc_get_irq_enable(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
uint8_t irq_index, u8 irq_index,
uint8_t *en) u8 *en)
{ {
struct mc_command cmd = { 0 }; struct mc_command cmd = { 0 };
int err; int err;
@ -353,10 +353,10 @@ int dprc_get_irq_enable(struct fsl_mc_io *mc_io,
* Return: '0' on Success; Error code otherwise. * Return: '0' on Success; Error code otherwise.
*/ */
int dprc_set_irq_enable(struct fsl_mc_io *mc_io, int dprc_set_irq_enable(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
uint8_t irq_index, u8 irq_index,
uint8_t en) u8 en)
{ {
struct mc_command cmd = { 0 }; struct mc_command cmd = { 0 };
@ -384,10 +384,10 @@ int dprc_set_irq_enable(struct fsl_mc_io *mc_io,
* Return: '0' on Success; Error code otherwise. * Return: '0' on Success; Error code otherwise.
*/ */
int dprc_get_irq_mask(struct fsl_mc_io *mc_io, int dprc_get_irq_mask(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
uint8_t irq_index, u8 irq_index,
uint32_t *mask) u32 *mask)
{ {
struct mc_command cmd = { 0 }; struct mc_command cmd = { 0 };
int err; int err;
@ -425,10 +425,10 @@ int dprc_get_irq_mask(struct fsl_mc_io *mc_io,
* Return: '0' on Success; Error code otherwise. * Return: '0' on Success; Error code otherwise.
*/ */
int dprc_set_irq_mask(struct fsl_mc_io *mc_io, int dprc_set_irq_mask(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
uint8_t irq_index, u8 irq_index,
uint32_t mask) u32 mask)
{ {
struct mc_command cmd = { 0 }; struct mc_command cmd = { 0 };
@ -455,10 +455,10 @@ int dprc_set_irq_mask(struct fsl_mc_io *mc_io,
* Return: '0' on Success; Error code otherwise. * Return: '0' on Success; Error code otherwise.
*/ */
int dprc_get_irq_status(struct fsl_mc_io *mc_io, int dprc_get_irq_status(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
uint8_t irq_index, u8 irq_index,
uint32_t *status) u32 *status)
{ {
struct mc_command cmd = { 0 }; struct mc_command cmd = { 0 };
int err; int err;
@ -492,10 +492,10 @@ int dprc_get_irq_status(struct fsl_mc_io *mc_io,
* Return: '0' on Success; Error code otherwise. * Return: '0' on Success; Error code otherwise.
*/ */
int dprc_clear_irq_status(struct fsl_mc_io *mc_io, int dprc_clear_irq_status(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
uint8_t irq_index, u8 irq_index,
uint32_t status) u32 status)
{ {
struct mc_command cmd = { 0 }; struct mc_command cmd = { 0 };
@ -519,8 +519,8 @@ int dprc_clear_irq_status(struct fsl_mc_io *mc_io,
* Return: '0' on Success; Error code otherwise. * Return: '0' on Success; Error code otherwise.
*/ */
int dprc_get_attributes(struct fsl_mc_io *mc_io, int dprc_get_attributes(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
struct dprc_attributes *attr) struct dprc_attributes *attr)
{ {
struct mc_command cmd = { 0 }; struct mc_command cmd = { 0 };
@ -573,11 +573,11 @@ int dprc_get_attributes(struct fsl_mc_io *mc_io,
* @warning Only the parent container is allowed to change a child policy. * @warning Only the parent container is allowed to change a child policy.
*/ */
int dprc_set_res_quota(struct fsl_mc_io *mc_io, int dprc_set_res_quota(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
int child_container_id, int child_container_id,
char *type, char *type,
uint16_t quota) u16 quota)
{ {
struct mc_command cmd = { 0 }; struct mc_command cmd = { 0 };
@ -623,11 +623,11 @@ int dprc_set_res_quota(struct fsl_mc_io *mc_io,
* Return: '0' on Success; Error code otherwise. * Return: '0' on Success; Error code otherwise.
*/ */
int dprc_get_res_quota(struct fsl_mc_io *mc_io, int dprc_get_res_quota(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
int child_container_id, int child_container_id,
char *type, char *type,
uint16_t *quota) u16 *quota)
{ {
struct mc_command cmd = { 0 }; struct mc_command cmd = { 0 };
int err; int err;
@ -697,8 +697,8 @@ int dprc_get_res_quota(struct fsl_mc_io *mc_io,
* Return: '0' on Success; Error code otherwise. * Return: '0' on Success; Error code otherwise.
*/ */
int dprc_assign(struct fsl_mc_io *mc_io, int dprc_assign(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
int container_id, int container_id,
struct dprc_res_req *res_req) struct dprc_res_req *res_req)
{ {
@ -748,8 +748,8 @@ int dprc_assign(struct fsl_mc_io *mc_io,
* Return: '0' on Success; Error code otherwise. * Return: '0' on Success; Error code otherwise.
*/ */
int dprc_unassign(struct fsl_mc_io *mc_io, int dprc_unassign(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
int child_container_id, int child_container_id,
struct dprc_res_req *res_req) struct dprc_res_req *res_req)
{ {
@ -794,8 +794,8 @@ int dprc_unassign(struct fsl_mc_io *mc_io,
* Return: '0' on Success; Error code otherwise. * Return: '0' on Success; Error code otherwise.
*/ */
int dprc_get_pool_count(struct fsl_mc_io *mc_io, int dprc_get_pool_count(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
int *pool_count) int *pool_count)
{ {
struct mc_command cmd = { 0 }; struct mc_command cmd = { 0 };
@ -832,8 +832,8 @@ int dprc_get_pool_count(struct fsl_mc_io *mc_io,
* Return: '0' on Success; Error code otherwise. * Return: '0' on Success; Error code otherwise.
*/ */
int dprc_get_pool(struct fsl_mc_io *mc_io, int dprc_get_pool(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
int pool_index, int pool_index,
char *type) char *type)
{ {
@ -882,8 +882,8 @@ int dprc_get_pool(struct fsl_mc_io *mc_io,
* Return: '0' on Success; Error code otherwise. * Return: '0' on Success; Error code otherwise.
*/ */
int dprc_get_obj_count(struct fsl_mc_io *mc_io, int dprc_get_obj_count(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
int *obj_count) int *obj_count)
{ {
struct mc_command cmd = { 0 }; struct mc_command cmd = { 0 };
@ -921,8 +921,8 @@ EXPORT_SYMBOL(dprc_get_obj_count);
* Return: '0' on Success; Error code otherwise. * Return: '0' on Success; Error code otherwise.
*/ */
int dprc_get_obj(struct fsl_mc_io *mc_io, int dprc_get_obj(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
int obj_index, int obj_index,
struct dprc_obj_desc *obj_desc) struct dprc_obj_desc *obj_desc)
{ {
@ -998,8 +998,8 @@ EXPORT_SYMBOL(dprc_get_obj);
* *
*/ */
int dprc_get_obj_desc(struct fsl_mc_io *mc_io, int dprc_get_obj_desc(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
char *obj_type, char *obj_type,
int obj_id, int obj_id,
struct dprc_obj_desc *obj_desc) struct dprc_obj_desc *obj_desc)
@ -1036,12 +1036,12 @@ int dprc_get_obj_desc(struct fsl_mc_io *mc_io,
/* retrieve response parameters */ /* retrieve response parameters */
obj_desc->id = (int)mc_dec(cmd.params[0], 32, 32); obj_desc->id = (int)mc_dec(cmd.params[0], 32, 32);
obj_desc->vendor = (uint16_t)mc_dec(cmd.params[1], 0, 16); obj_desc->vendor = (u16)mc_dec(cmd.params[1], 0, 16);
obj_desc->vendor = (uint8_t)mc_dec(cmd.params[1], 16, 8); obj_desc->vendor = (u8)mc_dec(cmd.params[1], 16, 8);
obj_desc->region_count = (uint8_t)mc_dec(cmd.params[1], 24, 8); obj_desc->region_count = (u8)mc_dec(cmd.params[1], 24, 8);
obj_desc->state = (uint32_t)mc_dec(cmd.params[1], 32, 32); obj_desc->state = (u32)mc_dec(cmd.params[1], 32, 32);
obj_desc->ver_major = (uint16_t)mc_dec(cmd.params[2], 0, 16); obj_desc->ver_major = (u16)mc_dec(cmd.params[2], 0, 16);
obj_desc->ver_minor = (uint16_t)mc_dec(cmd.params[2], 16, 16); obj_desc->ver_minor = (u16)mc_dec(cmd.params[2], 16, 16);
obj_desc->type[0] = (char)mc_dec(cmd.params[3], 0, 8); obj_desc->type[0] = (char)mc_dec(cmd.params[3], 0, 8);
obj_desc->type[1] = (char)mc_dec(cmd.params[3], 8, 8); obj_desc->type[1] = (char)mc_dec(cmd.params[3], 8, 8);
obj_desc->type[2] = (char)mc_dec(cmd.params[3], 16, 8); obj_desc->type[2] = (char)mc_dec(cmd.params[3], 16, 8);
@ -1092,11 +1092,11 @@ EXPORT_SYMBOL(dprc_get_obj_desc);
* Return: '0' on Success; Error code otherwise. * Return: '0' on Success; Error code otherwise.
*/ */
int dprc_set_obj_irq(struct fsl_mc_io *mc_io, int dprc_set_obj_irq(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
char *obj_type, char *obj_type,
int obj_id, int obj_id,
uint8_t irq_index, u8 irq_index,
struct dprc_irq_cfg *irq_cfg) struct dprc_irq_cfg *irq_cfg)
{ {
struct mc_command cmd = { 0 }; struct mc_command cmd = { 0 };
@ -1147,11 +1147,11 @@ EXPORT_SYMBOL(dprc_set_obj_irq);
* Return: '0' on Success; Error code otherwise. * Return: '0' on Success; Error code otherwise.
*/ */
int dprc_get_obj_irq(struct fsl_mc_io *mc_io, int dprc_get_obj_irq(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
char *obj_type, char *obj_type,
int obj_id, int obj_id,
uint8_t irq_index, u8 irq_index,
int *type, int *type,
struct dprc_irq_cfg *irq_cfg) struct dprc_irq_cfg *irq_cfg)
{ {
@ -1187,8 +1187,8 @@ int dprc_get_obj_irq(struct fsl_mc_io *mc_io,
return err; return err;
/* retrieve response parameters */ /* retrieve response parameters */
irq_cfg->val = (uint32_t)mc_dec(cmd.params[0], 0, 32); irq_cfg->val = (u32)mc_dec(cmd.params[0], 0, 32);
irq_cfg->paddr = (uint64_t)mc_dec(cmd.params[1], 0, 64); irq_cfg->paddr = (u64)mc_dec(cmd.params[1], 0, 64);
irq_cfg->user_irq_id = (int)mc_dec(cmd.params[2], 0, 32); irq_cfg->user_irq_id = (int)mc_dec(cmd.params[2], 0, 32);
*type = (int)mc_dec(cmd.params[2], 32, 32); *type = (int)mc_dec(cmd.params[2], 32, 32);
@ -1209,8 +1209,8 @@ EXPORT_SYMBOL(dprc_get_obj_irq);
* Return: '0' on Success; Error code otherwise. * Return: '0' on Success; Error code otherwise.
*/ */
int dprc_get_res_count(struct fsl_mc_io *mc_io, int dprc_get_res_count(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
char *type, char *type,
int *res_count) int *res_count)
{ {
@ -1262,8 +1262,8 @@ EXPORT_SYMBOL(dprc_get_res_count);
* Return: '0' on Success; Error code otherwise. * Return: '0' on Success; Error code otherwise.
*/ */
int dprc_get_res_ids(struct fsl_mc_io *mc_io, int dprc_get_res_ids(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
char *type, char *type,
struct dprc_res_ids_range_desc *range_desc) struct dprc_res_ids_range_desc *range_desc)
{ {
@ -1320,11 +1320,11 @@ EXPORT_SYMBOL(dprc_get_res_ids);
* Return: '0' on Success; Error code otherwise. * Return: '0' on Success; Error code otherwise.
*/ */
int dprc_get_obj_region(struct fsl_mc_io *mc_io, int dprc_get_obj_region(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
char *obj_type, char *obj_type,
int obj_id, int obj_id,
uint8_t region_index, u8 region_index,
struct dprc_region_desc *region_desc) struct dprc_region_desc *region_desc)
{ {
struct mc_command cmd = { 0 }; struct mc_command cmd = { 0 };
@ -1377,8 +1377,8 @@ EXPORT_SYMBOL(dprc_get_obj_region);
* Return: '0' on Success; Error code otherwise. * Return: '0' on Success; Error code otherwise.
*/ */
int dprc_set_obj_label(struct fsl_mc_io *mc_io, int dprc_set_obj_label(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
char *obj_type, char *obj_type,
int obj_id, int obj_id,
char *label) char *label)
@ -1449,8 +1449,8 @@ EXPORT_SYMBOL(dprc_set_obj_label);
* Return: '0' on Success; Error code otherwise. * Return: '0' on Success; Error code otherwise.
*/ */
int dprc_connect(struct fsl_mc_io *mc_io, int dprc_connect(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
const struct dprc_endpoint *endpoint1, const struct dprc_endpoint *endpoint1,
const struct dprc_endpoint *endpoint2, const struct dprc_endpoint *endpoint2,
const struct dprc_connection_cfg *cfg) const struct dprc_connection_cfg *cfg)
@ -1514,8 +1514,8 @@ int dprc_connect(struct fsl_mc_io *mc_io,
* Return: '0' on Success; Error code otherwise. * Return: '0' on Success; Error code otherwise.
*/ */
int dprc_disconnect(struct fsl_mc_io *mc_io, int dprc_disconnect(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
const struct dprc_endpoint *endpoint) const struct dprc_endpoint *endpoint)
{ {
struct mc_command cmd = { 0 }; struct mc_command cmd = { 0 };
@ -1560,8 +1560,8 @@ int dprc_disconnect(struct fsl_mc_io *mc_io,
* Return: '0' on Success; -ENAVAIL if connection does not exist. * Return: '0' on Success; -ENAVAIL if connection does not exist.
*/ */
int dprc_get_connection(struct fsl_mc_io *mc_io, int dprc_get_connection(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
const struct dprc_endpoint *endpoint1, const struct dprc_endpoint *endpoint1,
struct dprc_endpoint *endpoint2, struct dprc_endpoint *endpoint2,
int *state) int *state)

View File

@ -277,7 +277,7 @@ EXPORT_SYMBOL_GPL(fsl_mc_resource_free);
* portal is allocated from its own MC bus. * portal is allocated from its own MC bus.
*/ */
int __must_check fsl_mc_portal_allocate(struct fsl_mc_device *mc_dev, int __must_check fsl_mc_portal_allocate(struct fsl_mc_device *mc_dev,
uint16_t mc_io_flags, u16 mc_io_flags,
struct fsl_mc_io **new_mc_io) struct fsl_mc_io **new_mc_io)
{ {
struct fsl_mc_device *mc_bus_dev; struct fsl_mc_device *mc_bus_dev;
@ -363,7 +363,7 @@ EXPORT_SYMBOL_GPL(fsl_mc_portal_free);
int fsl_mc_portal_reset(struct fsl_mc_io *mc_io) int fsl_mc_portal_reset(struct fsl_mc_io *mc_io)
{ {
int error; int error;
uint16_t token; u16 token;
struct fsl_mc_resource *resource = mc_io->resource; struct fsl_mc_resource *resource = mc_io->resource;
struct fsl_mc_device *mc_dev = resource->data; struct fsl_mc_device *mc_dev = resource->data;

View File

@ -207,7 +207,7 @@ void fsl_mc_driver_unregister(struct fsl_mc_driver *mc_driver)
EXPORT_SYMBOL_GPL(fsl_mc_driver_unregister); EXPORT_SYMBOL_GPL(fsl_mc_driver_unregister);
static int get_dprc_icid(struct fsl_mc_io *mc_io, static int get_dprc_icid(struct fsl_mc_io *mc_io,
int container_id, uint16_t *icid) int container_id, u16 *icid)
{ {
u16 dprc_handle; u16 dprc_handle;
struct dprc_attributes attr; struct dprc_attributes attr;
@ -507,7 +507,7 @@ static int parse_mc_ranges(struct device *dev,
int *mc_addr_cells, int *mc_addr_cells,
int *mc_size_cells, int *mc_size_cells,
const __be32 **ranges_start, const __be32 **ranges_start,
uint8_t *num_ranges) u8 *num_ranges)
{ {
const __be32 *prop; const __be32 *prop;
int range_tuple_cell_count; int range_tuple_cell_count;
@ -555,7 +555,7 @@ static int parse_mc_ranges(struct device *dev,
static int get_mc_addr_translation_ranges(struct device *dev, static int get_mc_addr_translation_ranges(struct device *dev,
struct fsl_mc_addr_translation_range struct fsl_mc_addr_translation_range
**ranges, **ranges,
uint8_t *num_ranges) u8 *num_ranges)
{ {
int error; int error;
int paddr_cells; int paddr_cells;

View File

@ -52,7 +52,7 @@
#define MC_CMD_COMPLETION_POLLING_MAX_SLEEP_USECS 500 #define MC_CMD_COMPLETION_POLLING_MAX_SLEEP_USECS 500
#define MC_CMD_HDR_READ_CMDID(_hdr) \ #define MC_CMD_HDR_READ_CMDID(_hdr) \
((uint16_t)mc_dec((_hdr), MC_CMD_HDR_CMDID_O, MC_CMD_HDR_CMDID_S)) ((u16)mc_dec((_hdr), MC_CMD_HDR_CMDID_O, MC_CMD_HDR_CMDID_S))
/** /**
* Creates an MC I/O object * Creates an MC I/O object
@ -69,9 +69,9 @@
*/ */
int __must_check fsl_create_mc_io(struct device *dev, int __must_check fsl_create_mc_io(struct device *dev,
phys_addr_t mc_portal_phys_addr, phys_addr_t mc_portal_phys_addr,
uint32_t mc_portal_size, u32 mc_portal_size,
struct fsl_mc_resource *resource, struct fsl_mc_resource *resource,
uint32_t flags, struct fsl_mc_io **new_mc_io) u32 flags, struct fsl_mc_io **new_mc_io)
{ {
struct fsl_mc_io *mc_io; struct fsl_mc_io *mc_io;
void __iomem *mc_portal_virt_addr; void __iomem *mc_portal_virt_addr;

View File

@ -39,47 +39,47 @@
struct fsl_mc_io; struct fsl_mc_io;
int dpbp_open(struct fsl_mc_io *mc_io, int dpbp_open(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
int dpbp_id, int dpbp_id,
uint16_t *token); u16 *token);
int dpbp_close(struct fsl_mc_io *mc_io, int dpbp_close(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token); u16 token);
/** /**
* struct dpbp_cfg - Structure representing DPBP configuration * struct dpbp_cfg - Structure representing DPBP configuration
* @options: place holder * @options: place holder
*/ */
struct dpbp_cfg { struct dpbp_cfg {
uint32_t options; u32 options;
}; };
int dpbp_create(struct fsl_mc_io *mc_io, int dpbp_create(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
const struct dpbp_cfg *cfg, const struct dpbp_cfg *cfg,
uint16_t *token); u16 *token);
int dpbp_destroy(struct fsl_mc_io *mc_io, int dpbp_destroy(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token); u16 token);
int dpbp_enable(struct fsl_mc_io *mc_io, int dpbp_enable(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token); u16 token);
int dpbp_disable(struct fsl_mc_io *mc_io, int dpbp_disable(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token); u16 token);
int dpbp_is_enabled(struct fsl_mc_io *mc_io, int dpbp_is_enabled(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
int *en); int *en);
int dpbp_reset(struct fsl_mc_io *mc_io, int dpbp_reset(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token); u16 token);
/** /**
* struct dpbp_irq_cfg - IRQ configuration * struct dpbp_irq_cfg - IRQ configuration
@ -88,59 +88,59 @@ int dpbp_reset(struct fsl_mc_io *mc_io,
* @user_irq_id: A user defined number associated with this IRQ * @user_irq_id: A user defined number associated with this IRQ
*/ */
struct dpbp_irq_cfg { struct dpbp_irq_cfg {
uint64_t addr; u64 addr;
uint32_t val; u32 val;
int user_irq_id; int user_irq_id;
}; };
int dpbp_set_irq(struct fsl_mc_io *mc_io, int dpbp_set_irq(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
uint8_t irq_index, u8 irq_index,
struct dpbp_irq_cfg *irq_cfg); struct dpbp_irq_cfg *irq_cfg);
int dpbp_get_irq(struct fsl_mc_io *mc_io, int dpbp_get_irq(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
uint8_t irq_index, u8 irq_index,
int *type, int *type,
struct dpbp_irq_cfg *irq_cfg); struct dpbp_irq_cfg *irq_cfg);
int dpbp_set_irq_enable(struct fsl_mc_io *mc_io, int dpbp_set_irq_enable(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
uint8_t irq_index, u8 irq_index,
uint8_t en); u8 en);
int dpbp_get_irq_enable(struct fsl_mc_io *mc_io, int dpbp_get_irq_enable(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
uint8_t irq_index, u8 irq_index,
uint8_t *en); u8 *en);
int dpbp_set_irq_mask(struct fsl_mc_io *mc_io, int dpbp_set_irq_mask(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
uint8_t irq_index, u8 irq_index,
uint32_t mask); u32 mask);
int dpbp_get_irq_mask(struct fsl_mc_io *mc_io, int dpbp_get_irq_mask(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
uint8_t irq_index, u8 irq_index,
uint32_t *mask); u32 *mask);
int dpbp_get_irq_status(struct fsl_mc_io *mc_io, int dpbp_get_irq_status(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
uint8_t irq_index, u8 irq_index,
uint32_t *status); u32 *status);
int dpbp_clear_irq_status(struct fsl_mc_io *mc_io, int dpbp_clear_irq_status(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
uint8_t irq_index, u8 irq_index,
uint32_t status); u32 status);
/** /**
* struct dpbp_attr - Structure representing DPBP attributes * struct dpbp_attr - Structure representing DPBP attributes
@ -157,15 +157,15 @@ struct dpbp_attr {
* @minor: DPBP minor version * @minor: DPBP minor version
*/ */
struct { struct {
uint16_t major; u16 major;
uint16_t minor; u16 minor;
} version; } version;
uint16_t bpid; u16 bpid;
}; };
int dpbp_get_attributes(struct fsl_mc_io *mc_io, int dpbp_get_attributes(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
struct dpbp_attr *attr); struct dpbp_attr *attr);
/** @} */ /** @} */

View File

@ -53,17 +53,17 @@ struct fsl_mc_io;
* and/or bug fixes that have no impact on API * and/or bug fixes that have no impact on API
*/ */
struct mc_version { struct mc_version {
uint32_t major; u32 major;
uint32_t minor; u32 minor;
uint32_t revision; u32 revision;
}; };
int mc_get_version(struct fsl_mc_io *mc_io, int mc_get_version(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
struct mc_version *mc_ver_info); struct mc_version *mc_ver_info);
int dpmng_get_container_id(struct fsl_mc_io *mc_io, int dpmng_get_container_id(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
int *container_id); int *container_id);
#endif /* __FSL_DPMNG_H */ #endif /* __FSL_DPMNG_H */

View File

@ -45,7 +45,7 @@ struct fsl_mc_io;
* container, in case the ICID is not selected by the user and should be * container, in case the ICID is not selected by the user and should be
* allocated by the DPRC from the pool of ICIDs. * allocated by the DPRC from the pool of ICIDs.
*/ */
#define DPRC_GET_ICID_FROM_POOL (uint16_t)(~(0)) #define DPRC_GET_ICID_FROM_POOL (u16)(~(0))
/** /**
* Set this value as the portal_id value in dprc_cfg structure when creating a * Set this value as the portal_id value in dprc_cfg structure when creating a
@ -55,13 +55,13 @@ struct fsl_mc_io;
#define DPRC_GET_PORTAL_ID_FROM_POOL (int)(~(0)) #define DPRC_GET_PORTAL_ID_FROM_POOL (int)(~(0))
int dprc_open(struct fsl_mc_io *mc_io, int dprc_open(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
int container_id, int container_id,
uint16_t *token); u16 *token);
int dprc_close(struct fsl_mc_io *mc_io, int dprc_close(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token); u16 token);
/** /**
* Container general options * Container general options
@ -115,27 +115,27 @@ int dprc_close(struct fsl_mc_io *mc_io,
* @label: Object's label * @label: Object's label
*/ */
struct dprc_cfg { struct dprc_cfg {
uint16_t icid; u16 icid;
int portal_id; int portal_id;
uint64_t options; u64 options;
char label[16]; char label[16];
}; };
int dprc_create_container(struct fsl_mc_io *mc_io, int dprc_create_container(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
struct dprc_cfg *cfg, struct dprc_cfg *cfg,
int *child_container_id, int *child_container_id,
uint64_t *child_portal_offset); u64 *child_portal_offset);
int dprc_destroy_container(struct fsl_mc_io *mc_io, int dprc_destroy_container(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
int child_container_id); int child_container_id);
int dprc_reset_container(struct fsl_mc_io *mc_io, int dprc_reset_container(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
int child_container_id); int child_container_id);
/* IRQ */ /* IRQ */
@ -176,59 +176,59 @@ int dprc_reset_container(struct fsl_mc_io *mc_io,
* @user_irq_id: A user defined number associated with this IRQ * @user_irq_id: A user defined number associated with this IRQ
*/ */
struct dprc_irq_cfg { struct dprc_irq_cfg {
uint64_t paddr; u64 paddr;
uint32_t val; u32 val;
int user_irq_id; int user_irq_id;
}; };
int dprc_set_irq(struct fsl_mc_io *mc_io, int dprc_set_irq(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
uint8_t irq_index, u8 irq_index,
struct dprc_irq_cfg *irq_cfg); struct dprc_irq_cfg *irq_cfg);
int dprc_get_irq(struct fsl_mc_io *mc_io, int dprc_get_irq(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
uint8_t irq_index, u8 irq_index,
int *type, int *type,
struct dprc_irq_cfg *irq_cfg); struct dprc_irq_cfg *irq_cfg);
int dprc_set_irq_enable(struct fsl_mc_io *mc_io, int dprc_set_irq_enable(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
uint8_t irq_index, u8 irq_index,
uint8_t en); u8 en);
int dprc_get_irq_enable(struct fsl_mc_io *mc_io, int dprc_get_irq_enable(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
uint8_t irq_index, u8 irq_index,
uint8_t *en); u8 *en);
int dprc_set_irq_mask(struct fsl_mc_io *mc_io, int dprc_set_irq_mask(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
uint8_t irq_index, u8 irq_index,
uint32_t mask); u32 mask);
int dprc_get_irq_mask(struct fsl_mc_io *mc_io, int dprc_get_irq_mask(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
uint8_t irq_index, u8 irq_index,
uint32_t *mask); u32 *mask);
int dprc_get_irq_status(struct fsl_mc_io *mc_io, int dprc_get_irq_status(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
uint8_t irq_index, u8 irq_index,
uint32_t *status); u32 *status);
int dprc_clear_irq_status(struct fsl_mc_io *mc_io, int dprc_clear_irq_status(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
uint8_t irq_index, u8 irq_index,
uint32_t status); u32 status);
/** /**
* struct dprc_attributes - Container attributes * struct dprc_attributes - Container attributes
@ -240,38 +240,38 @@ int dprc_clear_irq_status(struct fsl_mc_io *mc_io,
*/ */
struct dprc_attributes { struct dprc_attributes {
int container_id; int container_id;
uint16_t icid; u16 icid;
int portal_id; int portal_id;
uint64_t options; u64 options;
/** /**
* struct version - DPRC version * struct version - DPRC version
* @major: DPRC major version * @major: DPRC major version
* @minor: DPRC minor version * @minor: DPRC minor version
*/ */
struct { struct {
uint16_t major; u16 major;
uint16_t minor; u16 minor;
} version; } version;
}; };
int dprc_get_attributes(struct fsl_mc_io *mc_io, int dprc_get_attributes(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
struct dprc_attributes *attributes); struct dprc_attributes *attributes);
int dprc_set_res_quota(struct fsl_mc_io *mc_io, int dprc_set_res_quota(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
int child_container_id, int child_container_id,
char *type, char *type,
uint16_t quota); u16 quota);
int dprc_get_res_quota(struct fsl_mc_io *mc_io, int dprc_get_res_quota(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
int child_container_id, int child_container_id,
char *type, char *type,
uint16_t *quota); u16 *quota);
/* Resource request options */ /* Resource request options */
@ -312,37 +312,37 @@ int dprc_get_res_quota(struct fsl_mc_io *mc_io,
*/ */
struct dprc_res_req { struct dprc_res_req {
char type[16]; char type[16];
uint32_t num; u32 num;
uint32_t options; u32 options;
int id_base_align; int id_base_align;
}; };
int dprc_assign(struct fsl_mc_io *mc_io, int dprc_assign(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
int container_id, int container_id,
struct dprc_res_req *res_req); struct dprc_res_req *res_req);
int dprc_unassign(struct fsl_mc_io *mc_io, int dprc_unassign(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
int child_container_id, int child_container_id,
struct dprc_res_req *res_req); struct dprc_res_req *res_req);
int dprc_get_pool_count(struct fsl_mc_io *mc_io, int dprc_get_pool_count(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
int *pool_count); int *pool_count);
int dprc_get_pool(struct fsl_mc_io *mc_io, int dprc_get_pool(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
int pool_index, int pool_index,
char *type); char *type);
int dprc_get_obj_count(struct fsl_mc_io *mc_io, int dprc_get_obj_count(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
int *obj_count); int *obj_count);
/* Objects Attributes Flags */ /* Objects Attributes Flags */
@ -367,48 +367,48 @@ int dprc_get_obj_count(struct fsl_mc_io *mc_io,
struct dprc_obj_desc { struct dprc_obj_desc {
char type[16]; char type[16];
int id; int id;
uint16_t vendor; u16 vendor;
uint16_t ver_major; u16 ver_major;
uint16_t ver_minor; u16 ver_minor;
uint8_t irq_count; u8 irq_count;
uint8_t region_count; u8 region_count;
uint32_t state; u32 state;
char label[16]; char label[16];
}; };
int dprc_get_obj(struct fsl_mc_io *mc_io, int dprc_get_obj(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
int obj_index, int obj_index,
struct dprc_obj_desc *obj_desc); struct dprc_obj_desc *obj_desc);
int dprc_get_obj_desc(struct fsl_mc_io *mc_io, int dprc_get_obj_desc(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
char *obj_type, char *obj_type,
int obj_id, int obj_id,
struct dprc_obj_desc *obj_desc); struct dprc_obj_desc *obj_desc);
int dprc_set_obj_irq(struct fsl_mc_io *mc_io, int dprc_set_obj_irq(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
char *obj_type, char *obj_type,
int obj_id, int obj_id,
uint8_t irq_index, u8 irq_index,
struct dprc_irq_cfg *irq_cfg); struct dprc_irq_cfg *irq_cfg);
int dprc_get_obj_irq(struct fsl_mc_io *mc_io, int dprc_get_obj_irq(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
char *obj_type, char *obj_type,
int obj_id, int obj_id,
uint8_t irq_index, u8 irq_index,
int *type, int *type,
struct dprc_irq_cfg *irq_cfg); struct dprc_irq_cfg *irq_cfg);
int dprc_get_res_count(struct fsl_mc_io *mc_io, int dprc_get_res_count(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
char *type, char *type,
int *res_count); int *res_count);
@ -440,8 +440,8 @@ struct dprc_res_ids_range_desc {
}; };
int dprc_get_res_ids(struct fsl_mc_io *mc_io, int dprc_get_res_ids(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
char *type, char *type,
struct dprc_res_ids_range_desc *range_desc); struct dprc_res_ids_range_desc *range_desc);
@ -470,23 +470,23 @@ enum dprc_region_type {
* @type: Portal region type * @type: Portal region type
*/ */
struct dprc_region_desc { struct dprc_region_desc {
uint32_t base_offset; u32 base_offset;
uint32_t size; u32 size;
uint32_t flags; u32 flags;
enum dprc_region_type type; enum dprc_region_type type;
}; };
int dprc_get_obj_region(struct fsl_mc_io *mc_io, int dprc_get_obj_region(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
char *obj_type, char *obj_type,
int obj_id, int obj_id,
uint8_t region_index, u8 region_index,
struct dprc_region_desc *region_desc); struct dprc_region_desc *region_desc);
int dprc_set_obj_label(struct fsl_mc_io *mc_io, int dprc_set_obj_label(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
char *obj_type, char *obj_type,
int obj_id, int obj_id,
char *label); char *label);
@ -512,25 +512,25 @@ struct dprc_endpoint {
* @max_rate: Maximum rate (Mbits/s) * @max_rate: Maximum rate (Mbits/s)
*/ */
struct dprc_connection_cfg { struct dprc_connection_cfg {
uint32_t committed_rate; u32 committed_rate;
uint32_t max_rate; u32 max_rate;
}; };
int dprc_connect(struct fsl_mc_io *mc_io, int dprc_connect(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
const struct dprc_endpoint *endpoint1, const struct dprc_endpoint *endpoint1,
const struct dprc_endpoint *endpoint2, const struct dprc_endpoint *endpoint2,
const struct dprc_connection_cfg *cfg); const struct dprc_connection_cfg *cfg);
int dprc_disconnect(struct fsl_mc_io *mc_io, int dprc_disconnect(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
const struct dprc_endpoint *endpoint); const struct dprc_endpoint *endpoint);
int dprc_get_connection(struct fsl_mc_io *mc_io, int dprc_get_connection(struct fsl_mc_io *mc_io,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token, u16 token,
const struct dprc_endpoint *endpoint1, const struct dprc_endpoint *endpoint1,
struct dprc_endpoint *endpoint2, struct dprc_endpoint *endpoint2,
int *state); int *state);

View File

@ -35,21 +35,21 @@
#define MC_CMD_NUM_OF_PARAMS 7 #define MC_CMD_NUM_OF_PARAMS 7
#define MAKE_UMASK64(_width) \ #define MAKE_UMASK64(_width) \
((uint64_t)((_width) < 64 ? ((uint64_t)1 << (_width)) - 1 : -1)) ((u64)((_width) < 64 ? ((u64)1 << (_width)) - 1 : -1))
static inline uint64_t mc_enc(int lsoffset, int width, uint64_t val) static inline u64 mc_enc(int lsoffset, int width, u64 val)
{ {
return (uint64_t)(((uint64_t)val & MAKE_UMASK64(width)) << lsoffset); return (u64)(((u64)val & MAKE_UMASK64(width)) << lsoffset);
} }
static inline uint64_t mc_dec(uint64_t val, int lsoffset, int width) static inline u64 mc_dec(u64 val, int lsoffset, int width)
{ {
return (uint64_t)((val >> lsoffset) & MAKE_UMASK64(width)); return (u64)((val >> lsoffset) & MAKE_UMASK64(width));
} }
struct mc_command { struct mc_command {
uint64_t header; u64 header;
uint64_t params[MC_CMD_NUM_OF_PARAMS]; u64 params[MC_CMD_NUM_OF_PARAMS];
}; };
enum mc_cmd_status { enum mc_cmd_status {
@ -98,10 +98,10 @@ enum mc_cmd_status {
MC_CMD_HDR_STATUS_O, MC_CMD_HDR_STATUS_S)) MC_CMD_HDR_STATUS_O, MC_CMD_HDR_STATUS_S))
#define MC_CMD_HDR_READ_TOKEN(_hdr) \ #define MC_CMD_HDR_READ_TOKEN(_hdr) \
((uint16_t)mc_dec((_hdr), MC_CMD_HDR_TOKEN_O, MC_CMD_HDR_TOKEN_S)) ((u16)mc_dec((_hdr), MC_CMD_HDR_TOKEN_O, MC_CMD_HDR_TOKEN_S))
#define MC_CMD_HDR_READ_FLAGS(_hdr) \ #define MC_CMD_HDR_READ_FLAGS(_hdr) \
((uint32_t)mc_dec((_hdr), MC_CMD_HDR_FLAGS_O, MC_CMD_HDR_FLAGS_S)) ((u32)mc_dec((_hdr), MC_CMD_HDR_FLAGS_O, MC_CMD_HDR_FLAGS_S))
#define MC_EXT_OP(_ext, _param, _offset, _width, _type, _arg) \ #define MC_EXT_OP(_ext, _param, _offset, _width, _type, _arg) \
((_ext)[_param] |= mc_enc((_offset), (_width), _arg)) ((_ext)[_param] |= mc_enc((_offset), (_width), _arg))
@ -112,11 +112,11 @@ enum mc_cmd_status {
#define MC_RSP_OP(_cmd, _param, _offset, _width, _type, _arg) \ #define MC_RSP_OP(_cmd, _param, _offset, _width, _type, _arg) \
(_arg = (_type)mc_dec(_cmd.params[_param], (_offset), (_width))) (_arg = (_type)mc_dec(_cmd.params[_param], (_offset), (_width)))
static inline uint64_t mc_encode_cmd_header(uint16_t cmd_id, static inline u64 mc_encode_cmd_header(u16 cmd_id,
uint32_t cmd_flags, u32 cmd_flags,
uint16_t token) u16 token)
{ {
uint64_t hdr; u64 hdr;
hdr = mc_enc(MC_CMD_HDR_CMDID_O, MC_CMD_HDR_CMDID_S, cmd_id); hdr = mc_enc(MC_CMD_HDR_CMDID_O, MC_CMD_HDR_CMDID_S, cmd_id);
hdr |= mc_enc(MC_CMD_HDR_FLAGS_O, MC_CMD_HDR_FLAGS_S, hdr |= mc_enc(MC_CMD_HDR_FLAGS_O, MC_CMD_HDR_FLAGS_S,

View File

@ -34,7 +34,7 @@
*/ */
struct fsl_mc { struct fsl_mc {
struct fsl_mc_device *root_mc_bus_dev; struct fsl_mc_device *root_mc_bus_dev;
uint8_t num_translation_ranges; u8 num_translation_ranges;
struct fsl_mc_addr_translation_range *translation_ranges; struct fsl_mc_addr_translation_range *translation_ranges;
}; };
@ -49,8 +49,8 @@ struct fsl_mc {
*/ */
struct fsl_mc_addr_translation_range { struct fsl_mc_addr_translation_range {
enum dprc_region_type mc_region_type; enum dprc_region_type mc_region_type;
uint64_t start_mc_offset; u64 start_mc_offset;
uint64_t end_mc_offset; u64 end_mc_offset;
phys_addr_t start_phys_addr; phys_addr_t start_phys_addr;
}; };

View File

@ -56,8 +56,8 @@ struct mc_command;
*/ */
struct fsl_mc_io { struct fsl_mc_io {
struct device *dev; struct device *dev;
uint32_t flags; u32 flags;
uint32_t portal_size; u32 portal_size;
phys_addr_t portal_phys_addr; phys_addr_t portal_phys_addr;
void __iomem *portal_virt_addr; void __iomem *portal_virt_addr;
struct fsl_mc_resource *resource; struct fsl_mc_resource *resource;
@ -65,9 +65,9 @@ struct fsl_mc_io {
int __must_check fsl_create_mc_io(struct device *dev, int __must_check fsl_create_mc_io(struct device *dev,
phys_addr_t mc_portal_phys_addr, phys_addr_t mc_portal_phys_addr,
uint32_t mc_portal_size, u32 mc_portal_size,
struct fsl_mc_resource *resource, struct fsl_mc_resource *resource,
uint32_t flags, struct fsl_mc_io **new_mc_io); u32 flags, struct fsl_mc_io **new_mc_io);
void fsl_destroy_mc_io(struct fsl_mc_io *mc_io); void fsl_destroy_mc_io(struct fsl_mc_io *mc_io);

View File

@ -59,10 +59,10 @@ struct fsl_mc_driver {
* a MC object device driver. The last entry of the table has vendor set to 0x0 * a MC object device driver. The last entry of the table has vendor set to 0x0
*/ */
struct fsl_mc_device_match_id { struct fsl_mc_device_match_id {
uint16_t vendor; u16 vendor;
const char obj_type[16]; const char obj_type[16];
uint32_t ver_major; u32 ver_major;
uint32_t ver_minor; u32 ver_minor;
}; };
/** /**
@ -148,10 +148,10 @@ struct fsl_mc_resource {
*/ */
struct fsl_mc_device { struct fsl_mc_device {
struct device dev; struct device dev;
uint64_t dma_mask; u64 dma_mask;
uint16_t flags; u16 flags;
uint16_t icid; u16 icid;
uint16_t mc_handle; u16 mc_handle;
struct fsl_mc_io *mc_io; struct fsl_mc_io *mc_io;
struct dprc_obj_desc obj_desc; struct dprc_obj_desc obj_desc;
struct resource *regions; struct resource *regions;
@ -183,7 +183,7 @@ int __must_check __fsl_mc_driver_register(struct fsl_mc_driver *fsl_mc_driver,
void fsl_mc_driver_unregister(struct fsl_mc_driver *driver); void fsl_mc_driver_unregister(struct fsl_mc_driver *driver);
int __must_check fsl_mc_portal_allocate(struct fsl_mc_device *mc_dev, int __must_check fsl_mc_portal_allocate(struct fsl_mc_device *mc_dev,
uint16_t mc_io_flags, u16 mc_io_flags,
struct fsl_mc_io **new_mc_io); struct fsl_mc_io **new_mc_io);
void fsl_mc_portal_free(struct fsl_mc_io *mc_io); void fsl_mc_portal_free(struct fsl_mc_io *mc_io);