diff options
author | Laurentiu Tudor <laurentiu.tudor@nxp.com> | 2017-06-22 16:35:49 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-06-23 18:44:00 +0200 |
commit | c6ce019edb0c9c09b8150011d4f66181952631e9 (patch) | |
tree | 585701409e01de40b9e72d0d4b8cfdce150b4cdf /drivers/staging/fsl-mc/include/mc.h | |
parent | bb4a64b79f3b9973316e775f6c2910a98b6a562a (diff) | |
download | op-kernel-dev-c6ce019edb0c9c09b8150011d4f66181952631e9.zip op-kernel-dev-c6ce019edb0c9c09b8150011d4f66181952631e9.tar.gz |
staging: fsl-mc: decouple the mc-bus public headers from dprc.h
In its current form, the public headers of the mc-bus depend only on a
structure "dprc_obj_desc" defined in dprc.h. Move it to the bus public
header together with its associated defines and, in order to keep the
naming prefixes consistent rename it to "fsl_mc_obj_desc".
This will allow making dprc.h private in future patches.
Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/fsl-mc/include/mc.h')
-rw-r--r-- | drivers/staging/fsl-mc/include/mc.h | 41 |
1 files changed, 40 insertions, 1 deletions
diff --git a/drivers/staging/fsl-mc/include/mc.h b/drivers/staging/fsl-mc/include/mc.h index 1c46c0c..60c7067 100644 --- a/drivers/staging/fsl-mc/include/mc.h +++ b/drivers/staging/fsl-mc/include/mc.h @@ -104,6 +104,45 @@ struct fsl_mc_device_irq { #define to_fsl_mc_irq(_mc_resource) \ container_of(_mc_resource, struct fsl_mc_device_irq, resource) +/* Opened state - Indicates that an object is open by at least one owner */ +#define FSL_MC_OBJ_STATE_OPEN 0x00000001 +/* Plugged state - Indicates that the object is plugged */ +#define FSL_MC_OBJ_STATE_PLUGGED 0x00000002 + +/** + * Shareability flag - Object flag indicating no memory shareability. + * the object generates memory accesses that are non coherent with other + * masters; + * user is responsible for proper memory handling through IOMMU configuration. + */ +#define FSL_MC_OBJ_FLAG_NO_MEM_SHAREABILITY 0x0001 + +/** + * struct fsl_mc_obj_desc - Object descriptor + * @type: Type of object: NULL terminated string + * @id: ID of logical object resource + * @vendor: Object vendor identifier + * @ver_major: Major version number + * @ver_minor: Minor version number + * @irq_count: Number of interrupts supported by the object + * @region_count: Number of mappable regions supported by the object + * @state: Object state: combination of FSL_MC_OBJ_STATE_ states + * @label: Object label: NULL terminated string + * @flags: Object's flags + */ +struct fsl_mc_obj_desc { + char type[16]; + int id; + u16 vendor; + u16 ver_major; + u16 ver_minor; + u8 irq_count; + u8 region_count; + u32 state; + char label[16]; + u16 flags; +}; + /** * Bit masks for a MC object device (struct fsl_mc_device) flags */ @@ -150,7 +189,7 @@ struct fsl_mc_device { u16 icid; u16 mc_handle; struct fsl_mc_io *mc_io; - struct dprc_obj_desc obj_desc; + struct fsl_mc_obj_desc obj_desc; struct resource *regions; struct fsl_mc_device_irq **irqs; struct fsl_mc_resource *resource; |